@mavea/mavea 1.2.1 → 2.0.0

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 (389) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/PRIVACY.md +1 -0
  3. package/README.md +8 -4
  4. package/TERMS.md +1 -1
  5. package/THIRD-PARTY.txt +13 -5
  6. package/bin/mavea.mjs +143 -2
  7. package/dist/.vite/manifest.json +1469 -857
  8. package/dist/assets/AnnotationLayer-Cccb12ps.js +0 -0
  9. package/dist/assets/{AppCommandPalette-CgDUWU08.js → AppCommandPalette-DdOPNZ0e.js} +1 -1
  10. package/dist/assets/AtlasView-B7yObdf8.css +1 -0
  11. package/dist/assets/{AtlasView-B82UfrEX.js → AtlasView-DO_p0TdZ.js} +1 -1
  12. package/dist/assets/BriefingPlayer-DHV4vMga.css +1 -0
  13. package/dist/assets/{CadenceCard-P4teI7Se.js → CadenceCard-DxceyiPA.js} +1 -1
  14. package/dist/assets/{CanvasSkeleton-CRGWlafo.js → CanvasSkeleton-BmGjJHUQ.js} +1 -1
  15. package/dist/assets/CanvasSkeleton-DYASkTjW.css +1 -0
  16. package/dist/assets/CardEditor-CiAfT78z.css +1 -0
  17. package/dist/assets/{CardEditor-DABIhGdQ.js → CardEditor-D4slxmIM.js} +1 -1
  18. package/dist/assets/{CheckLogRail-DO7sbZwC.js → CheckLogRail-BibJTid0.js} +1 -1
  19. package/dist/assets/ConversationVideoStudio-CSO3jHXD.css +1 -0
  20. package/dist/assets/ConversationVideoStudio-DMIPUCcq.js +1 -0
  21. package/dist/assets/CourseLessonReader-D29Kix4f.js +2 -0
  22. package/dist/assets/{CourseRail-DXt3bzjU.js → CourseRail-BQmUsG6v.js} +1 -1
  23. package/dist/assets/CoursesApp-DcDsS_ZS.js +2 -0
  24. package/dist/assets/CrossExamPanel-BafTqkbf.css +1 -0
  25. package/dist/assets/{DashPresent-B6MP1i_4.js → DashPresent-BDWgO9am.js} +1 -1
  26. package/dist/assets/DashboardDetail-BrnAdWfy.js +2 -0
  27. package/dist/assets/DashboardLoopGate-NxMcQ4rD.js +2 -0
  28. package/dist/assets/DashboardLoopRuntime-Dsy9u1wa.js +1 -0
  29. package/dist/assets/{DashboardSettings-CE0B2y2y.js → DashboardSettings-DJon1Q4o.js} +1 -1
  30. package/dist/assets/DashboardsApp-DxyMn3x_.js +2 -0
  31. package/dist/assets/DeepZoomApp-CVwmnRGN.css +1 -0
  32. package/dist/assets/{DeepZoomApp-UEPtylG7.js → DeepZoomApp-nNjqoyYE.js} +1 -1
  33. package/dist/assets/DelegatePanel-D17XvWYd.css +1 -0
  34. package/dist/assets/DelegatePanel-DN_ZL0j7.js +33 -0
  35. package/dist/assets/DemoGallery-DrSlMsnu.js +1 -0
  36. package/dist/assets/{DropSelect-DilESAgA.css → DropSelect-B4lqCEjw.css} +1 -1
  37. package/dist/assets/{DropSelect-QcBm3N4D.js → DropSelect-GwIXHA5o.js} +1 -1
  38. package/dist/assets/{ExportModal-Ya0VBbxa.js → ExportModal-DBUjC71U.js} +1 -1
  39. package/dist/assets/{ExtractionPreview-BFrmqKDo.js → ExtractionPreview-D4M6eXqb.js} +1 -1
  40. package/dist/assets/{FeatureUseNotice-Dc3GNBvy.js → FeatureUseNotice-Bda9jr3W.js} +1 -1
  41. package/dist/assets/{FlagshipCommandPalette-B1yHwI6V.js → FlagshipCommandPalette-DAO849RC.js} +1 -1
  42. package/dist/assets/FlagshipShowcase-g2x-1c70.js +1 -0
  43. package/dist/assets/{FlashcardsApp-DteNeHpz.js → FlashcardsApp-BUKzCr65.js} +1 -1
  44. package/dist/assets/ForecastPanel-Cq_yDhNQ.css +1 -0
  45. package/dist/assets/GalleryApp-ot_A7ZF-.js +1 -0
  46. package/dist/assets/{HonestByDesign-DZltb3Ss.js → HonestByDesign-DgZFEpEx.js} +1 -1
  47. package/dist/assets/{HowItWorks-D-hgfN6a.js → HowItWorks-DPFpdeGE.js} +1 -1
  48. package/dist/assets/{LegalApp-ChzcKiY0.js → LegalApp-C56kWdmK.js} +1 -1
  49. package/dist/assets/{LegalMarkdownDocument-j6UHhPnp.js → LegalMarkdownDocument-BBTHuW_M.js} +1 -1
  50. package/dist/assets/{LegalPageShell-Wcsviye1.js → LegalPageShell-hMA-7JLf.js} +1 -1
  51. package/dist/assets/LeverPanel-HOEwIr8k.css +1 -0
  52. package/dist/assets/{Library-DmdzY2se.js → Library-CVj7R6F4.js} +1 -1
  53. package/dist/assets/LibraryOverlay-BkPYm0Bs.css +1 -0
  54. package/dist/assets/{LibraryOverlay-YHBrdVKo.js → LibraryOverlay-DSUWcUe4.js} +1 -1
  55. package/dist/assets/LiveApp-B62EMybC.js +79 -0
  56. package/dist/assets/LiveApp-CziqEsOb.css +1 -0
  57. package/dist/assets/LiveSettings-BITIaMoT.js +6 -0
  58. package/dist/assets/LiveSettings-Dho0OxlM.css +1 -0
  59. package/dist/assets/{MindMapViewerDrawer-DI_S7fRZ.js → MindMapViewerDrawer-CKdJtHno.js} +1 -1
  60. package/dist/assets/MindShape-B3lg_z4X.js +1 -0
  61. package/dist/assets/MindShape-CozR9W8M.css +1 -0
  62. package/dist/assets/{PinToDashboard-BCiWaSg8.js → PinToDashboard-DpQjBLPa.js} +1 -1
  63. package/dist/assets/{PlanReview-BIERfK1t.js → PlanReview-CrTbmMAd.js} +1 -1
  64. package/dist/assets/PresentationDeck-CfYadu9V.js +1 -0
  65. package/dist/assets/PrismApp-bRKK_3JA.js +2 -0
  66. package/dist/assets/PrismAskController-68gbUO5u.css +1 -0
  67. package/dist/assets/{PrismAskController-Bt0k9hAA.js → PrismAskController-C4MuB8om.js} +1 -1
  68. package/dist/assets/{PrismBriefingPlayer-DLAPs6eZ.js → PrismBriefingPlayer-ChJj6hSS.js} +2 -2
  69. package/dist/assets/PrismOverlay-BwnF4BEn.css +1 -0
  70. package/dist/assets/{PrismOverlay-DJDGPGxo.js → PrismOverlay-Pp6ZKmTc.js} +4 -4
  71. package/dist/assets/{PrismWorkbench-DHLvpguj.js → PrismWorkbench-BCV7r4Oa.js} +1 -1
  72. package/dist/assets/{PrivacyApp-uMjq2z14.js → PrivacyApp-A2Bu6LVd.js} +2 -1
  73. package/dist/assets/{Recap-T9DtFaEk.js → Recap-BOl3SUh0.js} +1 -1
  74. package/dist/assets/Recap-D3NlzM1p.css +1 -0
  75. package/dist/assets/{ReplayCard-F7U3LYAg.js → ReplayCard-B6NYiYzQ.js} +2 -2
  76. package/dist/assets/{ReplayOverlay-BTldvkU7.js → ReplayOverlay-BJKtJ-vc.js} +1 -1
  77. package/dist/assets/{RewindOverlay-CousnxXo.js → RewindOverlay-BO7YgDsW.js} +1 -1
  78. package/dist/assets/RippleApp-BXt7tenS.js +2 -0
  79. package/dist/assets/{RippleAskController-9SxpZnHX.js → RippleAskController-BzdwYcYY.js} +1 -1
  80. package/dist/assets/RippleOverlay-B3hg2KMN.css +1 -0
  81. package/dist/assets/RippleOverlay-BSxubBwj.js +6 -0
  82. package/dist/assets/SeeDontRead-0He5hS2C.js +1 -0
  83. package/dist/assets/ShareModal-I_sxHKLv.css +1 -0
  84. package/dist/assets/ShareModal-xYdZWJxy.js +2 -0
  85. package/dist/assets/{ShipCourse-Up9gRR07.js → ShipCourse-Dg6kCWyH.js} +1 -1
  86. package/dist/assets/{SignatureLoop-Cq790dMw.js → SignatureLoop-QPwB2oNN.js} +1 -1
  87. package/dist/assets/SrsReview-DmBcJCMa.css +1 -0
  88. package/dist/assets/{SrsReview-DhWNYYv7.js → SrsReview-Gr6Y0QTQ.js} +1 -1
  89. package/dist/assets/{SynthesisApp-4ZPLZgmJ.js → SynthesisApp-DrCq6NDa.js} +2 -2
  90. package/dist/assets/{SynthesisOverlay-iesJ0hEt.js → SynthesisOverlay-DCa-2Pz_.js} +1 -1
  91. package/dist/assets/{TermsApp-DL2hFKsv.js → TermsApp-zcPDYfuh.js} +2 -2
  92. package/dist/assets/TopicCanvas-Bw4bMFpe.js +2 -0
  93. package/dist/assets/TopicCanvas-DWTm611H.css +1 -0
  94. package/dist/assets/{TourPrism-kInUOv-M.js → TourPrism-DbinDupp.js} +1 -1
  95. package/dist/assets/{TrackerTile-BryDo0sm.js → TrackerTile-CrT9u1I4.js} +2 -2
  96. package/dist/assets/{TwoSurfaces-Cmj95ofx.js → TwoSurfaces-L0CDuyOZ.js} +1 -1
  97. package/dist/assets/WhyMachineOverlay-Rav-cuMm.css +1 -0
  98. package/dist/assets/WorldOverlay-BcjqG1BR.js +2 -0
  99. package/dist/assets/{WowFeatures-DDICbxl_.js → WowFeatures-CwBk4ZMO.js} +1 -1
  100. package/dist/assets/ZoomDeck-DdLNsrHV.css +1 -0
  101. package/dist/assets/{ZoomDeck-CKOjYS9z.js → ZoomDeck-DlnesweX.js} +1 -1
  102. package/dist/assets/{annotationAuto-CDv6Es44.js → annotationAuto-B2UdfJNj.js} +1 -1
  103. package/dist/assets/{backup-ZrlVatXc.js → backup-685QrAjt.js} +1 -1
  104. package/dist/assets/canvas-C3O7MEA3.js +1 -0
  105. package/dist/assets/capture-DgJLQ_0-.js +2 -0
  106. package/dist/assets/{chapters-Dqm4iLDa.js → chapters-CIvdCeBC.js} +1 -1
  107. package/dist/assets/{confirmAdd-DkmbWaSk.js → confirmAdd-CZ829Mbx.js} +1 -1
  108. package/dist/assets/{dashboardEvents-D-XVj666.js → dashboardEvents-CiayRLrH.js} +1 -1
  109. package/dist/assets/dashboards-Cvs28p3Z.css +1 -0
  110. package/dist/assets/deepen-DAeHHFiI.js +11 -0
  111. package/dist/assets/deepenStore-BWLLzLCY.js +1 -0
  112. package/dist/assets/effort-jJe4iMIq.js +39 -0
  113. package/dist/assets/{explode-BgZIWY9m.js → explode-CPnvJiTg.js} +1 -1
  114. package/dist/assets/{fitText-DQ2omSN0.js → fitText-DHbmSS-q.js} +1 -1
  115. package/dist/assets/{generate-Dl2EJ_SR.js → generate-COfYQFmT.js} +4 -4
  116. package/dist/assets/{generateBeats-DtptFLlG.js → generateBeats-COflu5Zi.js} +1 -1
  117. package/dist/assets/{generateCourse-C9qvaJRo.js → generateCourse-BldPpgdh.js} +1 -1
  118. package/dist/assets/generateLive-DGwnpIip.js +24 -0
  119. package/dist/assets/homeTarget-CwFsJYwb.js +1 -0
  120. package/dist/assets/index-BIUYTk1W.css +1 -0
  121. package/dist/assets/index-LiHcEJt_.js +22 -0
  122. package/dist/assets/kokoro-DXRj0KQX.js +1 -0
  123. package/dist/assets/ledger-BssK9Pv2.js +1 -0
  124. package/dist/assets/{lib-DMAxsZKm.css → lib-DP9Kuxqk.css} +1 -1
  125. package/dist/assets/{liveSchema-B4bQtO88.js → liveSchema-DyfND6P2.js} +2 -2
  126. package/dist/assets/{loader-DCA6Njbf.js → loader-DgMLGfAC.js} +2 -2
  127. package/dist/assets/localBudget-CxLP6bjE.js +1 -0
  128. package/dist/assets/{mastery-CUfDeuqO.js → mastery-DB5qpRAy.js} +1 -1
  129. package/dist/assets/{media-BvwzACIX.js → media-VLRh6CX2.js} +2 -2
  130. package/dist/assets/{model-BFRTN9Eh.js → model-CAewjw45.js} +1 -1
  131. package/dist/assets/{neighborhoods-D7QjURnE.js → neighborhoods-CqECCmo8.js} +1 -1
  132. package/dist/assets/{notes-B6eX5XWk.js → notes-DzIAEESd.js} +1 -1
  133. package/dist/assets/pen-DtEW1xf4.js +24 -0
  134. package/dist/assets/{perfProbe-CE7hsUEo.js → perfProbe-ezVn1mOu.js} +1 -1
  135. package/dist/assets/{pin-BZuh1acO.js → pin-BPGVDgnq.js} +1 -1
  136. package/dist/assets/pin-BXyyKnci.css +1 -0
  137. package/dist/assets/{planTracker-KKAtTBWs.js → planTracker-BwoKEftp.js} +1 -1
  138. package/dist/assets/portal-B9DmFo6J.js +1 -0
  139. package/dist/assets/{prewarm-uKxmzjjd.js → prewarm-BgUqAJbF.js} +1 -1
  140. package/dist/assets/providers-0DthJW_I.js +1 -0
  141. package/dist/assets/quietHours-DyynzDyC.js +1 -0
  142. package/dist/assets/{ready-jtAUOb62.js → ready-yBSGJubb.js} +1 -1
  143. package/dist/assets/{registry-B2QzCuWH.js → registry-7tKTrzeZ.js} +1 -1
  144. package/dist/assets/{registry-BFrgx1tE.js → registry-B53EEn8S.js} +1 -1
  145. package/dist/assets/{registry-CPiwQhAm.js → registry-BDXwUn3i.js} +1 -1
  146. package/dist/assets/{registry-DtV2UjBx.js → registry-BJEvFgoL.js} +1 -1
  147. package/dist/assets/{registry-B0GIHERt.js → registry-BQzvA61G.js} +1 -1
  148. package/dist/assets/{registry-6DGRAB1m.js → registry-BT6ydF33.js} +1 -1
  149. package/dist/assets/{registry-D8O0apUT.js → registry-BdHj_oIs.js} +1 -1
  150. package/dist/assets/{registry-Dru0JcTa.css → registry-BgWzEkxc.css} +1 -1
  151. package/dist/assets/{registry-Vp8VuMV0.js → registry-Bl2qfp5V.js} +1 -1
  152. package/dist/assets/registry-Bl7zAWKt.js +2 -0
  153. package/dist/assets/{registry-Dwbh-GWu.js → registry-BlujNlQJ.js} +1 -1
  154. package/dist/assets/{registry-C28gYnVq.js → registry-CE1T0z9x.js} +1 -1
  155. package/dist/assets/{registry-4mMEt1Xy.css → registry-CEV5h2cu.css} +1 -1
  156. package/dist/assets/{registry-ZOWzhOHk.css → registry-CGB0jkFI.css} +1 -1
  157. package/dist/assets/{registry-BFbfXK-W.js → registry-Cgo4C0ux.js} +1 -1
  158. package/dist/assets/registry-CwRTUk0R.js +1 -0
  159. package/dist/assets/{registry-1wlTAh5b.js → registry-D06LKiUk.js} +1 -1
  160. package/dist/assets/registry-Dbe9TQPw.css +1 -0
  161. package/dist/assets/registry-Diyud3DF.js +1 -0
  162. package/dist/assets/registry-DjvftnY2.css +1 -0
  163. package/dist/assets/{registry-w4R6c89s.js → registry-KRYoVMCh.js} +1 -1
  164. package/dist/assets/registry-QbArAJKB.js +1 -0
  165. package/dist/assets/registry-dmR14XnY.css +1 -0
  166. package/dist/assets/registry-g2sBcIrf.css +1 -0
  167. package/dist/assets/{registry-CcOO8UZr.js → registry-qRfnKTt4.js} +1 -1
  168. package/dist/assets/{relate-UW-sUlJH.js → relate-aQFFr11O.js} +1 -1
  169. package/dist/assets/{replay-B5TkHPri.js → replay-CalqEgdW.js} +1 -1
  170. package/dist/assets/route-CMdTFx0P.js +1 -0
  171. package/dist/assets/{run-Df10YPyB.js → run-CuHaB8wF.js} +1 -1
  172. package/dist/assets/{run-gmqUaxcL.js → run-CwMSPOps.js} +1 -1
  173. package/dist/assets/{run-DlvA3l28.js → run-DCQrxgHA.js} +1 -1
  174. package/dist/assets/select-wEtBn9U6.js +3 -0
  175. package/dist/assets/shapes-BwoDrn09.js +1 -0
  176. package/dist/assets/shard000-Bx6Nmt0m.js +1 -0
  177. package/dist/assets/shard001-CL6O9SLr.js +1 -0
  178. package/dist/assets/shard002-vLQ0Ss-O.js +1 -0
  179. package/dist/assets/shard003-kKZdpzuh.js +1 -0
  180. package/dist/assets/shard004-CdVohAu1.js +1 -0
  181. package/dist/assets/shard005-CMzF_uJB.js +1 -0
  182. package/dist/assets/shard006-DQoDWuoN.js +1 -0
  183. package/dist/assets/shard007-Ck0N0IUk.js +1 -0
  184. package/dist/assets/shard008-Dt395x0Q.js +1 -0
  185. package/dist/assets/shard009-D_z8Lhqh.js +1 -0
  186. package/dist/assets/shard010-CQfR6lnk.js +1 -0
  187. package/dist/assets/shard011-l-w2t2Ie.js +1 -0
  188. package/dist/assets/shard012-BTw_UO1C.js +1 -0
  189. package/dist/assets/shard013-D8ZjKKYb.js +1 -0
  190. package/dist/assets/shard014-Cth_76It.js +1 -0
  191. package/dist/assets/shard015-DdYJVsHx.js +1 -0
  192. package/dist/assets/shard016-BdlBf9uZ.js +1 -0
  193. package/dist/assets/shard017-C3HTxh6t.js +1 -0
  194. package/dist/assets/shard018-Mf4wvqVk.js +1 -0
  195. package/dist/assets/shard019-Dpcy1Arx.js +1 -0
  196. package/dist/assets/shard020-BNvKfQld.js +1 -0
  197. package/dist/assets/shard021-D0kpI_PQ.js +1 -0
  198. package/dist/assets/shard022-Cjms7kAe.js +1 -0
  199. package/dist/assets/shard023-Bdwci7fy.js +1 -0
  200. package/dist/assets/shard024-BBoyPtpP.js +1 -0
  201. package/dist/assets/shard025-lMGpgN_0.js +3 -0
  202. package/dist/assets/shard026-Bp3UVI4_.js +1 -0
  203. package/dist/assets/shard027-C4HTpdeT.js +1 -0
  204. package/dist/assets/shard028-BsFTH3Sf.js +1 -0
  205. package/dist/assets/shard029-B3dEcXPy.js +1 -0
  206. package/dist/assets/shard030-DWwA-fNs.js +5 -0
  207. package/dist/assets/shard031-RhqA_0nH.js +1 -0
  208. package/dist/assets/shard032-BlZdG1Yi.js +1 -0
  209. package/dist/assets/shard033-Dmx2lOjI.js +1 -0
  210. package/dist/assets/shard034-BLOFKJT4.js +1 -0
  211. package/dist/assets/shard035-DMXdH733.js +1 -0
  212. package/dist/assets/shard036-DzOiEn23.js +1 -0
  213. package/dist/assets/shard037-BcHfVaYM.js +1 -0
  214. package/dist/assets/shard038-KozOx-Jh.js +1 -0
  215. package/dist/assets/shard039-apdILQwC.js +1 -0
  216. package/dist/assets/shard040-BrNXGaBi.js +1 -0
  217. package/dist/assets/shard041-D6eq9h1u.js +4 -0
  218. package/dist/assets/shard042-M-L34DbY.js +1 -0
  219. package/dist/assets/shard043-Ct6_C2pN.js +1 -0
  220. package/dist/assets/shard044-Bo0iaVHx.js +1 -0
  221. package/dist/assets/shard045-9ccZ4Y_N.js +1 -0
  222. package/dist/assets/shard046-eXoP478L.js +1 -0
  223. package/dist/assets/shard047-N56r6Lsz.js +1 -0
  224. package/dist/assets/shard048-BeKX7cI8.js +1 -0
  225. package/dist/assets/shard049-hPaNN2sL.js +1 -0
  226. package/dist/assets/shard050-B-YpP0B6.js +1 -0
  227. package/dist/assets/shard051-Bww5_KB2.js +1 -0
  228. package/dist/assets/shard052-DErwF8Df.js +1 -0
  229. package/dist/assets/shard053-C-qGH4jz.js +1 -0
  230. package/dist/assets/shard054-kcSxZrSj.js +1 -0
  231. package/dist/assets/shard055-CsETBTqa.js +1 -0
  232. package/dist/assets/shard056-CdBR4qTC.js +1 -0
  233. package/dist/assets/shard057-yRUG8B9e.js +1 -0
  234. package/dist/assets/shard058-DeDAnECG.js +1 -0
  235. package/dist/assets/shard059-Dh6jbDnW.js +1 -0
  236. package/dist/assets/shard060-B5kpWrhW.js +1 -0
  237. package/dist/assets/shard061-BTnj5LZA.js +1 -0
  238. package/dist/assets/shard062-DC7LTaNc.js +1 -0
  239. package/dist/assets/shard063-C8SIGCfd.js +1 -0
  240. package/dist/assets/shard064-DLyASocW.js +1 -0
  241. package/dist/assets/shard065-Cy_yV4ry.js +1 -0
  242. package/dist/assets/shard066-BmjVQqFX.js +1 -0
  243. package/dist/assets/shard067-uZUJsqtF.js +1 -0
  244. package/dist/assets/shard068-CXVjyJU4.js +1 -0
  245. package/dist/assets/shard069-CyfmjAm-.js +4 -0
  246. package/dist/assets/shard070-CxN3xiuY.js +12 -0
  247. package/dist/assets/shard071-CP1WrYC-.js +1 -0
  248. package/dist/assets/shard072-D6L5Yr05.js +1 -0
  249. package/dist/assets/shard073-DFEzkwg2.js +1 -0
  250. package/dist/assets/shard074-BSv3rvRL.js +1 -0
  251. package/dist/assets/shard075-Bt0OjGVd.js +1 -0
  252. package/dist/assets/shard076-DZHs0uzd.js +1 -0
  253. package/dist/assets/{share-kW3pZ027.js → share--tpc1nLE.js} +1 -1
  254. package/dist/assets/speed-BOytg6bC.js +1 -0
  255. package/dist/assets/store-B2Rpbqgg.js +1 -0
  256. package/dist/assets/store-Ba9vzL4H.js +1 -0
  257. package/dist/assets/store-BwyOArJl.js +1 -0
  258. package/dist/assets/store-ruEsXJjU.js +1 -0
  259. package/dist/assets/streamParse-BX0bAppQ.js +2 -0
  260. package/dist/assets/{templates-DHeyJ32F.css → templates-BIkAr4YH.css} +1 -1
  261. package/dist/assets/{theme-7IrMJ70_.js → theme-D5D55hZi.js} +1 -1
  262. package/dist/assets/{threads-Cu2t3070.js → threads-DNfxMTwx.js} +1 -1
  263. package/dist/assets/{useDashboardLoop-BoVNM-pT.js → useDashboardLoop-ifcuVRo-.js} +3 -3
  264. package/dist/assets/{useDashboards-SRk8LqHe.js → useDashboards-lgQnk2Al.js} +1 -1
  265. package/dist/assets/useFocusTrap-CJmpNZv2.js +1 -0
  266. package/dist/assets/useInView-DsTvv7L_.js +1 -0
  267. package/dist/assets/useInterval-DDgFrel2.js +1 -0
  268. package/dist/assets/{useLiveConfig-Cpy0_E_-.js → useLiveConfig-B4CmBiAK.js} +1 -1
  269. package/dist/assets/useStudy-CySgE3Cx.js +1 -0
  270. package/dist/assets/{walkSync-CT8kmbzY.js → walkSync-DBne70gg.js} +1 -1
  271. package/dist/demo-assets/CREDITS.md +94 -50
  272. package/dist/demo-assets/images/arnel-lighthouse.avif +0 -0
  273. package/dist/demo-assets/images/cliff-fields.avif +0 -0
  274. package/dist/demo-assets/images/crater-panorama.avif +0 -0
  275. package/dist/demo-assets/images/furnas-lake.avif +0 -0
  276. package/dist/demo-assets/images/green-coast-raw.avif +0 -0
  277. package/dist/demo-assets/images/green-coast.avif +0 -0
  278. package/dist/demo-assets/images/island-coast-poster.avif +0 -0
  279. package/dist/demo-assets/images/nordeste-town.avif +0 -0
  280. package/dist/demo-assets/images/sea-cliffs.avif +0 -0
  281. package/dist/demo-assets/images/sete-cidades.avif +0 -0
  282. package/dist/demo-assets/images/tea-terraces.avif +0 -0
  283. package/dist/demo-assets/pdf/cfd-primer.pdf +0 -0
  284. package/dist/demo-assets/video/island-coast.webm +0 -0
  285. package/dist/fonts/fonts.css +18 -0
  286. package/dist/index.html +38 -10
  287. package/dist/legal/PRIVACY.md +1 -0
  288. package/dist/legal/TERMS.md +1 -1
  289. package/dist/legal/THIRD-PARTY.txt +13 -5
  290. package/package.json +3 -2
  291. package/dist/assets/AnnotationLayer-8JABh1Dm.js +0 -0
  292. package/dist/assets/AtlasView-B5fkQhO6.css +0 -1
  293. package/dist/assets/BriefingPlayer-TpFZB77N.css +0 -1
  294. package/dist/assets/CanvasSkeleton-iy6DBvde.css +0 -1
  295. package/dist/assets/CardEditor-BY1bZiV6.css +0 -1
  296. package/dist/assets/ConversationVideoStudio-CIAMxElj.css +0 -1
  297. package/dist/assets/ConversationVideoStudio-tpqQQnOs.js +0 -1
  298. package/dist/assets/CourseLessonReader-PFJn-4tj.js +0 -2
  299. package/dist/assets/CoursesApp-5pnHYJR8.js +0 -2
  300. package/dist/assets/CrossExamPanel-CZ0ShGma.css +0 -1
  301. package/dist/assets/DashboardDetail-DYFghZ4p.js +0 -2
  302. package/dist/assets/DashboardLoopGate-C0blM1w9.js +0 -2
  303. package/dist/assets/DashboardLoopRuntime-C9R-z9-o.js +0 -1
  304. package/dist/assets/DashboardsApp-Dh_jh1dF.js +0 -2
  305. package/dist/assets/DeepZoomApp-fRXCJHHZ.css +0 -1
  306. package/dist/assets/DelegatePanel-Cf85-0qE.css +0 -1
  307. package/dist/assets/DelegatePanel-DKWsRY9I.js +0 -33
  308. package/dist/assets/DemoGallery-CkuqAXje.js +0 -1
  309. package/dist/assets/FlagshipShowcase-BHAlRDAE.js +0 -1
  310. package/dist/assets/ForecastPanel-Da2ZBUrE.css +0 -1
  311. package/dist/assets/GalleryApp-DziLKFJZ.js +0 -1
  312. package/dist/assets/LeverPanel-DhpJY76O.css +0 -1
  313. package/dist/assets/LibraryOverlay-CnKWDMG_.css +0 -1
  314. package/dist/assets/LiveApp-C-OPBybd.css +0 -1
  315. package/dist/assets/LiveApp-D6vkyhZb.js +0 -79
  316. package/dist/assets/LiveSettings-C9cKOrSb.js +0 -6
  317. package/dist/assets/LiveSettings-CmgrMqvK.css +0 -1
  318. package/dist/assets/MindShape-C_Bo9hW9.js +0 -1
  319. package/dist/assets/MindShape-CaPeUo-a.css +0 -1
  320. package/dist/assets/PresentationDeck-BW_7qecK.js +0 -1
  321. package/dist/assets/PrismApp-BY71jJvW.js +0 -2
  322. package/dist/assets/PrismAskController-DBoxQSJR.css +0 -1
  323. package/dist/assets/PrismOverlay-BTfAicBt.css +0 -1
  324. package/dist/assets/Recap-DCiiWNiV.css +0 -1
  325. package/dist/assets/RippleApp-DZw8op-E.js +0 -2
  326. package/dist/assets/RippleOverlay-D7ItTvS-.js +0 -6
  327. package/dist/assets/RippleOverlay-_iiZsQVZ.css +0 -1
  328. package/dist/assets/SeeDontRead-DmmtWAzn.js +0 -1
  329. package/dist/assets/ShareModal-9jSn52Mw.js +0 -2
  330. package/dist/assets/ShareModal-D1QuQEko.css +0 -1
  331. package/dist/assets/SrsReview-B1B2VekR.css +0 -1
  332. package/dist/assets/TopicCanvas-DozfZFto.js +0 -2
  333. package/dist/assets/TopicCanvas-uRuHi99s.css +0 -1
  334. package/dist/assets/WhyMachineOverlay-BZk3PVTl.css +0 -1
  335. package/dist/assets/WorldOverlay-yhxq328s.js +0 -2
  336. package/dist/assets/ZoomDeck-B2SjNwY7.css +0 -1
  337. package/dist/assets/canvas-vqIFVmtP.js +0 -1
  338. package/dist/assets/capture-9OrAc1p2.js +0 -2
  339. package/dist/assets/dashboards-C1u2ks-d.css +0 -1
  340. package/dist/assets/generateLive-B6purd69.js +0 -51
  341. package/dist/assets/homeTarget-CsO8nY7z.js +0 -1
  342. package/dist/assets/index-DrzNHwlO.css +0 -1
  343. package/dist/assets/index-zIa6h_8b.js +0 -22
  344. package/dist/assets/kokoro-B3oG_8sd.js +0 -1
  345. package/dist/assets/layout-CEoNLr-w.js +0 -1
  346. package/dist/assets/pageVisibility-BxUVsw7Z.js +0 -1
  347. package/dist/assets/pen-DNMslo3e.js +0 -24
  348. package/dist/assets/pin-D-4Zjiik.css +0 -1
  349. package/dist/assets/portal-k_BMgWND.js +0 -1
  350. package/dist/assets/providers-BovElgRL.js +0 -1
  351. package/dist/assets/quietHours-DI1ayIIq.js +0 -1
  352. package/dist/assets/registry-BSX3aFUw.js +0 -1
  353. package/dist/assets/registry-Bv1f5UU4.js +0 -2
  354. package/dist/assets/registry-Cse2wF7x.css +0 -1
  355. package/dist/assets/registry-Dye5m3qt.css +0 -1
  356. package/dist/assets/registry-GeSy4i7R.css +0 -1
  357. package/dist/assets/registry-WHd1PwU3.js +0 -1
  358. package/dist/assets/registry-Xl8mAnKq.js +0 -1
  359. package/dist/assets/registry-tkd3UhWn.css +0 -1
  360. package/dist/assets/shapes-Cx5SCKgj.js +0 -39
  361. package/dist/assets/speed-K5_Ebj-8.js +0 -1
  362. package/dist/assets/store-BfHRbVKz.js +0 -1
  363. package/dist/assets/store-CsjDEADX.js +0 -1
  364. package/dist/assets/store-DpObYU1u.js +0 -1
  365. package/dist/assets/store-gohr8YVT.js +0 -1
  366. package/dist/assets/streamParse-B-Gjwa9T.js +0 -2
  367. package/dist/assets/useFocusTrap-DBtkeyRy.js +0 -1
  368. package/dist/assets/useInView-CXTOAEV3.js +0 -1
  369. package/dist/assets/useStudy-5CsF_L-s.js +0 -1
  370. package/dist/demo-assets/images/basalt-cliffs.jpg +0 -0
  371. package/dist/demo-assets/images/capelinhos.jpg +0 -0
  372. package/dist/demo-assets/images/cliff-fields.jpg +0 -0
  373. package/dist/demo-assets/images/crater-panorama.jpg +0 -0
  374. package/dist/demo-assets/images/furnas-lake.jpg +0 -0
  375. package/dist/demo-assets/images/green-coast.jpg +0 -0
  376. package/dist/demo-assets/images/overcast-coast.jpg +0 -0
  377. package/dist/demo-assets/images/patchwork-fields.jpg +0 -0
  378. package/dist/demo-assets/images/ponta-delgada.jpg +0 -0
  379. package/dist/demo-assets/images/sete-cidades.jpg +0 -0
  380. package/dist/demo-assets/images/village-street.jpg +0 -0
  381. package/dist/demo-assets/video/azores-film.webm +0 -0
  382. /package/dist/assets/{BriefingPlayer-C0D_2ILa.js → BriefingPlayer-74mRKyjl.js} +0 -0
  383. /package/dist/assets/{CrossExamPanel-CdIYUu-B.js → CrossExamPanel-BfeGr5iw.js} +0 -0
  384. /package/dist/assets/{ForecastPanel-zPUh2ClQ.js → ForecastPanel-OfW39WGS.js} +0 -0
  385. /package/dist/assets/{LeverPanel-D1SNRGdm.js → LeverPanel-vco5UK2U.js} +0 -0
  386. /package/dist/assets/{WhyMachineOverlay-ks9-rRiL.js → WhyMachineOverlay-D2K7y8SA.js} +0 -0
  387. /package/dist/assets/{lib-B7OE1ZQQ.js → lib-u95BsX_B.js} +0 -0
  388. /package/dist/assets/{registry-7poQfBaM.js → registry-C4Yh05pk.js} +0 -0
  389. /package/dist/assets/{registry-Daypk4uR.js → registry-S3j4OpCH.js} +0 -0
@@ -1,79 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-kNHRtoqd.js","assets/rolldown-runtime-DkW27tQK.js","assets/preload-helper-CiWYd9n-.js","assets/generateLive-B6purd69.js","assets/blockLabel-FogyzEQY.js","assets/layout-CEoNLr-w.js","assets/catalog-BHjl-1uH.js","assets/history-D2EH2X6D.js","assets/catalog-Db9GWM6N.js","assets/facts-BUGuVUIc.js","assets/blockTypes-DUDdP3pB.js","assets/streamParse-B-Gjwa9T.js","assets/liveSchema-B4bQtO88.js","assets/icons-gLFQTv74.js","assets/jsx-runtime-DeHZSEgm.js","assets/spokenText-C88IQJ0M.js","assets/safeImageUrl-BINWXOTz.js","assets/sourceHost-BV3t2XDb.js","assets/annotations-CftUUB13.js","assets/screen-DFWKge3-.js","assets/attachments-BW-vki-E.js","assets/providers-BovElgRL.js","assets/http-Lar_UMKb.js","assets/info-CiqHR5cs.js","assets/shapes-Cx5SCKgj.js","assets/speed-K5_Ebj-8.js","assets/cache-CvbSI-pr.js","assets/validate-sGUCmPAs.js","assets/types-C42I77wh.js","assets/json-B0N3XRZU.js","assets/verbatim-DBTj9sPD.js","assets/citation-BsSvaaer.js","assets/number-zqlPMliA.js","assets/receipts-D7zveV-I.js","assets/officeDoc-GU6Cssjf.js","assets/csv-DAqzYXUs.js","assets/search-ZN7v_P5B.js","assets/store-BWLbFXiY.js","assets/contentVault-xfUwSJ3i.js","assets/keyVault-Aw5Y2PjT.js","assets/ready-jtAUOb62.js","assets/now-C9-UAzTC.js","assets/TopicCanvas-DozfZFto.js","assets/react-BZJXY1be.js","assets/compiler-runtime-qQQXpJgv.js","assets/index-zIa6h_8b.js","assets/useInView-CXTOAEV3.js","assets/coreIcons-DDTChE1H.js","assets/preloadableLazy-MIX1ApBW.js","assets/cachedImport-DW0gP14h.js","assets/lazyRetry-D50B1UMY.js","assets/theme-7IrMJ70_.js","assets/index-DrzNHwlO.css","assets/loader-DCA6Njbf.js","assets/FallbackCard-ap_4wOfj.js","assets/FallbackCard-D_6ps1xA.css","assets/useFocusTrap-DBtkeyRy.js","assets/motion-BY_Egaxm.js","assets/useSpatialCanvas-CfmZOXXP.js","assets/CanvasSkeleton-CRGWlafo.js","assets/CanvasSkeleton-iy6DBvde.css","assets/richText-BkxJhl9N.js","assets/toast-BBNs2h3L.js","assets/format-q0LwBjID.js","assets/useValidatedImage-BQi2c66o.js","assets/lib-B7OE1ZQQ.js","assets/BlockEmpty-B82uCse8.js","assets/motion-DxHSlPN6.js","assets/lib-DMAxsZKm.css","assets/TopicCanvas-uRuHi99s.css","assets/HowItWorks-D-hgfN6a.js","assets/generateBeats-DtptFLlG.js","assets/walkSync-CT8kmbzY.js","assets/kokoro-B3oG_8sd.js","assets/nextFrame-12y0UrAd.js","assets/canvas-vqIFVmtP.js","assets/ReplayCard-F7U3LYAg.js","assets/annotationReel-K2FYv-3B.js","assets/registry-Dd1lcXrO.js","assets/svgLabel-BQMDdcT2.js","assets/fit-CMu7prjb.js","assets/ReplayCard-Cs6mzTRa.css","assets/CommandPalette-Bs6tpdZl.js","assets/registry-DGNSqTxE.js","assets/CommandPalette-Bb-eErih.css","assets/Library-DmdzY2se.js","assets/neighborhoods-D7QjURnE.js","assets/chapters-Dqm4iLDa.js","assets/threads-Cu2t3070.js","assets/time-BHTmJR1s.js","assets/Library-DmrtHjUf.css","assets/LiveSettings-C9cKOrSb.js","assets/FeatureUseNotice-Dc3GNBvy.js","assets/FeatureUseNotice-CsCxxfOl.css","assets/useLiveConfig-Cpy0_E_-.js","assets/store-gohr8YVT.js","assets/friendlyAsk-BBdRZIar.js","assets/quietHours-DI1ayIIq.js","assets/DropSelect-QcBm3N4D.js","assets/DropSelect-DilESAgA.css","assets/useStudy-5CsF_L-s.js","assets/store-D2IJF4SA.js","assets/queue-Adae4IzW.js","assets/LiveSettings-CmgrMqvK.css","assets/DashboardDetail-DYFghZ4p.js","assets/store-CsjDEADX.js","assets/route-D4kd-D3B.js","assets/useDashboards-SRk8LqHe.js","assets/format-g3dP8OI3.js","assets/ledger-Cv0LBflx.js","assets/dataPending-DGdCvY5Y.js","assets/AreaChart-DZGCSEwt.js","assets/tiles-D-s6v-mA.js","assets/tiles-CBiVVjtT.css","assets/useDashboardLoop-BoVNM-pT.js","assets/predictions-CkVKHq-5.js","assets/notify-Bz4wuE4T.js","assets/dashboardEvents-D-XVj666.js","assets/confirmAdd-DkmbWaSk.js","assets/planTracker-KKAtTBWs.js","assets/pin-BZuh1acO.js","assets/pin-D-4Zjiik.css","assets/CadenceCard-P4teI7Se.js","assets/CheckLogRail-DO7sbZwC.js","assets/useLedger-1WVXef68.js","assets/checkLogModel-BMtruriG.js","assets/CheckLogRail-BOaXnqWK.css","assets/DashboardDetail-8J8TsdQg.css","assets/dashboards-C1u2ks-d.css","assets/DashboardSettings-CE0B2y2y.js","assets/UnderstoodPanel-DmJph4el.js","assets/UnderstoodPanel-Q6GX1TFq.css","assets/ZoomDeck-CKOjYS9z.js","assets/portal-k_BMgWND.js","assets/useZoomGesture-CN0p0lHL.js","assets/ZoomDeck-B2SjNwY7.css","assets/AtlasView-B82UfrEX.js","assets/store-D-f8ZuaK.js","assets/AtlasView-B5fkQhO6.css","assets/RippleOverlay-D7ItTvS-.js","assets/buildShip-BgFg98tH.js","assets/parseDiff-D8uBQ9mQ.js","assets/incident-D3bmMmES.js","assets/githubToken-Bwa7V9YT.js","assets/colors-D49Req-e.js","assets/courseStore-DfafnL-9.js","assets/RippleOverlay-_iiZsQVZ.css","assets/CardEditor-DABIhGdQ.js","assets/CardEditor-BY1bZiV6.css","assets/CourseRail-DXt3bzjU.js","assets/store-BfHRbVKz.js","assets/generateCourse-C9qvaJRo.js","assets/useSrsCards-C27o39fF.js","assets/deckLine-NBd3MyGT.js","assets/CourseRail-CUa7uIGG.css","assets/MindMapViewerDrawer-DI_S7fRZ.js","assets/MindShape-C_Bo9hW9.js","assets/Presence-UqXfH4Y-.js","assets/geometry-DXAbnb0J.js","assets/MindShape-CaPeUo-a.css","assets/Recap-T9DtFaEk.js","assets/Recap-DCiiWNiV.css","assets/LibraryOverlay-YHBrdVKo.js","assets/LibraryOverlay-CnKWDMG_.css","assets/ReplayOverlay-BTldvkU7.js","assets/replay-B5TkHPri.js","assets/AnnotationLayer-8JABh1Dm.js","assets/gesture-Bouqjr3g.js","assets/emphasize-BqCIst-B.js","assets/AnnotationLayer-ClU-e6qL.css","assets/ReplayOverlay-DzkcTnCA.css","assets/ShareModal-9jSn52Mw.js","assets/capture-9OrAc1p2.js","assets/share-kW3pZ027.js","assets/ReelJelly-D5e-jt-8.js","assets/ShareModal-D1QuQEko.css","assets/ExportModal-Ya0VBbxa.js","assets/notes-B6eX5XWk.js","assets/registry-CPiwQhAm.js","assets/scale-Bcgfo6Hp.js","assets/registry-types-D3q_LrlV.js","assets/fitText-DQ2omSN0.js","assets/registry-CNgybLQv.css","assets/registry-6DGRAB1m.js","assets/openWorld-BHTJM39n.js","assets/display-CAb_PiGv.js","assets/registry-BZuT2Epw.css","assets/registry-CcOO8UZr.js","assets/registry-2GJZ46M8.css","assets/registry-CPImC7mO.js","assets/empty-BO1NC9qY.js","assets/registry-B1KQ1VPZ.css","assets/registry-B0GIHERt.js","assets/spreadLabels-CQ8hufvK.js","assets/registry-CuVk7MAI.css","assets/registry-D8O0apUT.js","assets/CodeOutput-DF892aIR.js","assets/useTimeout-Cm4yzted.js","assets/registry-BzNLfje1.css","assets/registry-Vp8VuMV0.js","assets/registry-twSIyxJQ.css","assets/registry-BFbfXK-W.js","assets/registry-UFIuwh3i.css","assets/registry-7poQfBaM.js","assets/registry-ZOWzhOHk.css","assets/registry-C28gYnVq.js","assets/registry-CRisz4Ca.css","assets/registry-Bv1f5UU4.js","assets/registry-CvylL2BN.css","assets/registry-Ci65uThi.js","assets/useSpotlightWalk-DxlxBezO.js","assets/registry-BAoRB8rd.css","assets/registry-1wlTAh5b.js","assets/registry-T3i2Q9SI.css","assets/registry-BFrgx1tE.js","assets/registry-Cse2wF7x.css","assets/registry-DtV2UjBx.js","assets/quizResult-DB8yeqDr.js","assets/stepDriver-DwjFet6U.js","assets/registry-B5S3brjM.css","assets/registry-w4R6c89s.js","assets/safeCssColor-di93BXgG.js","assets/registry-4mMEt1Xy.css","assets/registry-DO4hGO5e.js","assets/registry-CRM7y8QT.css","assets/registry-B2QzCuWH.js","assets/registry-Dye5m3qt.css","assets/registry-BSX3aFUw.js","assets/registry-C3ezxLR3.css","assets/registry-Dwbh-GWu.js","assets/registry-tkd3UhWn.css","assets/registry-WHd1PwU3.js","assets/registry-DpMI23iE.css","assets/registry-Daypk4uR.js","assets/registry-GeSy4i7R.css","assets/registry-Xl8mAnKq.js","assets/registry-Dru0JcTa.css","assets/registry-DLyrLfe-.js","assets/notes-A9t4jdfx.css","assets/ready-Ba6nk9O1.js","assets/ExportModal-D4WpAg2c.css","assets/ExtractionPreview-BFrmqKDo.js","assets/store-DpObYU1u.js","assets/relate-UW-sUlJH.js","assets/PinToDashboard-BCiWaSg8.js","assets/PrismOverlay-DJDGPGxo.js","assets/penStrokes-DlHnO9xE.js","assets/types-CaO6xOn5.js","assets/pen-DNMslo3e.js","assets/PrismOverlay-BTfAicBt.css","assets/WorldOverlay-yhxq328s.js","assets/value-Dx7DZob4.js","assets/types-DuEbJpIA.js","assets/engine-BiM6INsW.js","assets/engine-CTvOaA86.css","assets/WorldOverlay-D7ay5y4D.css","assets/SynthesisOverlay-iesJ0hEt.js","assets/PresentationDeck-BW_7qecK.js","assets/pageVisibility-BxUVsw7Z.js","assets/DelegatePanel-DKWsRY9I.js","assets/DelegatePanel-Cf85-0qE.css","assets/SrsReview-DhWNYYv7.js","assets/SrsReview-B1B2VekR.css","assets/TourPrism-kInUOv-M.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./compiler-runtime-qQQXpJgv.js";import{t as r}from"./jsx-runtime-DeHZSEgm.js";import{n as i,t as a}from"./preload-helper-CiWYd9n-.js";import{r as o,t as s}from"./preloadableLazy-MIX1ApBW.js";import{A as c,B as l,F as u,G as d,H as f,I as p,J as m,K as h,L as g,M as _,N as v,P as y,Q as b,R as x,T as S,U as C,V as w,W as T,Y as E,a as D,et as O,f as k,it as A,j,k as M,p as N,q as P,r as F,t as I,u as L,z as R}from"./index-zIa6h_8b.js";import{n as z}from"./icons-gLFQTv74.js";import{n as ee,t as te}from"./spokenText-C88IQJ0M.js";import{a as ne,i as B,n as re}from"./loader-DCA6Njbf.js";import{n as ie,r as ae}from"./blockLabel-FogyzEQY.js";import{t as oe}from"./useFocusTrap-DBtkeyRy.js";import{t as se}from"./motion-BY_Egaxm.js";import{n as V,o as ce,t as le}from"./CanvasSkeleton-CRGWlafo.js";import{t as ue}from"./Presence-UqXfH4Y-.js";import{t as de}from"./MindShape-C_Bo9hW9.js";import{n as fe}from"./openWorld-BHTJM39n.js";import{i as pe,r as me,t as he}from"./display-CAb_PiGv.js";import{r as H,t as ge}from"./sourceHost-BV3t2XDb.js";import{t as _e}from"./stepDriver-DwjFet6U.js";import{A as ve,C as ye,D as be,E as xe,O as Se,T as Ce,_ as we,b as Te,c as Ee,d as De,h as Oe,j as ke,l as Ae,o as je,r as Me,u as Ne,v as Pe,w as Fe,y as Ie}from"./kokoro-B3oG_8sd.js";import{t as Le}from"./portal-k_BMgWND.js";import{a as Re,i as ze,o as Be,r as Ve,s as He}from"./threads-Cu2t3070.js";import{t as Ue}from"./FeatureUseNotice-Dc3GNBvy.js";import{n as We,r as Ge}from"./history-D2EH2X6D.js";import{n as Ke}from"./nextFrame-12y0UrAd.js";import{a as qe,d as Je,i as Ye,l as Xe,n as Ze,o as Qe,r as $e,s as et,t as tt,u as nt}from"./walkSync-CT8kmbzY.js";import{n as rt,t as it}from"./generateBeats-DtptFLlG.js";import{n as at,r as ot,t as st}from"./AnnotationLayer-8JABh1Dm.js";import{n as ct}from"./emphasize-BqCIst-B.js";import{a as lt,s as ut}from"./streamParse-B-Gjwa9T.js";import{n as dt,t as ft}from"./registry-DLyrLfe-.js";import{t as pt}from"./ready-Ba6nk9O1.js";import{t as mt}from"./registry-DGNSqTxE.js";import{i as ht,r as gt}from"./info-CiqHR5cs.js";import{t as _t}from"./friendlyAsk-BBdRZIar.js";import{a as vt,c as yt,i as bt,n as xt,r as St,s as Ct}from"./store-DpObYU1u.js";import{n as wt,r as Tt}from"./chapters-Dqm4iLDa.js";/* empty css */import{g as Et,h as Dt,l as Ot,m as kt,p as At,s as jt,t as Mt,v as Nt}from"./attachments-BW-vki-E.js";import{t as Pt}from"./types-CaO6xOn5.js";import{J as Ft,Z as It,a as Lt,c as Rt,m as zt,q as Bt,u as Vt}from"./store-CsjDEADX.js";import{t as Ht}from"./providers-BovElgRL.js";import{a as Ut,c as Wt,l as Gt,n as Kt,o as qt,r as Jt,s as Yt,u as Xt}from"./useLiveConfig-Cpy0_E_-.js";import{prewarmLive as Zt}from"./prewarm-uKxmzjjd.js";import{_ as Qt,c as $t,f as en,h as tn,i as nn,n as rn,p as an,v as on,x as sn,y as cn}from"./shapes-Cx5SCKgj.js";import{t as ln}from"./TopbarMenu-DQXxqSWY.js";import{a as un,o as dn,r as fn}from"./store-gohr8YVT.js";import{a as pn,c as mn,d as hn,f as gn,i as _n,l as vn,m as yn,o as bn,p as xn,s as Sn,t as Cn}from"./quietHours-DI1ayIIq.js";import{a as wn,c as Tn,d as En,i as Dn,n as On,t as kn,u as An}from"./store-BWLbFXiY.js";import{n as jn}from"./speed-K5_Ebj-8.js";import{i as Mn,n as Nn,t as Pn}from"./cache-CvbSI-pr.js";import{r as Fn}from"./verbatim-DBTj9sPD.js";import{n as In}from"./citation-BsSvaaer.js";import{n as Ln,o as Rn,t as zn}from"./validate-sGUCmPAs.js";import{n as Bn,t as Vn}from"./number-zqlPMliA.js";import{a as Hn,i as Un,r as Wn,s as Gn}from"./useStudy-5CsF_L-s.js";import{t as Kn}from"./ready-jtAUOb62.js";import{t as qn}from"./DropSelect-QcBm3N4D.js";import{t as Jn}from"./route-D4kd-D3B.js";import{t as Yn}from"./useDashboards-SRk8LqHe.js";import{n as Xn,r as Zn}from"./value-Dx7DZob4.js";import{a as Qn,d as $n,g as er,l as tr,n as nr,p as rr,r as ir}from"./store-D2IJF4SA.js";import{t as ar}from"./useZoomGesture-CN0p0lHL.js";import{a as or,o as sr,t as cr}from"./store-D-f8ZuaK.js";import{SEED_SHIP as lr}from"./seed-b1xc0dj2.js";import{t as ur}from"./buildShip-BgFg98tH.js";import{n as dr}from"./parseDiff-D8uBQ9mQ.js";import{enrichShipModel as fr}from"./generate-Dl2EJ_SR.js";import{a as pr,c as mr,g as hr,h as gr,l as _r,o as vr,p as yr,r as br,t as xr}from"./store-BfHRbVKz.js";import{r as Sr}from"./courseSeed-CZdNBTTs.js";import{i as Cr,n as wr,r as Tr,t as Er}from"./mastery-CUfDeuqO.js";var U=t(),Dr=A(),Or=/\?\s*$|^\s*(what|why|how|when|where|who|which|can|could|should|would|is|are|do|does|tell me|show me|explain)\b/i;function kr(e){return Or.test(e.trim())}function Ar(e,t){let n=e.key,r=t.trim();if(!r)return null;switch(e.kind){case`number`:{let t=r.replace(/,/g,``).match(/-?\d+(\.\d+)?/);if(!t)return null;let i=Number(t[0]);return Number.isFinite(i)?{kind:`number`,key:n,value:i,...e.unit?{unit:e.unit}:{}}:null}case`choice`:{let t=e.options?.find(e=>r.toLowerCase().includes(e.toLowerCase()));return t?{kind:`choice`,key:n,value:t}:null}case`card`:return null;case`date`:return{kind:`date`,key:n,value:r};default:return{kind:`text`,key:n,value:r}}}function jr(e,t){if(e.phase!==`awaiting_input`||!e.activeKey)return!1;let n=e.blanks.find(t=>t.key===e.activeKey);if(!n)return!1;let r=Ar(n,t),i=kr(t);return r&&!i?(e.fill(r),!0):!r&&!i}function Mr(e){return e.alwaysOn&&e.sttOk&&!e.composerHasText}function Nr(e,t){let n=(0,U.useRef)({...e,...t});n.current={...e,...t};let r=e.listening||Mr(e);(0,U.useEffect)(()=>{if(!r)return;let e=()=>{document.hidden?n.current.listening&&n.current.stop():Mr(n.current)&&!n.current.listening&&n.current.start()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[r])}var W=r(),Pr=200;function Fr(e){let t=e.trim().split(/\s+/).filter(Boolean).length;return Math.min(8e3,700+t*360)}function Ir(e,t){let n=(0,U.useRef)(e);n.current=e;let[r,i]=(0,U.useState)(null),a=(0,U.useRef)(null),o=(0,U.useCallback)(e=>{a.current=e,i(e)},[]),s=(0,U.useRef)(void 0),c=(0,U.useRef)(void 0),l=(0,U.useCallback)(()=>{s.current!==void 0&&clearTimeout(s.current),c.current!==void 0&&clearTimeout(c.current),s.current=void 0,c.current=void 0},[]),u=(0,U.useCallback)(e=>{let t=n.current,r=e.id??null;if(t.takeWheel(),t.moveSpot(e),r&&r===a.current){t.hush(),l(),o(null);return}t.hush(),l();let i=r?t.lineFor(e):null;if(!i||!t.canSpeak()){o(null);return}o(r),s.current=setTimeout(()=>{s.current=void 0,n.current.speakLine(i),c.current=setTimeout(()=>{c.current=void 0,a.current===r&&o(null)},Fr(i))},Pr)},[l,o]);return(0,U.useEffect)(()=>()=>{l(),o(null)},[t,l,o]),{narrate:u,narratingId:r}}var Lr=`mavea-view-mode`,G=Lr,Rr=`everything`,zr=new Set([`canvas`,`world`]);function Br(e){return e===`focus`||e===`everything`||e===`canvas`||e===`world`}var K=null;function Vr(){try{if(typeof localStorage>`u`)return Rr;let e=localStorage.getItem(Lr);return Br(e)&&!zr.has(e)?e:Rr}catch{return Rr}}function Hr(){return Vr()}function q(){return K||(K=Vr(),K)}function Ur(e){if(Br(e)){K=e;try{typeof localStorage<`u`&&!zr.has(e)&&localStorage.setItem(Lr,e)}catch{}try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(G))}catch{}}}function Wr(){let[e,t]=(0,U.useState)(()=>q());return(0,U.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>t(q());return window.addEventListener(G,e),()=>window.removeEventListener(G,e)},[]),[e,(0,U.useCallback)(Ur,[])]}function Gr({value:e,onChange:t,onSend:n,listening:r,onMic:i,micMode:a=`tap`,micArmed:o=!1,micPaused:s=!1,micProcessing:c=!1,micDisabled:l=!1,placeholder:u,disabled:d,heard:f,focusSignal:p,onFiles:m,attachTitle:h,attachPulse:g,onMicDown:_,onForceStop:v,onMicCancel:y,tools:b,micExtra:x}){let S=(0,U.useRef)(null),C=(0,U.useRef)(null),[w,T]=(0,U.useState)(!1);(0,U.useEffect)(()=>{if(!g)return;T(!0);let e=setTimeout(()=>T(!1),1100);return()=>clearTimeout(e)},[g]);let E=(0,U.useRef)(!1),D=(0,U.useRef)(null),O=(0,U.useRef)(!1),k=(0,U.useRef)(y);k.current=y,(0,U.useEffect)(()=>()=>{E.current&&k.current?.()},[]),(0,U.useEffect)(()=>{a!==`hold`&&(O.current=!1,E.current&&(E.current=!1,D.current=null,k.current?.()))},[a]),(0,U.useEffect)(()=>{!r&&S.current&&S.current.focus()},[r]),(0,U.useEffect)(()=>{p&&S.current&&S.current.focus()},[p]);let A=(0,U.useCallback)(e=>{a!==`hold`||l||c||r||E.current||(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),E.current=!0,D.current=e.pointerId,O.current=!0,_?.())},[l,c,r,a,_]),j=(0,U.useCallback)(()=>{E.current&&(E.current=!1,D.current=null,v?.())},[v]),M=(0,U.useCallback)(e=>{D.current===e.pointerId&&(e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),j())},[j]),N=(0,U.useCallback)(e=>{E.current&&(e&&D.current===e.pointerId&&e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),E.current=!1,D.current=null,y?.())},[y]),P=(0,U.useCallback)(e=>{a!==`hold`||l||c||r||E.current||e.repeat||e.key!==` `&&e.key!==`Enter`||(e.preventDefault(),E.current=!0,O.current=!0,_?.())},[r,l,a,c,_]),F=(0,U.useCallback)(e=>{a!==`hold`||e.key!==` `&&e.key!==`Enter`||(e.preventDefault(),j())},[j,a]),I=(0,U.useCallback)(()=>{if(a===`hold`||O.current){O.current=!1;return}l||c&&a!==`always`||i()},[i,l,a,c]),L=l?`Microphone off`:c&&a!==`always`?`Finishing voice input`:r?`Finish and send`:s?`Resume always-on`:o?`Pause always-on`:a===`hold`?`Hold to talk`:`Talk to Mavéa`,R=(0,W.jsx)(`button`,{className:`mic-btn`+(r?` listening`:``)+(o?` armed`:``)+(s?` paused`:``)+(c?` processing`:``)+(l?` mic-off`:``),onClick:I,onPointerDown:A,onPointerUp:M,onPointerCancel:N,onKeyDown:P,onKeyUp:F,title:L,"aria-label":L,"aria-busy":c,children:l?(0,W.jsx)(z.micOff,{}):(0,W.jsx)(z.mic,{})});return(0,W.jsxs)(`div`,{className:`composer`,children:[x?(0,W.jsxs)(`div`,{className:`mic-btn-wrap`,children:[R,x]}):R,f&&!e?(0,W.jsx)(`div`,{className:`live-listen heard`,children:(0,W.jsxs)(`span`,{style:{color:`var(--text-primary)`},children:[`"`,f,`"`]})}):r&&!e?(0,W.jsxs)(`div`,{className:`live-listen`,children:[(0,W.jsx)(`span`,{className:`wave`,children:[14,18,10,20,8,16,12].map((e,t)=>(0,W.jsx)(`i`,{style:{height:e}},t))}),`Listening…`]}):(0,W.jsx)(`input`,{ref:S,className:`composer-input`,name:`mavea-ask`,"aria-label":u||`Ask Mavéa anything`,autoComplete:`off`,value:e,disabled:d,placeholder:u||`Ask Mavéa anything — or just talk`,onChange:e=>t(e.target.value),onKeyDown:t=>{t.key===`Enter`&&e.trim()&&n(e)}}),m&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`input`,{ref:C,type:`file`,name:`mavea-attach`,accept:Mt,multiple:!0,disabled:d,hidden:!0,"aria-hidden":`true`,onChange:e=>{let t=Array.from(e.target.files??[]);t.length&&m(t),e.target.value=``}}),(0,W.jsx)(`button`,{type:`button`,className:`composer-tool`+(w?` is-pulsing`:``),title:h||`Attach a file`,"aria-label":h||`Attach a file`,disabled:d,onClick:()=>C.current?.click(),children:(0,W.jsx)(z.paperclip,{})})]}),b,(0,W.jsx)(`button`,{className:`send-btn`,disabled:d||!e.trim(),onClick:()=>n(e),title:`Send`,"aria-label":`Send`,children:(0,W.jsx)(z.send,{})})]})}i();var Kr=null;async function qr(){return Kr||(Kr=(await a(()=>import(`./corpus.generated-oX9uU93S.js`),[])).default,Kr)}function Jr(e){return Kr?.conversations.find(t=>t.id===e)}function Yr(e){return e.replace(/\b([\p{L}]+)-ish\b/gu,`roughly $1`).replace(/\s*[—–]\s*/g,`, `).replace(/(\p{L})-(?=\p{L})/gu,`$1 `).replace(/\s+-\s+/g,`, `).replace(/,\s*,+/g,`, `).replace(/\s{2,}/g,` `).trim()}function Xr(e){return{...e,question:Yr(e.question),narration:Yr(e.narration),spoken:e.spoken?Yr(e.spoken):e.spoken,tour:e.tour.map(e=>({...e,say:e.say?Yr(e.say):e.say,saySpoken:e.saySpoken?Yr(e.saySpoken):e.saySpoken}))}}var Zr=[{id:`talk`,title:`Speak naturally`,mode:`voice`,coach:`Start by speaking naturally or typing. I will understand either and respond out loud.`,spotlight:`.mic-btn`,action:{kind:`mic`},durationMs:6e3},{id:`connect`,title:`Bring your own model`,mode:`explain`,coach:`Choose Gemini, Claude, GPT, Grok, or OpenRouter, then paste your own API key. Start with a fast, lower cost model and move up only when a task needs it. The key stays in memory unless you choose Remember. Requests pass through this deployment, and your provider's usage charges, privacy, and retention terms apply.`,spotlight:`.settings-model-connect`,action:{kind:`connect`},durationMs:12e3},{id:`draws`,title:`See the answer`,mode:`explain`,coach:`Ask anything. I build a visual answer while I explain the important parts. Use the voice toggle labeled Mavéa's voice to turn speech off and reveal everything immediately. Your microphone stays unchanged.`,spotlight:`.voice-switch`,action:{kind:`answer`,convoId:`money`,ask:`How does $10,000 grow at 7% over 30 years?`},durationMs:9e3},{id:`mark`,title:`Follow the explanation`,mode:`explain`,coach:`Watch the Pen circle the result, then underline why it matters. Its marks stay with the answer.`,spotlight:`.pen-toggle-pill`,action:{kind:`penDemo`},durationMs:1e4,needsCanvas:!0},{id:`ask`,title:`Ask across the answer`,mode:`explain`,coach:`Choose Ask on two cards, then type a question. I will use both pieces of context together.`,spotlight:`.topic-wrap .block-ask, .ask-hint`,action:{kind:`askMulti`},durationMs:12e3,needsCanvas:!0},{id:`canvas`,title:`Explore the canvas`,mode:`explain`,coach:`Switch to Canvas when you want to explore the whole answer spatially.`,action:{kind:`canvas`,convoId:`travel`},durationMs:15e3},{id:`living-answer`,title:`Walk the why`,mode:`explain`,coach:`A living answer lays out the causes behind an answer. Watch as I walk it cause by cause and say what each one did.`,action:{kind:`showcase`,featureId:`living-answer`},durationMs:26e3},{id:`prism`,title:`Check the evidence`,mode:`explain`,coach:`Prism checks a document claim by claim and ties every finding to its source.`,action:{kind:`prism`},durationMs:32e3},{id:`share`,title:`Present or publish`,mode:`explain`,coach:`Turn a useful answer into a polished presentation or document.`,action:{kind:`export`},durationMs:16e3,needsCanvas:!0},{id:`yours`,title:`Try it yourself`,mode:`voice`,coach:`That is the tour. Now ask your first question.`,spotlight:`.mic-btn`,action:{kind:`mic`},durationMs:6e3}],Qr=[{id:`bend`,title:`Make it yours`,mode:`explain`,coach:`These are starting assumptions. Drag the rent and watch the comparison update.`,spotlight:`.bend-strip`,action:{kind:`bend`,convoId:`mortgage`},durationMs:8e3,needsCanvas:!0,glyph:`🎚️`,hook:`Drag a number, watch it recompute`},{id:`chips`,title:`Go deeper`,mode:`explain`,coach:`When an answer offers ways to go deeper, tap one and I'll take it further.`,spotlight:`.footer-keepgoing`,action:{kind:`chip`,convoId:`monthly`,label:`What if I added $500 monthly?`},durationMs:9e3,needsCanvas:!0,glyph:`💬`,hook:`Tap a suggestion, go deeper`},{id:`rail`,title:`Session history`,mode:`explain`,coach:`Settled turns stay on the left for this session. Jump back anytime.`,spotlight:`.rail-chat`,action:{kind:`rail`},durationMs:8e3,needsCanvas:!0,glyph:`📜`,hook:`Settled turns, replayable on the left`},{id:`highlight`,title:`Highlight to ask`,mode:`explain`,coach:`Choose Highlight, draw around any part of an answer, then ask about exactly what you marked.`,spotlight:`.mark-toggle`,action:{kind:`mark`},durationMs:8e3,needsCanvas:!0,glyph:`✎`,hook:`Draw around the exact part you mean`},{id:`range`,title:`A fitting picture`,mode:`explain`,coach:`Answers can choose from diagrams, flows, charts, and interactive maps.`,action:{kind:`montage`,convoIds:[`space`,`krebs`,`travel`]},durationMs:9e3,glyph:`🎨`,hook:`See the visual range`},{id:`focus`,title:`One card at a time`,mode:`explain`,coach:`Feeling overwhelmed? Focus puts one card center stage, one at a time.`,spotlight:`.focus-toggle`,action:{kind:`focusWalk`,convoId:`money`},durationMs:11e3,glyph:`🎯`,hook:`One card at a time, center stage`},{id:`think`,title:`Think out loud`,mode:`explain`,coach:`Not sure what to ask yet? Think out loud, and I will map your thoughts live.`,action:{kind:`listen`},durationMs:16e3,glyph:`🧠`,hook:`Think out loud, I map it live`},{id:`atlas`,title:`Memory and Atlas`,mode:`explain`,coach:`When Memory is enabled, saved facts and kept topics can shape Atlas.`,action:{kind:`atlas`},durationMs:9e3,glyph:`🗺️`,hook:`Kept topics become a place`},{id:`export`,title:`Export the answer`,mode:`explain`,coach:`Need to share it? Export the current answer as a styled slide deck or document.`,action:{kind:`export`},durationMs:12e3,needsCanvas:!0,glyph:`📄`,hook:`Any answer becomes a deck or document`},{id:`flashcards`,title:`Make it stick`,mode:`explain`,coach:`Learning something? Any card becomes a flashcard, kept right here on your device.`,action:{kind:`flashcards`},durationMs:8e3,needsCanvas:!0,glyph:`🎴`,hook:`Turn any card into a flashcard`},{id:`course`,title:`Master a subject`,mode:`explain`,coach:`Want to truly master something? I'll build you a course and teach it, one lesson at a time.`,spotlight:`.course-rail`,action:{kind:`course`},durationMs:12e3,glyph:`🎓`,hook:`A full course, a lesson at a time`},{id:`present`,title:`Fill the room`,mode:`explain`,coach:`Present fills the room with the answer while the microphone stays live.`,action:{kind:`present`},durationMs:9e3,needsCanvas:!0,glyph:`🖥️`,hook:`Fill the room, chrome falls away`},{id:`palette`,title:`Feature index, one key away`,mode:`explain`,coach:`Browse the feature index with one keystroke. Just press Command K.`,spotlight:`.cmdk-panel`,action:{kind:`palette`},durationMs:9e3,glyph:`⌘`,hook:`Feature index, one keystroke away`},{id:`ripple`,title:`See a change ripple`,mode:`explain`,coach:`Here is a real code change. See what it touches, what could break, and the safest order to ship it.`,action:{kind:`showcase`,featureId:`ripple`},durationMs:12e3,glyph:`🌊`,hook:`A code change's whole blast radius`},{id:`deepzoom`,title:`Telescope any topic`,mode:`explain`,coach:`Telescope a topic from the big picture all the way down to the finest detail.`,action:{kind:`showcase`,featureId:`deepzoom`},durationMs:1e4,glyph:`🔭`,hook:`From big picture to finest detail`},{id:`synthesis`,title:`Fuse many documents`,mode:`explain`,coach:`Drop in several documents and I combine them into one map of agreements, contradictions, and gaps.`,action:{kind:`showcase`,featureId:`synthesis`},durationMs:1e4,glyph:`🧬`,hook:`Many documents into one map`},{id:`memory`,title:`What I remember`,mode:`explain`,coach:`Everything I remember about you lives here. Review it, edit it, or forget it. It stays on your device.`,action:{kind:`showcase`,featureId:`memory`},durationMs:9e3,glyph:`🔖`,hook:`See, edit, or forget what I know`},{id:`library`,title:`Past conversations`,mode:`explain`,coach:`Every canvas you build is kept. Reopen any past conversation where you left it.`,action:{kind:`showcase`,featureId:`library`},durationMs:9e3,glyph:`📚`,hook:`Reopen a canvas you built before`},{id:`review`,title:`Study your cards`,mode:`explain`,coach:`Open Study to go through your flashcards. Keep it a plain pile, or let Mavéa space them out so the ones you find hard come back sooner.`,action:{kind:`showcase`,featureId:`review`},durationMs:9e3,glyph:`🧠`,hook:`Go through your flashcards`},{id:`manage-flashcards`,title:`Manage your deck`,mode:`explain`,coach:`Open your flashcard library to organize decks, edit cards, and choose what to study.`,action:{kind:`showcase`,featureId:`flashcards`},durationMs:9e3,glyph:`🗂️`,hook:`Organize and edit every study card`},{id:`track`,title:`Build a living dashboard`,mode:`explain`,coach:`Choose the parts you want to keep live, set a refresh schedule, and create a dashboard from this answer.`,action:{kind:`showcase`,featureId:`track`},durationMs:12e3,needsCanvas:!0,glyph:`📈`,hook:`Choose what stays live and how often`},{id:`delegate`,title:`Rehearse it first`,mode:`explain`,coach:`Prepare a hard conversation before you have it. Take the seat and practice your own lines, or send me to argue your side and read the debrief.`,action:{kind:`showcase`,featureId:`delegate`},durationMs:9e3,glyph:`🤝`,hook:`Practice it, or send me to scout it`},{id:`just-listen`,title:`Just listen`,mode:`explain`,coach:`Think out loud and I save what you say without answering, so you can sort it later.`,action:{kind:`showcase`,featureId:`just-listen`},durationMs:9e3,glyph:`👂`,hook:`Bank everything you say, sort it later`},{id:`recap`,title:`Recap the session`,mode:`explain`,coach:`Lost the thread? I'll recap everything we've covered this session at a glance.`,action:{kind:`showcase`,featureId:`recap`},durationMs:9e3,glyph:`📋`,hook:`Everything we've covered, at a glance`},{id:`ghost`,title:`Ghost answers`,mode:`explain`,coach:`While you listen, I quietly draft a response, so it is ready when you want it.`,action:{kind:`showcase`,featureId:`ghost`},durationMs:9e3,glyph:`👻`,hook:`I draft what I would say, quietly`},{id:`whisper`,title:`Whisper mode`,mode:`explain`,coach:`Need to stay quiet? Whisper mode lowers my voice to a soft murmur.`,action:{kind:`showcase`,featureId:`whisper`},durationMs:9e3,glyph:`🤫`,hook:`A quiet voice when you need it`},{id:`morning-brief`,title:`Morning brief`,mode:`explain`,coach:`Start the day with a brief of what changed across the things you track. It stays off until you turn it on.`,action:{kind:`showcase`,featureId:`morning-brief`},durationMs:9e3,glyph:`☀️`,hook:`Open the day with what's changed`},{id:`settings`,title:`Bring your own model`,mode:`explain`,coach:`Bring your own model, connect a provider, and tune how I answer. You control the key and the terms.`,action:{kind:`showcase`,featureId:`settings`},durationMs:9e3,glyph:`⚙️`,hook:`Connect a provider, tune the answers`},{id:`zoom-deck`,title:`Chapter view`,mode:`explain`,coach:`Pull back from the cards to the whole session, with every topic shown as a chapter.`,action:{kind:`showcase`,featureId:`zoom-deck`},durationMs:1e4,glyph:`📖`,hook:`Pull back to the whole session`},{id:`blanks`,title:`Fill in your own`,mode:`explain`,coach:`Some numbers are only yours to give. I leave glowing spaces and finish the answer around what you add.`,spotlight:`.blank-slot`,action:{kind:`blanksDemo`},durationMs:1e4,glyph:`◌`,hook:`Holes for the numbers only you know`}],$r=[...Zr,...Qr];function ei(e){return $r.find(t=>t.id===e)}var ti={money:`How does $10,000 grow at 7% over 30 years?`,monthly:`What if I added $500 monthly?`,mortgage:`Should I buy or rent a $500,000 home?`,space:`How does a black hole bend light?`,travel:`Plan me 5 days in Japan.`,budget:`Where does the US federal budget actually go?`,krebs:`Explain the Krebs cycle.`,url:`What actually happens when I open a website?`,neural:`How does a neural network learn?`,fitness:`Design me a 3-day strength routine.`};function ni(e,t){let n=Jr(e),r=n?.frames[0];if(!n||!r)return null;let i=Yr(t??ti[e]??n.question);return{frame:Xr({...r,question:i}),question:i}}var ri=[{key:`savings`,label:`Your savings`,prompt:`How much have you set aside for the break?`,kind:`number`,unit:`$`,placeholder:`e.g. 18,000`},{key:`spend`,label:`Monthly spend`,prompt:`Roughly what will you spend a month while travelling?`,kind:`number`,unit:`$/mo`,placeholder:`e.g. 2,400`}],ii=[{type:`insight`,id:`blanks-lede`,col:12,props:{title:`The money side of a 6-month break`,summary:`I've mapped the typical costs and what to sort out before you leave. Two numbers, though, are yours to give — so I've left them as holes rather than guess.`}},{type:`blanks`,id:`blanks-holes`,col:12,props:{title:`The parts only you can answer`,icon:`spark`,iconColor:`var(--presence)`,intro:`I've weighed everything I can. Fill these in and I'll finish the runway math around them.`,slots:ri}}],ai=[{type:`insight`,id:`blanks-verdict`,col:12,props:{title:`You can afford it — with a cushion`,summary:`$18,000 saved against $2,400 a month is about 7.5 months of runway — enough for a 6-month break with room to spare.`,stat:`7.5 months`,delta:`+1.5 vs. the plan`,deltaDir:`up`}},{type:`breakdown`,id:`blanks-runway`,col:12,props:{title:`Your runway`,rows:[{name:`Saved`,val:`$18,000`,pct:100},{name:`Spend / month`,val:`$2,400`,pct:32},{name:`6-month cost`,val:`$14,400`,pct:80},{name:`Left over`,val:`$3,600`,pct:20,tag:`cushion`,tagColor:`var(--presence)`}]}}];function oi(e,t){return{question:`Can I afford a 6-month career break?`,narration:t,mode:`replace`,tour:[],spec:e,at:0}}function si(e){let t={...e,title:`Can I afford a 6-month career break?`,sub:`The money side`,bend:void 0,sources:void 0,track:void 0},n={...t,blocks:ii,blanks:ri,awaiting:!0},r={...t,blocks:ai,blanks:void 0,awaiting:!1};return{holes:oi(n,``),filled:oi(r,`With eighteen thousand saved and twenty-four hundred a month, that’s about seven and a half months of runway — enough for six, with a cushion.`)}}function ci(){let e=!1,t=[];return{after(n,r){t.push(setTimeout(()=>!e&&r(),n))},cancel(){e=!0,t.forEach(clearTimeout)}}}function li(e,t){if(k()){t();return}let n=Date.now(),r=()=>{if(k()||Date.now()-n>=8e3){t();return}e(200,r)};e(200,r)}function ui(e,t,n,r=0){for(let i=1;i<=n.length;i++)e(r+i*22,()=>t(n.slice(0,i)));return r+n.length*22}function di(e){let t=Date.now(),n=e.maxExtraMs??2e4,r=0,i=window.setInterval(()=>{let a=Date.now()-t;a<e.minHoldMs||(r=e.isQuiet()?r+1:0,(r>=7||a>=e.minHoldMs+n)&&(window.clearInterval(i),e.advance()))},250);return()=>window.clearInterval(i)}var fi=450,pi=1600;function mi(e,t){if(e<=0)return[];let n=Math.max(pi,Math.floor((t-fi-400)/e));return Array.from({length:e},(e,t)=>fi+t*n)}var hi=1500,gi=900;function _i(e,t){let n=1850;if(e<=0)return{focusAt:hi,spotlightAt:[]};let r=Math.max(gi,Math.floor((t-n)/e));return{focusAt:hi,spotlightAt:Array.from({length:e},(e,t)=>n+t*r)}}var vi=[`I keep thinking about moving to Austin.`,`My sister already lives there.`,`But I'm worried about starting over.`,`And my lease runs until March.`,`Is it even the right time?`];function yi(e){return!!e&&Qr.some(t=>t.id===e)}function bi(e){return!!e&&Zr.some(t=>t.id===e)}function xi(e){let{active:t}=e,[n,r]=(0,U.useState)(()=>{let t=e.startChapter;return yi(t)||bi(t)&&e.solo?t??null:null}),[i,a]=(0,U.useState)(()=>{let t=e.startChapter;if(yi(t)||bi(t)&&e.solo)return 0;let n=t?Zr.findIndex(e=>e.id===t):-1;return n>=0?n:0}),[o,s]=(0,U.useState)(!1),[c,l]=(0,U.useState)(!1),[u,d]=(0,U.useState)(!1),f=(0,U.useRef)(u);f.current=u;let[p,m]=(0,U.useState)(!1),[h,g]=(0,U.useState)(0),_=(0,U.useRef)(e.ops);_.current=e.ops;let v=n?ei(n):void 0,y=v?[v]:Zr,b=(0,U.useRef)(y);b.current=y;let x=y.length,S=t?y[i]??null:null,[C,w]=(0,U.useState)(!1),[T,E]=(0,U.useState)(!1),[D,A]=(0,U.useState)(0);(0,U.useEffect)(()=>{if(!t)return;let e=!0;return(async()=>{for(let t=0;e&&t<2;t++)try{await qr(),e&&w(!0);return}catch{}e&&E(!0)})(),()=>{e=!1}},[t,D]);let j=(0,U.useCallback)(()=>{E(!1),A(e=>e+1)},[]),M=(0,U.useCallback)(()=>{let e=_.current;e.closeAllOverlays(),e.stopRevealWalk(),e.cancelSpeech()},[]);(0,U.useEffect)(()=>{if(!t||!o||p||!C)return;let e=b.current[i];if(!e)return;O(e.id,!!n);let r=_.current,a=ci(),s=a.after,c=e=>li(s,e),l=e=>c(()=>r.speak(e)),u=e=>r.showFrame(e.frame,e.question,{silent:!0});if(M(),e.needsCanvas&&!r.hasCanvas()){let e=ni(`money`);e&&u(e)}r.setMuted(f.current||e.mode===`silent`);let d=e.action;if(d.kind===`answer`){let e=ni(d.convoId,d.ask);if(e){let t=e.question,n={...e.frame,narration:``,spoken:``,tour:e.frame.tour.slice(0,4).map(e=>({...e,say:``,saySpoken:``}))};s(ui(s,r.typeInto,t)+360,()=>c(()=>r.showFrame(n,e.question)))}}else if(d.kind===`chip`){let e=ni(`money`);e&&u(e),s(1400,()=>r.pressKeepGoing(d.label)),s(2e3,()=>{let e=ni(d.convoId,d.label);e&&r.showFrame(e.frame,e.question)})}else if(d.kind===`montage`){let t=d.convoIds.map(e=>ni(e)).filter(Boolean),n=mi(t.length,e.durationMs);t.forEach((e,t)=>s(n[t],()=>u(e)))}else if(d.kind===`ask`)s(1300,()=>r.pinFirstBlock()),ui(s,r.typeInto,`Why does it grow faster after year 20?`,1700);else if(d.kind===`askMulti`){let e=ni(`money`);e&&u(e),s(1300,()=>r.pinFirstBlocks(2)),ui(s,r.typeInto,`How do these two parts explain the final total?`,2600)}else if(d.kind===`bend`){if(d.convoId){let e=ni(d.convoId);e&&u(e)}s(1400,()=>r.bendIt())}else if(d.kind===`rail`)s(1300,()=>r.toggleRail()),s(2600,()=>r.toggleRail());else if(d.kind===`export`)s(500,()=>r.openExport());else if(d.kind===`mark`)s(400,()=>r.setInkArmed(!0)),s(900,()=>r.scriptedMark());else if(d.kind===`penDemo`){let e=ni(`money`);e&&u(e),s(1200,()=>r.drawPenTourStep(`result`)),s(3900,()=>r.drawPenTourStep(`reason`)),s(7200,()=>r.setSpot(null))}else if(d.kind===`focus`)s(500,()=>r.setViewMode(`focus`));else if(d.kind===`canvas`){let e=ni(d.convoId);e&&u(e),s(1500,()=>r.setViewMode(`canvas`));let t=(e?.frame.spec.blocks??[]).map(e=>e.id).filter(e=>!!e).slice(0,3);t.forEach((e,t)=>s(2700+t*1900,()=>r.setSpot(e))),s(2700+t.length*1900,()=>r.setSpot(null))}else if(d.kind===`focusWalk`){let t=ni(d.convoId);t&&u(t);let n=(t?.frame.spec.blocks??[]).map(e=>e.id).filter(e=>!!e),{focusAt:i,spotlightAt:a}=_i(n.length,e.durationMs);s(i,()=>r.setViewMode(`focus`)),n.forEach((e,t)=>s(a[t],()=>r.setSpot(e)))}else if(d.kind===`listen`){s(400,()=>r.startWatchThinking());let e=800;for(let t of vi)e=ui(s,r.typeInto,t,e)+300,s(e,()=>{r.typeInto(``),r.bankThought(t)}),e+=800}else if(d.kind===`flashcards`)s(700,()=>r.openFlashcards());else if(d.kind===`course`)s(500,()=>r.openTourCourse());else if(d.kind===`connect`)s(400,()=>r.openModelSettings());else if(d.kind===`present`)s(500,()=>r.setPresenting(!0));else if(d.kind===`share`)s(500,()=>r.setShareOpen(!0)),s(3100,()=>r.shareRemix()),s(4900,()=>r.sharePalette(`Ember`));else if(d.kind===`palette`)s(500,()=>r.setPaletteOpen(!0));else if(d.kind===`atlas`)s(500,()=>r.openAtlas());else if(d.kind===`prism`)s(400,()=>r.openPrism(0));else if(d.kind===`memory`)s(700,()=>r.fireMemoryGlow());else if(d.kind===`showcase`)d.featureId===`recap`||d.featureId===`zoom-deck`?([`money`,`space`,`travel`].forEach((e,t)=>{let n=ni(e);n&&s(t*200,()=>u(n))}),s(1400,()=>r.showcaseFeature(d.featureId))):s(500,()=>r.showcaseFeature(d.featureId));else if(d.kind===`blanksDemo`){let e=ni(`money`)?.frame.spec;if(e){let{holes:t,filled:n}=si(e);u({frame:t,question:t.question}),s(5200,()=>r.showFrame(n,n.question))}}return e.mode!==`silent`&&!f.current&&s(160,()=>l(Yr(e.coach))),a.cancel},[i,h,t,o,p,C,n,M]),(0,U.useEffect)(()=>{if(!t||!o||p||!c||!C)return;let e=b.current[i];if(!e)return;let n=_.current;return di({minHoldMs:e.durationMs,isQuiet:()=>!n.isSpeaking()&&!n.isBusy(),advance:()=>{i+1>=x?(M(),m(!0)):a(i+1)}})},[i,h,t,o,p,c,C,x,n,M]),(0,U.useEffect)(()=>()=>M(),[M]);let N=(0,U.useCallback)(()=>{k(),s(!0),l(!0),m(!1)},[]),P=(0,U.useCallback)((e,t)=>{k(),m(!1),t?.keepPlaying||l(!1),a(Math.max(0,Math.min(b.current.length-1,e))),g(e=>e+1)},[]),F=(0,U.useCallback)(()=>{i+1>=x?(M(),m(!0)):P(i+1,{keepPlaying:!0})},[i,x,P,M]),I=(0,U.useCallback)(()=>P(i-1),[i,P]),L=(0,U.useCallback)(e=>P(e),[P]),R=(0,U.useCallback)(()=>{M(),r(null),s(!0),P(0),l(!0)},[P,M]),z=(0,U.useCallback)(e=>{yi(e)&&(k(),r(e),s(!0),m(!1),l(!0),a(0),g(e=>e+1))},[]),ee=(0,U.useCallback)(()=>{if(k(),!o){N();return}if(p){R();return}l(e=>!e)},[p,R,N,o]),te=(0,U.useCallback)(()=>{k();let e=!f.current;f.current=e,d(e);let t=b.current[i],n=t?.mode===`silent`,r=_.current;r.setMuted(e||n),e?r.cancelSpeech():o&&!p&&t&&!n&&r.speak(Yr(t.coach))},[p,i,o]),ne=(0,U.useCallback)(()=>{M(),m(!0)},[M]);return{active:t,started:o,index:i,total:x,chapter:S,coach:Yr(S?.coach??``),spotlight:S?.spotlight,playing:c,muted:u,done:p,corpusError:T,retryCorpus:j,solo:!!n,start:N,next:F,prev:I,jumpTo:L,toggle:ee,toggleMute:te,replay:R,skip:ne,playExtra:z}}var J=n();function Si(e){let t=window.innerWidth,n=window.innerHeight,r=Math.min(e.right,t)-Math.max(e.left,0),i=Math.min(e.bottom,n)-Math.max(e.top,0);return r>e.width*.5&&i>e.height*.5}var Ci=/^(hidden|auto|scroll|clip)$/;function wi(e,t){let n=e.top,r=e.left,i=e.right,a=e.bottom;for(let e=t.parentElement;e;e=e.parentElement){let t=getComputedStyle(e),o=Ci.test(t.overflowY),s=Ci.test(t.overflowX);if(!o&&!s)continue;let c=e.getBoundingClientRect();o&&(n=Math.max(n,c.top),a=Math.min(a,c.bottom)),s&&(r=Math.max(r,c.left),i=Math.min(i,c.right))}return new DOMRect(r,n,Math.max(0,i-r),Math.max(0,a-n))}function Ti(e,t){let n=(0,J.c)(4),[r,i]=(0,U.useState)(null),a,o;return n[0]!==t||n[1]!==e?(a=()=>{if(!e||!t){i(null);return}let n=!0,r=0,a=null,o=e=>{e===a||e!==null&&a!==null&&Math.abs(e.top-a.top)<.5&&Math.abs(e.left-a.left)<.5&&Math.abs(e.width-a.width)<.5&&Math.abs(e.height-a.height)<.5||(a=e,i(e))},s=e.split(`,`).map(Ai).filter(Boolean),c=()=>{if(!n)return;let e=null,t=null;for(let n of s){let r=Array.from(document.querySelectorAll(n)).filter(ki).map(Oi).filter(Di),i=r.find(Ei)??r[0];if(i){e=i.hit,t=i.rect;break}}if(!e||!t){o(null);return}let i=t;if(!Si(i)){let t=Date.now();t-r>1200&&(r=t,e.scrollIntoView({block:`center`,behavior:`smooth`})),o(null);return}o(i)};c();let l=window.setInterval(c,250);return window.addEventListener(`resize`,c),window.addEventListener(`scroll`,c,!0),()=>{n=!1,window.clearInterval(l),window.removeEventListener(`resize`,c),window.removeEventListener(`scroll`,c,!0)}},o=[e,t],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,U.useEffect)(a,o),r}function Ei(e){let{rect:t}=e;return Si(t)}function Di(e){let{raw:t}=e;return t.width>0&&t.height>0}function Oi(e){let t=e.getBoundingClientRect();return{hit:e,raw:t,rect:wi(t,e)}}function ki(e){return!e.checkVisibility||e.checkVisibility({checkOpacity:!0})}function Ai(e){return e.trim()}function ji(e){let t=(0,J.c)(82),{driver:n}=e,r=Ti(n.spotlight,n.active&&n.started&&!n.done),i=(0,U.useRef)(null),a=n.active&&!n.done&&!n.started&&!n.corpusError,o;t[0]===a?o=t[1]:(o={active:a},t[0]=a,t[1]=o),oe(i,o);let s=n.active&&n.started&&!n.done?n.chapter?.id:void 0,c,l;if(t[2]===s?(c=t[3],l=t[4]):(c=()=>{if(s)return document.body.dataset.tourChapter=s,Ni},l=[s],t[2]=s,t[3]=c,t[4]=l),(0,U.useEffect)(c,l),!n.active||n.done)return null;if(n.corpusError){let e,r,i;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,W.jsx)(`span`,{className:`tourx-welcome-kicker`,children:`Walkthrough`}),r=(0,W.jsx)(`h2`,{children:`This walkthrough couldn’t load`}),i=(0,W.jsx)(`p`,{children:`The recorded scenes did not come through. Check your connection and try again.`}),t[5]=e,t[6]=r,t[7]=i):(e=t[5],r=t[6],i=t[7]);let a;t[8]===n.retryCorpus?a=t[9]:(a=(0,W.jsx)(`button`,{type:`button`,className:`tourx-welcome-start`,onClick:n.retryCorpus,children:`Retry`}),t[8]=n.retryCorpus,t[9]=a);let o;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,W.jsx)(`button`,{type:`button`,className:`tourx-welcome-skip`,onClick:Mi,children:`Back to home`}),t[10]=o):o=t[10];let s;return t[11]===a?s=t[12]:(s=(0,W.jsx)(`div`,{className:`tourx tourx-intro`,"aria-live":`polite`,children:(0,W.jsxs)(`div`,{className:`tourx-welcome`,role:`alert`,children:[e,r,i,(0,W.jsxs)(`div`,{className:`tourx-welcome-actions`,children:[a,o]})]})}),t[11]=a,t[12]=s),s}if(!n.started){let e,r;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,W.jsx)(`span`,{className:`tourx-welcome-kicker`,children:`Walkthrough`}),r=(0,W.jsx)(`h2`,{id:`tourx-welcome-title`,children:`See Mavéa in action`}),t[13]=e,t[14]=r):(e=t[13],r=t[14]);let a=n.total===1?`scene plays`:`scenes play`,o;t[15]!==n.total||t[16]!==a?(o=(0,W.jsxs)(`p`,{children:[n.total,` short `,a,` automatically. Pause, skip, or move at your own pace.`]}),t[15]=n.total,t[16]=a,t[17]=o):o=t[17];let s;t[18]===n.start?s=t[19]:(s=(0,W.jsx)(`button`,{type:`button`,className:`tourx-welcome-start`,onClick:n.start,children:`Start the tour`}),t[18]=n.start,t[19]=s);let c;t[20]===n.skip?c=t[21]:(c=(0,W.jsx)(`button`,{type:`button`,className:`tourx-welcome-skip`,onClick:n.skip,children:`Skip tour`}),t[20]=n.skip,t[21]=c);let l;t[22]!==c||t[23]!==s?(l=(0,W.jsxs)(`div`,{className:`tourx-welcome-actions`,children:[s,c]}),t[22]=c,t[23]=s,t[24]=l):l=t[24];let u;return t[25]!==l||t[26]!==o?(u=(0,W.jsx)(`div`,{className:`tourx tourx-intro`,"aria-live":`polite`,children:(0,W.jsxs)(`div`,{ref:i,className:`tourx-welcome`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`tourx-welcome-title`,children:[e,r,o,l]})}),t[25]=l,t[26]=o,t[27]=u):u=t[27],u}let u=s===`ask`||!!r&&r.top+r.height/2>window.innerHeight*.58,d;t[28]===r?d=t[29]:(d=r&&(0,W.jsx)(`div`,{className:`tourx-ring`,style:{top:r.top-8,left:r.left-8,width:r.width+16,height:r.height+16}}),t[28]=r,t[29]=d);let f=`tourx-panel`+(n.solo?` is-solo`:``)+(u?` is-top`:``),p=n.solo?`Mini-demo controls`:`Walkthrough controls`,m=`head-`+n.index,h=n.solo?`Mini demo`:`${n.index+1} / ${n.total}`,g;t[30]===h?g=t[31]:(g=(0,W.jsx)(`span`,{className:`tourx-count`,children:h}),t[30]=h,t[31]=g);let _=n.chapter?.title,v;t[32]===_?v=t[33]:(v=(0,W.jsx)(`span`,{className:`tourx-title`,children:_}),t[32]=_,t[33]=v);let y;t[34]!==g||t[35]!==v||t[36]!==m?(y=(0,W.jsxs)(`div`,{className:`tourx-head`,children:[g,v]},m),t[34]=g,t[35]=v,t[36]=m,t[37]=y):y=t[37];let b=`coach-`+n.index,x;t[38]!==n.coach||t[39]!==b?(x=(0,W.jsx)(`p`,{className:`tourx-coach`,children:n.coach},b),t[38]=n.coach,t[39]=b,t[40]=x):x=t[40];let S;t[41]!==n.index||t[42]!==n.prev||t[43]!==n.solo?(S=!n.solo&&(0,W.jsx)(`button`,{type:`button`,className:`tourx-btn`,onClick:n.prev,disabled:n.index===0,"aria-label":`Previous chapter`,children:(0,W.jsx)(z.chevL,{className:`tourx-ic`})}),t[41]=n.index,t[42]=n.prev,t[43]=n.solo,t[44]=S):S=t[44];let C=n.playing?`Pause autoplay`:`Turn on autoplay`,w;t[45]===n.playing?w=t[46]:(w=n.playing?(0,W.jsx)(z.pause,{className:`tourx-ic`}):(0,W.jsx)(z.play,{className:`tourx-ic`}),t[45]=n.playing,t[46]=w);let T=n.playing?`Pause`:`Autoplay`,E;t[47]===T?E=t[48]:(E=(0,W.jsx)(`span`,{children:T}),t[47]=T,t[48]=E);let D;t[49]!==n.toggle||t[50]!==C||t[51]!==w||t[52]!==E?(D=(0,W.jsxs)(`button`,{type:`button`,className:`tourx-btn tourx-play tourx-auto`,onClick:n.toggle,"aria-label":C,children:[w,E]}),t[49]=n.toggle,t[50]=C,t[51]=w,t[52]=E,t[53]=D):D=t[53];let O=n.muted?`Turn narration on`:`Mute narration`,k=n.muted?`Turn narration on`:`Mute narration`,A;t[54]===n.muted?A=t[55]:(A=n.muted?(0,W.jsx)(z.speakerOff,{className:`tourx-ic`}):(0,W.jsx)(z.speaker,{className:`tourx-ic`}),t[54]=n.muted,t[55]=A);let j;t[56]!==n.muted||t[57]!==n.toggleMute||t[58]!==O||t[59]!==k||t[60]!==A?(j=(0,W.jsx)(`button`,{type:`button`,className:`tourx-btn tourx-mute`,onClick:n.toggleMute,"aria-label":O,"aria-pressed":n.muted,title:k,children:A}),t[56]=n.muted,t[57]=n.toggleMute,t[58]=O,t[59]=k,t[60]=A,t[61]=j):j=t[61];let M;t[62]===n?M=t[63]:(M=!n.solo&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`tourx-btn`,onClick:n.next,"aria-label":`Next chapter`,children:(0,W.jsx)(z.chevR,{className:`tourx-ic`})}),(0,W.jsx)(`div`,{className:`tourx-dots`,role:`tablist`,"aria-label":`Chapters`,children:Array.from({length:n.total},(e,t)=>(0,W.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":t===n.index,"aria-label":`Chapter ${t+1}`,className:`tourx-dot`+(t===n.index?` is-active`:``),onClick:()=>n.jumpTo(t)},t))})]}),t[62]=n,t[63]=M);let N=n.solo?`Back to demos`:`Skip`,P;t[64]!==n.skip||t[65]!==N?(P=(0,W.jsx)(`button`,{type:`button`,className:`tourx-skip`,onClick:n.skip,children:N}),t[64]=n.skip,t[65]=N,t[66]=P):P=t[66];let F;t[67]!==S||t[68]!==D||t[69]!==j||t[70]!==M||t[71]!==P?(F=(0,W.jsxs)(`div`,{className:`tourx-controls`,children:[S,D,j,M,P]}),t[67]=S,t[68]=D,t[69]=j,t[70]=M,t[71]=P,t[72]=F):F=t[72];let I;t[73]!==y||t[74]!==x||t[75]!==F||t[76]!==f||t[77]!==p?(I=(0,W.jsxs)(`div`,{className:f,role:`group`,"aria-label":p,children:[y,x,F]}),t[73]=y,t[74]=x,t[75]=F,t[76]=f,t[77]=p,t[78]=I):I=t[78];let L;return t[79]!==I||t[80]!==d?(L=(0,W.jsxs)(`div`,{className:`tourx`,"aria-live":`polite`,children:[d,I]}),t[79]=I,t[80]=d,t[81]=L):L=t[81],L}function Mi(){window.location.hash=`#/`}function Ni(){delete document.body.dataset.tourChapter}function Pi({onStart:e,onReplay:t,onPlayExtra:n,hasStoredSession:r=!1}){let i=(0,U.useRef)(null);return oe(i),(0,W.jsx)(`div`,{ref:i,className:`tour-end`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`tour-end-title`,children:(0,W.jsxs)(`section`,{className:`tour-end-card`,children:[(0,W.jsxs)(`header`,{className:`tour-end-intro`,children:[(0,W.jsx)(`div`,{className:`tour-end-mascot`,"aria-hidden":`true`,children:(0,W.jsx)(ue,{state:`idle`,emotion:`neutral`,gaze:`center`})}),(0,W.jsx)(`h2`,{id:`tour-end-title`,className:`tour-end-title tour-end-line`,children:`That's Mavéa.`}),(0,W.jsx)(`p`,{className:`tour-end-tagline tour-end-line`,children:`Talk to AI. See what it means.`}),(0,W.jsx)(`p`,{className:`tour-end-copy tour-end-line`,children:`Try it now, or open any scripted mini-demo below to see that feature operate on the real interface.`}),(0,W.jsxs)(`div`,{className:`tour-end-actions tour-end-line`,children:[(0,W.jsx)(`button`,{type:`button`,className:`tour-end-start`,onClick:e,children:r?`Back to your session`:`Start Mavéa`}),(0,W.jsx)(`button`,{type:`button`,className:`tour-end-replay`,onClick:t,children:`Replay the tour`})]})]}),(0,W.jsxs)(`div`,{className:`tour-end-extras`,children:[(0,W.jsx)(`h3`,{children:`More to explore`}),(0,W.jsx)(`div`,{className:`tour-end-grid`,children:Qr.map(e=>(0,W.jsxs)(`button`,{type:`button`,className:`tour-end-extra`,onClick:()=>n(e.id),"aria-label":`Play scripted mini-demo: ${e.title}`,children:[(0,W.jsx)(`span`,{className:`tour-end-glyph`,"aria-hidden":`true`,children:e.glyph}),(0,W.jsxs)(`span`,{className:`tour-end-extra-copy`,children:[(0,W.jsx)(`strong`,{children:e.title}),(0,W.jsx)(`small`,{children:e.hook})]})]},e.id))})]})]})})}var Fi=new Map([{persona:`cfo`,steps:[{ask:`Run my quarterly review: ARR grew from $12.4M to $15.1M, churn ticked up from 2.1% to 2.8%, and regions came in at NA $8.2M, EMEA $4.6M, APAC $2.3M.`,bakeAsk:`Run my quarterly review: ARR grew from $12.4M to $15.1M, churn ticked up from 2.1% to 2.8%, and regions came in at NA $8.2M, EMEA $4.6M, APAC $2.3M. Build the full picture, including growth, the churn drift, and how the regions stack up.`,expect:{minBlocks:4,suggests:!0}},{ask:`Walk me through the bridge: new business added $1.9M, expansion $1.3M, and churn gave back $0.5M.`,beats:[{kind:`pin`,atMs:900}],note:`Renata pins the bridge. The next question uses that context.`,expect:{minBlocks:2,suggests:!0}},{ask:`Forecast for next quarter`,bakeAsk:`Forecast for next quarter: if churn keeps drifting at this pace, where does ARR land? Model it from the numbers we established.`,viaChip:!0,expect:{minBlocks:2}},{beats:[{kind:`export`,atMs:500,format:`presentation`}],note:`One tap: the whole review becomes a board deck.`,holdMs:6500},{beats:[{kind:`dashboard`,atMs:500,settings:!0}],note:`A living dashboard keeps a board like this up to date.`,holdMs:6500},{beats:[{kind:`present`,atMs:500}],note:`…or presents itself, full screen.`,holdMs:6e3}]},{persona:`student`,steps:[{ask:`What does saving $200 a month at 5% become after 10 years?`,bakeAsk:`What does saving $200 a month at 5% interest become after 10 years? Chart it year by year, split what I put in from what the interest earned, and make the monthly amount adjustable.`,beats:[{kind:`bend`,atMs:1100}],note:`Grab the dial. The whole answer updates live.`,expect:{minBlocks:3,bend:!0,suggests:!0}},{ask:`Why does compound interest beat simple interest? It's on my econ exam.`,beats:[{kind:`pen`,atMs:1400}],note:`Mavéa’s Pen marks the exact part Maya is studying.`,expect:{minBlocks:2}},{beats:[{kind:`flashcards`,atMs:600}],note:`Any card can become a flashcard and join her study deck.`,holdMs:6e3}]},{persona:`dev`,steps:[{ask:`Explain how OAuth login works, step by step. I'm adding it to our app.`,beats:[{kind:`focus`,atMs:1200,walk:!0}],note:`Focus mode: one card at a time, everything else dims.`,expect:{minBlocks:3,suggests:!0}},{ask:`Compare session cookies and JWTs for keeping users signed in. Focus on tradeoffs, not dogma.`,bakeAsk:`Compare session cookies and JWTs for keeping users signed in. Show the real tradeoffs side by side, including revocation, statelessness, size, XSS and CSRF exposure, and when each wins.`,beats:[{kind:`pin`,atMs:1e3}],expect:{minBlocks:2}},{beats:[{kind:`palette`,atMs:600}],note:`Press Command K. Every feature is a keystroke away.`,holdMs:5e3},{beats:[{kind:`export`,atMs:500,format:`presentation`}],note:`The whole session becomes a polished presentation.`,holdMs:7500}]},{persona:`traveler`,steps:[{ask:`Plan a long weekend in Lisbon. Three days, first visit, and we love food and views.`,expect:{minBlocks:4,suggests:!0}},{ask:`How do we plan a great day trip to Sintra on Saturday?`,beats:[{kind:`canvas`,atMs:1e3}],note:`The spatial canvas: the whole trip on one board.`,expect:{minBlocks:2}},{beats:[{kind:`export`,atMs:500,format:`document`}],note:`The plan is ready to print for the plane.`,holdMs:7500}]}].map(e=>[e.persona,e]));function Ii(e){return Fi.get(e)}function Li(e){return e.steps.filter(e=>!!e.ask)}var Ri=1300,zi=900;function Bi(e,t){return(e?.spec.blocks??[]).map(e=>e.id).filter(e=>!!e).slice(0,t)}function Vi(e,t,n,r){switch(e.kind){case`pin`:r(e.atMs,()=>t.pinFirstBlock());break;case`bend`:n?.spec.bend&&r(e.atMs,()=>t.bendIt());break;case`mark`:r(e.atMs,()=>t.setInkArmed(!0)),r(e.atMs+500,()=>t.scriptedMark());break;case`pen`:r(e.atMs,()=>t.drawPenOnFirstBlock());break;case`focus`:r(e.atMs,()=>t.setViewMode(`focus`)),e.walk&&Bi(n,4).forEach((n,i)=>r(e.atMs+zi+i*Ri,()=>t.setSpot(n)));break;case`canvas`:{r(e.atMs,()=>t.setViewMode(`canvas`));let i=Bi(n,3);i.forEach((n,i)=>r(e.atMs+zi+i*Ri,()=>t.setSpot(n))),r(e.atMs+zi+i.length*Ri,()=>t.setSpot(null));break}case`export`:r(e.atMs,()=>t.openExport()),e.format===`document`&&r(e.atMs+1800,()=>t.exportSetFormat(`document`)),r(e.atMs+3e3,()=>t.exportPickTemplate(1));break;case`dashboard`:r(e.atMs,()=>t.openDashboards()),e.settings&&r(e.atMs+2600,()=>t.dashboardShowSettings());break;case`flashcards`:r(e.atMs,()=>t.openFlashcards());break;case`present`:r(e.atMs,()=>t.setPresenting(!0));break;case`share`:r(e.atMs,()=>t.setShareOpen(!0));break;case`palette`:r(e.atMs,()=>t.setPaletteOpen(!0))}}function Hi(e){switch(e.kind){case`canvas`:return 6400;case`focus`:return e.walk?7300:1600;case`export`:return e.format===`document`?4800:3800;case`dashboard`:return e.settings?4400:2600;case`mark`:return 2400;case`pen`:return 3200;default:return 1600}}function Ui(e){return e?.length?Math.max(...e.map(e=>e.atMs+Hi(e))):0}i();var Y=Object.assign({"./cfo.generated.json":()=>a(()=>import(`./cfo.generated-j5CXp1Zz.js`),[]),"./dev.generated.json":()=>a(()=>import(`./dev.generated-DYgVxL_4.js`),[]),"./student.generated.json":()=>a(()=>import(`./student.generated-DS_acPaJ.js`),[]),"./traveler.generated.json":()=>a(()=>import(`./traveler.generated-Beun9X7y.js`),[])});async function Wi(e){let t=Y[`./${e}.generated.json`];if(!t)return null;try{return(await t()).default??null}catch{return null}}var Gi=4500,Ki=1e3,qi=6e4;function Ji(e,t,n){if(!e[t]?.ask)return null;let r=e.slice(0,t+1).filter(e=>!!e.ask).length-1;return n.frames[r]??null}function Yi(e,t,n){let r=e.slice(0,t+1).filter(e=>!!e.ask).length;return n.frames[Math.max(0,r-1)]??null}function Xi(e){let{active:t,personaId:n}=e,r=n?Ii(n):void 0,i=r?.steps??[],a=i.length,[o,s]=(0,U.useState)(null),[c,u]=(0,U.useState)(`loading`),[d,f]=(0,U.useState)(()=>Math.max(0,Math.min(a-1,e.startStep??0))),[p,m]=(0,U.useState)(!1),[h,g]=(0,U.useState)(!1),[_,v]=(0,U.useState)(!1),y=(0,U.useRef)(_);y.current=_;let[b,x]=(0,U.useState)(!1),[S,C]=(0,U.useState)(0),[w,T]=(0,U.useState)(null),E=(0,U.useRef)(e.ops);E.current=e.ops;let D=(0,U.useRef)(null),O=(0,U.useRef)(0),A=(0,U.useCallback)(()=>{if(!t||!n)return;u(`loading`);let e=++O.current;Wi(n).then(t=>{if(e!==O.current)return;let n=r?Li(r).length:0,i=!!t&&!!r&&t.frames.length===n;s(i?t:null),u(i?`ready`:`error`)})},[t,n,r]);(0,U.useEffect)(A,[A]);let j=(0,U.useCallback)(()=>{let e=E.current;e.closeAllOverlays(),e.stopRevealWalk(),e.cancelSpeech()},[]);(0,U.useEffect)(()=>{if(!t||!p||b||c!==`ready`||!o||!r)return;let e=r.steps[d];if(!e)return;l(r.persona,d);let n=E.current,i=ci(),a=i.after;T(null),D.current=null,j(),n.setMuted(y.current);let s=Ji(r.steps,d,o),u=s??Yi(r.steps,d,o),f=e.ask?Yr(e.ask):null,m=s?Xr({...s,question:f??s.question}):null,h=u?Xr(u):null,g=()=>{let t=e.beats??[];for(let e of t)Vi(e,n,h,a);if(e.note){let n=t.length?Math.min(...t.map(e=>e.atMs)):0;a(n,()=>T(Yr(e.note??``)))}D.current=Date.now()+Ui(t)+(e.holdMs??Gi)},_=e=>{let t=Date.now(),r=0,i=()=>{if(Date.now()-t>=qi){g();return}if(r=n.isSpeaking()||n.isBusy()?0:r+1,r>=7){g();return}a(250,i)};a(e,i)};if(e.ask&&m){let t=r.steps.slice(0,d+1).filter(e=>!!e.ask).length-1,i=t>0?o.frames[t-1]??null:null,s=!!e.viaChip&&!!i?.spec.suggests?.some(t=>t.label===e.ask),c=f??e.ask,l;s?(a(700,()=>n.pressKeepGoing(e.ask??c)),l=1600):l=ui(a,n.typeInto,c,400)+360,a(l,()=>li(a,()=>n.showFrame(m,c))),_(l+Ki)}else!n.hasCanvas()&&h&&n.showFrame(h,h.question,{silent:!0}),a(300,g);return i.cancel},[d,S,t,p,b,c,o,r,j]),(0,U.useEffect)(()=>{if(!t||!p||b||!h||c!==`ready`)return;let e=E.current,n=window.setInterval(()=>{let t=D.current;!t||Date.now()<t||e.isSpeaking()||e.isBusy()||(window.clearInterval(n),d+1>=a?(j(),x(!0)):f(d+1))},250);return()=>window.clearInterval(n)},[d,S,t,p,b,h,a,c,j]),(0,U.useEffect)(()=>()=>j(),[j]);let M=(0,U.useCallback)(()=>{k(),m(!0),g(!0),x(!1)},[]),N=(0,U.useCallback)((e,t)=>{k(),x(!1),t?.keepPlaying||g(!1),f(Math.max(0,Math.min(a-1,e))),C(e=>e+1)},[a]),P=(0,U.useCallback)(()=>{d+1>=a?(j(),x(!0)):N(d+1,{keepPlaying:!0})},[d,a,N,j]),F=(0,U.useCallback)(()=>N(d-1),[d,N]),I=(0,U.useCallback)(e=>N(e),[N]),L=(0,U.useCallback)(()=>{j(),m(!0),N(0),g(!0)},[N,j]),R=(0,U.useCallback)(()=>{if(k(),!p){M();return}if(b){L();return}g(e=>!e)},[b,L,M,p]),z=(0,U.useCallback)(()=>{k();let e=!y.current;y.current=e,v(e),E.current.setMuted(e),e&&E.current.cancelSpeech()},[]),ee=(0,U.useCallback)(()=>{j(),x(!0)},[j]);return{active:t,started:p,loadState:c,model:o?.model??null,reload:A,index:d,total:a,step:t?i[d]??null:null,note:w,playing:h,muted:_,done:b,start:M,next:P,prev:F,jumpTo:I,toggle:R,toggleMute:z,replay:L,skip:ee}}function Zi(e){return/\p{Extended_Pictographic}/u.test(e)}function Qi(){window.location.hash=`#/`}function $i({driver:e,member:t,onExit:n}){let r=(0,U.useRef)(null),i=e.active&&e.loadState===`ready`&&(!e.started||e.done);if(oe(r,{active:i}),!e.active)return null;let a={"--accent":t.accent};if(e.loadState===`loading`)return(0,W.jsx)(`div`,{className:`demox`,"aria-live":`polite`,children:(0,W.jsxs)(`div`,{className:`demox-load`,style:a,children:[(0,W.jsx)(z.spinner,{className:`demox-spinner`}),`Loading curated replay…`]})});if(e.loadState===`error`)return(0,W.jsx)(`div`,{className:`demox`,"aria-live":`polite`,children:(0,W.jsxs)(`div`,{className:`demox-card`,style:a,role:`alert`,children:[(0,W.jsx)(`p`,{className:`demox-card-title`,children:`This demo couldn’t load`}),(0,W.jsx)(`p`,{className:`demox-card-body`,children:`The curated prerecorded example did not come through. Check your connection and try again.`}),(0,W.jsxs)(`div`,{className:`demox-card-actions`,children:[(0,W.jsx)(`button`,{type:`button`,className:`demox-primary`,onClick:e.reload,children:`Retry`}),(0,W.jsx)(`button`,{type:`button`,className:`demox-ghost`,onClick:Qi,children:`Back to home`})]})]})});if(!e.started)return(0,W.jsx)(`div`,{className:`demox demox-intro`,"aria-live":`polite`,children:(0,W.jsxs)(`div`,{ref:r,className:`demox-card demox-start`,style:a,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`demox-start-title`,children:[(0,W.jsx)(`span`,{className:`demox-avatar`+(Zi(t.avatar)?` emoji`:``),children:t.avatar}),(0,W.jsx)(`span`,{className:`demox-card-kicker`,children:`Curated prerecorded example`}),(0,W.jsxs)(`p`,{id:`demox-start-title`,className:`demox-card-title`,children:[`Watch: `,t.useCase]}),(0,W.jsx)(`p`,{className:`demox-card-body`,children:`This fictional scenario replays prerecorded, model-generated answers with curated feature choreography. Pause or move between steps at any time.`}),(0,W.jsxs)(`div`,{className:`demox-card-actions`,children:[(0,W.jsx)(`button`,{type:`button`,className:`demox-primary`,onClick:e.start,children:`Start demo`}),(0,W.jsx)(`button`,{type:`button`,className:`demox-ghost`,onClick:Qi,children:`Back to home`})]})]})});if(e.done){let i=I.filter(e=>e.id!==t.id);return(0,W.jsx)(`div`,{className:`demox demox-intro`,"aria-live":`polite`,children:(0,W.jsxs)(`div`,{ref:r,className:`demox-card demox-end`,style:a,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`demox-end-title`,children:[(0,W.jsx)(`span`,{className:`demox-avatar`+(Zi(t.avatar)?` emoji`:``),children:t.avatar}),(0,W.jsx)(`p`,{id:`demox-end-title`,className:`demox-card-title`,children:`End of curated replay`}),(0,W.jsx)(`p`,{className:`demox-card-body`,children:`These model-generated answers were prerecorded, then replayed with curated feature choreography. The scenario is illustrative, not a live result or customer testimonial. Try your own question with your selected provider.`}),(0,W.jsxs)(`div`,{className:`demox-card-actions`,children:[(0,W.jsx)(`button`,{type:`button`,className:`demox-primary`,onClick:n,children:`Try it yourself`}),(0,W.jsx)(`button`,{type:`button`,className:`demox-ghost`,onClick:e.replay,children:`Replay`})]}),(0,W.jsx)(`div`,{className:`demox-others`,role:`group`,"aria-label":`More curated replays`,children:i.map(e=>(0,W.jsxs)(`button`,{type:`button`,className:`demox-other`,style:{"--accent":e.accent},onClick:()=>g(e.id),title:`${e.name} · ${e.role}`,children:[(0,W.jsx)(`span`,{className:`demox-other-avatar`+(Zi(e.avatar)?` emoji`:``),children:e.avatar}),e.useCase]},e.id))})]})})}return(0,W.jsxs)(`div`,{className:`demox`,"aria-live":`polite`,children:[(0,W.jsxs)(`div`,{className:`demox-banner`,style:a,children:[(0,W.jsx)(`span`,{className:`demox-avatar`+(Zi(t.avatar)?` emoji`:``),children:t.avatar}),(0,W.jsxs)(`span`,{className:`demox-who`,children:[(0,W.jsx)(`span`,{className:`demox-name`,children:t.useCase}),(0,W.jsxs)(`span`,{className:`demox-role`,children:[t.name,` · `,t.role]})]}),(0,W.jsx)(`span`,{className:`demox-badge`,children:`Curated replay`})]}),e.note&&(0,W.jsx)(`div`,{className:`demox-note`,style:a,children:e.note},e.note),(0,W.jsxs)(`div`,{className:`demox-panel`,style:a,role:`group`,"aria-label":`Demo controls`,children:[(0,W.jsx)(`button`,{type:`button`,className:`demox-btn`,onClick:e.prev,disabled:e.index===0,"aria-label":`Previous step`,children:(0,W.jsx)(z.chevL,{className:`demox-ic`})}),(0,W.jsx)(`button`,{type:`button`,className:`demox-btn demox-play`,onClick:e.toggle,"aria-label":e.playing?`Pause autoplay`:`Turn on autoplay`,children:e.playing?(0,W.jsx)(z.pause,{className:`demox-ic`}):(0,W.jsx)(z.play,{className:`demox-ic`})}),(0,W.jsx)(`button`,{type:`button`,className:`demox-btn demox-mute`,onClick:e.toggleMute,"aria-label":e.muted?`Turn narration on`:`Mute narration`,"aria-pressed":e.muted,title:e.muted?`Turn narration on`:`Mute narration`,children:e.muted?(0,W.jsx)(z.speakerOff,{className:`demox-ic`}):(0,W.jsx)(z.speaker,{className:`demox-ic`})}),(0,W.jsx)(`button`,{type:`button`,className:`demox-btn`,onClick:e.next,"aria-label":`Next step`,children:(0,W.jsx)(z.chevR,{className:`demox-ic`})}),(0,W.jsx)(`div`,{className:`demox-dots`,role:`tablist`,"aria-label":`Steps`,children:Array.from({length:e.total},(t,n)=>(0,W.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===e.index,"aria-label":`Step ${n+1}`,className:`demox-dot`+(n===e.index?` is-active`:``),onClick:()=>e.jumpTo(n)},n))}),(0,W.jsxs)(`button`,{type:`button`,className:`demox-skip`,onClick:n,"aria-label":`Exit demo, try it yourself`,children:[(0,W.jsx)(`span`,{className:`demox-skip-full`,children:`Exit, try it yourself`}),(0,W.jsx)(`span`,{className:`demox-skip-short`,"aria-hidden":`true`,children:`Exit`})]})]})]})}i();var ea=[`nasa-cfd`,`fomc`,`weather`,`cars`,`react-readme`],ta=null;async function na(){return ta||(ta=[...(await a(()=>import(`./prism.generated-BQkO5r6r.js`),[])).default.docs].sort((e,t)=>{let n=ea.indexOf(e.id),r=ea.indexOf(t.id);return(n<0?99:n)-(r<0?99:r)}).map(e=>({id:e.id,type:e.type,name:e.name,doc:{name:e.name,mime:e.mime,data:e.data,size:e.size},spec:{...e.spec,claims:e.spec.claims.map(e=>({...e,kind:Pt(e.kind)}))},proposed:e.proposed})),ta)}var ra=`How does $10,000 grow at 7% over 30 years?`;function ia(){let e=Jr(`money`)?.frames[0]?.spec.blocks??[],t=Jr(`monthly`)?.frames[0]?.spec.blocks??[],n=[],r=(e,t,r=1)=>{for(let i of t)for(let t of e)t.type===i&&t.id&&!n.includes(t)&&r-->0&&n.push(t)};return r(e,[`chart`]),r(e,[`stacked`,`stack`]),r(t,[`chart`]),r(t,[`kpi`,`stack`,`stacked`]),r(e,[`breakdown`]),n}function aa(){let e=zt().find(e=>e.question===ra);if(e)return e.id;let t=ia();if(t.length===0)return null;let n=Vt({title:`Investment growth · $10k at 7%`,question:ra,topic:`money`});return n.thesis={text:`Your initial $10,000 grows by more than 7.6× through the power of compounding interest.`,saidAt:n.createdAt},n.widgets=t.map(e=>Rt(e,`tour`)),n.cadence={data:`hourly`,ai:`daily`},n.nextDataAt=It(n.createdAt,Ft[n.cadence.data]),n.nextAiAt=It(n.createdAt,Bt[n.cadence.ai]),Lt(n),n.id}function oa(e,t){let n=e.length,r=new ArrayBuffer(44+n*2),i=new DataView(r);function a(e,t){for(let n=0;n<t.length;n++)i.setUint8(e+n,t.charCodeAt(n))}a(0,`RIFF`),i.setUint32(4,36+n*2,!0),a(8,`WAVE`),a(12,`fmt `),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,t,!0),i.setUint32(28,t*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),a(36,`data`),i.setUint32(40,n*2,!0);let o=44;for(let t=0;t<n;t++){let n=Math.max(-1,Math.min(1,e[t]));i.setInt16(o,n<0?n*32768:n*32767,!0),o+=2}return r}i();var sa=12,ca=2813,la=3;function ua(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Float32Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function da(e){let t=e&&typeof e==`object`&&`name`in e?String(e.name):void 0;return t===`NotAllowedError`||t===`SecurityError`?`not-allowed`:`audio`}function fa(e){return e?45e3:25e3}var pa=class t{mode=`vad`;capabilities;vad=null;vadLoading=!1;vadFailed=!1;phase=`idle`;muted=!1;wantRunning=!1;continuous=!1;disposed=!1;sessionId=0;transcriptionAbort=null;transcriptionChain=Promise.resolve();queuedTranscriptions=0;preRollFrames=[];utteranceFrames=[];maveaSpeaking=!1;echoTailUntil=0;onBargeIn;utteranceIsEcho=!1;bargeInTimer=null;static ECHO_TAIL_MS=600;static WHISPER_RETRY_MS=1e4;whisperOk=null;whisperRetryAt=0;resultSubs=new Set;stateSubs=new Set;constructor(){let e=typeof navigator<`u`&&typeof navigator.mediaDevices?.getUserMedia==`function`;this.capabilities={stt:e,tts:!1,canUseRealVoice:e}}start(e){if(!this.muted){if(e?.continuous!==void 0&&(this.continuous=e.continuous),this.wantRunning||(this.sessionId+=1),this.wantRunning=!0,this.vadFailed){this.emitState({phase:`idle`,error:`unsupported`});return}this.vad?this.startVad():this.loadVad()}}stop(){this.wantRunning=!1,this.continuous=!1,this.sessionId+=1,this.transcriptionAbort?.abort(),this.transcriptionAbort=null,this.pauseVad(),this.clearBargeInTimer(),this.preRollFrames=[],this.utteranceFrames=[],this.phase!==`idle`&&this.emitState({phase:`idle`})}forceStop(){if(this.phase===`transcribing`){this.continuous=!1,this.wantRunning=!1,this.pauseVad();return}let e=this.continuous;this.wantRunning=e,this.pauseVad(),this.clearBargeInTimer();let t=ua([...this.utteranceFrames,...this.preRollFrames]);this.preRollFrames=[],this.utteranceFrames=[],this.utteranceIsEcho=!1,t.length>0?(this.emitState({phase:`transcribing`}),this.enqueueTranscription(t,this.sessionId,e)):(this.emitState({phase:`idle`}),e&&this.startVad())}speak(e){return Promise.resolve()}cancel(){this.stop()}setMuted(e){this.muted=e,e&&this.stop()}setMaveaSpeaking(e){this.maveaSpeaking&&!e&&(this.echoTailUntil=Date.now()+t.ECHO_TAIL_MS),this.maveaSpeaking=e}setSoundEnabled(e){}onResult(e){return this.resultSubs.add(e),()=>this.resultSubs.delete(e)}onStateChange(e){return this.stateSubs.add(e),()=>this.stateSubs.delete(e)}dispose(){this.disposed=!0,this.wantRunning=!1,this.sessionId+=1,this.transcriptionAbort?.abort(),this.transcriptionAbort=null,this.clearBargeInTimer(),this.vad&&=(this.vad.destroy().catch(()=>{}),null),this.resultSubs.clear(),this.stateSubs.clear()}async loadVad(){if(!this.vadLoading){this.vadLoading=!0;try{let{MicVAD:t}=await a(async()=>{let{MicVAD:t}=await import(`./dist-kNHRtoqd.js`).then(t=>e(t.default,1));return{MicVAD:t}},__vite__mapDeps([0,1,2]));if(this.vad=await t.new({model:`v5`,startOnLoad:!1,baseAssetPath:`/`,onnxWASMBasePath:`/`,positiveSpeechThreshold:.5,negativeSpeechThreshold:.35,minSpeechMs:280,preSpeechPadMs:500,redemptionMs:1600,onFrameProcessed:(e,t)=>this.captureFrame(t),onSpeechStart:()=>this.handleSpeechStart(),onSpeechRealStart:()=>this.handleSpeechRealStart(),onSpeechEnd:e=>void this.handleSpeechEnd(e),onVADMisfire:()=>this.handleMisfire()}),this.disposed){this.vad.destroy().catch(()=>{}),this.vad=null;return}this.vadLoading=!1,this.wantRunning&&this.startVad()}catch(e){console.warn(`[VadVoice] Local Silero VAD failed to load`,e),this.vadLoading=!1,this.vadFailed=!0,this.wantRunning&&this.emitState({phase:`idle`,error:`unsupported`})}}}clearBargeInTimer(){this.bargeInTimer!==null&&(clearTimeout(this.bargeInTimer),this.bargeInTimer=null)}startVad(){this.vad&&Promise.resolve(this.vad.start()).catch(e=>{!this.disposed&&this.wantRunning&&(this.wantRunning=!1,this.emitState({phase:`idle`,error:da(e)}))})}pauseVad(){this.vad&&Promise.resolve(this.vad.pause()).catch(()=>{})}captureFrame(e){let t=e.slice();if(this.phase===`listening`&&!this.utteranceIsEcho){this.utteranceFrames.length<ca&&this.utteranceFrames.push(t);return}this.preRollFrames.push(t),this.preRollFrames.length>sa&&this.preRollFrames.shift()}handleSpeechStart(){this.muted||(this.utteranceIsEcho=Date.now()<this.echoTailUntil,this.utteranceFrames=this.preRollFrames,this.preRollFrames=[],!this.utteranceIsEcho&&this.emitState({phase:`listening`}))}handleSpeechRealStart(){this.muted||(this.utteranceIsEcho&&!this.maveaSpeaking&&(this.utteranceIsEcho=!1,this.utteranceFrames=[...this.utteranceFrames,...this.preRollFrames],this.preRollFrames=[],this.emitState({phase:`listening`})),!this.utteranceIsEcho&&this.maveaSpeaking&&this.onBargeIn?.())}handleMisfire(){this.clearBargeInTimer(),this.utteranceIsEcho=!1,this.utteranceFrames=[],this.continuous||(this.wantRunning=!1,this.pauseVad()),this.phase!==`idle`&&this.emitState({phase:`idle`})}handleSpeechEnd(e){if(this.clearBargeInTimer(),this.utteranceIsEcho){this.utteranceIsEcho=!1,this.utteranceFrames=[],this.emitState({phase:`idle`});return}this.utteranceFrames=[],this.continuous||(this.wantRunning=!1,this.pauseVad()),this.emitState({phase:`transcribing`}),this.enqueueTranscription(e,this.sessionId)}enqueueTranscription(e,t,n=!1){if(this.queuedTranscriptions>=la){this.emitState({phase:`idle`,error:`audio`}),n&&this.wantRunning&&this.startVad();return}this.queuedTranscriptions+=1,this.transcriptionChain=this.transcriptionChain.catch(()=>{}).then(async()=>{try{if(this.disposed||t!==this.sessionId)return;let r=new AbortController;this.transcriptionAbort=r;let i=await this.transcribeWhisper(e,r.signal);if(this.transcriptionAbort===r&&(this.transcriptionAbort=null),this.disposed||r.signal.aborted||t!==this.sessionId)return;let a=i.text.trim();if(a){let e=i.confidence!==void 0&&i.confidence<.7||(i.noSpeechProbability??0)>=.6;this.emitState({phase:`heard`,transcript:a}),this.emitResult({transcript:a,confidence:i.confidence,noSpeechProbability:i.noSpeechProbability,lowConfidence:e})}else{this.emitState({phase:`idle`,error:i.error??`no-speech`}),n&&this.wantRunning&&this.startVad();return}this.emitState({phase:`idle`}),n&&this.wantRunning&&this.startVad()}finally{--this.queuedTranscriptions}})}async transcribeWhisper(e,t){let n=await this.transcribeWhisperDetailed(e,t);return t?n:n.text}async transcribeWhisperDetailed(e,n){if(this.whisperOk===!1&&Date.now()<this.whisperRetryAt)return{text:``,error:`transcription`};try{let t=oa(e,16e3),r=new FormData;r.append(`file`,new Blob([t],{type:`audio/wav`}),`speech.wav`),r.append(`language`,`en`),r.append(`response_format`,`verbose_json`);let i=fa(this.whisperOk===!0),a=AbortSignal.timeout(i),o=n?AbortSignal.any([n,a]):a,s=await fetch(`/stt/inference`,{method:`POST`,body:r,signal:o});if(s.ok){let e=await s.json(),t=e.text?.trim()??``;if(this.whisperOk=!0,this.whisperRetryAt=0,t){let n=[...e.words??[],...(e.segments??[]).flatMap(e=>e.words??[])].map(e=>e.probability).filter(e=>Number.isFinite(e)),r=(e.segments??[]).map(e=>e.avg_logprob).filter(e=>Number.isFinite(e)),i=n.length>0?n.reduce((e,t)=>e+t,0)/n.length:r.length>0?Math.exp(r.reduce((e,t)=>e+t,0)/r.length):void 0,a=(e.segments??[]).map(e=>e.no_speech_prob).filter(e=>Number.isFinite(e));return{text:t,confidence:i,noSpeechProbability:a.length>0?Math.max(...a):void 0}}return{text:``,error:`no-speech`}}}catch(e){if(e instanceof DOMException&&(e.name===`TimeoutError`||e.name===`AbortError`))return{text:``,error:`transcription`}}return this.whisperOk!==!0&&(this.whisperOk=!1,this.whisperRetryAt=Date.now()+t.WHISPER_RETRY_MS),{text:``,error:`transcription`}}emitResult(e){this.resultSubs.forEach(t=>t(e))}emitState(e){this.phase=e.phase,this.stateSubs.forEach(t=>t(e))}};function ma(){return new pa}function ha(e={}){let t=(0,U.useRef)(e.onResult),n=(0,U.useRef)(e.onStateChange),r=(0,U.useRef)(e.onBargeIn);t.current=e.onResult,n.current=e.onStateChange,r.current=e.onBargeIn;let i=(0,U.useMemo)(()=>ma(),[]);return(0,U.useEffect)(()=>{let e=i.onResult(e=>t.current?.(e)),a=i.onStateChange(e=>n.current?.(e));return`onBargeIn`in i&&(i.onBargeIn=()=>r.current?.()),()=>{e(),a(),i.dispose()}},[i]),(0,U.useMemo)(()=>({mode:i.mode,capabilities:i.capabilities,start:e=>i.start(e),stop:()=>i.stop(),speak:e=>i.speak(e),cancel:()=>i.cancel(),setMuted:e=>i.setMuted(e),setSoundEnabled:e=>i.setSoundEnabled(e),setMaveaSpeaking:e=>i.setMaveaSpeaking?.(e),forceStop:()=>i.forceStop?.()}),[i])}var ga=`mavea-always-on`;function _a(e,t,n=!1,r=`neutral`,i=!1){if(t)return{state:`listening`,emotion:`neutral`,gaze:`center`};if(n)return i?{state:`showing`,emotion:`surprised`,gaze:`center`}:{state:`speaking`,emotion:`surprised`,gaze:`center`};switch(e){case`thinking`:return{state:`loading`,emotion:`neutral`,gaze:`center`};case`speaking`:return i?{state:`showing`,emotion:r,gaze:`center`}:{state:`speaking`,emotion:r,gaze:`center`};case`showing`:return{state:`showing`,emotion:r,gaze:`right`};default:return{state:`idle`,emotion:r,gaze:`center`}}}var va=new Set([`no`,`caution`,`avoid`,`risk`,`wait`]),ya=new Set([`yes`,`go`,`recommended`,`good`]);function ba(e,t){let n=e.props[t];return typeof n==`string`?n.toLowerCase():void 0}function xa(e){let t=e?.blocks;if(!t?.length)return`neutral`;let n=!1,r=e?.awaiting===!0;for(let e of t){let t=ba(e,`tone`);(t===`warn`||t===`neg`)&&(n=!0),t===`pos`&&(r=!0);let i=ba(e,`stance`);i&&va.has(i)&&(n=!0),i&&ya.has(i)&&(r=!0),e.type===`insight`&&e.props.conf===`unverified`&&(n=!0)}return n?`concerned`:r?`warm`:`neutral`}function Sa(e){switch(e){case`concerned`:return`concerned`;case`warm`:return`warm`;default:return`neutral`}}function Ca(e){return Sa(xa(e))}function wa(e){let t=e?.blocks;return!t?.length||xa(e)!==`warm`?!1:t.some(e=>{let t=ba(e,`stance`);return t!==void 0&&ya.has(t)})}var Ta={clipShared:[`Nice — that one's worth sharing.`,`Off it goes.`,`Clipped and ready to share.`]};Object.keys(Ta);function Ea(e,t,n){let r=Ta[e];if(r.length===0)return``;let i=Math.abs(Math.trunc(t))%r.length;return r.length>1&&r[i]===n&&(i=(i+1)%r.length),r[i]}function Da(){return{lastAt:0,lastTurn:-1/0}}function Oa(e,t){return!(e.lastAt!==0&&t.now-e.lastAt<9e4||t.turnCount-e.lastTurn<3)}function ka(e,t){return{lastAt:t.now,lastTurn:t.turnCount}}var Aa=1100,ja=6e3,Ma=150,Na=950,Pa=350,Fa=8;function Ia(e){let{muted:t,turnCount:n,gates:r}=e,i=(0,U.useRef)(e.speak),a=(0,U.useRef)(e.cancelSpeak),o=(0,U.useRef)(e.isSpeaking);i.current=e.speak,a.current=e.cancelSpeak,o.current=e.isSpeaking;let[s,c]=(0,U.useState)([]),[l,u]=(0,U.useState)(!1),[d,f]=(0,U.useState)(null),[p,m]=(0,U.useState)(0),h=(0,U.useRef)(Da()),g=(0,U.useRef)(void 0),_=(0,U.useRef)(null),v=(0,U.useRef)(null),y=(0,U.useCallback)(()=>{_.current&&=(clearTimeout(_.current),null),v.current&&=(clearTimeout(v.current),null)},[]),b=(0,U.useCallback)(e=>{c(t=>t.length>=Fa||t[t.length-1]===e?t:[...t,e])},[]),x=(0,U.useCallback)(()=>{y(),u(!1),v.current=setTimeout(()=>{v.current=null,f(null)},Na)},[y]),S=(0,U.useCallback)(e=>{let t=()=>{let n=Date.now()-e;n>=Aa&&!o.current()||n>=ja?x():_.current=setTimeout(t,Ma)};_.current=setTimeout(t,Aa)},[x]),C=r.atRest&&!r.busy&&!r.listening&&!r.introHold&&r.hasCanvas&&!r.modalOpen;(0,U.useEffect)(()=>{if(l||d!==null||!C||s.length===0)return;if(o.current()){let e=setTimeout(()=>m(e=>e+1),Pa);return()=>clearTimeout(e)}let e=s[0],r=Date.now();if(!Oa(h.current,{type:e,now:r,turnCount:n})){c(e=>e.slice(1));return}h.current=ka(h.current,{type:e,now:r,turnCount:n});let a=Ea(e,r,g.current);g.current=a,c(e=>e.slice(1)),f(a),u(!0),!t&&a&&i.current(a),S(r)},[l,d,C,s,n,t,S,p]),(0,U.useEffect)(()=>{if(!l)return;let e=r.busy||!r.atRest,t=r.listening||r.modalOpen;!e&&!t||(y(),u(!1),f(null),c([]),g.current=void 0,t&&!e&&a.current())},[l,r.busy,r.atRest,r.listening,r.modalOpen,y]);let w=(0,U.useCallback)(()=>{y(),c([]),u(!1),f(null),h.current=Da(),g.current=void 0},[y]);return(0,U.useEffect)(()=>()=>y(),[y]),{interjecting:l,line:d,enqueue:b,reset:w}}function La(e){let t=(0,J.c)(36),{chapters:n,currentIndex:r,onJump:i,onClose:a}=e,o=(0,U.useRef)(null),s;if(t[0]===a?s=t[1]:(s={onEscape:a},t[0]=a,t[1]=s),oe(o,s),n.length===0)return null;let c;t[2]===n?c=t[3]:(c=wt(n),t[2]=n,t[3]=c);let l=c,u;t[4]!==n||t[5]!==r?(u=n.find(e=>e.moments.some(e=>e.frameIndex===r))?.color,t[4]=n,t[5]=r,t[6]=u):u=t[6];let d=u,f;t[7]===a?f=t[8]:(f=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a())},t[7]=a,t[8]=f);let p;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,W.jsx)(`h2`,{className:`ovw-title`,children:`Your conversation`}),t[9]=p):p=t[9];let m=n.length===1?`chapter`:`chapters`,h=l===1?`moment`:`moments`,g;t[10]!==n.length||t[11]!==m||t[12]!==h||t[13]!==l?(g=(0,W.jsxs)(`header`,{className:`ovw-head`,children:[p,(0,W.jsxs)(`p`,{className:`ovw-sub`,children:[n.length,` `,m,` · `,l,` `,h,` — tap anywhere to dive back in`]})]}),t[10]=n.length,t[11]=m,t[12]=h,t[13]=l,t[14]=g):g=t[14];let _;if(t[15]!==n||t[16]!==r||t[17]!==a||t[18]!==i){let e;t[20]!==r||t[21]!==a||t[22]!==i?(e=e=>(0,W.jsxs)(`section`,{className:`ovw-card`,style:{"--card-c":e.color},children:[(0,W.jsxs)(`div`,{className:`ovw-card-head`,children:[(0,W.jsx)(`span`,{className:`ovw-card-dot`}),(0,W.jsx)(`h3`,{className:`ovw-card-title`,children:e.title}),(0,W.jsx)(`span`,{className:`ovw-card-count`,children:e.moments.length})]}),(0,W.jsx)(`ul`,{className:`ovw-moments`,children:e.moments.map(e=>{let t=e.frameIndex===r,n=z[e.icon]||z.mic;return(0,W.jsxs)(`li`,{children:[(0,W.jsxs)(`button`,{type:`button`,className:`ovw-moment`+(t?` is-current`:``),onClick:()=>{i(e.frameIndex),a()},"aria-current":t?`true`:void 0,children:[(0,W.jsx)(n,{}),(0,W.jsx)(`span`,{className:`ovw-moment-q`,children:e.question||`Moment`})]}),e.elements.length>0&&(0,W.jsx)(`ul`,{className:`ovw-els`,children:e.elements.map(t=>{let n=t.icon&&z[t.icon]||z.spark;return(0,W.jsx)(`li`,{children:(0,W.jsxs)(`button`,{type:`button`,className:`ovw-el`,onClick:()=>{i(e.frameIndex,t.id),a()},"aria-label":`Jump to "${t.label}" in "${e.question||`this moment`}"`,children:[(0,W.jsx)(n,{}),(0,W.jsx)(`span`,{className:`ovw-el-label`,children:t.label})]})},t.id)})})]},e.frameIndex)})})]},e.id),t[20]=r,t[21]=a,t[22]=i,t[23]=e):e=t[23],_=n.map(e),t[15]=n,t[16]=r,t[17]=a,t[18]=i,t[19]=_}else _=t[19];let v;t[24]===_?v=t[25]:(v=(0,W.jsx)(`div`,{className:`ovw-grid`,children:_}),t[24]=_,t[25]=v);let y;t[26]!==v||t[27]!==g?(y=(0,W.jsxs)(`div`,{className:`ovw-panel`,role:`dialog`,"aria-modal":`true`,"aria-label":`Conversation overview`,ref:o,onClick:Ra,children:[g,v]}),t[26]=v,t[27]=g,t[28]=y):y=t[28];let b;t[29]!==a||t[30]!==y||t[31]!==f?(b=(0,W.jsx)(`div`,{className:`ovw-scrim`,onClick:a,role:`button`,tabIndex:0,"aria-label":`Close conversation overview`,onKeyDown:f,children:y}),t[29]=a,t[30]=y,t[31]=f,t[32]=b):b=t[32];let x;return t[33]!==d||t[34]!==b?(x=(0,W.jsx)(Le,{accent:d,children:b}),t[33]=d,t[34]=b,t[35]=x):x=t[35],x}function Ra(e){return e.stopPropagation()}function za(e){let t=new Map;for(let n of e)for(let e of n.spec?.sources??[])e?.url&&!t.has(e.url)&&t.set(e.url,e);return[...t.values()]}function Ba(e,t={}){if(e.length<2)return null;let n=e[e.length-1]?.spec;if(!n)return null;let r=t.cap??1/0,i=e.reduce((e,t)=>Re(e,t.spec?.blocks??[],`augment`).blocks,[]),a=i.length>r,o=a?i.slice(0,r):i,s=e.length,c=a?`${s} moments in this thread · showing the first ${r} cards`:`${s} moments in this thread`,l=za(e);return{...n,id:t.id??n.id,title:t.title??n.title,sub:c,blocks:o,sources:l.length?l:n.sources,tint:t.tint??n.tint,suggests:[],bend:void 0,awaiting:void 0,blanks:void 0}}var Va=240;function Ha(e){let{stops:t,from:n=0,spokenWalk:r,withNotes:i,teach:a,marksById:o}=e,s=[],c=0;for(let e=n;e<t.length;e++){let n=t[e].spot;if(!n)continue;let l=t[e].line;if(r&&e>0&&i&&l){let e=ot(l);e&&s.push({spot:n,line:l,noteText:e})}let u=o.get(n);if(u?.length){let e=u.length>1;for(let t=0;t<u.length;t++){let r=t===u.length-1;s.push({spot:n,line:l,mark:u[t],generous:a,delayMs:c*Va,badgeMs:r?at+(u.length-1)*Va:void 0,stepNumber:e?t+1:void 0}),c++}}else a&&(s.push({spot:n,line:l,generous:!0,delayMs:c*Va}),c++)}return s}var Ua=1100,Wa=1700;function Ga(e,t,n){let{controller:r,release:i}=e,a=!1,o=e=>{a||(a=!0,i(),n(e))},s=()=>t.isCancelled()?`cancelled`:t.isDismissed()?`dismissed`:null;(async()=>{for(let e=0;e<r.count;e++){let n=s();if(n){o(n);return}let i=r.spokenFor(e)??r.captionFor(e);if(i){let n=t.speakLine(i),a=await nt(n),c=s();if(c){o(c);return}r.setIndex(e),a?await Xe(n,Wa,Ua):await Qe(Wa)}else r.setIndex(e),await Qe(Wa)}let e=s();o(e??`complete`)})()}function Ka(e,t,n){if(e.length===0)return e;let r=new Map;n.forEach((e,t)=>{let n=Ve(e),i=r.get(n);i?i.push(t):r.set(n,[t])});let i=new Map;n.forEach((e,t)=>{let n=Ve(e);i.has(n)||i.set(n,t)});let a=e=>{if(e.kind!==`connect`)return e;let n=t[e.onIndex??-1],r=n?i.get(Ve(n)):void 0;return r===void 0?void 0:{...e,onIndex:r}},o=e=>{let t=(e.marks??(e.mark?[e.mark]:[])).map(a).filter(e=>!!e);return t.length?{mark:t[0],...t.length>1?{marks:t}:{}}:{}},s=[],c=new Set;for(let n of e){let e=t[n.index];if(!e)continue;let i=r.get(Ve(e))?.shift();if(i===void 0||c.has(i))continue;c.add(i);let{mark:a,marks:l}=o(n),u={...n,index:i,mark:a,marks:l},d=i===n.index&&a===n.mark&&l===n.marks;s.push(d?n:u)}return s}function qa(e,t,n,r,i){let a={question:n,narration:r.narration,title:r.spec.title,blockTypes:r.spec.blocks.map(e=>e.type)},o=Be(e,a,r.continuity,r.tier),s=!e||o===`replace`&&He(e,a)<.15,c=i?.forceReplace?`replace`:o,l=Re(t,r.spec.blocks,c);c!==`replace`&&l.overflow&&(c=`replace`,l=Re(t,r.spec.blocks,`replace`));let u={...r.spec,blocks:l.blocks};c!==`replace`&&delete u.bend;let d=c===`replace`?l.blocks.find(e=>e.id)?.id??null:l.firstNewId,f=Ka(r.tour??[],r.spec.blocks,l.blocks),p=Date.now();return{frame:{id:We(p),question:n,narration:r.narration,...r.spoken?{spoken:r.spoken}:{},mode:c,topicShift:s,tour:f,spec:u,at:p,...r.corrects?{corrects:r.corrects}:{}},mode:c,spot:d,snap:a}}var Ja={like:`Likes`,love:`Loves`,prefer:`Prefers`,enjoy:`Enjoys`,hate:`Hates`,dislike:`Dislikes`,need:`Needs`,want:`Wants`,own:`Owns`,use:`Uses`,drive:`Drives`,play:`Plays`,speak:`Speaks`,work:`Works`,live:`Lives`,study:`Studies`,train:`Trains`,teach:`Teaches`,code:`Codes`,run:`Runs`,cook:`Cooks`,travel:`Travels`},Ya=3,Xa=140;function Za(e){return e.length?e[0].toUpperCase()+e.slice(1):e}function Qa(e){let t=e.trim().replace(/\s+/g,` `);if(!t||t.length>Xa||t.includes(`?`))return``;let n=t.toLowerCase(),r;if(r=t.match(/^i(?:'m| am)\s+(an?\s+.+)/i))return $a(`Is ${r[1]}`);if(r=t.match(/^i(?:'m| am)\s+(.+)/i))return $a(r[1]);if(r=t.match(/^i(?:'ve| have)\s+(?:got\s+)?(.+)/i))return $a(`Has ${r[1]}`);if(r=t.match(/^my\s+(.+?)\s+(is|are)\s+(.+)/i))return $a(`${r[1]} ${r[2]} ${r[3]}`);if(r=n.match(/^i\s+(\w+)\s+(.+)/)){let e=Ja[r[1]];if(e)return $a(`${e} ${t.slice(t.toLowerCase().indexOf(r[2]))}`)}return``}function $a(e){let t=Za(e.trim().replace(/\s+/g,` `));return t.length>=6&&t.length<=Xa?t:``}function eo(e){if(!e)return[];let t=e.split(/[.!?\n]+|,?\s+\band\b\s+/i),n=[];for(let e of t){let t=Qa(e);if(t&&!n.includes(t)&&n.push(t),n.length>=Ya)break}return n}var to=.6,no=.5;function ro(e){return(e.match(/\d[\d,.]*\d|\d/g)??[]).map(e=>e.replace(/,/g,``).replace(/\.+$/,``))}function io(e,t){let n=ro(e);if(!n.length)return!1;let r=new Set(ro(t));return n.some(e=>!r.has(e))}function ao(e,t,n={}){if(!io(e,t)){let n=En(e),r=En(t);if(n.size>0&&An(n,r)>=to)return`user-stated`}return n.webGrounded?`web-grounded`:`model-inferred`}function oo(e,t){let n=ro(e),r=new Set(ro(t));if(n.length)return n.every(e=>r.has(e))?`user-stated`:`model-inferred`;let i=En(e);return i.size>0&&An(i,En(t))>=no?`user-stated`:`model-inferred`}var so=24;function co(e,t=`item`){let n=e.toLowerCase().match(/[a-z][a-z0-9]*/g);return(n&&n[0]?n[0]:t).slice(0,so)}function lo(e,t={}){return{concept:`corrections.${co(e.what)}`,body:`On "${e.what}", an earlier answer said ${e.was}; the user corrected it to ${e.now}. Use the corrected value and double-check figures like this before stating them.`,kind:`procedural`,source:t.source??`user-stated`,verify:!0,outcome:`loss`,turnId:t.turnId,quote:e.now}}var uo=4,fo=1600,po=24,mo=`Break ONE cause into the parts it is MADE OF (components or segments) — never its causes or its effects, which are separate nodes. Return ONLY compact JSON, one line.
3
-
4
- At most ${uo} children; fewer beats padding. Nothing honest to split? {"children":[]}.
5
- "tier":"T2" with a VERBATIM "quote" from SOURCES is the only way to give a "value" — otherwise "tier":"T0" and no numbers, no quote. Never invent a figure or a citation. Empty SOURCES ⇒ every child T0.
6
- "id": short lowercase-hyphen slug. "detail": one plain sentence. "domain" (optional): ${Rn.join(`|`)}.
7
-
8
- {"children":[{"id":"","label":"","tier":"T0","value":0,"unit":"","quote":"","detail":"","domain":""}]}`,ho={type:`object`,properties:{children:{type:`array`,maxItems:uo,items:{type:`object`,properties:{id:{type:`string`},label:{type:`string`},tier:{type:`string`,enum:[`T0`,`T1`,`T2`,`T3`]},value:{type:`number`},unit:{type:`string`},quote:{type:`string`},detail:{type:`string`},domain:{type:`string`,enum:[...Rn]}},required:[`id`,`label`]}}},required:[`children`]},go=`(none — use only general knowledge; mark EVERY child "T0" with no numbers)`;function _o(e,t,n){let r=e.nodes.filter(e=>e.id!==t.id).map(e=>e.label).join(`; `);return`WORLD: ${e.title}
9
-
10
- BREAK DOWN THIS CAUSE: ${t.label}${t.detail?`\n(context: ${t.detail})`:``}
11
-
12
- ALREADY ON THE WEB as separate causes — never return these as children:
13
- ${r||`(nothing else)`}
14
-
15
- SOURCES:
16
- ${n.text.trim()?n.text.trim().slice(0,6e3):go}
17
-
18
- Give the parts "${t.label}" is made of (${uo} max). Quote SOURCES verbatim for any number; otherwise T0 with no numbers. Reply as compact JSON on one line.`}var vo=new Map;function yo(e,t,n,r){return Mn(`world-expand:${e.title}\0${t}\0${n.text}`,r.provider)}async function bo(e,t,n,r,i,a){let o=await Pn(e);if(o)return o;if(a?.aborted)return null;let s;try{s=(await Ht(i.provider).generate({system:mo,history:[],user:_o(t,n,r),maxTokens:fo,thinkingLevel:`minimal`,format:ho,...a?{signal:a}:{}},i)).raw}catch{return null}if(a?.aborted)return null;let c=Ln(s,n.id,r,!!t.provenance.illustrative);return c.length===0?null:(Nn(e,c),c)}function xo(e,t){for(let n of e){if(n.id===t)return n;let e=n.children===void 0?void 0:xo(n.children,t);if(e)return e}}function So(e,t,n,r,i){let a=xo(e.nodes,t);if(!a||(a.children?.length??0)>0)return Promise.resolve(null);let o=yo(e,t,n,r);return(vo.get(o)??(()=>{let t=bo(o,e,a,n,r,i);for(vo.set(o,t);vo.size>po;){let e=vo.keys().next().value;if(e===void 0||e===o)break;vo.delete(e)}return t.then(e=>{e||vo.delete(o)},()=>vo.delete(o)),t})()).then(n=>n?zn(e,t,n):null)}i();var Co=()=>a(()=>import(`./generateLive-B6purd69.js`),__vite__mapDeps([3,4,5,6,7,8,2,1,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41])),wo=50,To=2;function Eo(e,t){let n=t?.searchMode??(t?.webSearch?`free`:`off`),r=t?.quality??``,i=t?.explainLevel??`standard`,a=+!!t?.generativeBlocks,o=+!!t?.memoryEnabled,s=+!!t?.worldEnabled;return`${e.provider}::${e.model}::${n}::${r}::${i}::${a}::${o}::${s}`}function Do(e){let t=e?.blocks??[];for(let e=t.length-1;e>=0;--e){let n=t[e];if(n.type===`world`&&n.props.world)return n.props.world}}function Oo(e,t,n,r){let i=e.blocks.findIndex(e=>e.id===t&&e.type===`world`);if(i<0)return e;let a=e.blocks[i];if(a.type!==`world`||a.props.world||a.props.title!==n)return e;let o=[...e.blocks];return o[i]={...a,props:{...a.props,world:r}},{...e,blocks:o}}var ko={history:[],spec:null,status:`idle`,turn:0,narration:``,understood:[],busy:!1,activity:null,spot:null,mode:`replace`,replaceEpoch:0,prior:null,tour:[],past:[],frames:[],viewIndex:null,viewOverride:null,error:null,pendingShape:null,reasoning:!1,liveSources:[],restored:!1,phase:`normal`,filled:{},activeBlank:null};function Ao(e,t){return e?.find(e=>!(e.key in t))?.key??null}function jo(e,t){switch(t.type){case`start`:return{...e,status:`thinking`,busy:!0,narration:``,understood:[],activity:null,spot:null,viewIndex:null,viewOverride:null,error:null,pendingShape:null,reasoning:!1,liveSources:[],restored:!1,...t.fresh?{spec:null,prior:null}:{},phase:`normal`,filled:{},activeBlank:null};case`speak`:return{...e,status:`speaking`,narration:t.narration};case`activity`:return{...e,activity:t.activity};case`stream`:return{...e,status:`showing`,spec:t.spec};case`show`:return{...e,status:`showing`,spec:t.spec,narration:t.narration||e.narration,understood:t.understood,history:t.history.slice(-40),turn:e.turn+1,busy:!1,mode:t.mode,prior:t.prior,tour:t.tour,past:t.freshTimeline?[]:t.mode===`replace`&&t.priorSpec?[...e.past,t.priorSpec].slice(-12):e.past,frames:t.freshTimeline?[t.frame]:[...e.frames,t.frame].slice(-40),activity:null,replaceEpoch:t.mode===`replace`&&!t.streamed?e.replaceEpoch+1:e.replaceEpoch,spot:t.spot,viewIndex:null,viewOverride:null,pendingShape:null,reasoning:!1,liveSources:[],phase:t.spec.awaiting&&t.spec.blanks?.length?`awaiting_input`:`normal`,filled:{},activeBlank:t.spec.awaiting&&t.spec.blanks?.length?Ao(t.spec.blanks,{}):null};case`idle`:return{...e,status:`idle`,busy:!1,activity:null,reasoning:!1};case`error`:return{...e,status:`idle`,busy:!1,activity:null,error:t.error,pendingShape:null,reasoning:!1,liveSources:[]};case`spot`:return{...e,spot:t.spot};case`pending`:return{...e,pendingShape:t.pending};case`thinking`:return{...e,reasoning:t.on};case`sources`:return{...e,liveSources:t.sources};case`jump`:return e.frames[t.index]?{...e,viewIndex:t.index,viewOverride:null,spot:null}:e;case`preview`:return{...e,viewOverride:t.spec,viewIndex:null,spot:null};case`restore`:{let n=t.spec.blocks.find(e=>e.id)?.id??null,r={id:We(t.at),question:t.question,narration:``,mode:`replace`,tour:[],spec:t.spec,at:t.at};return{...e,restored:!0,spec:t.spec,status:`showing`,turn:e.turn+1,narration:``,understood:[],busy:!1,activity:null,spot:n,viewIndex:null,viewOverride:null,mode:`replace`,replaceEpoch:e.replaceEpoch+1,tour:[],error:null,frames:[...e.frames,r].slice(-40),prior:{question:t.question,narration:``,title:t.spec.title,blockTypes:t.spec.blocks.map(e=>e.type)},history:[...e.history,{role:`user`,content:t.question},{role:`assistant`,content:t.spec.title}].slice(-40)}}case`world`:{let n=e.spec?Oo(e.spec,t.blockId,t.question,t.world):e.spec,r=e.frames.map(e=>{let n=Oo(e.spec,t.blockId,t.question,t.world);return n===e.spec?e:{...e,spec:n}});return n===e.spec&&r.every((t,n)=>t===e.frames[n])?e:{...e,spec:n,frames:r}}case`fill`:{let n={...e.filled,[t.value.key]:t.value};return{...e,filled:n,activeBlank:Ao(e.spec?.blanks,n)}}case`unfill`:{let n={...e.filled};return delete n[t.key],{...e,filled:n,activeBlank:t.key}}case`setActiveBlank`:return{...e,activeBlank:t.key};case`reset`:return{...ko};default:return e}}function Mo(e){let t=e.frames[e.frames.length-1];return{...ko,history:e.history,frames:e.frames,spec:t.spec,status:`idle`,mode:`replace`,restored:!0,prior:{question:t.question,narration:t.narration,title:t.spec.title,blockTypes:t.spec.blocks.map(e=>e.type)}}}function No(e){let{canRun:t,getConfig:n,getCaps:r,speak:i,cancelSpeak:a,getLibraryEnabled:o}=e,[s,c]=(0,U.useReducer)(jo,e.initial??ko),l=(0,U.useRef)(e);l.current=e;let u=(0,U.useRef)(!1);u.current=s.busy;let d=(0,U.useRef)(s.history);d.current=s.history;let f=(0,U.useRef)(null),p=(0,U.useRef)(null),m=(0,U.useRef)(s.spec);m.current=s.spec;let h=(0,U.useRef)(null),g=(0,U.useRef)([]);g.current=s.frames;let _=(0,U.useRef)(s.prior);_.current=s.prior;let v=(0,U.useRef)(s.filled);v.current=s.filled;let y=(0,U.useRef)(new Map),b=(0,U.useRef)(new Map),x=(0,U.useRef)([]),S=(0,U.useRef)(new Set),C=(0,U.useRef)(s.turn);C.current=s.turn;let w=(0,U.useCallback)(async(e,s,l,h,g,v,w,T)=>{if(t&&!t())return;let E=e.trim();if(!E&&!s?.length||u.current&&!T?.force)return;let D=E||`What can you tell me about the attached file?`,O=v?.trim()||D,k={question:O,retry:D,attachments:s,selectedBlocks:l,inkIntents:g};a?.();let A=T?.freshStart?null:m.current;f.current?.abort(),p.current?.(),p.current=null;let j=new AbortController;f.current=j;for(let e of x.current)e.abort();x.current=[];let M=!!(s?.length||l?.length||h&&Object.keys(h).length||g?.length),N=Eo(n(),r?.()),P=M?null:y.current.get(`${D}::${N}`)??null;y.current.clear(),c({type:`start`,fresh:T?.freshStart});let F=T?.freshStart?[]:d.current,I=T?.freshStart?null:_.current,L=!ze(I,D),R=`${D}::${F.length}::${N}`,z=M?null:b.current.get(R)??null,B,re=!1;if(P??z){let e=P??z;e.narration&&(c({type:`speak`,narration:e.narration}),i?.(e.spoken||e.narration)),B=e}else{let e=``,t=0,a=!1,o=$t(en(D)),u=0,d;try{d=await Co()}catch{if(j.signal.aborted)return;c({type:`error`,error:{kind:`network`,message:`Mavéa couldn't finish loading. Check your connection and try again.`,...k}});return}let{generateLive:f}=d;if(B=await f(D,F,n(),n=>{if(j.signal.aborted)return;e+=n;let r=lt(e);if(!r)return;let{chunk:s,consumed:l}=ut(r.text,t,r.done);s&&(t=l,a=!0,c({type:`speak`,narration:te(ee(r.text.slice(0,l)))}),!(u>=o)&&(u+=s.length,i?.(s)))},{caps:r?.(),signal:j.signal,onActivity:e=>{j.signal.aborted||c({type:`activity`,activity:e})},recentTypes:[...S.current],rotation:C.current,attachments:s,selectedBlocks:l,filledBlanks:h,inkIntents:g,priorTopic:I?.title||void 0,priorWorld:Do(m.current),lesson:T?.lesson,onPartial:L?e=>{j.signal.aborted||(re=!0,ne(e.spec.blocks),c({type:`stream`,spec:e.spec}))}:void 0,onSources:e=>{j.signal.aborted||c({type:`sources`,sources:e})},onPending:L?e=>{j.signal.aborted||c({type:`pending`,pending:e})}:void 0,onThinking:e=>{j.signal.aborted||c({type:`thinking`,on:e})}}),j.signal.aborted)return;if(!a&&B.narration&&(c({type:`speak`,narration:B.narration}),i?.(B.spoken||B.narration)),!B.error&&B.spec.blocks.length>0&&(b.current.set(R,B),b.current.size>wo)){let e=b.current.keys().next().value;e!==void 0&&b.current.delete(e)}}if(B.error){c({type:`error`,error:{...B.error,...k}});return}let ae=l?.length?`${O} (about: ${l.map(ie).join(`, `)})`:O,oe=[...F,{role:`user`,content:ae},{role:`assistant`,content:B.narration||B.spec.title}],se,V,ce;try{let e=qa(I,T?.freshStart?[]:m.current?.blocks??[],O,B,{forceReplace:L});se=e.mode,V=e.frame.spec;let t=e.snap;ce=w?{...e.frame,mind:w}:e.frame,ne(V.blocks),c({type:`show`,spec:V,narration:B.narration,history:oe,mode:se,spot:e.spot,prior:t,tour:ce.tour,priorSpec:A,streamed:re,frame:ce,understood:B.understood??[],freshTimeline:T?.freshStart});for(let e of t.blockTypes)S.current.add(e)}catch{c({type:`error`,error:{kind:`http`,message:`Something went wrong putting that answer together — let's try again.`,...k}});return}if(r?.().memoryEnabled&&on(D))try{let e=String(ce.at),t=O.slice(0,200),n=(V.sources?.length??0)>0,r=B.memory??[];if(r.length)Tn(r.map(r=>({...r,source:ao(r.body,O,{webGrounded:n}),turnId:e,quote:t})));else{let n=eo(O);n.length&&Tn([{concept:`profile`,body:n.join(`. `),source:`user-stated`,turnId:e,quote:t}])}if(B.corrects){let t=oo(B.corrects.now,O);Tn([lo(B.corrects,{turnId:e,source:t})])}}catch{}se===`replace`&&o?.()&&dn(V,O);let le=n(),ue=r?.();if(ue?.quality===`thorough`){let e=V.suggests??[],t=[...S.current],n=Eo(le,ue);e.slice(0,To).forEach((e,r)=>{let i=new AbortController;x.current.push(i),Co().then(({generateLive:n})=>n(e.label,oe,le,void 0,{caps:ue,signal:i.signal,repair:!1,recentTypes:t,rotation:C.current+1+r})).then(t=>{!i.signal.aborted&&!t.error&&y.current.set(`${e.label}::${n}`,t)}).catch(()=>{})})}},[t,n,r,i,a,o]),T=(0,U.useCallback)(()=>{f.current?.abort(),f.current=null,p.current?.(),p.current=null;for(let e of x.current)e.abort();x.current=[],y.current.clear(),b.current.clear(),S.current.clear(),c({type:`reset`})},[]),E=(0,U.useCallback)(e=>c({type:`spot`,spot:e}),[]),D=(0,U.useCallback)(e=>c({type:`jump`,index:e}),[]),O=(0,U.useCallback)(e=>{e&&ne(e.blocks),c({type:`preview`,spec:e})},[]),k=(0,U.useCallback)(e=>{let t=h.current?.blocks.find(t=>t.id===e);if(t)return t;let n=m.current?.blocks.find(t=>t.id===e);if(n)return n;for(let t of g.current){let n=t.spec.blocks.find(t=>t.id===e);if(n)return n}},[]),A=(0,U.useCallback)(async e=>{let{canRun:t,getConfig:n}=l.current;if(t&&!t())return null;let r=k(e);if(r?.type!==`world`)return null;if(r.props.world)return r.props.world;let i=r.props.title;try{let t=await Qt(i,await tn(i),n());return t&&c({type:`world`,blockId:e,question:i,world:t}),t}catch{return null}},[k]),j=(0,U.useCallback)(async(e,t,n)=>{let{canRun:r,getConfig:i}=l.current;if(r&&!r())return null;let a=k(e);if(a?.type!==`world`)return null;let o=n??a.props.world;if(!o)return null;try{return await So(o,t,await tn(o.title),i())}catch{return null}},[k]),M=(0,U.useCallback)(e=>c({type:`fill`,value:e}),[]),N=(0,U.useCallback)(e=>c({type:`unfill`,key:e}),[]),P=(0,U.useCallback)(e=>c({type:`setActiveBlank`,key:e}),[]),F=(0,U.useCallback)(()=>{let e=m.current,t=v.current;return!e||!Object.keys(t).length||u.current?!1:(w(`Complete the answer you started above using the values I just filled into the blanks — keep everything you already showed and fill in only the parts that depended on those values. Do not start over.`,void 0,e.blocks,t),!0)},[w]),I=(0,U.useCallback)((e,t)=>{a?.(),ne(e.blocks),c({type:`restore`,spec:e,question:t,at:Date.now()})},[a]),L=(0,U.useCallback)((e,t,n)=>{let r=n?.silent===!0;ne(e.spec.blocks),n?.interrupt!==!1&&a?.();let o=Ce();c({type:`start`,fresh:!1}),r||c({type:`speak`,narration:e.narration});let s=r?void 0:i?.(e.spoken??e.narration),l=[...d.current,{role:`user`,content:t},{role:`assistant`,content:e.narration||e.spec.title}],u={question:t,narration:e.narration,title:e.spec.title,blockTypes:e.spec.blocks.map(e=>e.type)},f=m.current,h=e.spec.blocks.find(e=>e.id)?.id??null;p.current?.();let g=!1;p.current=()=>{g=!0};let _=()=>{g||(p.current=null,c({type:`show`,spec:e.spec,narration:e.narration,understood:[],history:l,mode:e.mode,prior:u,tour:r?[]:e.tour,spot:h,frame:e,priorSpec:f,streamed:!1,freshTimeline:!1}))};n?.revealNow||r?_():o?window.setTimeout(_,480):Ke(s?s.started:Promise.resolve(!1),Ye).then(_)},[a,i]),R=s.viewOverride?s.viewOverride:s.viewIndex==null?s.spec:s.frames[s.viewIndex]?.spec??s.spec;return h.current=R,(0,U.useEffect)(()=>()=>{f.current?.abort(),p.current?.();for(let e of x.current)e.abort()},[]),{...s,run:w,reset:T,setSpot:E,restore:I,jumpTo:D,previewSpec:O,fill:M,unfill:N,generateWorld:A,expandWorld:j,setActiveBlank:P,complete:F,showFrame:L,viewSpec:R}}function Po(e){return e<12?`Good morning`:e<18?`Good afternoon`:`Good evening`}function Fo(e){return`${Po(e)}. What can I help you explore?`}var Io=`mavea-live-setup-v1`;function Lo(){try{return localStorage.getItem(Io)===`1`}catch{return!1}}function Ro(){try{localStorage.setItem(Io,`1`)}catch{}}function zo(){try{localStorage.removeItem(Io)}catch{}}var Bo=[{id:`connect`,label:`Connect`,title:`Hi. Which mind should I think with?`,sub:`Your key, your model. Stored here only if you choose, then sent through this deployment.`},{id:`think`,label:`Think`,title:`How thorough should I be?`,sub:`All of this is optional, the defaults are good.`},{id:`remember`,label:`Remember`,title:`Should I remember you, and how should I sound?`,sub:`Memory lives on this device. You can hear me first.`},{id:`go`,label:`Go`,title:`What are we figuring out?`,sub:`Talk like you would to a friend, switch topics whenever you want.`}],Vo=`I’m awake.`,Ho=`Set and ready, start talking, or try one of these.`,Uo=Bo.map(e=>e.id);function Wo(e){let t=Uo.indexOf(e);return t>=0&&t<Uo.length-1?Uo[t+1]:null}function Go(e){return Bo.find(t=>t.id===e)??Bo[0]}function Ko(e){let t=(0,J.c)(17),{current:n,done:r,onPick:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],t[0]=a):a=t[0];let o=(0,U.useRef)(a),s,c,l,u,d;if(t[1]!==n||t[2]!==r||t[3]!==i){let e=e=>t=>{if(t.key!==`ArrowRight`&&t.key!==`ArrowLeft`)return;t.preventDefault();let n=(e+(t.key===`ArrowRight`?1:-1)+Bo.length)%Bo.length;o.current[n]?.focus(),i(Bo[n].id)};u=`constellation`,d=`Setup steps`,s=`const-track`,c=`tablist`,l=Bo.map((t,a)=>{let s=t.id===n,c=r.has(t.id)&&!s;return(0,W.jsxs)(`li`,{className:`const-step `+(s?`is-current`:c?`is-done`:`is-future`),children:[(0,W.jsx)(`button`,{ref:e=>{o.current[a]=e},type:`button`,role:`tab`,"aria-selected":s,"aria-current":s?`step`:void 0,"aria-label":`${t.label}${c?`, done`:``}`,tabIndex:s?0:-1,className:`const-disc`,onClick:()=>i(t.id),onKeyDown:e(a),children:c?(0,W.jsx)(z.check,{}):s?null:(0,W.jsx)(`span`,{className:`const-num`,"aria-hidden":!0,children:a+1})}),(0,W.jsx)(`span`,{className:`const-label`,children:t.label})]},t.id)}),t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d}else s=t[4],c=t[5],l=t[6],u=t[7],d=t[8];let f;t[9]!==s||t[10]!==c||t[11]!==l?(f=(0,W.jsx)(`ol`,{className:s,role:c,children:l}),t[9]=s,t[10]=c,t[11]=l,t[12]=f):f=t[12];let p;return t[13]!==u||t[14]!==d||t[15]!==f?(p=(0,W.jsx)(`nav`,{className:u,"aria-label":d,children:f}),t[13]=u,t[14]=d,t[15]=f,t[16]=p):p=t[16],p}function qo(e){let t=(0,J.c)(16),{label:n,on:r,onToggle:i,note:a}=e,o;t[0]===n?o=t[1]:(o=(0,W.jsx)(`span`,{className:`toggle-label`,children:n}),t[0]=n,t[1]=o);let s;t[2]===a?s=t[3]:(s=(0,W.jsx)(`span`,{className:`toggle-note`,children:a}),t[2]=a,t[3]=s);let c;t[4]!==o||t[5]!==s?(c=(0,W.jsxs)(`div`,{className:`toggle-text`,children:[o,s]}),t[4]=o,t[5]=s,t[6]=c):c=t[6];let l=`toggle-pill`+(r?` is-on`:``),u;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,W.jsx)(`span`,{className:`toggle-knob`}),t[7]=u):u=t[7];let d;t[8]!==n||t[9]!==r||t[10]!==i||t[11]!==l?(d=(0,W.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":r,"aria-label":n,onClick:i,className:l,children:u}),t[8]=n,t[9]=r,t[10]=i,t[11]=l,t[12]=d):d=t[12];let f;return t[13]!==c||t[14]!==d?(f=(0,W.jsxs)(`div`,{className:`toggle-row`,children:[c,d]}),t[13]=c,t[14]=d,t[15]=f):f=t[15],f}function Jo(e){let t=(0,J.c)(10),{value:n,options:r,onPick:i,ariaLabel:a}=e,o;if(t[0]!==i||t[1]!==r||t[2]!==n){let e;t[4]!==i||t[5]!==n?(e=e=>{let t=e.value===n;return(0,W.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,onClick:()=>i(e.value),className:`seg-opt`+(t?` is-active`:``),children:[(0,W.jsx)(`span`,{className:`seg-title`,children:e.label}),e.sub&&(0,W.jsx)(`span`,{className:`seg-sub`,children:e.sub})]},e.value)},t[4]=i,t[5]=n,t[6]=e):e=t[6],o=r.map(e),t[0]=i,t[1]=r,t[2]=n,t[3]=o}else o=t[3];let s;return t[7]!==a||t[8]!==o?(s=(0,W.jsx)(`div`,{className:`seg`,role:`radiogroup`,"aria-label":a,children:o}),t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function Yo(e){let t=(0,J.c)(20),{id:n,value:r,onChange:i,placeholder:a,ariaLabel:o}=e,[s,c]=(0,U.useState)(!1),l=(0,U.useId)(),u=n??l,d=s?`text`:`password`,f;t[0]===i?f=t[1]:(f=e=>i(e.target.value),t[0]=i,t[1]=f);let p;t[2]!==o||t[3]!==a||t[4]!==u||t[5]!==d||t[6]!==f||t[7]!==r?(p=(0,W.jsx)(`input`,{id:u,className:`setup-input`,type:d,value:r,onChange:f,placeholder:a,spellCheck:!1,autoComplete:`new-password`,"aria-label":o}),t[2]=o,t[3]=a,t[4]=u,t[5]=d,t[6]=f,t[7]=r,t[8]=p):p=t[8];let m;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>c(Xo),t[9]=m):m=t[9];let h=s?`Hide key`:`Show key`,g=s?`Hide key`:`Show key`,_;t[10]===s?_=t[11]:(_=s?(0,W.jsx)(z.eyeOff,{}):(0,W.jsx)(z.eye,{}),t[10]=s,t[11]=_);let v;t[12]!==s||t[13]!==h||t[14]!==g||t[15]!==_?(v=(0,W.jsx)(`button`,{type:`button`,className:`input-eye`,onClick:m,"aria-label":h,"aria-pressed":s,title:g,children:_}),t[12]=s,t[13]=h,t[14]=g,t[15]=_,t[16]=v):v=t[16];let y;return t[17]!==p||t[18]!==v?(y=(0,W.jsxs)(`div`,{className:`input-wrap`,children:[p,v]}),t[17]=p,t[18]=v,t[19]=y):y=t[19],y}function Xo(e){return!e}var Zo={gemini:{badge:`G`,name:`Gemini`,sub:`Google`},anthropic:{badge:`A`,name:`Claude`,sub:`Anthropic`},openai:{badge:`O`,name:`GPT`,sub:`OpenAI`},grok:{badge:`X`,name:`Grok`,sub:`xAI`},openrouter:{badge:`R`,name:`OpenRouter`,sub:`Many models`}},Qo={native:`Real-time web search built in (grounds server-side when a question needs it).`,app:`Web grounding via Wikipedia, or your own Brave/Tavily search key.`,local:`Web grounding via Wikipedia when you ask for it.`},$o={anthropic:`sk-ant-…`,openai:`sk-…`,gemini:`AIza…`,grok:`xai-…`,openrouter:`sk-or-…`};function es(e){return e.split(` · `)[1]??e}function ts(){let e=(0,J.c)(52),t=(0,U.useId)(),[n]=Xt(),r=ht(n.provider),i=n.models[n.provider]??``,a=i||r.defaultModel,o=n.keys[n.provider]??``,[s,c]=(0,U.useState)(null),[l,u]=(0,U.useState)(!1),d=(0,U.useRef)(0),f;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=async()=>{let e=d.current+=1;u(!0);let t=await Kn(Gt(Kt()),{tts:!1});e===d.current&&(c({llm:t.llm,model:t.model,statusCode:t.statusCode}),u(!1))},e[0]=f):f=e[0];let p=f;(0,U.useEffect)(()=>{if(r.needsKey&&!o){c(null);return}let e=setTimeout(()=>void p(),400);return()=>clearTimeout(e)},[n.provider,a,o,p,r.needsKey]);let m=!!s?.llm&&!!s?.model&&!!a,h=l?`checking`:m?`ok`:`warn`,g=l?`Checking…`:r.needsKey&&!o?`Add your API key.`:a?m?`Looks good.`:s?.llm?`Reachable, but the model was not found.`:s?.statusCode===401?`Invalid API key.`:s?.statusCode===403?`Key lacks permission.`:s?.statusCode===404?`Model not found.`:s?.statusCode===void 0?`Not reachable.`:`Error ${s.statusCode}.`:`Choose a model.`,_=m?`Kept in memory unless you choose Remember; sent through this deployment to ${es(r.label)} when used.`:``,v;e[1]===n.provider?v=e[2]:(v=gt.map(e=>{let t=Zo[e.id],r=e.id===n.provider;return(0,W.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,className:`provider-tile`+(r?` is-selected`:``),onClick:()=>qt({provider:e.id}),children:[(0,W.jsx)(`span`,{className:`provider-badge`,children:t.badge}),(0,W.jsx)(`span`,{className:`provider-name`,children:t.name}),(0,W.jsx)(`span`,{className:`provider-sub`,children:t.sub})]},e.id)}),e[1]=n.provider,e[2]=v);let y;e[3]===v?y=e[4]:(y=(0,W.jsx)(`div`,{className:`provider-tiles`,role:`radiogroup`,"aria-label":`Provider`,children:v}),e[3]=v,e[4]=y);let b;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,W.jsx)(`p`,{className:`field-helper`,children:`When a default model is offered, start there for faster, lower-cost use and move up only when a task needs it. Requests pass through this deployment to the provider, whose usage charges, privacy, and retention terms apply.`}),e[5]=b):b=e[5];let x;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,W.jsx)(`span`,{className:`field-head`,children:(0,W.jsx)(`span`,{className:`card-eyebrow`,children:`Model`})}),e[6]=x):x=e[6];let S;e[7]===n.provider?S=e[8]:(S=e=>Yt(n.provider,`model`,e),e[7]=n.provider,e[8]=S);let C;e[9]!==n.provider||e[10]!==i||e[11]!==S?(C=(0,W.jsx)(xn,{provider:n.provider,value:i,onChange:S},n.provider),e[9]=n.provider,e[10]=i,e[11]=S,e[12]=C):C=e[12];let w;e[13]!==r.modelNotes||e[14]!==a?(w=r.modelNotes?.[a]&&(0,W.jsx)(`span`,{className:`field-helper`,children:r.modelNotes[a]}),e[13]=r.modelNotes,e[14]=a,e[15]=w):w=e[15];let T=Qo[r.search],E;e[16]===T?E=e[17]:(E=(0,W.jsx)(`span`,{className:`field-helper`,children:T}),e[16]=T,e[17]=E);let D;e[18]!==C||e[19]!==w||e[20]!==E?(D=(0,W.jsxs)(`div`,{className:`field-col`,children:[x,C,w,E]}),e[18]=C,e[19]=w,e[20]=E,e[21]=D):D=e[21];let O;e[22]!==n.provider||e[23]!==r.keyUrl||e[24]!==r.needsKey||e[25]!==o||e[26]!==t?(O=r.needsKey&&(0,W.jsxs)(`label`,{className:`field-col`,htmlFor:t,children:[(0,W.jsx)(`span`,{className:`field-head`,children:(0,W.jsx)(`span`,{className:`card-eyebrow`,children:`API key`})}),(0,W.jsx)(Yo,{id:t,value:o,onChange:e=>Yt(n.provider,`key`,e),placeholder:$o[n.provider]??`paste your key`,ariaLabel:`API key`}),r.keyUrl&&(0,W.jsx)(`a`,{className:`field-helper field-helper-link`,href:r.keyUrl,target:`_blank`,rel:`noreferrer noopener`,children:`Get a key↗`}),(0,W.jsx)(`span`,{className:`field-helper`,children:`Tip: use a restricted, spend-capped key — if it's ever exposed, the cost and access stay bounded.`})]}),e[22]=n.provider,e[23]=r.keyUrl,e[24]=r.needsKey,e[25]=o,e[26]=t,e[27]=O):O=e[27];let k;e[28]!==D||e[29]!==O?(k=(0,W.jsxs)(`div`,{className:`field-grid`,children:[D,O]}),e[28]=D,e[29]=O,e[30]=k):k=e[30];let A=`status-strip `+h,j;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,W.jsx)(`span`,{className:`status-strip-dot`,"aria-hidden":!0}),e[31]=j):j=e[31];let M;e[32]===g?M=e[33]:(M=(0,W.jsx)(`strong`,{children:g}),e[32]=g,e[33]=M);let N=_&&` `+_,P;e[34]!==M||e[35]!==N?(P=(0,W.jsxs)(`span`,{className:`status-strip-text`,children:[M,N]}),e[34]=M,e[35]=N,e[36]=P):P=e[36];let F;e[37]===p?F=e[38]:(F=(0,W.jsx)(`button`,{type:`button`,className:`status-strip-test`,onClick:()=>void p(),title:`Re-check the connection`,children:`Test`}),e[37]=p,e[38]=F);let I;e[39]!==A||e[40]!==P||e[41]!==F?(I=(0,W.jsxs)(`div`,{className:A,children:[j,P,F]}),e[39]=A,e[40]=P,e[41]=F,e[42]=I):I=e[42];let L;e[43]!==n.rememberKey||e[44]!==r.needsKey?(L=r.needsKey&&(0,W.jsx)(qo,{label:`Remember this key on this device`,on:n.rememberKey,onToggle:()=>qt({rememberKey:!n.rememberKey}),note:n.rememberKey?`Saved encrypted in this browser; use only on a trusted device.`:`Kept in memory only, cleared when you reload.`}),e[43]=n.rememberKey,e[44]=r.needsKey,e[45]=L):L=e[45];let R;e[46]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,W.jsx)(gn,{}),e[46]=R):R=e[46];let z;return e[47]!==k||e[48]!==I||e[49]!==y||e[50]!==L?(z=(0,W.jsxs)(`div`,{className:`step-body`,children:[y,b,k,I,L,R]}),e[47]=k,e[48]=I,e[49]=y,e[50]=L,e[51]=z):z=e[51],z}function ns(){let e=(0,J.c)(19),[t]=Xt(),n=Ht(t.provider).capabilities,r=t.searchMode===`off`?`Answers from the model's own knowledge — no web calls.`:n.nativeWebSearch?`Grounds fresh asks in live web results with citations, only when a question needs it.`:`This model has no built-in search, so Real-time won't ground anything right now. Works only if your model supports it — pick one that does (Gemini or OpenRouter), or leave this off.`,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,W.jsx)(`span`,{className:`card-eyebrow`,children:`Web search`}),e[0]=i):i=e[0];let a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=[{value:`off`,label:`Off`,sub:`model knowledge`},{value:`realtime`,label:`Real-time`,sub:`live sources`}],e[1]=a):a=e[1];let o;e[2]===t.searchMode?o=e[3]:(o=(0,W.jsx)(Jo,{ariaLabel:`Web search`,value:t.searchMode,onPick:is,options:a}),e[2]=t.searchMode,e[3]=o);let s;e[4]===r?s=e[5]:(s=(0,W.jsx)(`p`,{className:`field-helper`,children:r}),e[4]=r,e[5]=s);let c;e[6]!==o||e[7]!==s?(c=(0,W.jsxs)(`div`,{className:`field-block`,children:[i,o,s]}),e[6]=o,e[7]=s,e[8]=c):c=e[8];let l;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,W.jsx)(`span`,{className:`card-eyebrow`,children:`Answer quality`}),e[9]=l):l=e[9];let u;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=[{value:`fast`,label:`Fast`,sub:`quickest`},{value:`balanced`,label:`Balanced`,sub:`default`},{value:`thorough`,label:`Thorough`,sub:`thinks more`}],e[10]=u):u=e[10];let d;e[11]===t.quality?d=e[12]:(d=(0,W.jsx)(Jo,{ariaLabel:`Answer quality`,value:t.quality,onPick:rs,options:u}),e[11]=t.quality,e[12]=d);let f;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,W.jsx)(`p`,{className:`field-helper`,children:`Fast keeps replies snappy; Thorough lets the model think more on hard questions.`}),e[13]=f):f=e[13];let p;e[14]===d?p=e[15]:(p=(0,W.jsxs)(`div`,{className:`field-block`,children:[l,d,f]}),e[14]=d,e[15]=p);let m;return e[16]!==c||e[17]!==p?(m=(0,W.jsxs)(`div`,{className:`step-body`,children:[c,p]}),e[16]=c,e[17]=p,e[18]=m):m=e[18],m}function rs(e){return qt({quality:e})}function is(e){return qt({searchMode:e})}function as(e,t){try{return localStorage.getItem(e)||t}catch{return t}}function os(e){let t=De(e);if(t){je(`mavea`,t.kokoro);try{localStorage.setItem(Ae,e)}catch{}}}function ss(e){let t=(0,J.c)(20),{label:n,value:r,onChange:i}=e,a;t[0]===n?a=t[1]:(a=(0,W.jsx)(`span`,{className:`card-eyebrow`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=e=>{i(e),os(e);let t=De(e);t&&vn(t)},t[2]=i,t[3]=o);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=Ne.map(cs),t[4]=s):s=t[4];let c;t[5]!==n||t[6]!==o||t[7]!==r?(c=(0,W.jsx)(qn,{ariaLabel:n,value:r,onChange:o,options:s}),t[5]=n,t[6]=o,t[7]=r,t[8]=c):c=t[8];let l;t[9]===r?l=t[10]:(l=()=>{let e=De(r);e&&vn(e)},t[9]=r,t[10]=l);let u;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,W.jsx)(z.play,{}),t[11]=u):u=t[11];let d;t[12]===l?d=t[13]:(d=(0,W.jsx)(`button`,{type:`button`,className:`voice-play`,onClick:l,"aria-label":`Preview Mavéa's voice`,title:`Preview voice`,children:u}),t[12]=l,t[13]=d);let f;t[14]!==c||t[15]!==d?(f=(0,W.jsxs)(`div`,{className:`voice-row`,children:[c,d]}),t[14]=c,t[15]=d,t[16]=f):f=t[16];let p;return t[17]!==a||t[18]!==f?(p=(0,W.jsxs)(`div`,{className:`voice-col`,children:[a,f]}),t[17]=a,t[18]=f,t[19]=p):p=t[19],p}function cs(e){return{value:e.id,label:e.label,note:e.tone}}function ls(){let e=(0,J.c)(16),[t]=Xt(),n=hn(),[r,i]=(0,U.useState)(fs),a;e[0]===t.memoryEnabled?a=e[1]:(a=()=>qt({memoryEnabled:!t.memoryEnabled}),e[0]=t.memoryEnabled,e[1]=a);let o;e[2]!==t.memoryEnabled||e[3]!==a?(o=(0,W.jsx)(qo,{label:`Remember me`,on:t.memoryEnabled,onToggle:a,note:`Durable facts about you, kept on this device only, to personalize future chats.`}),e[2]=t.memoryEnabled,e[3]=a,e[4]=o):o=e[4];let s;e[5]!==t.memoryEnabled||e[6]!==n?(s=t.memoryEnabled&&(0,W.jsxs)(`div`,{className:`memory-panel`,children:[(0,W.jsxs)(`div`,{className:`memory-head`,children:[(0,W.jsxs)(`span`,{className:`card-eyebrow`,children:[`What Mavéa remembers (`,n.length,` `,n.length===1?`concept`:`concepts`,`)`]}),n.length>0&&(0,W.jsx)(`button`,{type:`button`,className:`ghost-btn`,onClick:ds,children:`Forget all`})]}),n.length===0?(0,W.jsx)(`p`,{className:`memory-empty`,children:`Nothing yet — Mavéa will note useful facts as you talk.`}):(0,W.jsx)(`ul`,{className:`memory-list`,children:n.map(us)})]}),e[5]=t.memoryEnabled,e[6]=n,e[7]=s):s=e[7];let c;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,W.jsx)(`hr`,{className:`setup-divider`}),e[8]=c):c=e[8];let l;e[9]===r?l=e[10]:(l=(0,W.jsx)(`div`,{className:`voice-grid`,children:(0,W.jsx)(ss,{label:`Mavéa speaks as`,value:r,onChange:i})}),e[9]=r,e[10]=l);let u;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,W.jsx)(Sn,{}),e[11]=u):u=e[11];let d;return e[12]!==o||e[13]!==s||e[14]!==l?(d=(0,W.jsxs)(`div`,{className:`step-body`,children:[o,s,c,l,u]}),e[12]=o,e[13]=s,e[14]=l,e[15]=d):d=e[15],d}function us(e){return(0,W.jsxs)(`li`,{className:`memory-fact`,children:[(0,W.jsx)(`span`,{className:`memory-fact-concept`,children:e.concept}),(0,W.jsx)(`span`,{className:`memory-fact-text`,children:e.body}),(0,W.jsx)(`button`,{type:`button`,className:`memory-x`,onClick:()=>On(e.id),"aria-label":`Forget: ${e.concept}`,title:`Forget this`,children:(0,W.jsx)(z.x,{})})]},e.id)}function ds(){return Dn()}function fs(){return as(Ae,Ee)}var ps=[{kicker:`Build`,accent:`var(--presence)`,prompt:`Build me a budget for a $5,000 month`},{kicker:`Decide`,accent:`var(--insight)`,prompt:`Should I take the train or fly to Boston?`},{kicker:`Understand`,accent:`var(--warning)`,prompt:`How does refinancing actually work?`},{kicker:`Plan`,accent:`var(--danger)`,prompt:`Three days in Tokyo, food first`}];function ms({onStart:e}){return(0,W.jsx)(`div`,{className:`starter-grid`,role:`list`,children:ps.map(t=>(0,W.jsxs)(`button`,{type:`button`,className:`starter-chip`,style:{"--starter-accent":t.accent},onClick:()=>e(t.prompt),children:[(0,W.jsxs)(`span`,{className:`starter-kicker`,children:[(0,W.jsx)(`span`,{"aria-hidden":!0,children:`✦`}),` `,t.kicker]}),(0,W.jsx)(`span`,{className:`starter-copy`,children:t.prompt})]},t.kicker))})}function hs(e,t){try{return localStorage.getItem(e)||t}catch{return t}}function gs(e,t){return De(hs(e,t))?.label??`Voice`}var _s={fast:`Fast — snappy & cheap`,balanced:`Balanced — the default`,thorough:`Thorough — deeper thinking`};function vs(e){let t=(0,J.c)(54),{onJump:n,onStart:r,onStartTalking:i,onStartOver:a,onSeeHow:o,studySlot:s,librarySlot:c}=e,[l]=Xt(),u=hn(),d=mn(),f,p;if(t[0]!==l.models||t[1]!==l.provider){let e=ht(l.provider);f=l.models[l.provider]||e.defaultModel,p=e.label.split(` · `)[1]??(e.needsKey?e.label:`Local`),t[0]=l.models,t[1]=l.provider,t[2]=f,t[3]=p}else f=t[2],p=t[3];let m=p,h;t[4]===l?h=t[5]:(h=Jt(l),t[4]=l,t[5]=h);let g=h,_=l.searchMode===`off`?`Off`:`Real-time`,v=l.memoryEnabled?`${u.length} ${u.length===1?`concept`:`concepts`} · this device only`:`Off`,y=`${f} · ${m}`,b;t[6]===y?b=t[7]:(b={key:`model`,label:`Model`,value:y,step:`connect`},t[6]=y,t[7]=b);let x;t[8]===_?x=t[9]:(x={key:`search`,label:`Web search`,value:_,step:`think`},t[8]=_,t[9]=x);let S=_s[l.quality]??l.quality,C;t[10]===S?C=t[11]:(C={key:`quality`,label:`Quality`,value:S,step:`think`},t[10]=S,t[11]=C);let w;t[12]===v?w=t[13]:(w={key:`memory`,label:`Memory`,value:v,step:`remember`},t[12]=v,t[13]=w);let T;t[14]===d?T=t[15]:(T=d===!1?`Off — captions only (voice needs the local TTS service)`:gs(Ae,Ee),t[14]=d,t[15]=T);let E;t[16]===T?E=t[17]:(E={key:`voice`,label:`Voice`,value:T,step:`remember`},t[16]=T,t[17]=E);let D;t[18]!==E||t[19]!==b||t[20]!==x||t[21]!==C||t[22]!==w?(D=[b,x,C,w,E],t[18]=E,t[19]=b,t[20]=x,t[21]=C,t[22]=w,t[23]=D):D=t[23];let O=D,k;t[24]!==n||t[25]!==O?(k=(0,W.jsx)(`ul`,{className:`checklist`,children:O.map(e=>(0,W.jsx)(`li`,{children:(0,W.jsxs)(`button`,{type:`button`,className:`check-row`,onClick:()=>n(e.step),children:[(0,W.jsx)(`span`,{className:`check-mark`,"aria-hidden":!0,children:(0,W.jsx)(z.check,{})}),(0,W.jsx)(`span`,{className:`check-label`,children:e.label}),(0,W.jsx)(`span`,{className:`check-value`,children:e.value})]})},e.key))}),t[24]=n,t[25]=O,t[26]=k):k=t[26];let A;t[27]!==g||t[28]!==n||t[29]!==i?(A=g?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Ue,{kind:`voice-data`,from:`live`,className:`go-voice-notice`}),(0,W.jsxs)(`button`,{type:`button`,className:`go-start`,onClick:i,children:[(0,W.jsx)(z.mic,{}),` Start talking`]})]}):(0,W.jsxs)(`button`,{type:`button`,className:`go-start go-start--gated`,onClick:()=>n(`connect`),title:`Add a model and a key on the Connect step first`,children:[(0,W.jsx)(z.mic,{}),` Connect a model to start`]}),t[27]=g,t[28]=n,t[29]=i,t[30]=A):A=t[30];let j;t[31]===a?j=t[32]:(j=(0,W.jsx)(`div`,{className:`go-ghosts`,children:(0,W.jsx)(`button`,{type:`button`,className:`ghost-btn`,onClick:a,children:`Start over`})}),t[31]=a,t[32]=j);let M;t[33]!==k||t[34]!==A||t[35]!==j?(M=(0,W.jsxs)(`div`,{className:`go-left`,children:[k,A,j]}),t[33]=k,t[34]=A,t[35]=j,t[36]=M):M=t[36];let N;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,W.jsx)(`span`,{className:`card-eyebrow`,children:`Or start with one`}),t[37]=N):N=t[37];let P;t[38]===o?P=t[39]:(P=o&&(0,W.jsx)(`button`,{type:`button`,className:`link-btn`,onClick:o,children:`See how it works`}),t[38]=o,t[39]=P);let F;t[40]===P?F=t[41]:(F=(0,W.jsxs)(`div`,{className:`try-head`,children:[N,P]}),t[40]=P,t[41]=F);let I;t[42]===r?I=t[43]:(I=(0,W.jsx)(ms,{onStart:r}),t[42]=r,t[43]=I);let L;t[44]!==F||t[45]!==I?(L=(0,W.jsxs)(`div`,{className:`go-right`,children:[F,I]}),t[44]=F,t[45]=I,t[46]=L):L=t[46];let R;t[47]===c?R=t[48]:(R=c&&(0,W.jsx)(`div`,{className:`go-library`,children:c}),t[47]=c,t[48]=R);let ee;return t[49]!==s||t[50]!==M||t[51]!==L||t[52]!==R?(ee=(0,W.jsxs)(`div`,{className:`step-body go-grid`,children:[M,L,s,R]}),t[49]=s,t[50]=M,t[51]=L,t[52]=R,t[53]=ee):ee=t[53],ee}function ys({speak:e,goDemo:t,onStart:n,onStartTalking:r,onSeeHow:i,studySlot:a,librarySlot:o,seed:s}){let c=(0,U.useRef)(!Lo()),l=(0,U.useRef)(!1),[u,d]=(0,U.useState)(c.current?`connect`:`go`),[f,p]=(0,U.useState)(!1),[m,h]=(0,U.useState)(``),g=(0,U.useRef)(s??``),[_,v]=(0,U.useState)(!c.current),y=!c.current||_;(0,U.useEffect)(()=>{if(u!==`go`)return;v(!0),c.current&&Ro();let t=g.current;if(t){g.current=``,n(t);return}l.current||(l.current=!0,e(c.current?`I’m awake.`:Fo(new Date().getHours())))},[u,e,n]),(0,U.useEffect)(()=>{let e=document.documentElement;return e.dataset.wizardStep=u,()=>{delete e.dataset.wizardStep}},[u]);let b=(0,U.useRef)(null);(0,U.useEffect)(()=>{let e=b.current;if(!e)return;let t=document.documentElement,n=0,r=()=>{n=0,t.style.setProperty(`--wiz-scroll`,String(Math.min(1,e.scrollTop/130)))},i=()=>{n||=requestAnimationFrame(r)};return e.addEventListener(`scroll`,i,{passive:!0}),r(),()=>{e.removeEventListener(`scroll`,i),n&&cancelAnimationFrame(n),t.style.removeProperty(`--wiz-scroll`)}},[u]);let x=e=>{p(y&&e!==`go`),d(e),e!==`go`&&h(``)},S=()=>{x(f?`go`:Wo(u)??`go`)},C=()=>{(typeof window>`u`||window.confirm(`Start over? This clears your saved setup and replays the intro.`))&&(Ut(),zo(),xt(),c.current=!0,l.current=!1,v(!1),p(!1),d(`connect`))},w=Bo.findIndex(e=>e.id===u),T=new Set(Bo.filter((e,t)=>y?e.id!==u:t<w).map(e=>e.id)),E=Go(u),D=u===`go`,O=D&&c.current?Vo:E.title,k=D&&c.current?Ho:E.sub;return(0,W.jsxs)(`div`,{className:`setup stage`,"data-active":`1`,children:[(0,W.jsxs)(`header`,{className:`setup-nav`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`setup-back`,onClick:t,children:[(0,W.jsx)(`span`,{"aria-hidden":!0,children:`←`}),` Back to the demo`]}),(0,W.jsx)(Ko,{current:u,done:T,onPick:x}),(0,W.jsx)(Gn,{triggerClassName:`setup-icon-btn`})]}),(0,W.jsxs)(`div`,{className:`setup-stage`,ref:b,children:[(0,W.jsxs)(`div`,{className:`setup-head`,children:[(0,W.jsx)(`h1`,{className:`setup-q`,children:O}),(0,W.jsx)(`p`,{className:`setup-sub`,children:k})]}),(0,W.jsxs)(`section`,{className:`card reveal setup-card`+(D?` setup-card--wide`:``),"aria-label":E.label,children:[u===`connect`&&(0,W.jsx)(ts,{}),u===`think`&&(0,W.jsx)(ns,{}),u===`remember`&&(0,W.jsx)(ls,{}),D&&(0,W.jsx)(vs,{onJump:x,onStart:n,onStartTalking:r,onStartOver:C,onSeeHow:i,studySlot:a,librarySlot:o}),!D&&(0,W.jsxs)(`footer`,{className:`setup-foot`,children:[(0,W.jsx)(`span`,{className:`setup-foot-note`,children:`Changes save as you make them.`}),(0,W.jsxs)(`button`,{type:`button`,className:`setup-done`,onClick:S,children:[`Done `,(0,W.jsx)(z.check,{})]})]})]},u)]}),D&&(0,W.jsx)(`div`,{className:`go-composer`,children:(0,W.jsxs)(`div`,{className:`go-composer-inner`,children:[(0,W.jsx)(`input`,{className:`go-composer-input`,type:`text`,placeholder:`Say it or type it. Try ‘plan a trip’ or ‘compare two options’…`,value:m,autoComplete:`off`,spellCheck:!1,onChange:e=>h(e.target.value),onKeyDown:e=>{e.key===`Enter`&&m.trim()&&n(m.trim())}}),m.trim()?(0,W.jsx)(`button`,{type:`button`,className:`go-composer-send`,"aria-label":`Send`,onClick:()=>n(m.trim()),children:(0,W.jsx)(z.send,{})}):(0,W.jsx)(`button`,{type:`button`,className:`go-composer-mic`,"aria-label":`Use microphone`,onClick:r,children:(0,W.jsx)(z.mic,{})})]})})]})}function bs({mode:e,onChange:t,pttKey:n,pttSide:r}){let[i,a]=(0,U.useState)(!1),o=(0,U.useRef)(null),s=(0,U.useRef)(null),c=(0,U.useCallback)(()=>{a(!1),s.current?.focus()},[]);(0,U.useEffect)(()=>{if(!i)return;let e=e=>{o.current&&!o.current.contains(e.target)&&a(!1)},t=e=>{e.key===`Escape`&&c()};return window.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,t)}},[i,c]);let l=pn(n||`Alt`,r),u=e=>{t(e),c()},d=[{key:`tap`,title:`Tap`,blurb:`Tap once, then tap again to send`,checked:e===`tap`,onClick:()=>u(`tap`)},{key:`always`,title:`Always on`,blurb:`Hands-free — listens for any speech`,checked:e===`always`,onClick:()=>u(`always`)},{key:`hold`,title:`Hold ${l}`,blurb:`Hold the mic or ${l} to talk`,checked:e===`hold`,onClick:()=>u(`hold`)}];return(0,W.jsxs)(`div`,{className:`mic-mode-pop-root`,ref:o,children:[(0,W.jsx)(`button`,{type:`button`,className:`mic-mode-chevron`,ref:s,onClick:()=>a(e=>!e),"aria-expanded":i,"aria-haspopup":`menu`,"aria-label":`Mic mode`,title:`Mic mode`,children:(0,W.jsx)(`svg`,{width:`8`,height:`8`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M6 9l6 6 6-6`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),i&&(0,W.jsx)(`div`,{className:`mic-mode-pop`,role:`menu`,"aria-label":`Mic mode`,children:d.map(e=>(0,W.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":e.checked,className:`more-menu-row mic-mode-row`,onClick:e.onClick,children:[(0,W.jsx)(`span`,{className:`more-menu-name`,children:e.title}),(0,W.jsx)(`span`,{className:`more-menu-blurb`,children:e.blurb}),e.checked&&(0,W.jsx)(z.check,{className:`mic-mode-row-check`,"aria-hidden":`true`})]},e.key))})]})}function xs(e,t){e.documentElement.dataset.presenceStyle=t}function Ss(e){delete e.documentElement.dataset.presenceStyle}var Cs=/(photo|image|carousel|mood|palette|video|map|diagram|story|slide|verse)/,ws=/(chart|table|matrix|grid|stat|kpi|code|pipeline|timeline|kanban|roadmap|process|flow|tree|schema|heatmap|scatter|bars|donut|gauge|checks|network|sankey)/;function Ts(e,t){return!!(e?.blocks)?.some(e=>t.test(String(e.type).toLowerCase()))}function Es({status:e,interjecting:t=!1,spec:n}){if(e===`thinking`)return`bead`;if(t)return`pip`;let r=xa(n);return r===`warm`?`pip`:r===`concerned`?`hybrid`:Ts(n,Cs)?`aura`:Ts(n,ws)?`bead`:`hybrid`}var Ds=6e3;function Os({dashboardId:e,dashboardTitle:t,onDismiss:n}){let r=(0,U.useRef)(n);return r.current=n,(0,U.useEffect)(()=>{let e=setTimeout(()=>r.current(),Ds);return()=>clearTimeout(e)},[e]),(0,W.jsxs)(`div`,{className:`cards-pill dash-pill`,role:`status`,"aria-live":`polite`,children:[(0,W.jsx)(z.check,{}),(0,W.jsxs)(`span`,{className:`cards-pill-text dash-pill-text`,children:[`Added to `,(0,W.jsx)(`strong`,{children:t})]}),(0,W.jsxs)(`a`,{className:`cards-pill-btn cards-pill-primary`,href:Jn.detail(e),onClick:n,children:[`Open `,(0,W.jsx)(z.chevR,{})]})]})}var ks={strong:`Strong evidence`,partial:`Partial evidence`,inferred:`Inferred`,unverified:`Unverified`},As={strong:3,partial:2,inferred:1,unverified:1};function js(e){let t=(0,J.c)(3),{count:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,W.jsx)(`i`,{className:`prov-dot`,"aria-hidden":`true`}),t[0]=r):r=t[0];let i=n==null?`Inferred`:`${n} ${n===1?`claim`:`claims`} inferred`,a;return t[1]===i?a=t[2]:(a=(0,W.jsxs)(`span`,{className:`prov-inferred`,children:[r,i]}),t[1]=i,t[2]=a),a}function X(e){let t=(0,J.c)(8),{level:n,title:r}=e,i=As[n],a=`prov-pill `+n,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[0,1,2],t[0]=o):o=t[0];let s;t[1]===i?s=t[2]:(s=(0,W.jsx)(`span`,{className:`prov-bars`,"aria-hidden":`true`,children:o.map(e=>(0,W.jsx)(`i`,{className:e<i?`on`:``},e))}),t[1]=i,t[2]=s);let c=ks[n],l;return t[3]!==a||t[4]!==s||t[5]!==c||t[6]!==r?(l=(0,W.jsxs)(`span`,{className:a,title:r,children:[s,c]}),t[3]=a,t[4]=s,t[5]=c,t[6]=r,t[7]=l):l=t[7],l}function Z({sources:e,hosts:t=!1,className:n}){return e.length?(0,W.jsxs)(`div`,{className:`grounded-in`+(n?` ${n}`:``),children:[(0,W.jsx)(`span`,{className:`grounded-in-label`,children:`Grounded in`}),(0,W.jsx)(`ul`,{children:e.map((e,n)=>{let r=H(e.url),i=t?ge(e.url):null;return(0,W.jsxs)(`li`,{children:[r?(0,W.jsx)(`a`,{href:r,target:`_blank`,rel:`noopener noreferrer`,children:e.title}):(0,W.jsx)(`span`,{className:`grounded-in-name`,children:e.title}),i&&(0,W.jsx)(`span`,{className:`grounded-in-host`,children:i})]},n)})})]}):null}var Ms=(e,t,n)=>`block:${e}:${t}${n===void 0?``:`@${n}`}`,Ns=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,40)||`value`;function Ps(e){let t=[];switch(e.type){case`chart`:{let{labels:n,series:r,unit:i}=e.props;for(let e of r)e.data.forEach((r,a)=>{let o=n[a];o===void 0||!Number.isFinite(r)||t.push({key:`${Ns(e.name)}-${Ns(o)}`,label:`${e.name} · ${o}`,value:r,...i===void 0?{}:{unit:i},at:o})});return t}case`breakdown`:for(let n of e.props.rows)Number.isFinite(n.pct)&&t.push({key:Ns(n.name),label:n.name,value:n.pct,unit:`%`});return t;case`kpi`:for(let n of e.props.kpis){let e=Bn(n.val);e&&t.push({key:Ns(n.label),label:n.label,value:e.value,...e.kind===`pct`?{unit:`%`}:{}})}return t;case`ring`:for(let n of e.props.rings){let e=Bn(n.display);e&&t.push({key:Ns(n.label),label:n.label,value:e.value,...n.unit===void 0?e.kind===`pct`?{unit:`%`}:{}:{unit:n.unit}})}return t;default:return t}}function Fs(e,t){let n=e.props,r=n.title??n.eyebrow;return r===void 0?null:{id:`block:${t}`,label:r,role:`measure`}}function Is(e,t=``){let n=Fn(t),r=t.split(/(?<=[.!?])\s+|\n+/).map(e=>e.trim()).filter(Boolean),i=e.sources?.[0]?.url?In(e.sources[0].url):void 0,a=[],o=[],s=new Map,c=[];return e.blocks.forEach((e,t)=>{let l=Ps(e);if(l.length===0)return;let u=Fs(e,t);if(u){a.push(u);for(let e of l){let a=Ms(t,e.key,e.at);if(s.has(a))continue;let l=r.find(t=>Vn(e.value,t)&&n(t)),d=l===void 0?void 0:{quote:l,...i===void 0?{}:{host:i}},f=Xn(a,e.label,e.value,d?`T2`:`T3`,e.unit,d,d===void 0,e.at);f&&(s.set(a,f),c.push({valueId:a,surface:`block`,id:u.id,label:u.label}),o.push({valueId:a,entityId:u.id,...e.at===void 0?{}:{at:e.at}}))}}}),{title:e.title,entities:a,relations:[],facts:o,trust:Zn(s,c)}}function Ls({open:e,onClose:t,claim:n,conf:r,sources:i,hadFiles:a=!1,blocks:o}){(0,U.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]);let s=(0,U.useMemo)(()=>{if(!o?.length)return[];let e=i.map(e=>e.snippet??``).filter(Boolean).join(`
19
- `),t=Is({title:n,blocks:[...o],sources:i},e);return t.facts.flatMap(e=>{let n=t.trust.values.get(e.valueId);return n===void 0||me(n)===null?[]:[n]})},[o,n,i]),c=s.filter(e=>e.kind===`grounded`).length,l=i.length?`How sure Mavéa is, based on these sources`:a?`How sure Mavéa is, based on your files`:V;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`scrim`+(e?` show`:``),role:`presentation`,onClick:t,style:{pointerEvents:e?`auto`:`none`}}),(0,W.jsxs)(`aside`,{className:`drawer`+(e?` show`:``),"aria-hidden":!e,inert:!e,children:[(0,W.jsx)(`button`,{className:`drawer-x`,onClick:t,"aria-label":`Close evidence`,children:(0,W.jsx)(z.x,{})}),(0,W.jsxs)(`div`,{className:`drawer-head`,children:[(0,W.jsxs)(`div`,{className:`drawer-eyebrow`,children:[(0,W.jsx)(z.shield,{style:{width:14,height:14}}),` Where this came from`]}),(0,W.jsx)(`div`,{className:`drawer-claim`,children:n})]}),(0,W.jsxs)(`div`,{className:`drawer-body`,children:[(0,W.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`var(--text-secondary)`},children:[(0,W.jsx)(X,{level:r||`inferred`,title:l}),i.length>0?(0,W.jsxs)(`span`,{children:[`· grounded in `,i.length,` live source`,i.length===1?``:`s`]}):a?(0,W.jsx)(`span`,{children:`· based on your attached files`}):(0,W.jsx)(`span`,{children:`· from the model's own knowledge`})]}),i.length>0&&(0,W.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0,display:`grid`,gap:8},"aria-label":`Sources`,children:i.map((e,t)=>{let n=H(e.url);return n?(0,W.jsx)(`li`,{children:(0,W.jsxs)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`evidence-block evidence-src`,children:[(0,W.jsxs)(`div`,{className:`evidence-top`,children:[(0,W.jsxs)(`span`,{className:`evidence-file`,children:[(0,W.jsx)(z.globe,{style:{width:16,height:16}}),e.title]}),(0,W.jsx)(`span`,{className:`evidence-loc`,children:ge(e.url)??e.url}),(0,W.jsx)(z.external,{style:{width:14,height:14,flex:`0 0 auto`}})]}),e.snippet&&(0,W.jsx)(`div`,{className:`evidence-quote`,children:e.snippet})]})},t):null})}),s.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`drawer-eyebrow`,children:[(0,W.jsx)(z.chart,{style:{width:14,height:14}}),` The figures in this answer`]}),(0,W.jsx)(`p`,{className:`evidence-note`,children:c===0?`None of these is stated by a source — they are the model's own.`:`${c} of ${s.length} ${c===1?`is`:`are`} stated by a source you can read below.`}),(0,W.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0,display:`grid`,gap:8},"aria-label":`Figures in this answer`,children:s.map(e=>(0,W.jsxs)(`li`,{className:`evidence-block evidence-figure`,children:[(0,W.jsxs)(`div`,{className:`evidence-top`,children:[(0,W.jsx)(`span`,{className:`evidence-file`,children:e.label}),(0,W.jsx)(`span`,{className:`evidence-fig`,children:pe(e)}),(0,W.jsx)(`span`,{className:`evidence-loc`,"data-status":e.kind,children:he[e.kind]})]}),e.kind===`grounded`?(0,W.jsx)(`div`,{className:`evidence-quote`,children:e.resolution.receipt.quote}):e.kind===`illustrative`&&e.resolution.illustrative!==`Shows the shape, not your numbers.`?(0,W.jsx)(`div`,{className:`evidence-caveat`,children:e.resolution.illustrative}):null]},e.id))})]}),(0,W.jsxs)(`div`,{className:`assumption`,children:[(0,W.jsx)(z.alert,{}),i.length>0?(0,W.jsxs)(`div`,{children:[`Mavéa summarized these sources — open them to read the originals, and treat anything labeled `,(0,W.jsx)(`b`,{children:`inferred`}),` as a best estimate, not a verified fact.`]}):a?(0,W.jsxs)(`div`,{children:[`Mavéa answered from your attached files and its own knowledge — no live sources were checked. Treat anything labeled `,(0,W.jsx)(`b`,{children:`inferred`}),` as a best estimate, not a verified fact.`]}):(0,W.jsx)(`div`,{children:`This came from the model's own knowledge — nothing here was checked against live sources or your files. Treat it as a starting point, not verified fact.`})]})]})]})]})}var Rs=new Set([`inferred`,`unverified`]);function zs(e){let{conf:t}=e.props;return t===`strong`||t===`partial`||t===`inferred`||t===`unverified`?t:void 0}function Bs(e){if(!e)return 0;let t=0,n=e=>{for(let r of e){let e=zs(r);e&&Rs.has(e)&&t++,r.type===`composite`&&n(r.props.regions.map(e=>e.block))}};return n(e.blocks),t}function Vs(e,t=3){if(!e?.length)return[];let n=new Set,r=[];for(let i of e){let e=ge(i.url)??i.title,a=e.toLowerCase();if(!(!e||n.has(a))&&(n.add(a),r.push(e),r.length>=t))break}return r}function Hs(e){let t=(0,J.c)(15),{question:n,narration:r,sources:i,inferred:a,tint:o}=e;if(!r)return null;let s;if(t[0]!==a||t[1]!==r||t[2]!==n||t[3]!==i||t[4]!==o){let e=Vs(i),c;t[6]===o?c=t[7]:(c=o?{"--thread-tint":o}:void 0,t[6]=o,t[7]=c);let l;t[8]!==n||t[9]!==o?(l=n&&(0,W.jsxs)(`p`,{className:`hero-ask`,children:[o&&(0,W.jsx)(`span`,{className:`hero-thread-dot`,"aria-hidden":`true`}),`You asked, “`,n,`”`]}),t[8]=n,t[9]=o,t[10]=l):l=t[10];let u;t[11]===r?u=t[12]:(u=ct(r),t[11]=r,t[12]=u);let d;t[13]===u?d=t[14]:(d=(0,W.jsx)(`p`,{className:`hero-line voice-text`,children:u}),t[13]=u,t[14]=d),s=(0,W.jsxs)(`section`,{className:`answer-hero`,"aria-label":`Mavéa's answer`,style:c,children:[l,d,(e.length>0||a>0)&&(0,W.jsxs)(`p`,{className:`hero-meta`,children:[e.length>0&&(0,W.jsxs)(`span`,{className:`hero-sources`,children:[`Sources: `,e.join(` · `)]}),a>0&&(0,W.jsx)(js,{count:a})]})]}),t[0]=a,t[1]=r,t[2]=n,t[3]=i,t[4]=o,t[5]=s}else s=t[5];return s}var Us=1300;function Ws(e){let t=(0,J.c)(9),{onDone:n,tint:r}=e,i,a;t[0]===n?(i=t[1],a=t[2]):(i=()=>{let e=window.setTimeout(n,Us);return()=>window.clearTimeout(e)},a=[n],t[0]=n,t[1]=i,t[2]=a),(0,U.useEffect)(i,a);let o;t[3]===r?o=t[4]:(o=r?{"--topic-sweep-ink":r}:void 0,t[3]=r,t[4]=o);let s,c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,W.jsx)(`span`,{className:`topic-sweep-line`}),c=(0,W.jsx)(`span`,{className:`topic-sweep-label`,children:`New topic`}),t[5]=s,t[6]=c):(s=t[5],c=t[6]);let l;return t[7]===o?l=t[8]:(l=(0,W.jsxs)(`aside`,{className:`topic-sweep`,"aria-hidden":`true`,style:o,children:[s,c]}),t[7]=o,t[8]=l),l}function Gs(e){return e?.track!=null&&e.track.score>=95&&(e.sources?.length??0)>0}function Ks(e,t){return an(e)&&t.blocks.length>=4}function qs(e,t){if(!ce(e))return!1;if(!t)return!0;let n=nn(t);return n.planning||n.comparison||n.whatIf||n.decision||n.troubleshoot}function Js(e){let t=(0,J.c)(58),{spec:n,followups:r,question:i,onAsk:a,onTrack:o,onDeepZoom:s,onCanvas:c,onSeeAll:l,threadCount:u,busy:d}=e,f;t[0]===n.sources?f=t[1]:(f=n.sources??[],t[0]=n.sources,t[1]=f);let p=f,m,h,g,_,v,y,b,x,S;if(t[2]!==d||t[3]!==r||t[4]!==a||t[5]!==c||t[6]!==s||t[7]!==l||t[8]!==o||t[9]!==i||t[10]!==p||t[11]!==n||t[12]!==u){let e=r.slice(0,12),f;t[22]!==o||t[23]!==n?(f=!!o&&Gs(n),t[22]=o,t[23]=n,t[24]=f):f=t[24],v=f;let C;t[25]!==d||t[26]!==s||t[27]!==i||t[28]!==n?(C=!d&&!!s&&!!i&&Ks(i,n),t[25]=d,t[26]=s,t[27]=i,t[28]=n,t[29]=C):C=t[29],g=C;let w;t[30]!==d||t[31]!==c||t[32]!==i||t[33]!==n?(w=!d&&!!c&&qs(n,i),t[30]=d,t[31]=c,t[32]=i,t[33]=n,t[34]=w):w=t[34],h=w,_=!!l&&(u??0)>=2,m=p.length>0||e.length>0||v||g||h||_,y=`answer-footer`+(p.length>0&&e.length>0?``:` single`),b=`Sources, follow-ups, and AI disclaimer`,t[35]===p?x=t[36]:(x=p.length>0&&(0,W.jsx)(Z,{sources:p,hosts:!0,className:`footer-grounded`}),t[35]=p,t[36]=x),S=e.length>0&&(0,W.jsxs)(`div`,{className:`footer-keepgoing`,children:[(0,W.jsx)(`span`,{className:`footer-label`,children:`Keep going`}),(0,W.jsx)(`ul`,{className:`footer-list`,children:e.map(e=>(0,W.jsx)(`li`,{children:(0,W.jsxs)(`button`,{type:`button`,className:`kg-row`,onClick:()=>a(e.route),disabled:d,children:[(0,W.jsx)(`span`,{className:`kg-q`,children:e.label}),(0,W.jsx)(`span`,{className:`kg-arrow`,"aria-hidden":`true`,children:`→`})]})},e.label))})]}),t[2]=d,t[3]=r,t[4]=a,t[5]=c,t[6]=s,t[7]=l,t[8]=o,t[9]=i,t[10]=p,t[11]=n,t[12]=u,t[13]=m,t[14]=h,t[15]=g,t[16]=_,t[17]=v,t[18]=y,t[19]=b,t[20]=x,t[21]=S}else m=t[13],h=t[14],g=t[15],_=t[16],v=t[17],y=t[18],b=t[19],x=t[20],S=t[21];let C;t[37]!==d||t[38]!==h||t[39]!==g||t[40]!==_||t[41]!==v||t[42]!==c||t[43]!==s||t[44]!==l||t[45]!==o||t[46]!==n.track?.reason||t[47]!==u?(C=(v||g||h||_)&&(0,W.jsxs)(`div`,{className:`footer-chips`,children:[_&&(0,W.jsxs)(`button`,{type:`button`,className:`footer-feature-chip is-thread`,onClick:l,title:`Bring all ${u} moments of this topic thread together onto one canvas`,children:[`See all ${u} moments`,(0,W.jsx)(`span`,{className:`footer-chip-arrow`,"aria-hidden":`true`,children:`→`})]}),h&&(0,W.jsxs)(`button`,{type:`button`,className:`footer-feature-chip`,onClick:c,title:`Spread this answer's cards on a board you can wander — the Mavéa threads them together`,children:[`See this answer as a canvas`,(0,W.jsx)(`span`,{className:`footer-chip-arrow`,"aria-hidden":`true`,children:`→`})]}),g&&(0,W.jsxs)(`button`,{type:`button`,className:`footer-feature-chip`,onClick:s,title:`Explore this topic level by level — from the broad field down to the mechanism`,children:[`Explore this step by step`,(0,W.jsx)(`span`,{className:`footer-chip-arrow`,"aria-hidden":`true`,children:`→`})]}),v&&(0,W.jsxs)(`button`,{type:`button`,className:`footer-track`,onClick:o,disabled:d,title:n.track?.reason,children:[`Track this live`,(0,W.jsx)(`span`,{className:`footer-track-arrow`,"aria-hidden":`true`,children:`→`})]})]}),t[37]=d,t[38]=h,t[39]=g,t[40]=_,t[41]=v,t[42]=c,t[43]=s,t[44]=l,t[45]=o,t[46]=n.track?.reason,t[47]=u,t[48]=C):C=t[48];let w=`footer-disclaimer`+(m?``:` only`),T;t[49]===w?T=t[50]:(T=(0,W.jsx)(`p`,{className:w,children:`AI-generated; may be inaccurate, incomplete, or outdated. Verify important information. Not medical, legal, financial, or other professional advice.`}),t[49]=w,t[50]=T);let E;return t[51]!==y||t[52]!==b||t[53]!==x||t[54]!==S||t[55]!==C||t[56]!==T?(E=(0,W.jsxs)(`section`,{className:y,"aria-label":b,children:[x,S,C,T]}),t[51]=y,t[52]=b,t[53]=x,t[54]=S,t[55]=C,t[56]=T,t[57]=E):E=t[57],E}var Ys=[`Alt`,`Control`,`Shift`],Xs=[{side:`any`,label:`Either`},{side:`left`,label:`Left`},{side:`right`,label:`Right`}],Zs=typeof navigator<`u`&&/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent),Qs={Alt:Zs?`Option (⌥)`:`Alt`,Control:Zs?`Control (⌃)`:`Ctrl`,Shift:Zs?`Shift (⇧)`:`Shift`};function $s({children:e,holdEnabled:t,showHint:n=!0,pttKey:r,pttSide:i=`any`,onHoldStart:a,onHoldEnd:o,onChangePttKey:s,onChangePttSide:c}){bn({enabled:t,pttKey:r,pttSide:i,onStart:a,onStop:o});let l=(0,U.useRef)(null),u=(0,U.useRef)(null),[d,f]=(0,U.useState)(!1);return(0,U.useEffect)(()=>{let e=l.current,t=e?.closest(`.mavea-app`);if(!e||!t)return;let n=()=>t.style.setProperty(`--dock-h`,`${e.offsetHeight}px`);n();let r=typeof ResizeObserver>`u`?null:new ResizeObserver(n);return r?.observe(e),()=>{r?.disconnect(),t.style.removeProperty(`--dock-h`)}},[]),(0,U.useEffect)(()=>{if(!d)return;let e=e=>{u.current&&!u.current.contains(e.target)&&f(!1)},t=e=>{e.key===`Escape`&&(f(!1),u.current?.querySelector(`.dock-hint-btn`)?.focus())};return window.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,t)}},[d]),(0,W.jsxs)(`div`,{className:`live-dock dock-bar`,ref:l,children:[(0,W.jsx)(`div`,{className:`dock-main`,children:e}),t&&n&&(0,W.jsxs)(`div`,{className:`dock-hint-wrap`,ref:u,children:[(0,W.jsxs)(`button`,{type:`button`,className:`dock-hint dock-hint-btn`,onClick:()=>f(e=>!e),title:`Click to change hold-to-talk key`,children:[`Hold `,pn(r||`Alt`,i),` to talk`]}),d&&(0,W.jsxs)(`div`,{className:`dock-hint-picker`,role:`menu`,"aria-label":`Choose hold-to-talk key`,children:[(0,W.jsx)(`div`,{className:`dock-hint-row`,children:Ys.map(e=>(0,W.jsx)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":(r||`Alt`)===e,className:`dock-hint-key${(r||`Alt`)===e?` active`:``}`,title:Qs[e],onClick:()=>s?.(e),children:pn(e)},e))}),(0,W.jsx)(`div`,{className:`dock-hint-row dock-hint-sides`,children:Xs.map(({side:e,label:t})=>(0,W.jsx)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":i===e,className:`dock-hint-key${i===e?` active`:``}`,title:e===`any`?`Either side of the key`:`Only the ${t.toLowerCase()} key`,onClick:()=>c?.(e),children:t},e))})]})]})]})}var ec=e=>e.toLowerCase().replace(/\s+/g,` `).trim();function tc(e){return ec(`${e.question} ${e.spec.title??``} ${e.narration}`)}function nc(e){let t=new Map;return e.forEach((n,r)=>{let i=n.corrects;if(!i)return;let a=ec(i.what);if(a){for(let n=r-1;n>=0;n--)if(tc(e[n]).includes(a)){t.set(n,{note:i,by:r});return}}}),t}function rc(e){if(!e)return``;try{return new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).formatToParts(new Date(e)).filter(e=>e.type===`hour`||e.type===`minute`||e.type===`literal`).map(e=>e.value).join(``).trim()}catch{return``}}function ic({chapters:e,frames:t,currentIndex:n,onJump:r,onReplay:i,onOverview:a,resumed:o,chatOpen:s,onToggleChat:c,collapsed:l,onToggleCollapse:u,onOpenPast:d,onStudy:f,roomIndices:p,bookmarks:m,onToggleBookmark:h,onViewMindMap:g,onSeeTogether:_}){let v=Wn(),y=e.length===0,b=(0,U.useMemo)(()=>nc(t),[t]);return(0,W.jsxs)(`aside`,{className:`side-rail`+(s?` chat-open`:``)+(l?` is-collapsed`:``),children:[(0,W.jsxs)(`button`,{type:`button`,className:`rail-mobile-toggle`,"aria-expanded":s,onClick:c,children:[(0,W.jsx)(z.chat,{}),s?`Hide session`:`This session`]}),(0,W.jsxs)(`div`,{className:`rail-head`,children:[u&&(0,W.jsx)(`button`,{type:`button`,className:`rail-collapse`,onClick:u,"aria-expanded":!l,"aria-label":l?`Expand the session panel`:`Collapse the session panel`,title:l?`Show this session`:`Hide this session`,children:(0,W.jsx)(z.panelLeft,{})}),(0,W.jsx)(`span`,{className:`rail-title sess-title`,children:`This session`}),(i||a)&&(0,W.jsxs)(`div`,{className:`rail-head-actions`,children:[i&&(0,W.jsx)(`button`,{type:`button`,className:`rail-history rail-icon`,onClick:i,title:`Replay earlier answers`,"aria-label":`Replay earlier answers`,children:(0,W.jsx)(z.play,{})}),a&&(0,W.jsx)(`button`,{type:`button`,className:`rail-history rail-icon`,onClick:a,title:`Zoom out to the whole conversation`,"aria-label":`Conversation overview`,children:(0,W.jsx)(z.layers,{})})]})]}),u&&(0,W.jsx)(`div`,{className:`rail-collapsed-label`,"aria-hidden":`true`,children:`This session`}),(0,W.jsxs)(`div`,{className:`rail-chat sess-list`,children:[o&&(0,W.jsx)(`div`,{className:`sess-note`,role:`note`,children:`Resumed — picking back up where you left off.`}),y?(0,W.jsx)(`div`,{className:`sess-note`,children:`Topics can wander — cooking, markets, your fantasy lineup. Mavéa keeps the thread.`}):e.map(e=>(0,W.jsxs)(`div`,{className:`sess-chapter`,style:{"--ch-c":e.color},children:[(0,W.jsxs)(`div`,{className:`sess-chapter-head`,children:[(0,W.jsx)(`div`,{className:`sess-chapter-label`,title:e.title,children:e.title}),_&&e.moments.length>=2&&(0,W.jsx)(`button`,{type:`button`,className:`sess-together`,onClick:()=>_(e),title:`See all ${e.moments.length} moments of this thread together on one canvas`,"aria-label":`See all ${e.moments.length} moments of this thread together`,children:(0,W.jsx)(z.table,{})})]}),e.moments.map(e=>{let i=b.get(e.frameIndex),a=t[e.frameIndex],o=a?String(a.at):null,s=o?m?.has(o)??!1:!1;return(0,W.jsxs)(`div`,{className:`sess-row-wrap`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`sess-row`+(e.frameIndex===n?` is-current`:``)+(i?` is-corrected`:``)+(s?` is-bookmarked`:``),onClick:()=>r(e.frameIndex),"aria-current":e.frameIndex===n?`true`:void 0,title:i?`${e.question} · Corrected later — ${i.note.what}: was ${i.note.was}, now ${i.note.now}`:e.question,children:[(0,W.jsx)(`span`,{className:`sess-time`,children:rc(a?.at)}),(0,W.jsx)(`span`,{className:`sess-q`,children:e.question}),i&&(0,W.jsx)(`span`,{className:`sess-corrected`,children:`corrected`}),p?.has(e.frameIndex)&&(0,W.jsx)(`span`,{className:`sess-room`,children:`from the room`})]}),g&&a?.mind&&(0,W.jsx)(`button`,{type:`button`,className:`sess-mapview`,onClick:t=>{t.stopPropagation(),g(e.frameIndex)},title:`See the thinking map this answer grew from`,"aria-label":`View the thinking map`,children:(0,W.jsx)(z.sparkle,{})}),h&&o&&(0,W.jsx)(`button`,{type:`button`,className:`sess-bookmark${s?` on`:``}`,onClick:e=>{e.stopPropagation(),h(o)},title:s?`Remove bookmark`:`Bookmark this moment`,"aria-pressed":s,"aria-label":s?`Remove bookmark`:`Bookmark this moment`,children:s?`★`:`☆`})]},e.frameIndex)})]},e.id))]}),(d||f&&v)&&(0,W.jsxs)(`div`,{className:`rail-foot`,children:[d&&(0,W.jsxs)(`button`,{type:`button`,className:`rail-past`,onClick:d,children:[(0,W.jsx)(z.clock,{}),(0,W.jsx)(`span`,{children:`Past conversations`})]}),f&&v&&(0,W.jsxs)(`button`,{type:`button`,className:`rail-past`,onClick:f,children:[(0,W.jsx)(z.layers,{}),(0,W.jsxs)(`span`,{children:[v.count,` card`,v.count===1?``:`s`,` ready`]})]})]})]})}function ac(e){let{spec:t,frames:n,viewIndex:r,narration:i,lastAsk:a}=e;if(!t)return null;let o=n.length-1;if(r!=null&&r!==o){let e=n[r];if(e)return{question:_t(e.question)||null,narration:e.narration||e.spec.title}}let s=o>=0?n[o]:void 0,c=i||s?.narration||t.title;if(!c)return null;let l=i?a??s?.question:s?.question??a;return{question:_t(l)||null,narration:c}}function oc(e){let t=(0,J.c)(3),n=(0,U.useRef)(null),[r,i]=(0,U.useState)(null),a,o;return t[0]===e?(a=t[1],o=t[2]):(a=()=>{if(e===`thinking`){n.current=performance.now();return}(e===`speaking`||e===`showing`)&&n.current!==null&&(i(Math.round(performance.now()-n.current)),n.current=null)},o=[e],t[0]=e,t[1]=a,t[2]=o),(0,U.useEffect)(a,o),r}function sc(e){return e===null||!Number.isFinite(e)||e<0?null:e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function cc(e){return e===`circle`?`○`:e===`point`?`→`:e===`underline`?`—`:e===`highlight`?`▬`:e===`rising`?`↗`:e===`falling`?`↘`:e===`bracket`?`⊓`:e===`note`?`✎`:e===`connect`?`⤳`:e===`strike`?`✕`:e===`question`?`?`:e===`star`?`★`:e===`check`?`✓`:e===`frame`?`▢`:e===`brace`?`{`:`✦`}function lc(e){return e===`circle`?`circles`:e===`point`?`arrow:`:e===`underline`?`underlines`:e===`highlight`?`highlights`:e===`rising`?`trend up:`:e===`falling`?`trend down:`:e===`bracket`?`brackets`:e===`note`?`notes`:e===`connect`?`connects:`:e===`strike`?`strikes out`:e===`question`?`questions`:e===`star`?`stars`:e===`check`?`checks off`:e===`frame`?`frames`:e===`brace`?`groups`:`drew on`}function uc(e){let t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}function dc(e){if(e.kind===`connect`&&e.at&&e.to)return`${e.at} → ${e.to}`;if(e.at)return e.at;if(e.line){let t=e.line.split(/\s+/).slice(0,4).join(` `);return t.length<e.line.length?`${t}…`:t}return e.spot}function fc(e){let t=(0,J.c)(42),{entries:n,turnStartMs:r,annotationsEnabled:i,hiddenSpots:a,onToggle:o,onKeep:s,onClear:c,onClip:l,onJumpTo:u,onToggleSpot:d}=e,f;t[0]===o?f=t[1]:(f=e=>{e.stopPropagation(),o()},t[0]=o,t[1]=f);let p=f,m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,W.jsx)(`span`,{className:`gesture-track-eyebrow`,children:`Gesture track`}),t[2]=m):m=t[2];let h=`gesture-track-toggle ${i?`on`:`off`}`,g=i?`Turn off drawing`:`Turn on drawing`,_=i?`Drawing on — tap to turn off`:`Drawing off — tap to turn on`,v;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,W.jsx)(`span`,{className:`gesture-track-toggle-icon`,children:`✦`}),t[3]=v):v=t[3];let y=i?`Pen on`:`Pen off`,b;t[4]===y?b=t[5]:(b=(0,W.jsx)(`span`,{children:y}),t[4]=y,t[5]=b);let x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,W.jsx)(`span`,{className:`gesture-track-toggle-switch`,"aria-hidden":`true`,children:(0,W.jsx)(`span`,{className:`gesture-track-toggle-knob`})}),t[6]=x):x=t[6];let S;t[7]!==i||t[8]!==p||t[9]!==h||t[10]!==g||t[11]!==_||t[12]!==b?(S=(0,W.jsxs)(`div`,{className:`gesture-track-header`,children:[m,(0,W.jsxs)(`button`,{type:`button`,className:h,onClick:p,title:g,"aria-label":_,"aria-pressed":i,children:[v,b,x]})]}),t[7]=i,t[8]=p,t[9]=h,t[10]=g,t[11]=_,t[12]=b,t[13]=S):S=t[13];let C;if(t[14]!==n||t[15]!==a||t[16]!==u||t[17]!==d||t[18]!==r){let e;t[20]!==a||t[21]!==u||t[22]!==d||t[23]!==r?(e=e=>{let t=a?.has(e.spot)??!1;return(0,W.jsxs)(`li`,{className:`gesture-track-entry${t?` is-hidden`:``}`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`gesture-track-entry-btn`,onClick:()=>u?.(e.spot,e.toSpot),title:`Jump to this annotation`,children:[(0,W.jsx)(`span`,{className:`gesture-track-time`,children:uc(e.inkedAt-r)}),(0,W.jsx)(`span`,{className:`gesture-track-icon`,"aria-hidden":`true`,children:cc(e.kind)}),(0,W.jsxs)(`span`,{className:`gesture-track-desc`,children:[e.stepNumber&&(0,W.jsxs)(`span`,{className:`gesture-track-step`,children:[`Step `,e.stepNumber]}),(0,W.jsx)(`span`,{className:`gesture-track-verb`,children:lc(e.kind)}),` `,(0,W.jsx)(`span`,{className:`gesture-track-target`,title:dc(e),children:dc(e)})]})]}),d&&(0,W.jsx)(`button`,{type:`button`,className:`gesture-track-eye`,onClick:t=>{t.stopPropagation(),d(e.spot)},title:t?`Show annotation`:`Hide annotation`,"aria-pressed":t,"aria-label":t?`Show annotation`:`Hide annotation`,children:t?(0,W.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,"aria-hidden":`true`,children:[(0,W.jsx)(`path`,{d:`M1.5 1.5L10.5 10.5M5 5.3C5 5.3 5.4 5 6 5c.9 0 1.5.7 1.5 1.5 0 .5-.2.9-.5 1.2`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,W.jsx)(`path`,{d:`M2 3.5C1 4.4.5 5.2.5 6s1.5 3 5.5 3c.9 0 1.7-.1 2.4-.4M10 8.5c1-1 1.5-1.8 1.5-2.5s-1.5-3-5.5-3c-.5 0-1 0-1.4.1`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`})]}):(0,W.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,"aria-hidden":`true`,children:[(0,W.jsx)(`ellipse`,{cx:`6`,cy:`6`,rx:`5.5`,ry:`3`,stroke:`currentColor`,strokeWidth:`1.2`}),(0,W.jsx)(`circle`,{cx:`6`,cy:`6`,r:`1.5`,fill:`currentColor`})]})})]},`${e.spot}|${e.kind??``}|${e.at??``}`)},t[20]=a,t[21]=u,t[22]=d,t[23]=r,t[24]=e):e=t[24],C=n.map(e),t[14]=n,t[15]=a,t[16]=u,t[17]=d,t[18]=r,t[19]=C}else C=t[19];let w;t[25]===C?w=t[26]:(w=(0,W.jsx)(`ol`,{className:`gesture-track-list`,"aria-label":`Drawn gestures`,children:C}),t[25]=C,t[26]=w);let T;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,W.jsx)(`p`,{className:`gesture-track-hint`,children:`Your blue ink, Mavéa's orange. Tap an entry to jump to it.`}),t[27]=T):T=t[27];let E;t[28]===s?E=t[29]:(E=(0,W.jsx)(`button`,{type:`button`,className:`gesture-track-btn primary`,onClick:s,children:`Keep annotations`}),t[28]=s,t[29]=E);let D;t[30]===l?D=t[31]:(D=l&&(0,W.jsx)(`button`,{type:`button`,className:`gesture-track-btn`,onClick:l,children:`Clip this moment`}),t[30]=l,t[31]=D);let O;t[32]===c?O=t[33]:(O=(0,W.jsx)(`button`,{type:`button`,className:`gesture-track-btn ghost`,onClick:c,children:`Clear`}),t[32]=c,t[33]=O);let k;t[34]!==E||t[35]!==D||t[36]!==O?(k=(0,W.jsxs)(`div`,{className:`gesture-track-actions`,children:[E,D,O]}),t[34]=E,t[35]=D,t[36]=O,t[37]=k):k=t[37];let A;return t[38]!==S||t[39]!==w||t[40]!==k?(A=(0,W.jsxs)(`div`,{className:`gesture-track`,role:`complementary`,"aria-label":`Gesture track`,children:[S,w,T,k]}),t[38]=S,t[39]=w,t[40]=k,t[41]=A):A=t[41],A}function pc(e){let t=(0,J.c)(13),{enabled:n,open:r,inkCount:i,onClick:a}=e,o=`pen-toggle-pill ${n?`on`:`off`}${r?` open`:``}`,s=r?`Close pen panel`:`Open pen panel`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,W.jsx)(`span`,{"aria-hidden":`true`,children:`✦`}),t[0]=c):c=t[0];let l=n?`Pen on`:`Pen off`,u;t[1]===l?u=t[2]:(u=(0,W.jsx)(`span`,{children:l}),t[1]=l,t[2]=u);let d;t[3]!==i||t[4]!==r?(d=!r&&i>0&&(0,W.jsx)(`span`,{className:`pen-ink-count`,"aria-label":`${i} marks drawn`,children:i}),t[3]=i,t[4]=r,t[5]=d):d=t[5];let f;return t[6]!==a||t[7]!==r||t[8]!==o||t[9]!==s||t[10]!==u||t[11]!==d?(f=(0,W.jsxs)(`button`,{type:`button`,className:o,onClick:a,title:s,"aria-expanded":r,"aria-haspopup":`true`,children:[c,u,d]}),t[6]=a,t[7]=r,t[8]=o,t[9]=s,t[10]=u,t[11]=d,t[12]=f):f=t[12],f}var mc=/\b(teach me|walk me through|tutor( me)?|step[- ]by[- ]step|like i'?m (five|5|a beginner|new))\b/i;function hc(e){return!!e&&mc.test(e)}function gc(e){if(e.length===0)return``;let t=`M ${e[0].x} ${e[0].y}`;for(let n=1;n<e.length;n++)t+=` L ${e[n].x} ${e[n].y}`;return t}var _c=4,vc=2e3;function yc(e,t=_c){if(e.length<=1)return e.slice();let n=0;for(let t=1;t<e.length;t++)n+=Math.hypot(e[t].x-e[t-1].x,e[t].y-e[t-1].y);let r=Math.max(t,n/vc),i=[e[0]];for(let t=1;t<e.length;t++){let n=e[t-1],a=e[t],o=Math.hypot(a.x-n.x,a.y-n.y),s=Math.floor(o/r);for(let e=1;e<=s;e++){let t=e*r/o;i.push({x:n.x+(a.x-n.x)*t,y:n.y+(a.y-n.y)*t})}let c=i[i.length-1];(c.x!==a.x||c.y!==a.y)&&i.push(a)}return i}function bc(e){let t=0;for(let n=1;n<e.length;n++)t+=Math.hypot(e[n].x-e[n-1].x,e[n].y-e[n-1].y);return t}function xc(e){if(e.length<3)return 0;let t=0;for(let n=0;n<e.length;n++){let r=e[n],i=e[(n+1)%e.length];t+=r.x*i.y-i.x*r.y}return Math.abs(t)/2}function Sc(e){let t=e[0].x,n=e[0].x,r=e[0].y,i=e[0].y;for(let a of e)a.x<t&&(t=a.x),a.x>n&&(n=a.x),a.y<r&&(r=a.y),a.y>i&&(i=a.y);return{minX:t,minY:r,maxX:n,maxY:i}}function Cc(e){if(e.length<4)return!1;let{minX:t,minY:n,maxX:r,maxY:i}=Sc(e),a=Math.hypot(r-t,i-n),o=bc(e);if(a<10||o<10)return!1;let s=e[0],c=e[e.length-1],l=Math.hypot(c.x-s.x,c.y-s.y)<=Math.max(16,a*.35),u=xc(e)>o*o*.02;return l||u}function wc(e,t){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){let a=t[r].x,o=t[r].y,s=t[i].x,c=t[i].y;o>e.y!=c>e.y&&e.x<(s-a)*(e.y-o)/(c-o)+a&&(n=!n)}return n}var Tc=3e3;function Ec(e,t=_c,n=Tc){let{minX:r,minY:i,maxX:a,maxY:o}=Sc(e),s=a-r,c=o-i;if(s<=0||c<=0)return[];let l=Math.max(1,Math.round(s/t))*Math.max(1,Math.round(c/t))>n?Math.sqrt(s*c/n):t,u=[];for(let t=i+l/2;t<o;t+=l)for(let i=r+l/2;i<a;i+=l){let r={x:i,y:t};if(wc(r,e)&&(u.push(r),u.length>=n))return u}return u}var Dc=4,Oc=4e3,kc=`input, textarea, select, button, a, summary, [contenteditable], [role="slider"], [role="tab"], [role="switch"], [draggable="true"], .block-ask, .geo-map, [data-interactive]`;function Ac({armed:e,rootRef:t,onStroke:n,onTap:r,strokes:i,highlights:a}){let o=(0,U.useRef)(null),s=(0,U.useRef)(null),c=(0,U.useRef)(null),l=(0,U.useRef)([]),u=(0,U.useRef)(null),d=(0,U.useRef)(!1),f=(0,U.useRef)(!1),p=(0,U.useRef)(null),m=(0,U.useRef)(0),h=(0,U.useRef)(e);h.current=e;let g=(0,U.useRef)(n);g.current=n;let _=(0,U.useRef)(r);return _.current=r,(0,U.useEffect)(()=>{let n=t.current;if(n)return n.classList.toggle(`ink-armed`,e),()=>n.classList.remove(`ink-armed`)},[e,t]),(0,U.useEffect)(()=>{let e=t.current,n=o.current;if(!e||!n)return;let r=e=>{let t=n.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},i=()=>({stage:e,svgRect:n.getBoundingClientRect()}),a=()=>{let e=gc(l.current);s.current?.setAttribute(`d`,e),c.current?.setAttribute(`d`,e)},v=()=>{s.current?.setAttribute(`d`,``),c.current?.setAttribute(`d`,``)},y=()=>{l.current=[],u.current=null,d.current=!1,f.current=!1,p.current=null},b=t=>{try{e.setPointerCapture(t)}catch{}},x=t=>{try{e.hasPointerCapture?.(t)&&e.releasePointerCapture(t)}catch{}},S=()=>{p.current!=null&&x(p.current),e.classList.remove(`ink-capturing`),y(),v()},C=()=>{document.hidden&&S()},w=e=>{if(d.current||f.current){if(performance.now()-m.current>Oc)S();else return}if(!(h.current||e.pointerType===`pen`)||e.target?.closest?.(kc))return;m.current=performance.now(),d.current=!0,p.current=e.pointerId;let t=r(e);u.current=t,l.current=[t]},T=t=>{if(p.current!==t.pointerId||!d.current&&!f.current)return;let n=r(t);if(!f.current){if(Math.hypot(n.x-(u.current?.x??n.x),n.y-(u.current?.y??n.y))<Dc)return;f.current=!0,b(t.pointerId),e.classList.add(`ink-capturing`)}t.preventDefault(),l.current.push(n),a()},E=t=>{if(p.current!==t.pointerId)return;let n=f.current,r=d.current,a=l.current,o=u.current;x(t.pointerId),e.classList.remove(`ink-capturing`),y(),v(),n&&a.length>=2?g.current(a,i()):r&&!n&&o&&_.current?.(o,i())},D=e=>{p.current===e.pointerId&&S()};return e.addEventListener(`pointerdown`,w),window.addEventListener(`pointermove`,T),window.addEventListener(`pointerup`,E),window.addEventListener(`pointercancel`,D),window.addEventListener(`blur`,S),document.addEventListener(`visibilitychange`,C),()=>{e.removeEventListener(`pointerdown`,w),window.removeEventListener(`pointermove`,T),window.removeEventListener(`pointerup`,E),window.removeEventListener(`pointercancel`,D),window.removeEventListener(`blur`,S),document.removeEventListener(`visibilitychange`,C),p.current!=null&&x(p.current),e.classList.remove(`ink-capturing`,`ink-armed`)}},[t]),(0,W.jsxs)(`svg`,{ref:o,className:`ink-user-overlay`,"aria-hidden":`true`,children:[a?.map((e,t)=>e.w>0&&e.h>0?(0,W.jsx)(`rect`,{className:`ink-highlight`,x:e.x,y:e.y,width:e.w,height:e.h,rx:3,ry:3},`h`+t):null),i?.map((e,t)=>(0,W.jsx)(`path`,{className:`ink-user-stroke ink-user-settled`,d:e},t)),(0,W.jsx)(`path`,{ref:c,className:`ink-user-halo`,d:``}),(0,W.jsx)(`path`,{ref:s,className:`ink-user-stroke`,d:``})]})}var jc=80,Mc=`.ink-user-overlay, .ink-layer, .block-ask, .card-eyebrow`,Nc=e=>{let t=e.replace(/\s+/g,` `).trim();return t.length>jc?t.slice(0,79)+`…`:t};function Pc(e){return!e.data||!e.data.trim()?!1:!e.parentElement?.closest(Mc)}function Fc(e){if(e.min!==e.max)return[e.min,e.max];let t=e.node.data,n=e.min,r=e.min;for(;n>0&&!/\s/.test(t[n-1]);)n--;for(;r<t.length&&!/\s/.test(t[r]);)r++;return n<r?[n,r]:[e.min,e.min+1]}function Ic(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}function Lc(e){let t=e.nodeType===Node.TEXT_NODE?e.parentElement:e;for(;t;t=t.parentElement){let e=t.getAttribute?.(`data-spot-id`);if(e)return e}return``}function Rc(e,t,n){try{let r=document.createRange(),i=e.length;r.setStart(e,Math.max(0,Math.min(t,i))),r.setEnd(e,Math.max(0,Math.min(n,i)));let a=r.getClientRects(),o=[];for(let e=0;e<a.length;e++){let t=a[e];t&&t.width>0&&t.height>0&&o.push(t)}return o}catch{return[]}}function zc(e){let t=[...e.values()],n=e=>{let[t,n]=Fc(e);return e.node.data.slice(t,n)},r=t[0];for(let e of t)(e.samples>r.samples||e.samples===r.samples&&n(e).length>n(r).length)&&(r=e);let i=[...t].sort((e,t)=>Ic(e.node,t.node)),a=Nc(i.map(n).filter(e=>e.trim()).join(` `));if(!a)return null;let o=[];for(let e of i){let[t,n]=Fc(e);o.push(...Rc(e.node,t,n))}return{text:a,blockId:Lc(r.node),rects:o}}function Bc(e){let t=e.matches?.(`text, tspan`)?e:e.closest?.(`text, tspan`),n=e.closest?.(`[aria-label]`),r=[t?.textContent,n?.getAttribute(`aria-label`),e.getAttribute?.(`alt`),e.getAttribute?.(`title`)];for(let e of r)if(e?.trim())return e;return``}function Vc(e,t){if(e.length===0)return null;let n=e[Math.floor(e.length/2)];for(let e of t.elementsAt(n.x,n.y)){if(e.closest?.(Mc))continue;let t=Bc(e);if(t)return{text:Nc(t),blockId:Lc(e),rects:[e.getBoundingClientRect()]}}return null}function Hc(e,t){let n=new Map,r=[];for(let i of e){let e=t.caretAt(i.x,i.y);if(e&&Pc(e.node)){let t=n.get(e.node);t?(e.offset<t.min&&(t.min=e.offset),e.offset>t.max&&(t.max=e.offset),t.samples++):n.set(e.node,{node:e.node,min:e.offset,max:e.offset,samples:1})}else r.push(i)}return n.size>0?zc(n):Vc(r,t)}function Uc(e,t,n){if(e.length===0)return null;let r=e=>({x:e.x+t.left,y:e.y+t.top});if(Cc(e)){let t=Ec(e.map(r)),i=t.length>0?Hc(t,n):null;if(i)return i}let i=yc(e).map(r);return i.length===0?null:Hc(i,n)}var Wc=6,Gc=14;function Kc(e,t,n,r){try{if(e.length===0)return!1;let i=Math.min(t,e.length-1),a=document.createRange();a.setStart(e,i),a.setEnd(e,i+1);let o=a.getClientRects();if(o.length===0)return!0;for(let e=0;e<o.length;e++){let t=o[e];if(n>=t.left-Wc&&n<=t.right+Wc&&r>=t.top-Gc&&r<=t.bottom+Gc)return!0}return!1}catch{return!0}}function qc(e,t){let n=document,r=null,i=0;if(typeof n.caretRangeFromPoint==`function`){let a=n.caretRangeFromPoint(e,t);a&&a.startContainer.nodeType===Node.TEXT_NODE&&(r=a.startContainer,i=a.startOffset)}else if(typeof document.caretPositionFromPoint==`function`){let n=document.caretPositionFromPoint(e,t);n&&n.offsetNode.nodeType===Node.TEXT_NODE&&(r=n.offsetNode,i=n.offset)}return!r||!Kc(r,i,e,t)?null:{node:r,offset:i}}var Jc={caretAt:qc,elementsAt:(e,t)=>document.elementsFromPoint(e,t)};function Yc(e,t,n=Jc){let r=Uc(e,t.svgRect,n);return!r||!r.text?null:{intent:{kind:`highlight`,blockIds:r.blockId?[r.blockId]:[],textAt:r.text},rects:r.rects}}function Xc(e,t){return e.map(e=>({x:e.left-t.left,y:e.top-t.top,w:e.width,h:e.height}))}function Zc(e){let{onCommit:t,resetKey:n,hitTester:r}=e,[i,a]=(0,U.useState)([]),[o,s]=(0,U.useState)(0),c=(0,U.useRef)(i);c.current=i;let l=(0,U.useRef)(t);l.current=t;let u=(0,U.useCallback)((e,t,n)=>{let i=Yc(e,n,r);if(!i)return s(e=>e+1),!1;let o={intent:i.intent,stroke:t,rects:Xc(i.rects,n.svgRect)};return a(e=>[...e,o]),!0},[r]),d=(0,U.useCallback)((e,t)=>{u(e,gc(e),t)},[u]),f=(0,U.useCallback)((e,t)=>{u([e,{x:e.x+1,y:e.y+1}],``,t)},[u]),p=(0,U.useCallback)(e=>{a(t=>e==null?t.slice(0,-1):t.filter((t,n)=>n!==e))},[]),m=(0,U.useCallback)(()=>{let e=c.current;e.length&&l.current(e.map(e=>e.intent)),a([])},[]),h=(0,U.useCallback)(()=>a([]),[]);(0,U.useEffect)(()=>{a([])},[n]);let g=i.map(e=>e.intent),_=i.map(e=>e.stroke).filter(Boolean),v=i.flatMap(e=>e.rects);return{phase:i.length?`pinned`:`idle`,pins:i,intents:g,strokes:_,highlights:v,miss:o,onStroke:d,onTap:f,undo:p,send:m,clear:h}}var Qc=e=>e.length>22?e.slice(0,21)+`…`:e;function $c(e){return e.textAt?`Marked “${Qc(e.textAt)}”`:`Marked`}function el(e){if(e.length===0)return``;let t=e[0]?.textAt?.trim(),n=t?`Tell me about “${Qc(t)}”`:`Tell me about this`;return e.length===1?n:`${n} (and ${e.length-1} more)`}function tl(e){let t=new Set,n=[];for(let r of e)!r.id||t.has(r.id)||(t.add(r.id),n.push(r));return n}function nl(e,t){let n=new Map;for(let e of t)e.id&&n.set(e.id,e);let r=[],i=[],a=new Set;for(let t of e){let e=t.blockIds;if(!(e.length>0&&!e.every(e=>n.has(e)))){r.push(t);for(let t of e){if(a.has(t))continue;a.add(t);let e=n.get(t);e&&i.push(e)}}}return{intents:r,blocks:i}}function rl(e){let t=(0,J.c)(15),{pins:n,onUndo:r,onSend:i}=e;if(n.length===0)return null;let a=n.length,o=a>1?`s`:``,s;t[0]!==a||t[1]!==o?(s=(0,W.jsxs)(`span`,{className:`ink-sr`,role:`status`,children:[`Highlighted `,a,` part`,o]}),t[0]=a,t[1]=o,t[2]=s):s=t[2];let c;if(t[3]!==r||t[4]!==n){let e;t[6]===r?e=t[7]:(e=(e,t)=>(0,W.jsxs)(`span`,{className:`ink-chip`,children:[(0,W.jsx)(`span`,{className:`ink-chip-text`,children:$c(e.intent)}),(0,W.jsx)(`button`,{type:`button`,className:`ink-chip-x`,"aria-label":`Remove ${e.intent.textAt||`mark`}`,onClick:()=>r(t),children:(0,W.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`11`,height:`11`,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M6 6l12 12M18 6L6 18`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.4`,strokeLinecap:`round`})})})]},t),t[6]=r,t[7]=e),c=n.map(e),t[3]=r,t[4]=n,t[5]=c}else c=t[5];let l=`Ask about the ${a} highlighted part${a>1?`s`:``}`,u;t[8]!==i||t[9]!==l?(u=(0,W.jsx)(`button`,{type:`button`,className:`ink-chip-act primary`,onClick:i,title:l,children:`Ask`}),t[8]=i,t[9]=l,t[10]=u):u=t[10];let d;return t[11]!==s||t[12]!==c||t[13]!==u?(d=(0,W.jsxs)(`div`,{className:`ink-dock`,role:`group`,"aria-label":`Highlighted parts to ask about`,children:[s,c,u]}),t[11]=s,t[12]=c,t[13]=u,t[14]=d):d=t[14],d}var il=`mavea-ink-hint-seen`;function al(){try{return localStorage.getItem(il)===`1`}catch{return!0}}function ol({armed:e,pins:t,miss:n=0,onUndo:r,onSend:i}){let[a,o]=(0,U.useState)(al),s=!a&&!e&&t.length===0,c=e&&t.length===0,[l,u]=(0,U.useState)(!1);(0,U.useEffect)(()=>{if(!n)return;u(!0);let e=setTimeout(()=>u(!1),2600);return()=>clearTimeout(e)},[n]),(0,U.useEffect)(()=>{if(!(a||!e&&t.length===0)){o(!0);try{localStorage.setItem(il,`1`)}catch{}}},[e,t.length,a]);let d=()=>{o(!0);try{localStorage.setItem(il,`1`)}catch{}},f=t.length>0;return!s&&!c&&!l&&!f?null:(0,W.jsxs)(`div`,{className:`ink-bar`+(s?` coaching`:``),children:[s&&(0,W.jsxs)(`div`,{className:`ink-coach`,role:`note`,children:[(0,W.jsx)(`span`,{className:`ink-coach-spark`,"aria-hidden":`true`,children:`✍️`}),(0,W.jsxs)(`span`,{className:`ink-coach-text`,children:[(0,W.jsx)(`strong`,{children:`Highlight to ask.`}),` Turn on `,(0,W.jsx)(`strong`,{children:`Highlight`}),`, then drag across any value, label, or card to grab it. Ask in your own words, and a pen draws straight away.`]}),(0,W.jsx)(`button`,{type:`button`,className:`ink-coach-x`,title:`Dismiss`,"aria-label":`Got it`,onClick:d,children:(0,W.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M6 6l12 12M18 6L6 18`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})})})]}),c&&!l&&(0,W.jsxs)(`span`,{className:`ink-howto`,role:`status`,children:[(0,W.jsx)(`span`,{className:`ink-howto-dot`,"aria-hidden":`true`}),`Drag across any value, label, or card on the answer to grab it. Then ask in your own words.`]}),l&&!s&&(0,W.jsx)(`span`,{className:`ink-miss`,role:`status`,children:`Nothing to grab there. Drag across a value, label, or card.`}),f&&(0,W.jsx)(rl,{pins:t,onUndo:r,onSend:i})]})}function sl(e){let t=(0,J.c)(10),{armed:n,onToggle:r}=e,i=`mark-toggle`+(n?` on`:``),a=n?`Highlighter on — drag across the answer to ask about it`:`Highlight the answer to ask about it`,o;t[0]!==n||t[1]!==r?(o=()=>r(!n),t[0]=n,t[1]=r,t[2]=o):o=t[2];let s,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,W.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`15`,height:`15`,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M3 21l3.2-.9L18 8.3l-2.3-2.3L4 17.6 3 21z M14.7 7l2.3 2.3`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinejoin:`round`,strokeLinecap:`round`})}),c=(0,W.jsx)(`span`,{className:`mark-toggle-label`,children:`Highlight`}),t[3]=s,t[4]=c):(s=t[3],c=t[4]);let l;return t[5]!==n||t[6]!==i||t[7]!==a||t[8]!==o?(l=(0,W.jsxs)(`button`,{type:`button`,className:i,"aria-pressed":n,"aria-label":a,title:`Highlight to ask`,onClick:o,children:[s,c]}),t[5]=n,t[6]=i,t[7]=a,t[8]=o,t[9]=l):l=t[9],l}var cl=`mavea-brief-date`,ll=cl,ul=void 0;function dl(){return new Date().toISOString().slice(0,10)}function fl(){try{return typeof localStorage>`u`?null:localStorage.getItem(cl)}catch{return null}}function pl(){return ul===void 0&&(ul=fl()),ul}function ml(e){ul=e;try{typeof localStorage<`u`&&localStorage.setItem(cl,e)}catch{}try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(ll,{detail:e}))}catch{}}function hl(e){return e?pl()!==dl():!1}function gl(){ml(dl())}function _l(e){let t=[];return t.push(`You are Mavéa, an AI presence. Generate a concise morning brief (max 3 items). Use real, grounded information only — no invented data, no placeholder numbers.`),e.length>0&&(t.push(``),t.push(`They recently discussed: ${e.join(`, `)}.`)),t.push(``),t.push(`Produce exactly 3 blocks in a warm, alive morning format using only insight, text, or list block types. Start your response with a single short narration sentence — natural and calm, like "Here's your morning." or "Good morning. Here's a brief look at your day." — then emit the blocks. Do not explain what you are doing; just deliver the brief.`),t.join(`
20
- `)}var vl=99;function yl(e){return e>vl?`${vl}+`:String(e)}function bl(){for(let e of mr()){let t=_r(e.id),n=e.lessons.length;if(!n)continue;let r=e.lessons.filter(e=>t.lessons[e.id]?.status===`done`).length;if(!(r>=n)&&(r!==0||t.current!==0))return{title:e.title,sub:`Lesson ${Math.min(t.current+1,n)} of ${n}`}}return null}function xl(e){let t=(0,J.c)(16),{onStudy:n}=e,r=Wn(),i;if(t[0]!==r||t[1]!==n){if(i=[],r){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,W.jsx)(z.layers,{}),t[3]=e):e=t[3];let a;t[4]===r.count?a=t[5]:(a=yl(r.count),t[4]=r.count,t[5]=a);let o=`${a} card${r.count===1?``:`s`}`,s;t[6]!==r.label||t[7]!==n||t[8]!==o?(s={key:`cards`,icon:e,title:o,sub:r.label,action:`Study`,onPick:n},t[6]=r.label,t[7]=n,t[8]=o,t[9]=s):s=t[9],i.push(s)}let e;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=bl(),t[10]=e):e=t[10];let a=e;if(a){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,W.jsx)(z.play,{}),t[11]=e):e=t[11];let n;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(n={key:`course`,icon:e,title:a.title,sub:a.sub,action:`Continue`,onPick:Cl},t[12]=n):n=t[12],i.push(n)}t[0]=r,t[1]=n,t[2]=i}else i=t[2];let a=i;if(!a.length)return null;let o;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,W.jsx)(`span`,{className:`card-eyebrow`,children:`Ready when you are`}),t[13]=o):o=t[13];let s;return t[14]===a?s=t[15]:(s=(0,W.jsxs)(`section`,{className:`ready-shelf go-study`,children:[o,(0,W.jsx)(`ul`,{className:`ready-list`,children:a.map(Sl)})]}),t[14]=a,t[15]=s),s}function Sl(e){return(0,W.jsx)(`li`,{children:(0,W.jsxs)(`button`,{type:`button`,className:`ready-item`,onClick:e.onPick,children:[(0,W.jsx)(`span`,{className:`ready-icon`,"aria-hidden":!0,children:e.icon}),(0,W.jsxs)(`span`,{className:`ready-copy`,children:[(0,W.jsx)(`span`,{className:`ready-title`,children:e.title}),(0,W.jsx)(`span`,{className:`ready-sub`,children:e.sub})]}),(0,W.jsx)(`span`,{className:`ready-go`,children:e.action})]})},e.key)}function Cl(){window.location.hash=`#/courses`}function wl(e){return e.type===`flashcard`&&Array.isArray(e.props?.cards)}function Tl(e){return e.replace(/<[^>]+>/g,``).trim()}function El(e){let t=[];for(let n of e){if(!wl(n))continue;let e=n;for(let n of e.props.cards){let e=Tl(n.front??``),r=Tl(n.back??``);!e||!r||t.push({front:e,back:r,tag:n.tag?Tl(n.tag):void 0})}}return t}function Q(e){return Tl(e??``).trim()}function Dl(e){let t=[],n=(e,n,r)=>{let i=Q(e),a=Q(n);i&&a&&t.push({front:i,back:a,tag:Q(r)||void 0})};switch(e.type){case`flashcard`:for(let t of e.props.cards??[])n(t.front,t.back,t.tag);break;case`faq`:for(let t of e.props.items??[])n(t.q,t.a,t.tag);break;case`deflist`:for(let t of e.props.items??[])n(t.term,t.def,t.tag);break;case`quiz`:{let t=(e.props.options??[]).filter(e=>e.correct).map(e=>Q(e.text)).filter(Boolean);if(t.length){let r=Q(e.props.explanation),i=r?`${t.join(`; `)} — ${r}`:t.join(`; `);n(e.props.question,i)}break}}return t}var Ol=[`title`,`label`,`heading`,`name`,`question`,`caption`,`eyebrow`],kl=[`summary`,`narrative`,`detail`,`sub`,`body`,`text`,`prose`,`def`,`a`];function Al(e){return e.props??{}}function jl(e,t){for(let n of t){let t=e[n];if(typeof t==`string`){let e=Q(t);if(e)return e}}return``}function Ml(e){return jl(Al(e),Ol).slice(0,140)||ie(e)}function Nl(e){return jl(Al(e),kl).slice(0,400)}function Pl(e){return{front:Ml(e),back:Nl(e)}}function Fl(e){let t=[],n=Ml(e);n&&t.push(n);for(let[,r]of Object.entries(Al(e)))if(typeof r==`string`){let e=Q(r);e&&e!==n&&t.push(e)}else if(Array.isArray(r)){for(let e of r.slice(0,12))if(typeof e==`string`){let n=Q(e);n&&t.push(n)}else if(e&&typeof e==`object`)for(let n of[`label`,`text`,`term`,`def`,`q`,`a`,`name`,`value`,`title`]){let r=e[n];if(typeof r==`string`){let e=Q(r);e&&t.push(e)}}}return[...new Set(t)].join(`
21
- `).slice(0,1400)}function Il(e){let t=Dl(e);return t.length?{cards:t,exact:!0}:{cards:[Pl(e)],exact:!1}}var Ll=`You write flashcards the way a strong student does: atomic (one idea per card), concise (no long prose), and focused on what is worth memorising — key facts, definitions and terms, formulas, cause→effect, and a single concrete example when it aids recall. The FRONT is a clear question or cue; the BACK is the shortest complete answer. Use ONLY information present in the source text — never add facts not stated there. Return 1–4 cards as JSON of the form {"cards":[{"front":"…","back":"…"}]}.`,Rl={type:`object`,properties:{cards:{type:`array`,minItems:1,maxItems:4,items:{type:`object`,properties:{front:{type:`string`},back:{type:`string`}},required:[`front`,`back`]}}},required:[`cards`]};function zl(e){let t=e;if(typeof e==`string`){let n=e.trim();try{t=JSON.parse(n)}catch{let e=n.match(/\{[\s\S]*\}/);if(!e)return[];try{t=JSON.parse(e[0])}catch{return[]}}}let n=t?.cards;if(!Array.isArray(n))return[];let r=[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=Q(String(e.front??``)).slice(0,300),n=Q(String(e.back??``)).slice(0,600);t&&n&&r.push({front:t,back:n})}return r.slice(0,4)}async function Bl(e,t,n){let r=Fl(e);if(!r)return[];let i=jn(t.model)===`slow`?480:640;try{let e=await Ht(t.provider).generate({system:Ll,systemBase:Ll,history:[],user:`Source (from the answer the user is studying):\n"""\n${r}\n"""\n\nWrite the flashcards now.`,maxTokens:i,temperature:0,thinkingLevel:`minimal`,format:Rl,...n?{signal:n}:{}},t);return n?.aborted?[]:zl(e.raw)}catch{return[]}}var Vl=`tour-neural-networks`,Hl=`neural`,Ul=[{id:`loop`,title:`The learning loop`,minutes:8,goal:`See the guess-measure-adjust cycle every network repeats to learn.`,objectives:[`Name the three steps a network learns by`,`Read what a training curve is telling you`,`Explain what a "weight" is in one sentence`],concepts:[`training loop`,`loss`,`weights`],checkpoint:[{question:`What are the three repeating steps a network learns by?`,answer:`Make a guess (forward pass), measure the error (loss), then nudge the weights to shrink it.`},{question:`When a training curve slopes downward, what is falling?`,answer:`The loss — the network is getting the answer wrong by less on each pass.`}]},{id:`neuron`,title:`Inside a single neuron`,minutes:7,goal:`Open up one neuron and watch it turn inputs into a decision.`,objectives:[`Compute a weighted sum of inputs plus a bias`,`Explain why an activation is needed at all`],concepts:[`weighted sum`,`activation function`,`bias`]},{id:`backprop`,title:`How it assigns blame`,minutes:10,goal:`Follow the error backward so the network knows which weights to change.`,objectives:[`State gradient descent in one line`,`Describe what backpropagation actually updates`],concepts:[`gradient descent`,`backpropagation`]},{id:`data`,title:`Why data and depth matter`,minutes:8,goal:`Understand what more layers and more examples buy you — and where they hurt.`,objectives:[`Relate depth to the abstractions a network can form`,`Explain overfitting in a single sentence`],concepts:[`depth`,`generalization`,`overfitting`]},{id:`tuning`,title:`Making it learn well`,minutes:9,goal:`Meet the handful of dials that decide whether training works at all.`,objectives:[`Explain what the learning rate controls`,`Say why training happens in batches`],concepts:[`learning rate`,`batch size`,`epochs`]}];function Wl(){let e=vr(Vl);if(e)return e;let t=Jr(Hl)?.frames[0];if(!t)return null;let n={id:Vl,topic:`how neural networks learn`,title:`How neural networks learn`,subtitle:`From one neuron to a trained model, in five short sittings.`,level:`beginner`,lessons:Ul,createdAt:Date.now(),model:`tour`};return gr(n),br(Vl,Ul[0].id,t),n}var Gl=24e3,Kl=Gl*180,ql=[],Jl=null,Yl=[],Xl=0,Zl=!1,Ql=!1,$l=1,eu=0,tu=new Set;function nu(){eu+=1;for(let e of tu)e()}function ru(e){return tu.add(e),()=>tu.delete(e)}function iu(){return eu}function au(){return Xl/Gl}function ou(){ql=[],Jl=null,Yl=[],Xl=0,$l=Oe(),Zl=!0,nu()}function su(){Zl=!1,Jl=null,nu()}function cu(e){Ql=e}function lu(e){if(!Zl||Ql)return;let t=Yl[Yl.length-1];t&&t.blocks===e||Yl.push({t:au(),blocks:e})}var uu={begin(e){!Zl||Ql||(Jl={text:e,chunks:[],samples:0})},push(e){!Zl||Ql||!Jl||Xl+e.length>Kl||(Jl.chunks.push(e),Jl.samples+=e.length,Xl+=e.length)},end(e){if(!(!Zl||!Jl)){if(Ql){Xl-=Jl.samples,Jl=null;return}e&&Jl.samples>0?ql.push(Jl):Xl-=Jl.samples,Jl=null,nu()}}};function du(){let e=ql.reduce((e,t)=>e+t.samples,0);if(e===0)return null;let t=new Float32Array(e),n=[],r=0;for(let e of ql){let i=r/Gl;for(let n of e.chunks)t.set(n,r),r+=n.length;n.push({text:e.text,t0:i,t1:r/Gl})}let i=e/Gl;return{pcm:t,sampleRate:Gl,duration:i,spans:n,marks:Yl.map(e=>({t:Math.min(e.t,i),blocks:e.blocks})),speed:$l}}function fu(e,t){let n=0;for(let r of e.marks){if(r.t>t)break;n=r.blocks}return n}var pu=e=>e.saySpoken??e.say??``;function mu(e){let t=new Map;for(let n of e){let e=ye(Se(pu(n)));e&&!t.has(e)&&t.set(e,n.index)}return t}function hu(e,t,n,r){if(t>=e.duration-.05)return r;let i=fu(e,t),a=mu(n);for(let r of e.spans){if(r.t0>t)break;let e=a.get(r.text)??n.find(e=>e.say===r.text||e.saySpoken===r.text)?.index;e!==void 0&&(i=Math.max(i,e+1))}return Math.max(1,Math.min(i,r))}var gu=72e5,_u=class{budget;map=new Map;constructor(e=gu){this.budget=e}set(e,t){this.map.delete(e),this.map.set(e,t),this.evict(e)}get(e){return this.map.get(e)??null}get size(){return this.map.size}total(){let e=0;for(let t of this.map.values())e+=t.pcm.length;return e}evict(e){let t=[...this.map.keys()],n=0;for(;this.total()>this.budget&&this.map.size>1&&n<t.length;){let r=t[n++];r!==e&&this.map.delete(r)}}},vu=[1,1.25,1.5,2,.75];function yu(e){return`${Number.isInteger(e)?e:e.toFixed(2).replace(/0+$/,``).replace(/\.$/,``)}×`}function bu(e){return Math.min(2,Math.max(.75,e))}function xu(e){let t=vu.indexOf(bu(e));return vu[(t<0?0:t+1)%vu.length]}function Su(e,t){let n=e.length*2,r=new ArrayBuffer(44+n),i=new DataView(r),a=(e,t)=>{for(let n=0;n<t.length;n++)i.setUint8(e+n,t.charCodeAt(n))};a(0,`RIFF`),i.setUint32(4,36+n,!0),a(8,`WAVE`),a(12,`fmt `),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,t,!0),i.setUint32(28,t*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),a(36,`data`),i.setUint32(40,n,!0);for(let t=0;t<e.length;t++){let n=Math.max(-1,Math.min(1,e[t]));i.setInt16(44+t*2,Math.round(n*(n<0?32768:32767)),!0)}return r}function Cu(e,t){let n=new Blob([Su(e,t)],{type:`audio/wav`});return URL.createObjectURL(n)}var wu=160;function Tu(e){let t=Math.max(1,Math.floor(e.pcm.length/wu)),n=[];for(let r=0;r<wu;r++){let i=0,a=r*t,o=Math.min(e.pcm.length,a+t);for(let t=a;t<o;t++){let n=Math.abs(e.pcm[t]);n>i&&(i=n)}n.push(i)}return n}var Eu={recording:{title:`Preparing voice scrub`,hint:`It appears here as soon as Mavéa finishes speaking.`},muted:{title:`Voice was muted`,hint:`Unmute before the next answer to capture a scrub track.`},offline:{title:`Voice is off`,hint:`Start the local TTS service to hear and scrub future answers.`},past:{title:`Voice scrub lives on the latest answer`,hint:`Return to live to replay the current spoken track.`},missing:{title:`No voice track captured`,hint:`The answer is still here as captions, but there is no audio to scrub.`}};function Du(e){let t=(0,J.c)(8),{reason:n}=e,r=Eu[n],i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,W.jsx)(`span`,{className:`voice-scrub-empty-dot`,"aria-hidden":`true`}),t[0]=i):i=t[0];let a;t[1]===r.title?a=t[2]:(a=(0,W.jsx)(`span`,{className:`voice-scrub-empty-title`,children:r.title}),t[1]=r.title,t[2]=a);let o;t[3]===r.hint?o=t[4]:(o=(0,W.jsx)(`span`,{className:`voice-scrub-empty-hint`,children:r.hint}),t[3]=r.hint,t[4]=o);let s;return t[5]!==a||t[6]!==o?(s=(0,W.jsxs)(`div`,{className:`voice-scrub voice-scrub--empty`,role:`status`,"aria-label":`Voice scrub unavailable`,children:[i,(0,W.jsxs)(`span`,{className:`voice-scrub-empty-copy`,children:[a,o]})]}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function Ou({audio:e,t,onSeek:n}){let r=(0,U.useRef)(null),i=(0,U.useRef)(null),a=(0,U.useMemo)(()=>Tu(e),[e]),o=(0,U.useRef)(!1),s=(0,U.useRef)(null),c=(0,U.useRef)(null),[l,u]=(0,U.useState)(!1),[d,f]=(0,U.useState)(null),p=d??t,[m,h]=Xt(),g=bu(m.voiceSpeed),_=g/(e.speed||1),v=(0,U.useRef)(_);v.current=_;let y=(0,U.useCallback)(()=>{c.current?.stop(),c.current=null,u(!1)},[]),b=(0,U.useCallback)(t=>{if(y(),!L())return;n(t),f(t),s.current||=Cu(e.pcm,e.sampleRate);let r=new Audio(s.current);r.preservesPitch=!0,r.webkitPreservesPitch=!0,r.playbackRate=v.current,r.currentTime=t,t>0&&r.addEventListener(`loadedmetadata`,()=>{Math.abs(r.currentTime-t)>.05&&(r.currentTime=t)},{once:!0});let i=N(r);r.play().catch(()=>{});let a=0,o=()=>{if(r.ended||r.currentTime>=e.duration){l(),c.current=null,u(!1),f(null),n(null);return}f(r.currentTime),a=requestAnimationFrame(o)},l=()=>{cancelAnimationFrame(a);try{r.pause(),r.removeAttribute(`src`)}catch{}i()};c.current={stop:l,el:r},u(!0),a=requestAnimationFrame(o)},[e,n,y]),x=(0,U.useCallback)(()=>{if(c.current){let e=c.current.el.currentTime;y(),f(null),n(e)}else b(p??0)},[p,b,y,n]),S=(0,U.useCallback)(()=>{h({voiceSpeed:xu(g)})},[h,g]);(0,U.useEffect)(()=>{c.current&&(c.current.el.playbackRate=_)},[_]),(0,U.useEffect)(()=>()=>{y(),s.current&&=(URL.revokeObjectURL(s.current),null)},[e,y]),(0,U.useEffect)(()=>{let t=r.current;if(!t)return;let n=window.devicePixelRatio||1,i=t.clientWidth,o=t.clientHeight;if(!i||!o)return;t.width=i*n,t.height=o*n;let s=t.getContext(`2d`);if(!s)return;s.scale(n,n),s.clearRect(0,0,i,o);let c=getComputedStyle(t),l=c.getPropertyValue(`--scrub-played`).trim()||`#8a93f8`,u=c.getPropertyValue(`--scrub-rest`).trim()||`#5c647833`,d=p===null?1:Math.max(0,Math.min(1,p/e.duration)),f=i/wu;for(let e=0;e<wu;e++){let t=Math.max(.06,a[e])*(o-4);s.fillStyle=e/wu<=d?l:u,s.fillRect(e*f+f*.2,(o-t)/2,f*.6,t)}},[e,a,p]),(0,U.useEffect)(()=>{f(null)},[e]);let C=t=>{let n=i.current.getBoundingClientRect();return n.width?Math.max(0,Math.min(1,(t-n.left)/n.width))*e.duration:0};return(0,W.jsxs)(`div`,{className:`voice-scrub`,children:[(0,W.jsx)(`button`,{type:`button`,className:`voice-scrub-play`,onPointerDown:e=>e.stopPropagation(),onClick:x,"aria-label":l?`Pause`:`Play the spoken answer`,title:l?`Pause`:`Play from here`,children:l?(0,W.jsxs)(`svg`,{viewBox:`0 0 12 12`,width:`13`,height:`13`,"aria-hidden":`true`,children:[(0,W.jsx)(`rect`,{x:`2.5`,y:`2`,width:`2.4`,height:`8`,rx:`0.6`,fill:`currentColor`}),(0,W.jsx)(`rect`,{x:`7.1`,y:`2`,width:`2.4`,height:`8`,rx:`0.6`,fill:`currentColor`})]}):(0,W.jsx)(`svg`,{viewBox:`0 0 12 12`,width:`13`,height:`13`,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M3.2 2.2 L10 6 L3.2 9.8 Z`,fill:`currentColor`})})}),(0,W.jsx)(`button`,{type:`button`,className:`voice-scrub-rate`,onPointerDown:e=>e.stopPropagation(),onClick:S,"aria-label":`Speed, currently ${yu(g)}. Tap to change.`,title:`Voice speed`,children:yu(g)}),(0,W.jsxs)(`div`,{ref:i,className:`voice-scrub-body`,role:`slider`,"aria-label":`Scrub the spoken answer`,"aria-valuemin":0,"aria-valuemax":Math.round(e.duration),"aria-valuenow":Math.round(p??e.duration),tabIndex:0,onPointerDown:e=>{o.current=!0,y(),f(null);try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}n(C(e.clientX),!0)},onPointerMove:e=>{o.current&&n(C(e.clientX),!0)},onPointerUp:e=>{o.current&&(o.current=!1,b(C(e.clientX)))},onKeyDown:t=>{let r=p??e.duration;t.key===`ArrowLeft`&&(y(),f(null),n(Math.max(0,r-2),!0)),t.key===`ArrowRight`&&(y(),f(null),n(Math.min(e.duration,r+2),!0)),(t.key===` `||t.key===`Enter`)&&(t.preventDefault(),x()),t.key===`Escape`&&(y(),f(null),n(null))},children:[(0,W.jsx)(`canvas`,{ref:r,className:`voice-scrub-wave`,"aria-hidden":`true`}),(0,W.jsx)(`span`,{className:`voice-scrub-hint`,children:l?`playing — tap pause or drag to scrub`:p===null?`play, or drag to rewind the voice`:`the canvas is rebuilt to this moment`})]})]})}function ku({audio:e,t,onSeek:n,unavailable:r=`missing`}){return e?(0,W.jsx)(Ou,{audio:e,t,onSeek:n}):(0,W.jsx)(Du,{reason:r})}function Au(){let e=(0,J.c)(16),[t,n]=Xt(),r;e[0]===t.voiceSpeed?r=e[1]:(r=bu(t.voiceSpeed),e[0]=t.voiceSpeed,e[1]=r);let i=r,a,o;e[2]===i?(a=e[3],o=e[4]):(a=()=>{Te(i)},o=[i],e[2]=i,e[3]=a,e[4]=o),(0,U.useEffect)(a,o);let s;e[5]!==n||e[6]!==i?(s=()=>n({voiceSpeed:xu(i)}),e[5]=n,e[6]=i,e[7]=s):s=e[7];let c=s,l;e[8]===i?l=e[9]:(l=yu(i),e[8]=i,e[9]=l);let u=`Voice speed, currently ${l}. Tap to change.`,d;e[10]===i?d=e[11]:(d=yu(i),e[10]=i,e[11]=d);let f;return e[12]!==c||e[13]!==u||e[14]!==d?(f=(0,W.jsx)(`button`,{type:`button`,className:`voice-speed`,onClick:c,"aria-label":u,title:`How fast Mavéa speaks`,children:d}),e[12]=c,e[13]=u,e[14]=d,e[15]=f):f=e[15],f}var ju={standard:`deep`,deep:`simple`,simple:`standard`},Mu={simple:`Simple`,standard:`Standard`,deep:`In-depth`};function Nu(){let e=(0,J.c)(8),[t,n]=Xt(),r=t.explainLevel,i;e[0]!==r||e[1]!==n?(i=()=>n({explainLevel:ju[r]}),e[0]=r,e[1]=n,e[2]=i):i=e[2];let a=i,o=`explain-chip`+(r===`simple`?` is-simple`:r===`deep`?` is-deep`:``),s=`Explanation level: ${Mu[r]}. Tap for ${Mu[ju[r]]}.`,c=Mu[r],l;return e[3]!==a||e[4]!==o||e[5]!==s||e[6]!==c?(l=(0,W.jsx)(`button`,{type:`button`,className:o,onClick:a,"aria-label":s,title:`How plain or rigorous the words and visuals are — or just say 'explain it simpler' / 'go deeper'`,children:c}),e[3]=a,e[4]=o,e[5]=s,e[6]=c,e[7]=l):l=e[7],l}var Pu=[`You catch a HALF-SPOKEN question, still being said. Reply ONLY with JSON:`,`{"ghosts":[{"kind":"forming"|"maybe","title":"..."}]}`,`2-3 entries: the visual cards you would build if the sentence ended right now.`,`"forming" = clearly needed for what was said so far; "maybe" = a plausible direction the sentence is heading.`,`Each title ≤ 6 words, concrete (e.g. "Bloom forecast", "Late-April flights"). No prose, no other keys.`].join(`
22
- `),Fu=150;function Iu(e){try{let t=(typeof e==`string`?JSON.parse(e.match(/\{[\s\S]*\}/)?.[0]??`{}`):e).ghosts;return Array.isArray(t)?t.map(e=>{let t=e,n=typeof t.title==`string`?t.title.trim().slice(0,48):``;return n?{kind:t.kind===`maybe`?`maybe`:`forming`,title:n}:null}).filter(e=>e!==null).slice(0,3):[]}catch{return[]}}async function Lu(e,t,n){try{let r=await Ht(t.provider).generate({system:Pu,history:[],user:e,maxTokens:Fu,signal:n},t);return n.aborted?[]:Iu(r.raw)}catch{return[]}}var Ru=80,zu=120;function Bu(e,t){return e.length>t?`${e.slice(0,t-1)}…`:e}function Vu(e){if(!e)return``;if(/[\s.!?,;:]$/.test(e))return e.trim();let t=e.trimEnd();return/\s/.test(t)?t.replace(/\S+$/,``).trim():``}function Hu(e){return e.replace(/([.!?])\s+/g,`$1\0`).replace(/\s+(?=\b(?:but |and i |and she |and he |and they |and dad|and mom|and my |so i |so she |so he |honestly |actually |i keep |i also |i've |i just |the thing is |i mean |i don't know)\b)/gi,`\0`).split(`\0`).map(e=>e.trim()).filter(e=>e.length>=8)}function Uu(e){return Bu(e.trim(),zu)}function Wu(e){let t=e.replace(/^(?:okay|so|like|i mean|well|um|uh|you know|honestly|actually|look|i just|and|but|i think|i guess|i suppose|you see)\s+/gi,``);return Bu(t.charAt(0).toUpperCase()+t.slice(1),Ru)}var Gu=/\b(Dad|Mom|Mum|Papa|Mama|Grandpa|Grandma|Grandad|Nan|Nana|Uncle|Auntie)\b(?:'s)?/,Ku=/\b(?:my|his|her|their|our)\s+(dad|father|mom|mother|sister|brother|son|daughter|wife|husband|partner|friend|boss|manager|co-?founder|colleague|mentor|coach|therapist|doctor|lawyer|ex)\b/i,qu=/\b([A-Z][a-z]{2,12})(?:'s)?\s+(?:just|started|always|keeps?|is|was|has|have|said|told|wants?|needs?|feels?|thinks?|loves?|hates?|came|went|left|got|has|moved|called|texted)\b/,Ju=new Set(`March.January.February.April.June.July.August.September.October.November.December.Monday.Tuesday.Wednesday.Thursday.Friday.Saturday.Sunday.Seattle.Austin.Portland.Chicago.Boston.Denver.Atlanta.New.York.Los.San.Las`.split(`.`)),Yu=/\b(?:should i|whether to|thinking about|considering|one option|maybe i should|alternatively|or i could|or i might|could (?:also )?(?:go|stay|take|move|leave|try|do|join|accept|turn)|(?:an?|this|that|the)\s+offer|an? (?:opportunity|position|role|deal)|option (?:is|would be))\b/i,Xu=/\b(?:scared|afraid|fear|worried about|anxious|terrified|dreading|dread|what if|might fail|not (?:going to )?work|won'?t work|going wrong|could go wrong|nervous|i'?m (?:just |really )?scared|i'?m worried)\b/i,Zu=/\b(?:can'?t|cannot|have to|has to|must|deadline|budget|mortgage|my lease|loan|runway|no choice|tied (?:to|down)|stuck|limited|only (?:have|got) (?:\w+ )?\d|only \d+ months?|no time|no money|not (?:enough|possible)|running out)\b/i,Qu=/(?:\?)|(?:\b(?:i don'?t know|not sure|can'?t decide|i keep going back and forth|i keep (?:asking|wondering|second.?guessing)|haven'?t decided|still figuring|up in the air|i wonder|no idea|is it even|is it the right|is this (?:the right|a|even)|what (?:do|should) i)\b)/i,$u=/\b(?:i (?:really )?want|i wish|i hope|would (?:really )?love|i'?ve always wanted|would like|i dream|my goal|i aspire|i'?m looking for|i need (?:to )?(?:feel|be|have|find|do)|i want to (?:feel|be|have|find|do))\b/i;function ed(e){let t=Hu(e),n=[],r=new Set,i=0,a=0,o=0,s=0,c=0,l=0;function u(e,t,i,a){let o=typeof i==`string`?Bu(i,Ru):Wu(a),s=`${t}:${o.toLowerCase().slice(0,20)}`;if(r.has(s))return;r.add(s);let c=Uu(a);c&&n.push({id:e,kind:t,label:o,quote:c,status:`forming`,confidence:`said`,weight:1})}for(let e of t){let t=e.match(Ku);if(t){let n=t[1],r=n.charAt(0).toUpperCase()+n.slice(1);u(`per_${i++}`,`person`,r,e)}let n=e.match(Gu);n&&!t&&u(`per_${i++}`,`person`,n[1],e);let r=e.match(qu);if(r){let t=r[1];Ju.has(t)||u(`per_${i++}`,`person`,t,e)}Yu.test(e)&&u(`opt_${a++}`,`option`,Wu(e),e),Xu.test(e)&&u(`fea_${o++}`,`fear`,Wu(e),e),Zu.test(e)&&u(`con_${s++}`,`constraint`,Wu(e),e),Qu.test(e)&&u(`loo_${c++}`,`open_loop`,Wu(e),e),$u.test(e)&&u(`wan_${l++}`,`want`,Wu(e),e)}return n}function td(e){let t=Hu(e);return t.length>0?t.length:+!!e.trim()}var nd=700,rd=4,id=3;function ad(e,t,n,r){let i=(0,J.c)(19),a=r!==void 0&&r,o;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[],i[0]=o):o=i[0];let[s,c]=(0,U.useState)(o),l=(0,U.useRef)(0),u=(0,U.useRef)(``),d=(0,U.useRef)(null),f,p;i[1]===e?(f=i[2],p=i[3]):(f=()=>{l.current=0,u.current=``,e||(d.current?.abort(),c([]))},p=[e],i[1]=e,i[2]=f,i[3]=p),(0,U.useEffect)(f,p);let m,h;i[4]===a?(m=i[5],h=i[6]):(m=()=>{a&&(d.current?.abort(),c([]))},h=[a],i[4]=a,i[5]=m,i[6]=h),(0,U.useEffect)(m,h);let g,_;i[7]!==n||i[8]!==e||i[9]!==t||i[10]!==a?(g=()=>{if(!e||!n||a)return;let r=Vu((t??``).trim());if(r.split(/\s+/).filter(Boolean).length<rd||r===u.current||l.current>=id)return;let i=window.setTimeout(()=>{u.current=r,l.current+=1,d.current?.abort();let e=new AbortController;d.current=e,Lu(r,n,e.signal).then(t=>{!e.signal.aborted&&t.length&&c(t)})},nd);return()=>window.clearTimeout(i)},_=[e,t,n,a],i[7]=n,i[8]=e,i[9]=t,i[10]=a,i[11]=g,i[12]=_):(g=i[11],_=i[12]),(0,U.useEffect)(g,_);let v,y;i[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>()=>d.current?.abort(),y=[],i[13]=v,i[14]=y):(v=i[13],y=i[14]),(0,U.useEffect)(v,y);let b;return i[15]!==s||i[16]!==e||i[17]!==a?(b=e&&!a?s:[],i[15]=s,i[16]=e,i[17]=a,i[18]=b):b=i[18],b}function od({ghosts:e}){return e.length===0?null:(0,W.jsx)(`div`,{className:`ghost-row`,"aria-hidden":`true`,children:e.map((e,t)=>(0,W.jsxs)(`div`,{className:`ghost-card is-`+e.kind,style:{"--gi":t},children:[(0,W.jsxs)(`span`,{className:`ghost-kind`,children:[`◌ `,e.kind===`forming`?`Forming`:`Maybe`]}),(0,W.jsx)(`span`,{className:`ghost-title`,children:e.title}),(0,W.jsxs)(`span`,{className:`ghost-bones`,children:[(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{})]})]},e.title))})}var sd=2e3,cd=350,ld={type:`object`,properties:{id:{type:`string`},kind:{type:`string`,enum:[`person`,`option`,`want`,`fear`,`constraint`,`tradeoff`,`contradiction`,`open_loop`,`action`,`value`,`question`]},label:{type:`string`},quote:{type:`string`},status:{type:`string`},confidence:{type:`string`},weight:{type:`number`}},required:[`id`,`kind`,`label`,`quote`]},ud={type:`object`,properties:{from:{type:`string`},to:{type:`string`},kind:{type:`string`,enum:[`supports`,`tensions`,`depends_on`,`same_thread`,`blocks`]},label:{type:`string`}},required:[`from`,`to`,`kind`]},dd={type:`object`,properties:{center:{type:`string`},title:{type:`string`},atoms:{type:`array`,minItems:1,items:ld},links:{type:`array`,items:ud},clusters:{type:`array`,items:{type:`object`,properties:{id:{type:`string`},label:{type:`string`},atomIds:{type:`array`,items:{type:`string`}},weight:{type:`number`}},required:[`id`,`label`,`atomIds`]}},unsaid:{type:`object`,properties:{label:{type:`string`},why:{type:`string`},confidence:{type:`string`}}}},required:[`center`,`atoms`]},fd={type:`object`,properties:{add:{type:`array`,items:ld},addLinks:{type:`array`,items:ud}}},pd=`You are Mavéa, a listening companion that mirrors the shape of thought. A person has been thinking aloud — sometimes weighing a personal decision (wants, fears, options), sometimes exploring a subject they're curious about (questions, threads, sub-topics). Extract the structure of their thinking into a "mindshape" — NOT to give advice, judge, or add ideas not present in their words.
23
-
24
- Find WHAT IS ACTUALLY THERE and WHAT CONNECTS OR PULLS AGAINST WHAT. Choose the kind that genuinely fits each atom — never default everything to one kind.
25
-
26
- ATOM KINDS:
27
- - question: a subject, topic, or thing they are curious about or want to understand — the DEFAULT for exploratory/learning thinking ("how cars reshaped cities", "what came before the wheel")
28
- - option: a concrete path, sub-area, or choice they are considering
29
- - action: a concrete step they could take or are taking
30
- - want: a genuine desire or goal, stated as wanting something — NOT a topic they are merely exploring
31
- - fear: what worries or scares them
32
- - constraint: a real limitation (time, money, geography, commitment, obligation)
33
- - tradeoff: a genuine cost-benefit tension in a single choice
34
- - open_loop: an unresolved question or loose thread they keep circling but haven't answered
35
- - value: a principle that matters to them (only when explicitly stated)
36
- - person: a real person mentioned by name or relationship — and what they want, said, or are affected by. A card reading only "Priya" tells the reader nothing; "Priya wants to batch the writes" is the thought. Never emit a bare name.
37
-
38
- Pick deliberately: a subject of curiosity is a question, a sub-area or path is an option, an unknown they circle is an open_loop; reserve want for an actual stated desire. A map where every atom is the same kind is wrong — make the kinds reflect the real variety in what they said.
39
-
40
- COVER EVERYTHING THEY SAID. Every distinct thought gets its own atom. Do not compress five spoken thoughts into two tidy ones, and do not drop the small concrete ones (a date, a budget, who wants what) because they seem minor — those are usually the constraints the whole decision turns on. If two sentences really are the same thought, merge them; otherwise keep both.
41
-
42
- LINK KINDS:
43
- - tensions: what genuinely conflicts or pulls against what — THE HERO LINK
44
- - supports: one thing enables or justifies another
45
- - depends_on: one thing requires another
46
- - same_thread: two atoms about the same underlying issue
47
-
48
- LABELS:
49
- Each atom's label is a short, plain-language sentence that sums up the idea in the person's own framing — a reader skimming only the labels should grasp the whole shape of the thinking. Write "Cars gave us freedom but reshaped cities around them", NOT a bare noun ("cars") or a filler prefix ("information on cars") or a category. ≤80 chars.
50
-
51
- CLUSTERS:
52
- Group the atoms into 2–5 themes that EMERGED from what they actually said. Name each theme in THEIR words and specifics — "the move to Seattle", "Maya and her school", "Dad getting older", "is it the right time" — NEVER an abstract category like "People", "Options", "Worries", "Constraints", or "Trade-offs". A theme must contain at least one atom (list its atom ids). Do not invent a theme to fill a slot — only name what is genuinely there. The themes are how the map is organized, so they must read as this person's own thoughts, not a generic form.
53
-
54
- HARD RULES:
55
- 1. Every atom MUST have a real quote — verbatim words from the transcript. No quote → no atom.
56
- 2. center = the inferred hidden question driving everything. Be SPECIFIC, not generic. ≤90 chars.
57
- 3. unsaid = ONE thing they kept circling but never said directly. Write its label as one complete plain-language sentence; confidence MUST be "maybe". label ≤120 chars, why ≤120 chars.
58
- 4. Find at least one tensions link if there is genuine conflict in the words.
59
- 5. NEVER use clinical/diagnostic language: trauma, PTSD, depression, anxiety disorder, attachment style, narcissism, codependency, dissociation, hypervigilance, personality disorder.
60
- 6. NEVER invent motives or interpretations beyond what the words contain.
61
- 7. label ≤80 chars (a short summarizing sentence, per LABELS above), quote ≤120 chars (verbatim from the transcript). cluster label ≤32 chars, content-specific.
62
-
63
- Reply with ONLY compact JSON — no prose, no markdown fences. The exact fields are given with each request.`;function md(e){return`TRANSCRIPT:
64
- ${e.trim()}
65
-
66
- Extract the full mindshape. Reply as compact JSON on ONE line (no whitespace, no markdown):
67
- {"center":"...","title":"...","atoms":[{"id":"...","kind":"...","label":"...","quote":"...","status":"stable","confidence":"said","weight":1}],"links":[{"from":"...","to":"...","kind":"tensions","label":"..."}],"clusters":[{"id":"...","label":"...","atomIds":["..."],"weight":1}],"unsaid":{"label":"...","why":"...","confidence":"maybe"}}`}function hd(e){return JSON.stringify({atoms:e.atoms.map(e=>({id:e.id,k:e.kind,l:e.label})),links:e.links.map(e=>[e.from,e.to,e.kind])})}function gd(e,t){return`NEW SPEECH (since last update):
68
- ${e.trim()}
69
-
70
- ALREADY ON THE MAP — reuse these ids, do NOT renumber or restate them:
71
- ${hd(t)}
72
-
73
- Return ONLY what the NEW speech ADDS, as compact JSON on ONE line (no whitespace, no markdown):
74
- {"add":[{"id":"...","kind":"...","label":"...","quote":"...","status":"stable","confidence":"said","weight":1}],"addLinks":[{"from":"...","to":"...","kind":"tensions","label":"..."}]}
75
- Only genuinely new atoms (each needs a verbatim quote from the NEW speech). Reuse an existing id only to update that exact atom. Omit "add" or "addLinks" when empty. Do NOT restate unchanged atoms, and do NOT include center, unsaid, clusters, or title — those come at settle.`}async function _d(e,t,n,r,i){try{let a=await Ht(r.provider).generate({system:pd,history:[],user:e,maxTokens:t,thinkingLevel:`minimal`,format:n,signal:i},r);return i?.aborted?null:a.raw}catch{return null}}async function vd(e,t,n){let r=await _d(md(e),sd,dd,t,n);return r===null?null:Ct(r,e)}async function yd(e,t,n,r,i){let a=await _d(gd(e,t),cd,fd,r,i);return a===null?null:yt(a,n)}function bd(e){if(e.atoms.length===0)return`general`;let t=0,n=0,r=0,i=0,a=0,o=0,s=0;for(let c of e.atoms)c.kind===`option`?t++:c.kind===`open_loop`?n++:c.kind===`action`?r++:c.kind===`question`?i++:c.kind===`fear`?a++:c.kind===`want`?o++:c.kind===`person`&&s++;let c=e.atoms.length,l=e.links.some(e=>e.kind===`tensions`&&!e.provisional);return t>=2&&l?`decision`:n+r>=3?`planning`:i/c>=.4?`exploration`:(a+o+s)/c>=.5?`processing`:`general`}var xd=6e3,Sd=8,Cd=1,wd=8,Td=4;function Ed(e){return e.trim()?e.trim().split(/\s+/).length:0}var Dd=24;function Od(e,t){let n=new Map(e.map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);t?(e.status===`stable`||t.status===`forming`)&&n.set(e.id,{...t,...e}):n.set(e.id,e)}return Array.from(n.values())}function kd(e){return e.toLowerCase().replace(/['’]/g,``).replace(/[^a-z0-9]+/g,` `).trim()}function Ad(e){return e.status===`stable`?2:+(e.status===`forming`)}function jd(e,t){if(t.atoms.length>=e.length)return t;let n=new Set(t.atoms.map(e=>kd(e.quote))),r=e.filter(e=>{let t=kd(e.quote);return!t||n.has(t)?!1:(n.add(t),!0)});return r.length?{...t,atoms:[...t.atoms,...r].slice(0,Dd)}:t}function Md(e,t){let n=new Map(e.atoms.map(e=>[e.id,e])),r=new Map(e.atoms.map(e=>[kd(e.quote),e.id]));for(let e of t.add){let t=n.get(e.id);if(t){n.set(e.id,{...t,...e});continue}let i=r.get(kd(e.quote));if(i&&n.has(i)){n.set(i,{...n.get(i),...e,id:i});continue}n.set(e.id,e),r.set(kd(e.quote),e.id)}let i=Array.from(n.values());i.length>Dd&&(i=[...i].sort((e,t)=>(t.weight??1)-(e.weight??1)||Ad(t)-Ad(e)).slice(0,Dd));let a=new Set(i.map(e=>e.id)),o=e=>`${e.from}|${e.to}|${e.kind}`,s=new Map(e.links.map(e=>[o(e),e]));for(let e of t.addLinks)s.set(o(e),e);let c=Array.from(s.values()).filter(e=>a.has(e.from)&&a.has(e.to));return{...e,atoms:i,links:c}}var Nd={center:``,atoms:[],links:[]};function Pd(e){let[t,n]=(0,U.useState)(`idle`),[r,i]=(0,U.useState)(!1),[a,o]=(0,U.useState)(null),s=(0,U.useRef)(`idle`),c=(0,U.useRef)(null),l=(0,U.useRef)(``),u=(0,U.useRef)(0),d=(0,U.useRef)(0),f=(0,U.useRef)(null),p=(0,U.useRef)(!1),m=(0,U.useRef)(new Set),h=(0,U.useRef)(e);(0,U.useEffect)(()=>{h.current=e},[e]);let g=e=>[`id:${e.id}`,`q:${kd(e.quote)}`];function _(e){return g(e).some(e=>m.current.has(e))}function v(e){if(m.current.size===0)return e;let t=e.atoms.filter(e=>!_(e));if(t.length===e.atoms.length)return e;let n=new Set(t.map(e=>e.id));return{...e,atoms:t,links:e.links.filter(e=>n.has(e.from)&&n.has(e.to)),clusters:e.clusters?.map(e=>({...e,atomIds:e.atomIds.filter(e=>n.has(e))})).filter(e=>e.atomIds.length>0)}}function y(e){s.current=e,n(e)}function b(e){c.current=e,o(e)}let x=(0,U.useCallback)(e=>{let t=e.filter(e=>!_(e));if(t.length===0)return;let n=c.current??Nd,r=Od(n.atoms,t);b({...n,atoms:r})},[]),S=(0,U.useCallback)(async e=>{let t=h.current;if(!t)return;let n=c.current;if(!n||n.atoms.length===0)return;f.current?.abort();let r=new AbortController;f.current=r;let i=e.slice(l.current.length).trim();l.current=e,u.current=Date.now(),d.current+=1,p.current=!0;try{let a=await yd(i,n,e,t,r.signal);if(r.signal.aborted||!a)return;b(v(Md(c.current??n,a)))}finally{r.signal.aborted||(p.current=!1)}},[]),C=(0,U.useCallback)(async e=>{let t=h.current;if(!t)return;f.current?.abort();let n=new AbortController;f.current=n,l.current=e,u.current=Date.now(),d.current+=1,p.current=!0;try{let r=await vd(e,t,n.signal);if(n.signal.aborted||!r)return;let i=Md(c.current??Nd,{add:r.atoms,addLinks:r.links});b(v({...i,center:r.center||i.center,clusters:r.clusters,unsaid:r.unsaid,title:r.title??i.title}))}finally{n.signal.aborted||(p.current=!1)}},[]),w=(0,U.useCallback)(async e=>{let t=h.current;if(!t)return;f.current?.abort();let n=new AbortController;f.current=n,l.current=e,u.current=Date.now(),d.current+=1,p.current=!0;try{let r=await vd(e,t,n.signal);if(n.signal.aborted)return;if(!r){i(!0);return}i(!1),b(jd(c.current?.atoms??[],r))}finally{n.signal.aborted||(p.current=!1)}},[]),T=(0,U.useCallback)(e=>{s.current===`idle`&&y(`listening`);let t=ed(e);x(t);let n=Ed(e),r=d.current>=wd,i=Date.now()-u.current<xd,a=!r&&!i&&!p.current;if((c.current?.atoms.length??0)===0){a&&n>=Td&&C(e);return}let o=n-Ed(l.current),f=t.filter(e=>!c.current?.atoms.some(t=>t.id===e.id)).length;a&&!(n<Td||o<Sd&&f<Cd)&&S(e)},[x,C,S]),E=(0,U.useCallback)(()=>{f.current?.abort(),f.current=null,p.current=!1,m.current.clear(),l.current=``,u.current=0,d.current=0,y(`idle`),b(null)},[]),D=(0,U.useCallback)((e=!0)=>{f.current?.abort(),f.current=null,p.current=!1,l.current=``,u.current=0,d.current=0,e||(m.current.clear(),b(null)),y(`listening`)},[]),O=(0,U.useCallback)(e=>{let t=c.current;if(!t)return;let n=t.atoms.find(t=>t.id===e);if(!n)return;g(n).forEach(e=>m.current.add(e));let r=t.atoms.filter(t=>t.id!==e),i=t.links.filter(t=>t.from!==e&&t.to!==e),a=t.clusters?.map(t=>({...t,atomIds:t.atomIds.filter(t=>t!==e)})).filter(e=>e.atomIds.length>0);b({...t,atoms:r,links:i,clusters:a})},[]),k=(0,U.useCallback)(()=>{let e=c.current;if(!e?.unsaid)return;let{unsaid:t}=e,n={id:`unsaid-confirmed`,kind:`open_loop`,status:`stable`,confidence:`inferred`,label:t.label,quote:t.why,weight:2},r=Od(e.atoms,[n]);b({...e,atoms:r,unsaid:void 0})},[]),A=(0,U.useCallback)(()=>{let e=c.current;if(!e?.unsaid)return;let{unsaid:t}=e;m.current.add(`q:${kd(t.label)}`),b({...e,unsaid:void 0})},[]),j=(0,U.useCallback)(e=>{if(!e.trim()){E();return}y(`pausing`),w(e).then(()=>{s.current===`pausing`&&y(`settled`)})},[w,E]);return(0,U.useEffect)(()=>()=>{f.current?.abort()},[]),{phase:t,spec:a,intent:(0,U.useMemo)(()=>a?bd(a):`general`,[a]),modelUnavailable:r,onTranscript:T,onSpeechEnd:j,removeAtom:O,confirmUnsaid:k,dismissUnsaid:A,reset:E,resume:D}}var Fd=5e3,Id=0;function Ld(e,t){let[n,r]=(0,U.useState)([]),i=(0,U.useRef)(new Set),a=(0,U.useCallback)((e,t)=>{let n=`sig-${++Id}`;r([{id:n,content:t,kind:e,expiresAt:Date.now()+Fd}])},[]);return(0,U.useEffect)(()=>{let e=n[0];if(!e)return;let t=Math.max(0,e.expiresAt-Date.now()),i=window.setTimeout(()=>{r(e=>e.filter(e=>e.expiresAt>Date.now()))},t);return()=>window.clearTimeout(i)},[n]),(0,U.useEffect)(()=>{t===`idle`&&(i.current.clear(),r([]))},[t]),(0,U.useEffect)(()=>{if(!e||t===`settled`||t===`idle`)return;let n=e.atoms.length,r=i.current;n>=4&&!r.has(`pattern`)&&(r.add(`pattern`),a(`pattern`,`A shape is forming…`)),e.links.some(e=>e.kind===`tensions`&&!e.provisional)&&!r.has(`tension`)&&(r.add(`tension`),a(`tension`,`I see a pull here…`)),e.unsaid&&!r.has(`unsaid`)&&(r.add(`unsaid`),a(`unsaid`,`There's something unsaid circling…`)),n>=8&&!r.has(`depth`)&&(r.add(`depth`),a(`depth`,`This runs deeper than one answer…`))},[e,t,a]),{currentSignal:n[0]??null}}function Rd(e){let t=(0,J.c)(30),{mindShape:n,onSettled:r,onAction:i,liveTranscript:a,thoughtCount:o,onConfirmUnsaid:s,onDismissUnsaid:c}=e,{phase:l,spec:u,intent:d}=n,f=(0,U.useRef)(!1),[p,m]=(0,U.useState)(!1),h=(0,U.useRef)(null),g,_;t[0]!==r||t[1]!==l?(g=()=>{l===`settled`&&!f.current&&(f.current=!0,r?.(),m(!0),h.current=setTimeout(()=>m(!1),1800))},_=[l,r],t[0]=r,t[1]=l,t[2]=g,t[3]=_):(g=t[2],_=t[3]),(0,U.useEffect)(g,_);let v,y;t[4]===l?(v=t[5],y=t[6]):(v=()=>{l===`idle`&&(f.current=!1,m(!1),h.current&&=(clearTimeout(h.current),null))},y=[l],t[4]=l,t[5]=v,t[6]=y),(0,U.useEffect)(v,y);let b,x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>()=>{h.current&&clearTimeout(h.current)},x=[],t[7]=b,t[8]=x):(b=t[7],x=t[8]),(0,U.useEffect)(b,x);let{currentSignal:S}=Ld(u,l),C=u?.center??``,w;t[9]===u?.atoms?w=t[10]:(w=u?.atoms??[],t[9]=u?.atoms,t[10]=w);let T;t[11]===u?.links?T=t[12]:(T=u?.links??[],t[11]=u?.links,t[12]=T);let E=u?.clusters,D=u?.unsaid,O=l===`settled`?void 0:a,k=l===`settled`?void 0:o,A;return t[13]!==S||t[14]!==d||t[15]!==p||t[16]!==n.modelUnavailable||t[17]!==n.removeAtom||t[18]!==i||t[19]!==s||t[20]!==c||t[21]!==l||t[22]!==E||t[23]!==D||t[24]!==O||t[25]!==k||t[26]!==C||t[27]!==w||t[28]!==T?(A=(0,W.jsx)(de,{asBlock:!1,phase:l,center:C,atoms:w,links:T,modelUnavailable:n.modelUnavailable,clusters:E,unsaid:D,intent:d,isRevealing:p,currentSignal:S,onAction:i,onRemoveAtom:n.removeAtom,onConfirmUnsaid:s,onDismissUnsaid:c,liveTranscript:O,thoughtCount:k}),t[13]=S,t[14]=d,t[15]=p,t[16]=n.modelUnavailable,t[17]=n.removeAtom,t[18]=i,t[19]=s,t[20]=c,t[21]=l,t[22]=E,t[23]=D,t[24]=O,t[25]=k,t[26]=C,t[27]=w,t[28]=T,t[29]=A):A=t[29],A}var zd=[{heading:`Options on the table`,kinds:[`option`]},{heading:`What I want`,kinds:[`want`,`value`]},{heading:`What worries me`,kinds:[`fear`,`contradiction`]},{heading:`Trade-offs`,kinds:[`tradeoff`]},{heading:`Constraints`,kinds:[`constraint`]},{heading:`People involved`,kinds:[`person`]},{heading:`Still open`,kinds:[`open_loop`,`question`]},{heading:`Things I could do`,kinds:[`action`]}];function Bd(e){let t=e.quote&&e.quote.trim()&&e.quote.trim()!==e.label?` ("${e.quote.trim()}")`:``;return`- ${e.label}${t}`}function Vd(e){let t=[];if(e.clusters&&e.clusters.length){let n=new Map(e.atoms.map(e=>[e.id,e])),r=new Set;for(let i of e.clusters){let e=i.atomIds.map(e=>n.get(e)).filter(e=>!!e);if(e.length){t.push(`${i.label}:`);for(let n of e)t.push(Bd(n)),r.add(n.id);t.push(``)}}let i=e.atoms.filter(e=>!r.has(e.id));if(i.length){t.push(`Also on my mind:`);for(let e of i)t.push(Bd(e));t.push(``)}}else for(let n of zd){let r=e.atoms.filter(e=>n.kinds.includes(e.kind));if(r.length){t.push(`${n.heading}:`);for(let e of r)t.push(Bd(e));t.push(``)}}let n=e.links.filter(e=>e.kind===`tensions`);if(n.length){t.push(`Tensions I feel:`);for(let r of n){let n=e.atoms.find(e=>e.id===r.from)?.label??``,i=e.atoms.find(e=>e.id===r.to)?.label??``;n&&i&&t.push(`- "${n}" ${r.label||`pulls against`} "${i}"`)}t.push(``)}return t.join(`
76
- `).trim()}function Hd(e,t){let n=e.center?.trim(),r=Vd(e);return[n?`I've been thinking out loud and here's what it comes down to: ${n}`:`I've been thinking out loud. Here's the shape of it.`,``,r,``,t===`plan`?`Pull this together and give me a concrete plan — the clear next steps, in order, that move me forward given everything above.`:`Pull this together and help me with it — weigh what matters most, address the tensions head-on, and give me a clear, useful answer.`].filter(e=>e!==void 0).join(`
77
- `).trim()}function Ud(e){return/^(ok(ay)?[,.\s]+)?(any |your |so[,.\s]+)?thoughts\s*[?.!]*$/i.test(e.trim())}function Wd(e,t){return e?t>0?`Discard ${t} banked — or tap Thoughts? to sort them`:`Stop banking and go back to answering`:`Bank everything you say without answering — say "thoughts?" when you want the sort`}function Gd(e){let t=e.trim();return t.length>0&&!Ud(t)}function Kd(e,t){let n=e.map((e,t)=>`(${t+1}) ${e.trim()}`).join(`
78
- `);return[`I just thought out loud for about ${Math.max(1,t)} minute${t>=2?`s`:``}. Sort what I actually said — do NOT add ideas of your own:`,`- the DECISIONS I made (even tentative ones),`,`- the TODOS I gave myself,`,`- any CONTRADICTIONS (quote both moments and ask me which one I mean).`,`My words, in order:`,n].join(`
79
- `)}var qd=/https?:\/\/[^\s<>"')\]]+/i;function Jd(e){let t=e.match(qd);return t?t[0].replace(/[.,;:!?]+$/,``):null}function Yd(e){let t=Jd(e);return t?e.replace(t,``).trim().split(/\s+/).filter(Boolean).length<=12:!1}function Xd(e){return`Check this for me: ${e} — what's actually true, what's shaky, and what's missing context? Ground every verdict in real sources.`}var Zd=`Check the claim in this screenshot — what's actually true, what's shaky, and what's missing context? Ground every verdict in real sources.`;function Qd(e){return e instanceof HTMLElement?e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e.isContentEditable:!1}var $d=dt.map(e=>{let t=ft[e];return{id:e,label:t.label,description:`${t.archetype} — ${t.blurb}`,accent:t.tokens.accent}}),ef=`mavea-preso-style`;function tf(e){return $d.some(t=>t.id===e)}function nf(){try{let e=localStorage.getItem(ef);return tf(e)?e:`folio`}catch{return`folio`}}function rf(e){try{localStorage.setItem(ef,e)}catch{}}function af(e){return e<5?`Late night`:e<12?`This morning`:e<17?`This afternoon`:`Tonight`}function of(e){let t=Math.max(1,Math.round(e/6e4));return t<60?`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}function sf(e,t){if(e.length===0||t.length===0)return null;let n=e[0],r=e[e.length-1],i=`${af(new Date(n.at).getHours())}, so far.`,a=[`${rc(n.at)} – ${rc(r.at)}`,of(r.at-n.at),`${t.length} ${t.length===1?`topic`:`topics`}`,`${e.length} ${e.length===1?`moment`:`moments`}`].join(` · `),o=nc(e),s=[];for(let n of t){let t=n.moments[0],r=n.moments[n.moments.length-1],i=e[r.frameIndex],a=i?.narration||i?.question||``;if(!a)continue;let c=n.moments.map(e=>o.get(e.frameIndex)).find(Boolean);s.push({title:n.title,clock:rc(e[t.frameIndex]?.at),line:a,frameIndex:r.frameIndex,...c?{corrected:`Corrected — ${c.note.what}: was ${c.note.was}, now ${c.note.now}`}:{}})}return s.length?{heading:i,meta:a,rows:s}:null}function cf(e){let t=(0,J.c)(10),{transcript:n,mode:r,note:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,W.jsxs)(`span`,{className:`listen-eq`,"aria-hidden":`true`,children:[(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{})]}),t[0]=a):a=t[0];let o=n?`“${n}`:`Listening`,s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,W.jsx)(`span`,{className:`listen-caret`,"aria-hidden":`true`}),t[1]=s):s=t[1];let c=n?`”`:``,l;t[2]!==o||t[3]!==c?(l=(0,W.jsxs)(`div`,{className:`listen-line`,children:[o,s,c]}),t[2]=o,t[3]=c,t[4]=l):l=t[4];let u=i??(r===`always`?`Always on — Mavéa answers when you finish a thought.`:r===`hold`?`Release the mic or shortcut to send.`:`It sends when you pause — or tap the mic to send now.`),d;t[5]===u?d=t[6]:(d=(0,W.jsx)(`div`,{className:`listen-note`,role:`status`,"aria-live":`polite`,children:u}),t[5]=u,t[6]=d);let f;return t[7]!==l||t[8]!==d?(f=(0,W.jsx)(`div`,{className:`listen-stage`,children:(0,W.jsxs)(`div`,{className:`listen-card`,children:[a,(0,W.jsxs)(`div`,{className:`listen-body`,children:[l,d]})]})}),t[7]=l,t[8]=d,t[9]=f):f=t[9],f}var lf=250;function uf(e){let t=(0,J.c)(6),{cards:n}=e,[r,i]=(0,U.useState)(!1),a,o;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{let e=window.setTimeout(()=>i(!0),lf);return()=>window.clearTimeout(e)},o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,U.useEffect)(a,o),!r||n.length===0)return null;let s;t[2]===n?s=t[3]:(s=n.map(df),t[2]=n,t[3]=s);let c;return t[4]===s?c=t[5]:(c=(0,W.jsx)(`div`,{className:`skel-grid`,role:`status`,"aria-label":`Building the answer`,children:s}),t[4]=s,t[5]=c),c}function df(e,t){return(0,W.jsxs)(`div`,{className:`skel-card`,children:[(0,W.jsxs)(`span`,{className:`skel-eyebrow`,children:[`✦ `,e.label,`…`]}),e.lines.map(ff)]},t)}function ff(e,t){return(0,W.jsx)(`span`,{className:`skel-line`,style:{width:`${e}%`}},t)}function pf({thinking:e=!1}){return(0,W.jsxs)(`div`,{className:`composing-status`,role:`status`,"aria-live":`polite`,children:[(0,W.jsx)(`span`,{className:`composing-orb`,"aria-hidden":`true`}),(0,W.jsx)(`span`,{children:e?`Thinking it through`:`Composing your answer`}),(0,W.jsxs)(`span`,{className:`composing-dots`,"aria-hidden":`true`,children:[(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{})]})]})}function mf(e){let t=(0,J.c)(14),{activity:n,sources:r}=e,i,a,o,s,c,l;if(t[0]!==n||t[1]!==r){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=r.slice(0,3),t=n===`searching`;if(!t&&e.length===0){l=null;break bb0}i=`turn-chips`,a=`status`,o=`polite`,s=t&&e.length===0&&(0,W.jsxs)(`span`,{className:`turn-chip`,children:[(0,W.jsx)(z.globe,{}),` Searching the web…`]}),c=e.map(hf)}t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l}else i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7];if(l!==Symbol.for(`react.early_return_sentinel`))return l;let u;return t[8]!==i||t[9]!==a||t[10]!==o||t[11]!==s||t[12]!==c?(u=(0,W.jsxs)(`div`,{className:i,role:a,"aria-live":o,children:[s,c]}),t[8]=i,t[9]=a,t[10]=o,t[11]=s,t[12]=c,t[13]=u):u=t[13],u}function hf(e,t){return(0,W.jsxs)(`span`,{className:`turn-chip src`,children:[(0,W.jsx)(`i`,{className:`turn-chip-dot`,"aria-hidden":`true`}),ge(e.url)??e.title]},t)}function gf(){return(0,U.useSyncExternalStore)(ke,Ce,_f)}function _f(){return!1}var vf=600,yf=!1,bf=null,xf=null,Sf=new Set;function Cf(){if(xe()){bf===null&&!yf&&(bf=window.setTimeout(()=>{bf=null,yf=!0;for(let e of Sf)e()},vf));return}if(bf!==null&&(window.clearTimeout(bf),bf=null),yf){yf=!1;for(let e of Sf)e()}}function wf(e){return Sf.add(e),xf??=ke(Cf),()=>{Sf.delete(e),Sf.size===0&&(xf?.(),xf=null,bf!==null&&(window.clearTimeout(bf),bf=null),yf=!1)}}function Tf(){return(0,U.useSyncExternalStore)(wf,Df,Ef)}function Ef(){return!1}function Df(){return yf}var Of={scalar:`Key figure`,series:`Trend`,composition:`Breakdown`,comparison:`Comparison`,ranking:`Ranking`,distribution:`Distribution`,relationship:`Relationship`,hierarchy:`Structure`,flow:`Process`,sequence:`Timeline`,keyvalue:`Readouts`,list:`Checklist`,geo:`Map`,code:`Code`,tabular:`Table`,status:`Status`},kf=/^(please|hey|ok(ay)?|so|now|can|could|would|will|you|how|what|why|when|where|which|who|should|is|are|do|does|did|tell|show|give|make|build|plan|help|i|me|us|my|about|the|a|an)\b[\s,'’]*/i;function Af(e,t=4){let n=e.trim().replace(/\s+/g,` `);for(let e=0;e<8;e++){let e=n.replace(kf,``);if(e===n)break;n=e}return n.replace(/[?!.]+$/,``).split(` `).slice(0,t).join(` `).trim()}var jf=[[78,52],[64,88],[82,40]];function Mf(e,t){let n=Af(e),r=rn(e,t),i=Object.entries(r).filter(([e,t])=>t>0&&Of[e]).sort((e,t)=>t[1]-e[1]).map(([e])=>Of[e]),a=en(e)===`rich`?3:2,o=[`Finding`];for(let e of i){if(o.length>=a)break;o.includes(e)||o.push(e)}for(;o.length<a;)o.push(o.length===1?`Readouts`:`Details`);return o.map((e,t)=>({label:n?`${e} — ${n}`:e,lines:jf[t%jf.length]}))}function Nf(e){let t=e&&Of[e]||(e===`text`?`Finding`:null);return{label:t?`Building — ${t.toLowerCase()}`:`Building`,lines:jf[0]}}function Pf(e){return e.paletteOpen||e.shareOpen||e.exportOpen||e.dashOpen||e.showSettings||e.proofOpen||e.showHow||e.replayAt!==null||e.recapOpen||e.atlasOpen||e.delegateOpen||e.srsOpen||e.zoomLevel!==null||e.mindViewOpen}function Ff(e,t){let n=e.left-t.left+e.width/2,r=e.top-t.top+e.height/2,i=Math.min(e.width/2+14,t.width*.45),a=e.height/2+10,o=Math.PI*2*1.12,s=[];for(let e=0;e<=32;e++){let t=-Math.PI/2+o*e/32;s.push({x:n+Math.cos(t)*i,y:r+Math.sin(t)*a})}return s}var If=`Local voice input isn’t available here — check browser microphone support, or type instead.`,Lf=`Microphone access is blocked — allow mic access for this site to talk to Mavéa.`,Rf=`Couldn’t reach your microphone — check it’s connected and not in use by another app.`,zf=`Local transcription is still starting or unavailable — try again in a moment, or type instead.`;function Bf(){let e=(0,J.c)(9),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let[n,r]=(0,U.useState)(t),[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(!1),c;e[1]===n.length?c=e[2]:(c=async e=>{a(null);let t=6-n.length;if(t<=0){a(`You can attach up to 6 files.`);return}let i=[],o=null;for(let n of e.slice(0,t)){let e=await Ot(n);if(e.ok&&e.attachment)i.push(e.attachment);else if(!o){let t=/\.(pdf|docx|pptx|xlsx)$/i.test(n.name);o=e.error===`too-large`?`"${n.name}" is too large (max ${t?40:10} MB).`:`"${n.name}" isn't a supported type (images, PDF, Office docs, or text/data files like CSV, TXT, Markdown, JSON).`}}e.length>t&&(o=`Only the first ${t} file(s) were added.`),i.length&&r(e=>[...e,...i]),o&&a(o)},e[1]=n.length,e[2]=c);let l=c,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=e=>{r(t=>t.filter((t,n)=>n!==e))},e[3]=u):u=e[3];let d=u,f;return e[4]!==i||e[5]!==n||e[6]!==l||e[7]!==o?(f={attached:n,setAttached:r,attachError:i,setAttachError:a,turnHadFiles:o,setTurnHadFiles:s,onFiles:l,removeAttachment:d},e[4]=i,e[5]=n,e[6]=l,e[7]=o,e[8]=f):f=e[8],f}var Vf=`mavea-live-bookmarks`;function Hf(){let[e,t]=(0,U.useState)(()=>{try{let e=localStorage.getItem(Vf);return e?new Set(JSON.parse(e)):new Set}catch{return new Set}});return{bookmarks:e,toggleBookmark:(0,U.useCallback)(e=>{t(t=>{let n=new Set(t);n.has(e)?n.delete(e):n.add(e);try{localStorage.setItem(Vf,JSON.stringify([...n]))}catch{}return n})},[])}}var Uf=`mavea-live-ask-hint`;function Wf(){let e=(0,J.c)(3),[t,n]=(0,U.useState)(Gf),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{n(!0);try{localStorage.setItem(Uf,`1`)}catch{}},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a={askHintSeen:t,dismissAskHint:i},e[1]=t,e[2]=a),a}function Gf(){try{return localStorage.getItem(Uf)===`1`}catch{return!1}}i();var Kf=(0,U.lazy)(()=>a(()=>import(`./TopicCanvas-DozfZFto.js`).then(e=>e.n).then(e=>({default:e.TopicCanvas})),__vite__mapDeps([42,1,43,44,14,2,45,46,47,48,49,50,51,52,13,53,54,4,55,56,57,58,59,60,61,62,63,16,64,5,6,22,65,66,67,68,69]))),qf=[{col:6},{col:6},{col:12}],Jf=`mavea-live-rail-collapsed-v1`,Yf=`View as living answer`,Xf=`Why this answer is true — the causal web behind it, and its receipts`,Zf=`mavea-mic-hold-preferred`,Qf=`I may have misheard that. Review the draft, then send it.`,$f=6400,ep=Wa+tt;function tp(e){return Qd(e.target)?!0:(e.key===` `||e.key===`Spacebar`)&&e.target instanceof HTMLElement&&!!e.target.closest(`button`)}var np=s(()=>a(()=>import(`./HowItWorks-D-hgfN6a.js`).then(e=>({default:e.HowItWorks})),__vite__mapDeps([70,43,1,14,13,42,44,2,45,46,47,48,49,50,51,52,53,54,4,55,56,57,58,59,60,61,62,63,16,64,5,6,22,65,66,67,68,69,71,72,73,15,74,75,76,77,78,79,80,81,19]))),rp=np.Component,ip=s(()=>a(()=>import(`./CommandPalette-Bs6tpdZl.js`).then(e=>({default:e.CommandPalette})),__vite__mapDeps([82,43,1,14,48,49,50,13,83,84]))),ap=ip.Component,op=s(()=>a(()=>import(`./Library-DmdzY2se.js`).then(e=>({default:e.Library})),__vite__mapDeps([85,43,1,44,14,13,4,86,87,88,89,90]))).Component,sp=s(()=>a(()=>import(`./LiveSettings-C9cKOrSb.js`).then(e=>({default:e.LiveSettings})),__vite__mapDeps([91,43,1,44,14,2,45,46,47,48,49,50,51,52,13,56,73,15,92,93,23,89,21,22,10,20,94,39,95,96,38,97,37,98,99,100,101,102,103]))),cp=sp.Component,lp=s(()=>a(()=>import(`./DashboardDetail-DYFghZ4p.js`).then(e=>({default:e.DashboardDetail})),__vite__mapDeps([104,43,1,44,14,2,13,42,45,46,47,48,49,50,51,52,53,54,4,55,56,57,58,59,60,61,62,63,16,64,5,6,22,65,66,67,68,69,17,75,76,77,78,79,80,15,81,105,96,38,39,94,23,21,10,20,106,107,108,109,110,111,112,113,114,29,32,41,115,116,117,73,118,119,120,121,122,123,124,125,126,127,128]))).Component,up=s(()=>a(()=>import(`./DashboardSettings-CE0B2y2y.js`).then(e=>({default:e.DashboardSettings})),__vite__mapDeps([129,43,1,44,14,105,96,38,39,106,107,108,109,116,122,112,113]))).Component,dp=s(()=>a(()=>import(`./UnderstoodPanel-DmJph4el.js`).then(e=>({default:e.UnderstoodPanel})),__vite__mapDeps([130,43,1,44,14,131]))).Component,fp=s(()=>a(()=>import(`./ZoomDeck-CKOjYS9z.js`).then(e=>({default:e.ZoomDeck})),__vite__mapDeps([132,43,1,44,14,13,56,133,45,46,47,2,48,49,50,51,52,134,135]))),pp=fp.Component,mp=s(()=>a(()=>import(`./AtlasView-B82UfrEX.js`).then(e=>({default:e.AtlasView})),__vite__mapDeps([136,43,1,14,86,87,4,88,89,137,96,38,39,138]))),hp=mp.Component,gp=s(()=>a(()=>import(`./RippleOverlay-D7ItTvS-.js`).then(e=>({default:e.RippleOverlay})),__vite__mapDeps([139,43,1,44,14,2,49,48,50,45,46,47,51,52,56,58,92,93,26,140,141,142,143,39,144,145,146]))),_p=gp.Component,vp=s(()=>a(()=>import(`./CardEditor-DABIhGdQ.js`).then(e=>({default:e.CardEditor})),__vite__mapDeps([147,43,1,14,56,101,148]))).Component,yp=s(()=>a(()=>import(`./CourseRail-DXt3bzjU.js`).then(e=>({default:e.CourseRail})),__vite__mapDeps([149,43,1,44,14,13,94,23,39,21,22,10,20,101,150,151,152,153,154]))).Component,bp=s(()=>a(()=>import(`./MindMapViewerDrawer-DI_S7fRZ.js`).then(e=>({default:e.MindMapViewerDrawer})),__vite__mapDeps([155,44,1,43,14,13,156,58,157,47,158,159]))).Component,xp=s(()=>a(()=>import(`./Recap-T9DtFaEk.js`).then(e=>({default:e.Recap})),__vite__mapDeps([160,43,1,44,14,56,161]))),Sp=xp.Component,Cp=s(()=>a(()=>import(`./LibraryOverlay-YHBrdVKo.js`).then(e=>({default:e.LibraryOverlay})),__vite__mapDeps([162,43,1,44,14,13,56,133,45,46,47,2,48,49,50,51,52,85,4,86,87,88,89,90,163]))),wp=Cp.Component,Tp=s(()=>a(()=>import(`./ReplayOverlay-BTldvkU7.js`).then(e=>({default:e.ReplayOverlay})),__vite__mapDeps([164,43,1,14,42,44,2,45,46,47,48,49,50,51,52,13,53,54,4,55,56,57,58,59,60,61,62,63,16,64,5,6,22,65,66,67,68,69,165,71,72,73,15,74,75,76,77,78,79,80,81,166,167,168,169,170]))).Component,Ep=s(()=>a(()=>import(`./ShareModal-9jSn52Mw.js`).then(e=>({default:e.ShareModal})),__vite__mapDeps([171,43,1,44,14,2,48,49,50,13,78,79,80,15,56,62,172,45,46,47,51,52,73,173,174,158,88,92,93,175]))),Dp=Ep.Component,Op=s(()=>a(()=>import(`./ExportModal-Ya0VBbxa.js`).then(e=>({default:e.ExportModal})),__vite__mapDeps([176,43,1,44,14,2,45,46,47,48,49,50,51,52,80,4,56,17,173,92,93,74,177,54,13,55,16,178,61,63,179,66,65,67,68,180,181,182,183,156,58,157,158,159,184,185,28,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,57,211,212,213,214,215,216,217,218,73,15,219,220,64,221,222,223,224,225,133,226,227,228,229,230,231,232,233,234,235,18,236,9,237,238,239,240]))),kp=Op.Component,Ap=s(()=>a(()=>import(`./ExtractionPreview-BFrmqKDo.js`).then(e=>({default:e.ExtractionPreview})),__vite__mapDeps([241,43,1,44,14,56,242,7,96,38,39,105,21,22,10,23,20,94,95,29,106,114,2,32,109,108,110,41,115,116,117,15,73,45,46,47,48,49,50,51,52,118,243,128]))),jp=Ap.Component,Mp=s(()=>a(()=>import(`./PinToDashboard-BCiWaSg8.js`).then(e=>({default:e.PinToDashboard})),__vite__mapDeps([244,43,1,44,14,13,4,56,105,96,38,39,94,23,21,22,10,20,108,109,120,114,2,29,32,110,41,115,116,117,15,73,45,46,47,48,49,50,51,52,121]))).Component,Np=s(()=>a(()=>import(`./PrismOverlay-DJDGPGxo.js`).then(e=>e.n).then(e=>({default:e.PrismOverlay})),__vite__mapDeps([245,1,43,44,14,2,49,48,50,45,46,47,51,52,56,62,17,246,167,20,247,21,22,10,23,30,34,35,248,11,31,36,249]))),Pp=Np.Component,Fp=s(()=>a(()=>import(`./WorldOverlay-yhxq328s.js`).then(e=>({default:e.WorldOverlay})),__vite__mapDeps([250,43,1,44,14,2,15,53,50,56,58,63,179,193,185,28,17,218,72,73,45,46,47,48,49,51,52,74,168,27,29,30,31,32,33,251,252,253,254,255]))),Ip=Fp.Component,Lp=s(()=>a(()=>import(`./SynthesisOverlay-iesJ0hEt.js`).then(e=>({default:e.SynthesisOverlay})),__vite__mapDeps([256,43,1,44,14,20,21,22,10,23,30,245,2,49,48,50,45,46,47,51,52,56,62,17,246,167,247,34,35,248,11,31,36,249]))),Rp=Lp.Component,zp=s(()=>a(()=>import(`./PresentationDeck-BW_7qecK.js`).then(e=>({default:e.PresentationDeck})),__vite__mapDeps([257,43,1,44,14,177,80,54,13,4,55,16,178,61,63,179,66,65,67,68,180,181,182,183,156,58,157,47,158,159,184,185,28,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,2,204,205,17,206,207,208,209,210,57,211,212,45,46,48,49,50,51,52,213,214,215,216,217,218,73,15,219,220,64,221,222,223,224,225,56,133,226,227,228,229,230,231,232,233,234,235,18,236,9,237,238,258]))),Bp=zp.Component,Vp=s(()=>a(()=>import(`./DelegatePanel-DKWsRY9I.js`).then(e=>({default:e.DelegatePanel})),__vite__mapDeps([259,43,1,44,14,15,56,157,47,158,73,45,46,2,48,49,50,51,52,92,93,21,22,10,23,20,258,260]))),Hp=Vp.Component,Up=s(()=>a(()=>import(`./SrsReview-DhWNYYv7.js`).then(e=>({default:e.SrsReview})),__vite__mapDeps([261,43,1,14,56,101,102,262]))),Wp=Up.Component,Gp=s(()=>a(()=>import(`./TourPrism-kInUOv-M.js`).then(e=>({default:e.TourPrism})),__vite__mapDeps([263,43,1,44,14,245,2,49,48,50,45,46,47,51,52,56,62,17,246,167,20,247,21,22,10,23,30,34,35,248,11,31,36,249]))),Kp=Gp.Component;function $({children:e,label:t=`Feature`}){return(0,W.jsx)(M,{label:t,overlay:!0,children:e})}function qp(){try{window.location.hash=``}catch{}}function Jp(e){return j(e)??Promise.resolve()}function Yp(e){let t=e.toLowerCase().trim().replace(/[.,!?]+$/,``);return t.split(/\s+/).filter(Boolean).length<=3&&/^(yeah|yep|yes|ok|okay|sure|right|uh huh|uh-huh|mhm|mm|hmm|hm|go on|go ahead|carry on|continue|keep going|please continue|please go on|go ahead|keep it up|got it|alright)$/.test(t)?!0:/\b(keep going|go on|continue|carry on|go ahead|please continue|please go on)\b/.test(t)}function Xp(){let[e]=Xt(),t=ht(e.provider),n=e.models[e.provider]||t.defaultModel;(0,U.useLayoutEffect)(()=>S(document),[]),(0,U.useEffect)(()=>{let t=document.documentElement;return e.fontScale===`normal`?delete t.dataset.fontScale:t.dataset.fontScale=e.fontScale,()=>{delete t.dataset.fontScale}},[e.fontScale]);let r=(0,U.useRef)(u()),i=(0,U.useRef)(Sr()),s=(0,U.useRef)(m()),l=(0,U.useRef)(s.current?P():null),g=(0,U.useRef)(s.current?E():!1),O=(0,U.useRef)((()=>{if(s.current)return null;let e=x();return e&&F(e)?e:null})()),k=(0,U.useRef)(O.current?R():null);(0,U.useEffect)(()=>{s.current&&C(),l.current&&f(),g.current&&T(),O.current&&p()},[]);let[A,j]=(0,U.useState)(``),{attached:M,setAttached:N,attachError:I,setAttachError:L,turnHadFiles:ee,setTurnHadFiles:te,onFiles:ne,removeAttachment:oe}=Bf(),[V,ce]=(0,U.useState)([]),[de,pe]=(0,U.useState)(!1),{askHintSeen:me,dismissAskHint:he}=Wf(),[H,ge]=(0,U.useState)(!1),[ye,xe]=(0,U.useState)(`idle`),[Se,Te]=(0,U.useState)(null),[Ee,Oe]=(0,U.useState)(null),[Ae,Ne]=(0,U.useState)(null),[Le,Re]=(0,U.useState)(!1),[ze,Be]=(0,U.useState)(!1),[Ve,He]=(0,U.useState)(!1),[We,Ke]=(0,U.useState)(!1),[Ye,ot]=(0,U.useState)(null),[ct,lt]=(0,U.useState)(!1),[ut,dt]=(0,U.useState)(null),[ft,gt]=(0,U.useState)(null),[_t,yt]=(0,U.useState)(()=>new Set),[Ct,wt]=(0,U.useState)(null),[Ot,Mt]=(0,U.useState)(null),Pt=(0,U.useRef)(void 0),[Ft,It]=(0,U.useState)(null),Lt=(0,U.useRef)(void 0),[Rt,zt]=(0,U.useState)(!1),[Bt,Vt]=(0,U.useState)(!1),[Ut,Jt]=(0,U.useState)(!1),[Yt,Qt]=(0,U.useState)(!1),[$t,en]=(0,U.useState)(!1),[tn,nn]=(0,U.useState)(()=>cr().length),rn=Yn().length;(0,U.useEffect)(()=>{let e=()=>void sn(),t={once:!0,passive:!0};return window.addEventListener(`keydown`,e,t),window.addEventListener(`pointerdown`,e,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`pointerdown`,e)}},[]),(0,U.useEffect)(()=>wr(),[]);let[an,on]=(0,U.useState)(null),[pn,mn]=(0,U.useState)(null),[hn,gn]=(0,U.useState)(null),vn=(0,U.useCallback)(e=>{e.length>=4?gn(e):e.length>0&&on(e)},[]),[bn,xn]=(0,U.useState)(null);(0,U.useEffect)(()=>{h()&&(w(),xn(lr))},[]);let[Sn,Tn]=(0,U.useState)({open:!1,spec:null}),[En,Dn]=(0,U.useState)(!1),On=(0,U.useRef)(!1);On.current=En;let[An,jn]=(0,U.useState)(()=>nf()),[Mn,Nn]=(0,U.useState)(!1),[Pn,Fn]=(0,U.useState)(new Set),[In,Ln]=(0,U.useState)(null),[Rn,zn]=(0,U.useState)(null),[Bn,Vn]=(0,U.useState)(null),[Wn,Kn]=(0,U.useState)(!1),qn=(0,U.useCallback)((e,t=!1)=>{Vn(e),Kn(e!==null&&t)},[]),Jn=(0,U.useCallback)(()=>{Vn(null),Kn(!1)},[]),Xn=(0,U.useRef)(new _u).current,Zn=(0,U.useMemo)(()=>e.quality===`fast`?null:Gt(e),[e]),[mr,gr]=(0,U.useState)(!1),Or=(0,U.useRef)(!1);Or.current=mr;let kr=(0,U.useRef)([]),[Ar,Pr]=(0,U.useState)(0),Fr=(0,U.useRef)(0),Lr=Wd(mr,Ar),[G,Rr]=(0,U.useState)(!1),zr=(0,U.useRef)(!1);zr.current=G;let Br=(0,U.useRef)([]),K=Pd((0,U.useMemo)(()=>Gt(e),[e])),Vr=(0,U.useRef)(K);Vr.current=K;let q=(0,U.useRef)(null),Ur=(0,U.useRef)(!1),Kr=(0,U.useRef)(`idle`),qr=(0,U.useCallback)(()=>{let e=Br.current.join(` `).trim();e&&Vr.current.phase===`listening`&&Vr.current.onSpeechEnd(e)},[]),Yr=_n(),[Xr,Zr]=(0,U.useState)(!1),[Qr,$r]=(0,U.useState)(()=>{try{return localStorage.getItem(Jf)===`true`}catch{return!1}});(0,U.useEffect)(()=>{try{localStorage.setItem(Jf,String(Qr))}catch{}},[Qr]);let[ei,ti]=(0,U.useState)(!1),[ni,ri]=(0,U.useState)(!1),[ii,ai]=(0,U.useState)(!1),[oi,si]=(0,U.useState)(),[ci,li]=(0,U.useState)(!1);(0,U.useEffect)(()=>{ii||li(!1)},[ii]);let{open:ui,openPalette:di,closePalette:fi}=y(),[pi,mi]=(0,U.useState)(!1),[hi,gi]=(0,U.useState)(0),[_i,vi]=(0,U.useState)(0),[yi,bi]=(0,U.useState)(!1),[J,Si]=(0,U.useState)(()=>{try{return localStorage.getItem(ga)===`true`}catch{return!1}}),[Ci,wi]=(0,U.useState)(!1),Ti=(0,U.useRef)(null),[Ei,Di]=(0,U.useState)(()=>{try{return localStorage.getItem(Zf)===`true`}catch{return!1}}),Oi=J?`always`:Ei?`hold`:`tap`;(0,U.useEffect)(()=>{try{let e=De(localStorage.getItem(`mavea-voice-mavea`)||`heart`);e&&je(`mavea`,e.kokoro)}catch{}},[]),(0,U.useEffect)(()=>{if(typeof window>`u`)return;let e,t=t=>{let n=t.detail?.changed;Array.isArray(n)&&n.length>0&&(ri(!0),e&&clearTimeout(e),e=setTimeout(()=>ri(!1),2600))};return window.addEventListener(kn,t),()=>{window.removeEventListener(kn,t),e&&clearTimeout(e)}},[]);let ki=(0,U.useCallback)(e=>{try{localStorage.setItem(ga,String(e))}catch{}},[]);(0,U.useEffect)(()=>{let e=Ti.current;ki(e?e.enabled:J)},[J,ki]),(0,U.useEffect)(()=>{try{localStorage.setItem(Zf,String(Ei))}catch{}},[Ei]);let Ai=(0,U.useRef)(null),Mi=(0,U.useRef)(Le);Mi.current=Le;let Ni=(0,U.useRef)(null),[Fi,Ii]=(0,U.useState)(null),[Li,Ri]=(0,U.useState)(!1),zi=(0,U.useRef)([]),Bi=(0,U.useRef)(()=>{}),Vi=(0,U.useCallback)(e=>{Mi.current||Ai.current?.setMaveaSpeaking(!0);let t=!Ce(),n=ve(e,`mavea`);return t&&(Ni.current=n),n},[]);(0,U.useEffect)(()=>{we(Le),Le?Ai.current?.setMaveaSpeaking(!1):Ce()&&Ai.current?.setMaveaSpeaking(!0)},[Le]);let[Hi]=(0,U.useState)(()=>r.current||i.current?(xt(),null):s.current||O.current?null:bt()),Ui=(0,U.useRef)(St()).current,Y=No({canRun:D,getConfig:()=>Gt(Kt()),getCaps:()=>Wt(Kt()),speak:Vi,cancelSpeak:Fe,getLibraryEnabled:()=>Kt().libraryEnabled,initial:Hi?Mo(Hi):void 0}),Wi=ad(H,Se,Zn,Y.busy),Gi=(0,U.useCallback)(()=>{window.location.hash=`#/live`,window.location.reload()},[]),Ki=(0,U.useCallback)(()=>{b(),window.location.hash=`#/live`,window.location.reload()},[]),qi=(0,U.useRef)(`normal`);qi.current=Y.phase;let Ji=(0,U.useRef)(null);Ji.current=Y.activeBlank;let Yi=(0,U.useRef)([]);Yi.current=Y.spec?.blanks??[],(0,U.useEffect)(()=>{Zt()},[]),(0,U.useEffect)(()=>{s.current||O.current||Y.frames.length>0&&vt(Y.history,Y.frames)},[Y.frames,Y.history]),(0,U.useEffect)(()=>{if(!(Y.frames.length===0||Y.busy))return o(Ep.preload)},[Y.frames.length,Y.busy]),(0,U.useEffect)(()=>{if(!s.current)return;let e=g.current&&l.current===`prism`;if(!(g.current&&!e))return o(()=>Promise.all([Gp.preload(),na()]).then(()=>void 0),e?300:2500)},[]);let Zi=(0,U.useMemo)(()=>Y.frames.map((e,t)=>({index:t,label:e.question||`Answer ${t+1}`,spec:e.spec})),[Y.frames]),Qi=(0,U.useCallback)(e=>{if(e.length){if(!Qn().styleAsked&&ir().length===e.length){It({count:e.length,deck:e[0].deck}),Lt.current&&clearTimeout(Lt.current),Lt.current=setTimeout(()=>{$n(),It(null)},12e3);return}Mt({count:e.length,ids:e.map(e=>e.id)}),Pt.current&&clearTimeout(Pt.current),Pt.current=setTimeout(()=>Mt(null),6e3)}},[]),ea=(0,U.useCallback)(e=>{Lt.current&&clearTimeout(Lt.current),e?er(e):$n(),It(null)},[]);(0,U.useEffect)(()=>()=>{Pt.current&&clearTimeout(Pt.current),Lt.current&&clearTimeout(Lt.current)},[]),(0,U.useEffect)(()=>{if(!e.autoSaveFlashcards)return;let t=Y.frames[Y.frames.length-1];if(!t)return;let n=El(t.spec.blocks);if(n.length>0){let e=nr(n,{deck:t.spec.topic||t.spec.title||`General`,origin:`auto`});Qi(e)}},[Y.frames,e.autoSaveFlashcards,Qi]);let ta=(0,U.useCallback)(t=>{let n=Y.viewSpec??Y.spec,r=n?.topic||n?.title||`General`,{cards:i,exact:a}=Il(t),o={ts:Date.now(),...t.id?{blockId:t.id}:{},...Ee?{question:Ee}:{},...n?.topic?{topic:n.topic}:{}},s=Gt(e),c=!!s.apiKey;wt({block:t,initial:i,deck:r,source:o,enrich:!a&&c?()=>Bl(t,s):void 0})},[Y.viewSpec,Y.spec,Ee,e]),ra=(0,U.useRef)(null),ia=(0,U.useRef)(null),oa=(0,U.useRef)(()=>{}),sa=(0,U.useRef)([]),ca=(0,U.useRef)(()=>{}),la=(0,U.useRef)(()=>{});ca.current=()=>{let e=document.querySelector(`.bend-slider`);if(!e)return;e.scrollIntoView({block:`center`,behavior:`smooth`});let t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`value`)?.set;if(!t)return;sa.current.forEach(e=>window.clearTimeout(e)),sa.current.length=0;let n=Number(e.min||0),r=Number(e.max||100),i=Number(e.step||1)||1,a=Number(e.value),o=Math.min(r,n+(r-n)*.78);for(let n=1;n<=26;n++)sa.current.push(window.setTimeout(()=>{let r=a+(o-a)*n/26,s=Math.round(r/i)*i;t.call(e,String(s)),e.dispatchEvent(new Event(`input`,{bubbles:!0}))},500+n*90))},(0,U.useEffect)(()=>{let e=sa.current;return()=>e.forEach(e=>window.clearTimeout(e))},[]);let ua=(0,U.useRef)(()=>{}),da=(0,U.useRef)(null),fa=(0,U.useRef)(null),pa=(0,U.useRef)(null),ma=(0,U.useRef)(!1),va=(0,U.useRef)(null),ya=(0,U.useRef)(!1),ba=(0,U.useRef)(null),[xa,Sa]=(0,U.useState)(!1),[Ta,Ea]=(0,U.useState)(!1),Da=(0,U.useMemo)(()=>{let e=new Map,t=Y.spec?.blocks??[];for(let n of Y.tour){let r=t[n.index]?.id,i=n.saySpoken??n.say;r&&i&&e.set(r,i)}return e},[Y.tour,Y.spec]),Oa=(0,U.useMemo)(()=>{let e=new Map,t=Y.spec?.blocks??[];for(let n of Y.tour){let r=t[n.index]?.id;r&&n.mark&&e.set(r,n.mark)}return e},[Y.tour,Y.spec]),ka=(0,U.useMemo)(()=>{let e=new Map,t=Y.spec?.blocks??[];for(let n of Y.tour){let r=t[n.index]?.id,i=n.marks??(n.mark?[n.mark]:[]);r&&i.length&&e.set(r,i)}return e},[Y.tour,Y.spec]),[Aa,ja]=(0,U.useState)([]),[Ma,Na]=(0,U.useState)(()=>new Set),Pa=(0,U.useCallback)(e=>{Na(t=>t.has(e)?t:new Set(t).add(e))},[]),Fa=(0,U.useMemo)(()=>Aa.filter(e=>e.noteText!==void 0||Ma.has(e)),[Aa,Ma]),Ra=(0,U.useRef)(Date.now()),za=(0,U.useRef)(null),Va=(0,U.useRef)(null),Ua=(0,U.useCallback)(e=>{Va.current=e,za.current??=requestAnimationFrame(()=>{za.current=null,Va.current!=null&&Te(Va.current)})},[]);(0,U.useEffect)(()=>()=>{za.current!=null&&cancelAnimationFrame(za.current)},[]),(0,U.useEffect)(()=>{ja([]),Na(new Set),Ra.current=Date.now()},[Y.turn]);let[Wa,Ka]=(0,U.useState)(!1);(0,U.useEffect)(()=>Ka(!1),[Y.turn]);let[qa,Ja]=(0,U.useState)(()=>new Set);(0,U.useEffect)(()=>Ja(new Set),[Y.turn]);let Ya=(0,U.useRef)(!1);(0,U.useEffect)(()=>{let e=!!Y.error;e&&!Ya.current&&ra.current?.scrollTo({top:0,behavior:`smooth`}),Ya.current=e},[Y.error]);let[Xa,Za]=(0,U.useState)(!1);(0,U.useEffect)(()=>{let e=ra.current;if(!e||typeof ResizeObserver>`u`)return;let t=()=>Za(e.clientWidth>=1280),n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[Y.turn]);let Qa=(0,U.useMemo)(()=>Aa.filter(e=>e.noteText&&!qa.has(e.spot)).map(e=>({spot:e.spot,text:e.noteText})),[Aa,qa]),{bookmarks:$a,toggleBookmark:eo}=Hf(),to=(0,U.useRef)(null);(0,U.useEffect)(()=>{if(!Wa)return;function e(e){to.current&&!to.current.contains(e.target)&&Ka(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[Wa]);let no=(0,U.useRef)(Y.spec);no.current=Y.spec;let ro=(0,U.useCallback)((e,t,n,r,i,a,o,s)=>{e&&ja(c=>{if(s?c.some(t=>t.spot===e&&t.noteText!==void 0):c.some(t=>t.spot===e&&t.kind===n?.kind&&t.at===n?.at&&t.noteText===void 0))return c;let l=!t&&!n?.at?no.current?.blocks.find(t=>t.id===e)??null:null,u=n?.kind===`connect`&&typeof n.onIndex==`number`?no.current?.blocks[n.onIndex]?.id:void 0,d={spot:e,line:t??(l?ie(l):void 0),mark:n,generous:r,kind:n?.kind??(s?`note`:void 0),at:n?.at,...n?.kind===`connect`&&n.to?{to:n.to}:{},color:n?.color,inkedAt:Date.now(),...i?{delayMs:i}:{},...a?{badgeMs:a}:{},...o?{stepNumber:o}:{},...u?{toSpot:u}:{},...s?{noteText:s}:{}};return[...c,d]})},[]),io=e.teachMode||hc(Ee),ao=(0,U.useRef)(e.annotationsEnabled);ao.current=e.annotationsEnabled;let oo=(0,U.useRef)(J);oo.current=J;let so=(0,U.useRef)(null);so.current=Y.narration??null;let co=(0,U.useRef)(!1),lo=(0,U.useRef)(!1);lo.current=Y.busy;let uo=(0,U.useRef)(null),fo=(0,U.useRef)(Y.frames);fo.current=Y.frames;let po=(0,U.useRef)([]),mo=(0,U.useCallback)(()=>{let e=!ao.current;uo.current=null,qt({annotationsEnabled:e,teachMode:e}),e?(ja(po.current),po.current=[]):ja(e=>(po.current=e,[]))},[]),ho=(0,U.useRef)(null),go=(0,U.useCallback)((e,t)=>{let n=ia.current,r=n?.querySelector(`[data-spot-id="${CSS.escape(e)}"]`);if(!r)return;let i=t?n?.querySelector(`[data-spot-id="${CSS.escape(t)}"]`):null,a=ra.current;if(i&&a){let e=a.getBoundingClientRect(),t=r.getBoundingClientRect(),n=i.getBoundingClientRect(),o=(Math.min(t.top,n.top)+Math.max(t.top+t.height,n.top+n.height))/2-e.top-a.clientHeight/2;a.scrollTo({top:Math.max(0,a.scrollTop+o),behavior:`smooth`})}else r.scrollIntoView({behavior:`smooth`,block:`center`});let o=[r,i].filter(e=>!!e);o.forEach(e=>e.classList.add(`ink-jump-glow`)),ho.current!=null&&window.clearTimeout(ho.current),ho.current=window.setTimeout(()=>{o.forEach(e=>e.classList.remove(`ink-jump-glow`)),ho.current=null},800)},[]);(0,U.useEffect)(()=>()=>{ho.current!=null&&window.clearTimeout(ho.current)},[]);let _o=(0,U.useRef)(null),vo=(0,U.useCallback)((e,t)=>{Y.jumpTo(e),t&&(_o.current!=null&&cancelAnimationFrame(_o.current),_o.current=requestAnimationFrame(()=>{_o.current=null,go(t)}))},[Y,go]);(0,U.useEffect)(()=>()=>{_o.current!=null&&cancelAnimationFrame(_o.current)},[]);let yo=(0,U.useCallback)(e=>{Ja(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),[bo,xo]=Wr(),[So,Co]=(0,U.useState)(0),wo=(0,U.useRef)(bo);wo.current!==bo&&(wo.current=bo,Co(e=>e+1));let To=(0,U.useCallback)(()=>{let e=uo.current;e&&(uo.current=null,ao.current=e.annotationsEnabled,qt(e))},[]),Eo=(0,U.useCallback)(()=>{if(ao.current)return;let{annotationsEnabled:e,teachMode:t}=Kt();uo.current??={annotationsEnabled:e,teachMode:t},ao.current=!0,qt({annotationsEnabled:!0,teachMode:!0})},[]),Do={isBusy:()=>Y.busy||ya.current,isSpeaking:()=>Ce(),hasCanvas:()=>!!Y.spec,showFrame:(e,t,n)=>{Oe(t),j(``),Y.showFrame(e,t,{interrupt:!1,revealNow:Mi.current,silent:n?.silent})},typeInto:j,speak:e=>(Hc(e),Vi(e)),cancelSpeech:Fe,setMuted:Re,setViewMode:xo,setInkArmed:pe,setPresenting:Dn,setShareOpen:Be,setPaletteOpen:e=>e?di():fi(),pressKeepGoing:e=>{let t=document.querySelectorAll(`.footer-keepgoing .kg-row`),n=Array.from(t).find(t=>t.textContent?.includes(e))??t[0];n&&(n.classList.add(`kg-tour-press`),window.setTimeout(()=>n.classList.remove(`kg-tour-press`),620))},pinFirstBlock:()=>{let e=no.current?.blocks.find(e=>!!e.id);e&&Ts(e)},pinFirstBlocks:e=>{let t=(no.current?.blocks??[]).filter(e=>!!e.id).slice(0,e);ce(t)},startWatchThinking:()=>{Rr(!0),zr.current=!0},bankThought:e=>{Br.current=[...Br.current,e],K.onTranscript(Br.current.join(` `))},openAtlas:()=>{if(cr().length<3){for(let e of[`money`,`space`,`travel`,`budget`]){let t=Jr(e),n=t?.frames[0]?.spec;t&&n&&dn(n,t.question)}nn(sr(fn()))}en(!0)},openPrism:e=>{na().then(t=>{jo.current.chapter?.action.kind===`prism`&&mn(t[e]??null)})},showcaseFeature:e=>{if(e===`library`&&fn().length<3)for(let e of[`money`,`space`,`travel`]){let t=Jr(e),n=t?.frames[0]?.spec;t&&n&&dn(n,t.question)}if(e===`deepzoom`){window.location.hash=`#/deepzoom?demo=1`;return}if(e===`synthesis`){window.location.hash=`#/synthesis?demo=1`;return}if(e===`living-answer`&&zi.current.length===0){a(async()=>{let{WORLD_SEED:e}=await import(`./seed-D_P5jyog.js`);return{WORLD_SEED:e}},[]).then(({WORLD_SEED:e})=>{Ii({type:`world`,id:`tour-world`,col:12,props:{title:e.title,world:e}}),Ri(!0),Bi.current(`tour-world`)});return}Oo.current[e]?.run()},setSpot:e=>Y.setSpot(e),scriptedMark:()=>oa.current(),drawPenTourStep:e=>{Eo(),e===`result`?(ra.current?.scrollTo({top:0,behavior:`smooth`}),ro(`live-1`,`After thirty years, the investment reaches seventy-six thousand one hundred twenty-three dollars.`,{kind:`circle`,at:`$76,123`,color:`key`},!1,void 0,5600,1)):ro(`live-1`,`Compounding grows the original investment by more than seven point six times.`,{kind:`underline`,at:`7.6x`,color:`warm`},!1,void 0,3e3,2)},drawPenOnFirstBlock:()=>{let e=Y.spec?.blocks.find(e=>!!e.id);e?.id&&(Eo(),ra.current?.scrollTo({top:0,behavior:`smooth`}),ro(e.id,e.note,void 0,!0,void 0,3200))},openDashboards:()=>{let e=aa();e?ot(e):Ke(!0)},dashboardShowSettings:()=>lt(!0),openModelSettings:()=>{si(`model`),ai(!0)},openExport:()=>He(!0),shareRemix:()=>{document.querySelector(`.shm-remix`)?.click()},sharePalette:e=>{Array.from(document.querySelectorAll(`.shm-chip`)).find(t=>t.textContent?.trim().toLowerCase()===e.toLowerCase())?.click()},exportSetFormat:e=>{document.querySelector(`[data-export-format="${e}"]`)?.click()},exportPickTemplate:e=>{document.querySelectorAll(`[data-export-template]`)[e]?.click()},toggleRail:()=>$r(e=>!e),bendIt:()=>ca.current(),openFlashcards:()=>{let e=Y.spec?.blocks.find(e=>!!e.id);e&&ta(e)},openTourCourse:()=>la.current(),fireMemoryGlow:()=>{ri(!0),window.setTimeout(()=>ri(!1),2600)},stopRevealWalk:()=>{ma.current=!0},closeAllOverlays:()=>{Y.setSpot(null),ce([]),j(``),xo(`everything`),pe(!1),ua.current(),ja([]),Na(new Set),Ja(new Set),Ka(!1),Dn(!1),Be(!1),fi(),xn(null),en(!1),on(null),mn(null),gn(null),wt(null),Qt(!1),He(!1),Ke(!1),ot(null),lt(!1),$r(!1),Vt(!1),Jt(!1),ai(!1),Rr(!1),gr(!1),ss(null),ls(0),ds(null)}},Oo=(0,U.useRef)({}),ko=xi({active:s.current,startChapter:l.current,solo:g.current,ops:Do}),Ao=Xi({active:!!O.current,personaId:O.current,startStep:k.current,ops:Do}),jo=(0,U.useRef)(ko);jo.current=ko,(0,U.useEffect)(()=>{if(!s.current)return;let e=e=>{let t=jo.current;if(e.key===`Escape`)t.skip();else if(tp(e))return;else e.key===`ArrowRight`?(e.preventDefault(),t.next()):e.key===`ArrowLeft`?(e.preventDefault(),t.prev()):(e.key===` `||e.key===`Spacebar`)&&(e.preventDefault(),t.toggle())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let Po=(0,U.useRef)(Ao);Po.current=Ao,(0,U.useEffect)(()=>{if(!O.current)return;let e=e=>{let t=Po.current;if(e.key===`Escape`)t.skip();else if(tp(e))return;else e.key===`ArrowRight`?(e.preventDefault(),t.next()):e.key===`ArrowLeft`?(e.preventDefault(),t.prev()):(e.key===` `||e.key===`Spacebar`)&&(e.preventDefault(),t.toggle())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,U.useEffect)(()=>{(ko.done||Ao.done)&&To()},[ko.done,Ao.done,To]),(0,U.useEffect)(()=>()=>To(),[To]);let{narrate:Fo,narratingId:Io}=Ir({takeWheel:()=>{ma.current=!0},hush:Fe,moveSpot:e=>{Y.setSpot(e.id??null),ao.current&&ro(e.id,e.note??(e.id?Da.get(e.id):void 0)??void 0,e.id?Oa.get(e.id):void 0,!0)},canSpeak:()=>!Mi.current,lineFor:e=>e.noteSpoken??e.note??(e.id?Da.get(e.id):void 0)??ae(e),speakLine:Vi},Y.turn),[Ro,zo]=(0,U.useState)(!1),[Bo,Vo]=(0,U.useState)(!!Hi||!!r.current&&Lo()||!!i.current&&Lo()||s.current||!!O.current),Ho=yn();(0,U.useEffect)(()=>{nn(sr(Ho))},[Ho]),(0,U.useEffect)(()=>{let e=Y.spec;if(!e||va.current===Y.turn)return;if(va.current=Y.turn,Hi&&Y.turn===0){Y.spot&&Y.setSpot(null);return}if(s.current&&!Y.narration&&Y.tour.length===0){Y.spot&&Y.setSpot(null);return}let t=[];for(let n of Y.tour){let r=e.blocks[n.index]?.id;r&&t.push(n.say?{spot:r,say:n.say}:{spot:r})}let n=[];if(t.length?n=it(e.blocks,{opener:Y.narration,tour:t,maxStops:5}):rt({blockCount:e.blocks.length,mode:Y.mode,hasModelTour:!1,teach:io})&&(n=it(e.blocks,{opener:Y.narration,maxStops:io?e.blocks.length:3,startId:Y.spot??void 0})),!n.length){Y.spot&&Y.setSpot(null);return}let r=t.length>0,i=Mi.current&&r&&ao.current;Sa(i);let a=n.map(e=>({spot:e.set&&`spot`in e.set?e.set.spot??void 0:void 0,line:e.set&&`caption`in e.set?e.set.caption:void 0}));if(Mi.current){if(ao.current){let e=Ha({stops:a,spokenWalk:r,withNotes:i,teach:io,marksById:ka});for(let t of e)ro(t.spot,t.line,t.mark,t.generous,t.delayMs,t.badgeMs,t.stepNumber,t.noteText)}Y.setSpot(null);return}ma.current=!1,ya.current=!0;let o=!1,c,l,u=0,d=null,f=()=>{d&&=(d(),null)},p=()=>{ya.current=!1,ba.current=null,l&&clearTimeout(l),Ea(!1),Hc(null)},m=()=>o?!0:ma.current?(p(),Y.setSpot(null),!0):!1,h=(e,t)=>{if(e!==void 0&&Y.setSpot(e??null),r&&t&&Hc(t),e&&ao.current){let n=ka.get(e);if(n?.length){let r=at+(n.length-1)*900,i=n.length>1;for(let a=0;a<n.length;a++){let o=a*900,s=a===n.length-1?r:void 0;ro(e,t,n[a],io,o,s,i?a+1:void 0)}}else io&&ro(e,t,void 0,io)}},g=e=>{let t=e&&!Mi.current&&!se()?_e(e):null;if(!t){b();return}d=t.release,Ga(t,{speakLine:Vi,isCancelled:()=>o,isDismissed:()=>ma.current},e=>{if(d=null,e===`dismissed`){p(),Y.setSpot(null);return}e!==`cancelled`&&b()})},_=e=>{let t=e.set&&`spot`in e.set?e.set.spot:void 0,n=e.set&&`caption`in e.set?e.set.caption:void 0;return(t?Da.get(t):void 0)??n},v=e=>{for(let t=e+1;t<n.length;t++){let e=_(n[t]);if(e){be(e,`mavea`);return}}},y=async(e,t,n,r,i)=>{let a=e.ms??1700;if(t===0||!i){if(h(n,r),v(t),await Je({floorMs:tt,capMs:et(a)}),m())return;g(n);return}let o=Vi(i),s=await nt(o);m()||(h(n,r),v(t),s?await Xe(o,a):await Qe(a),!m()&&g(n))},b=()=>{if(o||u>=n.length){p();return}if(ma.current){p(),Y.setSpot(null);return}let e=u,t=n[u++],i=t.set&&`caption`in t.set?t.set.caption:void 0,a=t.set&&`spot`in t.set?t.set.spot:void 0,s=_(t);r?y(t,e,a,i,s):(h(a,i),c=setTimeout(b,t.ms??0))};return ba.current=()=>{if(o=!0,c&&clearTimeout(c),f(),Fe(),ao.current){let e=Ha({stops:a,from:u,spokenWalk:r,withNotes:!1,teach:io,marksById:ka});for(let t of e)ro(t.spot,t.line,t.mark,t.generous,t.delayMs,t.badgeMs,t.stepNumber,t.noteText)}p(),Y.setSpot(null)},(async()=>{l=setTimeout(()=>{o||Ea(!0)},600);let t=ra.current;await qe({loadFams:()=>B(re(e.blocks)),settle:t?()=>pt(t,{timeoutMs:$e,perImageMs:Ze}):void 0,firstLine:Ni.current,wantVoice:!Mi.current&&Me()!==!1}),l&&clearTimeout(l),Ea(!1),!m()&&b()})(),()=>{o=!0,ba.current=null,ya.current=!1,c&&clearTimeout(c),l&&clearTimeout(l),Ea(!1),f()}},[Y.turn]),(0,U.useEffect)(()=>{let e=Y.spot,t=Y.spec;if(!t||!e)return;let n=0,r=0,i=()=>{let a=ra.current;if(!a)return;let o=a.querySelector(`.spotlit`);if(!o){++n<12&&(r=window.setTimeout(i,90));return}let s=a.getBoundingClientRect(),c=o.getBoundingClientRect(),l=c.top-s.top-(a.clientHeight-c.height)/2,u=ka.get(e)?.find(e=>e.kind===`connect`),d=u&&typeof u.onIndex==`number`?t.blocks[u.onIndex]?.id:void 0,f=d?a.querySelector(`[data-spot-id="${CSS.escape(d)}"]`):null;if(f){let e=f.getBoundingClientRect(),t=(Math.min(c.top,e.top)+Math.max(c.top+c.height,e.top+e.height))/2-s.top-a.clientHeight/2,n=a.clientHeight*.35;l=Math.max(l-n,Math.min(l+n,t))}a.scrollTo({top:Math.max(0,a.scrollTop+l),behavior:`smooth`})};return r=window.setTimeout(i,90),()=>window.clearTimeout(r)},[Y.spot,Y.spec,ka]);let Uo=(0,U.useCallback)(()=>{Y.spot&&(ma.current=!0,Y.setSpot(null))},[Y]),Wo=(0,U.useCallback)(()=>{let e=ba.current;e?e():(Fe(),Uo())},[Uo]),[Go,Ko]=(0,U.useState)(!1),[qo,Jo]=(0,U.useState)(!1),Yo=(0,U.useCallback)(async(...e)=>{(0,Dr.flushSync)(()=>Ko(!0)),Jo(!0);try{await B(re(e[0].blocks))}catch{}finally{Jo(!1)}Y.restore(...e)},[Y]);(0,U.useEffect)(()=>{Y.busy&&Ko(!0)},[Y.busy]),(0,U.useEffect)(()=>{Ko(!1)},[Y.turn]),(0,U.useEffect)(()=>{if(!Y.spot)return;let e=e=>{e.key===`Escape`&&Wo()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[Y.spot,Wo]);let[Xo,Zo]=(0,U.useState)(null);(0,U.useEffect)(()=>Zo(null),[Y.turn]),(0,U.useEffect)(()=>mi(!1),[Y.turn]),(0,U.useEffect)(()=>ce([]),[Y.turn]),(0,U.useEffect)(()=>Zr(!1),[Y.turn]);let[Qo,$o]=(0,U.useState)(null),es=(0,U.useRef)(!1),ts=(0,U.useCallback)(e=>{es.current=!0,$o(e)},[]);(0,U.useEffect)(()=>{if(es.current){es.current=!1;return}$o(null)},[Y.turn]);let ns=(()=>{let e=Y.spec?.blocks.find(e=>e.type===`insight`);return e&&e.type===`insight`?e.props.conf:void 0})(),rs=Zc({resetKey:Y.turn,onCommit:e=>{let{intents:t,blocks:n}=nl(e,(Y.viewSpec??Y.spec)?.blocks??[]);if(!t.length)return;let r=tl([...V,...n]);ce([]),Y.run(el(t),void 0,r.length?r:void 0,void 0,t)}});oa.current=()=>{let e=ia.current,t=e?.querySelector(`[data-spot-id]`);!e||!t||(t.scrollIntoView({block:`center`,behavior:`smooth`}),window.setTimeout(()=>is(e,t),560))};let is=(e,t)=>{let n=e.querySelector(`.ink-user-overlay`);if(!n)return;let r=(Array.from(t.querySelectorAll(`*`)).filter(e=>e.children.length===0&&e.offsetHeight>0&&/\d/.test(e.textContent??``)).sort((e,t)=>parseFloat(getComputedStyle(t).fontSize)-parseFloat(getComputedStyle(e).fontSize))[0]??t).getBoundingClientRect(),i=n.getBoundingClientRect(),a=Ff(r,i);rs.onStroke(a,{stage:e,svgRect:i});let o=t.getAttribute(`data-spot-id`);o&&Y.setSpot(o)};ua.current=()=>rs.clear();let as=(0,U.useCallback)((t,n=!1)=>{let r=t.trim();if(zr.current&&r){j(``),q.current!==null&&(window.clearTimeout(q.current),q.current=null),Br.current=[...Br.current,r],K.onTranscript(Br.current.join(` `));return}if(r&&(/^diff --git /m.test(r)||/^@@ .* @@/m.test(r))){let t=ur(dr(r));if(t.changes.length>0){j(``),xn(t);let n=Gt(e);n&&fr(t,r,n).then(e=>xn(t=>t&&e));return}}if(!r&&M.length===0&&rs.intents.length===0)return;Te(null),Oe(r||null),j(``);let i=M;te(i.length>0),N([]),L(null);let a=Y.viewSpec??Y.spec,{intents:o,blocks:s}=nl(rs.intents,a?.blocks??[]),c=tl([...V,...s]);ce([]),rs.clear(),Y.run(r||el(o),i.length?i:void 0,c.length?c:void 0,void 0,o.length?o:void 0,void 0,void 0,n?{force:!0}:void 0)},[Y,M,V,rs,K,e,Te,N,L,te]);(0,U.useEffect)(()=>{if(r.current&&Lo()){let e=r.current;r.current=``,as(e)}},[]);let[os,ss]=(0,U.useState)(null),[cs,ls]=(0,U.useState)(0),[us,ds]=(0,U.useState)(null),fs=(0,U.useRef)(null),ps=(0,U.useCallback)((e,t)=>{let n=e.lessons[t];if(!n)return;let r=_r(e.id);ss(e),ls(t),ds(r),hr(e.id,t),Vo(!0);let i=`Lesson ${t+1}: ${n.title}`,a=pr(e.id,n.id);if(a){Oe(i),Y.showFrame(a,i);return}let o=Cr(e,t,r,Tr(e.topic));fs.current={courseId:e.id,lessonId:n.id,framesBefore:Y.frames.length},Oe(i),Y.run(`Teach this lesson: "${n.title}" — ${n.goal}`,void 0,void 0,void 0,void 0,i,void 0,{lesson:o})},[Y]);la.current=()=>{let e=Wl();if(!e)return;let t=e.lessons[0];ss(e),ls(0),ds(_r(e.id)),hr(e.id,0),Vo(!0);let n=pr(e.id,t.id);if(n){let e=`Lesson 1: ${t.title}`;Oe(e),Y.showFrame({...n,narration:``,tour:[]},e,{interrupt:!1})}},(0,U.useEffect)(()=>{let e=i.current;if(!e||(i.current=void 0,!Lo()))return;let t=vr(e.courseId);if(!t)return;let n=Math.min(Math.max(e.lessonIdx,0),t.lessons.length-1);ps(t,n)},[]),(0,U.useEffect)(()=>{let e=fs.current;!e||Y.busy||(fs.current=null,!(Y.frames.length<=e.framesBefore)&&br(e.courseId,e.lessonId,Y.frames[Y.frames.length-1]))},[Y.frames,Y.busy]);let ms=(0,U.useCallback)(e=>{if(!os)return;let t=os.lessons[cs];t&&(yr(os.id,t.id,e),ds(_r(os.id)))},[os,cs]);(0,U.useEffect)(()=>{if(typeof window>`u`||!os)return;let e=()=>ds(_r(os.id));return window.addEventListener(xr,e),()=>window.removeEventListener(xr,e)},[os]);let[hs,gs]=(0,U.useState)(null);(0,U.useEffect)(()=>{if(typeof window>`u`)return;let e=e=>{let t=e.detail;t?.missedCards.length&&gs(t)};return window.addEventListener(Er,e),()=>window.removeEventListener(Er,e)},[]);let _s=(0,U.useCallback)(e=>{let t=e.missedCards.flatMap(t=>nr([t],{deck:e.courseTitle,tags:[e.lessonTitle,`checkpoint`],source:{question:t.front,topic:e.topic,ts:e.at},origin:`auto`}));gs(null),Qi(t)},[Qi]),vs=(0,U.useMemo)(()=>new Set(V.map(e=>e.id)),[V]),Cs=(0,U.useCallback)((e,t)=>{Oe(`Correction: ${t}`),Y.run(`Correction — you understood "${e}", but it's actually "${t}". Keep the rest of your understanding and update the answer wherever this changes it.`,void 0,void 0,void 0,void 0,`Correction: ${t}`)},[Y]),ws=(0,U.useCallback)(e=>{let t=e.map(ie),n=e.length===2?`Fuse these two: what is the real relationship between "${t[0]}" and "${t[1]}"? Lead with the single most useful connection, and be explicit about correlation versus cause.`:`Fuse these ${e.length}: what are the most important connections and patterns across ${t.map(e=>`"${e}"`).join(`, `)}? Lead with the strongest insight, then note any correlations, trade-offs, or cause-and-effect you can support from the data.`;Oe(`Fuse: ${t.join(` × `)}`),ce([]),Y.run(n,void 0,e,void 0,void 0,`Fuse: ${t.join(` × `)}`)},[Y]),Ts=(0,U.useCallback)(e=>{e.id&&(ce(t=>t.some(t=>t.id===e.id)?t.filter(t=>t.id!==e.id):[...t,e]),gi(e=>e+1),he())},[he]),Ds=V.length>1?[`How do these relate?`,`Compare them`,`Summarize these`]:[`Explain this`,`Why it matters`,`Go deeper`],ks=Ht(e.provider).capabilities.vision;(0,U.useEffect)(()=>{let e=e=>{if(Qd(e.target))return;let t=e.clipboardData;if(!t)return;let n=[...t.files].filter(e=>e.type.startsWith(`image/`));if(n.length){e.preventDefault(),ne(n),j(Zd),gi(e=>e+1);return}let r=t.getData(`text/plain`);r&&Yd(r)&&(e.preventDefault(),j(Xd(Jd(r))),gi(e=>e+1))},t=null,n=e=>{e.dataTransfer?.types.some(e=>e===`Files`||e===`text/uri-list`)&&(e.preventDefault(),bi(!0),t&&clearTimeout(t),t=setTimeout(()=>bi(!1),200))},r=e=>{bi(!1);let t=e.dataTransfer;if(!t)return;if(Qd(e.target)){t.files.length&&e.preventDefault();return}let n=[...t.files],r=n.filter(e=>e.type.startsWith(`image/`)),i=n.filter(e=>!e.type.startsWith(`image/`)),a=n.length?null:Jd(t.getData(`text/uri-list`)||t.getData(`text/plain`)||``);!n.length&&!a||(e.preventDefault(),r.length?(ne(r),j(Zd)):i.length?ne(i):a&&j(Xd(a)),gi(e=>e+1))};return window.addEventListener(`paste`,e),window.addEventListener(`dragover`,n),window.addEventListener(`drop`,r),()=>{window.removeEventListener(`paste`,e),window.removeEventListener(`dragover`,n),window.removeEventListener(`drop`,r),t&&clearTimeout(t)}},[ne]);let As=(0,U.useRef)(bo);As.current=bo,(0,U.useEffect)(()=>{if(!En)return;let e=As.current;xo(`focus`),document.documentElement.requestFullscreen?.().catch(()=>{});let t=e=>{e.key===`Escape`&&Dn(!1)};return window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`keydown`,t),xo(e),document.fullscreenElement&&document.exitFullscreen().catch(()=>{})}},[En,xo]);let js=(0,U.useRef)(0);(0,U.useEffect)(()=>{let e=Y.frames.length;if(e>js.current&&On.current){let t=e-1;Fn(e=>new Set(e).add(t))}js.current=e},[Y.frames.length]);let X=ha({mode:`vad`,onBargeIn:()=>{Wo(),co.current=!0},onResult:e=>{let t=e.transcript.trim(),n=co.current;if(e.lowConfidence&&t){co.current=!1,Te(null),j(t),Ne(Qf),gi(e=>e+1),Ur.current&&zr.current&&(Ur.current=!1,Ai.current?.stop(),Br.current.length>0?qr():(zr.current=!1,Rr(!1)));return}if(co.current){co.current=!1;let e=so.current;if(!t||Yp(t)){e&&Vi(e);return}}if(t){if(Te(t),zr.current){Br.current=[...Br.current,t],Te(null);let e=Br.current.join(` `);K.onTranscript(e),Ur.current&&(Ur.current=!1,qr());return}if(Or.current){if(Te(null),Ud(t)){gr(!1);let e=kr.current;if(kr.current=[],Pr(0),e.length){let t=Math.round((Date.now()-Fr.current)/6e4);Oe(`Your thinking, sorted`),Y.run(Kd(e,t),void 0,void 0,void 0,void 0,`Your thinking, sorted`)}}else Gd(t)&&(kr.current=[...kr.current,t],Pr(e=>e+1));return}if(jr({phase:qi.current,activeKey:Ji.current,blanks:Yi.current,fill:Y.fill},t)){Te(null);return}as(t,n||lo.current)}},onStateChange:e=>{if(Kr.current=e.phase,xe(e.phase),ge(e.phase===`listening`),e.phase===`idle`&&(co.current=!1),e.phase===`listening`)Ne(null),e.transcript&&Ua(e.transcript),q.current!==null&&(window.clearTimeout(q.current),q.current=null);else if(e.phase===`idle`&&zr.current&&Vr.current.phase===`listening`){if(Ur.current){Ur.current=!1,qr();return}q.current!==null&&window.clearTimeout(q.current),q.current=window.setTimeout(()=>{q.current=null,Ai.current?.stop(),qr()},$f)}e.error===`not-allowed`?Ne(Lf):e.error===`unsupported`?Ne(If):e.error===`audio`?Ne(Rf):e.error===`transcription`&&Ne(zf)}}),Z=X.capabilities.stt;Ai.current=X;let Ms=(0,U.useCallback)(()=>{if(zr.current){if(q.current!==null&&(window.clearTimeout(q.current),q.current=null),H||Kr.current===`transcribing`){Ur.current=!0,H&&X.start({inCanvas:!!Y.spec,continuous:!1}),X.forceStop();return}if(X.stop(),Br.current.length===0){zr.current=!1,Rr(!1);return}qr()}},[H,qr,X,Y.spec]),Ns=(0,U.useCallback)(()=>{H&&X.stop(),q.current!==null&&(window.clearTimeout(q.current),q.current=null),Te(null),Ur.current=!1,Rr(!1)},[H,X]),Ps=En||Pf({paletteOpen:ui,shareOpen:ze,exportOpen:Ve,dashOpen:We,showSettings:ii,proofOpen:pi,showHow:Ro,replayAt:Xo,recapOpen:Ut,atlasOpen:$t,delegateOpen:Yt,srsOpen:Bt,zoomLevel:In,mindViewOpen:Sn.open});(0,U.useEffect)(()=>{if(!G||K.phase===`idle`||Ps)return;let e=e=>{e.key===`Escape`&&Ns()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[G,K.phase,Ps,Ns]),(0,U.useEffect)(()=>{let e=document.documentElement;return Yr?e.dataset.whisper=``:delete e.dataset.whisper,Ie(Yr?Cn:1),()=>{delete e.dataset.whisper,Ie(1)}},[Yr]),(0,U.useEffect)(()=>{mr?Fr.current=Date.now():(kr.current=[],Pr(0))},[mr]),(0,U.useEffect)(()=>{if(G&&H&&Se){let e=Vu(Se),t=Br.current.length>0?[...Br.current,e].join(` `).trim():e;t&&K.onTranscript(t)}},[Se,H,G]),(0,U.useEffect)(()=>{G||(Br.current=[],K.reset(),q.current!==null&&(window.clearTimeout(q.current),q.current=null))},[G]),(0,U.useEffect)(()=>()=>{q.current!==null&&window.clearTimeout(q.current)},[]),(0,U.useEffect)(()=>{let e=()=>X.setMaveaSpeaking(Ce()&&!Mi.current);return e(),ke(e)},[X]);let Fs=A.trim().length>0;(0,U.useEffect)(()=>{if(!Mr({alwaysOn:J&&!Ci,sttOk:Z,composerHasText:Fs}))return;let e=!1,t=setTimeout(()=>{e||X.start({inCanvas:!!Y.spec,continuous:!0})},100);return()=>{e=!0,clearTimeout(t),X.stop()}},[J,Ci,Z,X,Fs]),Nr({alwaysOn:J&&!Ci,sttOk:Z,composerHasText:Fs,listening:H},{start:()=>X.start({inCanvas:!!Y.spec,continuous:!0}),stop:X.stop});let Is=(0,U.useCallback)(()=>{if(!Z){Ne(If),gi(e=>e+1);return}J?H?X.forceStop():Ci?(wi(!1),Wo(),X.start({inCanvas:!!Y.spec,continuous:!0})):Kr.current===`transcribing`?(wi(!0),X.forceStop()):(wi(!0),X.stop()):H?X.forceStop():(Wo(),X.start({inCanvas:!!Y.spec}))},[Z,J,Ci,H,X,Y.spec,Wo]),[Rs,zs]=(0,U.useState)(!1),Vs=(0,U.useRef)(null);(0,U.useEffect)(()=>{let e=()=>{Vs.current!==null&&(window.clearTimeout(Vs.current),Vs.current=null)};if(Y.status===`thinking`){zs(!0),e();return}if(Y.status===`idle`){zs(!1),e();return}if(Rs&&Y.spec){zs(!1),e();return}Rs&&Vs.current===null&&(Vs.current=window.setTimeout(()=>{zs(!1),Vs.current=null},1100))},[Y.status,Y.spec,Rs]),(0,U.useEffect)(()=>()=>{Vs.current!==null&&window.clearTimeout(Vs.current)},[]);let Us=Ia({speak:Vi,cancelSpeak:Fe,isSpeaking:Ce,muted:Le,turnCount:Y.frames.length,gates:{atRest:Y.status===`showing`||Y.status===`idle`,busy:Y.busy,listening:H,introHold:Rs,hasCanvas:!!Y.spec,modalOpen:ui||ze||Ve||We||ii||pi||Ro||Xo!==null||Ut||Yt||Bt||$t||an!==null||hn!==null||Sn.open||In!==null}}),Gs=Us.interjecting,Ks=(0,U.useRef)(null),qs=(0,U.useMemo)(()=>{let e=Ca(Y.spec);return e===`warm`&&wa(Y.spec)&&(Ks.current===null||Ks.current===Y.spec)&&(Ks.current=Y.spec,e=`celebrate`),_a(Y.status,H,Gs,e,Le)},[Y.status,H,Gs,Y.spec,Le]),Ys=(0,U.useMemo)(()=>Es({status:Y.status,listening:H,interjecting:Gs,spec:Y.viewSpec??Y.spec}),[Y.status,H,Gs,Y.viewSpec,Y.spec]);(0,U.useEffect)(()=>(xs(document,Ys),()=>Ss(document)),[Ys]);let Xs=(0,U.useCallback)(()=>{let e=da.current,t=fa.current,n=pa.current;if(!e||!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();!r.width||!i.width||(e.style.setProperty(`--home-x`,`${Math.round(r.left+r.width/2-(i.left+i.width/2))}px`),e.style.setProperty(`--home-y`,`${Math.round(r.top+r.height/2-(i.top+i.height/2))}px`),e.style.setProperty(`--home-scale`,(Math.max(r.width,12)*1.3/150).toFixed(3)))},[]);(0,U.useLayoutEffect)(()=>(Xs(),window.addEventListener(`resize`,Xs),()=>window.removeEventListener(`resize`,Xs)),[Xs]),(0,U.useLayoutEffect)(()=>{Xs()},[Qr,Xs]);let Zs=!!Y.spec&&!(Rs||Gs),Qs=Bo,ec=Bo&&(!Y.spec||Rs||Gs),tc=!Y.spec&&!Bo;(0,U.useEffect)(()=>{if(!e.morningBrief||Rt||tc||Y.busy||Y.restored||!hl(St()))return;gl(),zt(!0);let t=Y.frames.slice(-3).map(e=>e.question).filter(Boolean);Y.run(_l(t),void 0,void 0,void 0,void 0,`Morning brief`)},[e.morningBrief,tc,Rt,Y.busy,Y.restored]),(0,U.useEffect)(()=>{Zs&&da.current&&(da.current.style.setProperty(`--scroll-dock`,`0`),Xs())},[Zs,Xs]);let nc=Gs?Us.line:Y.narration,rc=!Zs&&!!nc&&(Gs||Y.status===`speaking`||Y.status===`showing`),cc=ec&&Y.status===`speaking`,lc=(0,U.useRef)(new Map),[uc,dc]=(0,U.useState)(0);(0,U.useEffect)(()=>{let e=lc.current,t=new Set(Y.frames.map(e=>e.at)),n=!1;for(let r of[...e.keys()])t.has(r)||(e.delete(r),n=!0);let r=Y.frames.filter(t=>!e.has(t.at)),i=!1;return(async()=>{for(let t of r){let r=await cn(`${t.question} ${t.narration} ${t.spec?.title??``}`.trim());if(i)return;r&&(e.set(t.at,r),n=!0)}n&&dc(e=>e+1)})(),()=>{i=!0}},[Y.frames]);let mc=(0,U.useMemo)(()=>Tt(Y.frames,Y.frames.map(e=>lc.current.get(e.at)??null)),[Y.frames,uc]),gc=Y.frames.length-1,_c=Y.viewIndex??gc,vc=Y.viewOverride!=null,yc=!vc&&(Y.viewIndex==null||Y.viewIndex===gc),bc=Y.viewOverride?mc.find(e=>Y.viewOverride?.id===`thread-`+e.id):void 0,xc=mc.find(e=>e.moments.some(e=>e.frameIndex===_c)),Sc=mc.length>=2?xc?.color:void 0,Cc=Y.frames[gc],wc=mc[mc.length-1],Tc=mc.length>=2&&wc?.moments.length===1&&wc.moments[0].frameIndex===gc,Ec=yc&&!Y.busy&&Tc&&Cc?.mode===`replace`&&!!Cc&&lc.current.has(Cc.at),[Dc,Oc]=(0,U.useState)(null),kc=(0,U.useRef)(-1);(0,U.useEffect)(()=>{Ec&&kc.current!==gc&&(kc.current=gc,Oc(gc))},[Ec,gc]);let jc=(0,U.useCallback)(e=>{let t=Ba(e.moments.map(e=>Y.frames[e.frameIndex]).filter(e=>!!e),{title:e.title,tint:e.color,id:`thread-`+e.id});t&&(Y.previewSpec(t),ra.current?.scrollTo({top:0}))},[Y]),Mc=yc&&V.length===0?(Y.viewSpec??Y.spec)?.suggests??[]:[],Nc=Y.viewSpec??Y.spec,Pc=vc?Nc?{question:null,narration:Nc.title||`This thread`}:null:ac({spec:Nc,frames:Y.frames,viewIndex:Y.viewIndex,narration:Y.narration,lastAsk:Ee}),Fc=(0,U.useMemo)(()=>Bs(Nc),[Nc]),Ic=sc(oc(Y.status)),Lc=(0,U.useMemo)(()=>Y.busy?Y.status===`showing`?[Nf(Y.pendingShape)]:Mf(Ee??``,Y.history):[],[Y.busy,Y.status,Y.pendingShape,Ee,Y.history]),Rc=gf(),zc=Tf(),Bc=(0,U.useSyncExternalStore)(ru,iu,iu),[Vc,Hc]=(0,U.useState)(null);(0,U.useEffect)(()=>Hc(null),[Y.turn]),(0,U.useEffect)(()=>Sa(!1),[Y.turn]);let Uc=Rc&&!Le,[Wc,Gc]=(0,U.useState)(!1);(0,U.useEffect)(()=>{if(Uc){Gc(!0);return}let e=window.setTimeout(()=>Gc(!1),600);return()=>window.clearTimeout(e)},[Uc]),(0,U.useEffect)(()=>{Le&&ba.current?.()},[Le]);let[Kc,qc]=(0,U.useState)(!1);(0,U.useEffect)(()=>qc(!1),[Y.turn]),(0,U.useEffect)(()=>Jt(!1),[Y.turn]);let Jc=(0,U.useMemo)(()=>sf(Y.frames,mc),[Y.frames,mc]),Yc=Hn(),Xc=Un(),Qc=(0,U.useCallback)(e=>{if(s.current){jo.current.playExtra(e);return}Y.busy||d(e)},[Y.busy]),$c=(0,U.useCallback)(e=>{if(!Z){Ne(If);return}Wo(),Ti.current===null&&(Ti.current={enabled:J,paused:Ci}),wi(!1),Si(!0),e===`think`?(gr(!1),Or.current=!1,Rr(!0),zr.current=!0):(Rr(!1),zr.current=!1,gr(!0),Or.current=!0)},[Z,J,Ci,Wo]);(0,U.useEffect)(()=>{if(G||mr)return;let e=Ti.current;e!==null&&(Ti.current=null,wi(e.paused),Si(e.enabled),e.enabled&&!e.paused&&Z&&!A.trim()?X.start({inCanvas:!!Y.spec,continuous:!0}):X.stop())},[G,mr,Z,A,X,Y.spec]);let[rl,il]=(0,U.useState)(null),[al,cl]=(0,U.useState)(!1),[ll,ul]=(0,U.useState)(0),dl=(0,U.useMemo)(()=>{let e=((Y.viewSpec??Y.spec)?.blocks??[]).filter(e=>e.type===`world`);return e.length>0?e:Fi?[Fi]:[]},[Y.viewSpec,Y.spec,Fi]),fl=(0,U.useMemo)(()=>dl.find(e=>e.id===rl)??dl[0],[dl,rl]);zi.current=dl;let pl=fl!==void 0,ml=bo===`world`&&pl,vl=(0,U.useCallback)(e=>{e&&il(e),cl(!1),xo(`world`)},[xo]);Bi.current=vl;let yl=(0,U.useCallback)(()=>xo(Hr()),[xo]);(0,U.useEffect)(()=>fe(vl),[vl]),(0,U.useEffect)(()=>{bo===`world`&&!pl&&yl()},[bo,pl,yl]);let bl=ml?fl.id??null:null,Sl=ml&&fl.props.world===void 0,{generateWorld:Cl}=Y;(0,U.useEffect)(()=>{if(!bl||!Sl)return;let e=!0;return cl(!1),Cl(bl).then(t=>{e&&!t&&cl(!0)}),()=>{e=!1}},[bl,Sl,ll,Cl]);let{expandWorld:wl}=Y,Tl=(0,U.useCallback)((e,t)=>bl?wl(bl,e,t):Promise.resolve(null),[bl,wl]),Q={atlas:{available:tn>0,reason:`Fills in as you discuss things`,run:()=>en(!0),preload:mp.preload},"pdf-world":{available:M.some(At),reason:`Attach a PDF, Office doc, or data file (CSV, text, JSON) to split it into a map`,run:()=>{let e=M.filter(At);if(e.length>0){vn(e);return}gi(e=>e+1),vi(e=>e+1),L(`Attach a PDF, Office doc, or data file (CSV, text, JSON) to split it into a map of claims.`)},preload:Np.preload},synthesis:{available:!0,run:()=>{let e=M.filter(At);e.length>=2?gn(e):window.location.hash=`#/synthesis`},preload:()=>M.filter(At).length>=2?Lp.preload():Jp(`#/synthesis`)},ripple:{available:!0,run:()=>xn(lr),preload:gp.preload},review:{available:!0,run:()=>Vt(!0),preload:Up.preload},flashcards:{available:!0,run:()=>{window.location.hash=`#/flashcards`},preload:()=>Jp(`#/flashcards`)},courses:{available:!0,run:()=>{window.location.hash=`#/courses`},preload:()=>Jp(`#/courses`)},dashboards:{available:!0,run:()=>{window.location.hash=`#/dashboards`},preload:()=>Jp(`#/dashboards`)},gallery:{available:!0,run:()=>{window.location.hash=`#/gallery`},preload:()=>Jp(`#/gallery`)},recap:{available:!!Jc,reason:`Once we've covered something`,run:()=>Jt(!0),preload:xp.preload},present:{available:!!Y.spec,reason:`Once there is an answer`,run:()=>Dn(!0),preload:zp.preload},track:{available:!!Y.spec,reason:`Once there is a conversation to track`,run:()=>Ke(!0),preload:Ap.preload},share:{available:Y.frames.length>0,reason:`Once there is something to share`,run:()=>Be(!0),preload:Ep.preload},export:{available:Y.frames.length>0,reason:`Once there is an answer to export`,run:()=>He(!0),preload:Op.preload},focus:{available:!!Y.spec,reason:`Once there is an answer`,run:()=>xo(`focus`)},board:{available:!!Y.spec,reason:`Once there is an answer`,run:()=>xo(`canvas`)},"living-answer":{available:pl,reason:`Once an answer has causes to trace`,run:()=>vl(),preload:Fp.preload},ink:{available:!!Y.spec,reason:`Once there is an answer to mark`,run:()=>pe(!0)},blanks:{available:!0,run:()=>Ne(`When a number in an answer is truly yours to give, Mavéa leaves a glowing hole for it — type, say, or drop a card in, and it finishes the answer around your value.`)},"watch-me-think":{available:Z,reason:Z?void 0:If,run:()=>$c(`think`)},"just-listen":{available:Z,reason:Z?void 0:If,run:()=>$c(`listen`)},whisper:{available:!0,run:()=>{si(`you`),li(!0),ai(!0)},preload:sp.preload},ghost:{available:Z&&e.quality!==`fast`,reason:Z?e.quality===`fast`?`Needs Balanced quality or higher — you're on Fast`:void 0:If,run:()=>$c(`listen`)},delegate:{available:!0,run:()=>Qt(!0),preload:Vp.preload},memory:{available:!0,run:()=>{si(`you`),ai(!0)},preload:sp.preload},library:{available:Ho.length>0,reason:`Fills in as you save conversations`,run:()=>ti(!0),preload:Cp.preload},deepzoom:{available:!0,run:()=>{let e=Ee??``;window.location.hash=e?`#/deepzoom?seed=${encodeURIComponent(e)}`:`#/deepzoom`},preload:()=>Jp(`#/deepzoom`)},"zoom-deck":{available:!!Jc,reason:`Opens once there are a few answers to pull back from`,run:()=>Ln(`chapters`),preload:fp.preload},"morning-brief":{available:!0,run:()=>{si(`you`),li(!0),ai(!0)},preload:sp.preload},settings:{available:!0,run:()=>{si(void 0),ai(!0)},preload:sp.preload},how:{available:!0,run:()=>zo(!0),preload:np.preload}};Oo.current=Q;let Dl=mt.filter(e=>e.surface!==`demo`).map(e=>{let t=Q[e.id]??{available:!0,run:()=>void 0},n=e.id===`how`?Ki:e.tourChapter?()=>Qc(e.tourChapter):void 0;return{feature:e,available:t.available,reason:t.reason,run:t.run,preload:t.preload,watch:n}}),Ol=[{label:`New`,blurb:`Start a fresh session`,onClick:()=>{Y.reset(),Us.reset(),Vo(!1),te(!1),xt()},show:!!Y.spec},{label:`Dashboard`,blurb:`Open your living dashboards`,onClick:Q.dashboards.run,preload:Q.dashboards.preload,show:!!Y.spec}],kl=[{label:`Rehearse`,blurb:`Practice a hard conversation — take the seat, or send your Mavéa`,onClick:Q.delegate.run,preload:Q.delegate.preload,show:!0},{label:`Study`,blurb:Yc>0?`${Yc} card${Yc===1?``:`s`} ready`:Xc===`spaced`?`Go through what you have saved`:`Flip through your cards`,onClick:Q.review.run,preload:Q.review.preload,show:!0},{label:`Manage flashcards`,blurb:`See, organize, and edit your study deck`,onClick:Q.flashcards.run,preload:Q.flashcards.preload,show:!0},{label:`Courses`,blurb:`Turn a topic into a structured syllabus — a lesson at a time, at your pace`,onClick:Q.courses.run,preload:Q.courses.preload,show:!0},{label:`Recap`,blurb:`What we covered — the session so far`,onClick:Q.recap.run,preload:Q.recap.preload,show:!!Jc}],Al=[{label:`Present`,blurb:`Fill the room — the chrome falls away, the mic stays live`,onClick:Q.present.run,preload:Q.present.preload,show:!!Y.spec},{label:`Export`,blurb:`Choose a template and export a polished PDF`,onClick:Q.export.run,preload:Q.export.preload,show:Y.frames.length>0},{label:`Video`,blurb:`Share a moment, a topic, or the whole conversation`,onClick:Q.share.run,preload:Q.share.preload,show:Y.frames.length>0}],jl=[{label:`Search all features`,blurb:`Browse Mavéa’s feature index · ${v}`,onClick:di,preload:ip.preload,show:!0},{label:`Atlas`,blurb:`Kept conversations and topics, as a place`,onClick:Q.atlas.run,preload:Q.atlas.preload,show:tn>0},{label:`Watch me think`,blurb:`A live map of your thinking`,onClick:Q[`watch-me-think`].run,show:Q[`watch-me-think`].available},{label:`Prism`,blurb:Q[`pdf-world`].available?`Split your document into a map of its claims`:`Attach a PDF, Office doc, or data file — then split it into claims`,onClick:Q[`pdf-world`].run,preload:Q[`pdf-world`].preload,show:!0},{label:`Ripple`,blurb:`Model a code change’s impact, risks, and a proposed ship order`,onClick:Q.ripple.run,preload:Q.ripple.preload,show:!0},{label:`Dashboards`,blurb:rn>0?`${rn} dashboard${rn===1?``:`s`} set to refresh while Mavéa is open`:`Create a dashboard that refreshes on schedule while Mavéa is open`,onClick:Q.dashboards.run,preload:Q.dashboards.preload,show:!0},{label:`Deep Zoom`,blurb:Ee?`Zoom from field to mechanism — "${Ee.slice(0,50)}${Ee.length>50?`…`:``}"`:`Telescope any topic from big picture to finest detail`,onClick:()=>{let e=Ee??``;window.location.hash=e?`#/deepzoom?seed=${encodeURIComponent(e)}`:`#/deepzoom`},show:!0}],Ml=(0,U.useCallback)(e=>{e===`out`&&Jc&&Ln(`chapters`)},[Jc]);ar(ra,Ml),(0,U.useEffect)(()=>(Pe(uu),()=>Pe(null)),[]);let Nl=(0,U.useRef)(!0);(0,U.useEffect)(()=>{Y.busy&&(ou(),Nl.current=!1,zn(null),Jn())},[Y.busy,Y.turn,Jn]),(0,U.useEffect)(()=>(cu(Xo!==null),()=>cu(!1)),[Xo]),(0,U.useEffect)(()=>Jn(),[Y.viewIndex,Jn]);let Pl=Y.spec?.blocks.length??0;(0,U.useEffect)(()=>{Pl>0&&lu(Pl)},[Pl]),(0,U.useEffect)(()=>{if(Y.busy)return;if(Y.spec){let e=du();if(e){zn(e);let t=Y.frames.length-1,n=Y.frames[t];n&&Xn.set(Ge(n),e)}}if(Rc||Nl.current)return;let e=window.setTimeout(()=>{Nl.current=!0,su()},ep);return()=>window.clearTimeout(e)},[Rc,Y.busy,Y.spec,Bc,Y.frames,Xn]);let Fl=(0,U.useMemo)(()=>yc?Rn:Y.viewIndex!=null&&Y.frames[Y.viewIndex]?Xn.get(Ge(Y.frames[Y.viewIndex])):null,[yc,Rn,Y.viewIndex,Y.frames,Xn]),Ll=(0,U.useMemo)(()=>{if(!Wn||Bn===null||!Fl)return null;let e=yc?Y.spec:Y.viewSpec;if(!e)return null;let t=yc?Y.tour:Y.viewIndex==null?[]:Y.frames[Y.viewIndex]?.tour??[],n=hu(Fl,Bn,t,e.blocks.length);return{...e,blocks:e.blocks.slice(0,n)}},[Wn,Bn,Fl,yc,Y.spec,Y.viewSpec,Y.tour,Y.viewIndex,Y.frames]),Rl=Y.error?(0,W.jsxs)(`div`,{className:`live-error`,role:`alert`,children:[(0,W.jsxs)(`div`,{className:`live-error-head`,children:[(0,W.jsx)(z.alert,{}),(0,W.jsx)(`span`,{children:`Couldn’t answer`})]}),(0,W.jsx)(`p`,{className:`live-error-msg`,children:Y.error.message}),(0,W.jsxs)(`div`,{className:`live-error-actions`,children:[(0,W.jsx)(`button`,{type:`button`,className:`live-error-btn primary`,onClick:()=>{let e=Y.error;e&&Y.run(e.retry,e.attachments,e.selectedBlocks,void 0,e.inkIntents,e.question)},disabled:Y.busy,children:`Retry`}),(0,W.jsx)(`button`,{type:`button`,className:`live-error-btn`,onClick:()=>ai(!0),children:`Open settings`})]})]}):null,zl=G,[Vl,Hl]=(0,U.useState)(160);(0,U.useEffect)(()=>{if(!zl)return;let e=document.querySelector(`.live-dock`);if(!e)return;let t=()=>Hl(Math.round(e.getBoundingClientRect().height)+8);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[zl]);let Ul=zl?(0,W.jsxs)(`div`,{className:`ms-stage-fill`,"data-phase":K.phase,style:{"--ms-bottom-reserve":`${Vl}px`},children:[(0,W.jsxs)(`button`,{type:`button`,className:`ms-exit`,onClick:Ns,title:`Back to the conversation (Esc)`,children:[(0,W.jsx)(z.chevL,{}),`Back to conversation`]}),(0,W.jsx)(Rd,{mindShape:K,onSettled:()=>{Vi(`I think this is the shape of it.`)},onConfirmUnsaid:()=>K.confirmUnsaid(),onDismissUnsaid:()=>K.dismissUnsaid(),onAction:(e,t)=>{if(e===`add-more`)Te(null),K.resume(),!H&&Z&&X.start({inCanvas:!!Y.spec,continuous:J&&!Ci});else if(e===`not-quite`)Br.current=[],K.resume(!1),Te(null),!H&&Z&&X.start({inCanvas:!!Y.spec,continuous:J&&!Ci});else if(e===`share`)Be(!0);else if(e===`present`)Dn(!0);else if(e===`answer`||e===`plan`||e===`commit-plan`||e===`tell-apart`){let n=K.spec,r=e===`commit-plan`||e===`plan`?`plan`:`answer`,i=n?Hd(n,r):Se??``;e===`tell-apart`&&t?.tension&&(i=`I keep coming back to “${t.tension.a}” but I also said “${t.tension.b}.” Help me tell these two reasons apart — are they the same thing or not?\n\n`+i);let a=Y.restored;if(H&&!J&&X.stop(),Te(null),K.reset(),Rr(!1),i){let t=e===`tell-apart`?`Telling them apart`:n?.center||(r===`plan`?`A plan`:`An answer`);Oe(t),Y.run(i,void 0,void 0,void 0,void 0,t,n??void 0,a?{freshStart:!0}:void 0)}}},liveTranscript:Se||void 0,thoughtCount:td([Br.current.join(` `),Se??``].join(` `))})]}):null,Gl=G?K.phase===`settled`||K.phase===`pausing`?`Add thought`:`Done thinking`:`Watch me think`;return(0,W.jsxs)(`div`,{className:`mavea-app with-rail live-voice canvas-flat`+(Zs?` face-homed`:``)+(tc?` in-wizard`:``)+(En?` presenting`:``)+(Qr?` rail-collapsed`:``)+(zl?` watch-thinking`:``),"data-title":Y.spec?.title??``,...En?{"data-preso":An}:{},ref:da,children:[s.current&&(0,W.jsx)(ji,{driver:ko}),s.current&&ko.done&&(0,W.jsx)(Pi,{onStart:Gi,onReplay:Ki,onPlayExtra:ko.playExtra,hasStoredSession:Ui}),O.current&&(()=>{let e=F(O.current);return e?(0,W.jsx)($i,{driver:Ao,member:e,onExit:Gi}):null})(),En&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`preso-style-picker`,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||Nn(!1)},children:[(0,W.jsxs)(`button`,{type:`button`,className:`preso-style-btn`+(Mn?` is-open`:``),onClick:()=>Nn(e=>!e),"aria-expanded":Mn,"aria-haspopup":`listbox`,children:[(0,W.jsx)(`span`,{className:`preso-swatch-sm`,style:{background:$d.find(e=>e.id===An)?.accent??`var(--presence)`}}),`Style`]}),Mn&&(0,W.jsx)(`div`,{className:`preso-menu`,role:`listbox`,"aria-label":`Presentation style`,children:$d.map(e=>(0,W.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":An===e.id,className:`preso-row`+(An===e.id?` is-active`:``),onClick:()=>{jn(e.id),rf(e.id),Nn(!1)},children:[(0,W.jsx)(`span`,{className:`preso-swatch`,style:{background:e.accent}}),(0,W.jsx)(`span`,{className:`preso-name`,children:e.label}),(0,W.jsx)(`span`,{className:`preso-desc`,children:e.description})]},e.id))})]}),(0,W.jsx)(`button`,{type:`button`,className:`present-exit`,onClick:()=>Dn(!1),title:`End the presentation (Esc)`,children:`End show · Esc`}),(0,W.jsx)($,{children:(0,W.jsx)(Bp,{spec:Y.viewSpec??Y.spec,question:Pc?.question??null,narration:Pc?.narration??Y.narration,skinId:An,autoAdvanceMs:s.current||O.current?2600:void 0,onExit:()=>Dn(!1)})})]}),(0,W.jsx)(`div`,{className:`presence-layer`+(Zs?` corner`:ec?``:` idlehome`)+(rc?` has-caption`:``)+(ni?` is-mem-save`:``),ref:pa,children:(0,W.jsxs)(`div`,{className:`presence-positioner`,children:[Bo&&(0,W.jsx)(`div`,{className:`presence-seed`,"aria-hidden":`true`},Y.turn),(0,W.jsx)(ue,{state:qs.state,emotion:qs.emotion,gaze:qs.gaze,muted:Le})]})}),(0,W.jsx)(`div`,{className:`presence-scrim`+(cc?` show`:``)}),rc&&(0,W.jsx)(`div`,{className:`center-caption`,role:`status`,"aria-live":`polite`,children:nc}),(0,W.jsx)(mf,{activity:Y.activity,sources:Y.busy?Y.liveSources:[]}),(0,W.jsxs)(`div`,{className:`topbar`,children:[(0,W.jsxs)(`button`,{className:`brand brand-link`,type:`button`,onClick:qp,title:`Back to the demo`,"aria-label":`Back to the demo`,children:[(0,W.jsx)(`span`,{className:`brand-dot jelly-mark`,ref:fa}),(0,W.jsx)(`span`,{className:`brand-name`,children:`Mavéa`}),Y.spec&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`brand-sep`}),(0,W.jsx)(`span`,{className:`workspace-name`,children:Y.error?`Couldn’t answer`:Y.spec.title})]})]}),(0,W.jsxs)(`span`,{className:`live-badge`,title:`Live · ${t.label}`,"aria-label":`Live mode`,children:[(0,W.jsx)(`span`,{className:`live-dot`}),`Live`]}),(0,W.jsx)(`div`,{className:`topbar-spacer`}),(0,W.jsx)(ln,{label:`Create`,items:Ol}),(0,W.jsx)(ln,{label:`Practice`,items:kl,badge:Yc}),(0,W.jsx)(ln,{label:`Share`,items:Al}),(0,W.jsx)(ln,{label:`Explore`,items:jl}),(0,W.jsx)(_,{onOpen:di,preload:ip.preload}),(0,W.jsx)(`span`,{className:`topbar-divider`,"aria-hidden":`true`}),(0,W.jsx)(Gn,{})]}),(0,W.jsx)(ic,{chapters:mc,frames:Y.frames,currentIndex:_c,onJump:Y.jumpTo,onReplay:Y.frames.length>0?()=>Zo(Y.frames.length-1):void 0,onOverview:Y.frames.length>0?()=>qc(!0):void 0,resumed:Y.restored,chatOpen:Xr,onToggleChat:()=>Zr(e=>!e),collapsed:Qr,onToggleCollapse:()=>$r(e=>!e),onOpenPast:Ho.length>0?()=>ti(!0):void 0,onStudy:()=>Vt(!0),roomIndices:Pn,bookmarks:$a,onToggleBookmark:eo,onViewMindMap:e=>{let t=Y.frames[e];t?.mind&&Tn({open:!0,spec:t.mind})},onSeeTogether:jc}),(0,W.jsxs)($s,{holdEnabled:Z&&Oi===`hold`,showHint:!1,pttKey:e.pttKey,pttSide:e.pttSide,onHoldStart:()=>{Wo(),X.start({inCanvas:!!Y.spec})},onHoldEnd:()=>X.forceStop(),onChangePttKey:e=>qt({pttKey:e}),onChangePttSide:e=>qt({pttSide:e}),children:[(Yr||J&&Z)&&(0,W.jsxs)(`div`,{className:`dock-modes`,role:`group`,"aria-label":`Listening modes`,children:[Yr&&(0,W.jsx)(`span`,{className:`whisper-badge`,children:`won't wake anyone`}),J&&Z&&(0,W.jsx)(`button`,{type:`button`,className:`listen-mode-chip`+(mr?` on`:``),"aria-pressed":mr,onClick:()=>{gr(e=>!e),G&&(zr.current=!1,Rr(!1))},title:Lr,"aria-label":Lr,children:mr?`Just listening · ${Ar} banked`:`Just listen`}),mr&&Ar>0&&(0,W.jsx)(`button`,{type:`button`,className:`listen-mode-chip`,onClick:()=>{gr(!1);let e=kr.current;if(kr.current=[],Pr(0),e.length){let t=Math.round((Date.now()-Fr.current)/6e4);Oe(`Your thinking, sorted`),Y.run(Kd(e,t),void 0,void 0,void 0,void 0,`Your thinking, sorted`)}},children:`Thoughts?`})]}),Z&&(0,W.jsx)(Ue,{kind:`voice-data`,from:`live`}),Ae&&(0,W.jsxs)(`div`,{className:`voice-notice`,role:`status`,children:[Ae===Qf?(0,W.jsx)(z.spark,{}):(0,W.jsx)(z.micOff,{}),(0,W.jsx)(`span`,{children:Ae}),(0,W.jsx)(`button`,{type:`button`,className:`voice-notice-x`,"aria-label":`Dismiss voice notice`,onClick:()=>Ne(null),children:(0,W.jsx)(z.x,{})})]}),(M.length>0||I)&&(0,W.jsxs)(`div`,{className:`attach-strip`,role:`list`,"aria-label":`Attached files`,children:[M.map((e,t)=>(0,W.jsxs)(`span`,{className:`attach-chip`,role:`listitem`,children:[kt(e)?(0,W.jsx)(`img`,{className:`attach-thumb`,src:`data:${e.mime};base64,${e.data}`,alt:``}):(0,W.jsx)(z.paperclip,{}),(0,W.jsx)(`span`,{className:`attach-name`,children:jt(e)}),(Et(e)&&ks||Dt(e)||Nt(e))&&(0,W.jsx)(`button`,{type:`button`,className:`attach-explode`,"aria-label":`Explode ${e.name} into a map of its claims`,title:`Explode into a map of grounded claims`,onClick:()=>on([e]),children:`⊹ Explode`}),(0,W.jsx)(`button`,{type:`button`,className:`attach-remove`,"aria-label":`Remove ${e.name}`,onClick:()=>oe(t),children:(0,W.jsx)(z.x,{})})]},t)),(()=>{let e=M.filter(e=>Dt(e)||Nt(e)||Et(e)&&ks);if(e.length<=1)return null;let t=(0,W.jsxs)(`button`,{type:`button`,className:`attach-explode attach-compare`,"aria-label":`Compare ${e.length} documents — map their claims and find where they agree and contradict`,title:`Explode all documents together and compare them`,onClick:()=>on(e),children:[`⊹ Compare `,e.length,` documents`]},`compare`),n=(0,W.jsxs)(`button`,{type:`button`,className:`attach-explode attach-compare`,"aria-label":`Synthesize ${e.length} sources — fuse them into one map of themes, contradictions, and gaps`,title:`Fuse all sources into one navigable Synthesis World`,onClick:()=>gn(e),children:[`⊹ Synthesize `,e.length,` sources`]},`synth`);return e.length>=4?n:e.length>=3?(0,W.jsxs)(W.Fragment,{children:[t,n]}):t})(),I&&(0,W.jsx)(`span`,{className:`attach-error`,role:`status`,children:I})]}),M.length>0&&(0,W.jsx)(Ue,{kind:`upload`,from:`live`}),Y.spec&&(0,W.jsx)(ol,{armed:de,pins:rs.pins,miss:rs.miss,onUndo:rs.undo,onSend:rs.send}),V.length>0&&(0,W.jsxs)(`div`,{className:`pin-dock`,children:[(0,W.jsx)(`div`,{className:`pin-strip`,role:`list`,"aria-label":`Elements you're asking about`,children:V.map(e=>(0,W.jsxs)(`span`,{className:`pin-chip`,role:`listitem`,children:[(0,W.jsx)(z.chat,{}),(0,W.jsx)(`span`,{className:`pin-name`,children:ie(e)}),(0,W.jsx)(`button`,{type:`button`,className:`pin-remove`,"aria-label":`Unpin ${ie(e)}`,onClick:()=>Ts(e),children:(0,W.jsx)(z.x,{})})]},e.id))}),(0,W.jsxs)(`div`,{className:`pin-suggests`,role:`list`,"aria-label":`Quick follow-ups`,children:[V.length>=2&&(0,W.jsxs)(`button`,{type:`button`,className:`live-chip pin-fuse-chip`,disabled:Y.busy,title:`Combine these ${V.length} cards into a single new answer — useful when you want Mavéa to find the pattern, trade-off, or story that runs across all of them at once`,onClick:()=>ws(V),children:[`Fuse `,V.length,` into one`]}),Ds.map(e=>(0,W.jsx)(`button`,{type:`button`,className:`live-chip`,onClick:()=>as(e),disabled:Y.busy,children:e},e))]})]}),(0,W.jsxs)(`div`,{className:Qs?`voice-capsule`:`composer-passthrough`,children:[Qs&&(0,W.jsxs)(`div`,{className:`voice-strip`,children:[Wc&&!zc?(0,W.jsxs)(`button`,{type:`button`,className:`vc-status`,onClick:Wo,title:`Tap to stop and show the whole answer at once`,"aria-label":`Stop speaking and show the whole answer`,children:[(0,W.jsxs)(`span`,{className:`vc-orb`,"aria-hidden":`true`,children:[(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{})]}),(0,W.jsx)(`span`,{className:`vc-status-label`,children:`Speaking`})]}):Ta&&!Le?(0,W.jsxs)(`div`,{className:`vc-status vc-preparing`,role:`status`,"aria-busy":`true`,children:[(0,W.jsxs)(`span`,{className:`vc-orb`,"aria-hidden":`true`,children:[(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{})]}),(0,W.jsx)(`span`,{className:`vc-status-label`,children:`Preparing voice…`})]}):zc&&!Le?(0,W.jsx)(`div`,{className:`vc-status vc-preparing vc-quiet`,role:`status`,"aria-busy":`true`,"aria-label":`Preparing voice`,children:(0,W.jsxs)(`span`,{className:`vc-orb`,"aria-hidden":`true`,children:[(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{}),(0,W.jsx)(`i`,{})]})}):null,(0,W.jsx)(`div`,{className:`vc-transcript`,"aria-hidden":`true`,children:Vc??Y.narration??``}),(0,W.jsxs)(`button`,{type:`button`,onClick:()=>Re(e=>!e),title:Le?`Unmute Mavéa's voice — your microphone is unaffected`:`Mute Mavéa's voice — muted answers land written out at once, with notes and pen marks standing in for the walk. Your microphone is unaffected.`,"aria-pressed":!Le,className:`voice-switch`+(Le?` is-muted`:``),children:[Le?(0,W.jsx)(z.speakerOff,{}):(0,W.jsx)(z.speaker,{}),(0,W.jsx)(`span`,{className:`voice-switch-label`,children:`Mavéa's voice`}),(0,W.jsx)(`span`,{className:`voice-switch-track`,"aria-hidden":`true`,children:(0,W.jsx)(`span`,{className:`voice-switch-thumb`})})]}),(0,W.jsx)(Au,{}),(0,W.jsx)(Nu,{}),(0,W.jsxs)(`button`,{className:`live-model-chip`,onClick:()=>ai(e=>!e),title:O.current?`The model that generated this curated prerecorded example`:Ic?`Model settings · last reply ${Ic}`:`Model settings`,children:[(0,W.jsx)(`span`,{className:`chip-dot`,"aria-hidden":`true`}),(0,W.jsx)(`span`,{className:`chip-model`,children:O.current?Ao.model??`—`:n}),(0,W.jsx)(`span`,{className:`chip-caret`,"aria-hidden":`true`})]})]}),(0,W.jsx)(Gr,{value:A,onChange:e=>{j(e)},onSend:as,listening:H,heard:Se,onMic:Is,micMode:Oi,micArmed:J&&!Ci,micPaused:J&&Ci,micProcessing:ye===`transcribing`,placeholder:G?`Talk, or type a thought — it lands on the map…`:V.length?V.length>1?`Ask about the selected elements…`:`Ask about the selected element…`:`Talk, or type — anything.`,focusSignal:hi,disabled:Y.busy,onFiles:ne,attachPulse:_i,attachTitle:ks?`Attach an image or PDF`:`Attach a doc or data file to explode — ${n} can't read images/PDFs directly`,onMicDown:()=>{Z&&(Wo(),X.start({inCanvas:!!Y.spec}))},onForceStop:()=>X.forceStop(),onMicCancel:()=>X.stop(),tools:(0,W.jsxs)(W.Fragment,{children:[Y.spec&&(0,W.jsx)(sl,{armed:de,onToggle:pe}),(0,W.jsxs)(`button`,{type:`button`,className:`composer-watch`+(G?` on`:``),"aria-pressed":G,"aria-label":Gl,onClick:()=>{G?K.phase===`settled`||K.phase===`pausing`?(Te(null),K.resume(),!H&&Z&&X.start({inCanvas:!!Y.spec,continuous:!0})):Ms():$c(`think`)},title:G?K.phase===`settled`||K.phase===`pausing`?`Add another thought`:`Finish now without waiting for silence`:`Build a live map while you think aloud`,children:[(0,W.jsx)(z.spark,{}),(0,W.jsx)(`span`,{children:Gl})]})]}),micExtra:Z?(0,W.jsx)(bs,{mode:Oi,pttKey:e.pttKey,pttSide:e.pttSide,onChange:e=>{Ti.current=null,wi(!1),Si(e===`always`),ki(e===`always`),Di(e===`hold`),e===`always`&&J&&!H&&!A.trim()?X.start({inCanvas:!!Y.spec,continuous:!0}):e!==`always`&&H&&X.stop()}}):void 0})]})]}),H&&!G&&(0,W.jsx)(cf,{transcript:Se,mode:Oi,note:mr?`Just listening · ${Math.max(1,Math.round((Date.now()-Fr.current)/6e4))}m — say "thoughts?" when you want me`:void 0}),H&&!G&&(0,W.jsx)(od,{ghosts:Wi}),Y.spec?(0,W.jsxs)(`div`,{className:`canvas-stage stage`,"data-active":`1`,ref:ia,children:[Dc!=null&&(0,W.jsx)(Ws,{tint:wc?.color,onDone:()=>Oc(null)},Dc),(0,W.jsx)(`div`,{className:`canvas-scroll`,ref:ra,onClick:Y.spot?e=>{e.target.closest(`.spotlit`)||Uo()}:void 0,children:(0,W.jsxs)(`div`,{className:`topic-wrap`,children:[(0,W.jsx)(Ac,{armed:de,rootRef:ia,onStroke:rs.onStroke,onTap:rs.onTap,strokes:rs.strokes,highlights:rs.highlights}),Rl,!yc&&(0,W.jsxs)(`div`,{className:`viewing-past`,role:`status`,children:[vc?(0,W.jsx)(z.table,{}):(0,W.jsx)(z.clock,{}),(0,W.jsx)(`span`,{children:vc?`Viewing this thread together`:`Viewing an earlier moment`}),(0,W.jsx)(`button`,{type:`button`,className:`viewing-past-back`,onClick:()=>vc?Y.previewSpec(null):Y.jumpTo(gc),children:`Return to live`})]}),!me&&V.length===0&&(0,W.jsxs)(`div`,{className:`ask-hint`,role:`note`,children:[(0,W.jsx)(z.chat,{}),(0,W.jsxs)(`span`,{children:[`Tap `,(0,W.jsx)(`strong`,{children:`Ask`}),` on any element to ask Mavéa about it.`]}),(0,W.jsx)(`button`,{type:`button`,className:`ask-hint-x`,"aria-label":`Dismiss tip`,onClick:he,children:(0,W.jsx)(z.x,{})})]}),os&&(0,W.jsx)($,{children:(0,W.jsx)(yp,{course:os,lessonIdx:cs,progress:us??_r(os.id),onPrev:()=>ps(os,cs-1),onNext:()=>ps(os,cs+1),onCheckpoint:ms,busy:Y.busy},`${os.id}:${cs}`)}),Pc&&!os&&(0,W.jsx)(Hs,{question:Pc.question,narration:Pc.narration,sources:Nc?.sources,inferred:Fc,tint:Sc}),qo&&(0,W.jsx)(c,{label:`Opening saved answer…`,overlay:!0}),(0,W.jsx)(U.Suspense,{fallback:(0,W.jsx)(`div`,{className:`canvas-loading`,role:`status`,"aria-busy":`true`,"aria-label":`Loading canvas`,children:(0,W.jsx)(`div`,{className:`skel-grid`,children:(0,W.jsx)(le,{blocks:qf})})}),children:(0,W.jsx)(Kf,{data:Ll??Y.viewSpec??Y.spec,spot:yc?Y.spot:null,built:{},onProve:()=>mi(!0),onAskBlock:Ts,onAddToDashboard:e=>dt({block:e,question:Pc?.question??void 0}),selectedBlockIds:vs,onNarrate:Fo,narratingId:Io,muted:Le,viewMode:bo,onViewMode:xo,presenting:En,noteGutter:yc&&e.annotationsEnabled&&Xa&&xa,walkNotes:yc?Qa:void 0,blankFill:yc?{values:Y.filled,activeKey:Y.activeBlank,fill:Y.fill,unfill:Y.unfill,activate:Y.setActiveBlank,complete:Y.complete,busy:Y.busy}:void 0,bend:yc&&Bn===null?Y.spec?.bend:void 0,onAddToFlashcard:ta,flashedIds:_t,belowHeaderSlot:Pc&&Fl?(0,W.jsx)(ku,{audio:Fl,t:Bn,onSeek:qn}):void 0,viewSlot:pl?(0,W.jsxs)(`button`,{type:`button`,className:`canvas-open world-open`,title:Xf,"aria-label":Yf,onClick:()=>vl(),children:[(0,W.jsx)(z.globe,{className:`ic`,"aria-hidden":!0}),Yf]}):void 0,headerSlot:yc?(0,W.jsx)(W.Fragment,{children:(0,W.jsxs)(`div`,{className:`pen-anchor`,ref:to,children:[(0,W.jsx)(pc,{enabled:e.annotationsEnabled,open:Wa,inkCount:Fa.length,onClick:()=>Ka(e=>!e)}),Wa&&(0,W.jsx)(`div`,{className:`pen-popover`,children:(0,W.jsx)(fc,{entries:Fa,turnStartMs:Ra.current,annotationsEnabled:e.annotationsEnabled,hiddenSpots:qa,onToggle:mo,onKeep:()=>Ka(!1),onClear:()=>{ja([]),Na(new Set),Ja(new Set),Ka(!1)},onClip:()=>Be(!0),onJumpTo:go,onToggleSpot:yo})})]})}):void 0},vc?`thread-`+(Y.viewOverride?.id??``):yc?`live-`+Y.replaceEpoch:`view-`+Y.viewIndex)}),yc&&!zl&&!Go&&(0,W.jsx)(st,{spots:qa.size>0?Aa.filter(e=>!qa.has(e.spot)):Aa,revision:So,onPlaced:Pa}),Y.busy&&yc&&(0,W.jsxs)(`div`,{className:`working-col`,children:[(0,W.jsx)(uf,{cards:Lc}),(0,W.jsx)(pf,{thinking:Y.reasoning})]}),yc&&!Y.busy&&(0,W.jsx)($,{children:(0,W.jsx)(dp,{chips:Y.understood,onFix:Cs})}),(0,W.jsx)(Js,{spec:Y.viewSpec??Y.spec,followups:Mc,question:Ee??void 0,onAsk:as,onTrack:()=>Ke(!0),onDeepZoom:Ee?()=>{window.location.hash=`#/deepzoom?seed=${encodeURIComponent(Ee)}`}:void 0,onCanvas:()=>xo(`canvas`),onSeeAll:!vc&&xc&&xc.moments.length>=2?()=>jc(xc):void 0,threadCount:xc?.moments.length,busy:Y.busy})]})})]}):tc?(0,W.jsx)(W.Fragment,{children:(0,W.jsx)(ys,{seed:r.current||void 0,speak:Vi,goDemo:qp,onStart:e=>{Vo(!0),as(e)},onStartTalking:()=>{if(Vo(!0),!Z){Ne(If),gi(e=>e+1);return}X.start({inCanvas:!1})},onSeeHow:()=>zo(!0),studySlot:(0,W.jsx)(xl,{onStudy:()=>Vt(!0)}),librarySlot:Ho.length>0?(0,W.jsx)($,{children:(0,W.jsx)(op,{entries:Ho,onResume:e=>{Vo(!0),te(!1),Oe(e.question??null),ts(e.id),Yo(e.spec,e.question)},onRemove:un,heading:`Pick up where you left off`,sub:`Your conversations stay on this device — tap one to step back in.`})}):void 0})}):(0,W.jsxs)(`div`,{className:`presence-stage stage`,"data-active":`1`,children:[Rl&&(0,W.jsx)(`div`,{className:`live-error-stage`,children:Rl}),Y.busy&&(0,W.jsx)(`div`,{className:`skel-stage`,children:(0,W.jsx)(uf,{cards:Lc})})]}),Ul,ml&&(0,W.jsx)($,{label:`Living answer`,children:(0,W.jsx)(Ip,{spec:fl.props.world??null,question:fl.props.title,failed:al,onRetry:()=>ul(e=>e+1),onClose:yl,view:fl.props.view,onExpandNode:Tl,autoWalk:Li&&fl.id===`tour-world`,speakLine:Vi})}),yi&&(0,W.jsxs)(`div`,{className:`drop-hint`,role:`status`,"aria-live":`polite`,children:[(0,W.jsx)(z.paperclip,{}),(0,W.jsx)(`span`,{children:`Drop to attach — Mavéa reads PDFs, Office docs, and data files`})]}),Ro&&(0,W.jsx)($,{children:(0,W.jsx)(rp,{onClose:()=>zo(!1),speak:Vi,onFullTour:Ki})}),ui&&(0,W.jsx)($,{children:(0,W.jsx)(ap,{items:Dl,surface:`live`,onClose:fi,pinned:s.current&&ko.chapter?.id===`palette`})}),ii&&(0,W.jsx)(`div`,{role:`presentation`,onClick:e=>e.target===e.currentTarget&&ai(!1),style:{position:`fixed`,inset:0,background:`rgba(0,0,0,0.45)`,display:`flex`,alignItems:`flex-start`,justifyContent:`center`,paddingTop:80,zIndex:50},children:(0,W.jsx)($,{children:(0,W.jsx)(cp,{onClose:()=>ai(!1),initialTab:oi,initialAdvancedYouOpen:ci})})}),Xo!==null&&(0,W.jsx)($,{children:(0,W.jsx)(Tp,{frames:Y.frames,initialIndex:Xo,speak:Vi,cancelSpeak:Fe,onClose:()=>Zo(null)})}),ze&&(0,W.jsx)($,{children:(0,W.jsx)(Dp,{frames:Y.frames,retainedAudio:e=>Xn.get(Ge(e)),onClose:()=>Be(!1),onShared:()=>Us.enqueue(`clipShared`)})}),Ve&&Zi.length>0&&(0,W.jsx)($,{children:(0,W.jsx)(kp,{answers:Zi,defaultIndex:bc?bc.moments[bc.moments.length-1].frameIndex:Zi.length-1,defaultIndices:bc?.moments.map(e=>e.frameIndex),onClose:()=>He(!1),guided:s.current&&ko.chapter?.action.kind===`export`})}),We&&(0,W.jsx)($,{children:(0,W.jsx)(jp,{onClose:()=>Ke(!1),initialSourceId:Qo?`lib-`+Qo:void 0})}),Ye&&(0,W.jsxs)(`div`,{className:`cv-takeover`,role:`dialog`,"aria-modal":`true`,"aria-label":`Living dashboard`,children:[(0,W.jsxs)(`header`,{className:`cv-takeover-head`,children:[(0,W.jsxs)(`div`,{className:`cv-takeover-id`,children:[(0,W.jsx)(`span`,{className:`cv-takeover-glyph`,"aria-hidden":`true`,children:`◎`}),(0,W.jsxs)(`div`,{className:`cv-takeover-titles`,children:[(0,W.jsx)(`span`,{className:`cv-takeover-eyebrow`,children:`Living dashboard`}),(0,W.jsx)(`span`,{className:`cv-takeover-title`,children:`Investment growth · $10k at 7%`})]})]}),(0,W.jsxs)(`button`,{type:`button`,className:`cv-takeover-close`,onClick:()=>ot(null),children:[(0,W.jsx)(`span`,{"aria-hidden":`true`,children:`←`}),` Back to answer`]})]}),(0,W.jsx)(`div`,{className:`tour-dash-body`,children:(0,W.jsx)($,{children:ct?(0,W.jsx)(up,{id:Ye}):(0,W.jsx)(lp,{id:Ye})})})]}),ut&&(0,W.jsx)($,{children:(0,W.jsx)(Mp,{block:ut.block,question:ut.question,conversationTitle:Y.spec?.title,onClose:()=>dt(null),onAdded:(e,t)=>gt({id:e,title:t})})}),ft&&(0,W.jsx)(Os,{dashboardId:ft.id,dashboardTitle:ft.title,onDismiss:()=>gt(null)}),Y.spec&&(0,W.jsx)(Ls,{open:pi,onClose:()=>mi(!1),claim:Y.spec.title,conf:ns,sources:Y.spec.sources??[],hadFiles:ee,blocks:Y.spec.blocks}),Sn.open&&(0,W.jsx)($,{children:(0,W.jsx)(bp,{open:!0,spec:Sn.spec,onClose:()=>Tn(e=>({...e,open:!1}))})}),ei&&(0,W.jsx)($,{children:(0,W.jsx)(wp,{entries:Ho,onResume:e=>{Vo(!0),te(!1),Oe(e.question??null),ts(e.id),Yo(e.spec,e.question),ti(!1)},onRemove:un,onClose:()=>ti(!1)})}),Kc&&(0,W.jsx)(La,{chapters:mc,currentIndex:_c,onJump:vo,onClose:()=>qc(!1)}),In&&Jc&&(0,W.jsx)($,{children:(0,W.jsx)(pp,{model:Jc,level:In,onLevel:Ln,onJump:e=>{Y.jumpTo(e),Ln(null)},onClose:()=>Ln(null)})}),Yt&&(0,W.jsx)($,{children:(0,W.jsx)(Hp,{cfg:Gt(e),memoryNodes:wn(),speak:Vi,onDebrief:e=>{Qt(!1),j(e)},onClose:()=>Qt(!1),onPrepTurn:(e,t)=>{Qt(!1),Oe(t),Y.run(e,void 0,void 0,void 0,void 0,t)}})}),Ut&&Jc&&(0,W.jsx)($,{children:(0,W.jsx)(Sp,{model:Jc,onJump:e=>{Y.jumpTo(e),Jt(!1)},onShare:Y.frames.length>0?()=>{Jt(!1),Be(!0)}:void 0,onClose:()=>Jt(!1)})}),$t&&(0,W.jsx)($,{children:(0,W.jsx)(hp,{records:cr(),chapters:mc,onLand:e=>{en(!1);let t=or(e,Ho);Vo(!0),te(!1),t?(Oe(t.question??null),ts(t.id),Yo(t.spec,t.question)):(Oe(e.question),Y.run(e.question))},onGoDeeper:e=>{en(!1),Vo(!0),te(!1),Oe(e),Y.run(e)},autoTour:s.current,onClose:()=>en(!1)})}),an&&(0,W.jsx)($,{children:(0,W.jsx)(Pp,{pdf:an,cfg:Gt(e),search:{enabled:e.searchMode!==`off`,providerId:e.searchProvider,apiKey:e.searchKeys[e.searchProvider]},onClose:()=>on(null)})}),pn&&(0,W.jsx)($,{children:(0,W.jsx)(Kp,{doc:pn,cfg:Gt(e),onClose:()=>mn(null)},pn.id)}),hn&&(0,W.jsx)($,{children:(0,W.jsx)(Rp,{sources:hn,cfg:Gt(e),search:{enabled:e.searchMode!==`off`,providerId:e.searchProvider,apiKey:e.searchKeys[e.searchProvider]},onClose:()=>gn(null)})}),bn&&(0,W.jsx)($,{children:(0,W.jsx)(_p,{model:bn,cfg:Gt(e),speak:Vi,showcase:s.current,onClose:()=>xn(null)})}),Bt&&(0,W.jsx)($,{children:(0,W.jsx)(Wp,{onClose:()=>Vt(!1)})}),Ct&&(0,W.jsx)($,{children:(0,W.jsx)(vp,{mode:`add`,initial:Ct.initial,deck:Ct.deck,origin:`block`,source:Ct.source,heading:`Flashcards from ${ie(Ct.block)}`,enrich:Ct.enrich,decks:tr(),onSaved:e=>{if(e.length&&Ct.block.id){let e=Ct.block.id;yt(t=>new Set(t).add(e))}Qi(e)},onClose:()=>wt(null)})}),hs&&(0,W.jsxs)(`div`,{className:`cards-pill`,role:`status`,"aria-live":`polite`,children:[(0,W.jsx)(z.layers,{}),(0,W.jsxs)(`span`,{className:`cards-pill-text`,children:[hs.missedCards.length,` card`,hs.missedCards.length===1?``:`s`,` from this checkpoint`]}),(0,W.jsx)(`button`,{type:`button`,className:`cards-pill-btn`,onClick:()=>gs(null),children:`Dismiss`}),(0,W.jsx)(`button`,{type:`button`,className:`cards-pill-btn cards-pill-primary`,onClick:()=>_s(hs),children:`Add`})]}),!hs&&Ft&&(0,W.jsxs)(`div`,{className:`cards-pill is-ask`,role:`status`,"aria-live":`polite`,children:[(0,W.jsxs)(`div`,{className:`cards-pill-head`,children:[(0,W.jsx)(z.layers,{}),(0,W.jsxs)(`span`,{className:`cards-pill-text`,children:[Ft.count,` card`,Ft.count===1?``:`s`,` saved to “`,Ft.deck,`”`]})]}),(0,W.jsxs)(`div`,{className:`cards-pill-ask`,children:[(0,W.jsx)(`span`,{className:`cards-pill-q`,children:`Want Mavéa to help you remember these?`}),(0,W.jsx)(`span`,{className:`cards-pill-sub`,children:`They’ll come back for a quick practice every so often.`}),(0,W.jsxs)(`div`,{className:`cards-pill-choices`,children:[(0,W.jsx)(`button`,{type:`button`,className:`cards-pill-btn`,onClick:()=>ea(`collection`),children:`No thanks`}),(0,W.jsx)(`button`,{type:`button`,className:`cards-pill-btn cards-pill-primary`,onClick:()=>ea(`spaced`),children:`Yes`})]})]})]}),!hs&&!Ft&&Ot&&(0,W.jsxs)(`div`,{className:`cards-pill`,role:`status`,"aria-live":`polite`,children:[(0,W.jsx)(z.layers,{}),(0,W.jsxs)(`span`,{className:`cards-pill-text`,children:[Ot.count,` card`,Ot.count===1?``:`s`,` added`]}),(0,W.jsx)(`button`,{type:`button`,className:`cards-pill-btn`,onClick:()=>{rr(Ot.ids),Mt(null)},children:`Undo`}),(0,W.jsx)(`button`,{type:`button`,className:`cards-pill-btn cards-pill-primary`,onClick:()=>{window.location.hash=`#/flashcards`,Mt(null)},children:`View`})]})]})}export{Xp as LiveApp};