@mavea/mavea 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/.vite/manifest.json +675 -670
  2. package/dist/assets/{AppCommandPalette-DUMSp3rd.js → AppCommandPalette-D5E8xhEf.js} +1 -1
  3. package/dist/assets/{AtlasView-Dl2fssaG.js → AtlasView-Q4dqhS4v.js} +1 -1
  4. package/dist/assets/{BlockEmpty-CLtVQf6c.js → BlockEmpty-JoKwTRb0.js} +1 -1
  5. package/dist/assets/{BriefingPlayer-DO205Qkh.js → BriefingPlayer-BaC5XjsP.js} +1 -1
  6. package/dist/assets/{CanvasSkeleton-BZZPCuRZ.js → CanvasSkeleton-DgF1b-bW.js} +2 -2
  7. package/dist/assets/{CheckLogRail-wUfby67Z.js → CheckLogRail-DldWYeVr.js} +1 -1
  8. package/dist/assets/{CodeOutput-Kh6ldxQz.js → CodeOutput-B9_a0vjD.js} +1 -1
  9. package/dist/assets/{CommandPalette-Kl00mMZm.js → CommandPalette-C1eiRrMP.js} +1 -1
  10. package/dist/assets/{CourseLessonReader-MBHoknUz.js → CourseLessonReader-DA3t9SUe.js} +2 -2
  11. package/dist/assets/{CourseRail-q6x5cCpW.js → CourseRail-BaP1uB0B.js} +1 -1
  12. package/dist/assets/{CoursesApp-v89OVJvg.js → CoursesApp-MSK1JzqU.js} +2 -2
  13. package/dist/assets/{CrossExamPanel-DH04p6VS.js → CrossExamPanel-jJu-Mqvs.js} +1 -1
  14. package/dist/assets/{DashPresent-BYXbPuGj.js → DashPresent-Coj1b9Bp.js} +1 -1
  15. package/dist/assets/{DashboardDetail-B50ZkeVK.js → DashboardDetail-CHw4HfHp.js} +2 -2
  16. package/dist/assets/DashboardLoopRuntime-bSH-LDQM.js +1 -0
  17. package/dist/assets/{DashboardOverview-C-FdGWM5.js → DashboardOverview-CfsSZAgN.js} +1 -1
  18. package/dist/assets/{DashboardSettings-Dmw6JTbI.js → DashboardSettings-BkSQvDt6.js} +1 -1
  19. package/dist/assets/{DashboardsApp-JSY_bVfi.js → DashboardsApp-BmcjQZqP.js} +2 -2
  20. package/dist/assets/{DeepZoomApp-BFNwli7l.js → DeepZoomApp-BKhVz2w1.js} +1 -1
  21. package/dist/assets/{DelegatePanel-BK7rEhIc.js → DelegatePanel-BFKvKzB-.js} +1 -1
  22. package/dist/assets/{DemoGallery-BPtVG7_y.js → DemoGallery-0cgMcGir.js} +1 -1
  23. package/dist/assets/{DropSelect-DUhdQSta.js → DropSelect-CJnpoHtR.js} +1 -1
  24. package/dist/assets/{ExportModal-D65cGyj_.js → ExportModal-DbWt9b6v.js} +2 -2
  25. package/dist/assets/{ExtractionPreview-Iwfg2Ogl.js → ExtractionPreview-DTAyeKIx.js} +1 -1
  26. package/dist/assets/{FeatureUseNotice-DPtQ0OGb.js → FeatureUseNotice-CoK5HkbR.js} +1 -1
  27. package/dist/assets/FeatureUseNotice-CsCxxfOl.css +1 -0
  28. package/dist/assets/{FlagshipCTA-BXntKhxb.js → FlagshipCTA-EfqXfhO2.js} +1 -1
  29. package/dist/assets/{FlagshipCommandPalette-BDJfasI-.js → FlagshipCommandPalette-CUgzggi1.js} +1 -1
  30. package/dist/assets/{FlagshipShowcase-DJ8Gxk_G.js → FlagshipShowcase-BHe-31yE.js} +1 -1
  31. package/dist/assets/{FlashcardsApp-CLNo4WX7.js → FlashcardsApp-Cs7PORkH.js} +1 -1
  32. package/dist/assets/{ForecastPanel-PBO2-dgS.js → ForecastPanel-BrfHS_Dm.js} +1 -1
  33. package/dist/assets/{GalleryApp-DM03CMRy.js → GalleryApp-VEc5loz4.js} +1 -1
  34. package/dist/assets/{HonestByDesign-Dqyth6nW.js → HonestByDesign-DsAzveYU.js} +1 -1
  35. package/dist/assets/{HowItWorks-C0zosIvq.js → HowItWorks-_ek4B7ia.js} +1 -1
  36. package/dist/assets/{LegalApp-DZBdExTy.js → LegalApp-jexr9Ljt.js} +1 -1
  37. package/dist/assets/{LegalMarkdownDocument-CSZhRG5r.js → LegalMarkdownDocument-01Tz7Pp4.js} +1 -1
  38. package/dist/assets/{LegalPageShell-DTeXqWyc.js → LegalPageShell-DsgBihfP.js} +1 -1
  39. package/dist/assets/{LeverPanel-aZfhtVJX.js → LeverPanel-IONjaat2.js} +1 -1
  40. package/dist/assets/{Library-D2XGNXz7.js → Library-gY4a_JKb.js} +1 -1
  41. package/dist/assets/{LibraryOverlay-B2WQSgwr.js → LibraryOverlay-DdOW7ypW.js} +1 -1
  42. package/dist/assets/LiveApp-CvgisDd0.js +61 -0
  43. package/dist/assets/{LiveApp-BVZGpJ1S.css → LiveApp-D2QFBykD.css} +1 -1
  44. package/dist/assets/LiveSettings-sWIu-zl5.js +6 -0
  45. package/dist/assets/{MindMapViewerDrawer-YYyZqmAd.js → MindMapViewerDrawer--AOShADD.js} +1 -1
  46. package/dist/assets/{MindShape-mTlN5mPZ.js → MindShape-DDL4X-e5.js} +1 -1
  47. package/dist/assets/{PinToDashboard-_kIOHs0k.js → PinToDashboard-DBZjKpiA.js} +1 -1
  48. package/dist/assets/{PlanReview-33V8GTNB.js → PlanReview-D0KjJqji.js} +1 -1
  49. package/dist/assets/{Presence-CzLJIeSD.js → Presence-DZC81_y4.js} +1 -1
  50. package/dist/assets/{PresentationDeck-BDoGecxr.js → PresentationDeck-DHtbOg0G.js} +1 -1
  51. package/dist/assets/{PrismApp-PfBTFhMF.js → PrismApp-DQ5p9pDb.js} +2 -2
  52. package/dist/assets/{PrismAskController-DbQDrlU9.js → PrismAskController-KVoYxV_d.js} +1 -1
  53. package/dist/assets/{PrismBriefingPlayer-1fvlfLR8.js → PrismBriefingPlayer-X4nTg2tZ.js} +2 -2
  54. package/dist/assets/{PrismOverlay-B7lEspdu.js → PrismOverlay-DJ-JBI6j.js} +4 -4
  55. package/dist/assets/{PrivacyApp-CR4lRs0L.js → PrivacyApp-Df8FcjKa.js} +1 -1
  56. package/dist/assets/{Recap-H5fhj5Tc.js → Recap-D3nAqmLK.js} +1 -1
  57. package/dist/assets/{ReelJelly-3jSVsJsy.js → ReelJelly-BCMS6a1u.js} +1 -1
  58. package/dist/assets/{RehearsalPanel-BVgjrOPg.js → RehearsalPanel-CThmKYOO.js} +1 -1
  59. package/dist/assets/ReplayCard-B5njgafT.js +2 -0
  60. package/dist/assets/{ReplayOverlay-DXmVdeIr.js → ReplayOverlay-CKTMSGuA.js} +1 -1
  61. package/dist/assets/{RewindOverlay-BusfWeFq.js → RewindOverlay-D6TQvplO.js} +1 -1
  62. package/dist/assets/{RippleApp-9KrJPYgN.js → RippleApp-DCAveryn.js} +2 -2
  63. package/dist/assets/{RippleAskController-CO9wE7hU.js → RippleAskController-DQVRFV30.js} +1 -1
  64. package/dist/assets/{RippleOverlay-DMHLbfh8.js → RippleOverlay-DmC4C72P.js} +2 -2
  65. package/dist/assets/{SeeDontRead-C389viue.js → SeeDontRead-CzIEW_Y7.js} +1 -1
  66. package/dist/assets/ShareModal-DtXKAwWu.js +32 -0
  67. package/dist/assets/{ShipCascade-BUtwvQoW.js → ShipCascade-B71VnE85.js} +1 -1
  68. package/dist/assets/{ShipCourse-B7lG6DYW.js → ShipCourse-BS4lT6xe.js} +1 -1
  69. package/dist/assets/{ShipHotspots-Bj2CovtT.js → ShipHotspots-CGQN_uoM.js} +1 -1
  70. package/dist/assets/{ShipIncident-DcmindmE.js → ShipIncident-C--FrQ1N.js} +1 -1
  71. package/dist/assets/{ShipMigration-s0hVjDQl.js → ShipMigration-C4fE3pL7.js} +1 -1
  72. package/dist/assets/{ShipOnboarding-ekbHL7OH.js → ShipOnboarding-BR3iwj8v.js} +1 -1
  73. package/dist/assets/{ShipRead-BVNgQT6L.js → ShipRead-DYHgvWuI.js} +1 -1
  74. package/dist/assets/{ShipRollout-BdUQzMyP.js → ShipRollout-D-vQsNmF.js} +1 -1
  75. package/dist/assets/{ShipSuggestions-B6fKYh8L.js → ShipSuggestions-BICGN1lD.js} +1 -1
  76. package/dist/assets/{ShipWorkspace-3D3Rrs1p.js → ShipWorkspace-CVkhvrlm.js} +1 -1
  77. package/dist/assets/{SignatureLoop-C60r8Wm5.js → SignatureLoop-BwCgKOcz.js} +1 -1
  78. package/dist/assets/{SynthesisApp-vJ2Jq0Qe.js → SynthesisApp-DHKlVoSg.js} +2 -2
  79. package/dist/assets/{SynthesisOverlay-CkERphvG.js → SynthesisOverlay-ezT4gd3q.js} +1 -1
  80. package/dist/assets/{TermsApp-C70tW6m6.js → TermsApp-uGgQFz8d.js} +1 -1
  81. package/dist/assets/{TopicCanvas-CT0eSj2M.js → TopicCanvas-CTTBp5sg.js} +2 -2
  82. package/dist/assets/{TourPrism-BvucSkcs.js → TourPrism-dXsE-USz.js} +1 -1
  83. package/dist/assets/{TrackerTile-CasZNmt4.js → TrackerTile-bEni07HA.js} +2 -2
  84. package/dist/assets/{TwoSurfaces-C90X7Aj5.js → TwoSurfaces-CjFg-pUQ.js} +1 -1
  85. package/dist/assets/{UnderstoodPanel-CHPD2Ttj.js → UnderstoodPanel-DFKf9Y3r.js} +1 -1
  86. package/dist/assets/{WhyMachineOverlay-CB0_n6Sy.js → WhyMachineOverlay-DYG-WIjA.js} +1 -1
  87. package/dist/assets/{WowFeatures-Ci_H5QYX.js → WowFeatures-lLtU2gPc.js} +1 -1
  88. package/dist/assets/{ZoomDeck-BQHO79ZU.js → ZoomDeck-D_PnwGAY.js} +1 -1
  89. package/dist/assets/{alternateFinishes-DZ-rkpkX.js → alternateFinishes-CPbjDTTL.js} +1 -1
  90. package/dist/assets/{annotationAuto-B0nihA4F.js → annotationAuto-Dq2Ae6Co.js} +1 -1
  91. package/dist/assets/{annotationReel-BcU9Q0Sw.js → annotationReel-5OHglRgk.js} +1 -1
  92. package/dist/assets/backup-DnPfX6cD.js +1 -0
  93. package/dist/assets/canvas-DBaJcTKZ.js +1 -0
  94. package/dist/assets/{catalog-Dqaq2YFd.js → catalog-C_g3qPPQ.js} +1 -1
  95. package/dist/assets/chapters-BX_F_H3C.js +1 -0
  96. package/dist/assets/{dashboardEvents-DR9d_c74.js → dashboardEvents-DCQLIdy6.js} +2 -2
  97. package/dist/assets/{dist-BFx3nZg4.js → dist-DrPlQeYR.js} +1 -1
  98. package/dist/assets/{fit-0HxU-rtB.js → fit-DqcemO7k.js} +1 -1
  99. package/dist/assets/{generateLive-D4B30fnF.js → generateLive-CflgZ7Wt.js} +18 -18
  100. package/dist/assets/homeTarget-BcZYH3DY.js +1 -0
  101. package/dist/assets/{index-y8GL67bB.js → index-BlCH2LG4.js} +3 -3
  102. package/dist/assets/{jspdf.es.min-C-Pf79px.js → jspdf.es.min-C9encxHf.js} +1 -1
  103. package/dist/assets/kokoro-BCXTWbLb.js +1 -0
  104. package/dist/assets/{lib-VFqp6Y3w.js → lib-3J_9keOc.js} +1 -1
  105. package/dist/assets/{liveSchema-CJ49PX5R.js → liveSchema-DNg9x7Wk.js} +3 -2
  106. package/dist/assets/{mastery-BPjxP0fN.js → mastery-D7xYf5D7.js} +1 -1
  107. package/dist/assets/{motion-S0NRruNj.js → motion-BYK1NIl0.js} +1 -1
  108. package/dist/assets/{neighborhoods-C-1Tjr1r.js → neighborhoods-B0woY8Ah.js} +1 -1
  109. package/dist/assets/{notes-lROPCorS.js → notes-0ZgJ597y.js} +1 -1
  110. package/dist/assets/{pdf-Df7PCH7q.js → pdf-DuD2LFXS.js} +1 -1
  111. package/dist/assets/{perfProbe-COAp9PAa.js → perfProbe-CTSVS7u0.js} +1 -1
  112. package/dist/assets/{pin-CXSuPJYL.js → pin-zUYIWzGr.js} +1 -1
  113. package/dist/assets/{portal-DMw7C32j.js → portal-deBu1VaC.js} +1 -1
  114. package/dist/assets/{pptxgen.es-CvTILmV9.js → pptxgen.es-JvVtQi0_.js} +1 -1
  115. package/dist/assets/{prewarm--whjQhWJ.js → prewarm-DSFwU9lQ.js} +1 -1
  116. package/dist/assets/{quietHours-BvcsBKKK.js → quietHours-BJAGhffA.js} +1 -1
  117. package/dist/assets/{registry-BPvIPLke.js → registry-45IskpHI.js} +1 -1
  118. package/dist/assets/{registry-2v0jlh5Q.js → registry-BGptAE_J.js} +2 -2
  119. package/dist/assets/{registry-D_URPoL4.js → registry-BJ_F0mH5.js} +1 -1
  120. package/dist/assets/{registry-B8DStMJk.js → registry-BSewKzG5.js} +1 -1
  121. package/dist/assets/{registry-DUvXX_d0.js → registry-Bo9A1rtO.js} +1 -1
  122. package/dist/assets/{registry-CKjKq6ct.js → registry-BpXS6B5V.js} +1 -1
  123. package/dist/assets/{registry-aazwkBJp.js → registry-BvJYizNq.js} +1 -1
  124. package/dist/assets/{registry-DCI_BeFJ.js → registry-C1y9zCwl.js} +1 -1
  125. package/dist/assets/{registry-Buq5uuCv.js → registry-CS0QdcT2.js} +1 -1
  126. package/dist/assets/{registry-B940W2j5.js → registry-Caz06xkK.js} +1 -1
  127. package/dist/assets/{registry-Cg7qUZPS.js → registry-CmEE2X59.js} +1 -1
  128. package/dist/assets/{registry-DujBAgn_.js → registry-D5sMUiCn.js} +1 -1
  129. package/dist/assets/{registry-Cix-yqch.js → registry-DLnp7IOd.js} +1 -1
  130. package/dist/assets/{registry-DDLSYDVA.js → registry-DOsi_pfu.js} +1 -1
  131. package/dist/assets/{registry-BgGeRiDA.js → registry-DWpOzObR.js} +1 -1
  132. package/dist/assets/{registry-Dpb8EXHn.js → registry-DilxWEq7.js} +1 -1
  133. package/dist/assets/{registry-DJinB5ye.js → registry-Dn10bL9p.js} +1 -1
  134. package/dist/assets/{registry-zRPjWNl5.js → registry-DtJTiMeL.js} +1 -1
  135. package/dist/assets/{registry-CEVrY72Z.js → registry-FPqHPyMt.js} +1 -1
  136. package/dist/assets/{registry-DI1wSG1Y.js → registry-PAcF90vq.js} +1 -1
  137. package/dist/assets/{registry-CAusoyBh.js → registry-eoPQWB7M.js} +1 -1
  138. package/dist/assets/{registry-1GuPBfQK.js → registry-k5Lqb0OP.js} +1 -1
  139. package/dist/assets/{registry-QcULZpdE.js → registry-yQqBxBwc.js} +2 -2
  140. package/dist/assets/{relate-A9ZeaaAI.js → relate-B23jli7z.js} +1 -1
  141. package/dist/assets/{run-C_0B_41W.js → run-Dc2ZJz6n.js} +1 -1
  142. package/dist/assets/search-Be63DJkp.js +1 -0
  143. package/dist/assets/shapes-Cw7tCHIp.js +1 -0
  144. package/dist/assets/{shikiHighlight-DUCYbsJ2.js → shikiHighlight-ZFDUBGQi.js} +1 -1
  145. package/dist/assets/{store-DgG0C1Qx.js → store-BMRQiV1z.js} +1 -1
  146. package/dist/assets/{store-BFC7DZcg.js → store-Dn23_Ymr.js} +1 -1
  147. package/dist/assets/{store-BFrJaSxJ.js → store-DoJn3lBF.js} +1 -1
  148. package/dist/assets/{store-4JNNn732.js → store-DrBDvqXF.js} +1 -1
  149. package/dist/assets/threads-DxSb3F0U.js +1 -0
  150. package/dist/assets/{useDashboardLoop-B6ByHWoE.js → useDashboardLoop-8emjL6b-.js} +3 -3
  151. package/dist/assets/useLiveConfig-BhFHwoy3.js +1 -0
  152. package/dist/assets/{useSpatialCanvas-DogK9457.js → useSpatialCanvas-DZhSpnC6.js} +1 -1
  153. package/dist/assets/{useSpotlightWalk-rMbmNBKK.js → useSpotlightWalk-sP3ePKv0.js} +1 -1
  154. package/dist/assets/{useSrsCards-CagZefwX.js → useSrsCards-BHQHQ7hm.js} +1 -1
  155. package/dist/assets/{useStudy-Bflreq2a.js → useStudy-Dh598Dw8.js} +1 -1
  156. package/dist/assets/{useZoomGesture-CYc3tf2z.js → useZoomGesture-CQdTOGD2.js} +1 -1
  157. package/dist/index.html +1 -1
  158. package/package.json +1 -1
  159. package/dist/assets/DashboardLoopRuntime-CFXPx3v_.js +0 -1
  160. package/dist/assets/FeatureUseNotice-CWt7gOwS.css +0 -1
  161. package/dist/assets/LiveApp-B9zwXlGC.js +0 -61
  162. package/dist/assets/LiveSettings-D9OcWlm6.js +0 -6
  163. package/dist/assets/ReplayCard-BpYO5vX-.js +0 -2
  164. package/dist/assets/ShareModal-ClnEkudw.js +0 -32
  165. package/dist/assets/backup-c-Btapzp.js +0 -1
  166. package/dist/assets/canvas-QTEIiK23.js +0 -1
  167. package/dist/assets/chapters-BiUsDClQ.js +0 -1
  168. package/dist/assets/homeTarget-BgWKI_E1.js +0 -1
  169. package/dist/assets/kokoro-D4GKpSL0.js +0 -1
  170. package/dist/assets/search-DnjHupRf.js +0 -1
  171. package/dist/assets/shapes-RqjqC0ay.js +0 -1
  172. package/dist/assets/useLiveConfig-X9Wxh90k.js +0 -1
@@ -0,0 +1,6 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/backup-DnPfX6cD.js","assets/useStudy-Dh598Dw8.js","assets/index-BlCH2LG4.js","assets/chunk-BVpWp9h4.js","assets/jsx-runtime-DaSxXjOY.js","assets/react-BQSORdFI.js","assets/lazyRetry-D50B1UMY.js","assets/index-CepQEz75.css","assets/contentVault-DzTYWcbD.js","assets/keyVault-DEsNh9FR.js","assets/store-DrBDvqXF.js","assets/queue-J4h7E3uc.js","assets/store-DXmC_fP2.js","assets/queue-DHeyJ32F.css","assets/useLiveConfig-BhFHwoy3.js","assets/providers-wzm7E8Pa.js","assets/http-CJCtjYpA.js","assets/info-CiqHR5cs.js","assets/store-Dn23_Ymr.js","assets/store-BMRQiV1z.js","assets/shapes-Cw7tCHIp.js","assets/store-DoJn3lBF.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{J as n,a as r,ft as i,g as a,ht as o,p as s,q as c,v as l,y as u}from"./index-BlCH2LG4.js";import{n as d}from"./icons-CHVz6kv_.js";import{t as f}from"./useFocusTrap-DbfG6zbM.js";import{a as p,b as m,c as h,h as g,l as _,o as v,s as y,u as b}from"./kokoro-BCXTWbLb.js";import{t as x}from"./FeatureUseNotice-CoK5HkbR.js";import{t as S}from"./providers-wzm7E8Pa.js";import{i as C,r as w}from"./info-CiqHR5cs.js";import{t as T}from"./time-BHTmJR1s.js";import{n as E,t as D,u as ee}from"./useStudy-Dh598Dw8.js";import{i as te,l as ne,n as re,o as O,s as k,t as ie,u as ae}from"./useLiveConfig-BhFHwoy3.js";import{C as oe,b as se,v as ce,y as A}from"./shapes-Cw7tCHIp.js";import{n as le}from"./store-DoJn3lBF.js";import{a as ue,d as de,f as fe,l as pe,n as me,p as he,r as ge,s as _e,u as ve}from"./quietHours-BJAGhffA.js";import{t as ye}from"./DropSelect-CJnpoHtR.js";import{g as be}from"./store-DXmC_fP2.js";var j=o(),M=e(),N=t(),P={display:`flex`,flexDirection:`column`,gap:4,fontSize:13,background:`var(--surface-default)`,border:`1px solid var(--line)`,borderRadius:8,padding:`7px 10px`},F={flex:`0 0 auto`,background:`transparent`,border:`none`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,lineHeight:1,padding:0};function xe(e){let t=(0,j.c)(40),{node:n,ago:r}=e,[i,a]=(0,M.useState)(!1),[o,s]=(0,M.useState)(n.body),c=(0,M.useRef)(null),l,u;t[0]===i?(l=t[1],u=t[2]):(l=()=>{i&&c.current?.focus()},u=[i],t[0]=i,t[1]=l,t[2]=u),(0,M.useEffect)(l,u);let d;t[3]!==o||t[4]!==n.body||t[5]!==n.id?(d=()=>{let e=o.trim();e&&e!==n.body&&A(n.id,e),a(!1)},t[3]=o,t[4]=n.body,t[5]=n.id,t[6]=d):d=t[6];let f=d,p;t[7]===n.body?p=t[8]:(p=()=>{s(n.body),a(!1)},t[7]=n.body,t[8]=p);let m=p,h,g;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h={display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:8},g={fontFamily:`var(--font-data, inherit)`,fontSize:10.5,fontWeight:600,color:`var(--presence)`,letterSpacing:`0.02em`},t[9]=h,t[10]=g):(h=t[9],g=t[10]);let _;t[11]===n.concept?_=t[12]:(_=(0,N.jsx)(`span`,{style:g,children:n.concept}),t[11]=n.concept,t[12]=_);let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v={fontSize:10.5,color:`var(--text-muted)`,whiteSpace:`nowrap`},t[13]=v):v=t[13];let y;t[14]===r?y=t[15]:(y=(0,N.jsx)(`span`,{style:v,children:r}),t[14]=r,t[15]=y);let b;t[16]!==i||t[17]!==n.concept?(b=!i&&(0,N.jsx)(`button`,{type:`button`,onClick:()=>a(!0),title:`Edit this fact`,"aria-label":`Edit: ${n.concept}`,style:{...F,fontSize:12},children:`Edit`}),t[16]=i,t[17]=n.concept,t[18]=b):b=t[18];let x;t[19]===n.id?x=t[20]:(x=()=>ce(n.id),t[19]=n.id,t[20]=x);let S=`Forget: ${n.concept}`,C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C={...F,fontSize:16},t[21]=C):C=t[21];let w;t[22]!==x||t[23]!==S?(w=(0,N.jsx)(`button`,{type:`button`,onClick:x,title:`Forget this concept`,"aria-label":S,style:C,children:`×`}),t[22]=x,t[23]=S,t[24]=w):w=t[24];let T;t[25]!==b||t[26]!==w||t[27]!==_||t[28]!==y?(T=(0,N.jsxs)(`div`,{style:h,children:[_,y,b,w]}),t[25]=b,t[26]=w,t[27]=_,t[28]=y,t[29]=T):T=t[29];let E;t[30]!==m||t[31]!==o||t[32]!==i||t[33]!==n.body||t[34]!==n.concept||t[35]!==f?(E=i?(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`textarea`,{ref:c,value:o,onChange:e=>s(e.target.value),rows:3,"aria-label":`Edit memory: ${n.concept}`,style:{font:`inherit`,fontSize:13,lineHeight:1.4,color:`var(--text-primary)`,background:`var(--surface-elevated)`,border:`1px solid var(--line)`,borderRadius:6,padding:`6px 8px`,resize:`vertical`,width:`100%`,boxSizing:`border-box`}}),(0,N.jsxs)(`div`,{style:{display:`flex`,gap:8,justifyContent:`flex-end`},children:[(0,N.jsx)(`button`,{type:`button`,onClick:m,style:{...F,fontSize:12},children:`Cancel`}),(0,N.jsx)(`button`,{type:`button`,onClick:f,disabled:!o.trim(),style:{...F,fontSize:12,color:`var(--presence)`,fontWeight:600},children:`Save`})]})]}):(0,N.jsx)(`span`,{style:{color:`var(--text-primary)`,lineHeight:1.4},children:n.body}),t[30]=m,t[31]=o,t[32]=i,t[33]=n.body,t[34]=n.concept,t[35]=f,t[36]=E):E=t[36];let D;return t[37]!==T||t[38]!==E?(D=(0,N.jsxs)(`li`,{style:P,children:[T,E]}),t[37]=T,t[38]=E,t[39]=D):D=t[39],D}function I(e){let t=e.concept.indexOf(`.`);return t<0?e.concept:e.concept.slice(0,t)}function Se(e){return{profile:`About you`,preferences:`Preferences`,topics:`Topics`,threads:`Open threads`,projects:`Projects`,work:`Work`,life:`Life`}[e]??e.slice(0,1).toUpperCase()+e.slice(1)}function Ce(e){let t=new Map;for(let n of e){let e=I(n),r=t.get(e);r?r.push(n):t.set(e,[n])}return[...t.keys()].sort((e,t)=>e===`profile`?-1:t===`profile`?1:e.localeCompare(t)).map(e=>({namespace:e,nodes:t.get(e).slice().sort((e,t)=>t.updatedAt-e.updatedAt)}))}function L(e){if(!e)return``;try{return new Date(e).toISOString().split(`T`)[0]}catch{return``}}function R(e){let t=L(e.updatedAt);return`${t?`---\nconcept: ${e.concept}\nupdated: ${t}\n---`:`---\nconcept: ${e.concept}\n---`}\n\n${e.body}`}function z(e){return e.length?[...e].sort((e,t)=>e.concept===`profile`?-1:t.concept===`profile`?1:e.concept.localeCompare(t.concept)).map(R).join(`
3
+
4
+ ---
5
+
6
+ `):``}function we(e){let t=z(e);if(t)try{let e=new Blob([t],{type:`text/markdown;charset=utf-8`}),n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=`mavea-memory.md`,r.click(),URL.revokeObjectURL(n)}catch{}}var B=420,V=300,H=6,U=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--insight-soft)`,`var(--warning-soft)`],W={profile:U[0],preferences:U[3],topics:U[1],threads:U[4],projects:U[2]};function Te(e){return W[e]??U[Ee(e)%U.length]}function Ee(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return Math.abs(t)}function De(e){let t=[],n=new Set,r=(e,t)=>[e,t].sort().join(`\0`),i=e.filter(e=>e.updatedAt>0).sort((e,t)=>e.updatedAt-t.updatedAt);for(let e=0;e<i.length;e++)for(let a=e+1;a<i.length&&i[a].updatedAt-i[e].updatedAt<200;a++){let o=r(i[e].concept,i[a].concept);n.has(o)||(n.add(o),t.push({a:i[e].concept,b:i[a].concept,cooccurred:!0}))}let a=new Set(e.map(e=>e.concept));for(let i of e){let e=i.concept.split(`.`)[0];if(e!==i.concept&&a.has(e)){let a=r(i.concept,e);n.has(a)||(n.add(a),t.push({a:i.concept,b:e,cooccurred:!1}))}}return t}function G(e,t){let n=[...e].sort((e,t)=>e.concept.localeCompare(t.concept)),r=new Map;n.forEach((e,t)=>{let i=t/Math.max(1,n.length)*Math.PI*2,a=Math.min(B,V)*.3;r.set(e.concept,{x:B/2+Math.cos(i)*a,y:V/2+Math.sin(i)*a,vx:0,vy:0})});let i=[...r.values()],a=.82;for(let e=0;e<80;e++){let o=1-e/80,s=.08*Math.sqrt(B*V/Math.max(1,n.length));for(let e=0;e<i.length;e++){let t=i[e];for(let n=e+1;n<i.length;n++){let e=i[n],r=e.x-t.x||.01,a=e.y-t.y||.01,c=Math.hypot(r,a)||.01,l=s*s/c*1.5;t.vx-=r/c*l*o,t.vy-=a/c*l*o,e.vx+=r/c*l*o,e.vy+=a/c*l*o}}for(let e of t){let t=r.get(e.a),n=r.get(e.b);if(!t||!n)continue;let i=n.x-t.x,a=n.y-t.y,s=Math.hypot(i,a)||.01,c=(s-(e.cooccurred?85:120))*.05*o;t.vx+=i/s*c,t.vy+=a/s*c,n.vx-=i/s*c,n.vy-=a/s*c}for(let e of r.values())e.vx+=(B/2-e.x)*.006*o,e.vy+=(V/2-e.y)*.006*o;let c=0;for(let e of i){let t=Math.abs(e.vx)+Math.abs(e.vy);t>c&&(c=t),e.x=Math.max(20,Math.min(B-20,e.x+e.vx)),e.y=Math.max(20,Math.min(V-20,e.y+e.vy)),e.vx*=a,e.vy*=a}if(c<.4)break}let o=new Map;for(let[e,t]of r)o.set(e,{x:t.x,y:t.y});return o}function Oe(e){let t=(0,j.c)(39),{nodes:n}=e,[r,i]=(0,M.useState)(null),[a,o]=(0,M.useState)(null),s;t[0]===n?s=t[1]:(s=De(n),t[0]=n,t[1]=s);let c=s,l;t[2]!==c||t[3]!==n?(l=G(n,c),t[2]=c,t[3]=n,t[4]=l):l=t[4];let u=l,d;t[5]===c?d=t[6]:(d=c.filter(ke),t[5]=c,t[6]=d);let f=d.length,p;t[7]!==a||t[8]!==n?(p=a?n.find(e=>e.concept===a):null,t[7]=a,t[8]=n,t[9]=p):p=t[9];let m=p;if(n.length===0){let e;return t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,N.jsx)(`div`,{className:`mg-empty`,children:`Your knowledge graph appears here as you talk — start a conversation to add concepts.`}),t[10]=e):e=t[10],e}let h;if(t[11]!==c||t[12]!==r||t[13]!==u){let e;t[15]!==r||t[16]!==u?(e=(e,t)=>{let n=u.get(e.a),i=u.get(e.b);if(!n||!i)return null;let a=r===e.a||r===e.b,o=e.cooccurred?.55:.2;return(0,N.jsx)(`line`,{x1:n.x,y1:n.y,x2:i.x,y2:i.y,className:`mg-edge`+(e.cooccurred?` mg-edge--strong`:``),style:{opacity:r?a?o+.3:.05:o}},t)},t[15]=r,t[16]=u,t[17]=e):e=t[17],h=c.map(e),t[11]=c,t[12]=r,t[13]=u,t[14]=h}else h=t[14];let g;if(t[18]!==a||t[19]!==r||t[20]!==n||t[21]!==u){let e;t[23]!==a||t[24]!==r||t[25]!==u?(e=e=>{let t=u.get(e.concept);if(!t)return null;let n=Te(I(e)),s=Math.max(7,Math.min(18,7+e.body.length/400*11)),c=r===e.concept,l=a===e.concept,d=e.concept.split(`.`).pop()??e.concept,f=oe(e.source),p=e.kind===`procedural`,m=l?1:f?.82:.42,h=p||l||!f?n:`none`,g=p?2:l?1.5:+!f;return(0,N.jsxs)(`g`,{className:`mg-node`,transform:`translate(${t.x},${t.y})`,onMouseEnter:()=>i(e.concept),onMouseLeave:()=>i(null),onClick:()=>o(l?null:e.concept),style:{opacity:r&&!c?.3:1},children:[(0,N.jsx)(`title`,{children:`${e.concept} · ${f?`confirmed`:`unconfirmed`}${p?` · lesson`:``}`}),c&&(0,N.jsx)(`circle`,{r:s+5,fill:n,style:{opacity:.15},"aria-hidden":`true`}),(0,N.jsx)(`circle`,{r:s,fill:n,style:{opacity:m},stroke:h,strokeWidth:g,strokeDasharray:f?void 0:`3 2`,strokeOpacity:.5}),(0,N.jsx)(`text`,{className:`mg-label`,y:s+13,textAnchor:`middle`,style:{fill:n,opacity:c||l?1:.65},children:d})]},e.concept)},t[23]=a,t[24]=r,t[25]=u,t[26]=e):e=t[26],g=n.map(e),t[18]=a,t[19]=r,t[20]=n,t[21]=u,t[22]=g}else g=t[22];let _;t[27]!==h||t[28]!==g?(_=(0,N.jsxs)(`svg`,{className:`mg-svg`,viewBox:`0 0 ${B} ${V}`,width:`100%`,height:`auto`,"aria-label":`Memory concept graph`,children:[h,g]}),t[27]=h,t[28]=g,t[29]=_):_=t[29];let v;t[30]===m?v=t[31]:(v=m&&(0,N.jsxs)(`div`,{className:`mg-detail`,onClick:()=>o(null),title:`Click to close`,role:`button`,tabIndex:0,onKeyDown:e=>e.key===`Enter`&&o(null),children:[(0,N.jsx)(`span`,{className:`mg-detail-concept`,children:m.concept}),(0,N.jsx)(`p`,{className:`mg-detail-body`,children:m.body})]}),t[30]=m,t[31]=v);let y;t[32]!==n.length||t[33]!==f?(y=n.length<H?(0,N.jsxs)(`div`,{className:`mg-warmup`,children:[(0,N.jsx)(`div`,{className:`mg-warmup-track`,children:(0,N.jsx)(`div`,{className:`mg-warmup-fill`,style:{width:`${n.length/H*100}%`}})}),(0,N.jsxs)(`span`,{className:`mg-warmup-label`,children:[H-n.length,` more`,` `,H-n.length===1?`concept`:`concepts`,` until your map fills in`]})]}):(0,N.jsxs)(`p`,{className:`mg-foot`,children:[f,` connection`,f===1?``:`s`,` across `,n.length,` `,`concepts`]}),t[32]=n.length,t[33]=f,t[34]=y):y=t[34];let b;return t[35]!==_||t[36]!==v||t[37]!==y?(b=(0,N.jsxs)(`div`,{className:`mg-wrap`,children:[_,v,y]}),t[35]=_,t[36]=v,t[37]=y,t[38]=b):b=t[38],b}function ke(e){return e.cooccurred}n();function Ae({children:e,label:t=`More options`,defaultOpen:n=!1}){let[r,i]=(0,M.useState)(n);return(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>i(e=>!e),"aria-expanded":r,style:{display:`flex`,alignItems:`center`,gap:6,alignSelf:`flex-start`,padding:`4px 2px`,border:`none`,background:`transparent`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12,fontWeight:600,letterSpacing:`0.02em`},children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-block`,transition:`transform 150ms ease`,transform:r?`rotate(90deg)`:`none`,fontSize:10},children:`▶`}),t]}),r&&(0,N.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12,paddingLeft:10,borderLeft:`2px solid var(--line)`},children:e})]})}function je(e){return{padding:`5px 14px`,borderRadius:8,border:`1px solid ${e?`var(--presence)`:`var(--line)`}`,background:e?`color-mix(in oklab, var(--presence) 12%, var(--surface-elevated))`:`var(--surface-default)`,color:e?`var(--presence)`:`var(--text-secondary)`,cursor:`pointer`,font:`inherit`,fontSize:12,fontWeight:e?600:400}}var Me={background:`var(--surface-elevated)`,border:`1px solid var(--line)`,borderRadius:16,padding:16,display:`flex`,flexDirection:`column`,gap:12,width:`min(460px, calc(100vw - 32px))`,boxShadow:`var(--shadow-modal)`},K={fontSize:12,color:`var(--text-muted)`,textTransform:`uppercase`,letterSpacing:`0.06em`},q={background:`var(--surface-default)`,border:`1px solid var(--line)`,borderRadius:10,padding:`9px 11px`,color:`var(--text-primary)`,font:`inherit`,width:`100%`};function Ne(e,t){try{return localStorage.getItem(e)||t}catch{return t}}function Pe(e){let t=_(e);if(t){p(`mavea`,t.kokoro);try{localStorage.setItem(y,e)}catch{}}}function J(e){let t=(0,j.c)(25),{label:n,on:r,onToggle:i,note:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={display:`flex`,alignItems:`flex-start`,gap:10},t[0]=o):o=t[0];let s=r?`var(--presence)`:`var(--track)`,c;t[1]===s?c=t[2]:(c={flex:`0 0 auto`,width:38,height:22,borderRadius:999,border:`1px solid var(--line-strong)`,background:s,position:`relative`,cursor:`pointer`,transition:`background 140ms ease`,marginTop:1},t[1]=s,t[2]=c);let l=r?18:2,u=r?`#fff`:`var(--text-muted)`,d;t[3]!==l||t[4]!==u?(d=(0,N.jsx)(`span`,{style:{position:`absolute`,top:2,left:l,width:16,height:16,borderRadius:`50%`,background:u,transition:`left 140ms ease, background 140ms ease`}}),t[3]=l,t[4]=u,t[5]=d):d=t[5];let f;t[6]!==n||t[7]!==r||t[8]!==i||t[9]!==c||t[10]!==d?(f=(0,N.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":r,"aria-label":n,onClick:i,style:c,children:d}),t[6]=n,t[7]=r,t[8]=i,t[9]=c,t[10]=d,t[11]=f):f=t[11];let p,m;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(p={display:`flex`,flexDirection:`column`,gap:2},m={fontSize:13},t[12]=p,t[13]=m):(p=t[12],m=t[13]);let h;t[14]===n?h=t[15]:(h=(0,N.jsx)(`span`,{style:m,children:n}),t[14]=n,t[15]=h);let g;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(g={fontSize:12,color:`var(--text-muted)`},t[16]=g):g=t[16];let _;t[17]===a?_=t[18]:(_=(0,N.jsx)(`span`,{style:g,children:a}),t[17]=a,t[18]=_);let v;t[19]!==h||t[20]!==_?(v=(0,N.jsxs)(`div`,{style:p,children:[h,_]}),t[19]=h,t[20]=_,t[21]=v):v=t[21];let y;return t[22]!==v||t[23]!==f?(y=(0,N.jsxs)(`div`,{style:o,children:[f,v]}),t[22]=v,t[23]=f,t[24]=y):y=t[24],y}function Y(e){let t=(0,j.c)(11),{value:n,options:r,onPick:i,label:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={display:`flex`,gap:4,padding:3,borderRadius:10,background:`var(--track)`,border:`1px solid var(--line)`},t[0]=o):o=t[0];let s;if(t[1]!==i||t[2]!==r||t[3]!==n){let e;t[5]!==i||t[6]!==n?(e=e=>{let t=e.value===n;return(0,N.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,onClick:()=>i(e.value),style:{flex:1,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1,padding:`6px 8px`,borderRadius:8,border:`none`,cursor:`pointer`,background:t?`var(--surface-elevated)`:`transparent`,boxShadow:t?`0 1px 2px rgba(0,0,0,0.12)`:`none`,color:`inherit`,font:`inherit`},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:t?600:400},children:e.label}),e.badge&&(0,N.jsx)(`span`,{style:{fontSize:10.5,color:`var(--text-muted)`},children:e.badge})]},e.value)},t[5]=i,t[6]=n,t[7]=e):e=t[7],s=r.map(e),t[1]=i,t[2]=r,t[3]=n,t[4]=s}else s=t[4];let c;return t[8]!==a||t[9]!==s?(c=(0,N.jsx)(`div`,{role:`radiogroup`,"aria-label":a,style:o,children:s}),t[8]=a,t[9]=s,t[10]=c):c=t[10],c}function X({onClose:e,initialTab:t,initialAdvancedYouOpen:n}){let[o]=ae(),{style:p,newPerDay:oe}=E(),ce=D(),A=C(o.provider),j=o.models[o.provider]??``,P=j||A.defaultModel,F=o.keys[o.provider]??``,I=S(o.provider).capabilities,L=ve(),R=(0,M.useMemo)(()=>Math.max(1,Math.round(JSON.stringify(L).length/1024)),[L]),z=he(),[B,V]=(0,M.useState)(me),[H,U]=(0,M.useState)(`list`),[W,Te]=(0,M.useState)(t??`model`),[Ee,De]=(0,M.useState)(!1),[G,ke]=(0,M.useState)(null),[X,Fe]=(0,M.useState)(!1),Ie=(0,M.useRef)(0),Le=(0,M.useRef)(null),[Re,ze]=(0,M.useState)(null),Be=(0,M.useRef)(null),[Ve,Z]=(0,M.useState)(null),[He,Q]=(0,M.useState)(null),Ue=(0,M.useRef)(null);f(Ue,{onEscape:e});function We(){let e=ie(),t=new Blob([e],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`mavea-live-v2.json`,r.click(),URL.revokeObjectURL(n)}function Ge(e){let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{try{te(n.result),ze(null)}catch(e){ze(e instanceof Error?e.message:`Import failed.`)}},n.readAsText(t),e.target.value=``}async function Ke(){Q(null),Z(null);try{let{downloadBackup:e}=await c(async()=>{let{downloadBackup:e}=await import(`./backup-DnPfX6cD.js`);return{downloadBackup:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]));e(),Z(`Backup downloaded.`)}catch{Q(`Couldn’t build the backup — please try again.`)}}function qe(e){let t=e.target.files?.[0];if(!t)return;if(Q(null),Z(null),t.size>25e6){Q(`That file is too large to be a Mavéa backup.`),e.target.value=``;return}let n=new FileReader;n.onload=()=>{(async()=>{try{let{importBackup:e}=await c(async()=>{let{importBackup:e}=await import(`./backup-DnPfX6cD.js`);return{importBackup:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),t=e(n.result),r=[[t.dashboards,`dashboard`],[t.memory,`memory`],[t.flashcards,`card`],[t.library,`saved canvas`,`saved canvases`],[t.atlas,`map record`],[t.courses,`course`]].filter(([e])=>e>0).map(([e,t,n])=>`${e} ${e===1?t:n??`${t}s`}`);Z(r.length?`Merged ${r.join(`, `)}.`:`Nothing new to merge from that file.`)}catch(e){Q(e instanceof Error?e.message:`Import failed.`)}})()},n.readAsText(t),e.target.value=``}let[Je,Ye]=(0,M.useState)(()=>Ne(y,v)),[Xe,Ze]=(0,M.useState)(()=>m()),Qe=(0,M.useCallback)(e=>{Ze(e),g(e),b()},[]),[$e,et]=(0,M.useState)(()=>a()),tt=(0,M.useCallback)(e=>{et(e),u(e),s(l())},[]),$=(0,M.useCallback)(async()=>{let e=++Ie.current;Fe(!0);let{checkLiveReady:t}=await c(async()=>{let{checkLiveReady:e}=await import(`./shapes-Cw7tCHIp.js`).then(e=>e.s);return{checkLiveReady:e}},__vite__mapDeps([20,3,15,16,17,8,9])),n=await t(ne(re()),{tts:!1});e===Ie.current&&(ke({llm:n.llm,model:n.model,statusCode:n.statusCode}),Fe(!1))},[]);(0,M.useEffect)(()=>{let e=setTimeout(()=>void $(),400);return()=>clearTimeout(e)},[o.provider,P,F,$]);let nt=X?`var(--text-muted)`:G?.llm&&G?.model?`var(--insight)`:`var(--warning)`,rt=X?`Checking…`:G?.llm&&G?.model?`Ready`:G?.llm?`Reachable — model not found`:A.needsKey&&!F?`Add your API key`:G?.statusCode===401?`Invalid API key`:G?.statusCode===403?`Key lacks permission`:G?.statusCode===404?`Model not found`:G?.statusCode===void 0?`Not reachable`:`Error ${G.statusCode}`;return(0,N.jsxs)(`div`,{ref:Ue,style:Me,role:`dialog`,"aria-modal":`true`,"aria-label":`Mavéa settings`,children:[(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,N.jsxs)(`span`,{style:{fontWeight:700,fontSize:15,display:`flex`,alignItems:`center`,gap:8},children:[(0,N.jsx)(d.sparkle,{style:{width:16,height:16,flex:`0 0 auto`,color:`var(--presence)`}}),`Settings`]}),e&&(0,N.jsx)(`button`,{onClick:e,title:`Close`,"aria-label":`Close settings`,style:{display:`inline-grid`,placeItems:`center`,width:28,height:28,padding:0,border:`none`,borderRadius:6,background:`transparent`,color:`var(--text-secondary)`,cursor:`pointer`,flexShrink:0},children:(0,N.jsx)(d.x,{style:{width:16,height:16}})})]}),(0,N.jsx)(`div`,{className:`ls-tabs`,role:`tablist`,"aria-label":`Settings sections`,children:[`model`,`settings`,`you`,`data`].map(e=>(0,N.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":W===e,className:`ls-tab${W===e?` active`:``}`,onClick:()=>Te(e),children:e===`model`?`Model`:e===`settings`?`Settings`:e===`you`?`You`:`Your data`},e))}),(0,N.jsxs)(`div`,{className:`ls-body`,children:[W===`model`&&(0,N.jsxs)(`div`,{className:`settings-model-connect`,children:[(0,N.jsx)(`div`,{className:`settings-provider-picker`,style:{display:`flex`,flexWrap:`wrap`,gap:8},"aria-label":`Model providers`,children:w.map(e=>{let t=e.id===o.provider;return(0,N.jsx)(`button`,{onClick:()=>O({provider:e.id}),style:{...q,width:`auto`,cursor:`pointer`,borderColor:t?`var(--presence)`:`var(--line)`,boxShadow:t?`0 0 0 1px var(--presence)`:`none`,opacity:t?1:.7},"aria-pressed":t,children:e.label},e.id)})}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:K,children:`Model`}),(0,N.jsx)(fe,{provider:o.provider,value:j,onChange:e=>k(o.provider,`model`,e)},o.provider)]}),A.needsKey&&(0,N.jsxs)(`label`,{className:`settings-api-key-field`,style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,N.jsx)(`span`,{style:K,children:`API key`}),!o.rememberKey&&(0,N.jsx)(`span`,{className:`settings-session-only`,"aria-label":`Key is not saved to disk`,children:`session only`})]}),(0,N.jsx)(`input`,{style:q,type:`password`,value:F,onChange:e=>k(o.provider,`key`,e.target.value),placeholder:o.provider===`anthropic`?`sk-ant-…`:`paste your key`,spellCheck:!1,autoComplete:`off`}),(0,N.jsxs)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:[`Kept in memory unless Remember is on — sent through this deployment to`,` `,A.label.split(` · `)[1]??A.label,` when used.`]})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13},children:[(0,N.jsx)(`span`,{style:{width:8,height:8,borderRadius:8,background:nt,flex:`0 0 auto`},"aria-hidden":!0}),(0,N.jsx)(`span`,{children:rt}),(0,N.jsx)(`span`,{style:{color:`var(--text-muted)`},children:`·`}),(0,N.jsx)(`span`,{style:{color:`var(--text-muted)`},children:A.hint}),(0,N.jsx)(`button`,{onClick:()=>void $(),style:{marginLeft:`auto`,background:`transparent`,border:`1px solid var(--line)`,borderRadius:8,padding:`4px 10px`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12},title:`Re-check readiness`,children:`Recheck`})]}),A.needsKey&&(0,N.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13},children:[(0,N.jsx)(`input`,{type:`checkbox`,checked:o.rememberKey,onChange:e=>O({rememberKey:e.target.checked})}),(0,N.jsx)(`span`,{children:`Remember key on this device`}),(0,N.jsx)(`span`,{style:{color:`var(--text-muted)`,fontSize:12},children:o.rememberKey?`encrypted in this browser — trusted devices only`:`kept in memory only — cleared on reload`})]}),(0,N.jsx)(de,{}),(0,N.jsxs)(`div`,{className:`settings-transfer-row`,children:[(0,N.jsx)(`button`,{type:`button`,className:`settings-transfer-btn`,onClick:We,children:`Export settings`}),(0,N.jsx)(`button`,{type:`button`,className:`settings-transfer-btn`,onClick:()=>Le.current?.click(),children:`Import settings`}),(0,N.jsx)(`input`,{ref:Le,type:`file`,accept:`application/json,.json`,style:{display:`none`},"aria-hidden":`true`,onChange:Ge}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`API and search keys are never included.`}),Re&&(0,N.jsx)(`span`,{className:`settings-import-error`,role:`alert`,children:Re})]})]}),W===`settings`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ee,{}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Web search`}),(0,N.jsx)(Y,{value:o.searchMode,options:[{value:`off`,label:`Off`},{value:`realtime`,label:`Real-time`}],onPick:e=>O({searchMode:e})}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:o.searchMode===`off`?`Answers from the model's own knowledge — no web calls.`:I.nativeWebSearch?`Grounds fresh asks in live results with citations when a question needs it.`:`This model has no built-in search, so Real-time won't ground anything right now. The four direct providers support it; on OpenRouter it depends on the selected model. Pick a search-capable model or leave this off.`})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Explanation level`}),(0,N.jsx)(Y,{value:o.explainLevel,options:[{value:`simple`,label:`Simple`,badge:`like I'm 5`},{value:`standard`,label:`Standard`,badge:`default`},{value:`deep`,label:`In-depth`,badge:`full rigor`}],onPick:e=>O({explainLevel:e})}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`Simple uses shorter sentences, everyday analogies, and fewer, more-labelled visuals. In-depth goes further — mechanisms, numbers, edge cases. You can also just say "explain it simpler" or "go deeper".`})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Answer quality`}),(0,N.jsx)(Y,{value:o.quality,options:[{value:`fast`,label:`Fast`,badge:`quickest`},{value:`balanced`,label:`Balanced`,badge:`default`},{value:`thorough`,label:`Thorough`}],onPick:e=>O({quality:e})}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`Fast keeps replies snappy; Thorough lets the model think more on hard questions.`})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Visual richness`}),(0,N.jsx)(Y,{value:$e,options:[{value:`auto`,label:`Auto`,badge:`recommended`},{value:`full`,label:`Full`},{value:`lite`,label:`Lite`,badge:`older machines`}],onPick:e=>tt(e)}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`Auto matches the effects to your machine. Lite calms the animated face and drops the glass blur so Mavéa stays smooth on older or lower-powered computers.`})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Voice`}),(0,N.jsx)(Y,{value:Xe,options:[{value:`auto`,label:`Auto`,badge:`recommended`},{value:`kokoro`,label:`Natural`,badge:`needs Docker`},{value:`browser`,label:`System`,badge:`older machines`}],onPick:e=>Qe(e)}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`Natural is Kokoro, the voice Mavéa is built around — it needs the Docker container and a machine that can keep up with it. System is your computer’s own voice: plainer, but it costs nothing and stays in step on older hardware. Without either, lines appear as captions.`})]}),(0,N.jsxs)(Ae,{children:[(0,N.jsx)(J,{label:`Pen mode`,on:o.annotationsEnabled,onToggle:()=>{let e=!o.annotationsEnabled;O({annotationsEnabled:e,teachMode:e})},note:`Mavéa draws on the canvas as it speaks — circling numbers, striking out misconceptions, annotating every walkthrough stop. Muted walks also write margin notes beside the cards, so you keep the marked-up answer. Off: the pen stays quiet entirely.`}),o.searchMode!==`off`&&(0,N.jsxs)(`span`,{style:{fontSize:12,color:`var(--text-muted)`,display:`flex`,gap:6},children:[(0,N.jsx)(d.globe,{style:{width:14,height:14,flex:`0 0 auto`,marginTop:1}}),`You'll see "Searching…" whenever a search actually runs.`]}),(0,N.jsx)(J,{label:`Keep a library`,on:o.libraryEnabled,onToggle:()=>O({libraryEnabled:!o.libraryEnabled}),note:`Saves the canvases you generate on this device so you can pick any one back up from the welcome screen. On by default; turn it off or clear the library any time.`}),o.libraryEnabled&&z.length>0&&(0,N.jsx)(`div`,{style:{marginLeft:48},children:(0,N.jsxs)(`button`,{type:`button`,onClick:()=>le(),style:{background:`transparent`,border:`1px solid var(--line)`,borderRadius:8,padding:`3px 9px`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12},children:[`Clear library (`,z.length,`)`]})})]})]}),W===`you`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(x,{kind:`stored-data`,from:`live`}),(0,N.jsx)(J,{label:`Remember me`,on:o.memoryEnabled,onToggle:()=>O({memoryEnabled:!o.memoryEnabled}),note:`Stored facts stay on this device. While Memory is enabled, relevant facts are included in future requests to your selected model provider. You can inspect, edit, export, or forget each stored fact below.`}),o.memoryEnabled&&(0,N.jsxs)(`div`,{style:{marginLeft:48,display:`flex`,flexDirection:`column`,gap:8},children:[L.length===0?(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`Nothing remembered yet — Mavéa will build a concept wiki as you talk.`}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,N.jsx)(`div`,{style:{display:`flex`,gap:2,padding:2,borderRadius:8,background:`var(--track)`,border:`1px solid var(--line)`,alignSelf:`flex-start`},children:[`list`,`graph`].map(e=>(0,N.jsx)(`button`,{type:`button`,onClick:()=>U(e),style:{padding:`4px 12px`,borderRadius:6,border:`none`,background:H===e?`var(--surface-elevated)`:`transparent`,boxShadow:H===e?`0 1px 2px rgba(0,0,0,0.1)`:`none`,color:H===e?`var(--text-primary)`:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12,fontWeight:H===e?600:400},children:e===`list`?`Concepts`:`Graph`},e))}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>se(),style:{background:`transparent`,border:`1px solid var(--line)`,borderRadius:8,padding:`3px 9px`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12},children:`Forget all`})]}),H===`graph`?(0,N.jsx)(Oe,{nodes:L}):(0,N.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,maxHeight:280,overflowY:`auto`},children:Ce(L).map(({namespace:e,nodes:t})=>(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontFamily:`var(--font-data, inherit)`,fontSize:10,letterSpacing:`0.14em`,textTransform:`uppercase`,color:`var(--text-muted)`,margin:`2px 2px 0`},children:Se(e)}),(0,N.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0,display:`flex`,flexDirection:`column`,gap:6},children:t.map(e=>(0,N.jsx)(xe,{node:e,ago:T(e.updatedAt)},e.id))})]},e))}),(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:8},children:[(0,N.jsxs)(`span`,{style:{fontSize:11.5,color:`var(--text-muted)`},children:[L.length,` `,L.length===1?`concept`:`concepts`,` · `,R,` KB on this device`]}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>we(L),style:{background:`transparent`,border:`1px solid var(--line)`,borderRadius:8,padding:`3px 9px`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12},children:`Export memory`})]})]}),(0,N.jsxs)(`span`,{style:{fontSize:12,color:`var(--text-muted)`,display:`flex`,gap:6},children:[(0,N.jsx)(d.sparkle,{style:{width:14,height:14,flex:`0 0 auto`,marginTop:1}}),`Stored on this device, and sent to ${A.label.split(` · `)[1]??A.label} inside each prompt to personalize answers — the same path as your questions.`]})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,N.jsx)(`span`,{style:K,children:`Voice`}),(0,N.jsx)(`div`,{style:{display:`flex`,gap:12,alignItems:`center`},children:(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4,flex:1},children:[(0,N.jsx)(`span`,{style:{fontSize:11,color:`var(--text-muted)`},children:`Mavéa`}),(0,N.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,N.jsx)(`div`,{style:{flex:1},children:(0,N.jsx)(ye,{ariaLabel:`Mavéa's voice`,value:Je,onChange:e=>{Ye(e),Pe(e);let t=_(e);t&&pe(t)},options:h.map(e=>({value:e.id,label:e.label,note:e.tone}))})}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>{let e=_(Je);e&&pe(e)},style:{...q,width:`auto`,padding:`6px 10px`,cursor:`pointer`,fontSize:11},title:`Preview voice`,"aria-label":`Preview Mavéa's voice`,children:`▶`})]})]})}),(0,N.jsx)(_e,{})]}),ce.total>0&&(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Flashcards`}),(0,N.jsx)(Y,{label:`Flashcards`,value:p,options:[{value:`collection`,label:`Just save them`},{value:`spaced`,label:`Help me remember`}],onPick:e=>be(e)}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:p===`collection`?`A plain pile you flip through when you feel like it. No dates, no counts, nothing waiting for you.`:`Each card comes back just before you'd forget it. New ones join ${oe} a day, so a big pile never lands at once.`})]}),(0,N.jsxs)(Ae,{defaultOpen:n,children:[(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsxs)(`span`,{style:{fontSize:11,color:`var(--text-muted)`},children:[`Hold to talk key `,(0,N.jsx)(`span`,{style:{opacity:.6},children:`(tap mode only)`})]}),(0,N.jsx)(`div`,{style:{display:`flex`,gap:6},children:[{key:`Alt`,label:`Alt`},{key:`Control`,label:`Ctrl`},{key:`Shift`,label:`Shift`}].map(({key:e,label:t})=>{let n=(o.pttKey||`Alt`)===e;return(0,N.jsx)(`button`,{type:`button`,onClick:()=>O({pttKey:e}),style:je(n),"aria-pressed":n,title:`Hold ${t} to talk (shows as ${ue(e,o.pttSide)} in the hint)`,children:t},e)})}),(0,N.jsx)(`div`,{style:{display:`flex`,gap:6},children:[{side:`any`,label:`Either side`},{side:`left`,label:`Left`},{side:`right`,label:`Right`}].map(({side:e,label:t})=>{let n=(o.pttSide||`any`)===e;return(0,N.jsx)(`button`,{type:`button`,onClick:()=>O({pttSide:e}),style:je(n),"aria-pressed":n,title:e===`any`?`Either side of the key talks`:`Only the ${t.toLowerCase()} key talks`,children:t},e)})})]}),(0,N.jsx)(J,{label:`Morning brief`,on:o.morningBrief,onToggle:()=>O({morningBrief:!o.morningBrief}),note:`On the first open of the day, Mavéa opens with a quick read on the things you track.`}),(0,N.jsx)(J,{label:`Save flashcards automatically`,on:o.autoSaveFlashcards,onToggle:()=>O({autoSaveFlashcards:!o.autoSaveFlashcards}),note:`When an answer already contains flashcards, keep them without asking. Off by default — the usual way is tapping “Cards” on the answer you want. Every save shows a pill with Undo, so it's never silent.`}),(0,N.jsx)(J,{label:`Quiet hours`,on:B,onToggle:()=>{ge(!B),V(!B)},note:`10 PM – 6 AM: the screen dims and the voice drops to a murmur — won't wake anyone.`})]})]}),W===`data`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(x,{kind:`stored-data`,from:`live`}),(0,N.jsxs)(`p`,{style:{fontSize:13,lineHeight:1.5,color:`var(--text-secondary)`,margin:0},children:[`Export a backup, or import one you saved.`,` `,(0,N.jsx)(`strong`,{children:`Stored only in this browser.`}),` Because your data is encrypted to this exact browser, copying it to incognito, another port, or another computer won’t work — export a backup here and import it there.`]}),(0,N.jsxs)(`ul`,{style:{margin:0,paddingLeft:18,fontSize:12,lineHeight:1.6,color:`var(--text-muted)`},children:[(0,N.jsx)(`li`,{children:`Includes your dashboards, memory, flashcards, saved canvases, map, and courses.`}),(0,N.jsxs)(`li`,{children:[`Your API keys are `,(0,N.jsx)(`strong`,{children:`never included`}),` — you’ll re-enter them on a new device.`]}),(0,N.jsxs)(`li`,{children:[`Importing `,(0,N.jsx)(`strong`,{children:`merges`}),` — it adds and updates, and never erases what’s already here.`]}),(0,N.jsx)(`li`,{children:`The file is plain, unencrypted JSON: keep it somewhere safe, import only files you trust.`})]}),(0,N.jsxs)(`div`,{className:`settings-transfer-row`,children:[(0,N.jsx)(`button`,{type:`button`,className:`settings-transfer-btn`,onClick:()=>void Ke(),children:`Export all my data`}),(0,N.jsx)(`button`,{type:`button`,className:`settings-transfer-btn`,onClick:()=>Be.current?.click(),children:`Import a backup`}),(0,N.jsx)(`input`,{ref:Be,type:`file`,accept:`application/json,.json`,style:{display:`none`},"aria-hidden":`true`,onChange:qe}),Ve&&(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},role:`status`,children:Ve}),He&&(0,N.jsx)(`span`,{className:`settings-import-error`,role:`alert`,children:He})]})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flexWrap:`wrap`,gap:`6px 12px`,paddingTop:14,borderTop:`1px solid var(--line-soft)`,color:`var(--text-muted)`,fontSize:10.5},children:[(0,N.jsx)(`a`,{href:`#/terms?from=live`,style:{color:`inherit`},children:`Terms`}),(0,N.jsx)(`a`,{href:`#/privacy?from=live`,style:{color:`inherit`},children:`Privacy`}),(0,N.jsx)(`a`,{href:`#/legal?from=live`,style:{color:`inherit`},children:`Important information`}),(0,N.jsx)(`a`,{href:i(`LICENSE.txt`),target:`_blank`,rel:`noreferrer noopener`,style:{color:`inherit`},children:`License`}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>{r(),De(!0)},style:{marginLeft:`auto`,padding:0,border:0,color:`inherit`,background:`transparent`,font:`inherit`,textDecoration:`underline`,textUnderlineOffset:3,cursor:`pointer`},children:Ee?`Review will appear next visit`:`Review acknowledgement again`})]})]})]})}export{X as LiveSettings};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-y8GL67bB.js";import{n}from"./icons-CHVz6kv_.js";import{t as r}from"./MindShape-mTlN5mPZ.js";var i=t(),a=e();function o(e){let t=(0,i.c)(33),{open:o,onClose:s,spec:c}=e,l=`scrim`+(o?` show`:``),u=o?0:-1,d=!o,f;t[0]===s?f=t[1]:(f=e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),s())},t[0]=s,t[1]=f);let p=o?`auto`:`none`,m;t[2]===p?m=t[3]:(m={pointerEvents:p},t[2]=p,t[3]=m);let h;t[4]!==s||t[5]!==l||t[6]!==u||t[7]!==d||t[8]!==f||t[9]!==m?(h=(0,a.jsx)(`div`,{className:l,onClick:s,role:`button`,tabIndex:u,"aria-hidden":d,"aria-label":`Close the map`,onKeyDown:f,style:m}),t[4]=s,t[5]=l,t[6]=u,t[7]=d,t[8]=f,t[9]=m,t[10]=h):h=t[10];let g=`drawer`+(o?` show`:``),_=!o,v=!o,y;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,a.jsx)(n.x,{}),t[11]=y):y=t[11];let b;t[12]===s?b=t[13]:(b=(0,a.jsx)(`button`,{className:`drawer-x`,onClick:s,"aria-label":`Close the map`,children:y}),t[12]=s,t[13]=b);let x;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,a.jsxs)(`div`,{className:`drawer-eyebrow`,children:[(0,a.jsx)(n.sparkle,{style:{width:14,height:14}}),` The thinking behind this`]}),t[14]=x):x=t[14];let S;t[15]===c?S=t[16]:(S=c?.center&&(0,a.jsx)(`div`,{className:`drawer-claim`,children:c.center}),t[15]=c,t[16]=S);let C;t[17]===S?C=t[18]:(C=(0,a.jsxs)(`div`,{className:`drawer-head`,children:[x,S]}),t[17]=S,t[18]=C);let w;t[19]===c?w=t[20]:(w=c&&(0,a.jsx)(r,{asBlock:!0,center:c.center,atoms:c.atoms,links:c.links,clusters:c.clusters,unsaid:c.unsaid}),t[19]=c,t[20]=w);let T;t[21]===w?T=t[22]:(T=(0,a.jsx)(`div`,{className:`drawer-body`,children:w}),t[21]=w,t[22]=T);let E;t[23]!==v||t[24]!==b||t[25]!==C||t[26]!==T||t[27]!==g||t[28]!==_?(E=(0,a.jsxs)(`aside`,{className:g,"aria-hidden":_,inert:v,children:[b,C,T]}),t[23]=v,t[24]=b,t[25]=C,t[26]=T,t[27]=g,t[28]=_,t[29]=E):E=t[29];let D;return t[30]!==E||t[31]!==h?(D=(0,a.jsxs)(a.Fragment,{children:[h,E]}),t[30]=E,t[31]=h,t[32]=D):D=t[32],D}export{o as MindMapViewerDrawer};
1
+ import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-BlCH2LG4.js";import{n}from"./icons-CHVz6kv_.js";import{t as r}from"./MindShape-DDL4X-e5.js";var i=t(),a=e();function o(e){let t=(0,i.c)(33),{open:o,onClose:s,spec:c}=e,l=`scrim`+(o?` show`:``),u=o?0:-1,d=!o,f;t[0]===s?f=t[1]:(f=e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),s())},t[0]=s,t[1]=f);let p=o?`auto`:`none`,m;t[2]===p?m=t[3]:(m={pointerEvents:p},t[2]=p,t[3]=m);let h;t[4]!==s||t[5]!==l||t[6]!==u||t[7]!==d||t[8]!==f||t[9]!==m?(h=(0,a.jsx)(`div`,{className:l,onClick:s,role:`button`,tabIndex:u,"aria-hidden":d,"aria-label":`Close the map`,onKeyDown:f,style:m}),t[4]=s,t[5]=l,t[6]=u,t[7]=d,t[8]=f,t[9]=m,t[10]=h):h=t[10];let g=`drawer`+(o?` show`:``),_=!o,v=!o,y;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,a.jsx)(n.x,{}),t[11]=y):y=t[11];let b;t[12]===s?b=t[13]:(b=(0,a.jsx)(`button`,{className:`drawer-x`,onClick:s,"aria-label":`Close the map`,children:y}),t[12]=s,t[13]=b);let x;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,a.jsxs)(`div`,{className:`drawer-eyebrow`,children:[(0,a.jsx)(n.sparkle,{style:{width:14,height:14}}),` The thinking behind this`]}),t[14]=x):x=t[14];let S;t[15]===c?S=t[16]:(S=c?.center&&(0,a.jsx)(`div`,{className:`drawer-claim`,children:c.center}),t[15]=c,t[16]=S);let C;t[17]===S?C=t[18]:(C=(0,a.jsxs)(`div`,{className:`drawer-head`,children:[x,S]}),t[17]=S,t[18]=C);let w;t[19]===c?w=t[20]:(w=c&&(0,a.jsx)(r,{asBlock:!0,center:c.center,atoms:c.atoms,links:c.links,clusters:c.clusters,unsaid:c.unsaid}),t[19]=c,t[20]=w);let T;t[21]===w?T=t[22]:(T=(0,a.jsx)(`div`,{className:`drawer-body`,children:w}),t[21]=w,t[22]=T);let E;t[23]!==v||t[24]!==b||t[25]!==C||t[26]!==T||t[27]!==g||t[28]!==_?(E=(0,a.jsxs)(`aside`,{className:g,"aria-hidden":_,inert:v,children:[b,C,T]}),t[23]=v,t[24]=b,t[25]=C,t[26]=T,t[27]=g,t[28]=_,t[29]=E):E=t[29];let D;return t[30]!==E||t[31]!==h?(D=(0,a.jsxs)(a.Fragment,{children:[h,E]}),t[30]=E,t[31]=h,t[32]=D):D=t[32],D}export{o as MindMapViewerDrawer};
@@ -1 +1 @@
1
- import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-y8GL67bB.js";import{t as r}from"./useSpatialCanvas-DogK9457.js";import{t as i}from"./Presence-CzLJIeSD.js";var a=e(),o=n(),s=1e3,c=26;function l(e,t,n){let r=Array.from(e.keys()),i=t*2+c,a=n*2+c,o=168+Math.max(0,r.length-6)*10,s=o,l=o+n*.9;for(let t=0;t<400;t++){for(let t of r){let n=e.get(t),r=n.x-500,i=n.y-329,a=r/s,o=i/l,c=Math.hypot(a,o)||1;c<1&&(n.x=500+a/c*s,n.y=329+o/c*l)}let t=!1;for(let n=0;n<r.length;n++)for(let o=n+1;o<r.length;o++){let s=e.get(r[n]),c=e.get(r[o]),l=c.x-s.x,u=c.y-s.y;l===0&&u===0&&(l=n-o,u=o-n);let d=i-Math.abs(l),f=a-Math.abs(u);if(d>0&&f>0)if(t=!0,d<=f){let e=d/2*(l<0?-1:1);s.x-=e,c.x+=e}else{let e=f/2*(u<0?-1:1);s.y-=e,c.y+=e}}if(!t)break}}function u(e,t,n){let r=new Map,i=new Map,a=[],o=new Map(e.map(e=>[e.id,e])),s=new Set,c=[];for(let e of t??[]){let t=e.atomIds.map(e=>o.get(e)).filter(e=>!!e);t.length!==0&&(t.forEach(e=>s.add(e.id)),c.push({id:e.id,label:e.label,members:t}))}let u=e.filter(e=>!s.has(e.id));if(u.length&&c.push({id:`__rest`,members:u}),c.length===0)return{positions:r,centroidOf:i,labels:a};let d=c.length,f=d===1,p=f?0:Math.min(250,180+d*20);return c.forEach((e,t)=>{let o=t/d*2*Math.PI-Math.PI/2,s=f?500:500+p*Math.cos(o),c=f?329:329+p*Math.sin(o);e.label&&a.push({id:e.id,label:e.label,x:s,y:c});let l=e.members.length,u=f?Math.max(318,230+l*26):Math.min(220,110+l*16),m={x:s,y:c};e.members.forEach((e,a)=>{let o=n?.get(e.id);if(o)r.set(e.id,{x:o.x,y:o.y});else{let n=a/Math.max(1,l)*2*Math.PI-Math.PI/2+t*.4;r.set(e.id,{x:s+u*Math.cos(n),y:c+u*Math.sin(n)})}i.set(e.id,m)})}),l(r,150,78),{positions:r,centroidOf:i,labels:a}}var d=t(),f={person:`#2E9C8E`,option:`#5B63E8`,want:`#B07A2E`,fear:`#C9705E`,constraint:`#7A8194`,tradeoff:`#8B6FD4`,contradiction:`#C9705E`,open_loop:`#C98A1B`,action:`#5B63E8`,value:`#B07A2E`,question:`#C98A1B`},p={person:`Person`,option:`Option`,want:`Want`,fear:`Worry`,constraint:`Constraint`,tradeoff:`Tradeoff`,contradiction:`Contradiction`,open_loop:`Open loop`,action:`Action`,value:`Value`,question:`Question`};function m(e,t,n,r){let i=n-e,a=r-t,o=Math.hypot(i,a)||1,s=-a/o,c=i/o,l=(e+n)/2,u=(t+r)/2,d=l+s*52,f=u+c*52,p=.25*e+.5*d+.25*n+s*18,m=.25*t+.5*f+.25*r+c*18;return{d:`M ${e} ${t} Q ${d} ${f} ${n} ${r}`,lx:p,ly:m}}function h({atom:e,x:t,y:n,order:r,onRemove:i}){let[o,s]=(0,a.useState)(!1),c=f[e.kind]??`#7A8194`,l=e.status===`stable`;return(0,d.jsxs)(`div`,{className:`ms-card`,"data-status":e.status,"data-open":o?`true`:void 0,style:{left:`${t}px`,top:`${n}px`,"--ms-kind-color":c,"--ms-i":r},onClick:()=>l&&s(e=>!e),role:l?`button`:void 0,tabIndex:l?0:void 0,"aria-expanded":l?o:void 0,onKeyDown:e=>e.key===`Enter`&&l&&s(e=>!e),children:[i&&(0,d.jsx)(`button`,{type:`button`,className:`ms-card-remove`,"aria-label":`Remove “${e.label}”`,onClick:t=>{t.stopPropagation(),i(e.id)},children:`×`}),(0,d.jsxs)(`div`,{className:`ms-card-header`,children:[(0,d.jsx)(`span`,{className:`ms-kind-dot`,"aria-hidden":`true`}),(0,d.jsx)(`span`,{className:`ms-kind-label`,children:p[e.kind]})]}),(0,d.jsx)(`div`,{className:`ms-atom-label`,children:e.label}),l&&(0,d.jsxs)(`div`,{className:`ms-card-quote`,"aria-hidden":!o,children:[(0,d.jsx)(`span`,{className:`ms-you-said`,children:`you said · `}),e.quote]})]})}function g({unsaid:e,onConfirm:t,onDismiss:n}){let r=!!(t||n);return(0,d.jsxs)(`div`,{className:`ms-card ms-unsaid`,"data-status":`maybe`,"data-interactive":r?`true`:void 0,style:{left:`72%`,top:`88%`,"--ms-i":20},"aria-label":`Maybe: ${e.label}`,children:[(0,d.jsxs)(`div`,{className:`ms-card-header`,children:[(0,d.jsx)(`span`,{className:`ms-kind-dot`,style:{background:`var(--warning)`},"aria-hidden":`true`}),(0,d.jsx)(`span`,{className:`ms-kind-label`,style:{color:`var(--warning)`},children:`Maybe`})]}),(0,d.jsx)(`div`,{className:`ms-atom-label`,children:e.label}),(0,d.jsx)(`div`,{className:`ms-card-quote`,children:e.why}),r&&(0,d.jsxs)(`div`,{className:`ms-unsaid-actions`,children:[t&&(0,d.jsx)(`button`,{type:`button`,className:`ms-unsaid-btn ms-unsaid-confirm`,onClick:e=>{e.stopPropagation(),t()},children:`Yes, that's it`}),n&&(0,d.jsx)(`button`,{type:`button`,className:`ms-unsaid-btn ms-unsaid-dismiss`,onClick:e=>{e.stopPropagation(),n()},children:`Not this`})]})]})}function _(e){let t=(0,o.c)(4),{signal:n}=e,r;return t[0]!==n.content||t[1]!==n.id||t[2]!==n.kind?(r=(0,d.jsx)(`div`,{className:`ms-signal-chip`,"data-kind":n.kind,"aria-live":`polite`,children:n.content},n.id),t[0]=n.content,t[1]=n.id,t[2]=n.kind,t[3]=r):r=t[3],r}function v(e,t){let n=e.links.filter(e=>e.kind===`tensions`).length,r=e.atoms.filter(e=>e.kind===`question`).length,i=e.atoms.filter(e=>e.kind===`option`).length,a=e.atoms.length;return t&&n>0?n===1?`1 tension. ${t.a.label} vs ${t.b.label}.`:`${n} tensions. The real pull: ${t.a.label} vs ${t.b.label}.`:r>=3?`${r} open questions.`:i>=2?`${i} options. ${a} things on your mind.`:`${a} thought${a===1?``:`s`}. Here's what I heard.`}function y({center:e,atoms:t=[],links:n=[],clusters:o,unsaid:c,title:l,phase:p=`settled`,intent:y=`general`,isRevealing:b=!1,currentSignal:x,onAction:S,onRemoveAtom:C,onConfirmUnsaid:w,onDismissUnsaid:T,liveTranscript:E,thoughtCount:D,delay:O=0,asBlock:k=!0}){let A=(0,a.useRef)(new Map),j=(o??[]).map(e=>`${e.id}:${e.atomIds.join(`,`)}`).join(`|`),M=(0,a.useRef)(``),N=j===M.current?A.current:void 0,{positions:P,centroidOf:F,labels:I}=(0,a.useMemo)(()=>u(t,o,N),[t,o]);A.current=P,M.current=j;let L=r({clamp:{min:.12,max:1.05},margin:20}),{fitTo:R}=L,z=(0,a.useMemo)(()=>{let e=318,t=195.6;for(let n of P.values())e=Math.max(e,Math.abs(n.x-500)+150),t=Math.max(t,Math.abs(n.y-329)+78);return c&&(e=Math.max(e,Math.abs(.72*s-500)+150),t=Math.max(t,365)),e+=24,t+=24,{x:500-e,y:329-t,w:2*e,h:2*t}},[P,c]);(0,a.useEffect)(()=>{R(z)},[z,R]);let B=[...n].sort((e,t)=>(e.kind===`tensions`)-+(t.kind===`tensions`)),V=(0,a.useMemo)(()=>new Map(t.map(e=>[e.id,e])),[t]),H=(0,a.useMemo)(()=>{let e=n.filter(e=>e.kind===`tensions`&&!e.provisional&&e.label);if(e.length===0)return null;let t=e=>V.get(e)?.weight??1,r=e.map(e=>({l:e,w:t(e.from)+t(e.to)})).sort((e,t)=>t.w-e.w||(e.l.from+e.l.to).localeCompare(t.l.from+t.l.to))[0],i=V.get(r.l.from),a=V.get(r.l.to);return!i||!a?null:{a:i,b:a,label:r.l.label}},[n,V]),U=(0,a.useMemo)(()=>t.filter(e=>(e.kind===`open_loop`||e.kind===`action`||e.kind===`question`)&&e.quote&&e.status!==`maybe`).map(e=>({id:e.id,label:e.label,quote:e.quote})),[t]),[W,G]=(0,a.useState)(null),[K,q]=(0,a.useState)(()=>new Set),J=(0,a.useCallback)(e=>{q(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Y=(0,a.useRef)(!1),X=(0,a.useRef)(!1),Z=(0,a.useRef)(p===`settled`);(0,a.useEffect)(()=>{p===`settled`&&(y===`planning`&&!X.current?(X.current=!0,G(`plan`)):H&&!Y.current&&y!==`planning`&&(Y.current=!0,G(`tension`)));let e=Z.current;Z.current=p===`settled`,e&&p!==`settled`&&(Y.current=!1,X.current=!1,G(null))},[p,H,y]);let Q=p===`listening`?`listening`:p===`pausing`?`thinking`:`idle`,ee=p===`settled`?{decision:`THE DECISION`,planning:`THE PLAN`,exploration:`THE QUESTION`,processing:`WHAT'S GOING ON`,general:`WHAT I HEARD`}[y]??`WHAT I HEARD`:`WHAT I'M HEARING`,te={decision:`Help me decide`,planning:`Build this plan`,exploration:`Take me deeper`,processing:`Help me understand`,general:`Answer this`}[y]??`Answer this`,$=(0,d.jsxs)(`div`,{className:`ms-canvas`,ref:L.viewportRef,style:{"--ms-cam-scale":L.camera.scale},"data-phase":p,"data-revealing":b?`true`:void 0,"data-has-actions":S&&t.length>0?`true`:void 0,role:`region`,"aria-label":`Mindshape — the shape of your thought`,children:[(0,d.jsxs)(`div`,{className:`ms-world`,style:{transform:L.transform,"--ms-cam-scale":L.camera.scale},children:[I.map(e=>(0,d.jsx)(`div`,{className:`ms-cluster-label`,style:{left:`${e.x}px`,top:`${e.y}px`},"aria-hidden":`true`,children:e.label},e.id)),(0,d.jsxs)(`svg`,{className:`ms-svg`,viewBox:`0 0 ${s} 700`,"aria-hidden":`true`,children:[t.filter(e=>e.status===`stable`).map((e,t)=>{let n=P.get(e.id),r=F.get(e.id);return!n||!r?null:(0,d.jsx)(`path`,{className:`ms-spoke`,d:`M ${r.x} ${r.y} L ${n.x} ${n.y}`,pathLength:1,style:{"--ms-spoke-i":t}},`spoke-${e.id}`)}),B.map((e,t)=>{let n=P.get(e.from),r=P.get(e.to);if(!n||!r)return null;let i=e.kind===`tensions`,a=f[V.get(e.from)?.kind??`fear`],{d:o,lx:s,ly:c}=m(n.x,n.y,r.x,r.y),l=i&&H&&e.from===H.a.id&&e.to===H.b.id;return(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`path`,{className:i?`ms-thread`:`ms-link`,"data-kind":e.kind,"data-hero":l?`true`:void 0,d:o,pathLength:i?1:void 0,stroke:i?a:void 0,style:{animationDelay:`${.3+t*.12}s`}}),i&&e.label&&(0,d.jsx)(`text`,{className:`ms-thread-label`,x:s,y:c,textAnchor:`middle`,dominantBaseline:`middle`,children:e.label})]},`link-${e.from}-${e.to}-${e.kind}`)})]}),t.map((e,t)=>{let n=P.get(e.id);return n?(0,d.jsx)(h,{atom:e,x:n.x,y:n.y,order:t,onRemove:C},e.id):null}),c&&(0,d.jsx)(g,{unsaid:c,onConfirm:w,onDismiss:T})]}),(0,d.jsxs)(`div`,{className:`ms-center`,children:[x&&p!==`settled`&&(0,d.jsx)(_,{signal:x}),(0,d.jsx)(`div`,{className:`ms-center-pip-wrap`,children:(0,d.jsx)(i,{state:Q,emotion:`neutral`,gaze:`center`})}),(0,d.jsx)(`div`,{className:`ms-center-label`,"aria-hidden":`true`,children:ee}),e&&(0,d.jsx)(`div`,{className:`ms-center-question`,"aria-live":`polite`,children:e}),p===`settled`&&(t.length>0?(0,d.jsx)(`div`,{className:`ms-synthesis-line`,"aria-live":`polite`,children:v({atoms:t,links:n},H)}):(0,d.jsx)(`div`,{className:`ms-synthesis-line`,"aria-live":`polite`,children:`Didn't catch enough to map yet — keep talking and I'll shape it.`})),D!==void 0&&D>=0&&p!==`settled`&&(0,d.jsxs)(`div`,{className:`ms-thought-count`,"aria-live":`polite`,children:[(0,d.jsx)(`span`,{className:`ms-mic-dot`,"aria-hidden":`true`}),(()=>{let e=Math.max(D,t.length);return e===0?`Listening…`:`${e} thought${e===1?``:`s`}`})()]}),E&&(0,d.jsx)(`div`,{className:`ms-live-text`,"aria-live":`polite`,"aria-label":`Currently hearing`,children:E})]}),p===`settled`&&H&&W===`tension`&&(0,d.jsxs)(`div`,{className:`ms-tension-callout`,role:`dialog`,"aria-label":`The tension`,children:[(0,d.jsx)(`button`,{type:`button`,className:`ms-tension-close`,"aria-label":`Dismiss`,onClick:()=>G(null),children:`×`}),(0,d.jsx)(`span`,{className:`ms-tension-eyebrow`,children:`THE TENSION`}),(0,d.jsxs)(`p`,{className:`ms-tension-body`,children:[`You keep coming back to `,(0,d.jsxs)(`strong`,{children:[`“`,H.a.label,`.”`]}),` But you also said`,` `,(0,d.jsxs)(`strong`,{children:[`“`,H.b.label,`.”`]}),` Those may not be the same reason.`]}),S&&(0,d.jsx)(`button`,{type:`button`,className:`ms-tension-cta`,onClick:()=>S(`tell-apart`,{tension:{a:H.a.label,b:H.b.label}}),children:`Help me tell them apart →`})]}),W===`plan`&&(0,d.jsxs)(`div`,{className:`ms-plan`,role:`dialog`,"aria-label":`Turn into a plan`,children:[(0,d.jsxs)(`header`,{className:`ms-plan-head`,children:[(0,d.jsx)(`span`,{className:`ms-plan-title`,children:`The open loops, as steps you control`}),(0,d.jsx)(`button`,{type:`button`,className:`ms-tension-close`,"aria-label":`Close the plan`,onClick:()=>G(null),children:`×`})]}),U.length>0?(0,d.jsx)(`ol`,{className:`ms-plan-steps`,children:U.map(e=>{let t=K.has(e.id);return(0,d.jsxs)(`li`,{className:`ms-plan-step`,"data-done":t?`true`:void 0,children:[(0,d.jsx)(`button`,{type:`button`,className:`ms-plan-check`,role:`checkbox`,"aria-checked":t,"aria-label":`Mark “${e.label}” done`,onClick:()=>J(e.id),children:t&&(0,d.jsx)(`span`,{className:`ms-plan-check-mark`,"aria-hidden":`true`,children:`✓`})}),(0,d.jsxs)(`span`,{className:`ms-plan-step-body`,children:[(0,d.jsx)(`span`,{className:`ms-plan-step-label`,children:e.label}),(0,d.jsxs)(`span`,{className:`ms-plan-step-trace`,children:[`from “`,e.quote,`”`]})]})]},e.id)})}):(0,d.jsx)(`p`,{className:`ms-plan-empty`,children:`No open loops to turn into steps yet — keep talking and they’ll surface.`}),(0,d.jsxs)(`footer`,{className:`ms-plan-foot`,children:[(0,d.jsx)(`span`,{className:`ms-plan-note`,children:`Every step traces back to something you said — nothing invented.`}),S&&U.length>0&&(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn ms-action-primary`,onClick:()=>S(`commit-plan`),children:`Make it real →`})]})]}),p===`settled`&&W===`kept`&&(0,d.jsxs)(`div`,{className:`ms-kept`,role:`dialog`,"aria-label":`Kept this shape`,children:[(0,d.jsx)(`button`,{type:`button`,className:`ms-tension-close`,"aria-label":`Close`,onClick:()=>G(null),children:`×`}),(0,d.jsx)(`span`,{className:`ms-kept-eyebrow`,children:`KEPT THIS SHAPE`}),(0,d.jsx)(`p`,{className:`ms-kept-body`,children:`This is the shape of what you were thinking. It’s yours to revisit.`}),S&&(0,d.jsxs)(`div`,{className:`ms-kept-actions`,children:[(0,d.jsx)(`button`,{type:`button`,className:`ms-kept-btn`,onClick:()=>S(`answer`),children:`↻ Replay`}),(0,d.jsx)(`button`,{type:`button`,className:`ms-kept-btn`,onClick:()=>S(`share`),children:`↗ Share`}),(0,d.jsx)(`button`,{type:`button`,className:`ms-kept-btn`,onClick:()=>S(`present`),children:`▶ Present mode`})]}),(0,d.jsx)(`span`,{className:`ms-kept-memory`,children:`Nothing was saved to memory — Mavéa asks first before keeping anything personal.`})]}),S&&t.length>0&&(0,d.jsxs)(`div`,{className:`ms-actions`,role:`group`,"aria-label":`What to do with this map`,children:[(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn ms-action-primary`,onClick:()=>S(`answer`),children:te}),(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn`+(W===`plan`?` is-active`:``),"aria-pressed":W===`plan`,onClick:()=>G(e=>e===`plan`?null:`plan`),children:`Turn into a plan`}),p===`settled`&&(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn`+(W===`kept`?` is-active`:``),"aria-pressed":W===`kept`,onClick:()=>G(e=>e===`kept`?null:`kept`),children:`That’s it`}),p===`settled`&&(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn`,onClick:()=>S(`add-more`),children:`Add more`}),(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn`,onClick:()=>S(`not-quite`),children:`Not quite`})]})]});return k?(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":`${O}ms`},children:[l&&(0,d.jsx)(`div`,{className:`card-eyebrow`,children:l}),$]}):$}export{y as t};
1
+ import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-BlCH2LG4.js";import{t as r}from"./useSpatialCanvas-DZhSpnC6.js";import{t as i}from"./Presence-DZC81_y4.js";var a=e(),o=n(),s=1e3,c=26;function l(e,t,n){let r=Array.from(e.keys()),i=t*2+c,a=n*2+c,o=168+Math.max(0,r.length-6)*10,s=o,l=o+n*.9;for(let t=0;t<400;t++){for(let t of r){let n=e.get(t),r=n.x-500,i=n.y-329,a=r/s,o=i/l,c=Math.hypot(a,o)||1;c<1&&(n.x=500+a/c*s,n.y=329+o/c*l)}let t=!1;for(let n=0;n<r.length;n++)for(let o=n+1;o<r.length;o++){let s=e.get(r[n]),c=e.get(r[o]),l=c.x-s.x,u=c.y-s.y;l===0&&u===0&&(l=n-o,u=o-n);let d=i-Math.abs(l),f=a-Math.abs(u);if(d>0&&f>0)if(t=!0,d<=f){let e=d/2*(l<0?-1:1);s.x-=e,c.x+=e}else{let e=f/2*(u<0?-1:1);s.y-=e,c.y+=e}}if(!t)break}}function u(e,t,n){let r=new Map,i=new Map,a=[],o=new Map(e.map(e=>[e.id,e])),s=new Set,c=[];for(let e of t??[]){let t=e.atomIds.map(e=>o.get(e)).filter(e=>!!e);t.length!==0&&(t.forEach(e=>s.add(e.id)),c.push({id:e.id,label:e.label,members:t}))}let u=e.filter(e=>!s.has(e.id));if(u.length&&c.push({id:`__rest`,members:u}),c.length===0)return{positions:r,centroidOf:i,labels:a};let d=c.length,f=d===1,p=f?0:Math.min(250,180+d*20);return c.forEach((e,t)=>{let o=t/d*2*Math.PI-Math.PI/2,s=f?500:500+p*Math.cos(o),c=f?329:329+p*Math.sin(o);e.label&&a.push({id:e.id,label:e.label,x:s,y:c});let l=e.members.length,u=f?Math.max(318,230+l*26):Math.min(220,110+l*16),m={x:s,y:c};e.members.forEach((e,a)=>{let o=n?.get(e.id);if(o)r.set(e.id,{x:o.x,y:o.y});else{let n=a/Math.max(1,l)*2*Math.PI-Math.PI/2+t*.4;r.set(e.id,{x:s+u*Math.cos(n),y:c+u*Math.sin(n)})}i.set(e.id,m)})}),l(r,150,78),{positions:r,centroidOf:i,labels:a}}var d=t(),f={person:`#2E9C8E`,option:`#5B63E8`,want:`#B07A2E`,fear:`#C9705E`,constraint:`#7A8194`,tradeoff:`#8B6FD4`,contradiction:`#C9705E`,open_loop:`#C98A1B`,action:`#5B63E8`,value:`#B07A2E`,question:`#C98A1B`},p={person:`Person`,option:`Option`,want:`Want`,fear:`Worry`,constraint:`Constraint`,tradeoff:`Tradeoff`,contradiction:`Contradiction`,open_loop:`Open loop`,action:`Action`,value:`Value`,question:`Question`};function m(e,t,n,r){let i=n-e,a=r-t,o=Math.hypot(i,a)||1,s=-a/o,c=i/o,l=(e+n)/2,u=(t+r)/2,d=l+s*52,f=u+c*52,p=.25*e+.5*d+.25*n+s*18,m=.25*t+.5*f+.25*r+c*18;return{d:`M ${e} ${t} Q ${d} ${f} ${n} ${r}`,lx:p,ly:m}}function h({atom:e,x:t,y:n,order:r,onRemove:i}){let[o,s]=(0,a.useState)(!1),c=f[e.kind]??`#7A8194`,l=e.status===`stable`;return(0,d.jsxs)(`div`,{className:`ms-card`,"data-status":e.status,"data-open":o?`true`:void 0,style:{left:`${t}px`,top:`${n}px`,"--ms-kind-color":c,"--ms-i":r},onClick:()=>l&&s(e=>!e),role:l?`button`:void 0,tabIndex:l?0:void 0,"aria-expanded":l?o:void 0,onKeyDown:e=>e.key===`Enter`&&l&&s(e=>!e),children:[i&&(0,d.jsx)(`button`,{type:`button`,className:`ms-card-remove`,"aria-label":`Remove “${e.label}”`,onClick:t=>{t.stopPropagation(),i(e.id)},children:`×`}),(0,d.jsxs)(`div`,{className:`ms-card-header`,children:[(0,d.jsx)(`span`,{className:`ms-kind-dot`,"aria-hidden":`true`}),(0,d.jsx)(`span`,{className:`ms-kind-label`,children:p[e.kind]})]}),(0,d.jsx)(`div`,{className:`ms-atom-label`,children:e.label}),l&&(0,d.jsxs)(`div`,{className:`ms-card-quote`,"aria-hidden":!o,children:[(0,d.jsx)(`span`,{className:`ms-you-said`,children:`you said · `}),e.quote]})]})}function g({unsaid:e,onConfirm:t,onDismiss:n}){let r=!!(t||n);return(0,d.jsxs)(`div`,{className:`ms-card ms-unsaid`,"data-status":`maybe`,"data-interactive":r?`true`:void 0,style:{left:`72%`,top:`88%`,"--ms-i":20},"aria-label":`Maybe: ${e.label}`,children:[(0,d.jsxs)(`div`,{className:`ms-card-header`,children:[(0,d.jsx)(`span`,{className:`ms-kind-dot`,style:{background:`var(--warning)`},"aria-hidden":`true`}),(0,d.jsx)(`span`,{className:`ms-kind-label`,style:{color:`var(--warning)`},children:`Maybe`})]}),(0,d.jsx)(`div`,{className:`ms-atom-label`,children:e.label}),(0,d.jsx)(`div`,{className:`ms-card-quote`,children:e.why}),r&&(0,d.jsxs)(`div`,{className:`ms-unsaid-actions`,children:[t&&(0,d.jsx)(`button`,{type:`button`,className:`ms-unsaid-btn ms-unsaid-confirm`,onClick:e=>{e.stopPropagation(),t()},children:`Yes, that's it`}),n&&(0,d.jsx)(`button`,{type:`button`,className:`ms-unsaid-btn ms-unsaid-dismiss`,onClick:e=>{e.stopPropagation(),n()},children:`Not this`})]})]})}function _(e){let t=(0,o.c)(4),{signal:n}=e,r;return t[0]!==n.content||t[1]!==n.id||t[2]!==n.kind?(r=(0,d.jsx)(`div`,{className:`ms-signal-chip`,"data-kind":n.kind,"aria-live":`polite`,children:n.content},n.id),t[0]=n.content,t[1]=n.id,t[2]=n.kind,t[3]=r):r=t[3],r}function v(e,t){let n=e.links.filter(e=>e.kind===`tensions`).length,r=e.atoms.filter(e=>e.kind===`question`).length,i=e.atoms.filter(e=>e.kind===`option`).length,a=e.atoms.length;return t&&n>0?n===1?`1 tension. ${t.a.label} vs ${t.b.label}.`:`${n} tensions. The real pull: ${t.a.label} vs ${t.b.label}.`:r>=3?`${r} open questions.`:i>=2?`${i} options. ${a} things on your mind.`:`${a} thought${a===1?``:`s`}. Here's what I heard.`}function y({center:e,atoms:t=[],links:n=[],clusters:o,unsaid:c,title:l,phase:p=`settled`,intent:y=`general`,isRevealing:b=!1,currentSignal:x,onAction:S,onRemoveAtom:C,onConfirmUnsaid:w,onDismissUnsaid:T,liveTranscript:E,thoughtCount:D,delay:O=0,asBlock:k=!0}){let A=(0,a.useRef)(new Map),j=(o??[]).map(e=>`${e.id}:${e.atomIds.join(`,`)}`).join(`|`),M=(0,a.useRef)(``),N=j===M.current?A.current:void 0,{positions:P,centroidOf:F,labels:I}=(0,a.useMemo)(()=>u(t,o,N),[t,o]);A.current=P,M.current=j;let L=r({clamp:{min:.12,max:1.05},margin:20}),{fitTo:R}=L,z=(0,a.useMemo)(()=>{let e=318,t=195.6;for(let n of P.values())e=Math.max(e,Math.abs(n.x-500)+150),t=Math.max(t,Math.abs(n.y-329)+78);return c&&(e=Math.max(e,Math.abs(.72*s-500)+150),t=Math.max(t,365)),e+=24,t+=24,{x:500-e,y:329-t,w:2*e,h:2*t}},[P,c]);(0,a.useEffect)(()=>{R(z)},[z,R]);let B=[...n].sort((e,t)=>(e.kind===`tensions`)-+(t.kind===`tensions`)),V=(0,a.useMemo)(()=>new Map(t.map(e=>[e.id,e])),[t]),H=(0,a.useMemo)(()=>{let e=n.filter(e=>e.kind===`tensions`&&!e.provisional&&e.label);if(e.length===0)return null;let t=e=>V.get(e)?.weight??1,r=e.map(e=>({l:e,w:t(e.from)+t(e.to)})).sort((e,t)=>t.w-e.w||(e.l.from+e.l.to).localeCompare(t.l.from+t.l.to))[0],i=V.get(r.l.from),a=V.get(r.l.to);return!i||!a?null:{a:i,b:a,label:r.l.label}},[n,V]),U=(0,a.useMemo)(()=>t.filter(e=>(e.kind===`open_loop`||e.kind===`action`||e.kind===`question`)&&e.quote&&e.status!==`maybe`).map(e=>({id:e.id,label:e.label,quote:e.quote})),[t]),[W,G]=(0,a.useState)(null),[K,q]=(0,a.useState)(()=>new Set),J=(0,a.useCallback)(e=>{q(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Y=(0,a.useRef)(!1),X=(0,a.useRef)(!1),Z=(0,a.useRef)(p===`settled`);(0,a.useEffect)(()=>{p===`settled`&&(y===`planning`&&!X.current?(X.current=!0,G(`plan`)):H&&!Y.current&&y!==`planning`&&(Y.current=!0,G(`tension`)));let e=Z.current;Z.current=p===`settled`,e&&p!==`settled`&&(Y.current=!1,X.current=!1,G(null))},[p,H,y]);let Q=p===`listening`?`listening`:p===`pausing`?`thinking`:`idle`,ee=p===`settled`?{decision:`THE DECISION`,planning:`THE PLAN`,exploration:`THE QUESTION`,processing:`WHAT'S GOING ON`,general:`WHAT I HEARD`}[y]??`WHAT I HEARD`:`WHAT I'M HEARING`,te={decision:`Help me decide`,planning:`Build this plan`,exploration:`Take me deeper`,processing:`Help me understand`,general:`Answer this`}[y]??`Answer this`,$=(0,d.jsxs)(`div`,{className:`ms-canvas`,ref:L.viewportRef,style:{"--ms-cam-scale":L.camera.scale},"data-phase":p,"data-revealing":b?`true`:void 0,"data-has-actions":S&&t.length>0?`true`:void 0,role:`region`,"aria-label":`Mindshape — the shape of your thought`,children:[(0,d.jsxs)(`div`,{className:`ms-world`,style:{transform:L.transform,"--ms-cam-scale":L.camera.scale},children:[I.map(e=>(0,d.jsx)(`div`,{className:`ms-cluster-label`,style:{left:`${e.x}px`,top:`${e.y}px`},"aria-hidden":`true`,children:e.label},e.id)),(0,d.jsxs)(`svg`,{className:`ms-svg`,viewBox:`0 0 ${s} 700`,"aria-hidden":`true`,children:[t.filter(e=>e.status===`stable`).map((e,t)=>{let n=P.get(e.id),r=F.get(e.id);return!n||!r?null:(0,d.jsx)(`path`,{className:`ms-spoke`,d:`M ${r.x} ${r.y} L ${n.x} ${n.y}`,pathLength:1,style:{"--ms-spoke-i":t}},`spoke-${e.id}`)}),B.map((e,t)=>{let n=P.get(e.from),r=P.get(e.to);if(!n||!r)return null;let i=e.kind===`tensions`,a=f[V.get(e.from)?.kind??`fear`],{d:o,lx:s,ly:c}=m(n.x,n.y,r.x,r.y),l=i&&H&&e.from===H.a.id&&e.to===H.b.id;return(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`path`,{className:i?`ms-thread`:`ms-link`,"data-kind":e.kind,"data-hero":l?`true`:void 0,d:o,pathLength:i?1:void 0,stroke:i?a:void 0,style:{animationDelay:`${.3+t*.12}s`}}),i&&e.label&&(0,d.jsx)(`text`,{className:`ms-thread-label`,x:s,y:c,textAnchor:`middle`,dominantBaseline:`middle`,children:e.label})]},`link-${e.from}-${e.to}-${e.kind}`)})]}),t.map((e,t)=>{let n=P.get(e.id);return n?(0,d.jsx)(h,{atom:e,x:n.x,y:n.y,order:t,onRemove:C},e.id):null}),c&&(0,d.jsx)(g,{unsaid:c,onConfirm:w,onDismiss:T})]}),(0,d.jsxs)(`div`,{className:`ms-center`,children:[x&&p!==`settled`&&(0,d.jsx)(_,{signal:x}),(0,d.jsx)(`div`,{className:`ms-center-pip-wrap`,children:(0,d.jsx)(i,{state:Q,emotion:`neutral`,gaze:`center`})}),(0,d.jsx)(`div`,{className:`ms-center-label`,"aria-hidden":`true`,children:ee}),e&&(0,d.jsx)(`div`,{className:`ms-center-question`,"aria-live":`polite`,children:e}),p===`settled`&&(t.length>0?(0,d.jsx)(`div`,{className:`ms-synthesis-line`,"aria-live":`polite`,children:v({atoms:t,links:n},H)}):(0,d.jsx)(`div`,{className:`ms-synthesis-line`,"aria-live":`polite`,children:`Didn't catch enough to map yet — keep talking and I'll shape it.`})),D!==void 0&&D>=0&&p!==`settled`&&(0,d.jsxs)(`div`,{className:`ms-thought-count`,"aria-live":`polite`,children:[(0,d.jsx)(`span`,{className:`ms-mic-dot`,"aria-hidden":`true`}),(()=>{let e=Math.max(D,t.length);return e===0?`Listening…`:`${e} thought${e===1?``:`s`}`})()]}),E&&(0,d.jsx)(`div`,{className:`ms-live-text`,"aria-live":`polite`,"aria-label":`Currently hearing`,children:E})]}),p===`settled`&&H&&W===`tension`&&(0,d.jsxs)(`div`,{className:`ms-tension-callout`,role:`dialog`,"aria-label":`The tension`,children:[(0,d.jsx)(`button`,{type:`button`,className:`ms-tension-close`,"aria-label":`Dismiss`,onClick:()=>G(null),children:`×`}),(0,d.jsx)(`span`,{className:`ms-tension-eyebrow`,children:`THE TENSION`}),(0,d.jsxs)(`p`,{className:`ms-tension-body`,children:[`You keep coming back to `,(0,d.jsxs)(`strong`,{children:[`“`,H.a.label,`.”`]}),` But you also said`,` `,(0,d.jsxs)(`strong`,{children:[`“`,H.b.label,`.”`]}),` Those may not be the same reason.`]}),S&&(0,d.jsx)(`button`,{type:`button`,className:`ms-tension-cta`,onClick:()=>S(`tell-apart`,{tension:{a:H.a.label,b:H.b.label}}),children:`Help me tell them apart →`})]}),W===`plan`&&(0,d.jsxs)(`div`,{className:`ms-plan`,role:`dialog`,"aria-label":`Turn into a plan`,children:[(0,d.jsxs)(`header`,{className:`ms-plan-head`,children:[(0,d.jsx)(`span`,{className:`ms-plan-title`,children:`The open loops, as steps you control`}),(0,d.jsx)(`button`,{type:`button`,className:`ms-tension-close`,"aria-label":`Close the plan`,onClick:()=>G(null),children:`×`})]}),U.length>0?(0,d.jsx)(`ol`,{className:`ms-plan-steps`,children:U.map(e=>{let t=K.has(e.id);return(0,d.jsxs)(`li`,{className:`ms-plan-step`,"data-done":t?`true`:void 0,children:[(0,d.jsx)(`button`,{type:`button`,className:`ms-plan-check`,role:`checkbox`,"aria-checked":t,"aria-label":`Mark “${e.label}” done`,onClick:()=>J(e.id),children:t&&(0,d.jsx)(`span`,{className:`ms-plan-check-mark`,"aria-hidden":`true`,children:`✓`})}),(0,d.jsxs)(`span`,{className:`ms-plan-step-body`,children:[(0,d.jsx)(`span`,{className:`ms-plan-step-label`,children:e.label}),(0,d.jsxs)(`span`,{className:`ms-plan-step-trace`,children:[`from “`,e.quote,`”`]})]})]},e.id)})}):(0,d.jsx)(`p`,{className:`ms-plan-empty`,children:`No open loops to turn into steps yet — keep talking and they’ll surface.`}),(0,d.jsxs)(`footer`,{className:`ms-plan-foot`,children:[(0,d.jsx)(`span`,{className:`ms-plan-note`,children:`Every step traces back to something you said — nothing invented.`}),S&&U.length>0&&(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn ms-action-primary`,onClick:()=>S(`commit-plan`),children:`Make it real →`})]})]}),p===`settled`&&W===`kept`&&(0,d.jsxs)(`div`,{className:`ms-kept`,role:`dialog`,"aria-label":`Kept this shape`,children:[(0,d.jsx)(`button`,{type:`button`,className:`ms-tension-close`,"aria-label":`Close`,onClick:()=>G(null),children:`×`}),(0,d.jsx)(`span`,{className:`ms-kept-eyebrow`,children:`KEPT THIS SHAPE`}),(0,d.jsx)(`p`,{className:`ms-kept-body`,children:`This is the shape of what you were thinking. It’s yours to revisit.`}),S&&(0,d.jsxs)(`div`,{className:`ms-kept-actions`,children:[(0,d.jsx)(`button`,{type:`button`,className:`ms-kept-btn`,onClick:()=>S(`answer`),children:`↻ Replay`}),(0,d.jsx)(`button`,{type:`button`,className:`ms-kept-btn`,onClick:()=>S(`share`),children:`↗ Share`}),(0,d.jsx)(`button`,{type:`button`,className:`ms-kept-btn`,onClick:()=>S(`present`),children:`▶ Present mode`})]}),(0,d.jsx)(`span`,{className:`ms-kept-memory`,children:`Nothing was saved to memory — Mavéa asks first before keeping anything personal.`})]}),S&&t.length>0&&(0,d.jsxs)(`div`,{className:`ms-actions`,role:`group`,"aria-label":`What to do with this map`,children:[(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn ms-action-primary`,onClick:()=>S(`answer`),children:te}),(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn`+(W===`plan`?` is-active`:``),"aria-pressed":W===`plan`,onClick:()=>G(e=>e===`plan`?null:`plan`),children:`Turn into a plan`}),p===`settled`&&(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn`+(W===`kept`?` is-active`:``),"aria-pressed":W===`kept`,onClick:()=>G(e=>e===`kept`?null:`kept`),children:`That’s it`}),p===`settled`&&(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn`,onClick:()=>S(`add-more`),children:`Add more`}),(0,d.jsx)(`button`,{type:`button`,className:`ms-action-btn`,onClick:()=>S(`not-quite`),children:`Not quite`})]})]});return k?(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":`${O}ms`},children:[l&&(0,d.jsx)(`div`,{className:`card-eyebrow`,children:l}),$]}):$}export{y as t};
@@ -1 +1 @@
1
- import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-y8GL67bB.js";import{n as r}from"./icons-CHVz6kv_.js";import{t as i}from"./useFocusTrap-DbfG6zbM.js";import{n as a}from"./blockLabel-DAqaHKy3.js";import{S as o,V as s}from"./useStudy-Bflreq2a.js";import{l as c,n as l}from"./useLiveConfig-X9Wxh90k.js";import{r as u}from"./format-hc2QOoIu.js";import{t as d}from"./pin-CXSuPJYL.js";var f=n(),p=e(),m=t(),h=[{v:`15min`,label:`15M`},{v:`hourly`,label:`1H`},{v:`6h`,label:`6H`},{v:`daily`,label:`DAILY`},{v:`manual`,label:`MANUAL`}],g={"15min":{text:`15 MIN`,tone:`fast`},hourly:{text:`HOURLY`,tone:`steady`},"6h":{text:`6 HOURS`,tone:`steady`},daily:{text:`DAILY`,tone:`calm`},manual:{text:`MANUAL`,tone:`calm`}};function _(e){let t=(0,f.c)(43),{block:n,conversationTitle:o,question:_,onClose:y,onAdded:b}=e,[x]=(0,p.useState)(v),S;t[0]===n?S=t[1]:(S=a(n),t[0]=n,t[1]=S);let C=S,[w,T]=(0,p.useState)(x.length===0),E;t[2]!==o||t[3]!==C||t[4]!==_?(E=()=>u(_?.trim()||o||C),t[2]=o,t[3]=C,t[4]=_,t[5]=E):E=t[5];let[D,O]=(0,p.useState)(E),[k,A]=(0,p.useState)(`manual`),j=(0,p.useRef)(null),M;t[6]===y?M=t[7]:(M={onEscape:y},t[6]=y,t[7]=M),i(j,M);let N=(0,p.useRef)(null),P,F;t[8]===w?(P=t[9],F=t[10]):(P=()=>{w?N.current?.focus():j.current?.querySelector(`.pin-row`)?.focus()},F=[w],t[8]=w,t[9]=P,t[10]=F),(0,p.useEffect)(P,F);let I;t[11]!==n||t[12]!==b||t[13]!==y||t[14]!==_?(I=e=>{let t=d({block:n,question:_,target:e});t&&b?.(t.dashboardId,t.title),y()},t[11]=n,t[12]=b,t[13]=y,t[14]=_,t[15]=I):I=t[15];let L=I,R=s(k),z;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(z=c(l()),t[16]=z):z=t[16];let B=!!z.apiKey,V;t[17]===y?V=t[18]:(V=e=>{e.target===e.currentTarget&&y()},t[17]=y,t[18]=V);let H;t[19]===y?H=t[20]:(H=e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),y())},t[19]=y,t[20]=H);let U=w?`New dashboard`:`Add to dashboard`,W;t[21]===U?W=t[22]:(W=(0,m.jsx)(`span`,{className:`pin-eyebrow`,children:U}),t[21]=U,t[22]=W);let G;t[23]===C?G=t[24]:(G=(0,m.jsx)(`span`,{className:`pin-subject`,children:C}),t[23]=C,t[24]=G);let K;t[25]!==W||t[26]!==G?(K=(0,m.jsxs)(`div`,{className:`pin-head`,children:[W,G]}),t[25]=W,t[26]=G,t[27]=K):K=t[27];let q;t[28]!==k||t[29]!==x||t[30]!==C||t[31]!==D||t[32]!==w||t[33]!==L||t[34]!==R?(q=w?(0,m.jsxs)(`form`,{className:`pin-new-step`,onSubmit:e=>{e.preventDefault(),L({new:{title:D.trim()||C,cadence:k}})},children:[(0,m.jsxs)(`label`,{className:`pin-name-field`,children:[(0,m.jsx)(`span`,{className:`pin-plan-label`,children:`Name`}),(0,m.jsx)(`input`,{ref:N,className:`pin-name-input`,value:D,onChange:e=>O(e.target.value),"aria-label":`Dashboard name`})]}),(0,m.jsxs)(`div`,{className:`pin-plan-cadence`,children:[(0,m.jsx)(`span`,{className:`pin-plan-label`,children:`Check cadence`}),(0,m.jsx)(`div`,{className:`pin-cadence-seg`,role:`group`,"aria-label":`Check cadence`,children:h.map(e=>(0,m.jsx)(`button`,{type:`button`,className:`pin-cadence-opt`+(e.v===k?` is-active`:``),"aria-pressed":e.v===k,onClick:()=>A(e.v),children:e.label},e.v))}),(0,m.jsx)(`p`,{className:`pin-plan-estimate`,children:R>0?B?`≈ ${R} searches/mo on your key, at this cadence.`:`≈ ${R} searches/mo once a key is connected in Live — parked until then.`:`No standing searches — this refreshes only when you ask.`})]}),(0,m.jsxs)(`div`,{className:`pin-plan-actions`,children:[x.length>0?(0,m.jsx)(`button`,{type:`button`,className:`pin-secondary`,onClick:()=>T(!1),children:`← Back`}):(0,m.jsx)(`span`,{}),(0,m.jsx)(`button`,{type:`submit`,className:`pin-plan-confirm`,children:`Create · first check queued`})]})]}):(0,m.jsxs)(`div`,{className:`pin-list`,role:`menu`,children:[(0,m.jsxs)(`button`,{type:`button`,className:`pin-row pin-new`,role:`menuitem`,onClick:()=>T(!0),children:[(0,m.jsx)(`span`,{className:`pin-row-ic`,children:(0,m.jsx)(r.plus,{})}),(0,m.jsxs)(`span`,{className:`pin-row-text`,children:[(0,m.jsx)(`span`,{className:`pin-row-title`,children:`New dashboard`}),(0,m.jsx)(`span`,{className:`pin-row-sub`,children:`Start one with this card`})]})]}),x.map(e=>{let t=g[e.cadence.data];return(0,m.jsxs)(`button`,{type:`button`,className:`pin-row`,role:`menuitem`,onClick:()=>L(e.id),children:[(0,m.jsx)(`span`,{className:`pin-row-ic`,children:(0,m.jsx)(r.table,{})}),(0,m.jsxs)(`span`,{className:`pin-row-text`,children:[(0,m.jsx)(`span`,{className:`pin-row-title`,children:u(e.title)}),(0,m.jsxs)(`span`,{className:`pin-row-sub`,children:[e.widgets.length,` `,e.widgets.length===1?`card`:`cards`]})]}),(0,m.jsx)(`span`,{className:`pin-row-cad pin-row-cad--${t.tone}`,children:t.text})]},e.id)})]}),t[28]=k,t[29]=x,t[30]=C,t[31]=D,t[32]=w,t[33]=L,t[34]=R,t[35]=q):q=t[35];let J;t[36]!==K||t[37]!==q?(J=(0,m.jsxs)(`div`,{className:`pin-sheet`,ref:j,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":`Add to a dashboard`,children:[K,q]}),t[36]=K,t[37]=q,t[38]=J):J=t[38];let Y;return t[39]!==J||t[40]!==V||t[41]!==H?(Y=(0,m.jsx)(`div`,{className:`pin-scrim`,onClick:V,role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:H,children:J}),t[39]=J,t[40]=V,t[41]=H,t[42]=Y):Y=t[42],Y}function v(){return o()}export{_ as PinToDashboard};
1
+ import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-BlCH2LG4.js";import{n as r}from"./icons-CHVz6kv_.js";import{t as i}from"./useFocusTrap-DbfG6zbM.js";import{n as a}from"./blockLabel-DAqaHKy3.js";import{S as o,V as s}from"./useStudy-Dh598Dw8.js";import{l as c,n as l}from"./useLiveConfig-BhFHwoy3.js";import{r as u}from"./format-hc2QOoIu.js";import{t as d}from"./pin-zUYIWzGr.js";var f=n(),p=e(),m=t(),h=[{v:`15min`,label:`15M`},{v:`hourly`,label:`1H`},{v:`6h`,label:`6H`},{v:`daily`,label:`DAILY`},{v:`manual`,label:`MANUAL`}],g={"15min":{text:`15 MIN`,tone:`fast`},hourly:{text:`HOURLY`,tone:`steady`},"6h":{text:`6 HOURS`,tone:`steady`},daily:{text:`DAILY`,tone:`calm`},manual:{text:`MANUAL`,tone:`calm`}};function _(e){let t=(0,f.c)(43),{block:n,conversationTitle:o,question:_,onClose:y,onAdded:b}=e,[x]=(0,p.useState)(v),S;t[0]===n?S=t[1]:(S=a(n),t[0]=n,t[1]=S);let C=S,[w,T]=(0,p.useState)(x.length===0),E;t[2]!==o||t[3]!==C||t[4]!==_?(E=()=>u(_?.trim()||o||C),t[2]=o,t[3]=C,t[4]=_,t[5]=E):E=t[5];let[D,O]=(0,p.useState)(E),[k,A]=(0,p.useState)(`manual`),j=(0,p.useRef)(null),M;t[6]===y?M=t[7]:(M={onEscape:y},t[6]=y,t[7]=M),i(j,M);let N=(0,p.useRef)(null),P,F;t[8]===w?(P=t[9],F=t[10]):(P=()=>{w?N.current?.focus():j.current?.querySelector(`.pin-row`)?.focus()},F=[w],t[8]=w,t[9]=P,t[10]=F),(0,p.useEffect)(P,F);let I;t[11]!==n||t[12]!==b||t[13]!==y||t[14]!==_?(I=e=>{let t=d({block:n,question:_,target:e});t&&b?.(t.dashboardId,t.title),y()},t[11]=n,t[12]=b,t[13]=y,t[14]=_,t[15]=I):I=t[15];let L=I,R=s(k),z;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(z=c(l()),t[16]=z):z=t[16];let B=!!z.apiKey,V;t[17]===y?V=t[18]:(V=e=>{e.target===e.currentTarget&&y()},t[17]=y,t[18]=V);let H;t[19]===y?H=t[20]:(H=e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),y())},t[19]=y,t[20]=H);let U=w?`New dashboard`:`Add to dashboard`,W;t[21]===U?W=t[22]:(W=(0,m.jsx)(`span`,{className:`pin-eyebrow`,children:U}),t[21]=U,t[22]=W);let G;t[23]===C?G=t[24]:(G=(0,m.jsx)(`span`,{className:`pin-subject`,children:C}),t[23]=C,t[24]=G);let K;t[25]!==W||t[26]!==G?(K=(0,m.jsxs)(`div`,{className:`pin-head`,children:[W,G]}),t[25]=W,t[26]=G,t[27]=K):K=t[27];let q;t[28]!==k||t[29]!==x||t[30]!==C||t[31]!==D||t[32]!==w||t[33]!==L||t[34]!==R?(q=w?(0,m.jsxs)(`form`,{className:`pin-new-step`,onSubmit:e=>{e.preventDefault(),L({new:{title:D.trim()||C,cadence:k}})},children:[(0,m.jsxs)(`label`,{className:`pin-name-field`,children:[(0,m.jsx)(`span`,{className:`pin-plan-label`,children:`Name`}),(0,m.jsx)(`input`,{ref:N,className:`pin-name-input`,value:D,onChange:e=>O(e.target.value),"aria-label":`Dashboard name`})]}),(0,m.jsxs)(`div`,{className:`pin-plan-cadence`,children:[(0,m.jsx)(`span`,{className:`pin-plan-label`,children:`Check cadence`}),(0,m.jsx)(`div`,{className:`pin-cadence-seg`,role:`group`,"aria-label":`Check cadence`,children:h.map(e=>(0,m.jsx)(`button`,{type:`button`,className:`pin-cadence-opt`+(e.v===k?` is-active`:``),"aria-pressed":e.v===k,onClick:()=>A(e.v),children:e.label},e.v))}),(0,m.jsx)(`p`,{className:`pin-plan-estimate`,children:R>0?B?`≈ ${R} searches/mo on your key, at this cadence.`:`≈ ${R} searches/mo once a key is connected in Live — parked until then.`:`No standing searches — this refreshes only when you ask.`})]}),(0,m.jsxs)(`div`,{className:`pin-plan-actions`,children:[x.length>0?(0,m.jsx)(`button`,{type:`button`,className:`pin-secondary`,onClick:()=>T(!1),children:`← Back`}):(0,m.jsx)(`span`,{}),(0,m.jsx)(`button`,{type:`submit`,className:`pin-plan-confirm`,children:`Create · first check queued`})]})]}):(0,m.jsxs)(`div`,{className:`pin-list`,role:`menu`,children:[(0,m.jsxs)(`button`,{type:`button`,className:`pin-row pin-new`,role:`menuitem`,onClick:()=>T(!0),children:[(0,m.jsx)(`span`,{className:`pin-row-ic`,children:(0,m.jsx)(r.plus,{})}),(0,m.jsxs)(`span`,{className:`pin-row-text`,children:[(0,m.jsx)(`span`,{className:`pin-row-title`,children:`New dashboard`}),(0,m.jsx)(`span`,{className:`pin-row-sub`,children:`Start one with this card`})]})]}),x.map(e=>{let t=g[e.cadence.data];return(0,m.jsxs)(`button`,{type:`button`,className:`pin-row`,role:`menuitem`,onClick:()=>L(e.id),children:[(0,m.jsx)(`span`,{className:`pin-row-ic`,children:(0,m.jsx)(r.table,{})}),(0,m.jsxs)(`span`,{className:`pin-row-text`,children:[(0,m.jsx)(`span`,{className:`pin-row-title`,children:u(e.title)}),(0,m.jsxs)(`span`,{className:`pin-row-sub`,children:[e.widgets.length,` `,e.widgets.length===1?`card`:`cards`]})]}),(0,m.jsx)(`span`,{className:`pin-row-cad pin-row-cad--${t.tone}`,children:t.text})]},e.id)})]}),t[28]=k,t[29]=x,t[30]=C,t[31]=D,t[32]=w,t[33]=L,t[34]=R,t[35]=q):q=t[35];let J;t[36]!==K||t[37]!==q?(J=(0,m.jsxs)(`div`,{className:`pin-sheet`,ref:j,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":`Add to a dashboard`,children:[K,q]}),t[36]=K,t[37]=q,t[38]=J):J=t[38];let Y;return t[39]!==J||t[40]!==V||t[41]!==H?(Y=(0,m.jsx)(`div`,{className:`pin-scrim`,onClick:V,role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:H,children:J}),t[39]=J,t[40]=V,t[41]=H,t[42]=Y):Y=t[42],Y}function v(){return o()}export{_ as PinToDashboard};
@@ -1 +1 @@
1
- import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-y8GL67bB.js";import{D as r,H as i,V as a,b as o,p as s,y as c}from"./useStudy-Bflreq2a.js";import{l,n as u}from"./useDashboardLoop-B6ByHWoE.js";/* empty css */import"./DashboardsApp-JSY_bVfi.js";import{t as d}from"./relate-A9ZeaaAI.js";var f=e(),p=n();function m(e){return e*4}function h(e,t,n,r={}){let i=`template:${e.id}`,a=new Map,o=[];e.metrics.forEach((e,i)=>{if(r.metrics?.[i]===!1)return;let s=`m-${n}-${i}`,c=e.label(t);a.set(i,s),o.push({id:s,label:c,query:e.query(t),...e.unit?{unit:e.unit}:{},sourceQuote:{text:c,saidAt:n},lastValue:null,origin:`empty`})});let s=[];e.tripwires.forEach((e,i)=>{if(!(r.tripwires?.[i]??e.enabledByDefault))return;let o=a.get(e.metricIndex);if(!o)return;let c=e.label(t);s.push({id:`t-${n}-${i}`,label:c,metricId:o,comparator:e.comparator,threshold:e.threshold,...e.unit?{unit:e.unit}:{},sourceQuote:{text:c,saidAt:n},state:`AWAITING`})});let c=[],l=[];return e.widgets.forEach((e,s)=>{if(r.widgets?.[s]===!1)return;if(e.metricIndex!==void 0){let t=a.get(e.metricIndex);if(!t)return;let r=o.find(e=>e.id===t);c.push({id:`w-${n}-${s}`,block:{type:e.blockType,col:m(e.span),id:`wblk-${n}-${s}`,num:String(c.length+1),props:{title:r.label,stat:`—`,conf:`inferred`,summary:r.sourceQuote.text}},span:e.span,metricId:t,fromSource:i});return}let u=e.refreshQuery?.(t),d=e.seedProps?.(t)??{};l.push({id:`w-${n}-${s}`,block:{type:e.blockType,col:m(e.span),id:`wblk-${n}-${s}`,props:u?{title:u,...d}:d},span:e.span,fromSource:i,...u?{refreshQuery:u}:{}})}),{metrics:o,tripwires:s,widgets:[...c,...l]}}function g(e,t,n={}){let a=n.now??Date.now(),o=`template:${e.id}`,s=e.title(t),{metrics:c,tripwires:l,widgets:u}=h(e,t,a,n.toggles),d=l.length>0,f={id:`w-thesis`,block:{type:`thesis`,col:8,id:`w-thesis`,props:{reasoning:e.thesis(t)}},span:2,fromSource:o},p={id:`w-align`,block:{type:`alignmentgauge`,col:4,id:`w-align`,props:{pct:null}},span:1,fromSource:o},m={id:`w-alerts`,block:{type:`standingalerts`,col:4,id:`w-alerts`,props:{alerts:[]}},span:1,fromSource:o},g={id:`w-sources`,block:{type:`sourceslineage`,col:8,id:`w-sources`,props:{rows:[]}},span:2,fromSource:o},_=n.cadence??e.cadence,v=c.some(e=>e.query.trim()!==``&&!e.blankKey)||u.some(e=>e.refreshQuery?.trim());return{id:r(),title:s,question:s,thesis:{text:e.thesis(t),saidAt:a},tripwires:l,metrics:c,sources:[{kind:`ORIGIN`,conversationId:o,title:e.label,contributed:`Started from the '${e.label}' template.`,at:a}],widgets:[...d?[f,p]:[],...u,...d?[m]:[],g],cadence:_,smartTrigger:d,alerts:{inApp:!0,push:!1},...e.topic?{topic:e.topic}:{},createdAt:a,updatedAt:a,nextDataAt:i(_,a),nextAiAt:2**53-1,lastRefreshedAt:null,...v?{oneShotAt:a,oneShotLabel:`first check`}:{}}}function _(e,t,n,r=Date.now()){let i=new Set(e.metrics.map(e=>l(e.label))),a=new Set(e.tripwires.map(e=>l(e.label))),s=h(t,n,r),c=s.metrics.filter(e=>!i.has(l(e.label))),u=new Set(c.map(e=>e.id)),d=s.tripwires.filter(e=>u.has(e.metricId)&&!a.has(l(e.label))),f=s.widgets.filter(e=>!e.metricId||u.has(e.metricId)),p=c.length+d.length,m=[];c.length&&m.push(`${c.length} metric${c.length>1?`s`:``}`),d.length&&m.push(`${d.length} alert${d.length>1?`s`:``}`);let g={kind:`ADDED`,conversationId:`template:${t.id}`,title:t.label,contributed:m.length?`Added: ${m.join(` + `)}`:`Linked the '${t.label}' template.`,at:r};return o(e.id,{metrics:c,tripwires:d,widgets:f,source:g}),p}var v={chart:{labels:[],series:[]},scoreboard:{games:[]},standings:{rows:[]},forecast:{days:[]},list:{items:[]},timeline:{events:[]}};function ee(e){return{id:`plan`,label:`Track anything`,blurb:``,input:{key:`ask`,label:`Track`,placeholder:``},title:()=>e.title,thesis:()=>`Tracking ${e.title}.`,metrics:e.metrics.map(e=>({label:()=>e.label,query:()=>e.query,...e.unit?{unit:e.unit}:{}})),tripwires:[],widgets:[...e.metrics.map((e,t)=>({blockType:`insight`,span:1,metricIndex:t})),...e.widgets.map(e=>({blockType:e.blockType,span:e.span,refreshQuery:()=>e.query,seedProps:()=>({...v[e.blockType]??{}})}))],cadence:{data:e.cadence,ai:`manual`}}}var y=t(),b={"15min":`checks every 15 minutes while open`,hourly:`checks hourly while open`,"6h":`checks every 6 hours while open`,daily:`checks daily while open`,manual:`refreshes only when you ask`};function te(e,t){let n=[...e];return n[t]=!n[t],n}function ne(e){let t=(0,p.c)(81),{plan:n,ask:r,existing:i,onDone:o}=e,[l,m]=(0,f.useState)(n.title),h;t[0]===n.metrics?h=t[1]:(h=()=>n.metrics.map(ae),t[0]=n.metrics,t[1]=h);let[v,ne]=(0,f.useState)(h),x;t[2]===n.widgets?x=t[3]:(x=()=>n.widgets.map(ie),t[2]=n.widgets,t[3]=x);let[S,se]=(0,f.useState)(x),[C,ce]=(0,f.useState)(null),[w,le]=(0,f.useState)(`manual`),T;t[4]===v?T=t[5]:(T=v.filter(Boolean),t[4]=v,t[5]=T);let ue=T.length,E;t[6]===S?E=t[7]:(E=S.filter(Boolean),t[6]=S,t[7]=E);let D=ue+E.length,de=a(w),O;t[8]!==r||t[9]!==w||t[10]!==D||t[11]!==v||t[12]!==l||t[13]!==o||t[14]!==n||t[15]!==S?(O=()=>{if(D===0)return;let e=ee(n),t=[...n.metrics.map(re),...S],i=g(e,r.trim(),{toggles:{metrics:v,widgets:t},cadence:{data:w,ai:`manual`}});i.title=l.trim()||i.title,i.question=r.trim(),s(i),u(i.id),o(i.id)},t[8]=r,t[9]=w,t[10]=D,t[11]=v,t[12]=l,t[13]=o,t[14]=n,t[15]=S,t[16]=O):O=t[16];let k=O,A;t[17]!==r||t[18]!==o||t[19]!==n?(A=e=>{_(e,ee(n),r.trim()),c(e.id),u(e.id),o(e.id)},t[17]=r,t[18]=o,t[19]=n,t[20]=A):A=t[20];let j=A,M;t[21]!==r||t[22]!==k||t[23]!==i||t[24]!==n.title?(M=()=>{let e=d(i,{text:`${n.title} ${r}`});if(e){ce(e);return}k()},t[21]=r,t[22]=k,t[23]=i,t[24]=n.title,t[25]=M):M=t[25];let fe=M;if(C){let e;t[26]===C.title?e=t[27]:(e=(0,y.jsxs)(`p`,{className:`tpl-interstitial-text`,children:[`This looks related to your existing “`,C.title,`” dashboard — fold this in instead of creating a new one?`]}),t[26]=C.title,t[27]=e);let n;t[28]!==j||t[29]!==C?(n=()=>j(C),t[28]=j,t[29]=C,t[30]=n):n=t[30];let r;t[31]!==C.title||t[32]!==n?(r=(0,y.jsxs)(`button`,{type:`button`,className:`tpl-fold-btn`,onClick:n,children:[`Fold into “`,C.title,`”`]}),t[31]=C.title,t[32]=n,t[33]=r):r=t[33];let i;t[34]===k?i=t[35]:(i=(0,y.jsx)(`button`,{type:`button`,className:`tpl-create-anyway`,onClick:k,children:`Create new anyway`}),t[34]=k,t[35]=i);let a;t[36]!==r||t[37]!==i?(a=(0,y.jsxs)(`div`,{className:`tpl-interstitial-actions`,children:[r,i]}),t[36]=r,t[37]=i,t[38]=a):a=t[38];let o;return t[39]!==a||t[40]!==e?(o=(0,y.jsxs)(`div`,{className:`tpl-interstitial`,children:[e,a]}),t[39]=a,t[40]=e,t[41]=o):o=t[41],o}let N;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(`span`,{className:`xt-section-label`,children:`Dashboard name`}),t[42]=N):N=t[42];let P;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>m(e.target.value),t[43]=P):P=t[43];let F;t[44]===l?F=t[45]:(F=(0,y.jsxs)(`label`,{className:`tpl-field`,children:[N,(0,y.jsx)(`input`,{className:`xt-name`,value:l,onChange:P,"aria-label":`Dashboard name`})]}),t[44]=l,t[45]=F);let I;t[46]!==v||t[47]!==n.metrics?(I=n.metrics.length>0&&(0,y.jsxs)(`div`,{className:`tpl-chip-group`,children:[(0,y.jsx)(`span`,{className:`xt-section-label`,children:`Numbers to watch`}),(0,y.jsx)(`div`,{className:`tpl-chips`,children:n.metrics.map((e,t)=>(0,y.jsx)(oe,{kind:`METRIC`,label:e.label,detail:e.query,on:v[t]??!0,onToggle:()=>ne(e=>te(e,t))},`m${t}`))})]}),t[46]=v,t[47]=n.metrics,t[48]=I):I=t[48];let L;t[49]!==n.widgets||t[50]!==S?(L=n.widgets.length>0&&(0,y.jsxs)(`div`,{className:`tpl-chip-group`,children:[(0,y.jsx)(`span`,{className:`xt-section-label`,children:`Live cards`}),(0,y.jsx)(`div`,{className:`tpl-chips`,children:n.widgets.map((e,t)=>(0,y.jsx)(oe,{kind:`CARD`,label:e.query,detail:e.blockType,on:S[t]??!0,onToggle:()=>se(e=>te(e,t))},`w${t}`))})]}),t[49]=n.widgets,t[50]=S,t[51]=L):L=t[51];let R;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,y.jsx)(`span`,{className:`xt-section-label`,children:`How often`}),t[52]=R):R=t[52];let z=`tpl-chip xt-comp--goal${w===`manual`?``:` tpl-chip-off`}`,B=w===`manual`,V,H;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>le(`manual`),H=(0,y.jsx)(`span`,{className:`tpl-chip-label`,children:`Manual — only when you ask`}),t[53]=V,t[54]=H):(V=t[53],H=t[54]);let U;t[55]!==z||t[56]!==B?(U=(0,y.jsx)(`button`,{type:`button`,className:z,"aria-pressed":B,onClick:V,children:H}),t[55]=z,t[56]=B,t[57]=U):U=t[57];let W;t[58]!==w||t[59]!==n.cadence?(W=n.cadence!==`manual`&&(0,y.jsx)(`button`,{type:`button`,className:`tpl-chip xt-comp--metric${w===n.cadence?``:` tpl-chip-off`}`,"aria-pressed":w===n.cadence,onClick:()=>le(n.cadence),title:b[n.cadence],children:(0,y.jsxs)(`span`,{className:`tpl-chip-label`,children:[`Suggested — `,b[n.cadence]]})}),t[58]=w,t[59]=n.cadence,t[60]=W):W=t[60];let G;t[61]!==U||t[62]!==W?(G=(0,y.jsxs)(`div`,{className:`tpl-chip-group`,children:[R,(0,y.jsxs)(`div`,{className:`tpl-chips`,children:[U,W]})]}),t[61]=U,t[62]=W,t[63]=G):G=t[63];let K=de>0?`≈ ${de} searches/mo on your key, at this cadence.`:`No standing searches — this refreshes only when you ask.`,q;t[64]===K?q=t[65]:(q=(0,y.jsx)(`p`,{className:`dash-plan-estimate`,children:K}),t[64]=K,t[65]=q);let J=b[w],Y;t[66]===J?Y=t[67]:(Y=(0,y.jsx)(`span`,{className:`tpl-cadence-note`,children:J}),t[66]=J,t[67]=Y);let X=D===0,Z;t[68]!==fe||t[69]!==X?(Z=(0,y.jsx)(`button`,{type:`button`,className:`tpl-create`,onClick:fe,disabled:X,children:`Create dashboard →`}),t[68]=fe,t[69]=X,t[70]=Z):Z=t[70];let Q;t[71]!==Y||t[72]!==Z?(Q=(0,y.jsxs)(`div`,{className:`xt-build-row`,children:[Y,Z]}),t[71]=Y,t[72]=Z,t[73]=Q):Q=t[73];let $;return t[74]!==F||t[75]!==I||t[76]!==L||t[77]!==G||t[78]!==q||t[79]!==Q?($=(0,y.jsxs)(`div`,{className:`tpl-form`,children:[F,I,L,G,q,Q]}),t[74]=F,t[75]=I,t[76]=L,t[77]=G,t[78]=q,t[79]=Q,t[80]=$):$=t[80],$}function re(){return!0}function ie(){return!0}function ae(){return!0}function oe(e){let t=(0,p.c)(14),{kind:n,label:r,detail:i,on:a,onToggle:o}=e,s=`tpl-chip xt-comp--${n===`METRIC`?`metric`:`goal`}${a?``:` tpl-chip-off`}`,c;t[0]===n?c=t[1]:(c=(0,y.jsx)(`span`,{className:`tpl-chip-kind`,children:n}),t[0]=n,t[1]=c);let l;t[2]===r?l=t[3]:(l=(0,y.jsx)(`span`,{className:`tpl-chip-label`,children:r}),t[2]=r,t[3]=l);let u=a?`Included ✓`:`Removed ✕`,d;t[4]===u?d=t[5]:(d=(0,y.jsx)(`span`,{className:`tpl-chip-state`,children:u}),t[4]=u,t[5]=d);let f;return t[6]!==i||t[7]!==a||t[8]!==o||t[9]!==s||t[10]!==c||t[11]!==l||t[12]!==d?(f=(0,y.jsxs)(`button`,{type:`button`,className:s,onClick:o,"aria-pressed":a,title:i,children:[c,l,d]}),t[6]=i,t[7]=a,t[8]=o,t[9]=s,t[10]=c,t[11]=l,t[12]=d,t[13]=f):f=t[13],f}export{ne as PlanReview};
1
+ import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-BlCH2LG4.js";import{D as r,H as i,V as a,b as o,p as s,y as c}from"./useStudy-Dh598Dw8.js";import{l,n as u}from"./useDashboardLoop-8emjL6b-.js";/* empty css */import"./DashboardsApp-BmcjQZqP.js";import{t as d}from"./relate-B23jli7z.js";var f=e(),p=n();function m(e){return e*4}function h(e,t,n,r={}){let i=`template:${e.id}`,a=new Map,o=[];e.metrics.forEach((e,i)=>{if(r.metrics?.[i]===!1)return;let s=`m-${n}-${i}`,c=e.label(t);a.set(i,s),o.push({id:s,label:c,query:e.query(t),...e.unit?{unit:e.unit}:{},sourceQuote:{text:c,saidAt:n},lastValue:null,origin:`empty`})});let s=[];e.tripwires.forEach((e,i)=>{if(!(r.tripwires?.[i]??e.enabledByDefault))return;let o=a.get(e.metricIndex);if(!o)return;let c=e.label(t);s.push({id:`t-${n}-${i}`,label:c,metricId:o,comparator:e.comparator,threshold:e.threshold,...e.unit?{unit:e.unit}:{},sourceQuote:{text:c,saidAt:n},state:`AWAITING`})});let c=[],l=[];return e.widgets.forEach((e,s)=>{if(r.widgets?.[s]===!1)return;if(e.metricIndex!==void 0){let t=a.get(e.metricIndex);if(!t)return;let r=o.find(e=>e.id===t);c.push({id:`w-${n}-${s}`,block:{type:e.blockType,col:m(e.span),id:`wblk-${n}-${s}`,num:String(c.length+1),props:{title:r.label,stat:`—`,conf:`inferred`,summary:r.sourceQuote.text}},span:e.span,metricId:t,fromSource:i});return}let u=e.refreshQuery?.(t),d=e.seedProps?.(t)??{};l.push({id:`w-${n}-${s}`,block:{type:e.blockType,col:m(e.span),id:`wblk-${n}-${s}`,props:u?{title:u,...d}:d},span:e.span,fromSource:i,...u?{refreshQuery:u}:{}})}),{metrics:o,tripwires:s,widgets:[...c,...l]}}function g(e,t,n={}){let a=n.now??Date.now(),o=`template:${e.id}`,s=e.title(t),{metrics:c,tripwires:l,widgets:u}=h(e,t,a,n.toggles),d=l.length>0,f={id:`w-thesis`,block:{type:`thesis`,col:8,id:`w-thesis`,props:{reasoning:e.thesis(t)}},span:2,fromSource:o},p={id:`w-align`,block:{type:`alignmentgauge`,col:4,id:`w-align`,props:{pct:null}},span:1,fromSource:o},m={id:`w-alerts`,block:{type:`standingalerts`,col:4,id:`w-alerts`,props:{alerts:[]}},span:1,fromSource:o},g={id:`w-sources`,block:{type:`sourceslineage`,col:8,id:`w-sources`,props:{rows:[]}},span:2,fromSource:o},_=n.cadence??e.cadence,v=c.some(e=>e.query.trim()!==``&&!e.blankKey)||u.some(e=>e.refreshQuery?.trim());return{id:r(),title:s,question:s,thesis:{text:e.thesis(t),saidAt:a},tripwires:l,metrics:c,sources:[{kind:`ORIGIN`,conversationId:o,title:e.label,contributed:`Started from the '${e.label}' template.`,at:a}],widgets:[...d?[f,p]:[],...u,...d?[m]:[],g],cadence:_,smartTrigger:d,alerts:{inApp:!0,push:!1},...e.topic?{topic:e.topic}:{},createdAt:a,updatedAt:a,nextDataAt:i(_,a),nextAiAt:2**53-1,lastRefreshedAt:null,...v?{oneShotAt:a,oneShotLabel:`first check`}:{}}}function _(e,t,n,r=Date.now()){let i=new Set(e.metrics.map(e=>l(e.label))),a=new Set(e.tripwires.map(e=>l(e.label))),s=h(t,n,r),c=s.metrics.filter(e=>!i.has(l(e.label))),u=new Set(c.map(e=>e.id)),d=s.tripwires.filter(e=>u.has(e.metricId)&&!a.has(l(e.label))),f=s.widgets.filter(e=>!e.metricId||u.has(e.metricId)),p=c.length+d.length,m=[];c.length&&m.push(`${c.length} metric${c.length>1?`s`:``}`),d.length&&m.push(`${d.length} alert${d.length>1?`s`:``}`);let g={kind:`ADDED`,conversationId:`template:${t.id}`,title:t.label,contributed:m.length?`Added: ${m.join(` + `)}`:`Linked the '${t.label}' template.`,at:r};return o(e.id,{metrics:c,tripwires:d,widgets:f,source:g}),p}var v={chart:{labels:[],series:[]},scoreboard:{games:[]},standings:{rows:[]},forecast:{days:[]},list:{items:[]},timeline:{events:[]}};function ee(e){return{id:`plan`,label:`Track anything`,blurb:``,input:{key:`ask`,label:`Track`,placeholder:``},title:()=>e.title,thesis:()=>`Tracking ${e.title}.`,metrics:e.metrics.map(e=>({label:()=>e.label,query:()=>e.query,...e.unit?{unit:e.unit}:{}})),tripwires:[],widgets:[...e.metrics.map((e,t)=>({blockType:`insight`,span:1,metricIndex:t})),...e.widgets.map(e=>({blockType:e.blockType,span:e.span,refreshQuery:()=>e.query,seedProps:()=>({...v[e.blockType]??{}})}))],cadence:{data:e.cadence,ai:`manual`}}}var y=t(),b={"15min":`checks every 15 minutes while open`,hourly:`checks hourly while open`,"6h":`checks every 6 hours while open`,daily:`checks daily while open`,manual:`refreshes only when you ask`};function te(e,t){let n=[...e];return n[t]=!n[t],n}function ne(e){let t=(0,p.c)(81),{plan:n,ask:r,existing:i,onDone:o}=e,[l,m]=(0,f.useState)(n.title),h;t[0]===n.metrics?h=t[1]:(h=()=>n.metrics.map(ae),t[0]=n.metrics,t[1]=h);let[v,ne]=(0,f.useState)(h),x;t[2]===n.widgets?x=t[3]:(x=()=>n.widgets.map(ie),t[2]=n.widgets,t[3]=x);let[S,se]=(0,f.useState)(x),[C,ce]=(0,f.useState)(null),[w,le]=(0,f.useState)(`manual`),T;t[4]===v?T=t[5]:(T=v.filter(Boolean),t[4]=v,t[5]=T);let ue=T.length,E;t[6]===S?E=t[7]:(E=S.filter(Boolean),t[6]=S,t[7]=E);let D=ue+E.length,de=a(w),O;t[8]!==r||t[9]!==w||t[10]!==D||t[11]!==v||t[12]!==l||t[13]!==o||t[14]!==n||t[15]!==S?(O=()=>{if(D===0)return;let e=ee(n),t=[...n.metrics.map(re),...S],i=g(e,r.trim(),{toggles:{metrics:v,widgets:t},cadence:{data:w,ai:`manual`}});i.title=l.trim()||i.title,i.question=r.trim(),s(i),u(i.id),o(i.id)},t[8]=r,t[9]=w,t[10]=D,t[11]=v,t[12]=l,t[13]=o,t[14]=n,t[15]=S,t[16]=O):O=t[16];let k=O,A;t[17]!==r||t[18]!==o||t[19]!==n?(A=e=>{_(e,ee(n),r.trim()),c(e.id),u(e.id),o(e.id)},t[17]=r,t[18]=o,t[19]=n,t[20]=A):A=t[20];let j=A,M;t[21]!==r||t[22]!==k||t[23]!==i||t[24]!==n.title?(M=()=>{let e=d(i,{text:`${n.title} ${r}`});if(e){ce(e);return}k()},t[21]=r,t[22]=k,t[23]=i,t[24]=n.title,t[25]=M):M=t[25];let fe=M;if(C){let e;t[26]===C.title?e=t[27]:(e=(0,y.jsxs)(`p`,{className:`tpl-interstitial-text`,children:[`This looks related to your existing “`,C.title,`” dashboard — fold this in instead of creating a new one?`]}),t[26]=C.title,t[27]=e);let n;t[28]!==j||t[29]!==C?(n=()=>j(C),t[28]=j,t[29]=C,t[30]=n):n=t[30];let r;t[31]!==C.title||t[32]!==n?(r=(0,y.jsxs)(`button`,{type:`button`,className:`tpl-fold-btn`,onClick:n,children:[`Fold into “`,C.title,`”`]}),t[31]=C.title,t[32]=n,t[33]=r):r=t[33];let i;t[34]===k?i=t[35]:(i=(0,y.jsx)(`button`,{type:`button`,className:`tpl-create-anyway`,onClick:k,children:`Create new anyway`}),t[34]=k,t[35]=i);let a;t[36]!==r||t[37]!==i?(a=(0,y.jsxs)(`div`,{className:`tpl-interstitial-actions`,children:[r,i]}),t[36]=r,t[37]=i,t[38]=a):a=t[38];let o;return t[39]!==a||t[40]!==e?(o=(0,y.jsxs)(`div`,{className:`tpl-interstitial`,children:[e,a]}),t[39]=a,t[40]=e,t[41]=o):o=t[41],o}let N;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(`span`,{className:`xt-section-label`,children:`Dashboard name`}),t[42]=N):N=t[42];let P;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>m(e.target.value),t[43]=P):P=t[43];let F;t[44]===l?F=t[45]:(F=(0,y.jsxs)(`label`,{className:`tpl-field`,children:[N,(0,y.jsx)(`input`,{className:`xt-name`,value:l,onChange:P,"aria-label":`Dashboard name`})]}),t[44]=l,t[45]=F);let I;t[46]!==v||t[47]!==n.metrics?(I=n.metrics.length>0&&(0,y.jsxs)(`div`,{className:`tpl-chip-group`,children:[(0,y.jsx)(`span`,{className:`xt-section-label`,children:`Numbers to watch`}),(0,y.jsx)(`div`,{className:`tpl-chips`,children:n.metrics.map((e,t)=>(0,y.jsx)(oe,{kind:`METRIC`,label:e.label,detail:e.query,on:v[t]??!0,onToggle:()=>ne(e=>te(e,t))},`m${t}`))})]}),t[46]=v,t[47]=n.metrics,t[48]=I):I=t[48];let L;t[49]!==n.widgets||t[50]!==S?(L=n.widgets.length>0&&(0,y.jsxs)(`div`,{className:`tpl-chip-group`,children:[(0,y.jsx)(`span`,{className:`xt-section-label`,children:`Live cards`}),(0,y.jsx)(`div`,{className:`tpl-chips`,children:n.widgets.map((e,t)=>(0,y.jsx)(oe,{kind:`CARD`,label:e.query,detail:e.blockType,on:S[t]??!0,onToggle:()=>se(e=>te(e,t))},`w${t}`))})]}),t[49]=n.widgets,t[50]=S,t[51]=L):L=t[51];let R;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,y.jsx)(`span`,{className:`xt-section-label`,children:`How often`}),t[52]=R):R=t[52];let z=`tpl-chip xt-comp--goal${w===`manual`?``:` tpl-chip-off`}`,B=w===`manual`,V,H;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>le(`manual`),H=(0,y.jsx)(`span`,{className:`tpl-chip-label`,children:`Manual — only when you ask`}),t[53]=V,t[54]=H):(V=t[53],H=t[54]);let U;t[55]!==z||t[56]!==B?(U=(0,y.jsx)(`button`,{type:`button`,className:z,"aria-pressed":B,onClick:V,children:H}),t[55]=z,t[56]=B,t[57]=U):U=t[57];let W;t[58]!==w||t[59]!==n.cadence?(W=n.cadence!==`manual`&&(0,y.jsx)(`button`,{type:`button`,className:`tpl-chip xt-comp--metric${w===n.cadence?``:` tpl-chip-off`}`,"aria-pressed":w===n.cadence,onClick:()=>le(n.cadence),title:b[n.cadence],children:(0,y.jsxs)(`span`,{className:`tpl-chip-label`,children:[`Suggested — `,b[n.cadence]]})}),t[58]=w,t[59]=n.cadence,t[60]=W):W=t[60];let G;t[61]!==U||t[62]!==W?(G=(0,y.jsxs)(`div`,{className:`tpl-chip-group`,children:[R,(0,y.jsxs)(`div`,{className:`tpl-chips`,children:[U,W]})]}),t[61]=U,t[62]=W,t[63]=G):G=t[63];let K=de>0?`≈ ${de} searches/mo on your key, at this cadence.`:`No standing searches — this refreshes only when you ask.`,q;t[64]===K?q=t[65]:(q=(0,y.jsx)(`p`,{className:`dash-plan-estimate`,children:K}),t[64]=K,t[65]=q);let J=b[w],Y;t[66]===J?Y=t[67]:(Y=(0,y.jsx)(`span`,{className:`tpl-cadence-note`,children:J}),t[66]=J,t[67]=Y);let X=D===0,Z;t[68]!==fe||t[69]!==X?(Z=(0,y.jsx)(`button`,{type:`button`,className:`tpl-create`,onClick:fe,disabled:X,children:`Create dashboard →`}),t[68]=fe,t[69]=X,t[70]=Z):Z=t[70];let Q;t[71]!==Y||t[72]!==Z?(Q=(0,y.jsxs)(`div`,{className:`xt-build-row`,children:[Y,Z]}),t[71]=Y,t[72]=Z,t[73]=Q):Q=t[73];let $;return t[74]!==F||t[75]!==I||t[76]!==L||t[77]!==G||t[78]!==q||t[79]!==Q?($=(0,y.jsxs)(`div`,{className:`tpl-form`,children:[F,I,L,G,q,Q]}),t[74]=F,t[75]=I,t[76]=L,t[77]=G,t[78]=q,t[79]=Q,t[80]=$):$=t[80],$}function re(){return!0}function ie(){return!0}function ae(){return!0}function oe(e){let t=(0,p.c)(14),{kind:n,label:r,detail:i,on:a,onToggle:o}=e,s=`tpl-chip xt-comp--${n===`METRIC`?`metric`:`goal`}${a?``:` tpl-chip-off`}`,c;t[0]===n?c=t[1]:(c=(0,y.jsx)(`span`,{className:`tpl-chip-kind`,children:n}),t[0]=n,t[1]=c);let l;t[2]===r?l=t[3]:(l=(0,y.jsx)(`span`,{className:`tpl-chip-label`,children:r}),t[2]=r,t[3]=l);let u=a?`Included ✓`:`Removed ✕`,d;t[4]===u?d=t[5]:(d=(0,y.jsx)(`span`,{className:`tpl-chip-state`,children:u}),t[4]=u,t[5]=d);let f;return t[6]!==i||t[7]!==a||t[8]!==o||t[9]!==s||t[10]!==c||t[11]!==l||t[12]!==d?(f=(0,y.jsxs)(`button`,{type:`button`,className:s,onClick:o,"aria-pressed":a,title:i,children:[c,l,d]}),t[6]=i,t[7]=a,t[8]=o,t[9]=s,t[10]=c,t[11]=l,t[12]=d,t[13]=f):f=t[13],f}export{ne as PlanReview};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{lt as r}from"./index-y8GL67bB.js";import{a as i,c as a,d as o,f as s,i as c,l,n as u,o as d,r as f,s as p,t as m,u as h}from"./geometry-DXAbnb0J.js";var g=e({Presence:()=>b}),_=t(),v=n();function y({state:e=`idle`,emotion:t=`neutral`,gaze:n=`center`,muted:g=!1,hidden:y=!1}){let b=`mascot-bell-${(0,_.useId)().replace(/\W/g,``)}`;return(0,v.jsxs)(`div`,{className:`presence`+(y?` is-hidden`:``),"data-state":e,"data-emotion":t,"data-gaze":n,role:`img`,"aria-label":`Mavéa presence — ${e}`,children:[(0,v.jsx)(`div`,{className:`aura`}),(0,v.jsxs)(`svg`,{className:`mascot`,viewBox:`0 0 200 220`,"aria-hidden":`true`,focusable:`false`,children:[(0,v.jsx)(`defs`,{children:(0,v.jsxs)(`linearGradient`,{id:b,x1:`40`,y1:`60`,x2:`160`,y2:`104`,gradientUnits:`userSpaceOnUse`,children:[(0,v.jsx)(`stop`,{className:`bell-stop s1`,offset:`0`}),(0,v.jsx)(`stop`,{className:`bell-stop s2`,offset:`0.5`}),(0,v.jsx)(`stop`,{className:`bell-stop s3`,offset:`1`})]})}),(0,v.jsxs)(`g`,{className:`jelly`,children:[(0,v.jsx)(`g`,{className:`curtains long`,children:s.map((e,t)=>(0,v.jsxs)(`g`,{className:`curtain c${t+1}`,children:[(0,v.jsx)(`path`,{className:`tube`,d:e,pathLength:100}),(0,v.jsx)(`path`,{className:`strand`,d:e,pathLength:100}),(0,v.jsx)(`path`,{className:`beads`,d:e,pathLength:100}),(0,v.jsx)(`path`,{className:`shimmer`,d:e,pathLength:100})]},t))}),(0,v.jsx)(`g`,{className:`curtains short`,children:h.map((e,t)=>(0,v.jsxs)(`g`,{className:`curtain c${t+1}`,children:[(0,v.jsx)(`path`,{className:`tube`,d:e,pathLength:100}),(0,v.jsx)(`path`,{className:`strand`,d:e,pathLength:100})]},t))}),(0,v.jsxs)(`g`,{className:`curtain found`,children:[(0,v.jsx)(`path`,{className:`tube`,d:l,pathLength:100}),(0,v.jsx)(`path`,{className:`strand`,d:l,pathLength:100}),(0,v.jsx)(`path`,{className:`beads`,d:l,pathLength:100}),(0,v.jsx)(`circle`,{className:`found-dot`,cx:`152`,cy:`144`,r:`6`})]}),(0,v.jsxs)(`g`,{className:`glyph question`,children:[(0,v.jsx)(`path`,{className:`stroke`,d:a,pathLength:100}),(0,v.jsx)(`circle`,{className:`dot`,cx:`100`,cy:`186`,r:`4`})]}),(0,v.jsx)(`g`,{className:`glyph heart`,children:(0,v.jsx)(`path`,{className:`stroke`,d,pathLength:100})}),(0,v.jsxs)(`g`,{className:`glyph idea`,children:[(0,v.jsx)(`circle`,{className:`halo`,cx:`100`,cy:`163`,r:`15`}),p.map((e,t)=>(0,v.jsx)(`path`,{className:`stroke`,d:e,pathLength:100},t))]}),(0,v.jsx)(`g`,{className:`glyph check`,children:(0,v.jsx)(`path`,{className:`stroke`,d:i,pathLength:100})}),(0,v.jsxs)(`g`,{className:`bell`,children:[(0,v.jsx)(`path`,{className:`bell-body`,d:m,fill:`url(#${b})`}),(0,v.jsx)(`path`,{className:`bell-sheen`,d:u}),(0,v.jsx)(`path`,{className:`band b1`,d:`M52 74 C70 62 130 62 148 74`}),(0,v.jsx)(`path`,{className:`band b2`,d:`M58 56 C76 46 124 46 142 56`}),(0,v.jsxs)(`g`,{className:`face`,children:[f.map(({side:e,cx:t,cy:n})=>(0,v.jsx)(`ellipse`,{className:`cheek ${e}`,cx:t,cy:n,rx:8,ry:5},e)),(0,v.jsx)(`path`,{className:`brow l`,d:`M70 61 Q80 57 90 61`}),(0,v.jsx)(`path`,{className:`brow r`,d:`M110 61 Q120 57 130 61`}),(0,v.jsx)(`g`,{className:`eyes`,children:c.map(({side:e,x:t,crescent:n,closed:r})=>(0,v.jsxs)(`g`,{className:`eye ${e}`,children:[(0,v.jsxs)(`g`,{className:`blink`,children:[(0,v.jsx)(`circle`,{className:`ball`,cx:t,cy:72,r:9}),(0,v.jsx)(`circle`,{className:`pupil`,cx:t,cy:72.7,r:5.2}),(0,v.jsx)(`circle`,{className:`glint g1`,cx:t+2.5,cy:69.3,r:2.3}),(0,v.jsx)(`circle`,{className:`glint g2`,cx:t-2,cy:75.1,r:1.2})]}),(0,v.jsx)(`path`,{className:`crescent`,d:n}),(0,v.jsx)(`path`,{className:`closed`,d:r})]},e))}),(0,v.jsxs)(`g`,{className:`mouth`,children:[(0,v.jsx)(`path`,{className:`smile`,d:o}),(0,v.jsx)(`path`,{className:`frown`,d:`M92 96 Q100 91 108 96`}),(0,v.jsx)(`circle`,{className:`oo`,cx:`100`,cy:`92.5`,r:`4`}),(0,v.jsxs)(`g`,{className:`mouth-open`,children:[(0,v.jsx)(`path`,{className:`mouth-fill`,d:`M89 86 Q100 100 111 86 Z`}),(0,v.jsx)(`path`,{className:`tongue`,d:`M93 95 Q100 99 107 95`})]})]})]})]}),(0,v.jsxs)(`g`,{className:`sparks`,children:[(0,v.jsx)(`path`,{d:`M36 44 L36 56 M30 50 L42 50`}),(0,v.jsx)(`path`,{d:`M166 34 L166 46 M160 40 L172 40`}),(0,v.jsx)(`path`,{d:`M174 84 L182 84`})]}),(0,v.jsxs)(`g`,{className:`zzz`,children:[(0,v.jsx)(`text`,{x:`148`,y:`36`,children:`z`}),(0,v.jsx)(`text`,{x:`160`,y:`22`,children:`z`})]})]})]}),g&&(0,v.jsx)(`div`,{className:`muted-badge`,title:`Mavéa's voice is muted`,children:(0,v.jsx)(r,{})})]})}var b=(0,_.memo)(y);export{g as n,b as t};
1
+ import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{lt as r}from"./index-BlCH2LG4.js";import{a as i,c as a,d as o,f as s,i as c,l,n as u,o as d,r as f,s as p,t as m,u as h}from"./geometry-DXAbnb0J.js";var g=e({Presence:()=>b}),_=t(),v=n();function y({state:e=`idle`,emotion:t=`neutral`,gaze:n=`center`,muted:g=!1,hidden:y=!1}){let b=`mascot-bell-${(0,_.useId)().replace(/\W/g,``)}`;return(0,v.jsxs)(`div`,{className:`presence`+(y?` is-hidden`:``),"data-state":e,"data-emotion":t,"data-gaze":n,role:`img`,"aria-label":`Mavéa presence — ${e}`,children:[(0,v.jsx)(`div`,{className:`aura`}),(0,v.jsxs)(`svg`,{className:`mascot`,viewBox:`0 0 200 220`,"aria-hidden":`true`,focusable:`false`,children:[(0,v.jsx)(`defs`,{children:(0,v.jsxs)(`linearGradient`,{id:b,x1:`40`,y1:`60`,x2:`160`,y2:`104`,gradientUnits:`userSpaceOnUse`,children:[(0,v.jsx)(`stop`,{className:`bell-stop s1`,offset:`0`}),(0,v.jsx)(`stop`,{className:`bell-stop s2`,offset:`0.5`}),(0,v.jsx)(`stop`,{className:`bell-stop s3`,offset:`1`})]})}),(0,v.jsxs)(`g`,{className:`jelly`,children:[(0,v.jsx)(`g`,{className:`curtains long`,children:s.map((e,t)=>(0,v.jsxs)(`g`,{className:`curtain c${t+1}`,children:[(0,v.jsx)(`path`,{className:`tube`,d:e,pathLength:100}),(0,v.jsx)(`path`,{className:`strand`,d:e,pathLength:100}),(0,v.jsx)(`path`,{className:`beads`,d:e,pathLength:100}),(0,v.jsx)(`path`,{className:`shimmer`,d:e,pathLength:100})]},t))}),(0,v.jsx)(`g`,{className:`curtains short`,children:h.map((e,t)=>(0,v.jsxs)(`g`,{className:`curtain c${t+1}`,children:[(0,v.jsx)(`path`,{className:`tube`,d:e,pathLength:100}),(0,v.jsx)(`path`,{className:`strand`,d:e,pathLength:100})]},t))}),(0,v.jsxs)(`g`,{className:`curtain found`,children:[(0,v.jsx)(`path`,{className:`tube`,d:l,pathLength:100}),(0,v.jsx)(`path`,{className:`strand`,d:l,pathLength:100}),(0,v.jsx)(`path`,{className:`beads`,d:l,pathLength:100}),(0,v.jsx)(`circle`,{className:`found-dot`,cx:`152`,cy:`144`,r:`6`})]}),(0,v.jsxs)(`g`,{className:`glyph question`,children:[(0,v.jsx)(`path`,{className:`stroke`,d:a,pathLength:100}),(0,v.jsx)(`circle`,{className:`dot`,cx:`100`,cy:`186`,r:`4`})]}),(0,v.jsx)(`g`,{className:`glyph heart`,children:(0,v.jsx)(`path`,{className:`stroke`,d,pathLength:100})}),(0,v.jsxs)(`g`,{className:`glyph idea`,children:[(0,v.jsx)(`circle`,{className:`halo`,cx:`100`,cy:`163`,r:`15`}),p.map((e,t)=>(0,v.jsx)(`path`,{className:`stroke`,d:e,pathLength:100},t))]}),(0,v.jsx)(`g`,{className:`glyph check`,children:(0,v.jsx)(`path`,{className:`stroke`,d:i,pathLength:100})}),(0,v.jsxs)(`g`,{className:`bell`,children:[(0,v.jsx)(`path`,{className:`bell-body`,d:m,fill:`url(#${b})`}),(0,v.jsx)(`path`,{className:`bell-sheen`,d:u}),(0,v.jsx)(`path`,{className:`band b1`,d:`M52 74 C70 62 130 62 148 74`}),(0,v.jsx)(`path`,{className:`band b2`,d:`M58 56 C76 46 124 46 142 56`}),(0,v.jsxs)(`g`,{className:`face`,children:[f.map(({side:e,cx:t,cy:n})=>(0,v.jsx)(`ellipse`,{className:`cheek ${e}`,cx:t,cy:n,rx:8,ry:5},e)),(0,v.jsx)(`path`,{className:`brow l`,d:`M70 61 Q80 57 90 61`}),(0,v.jsx)(`path`,{className:`brow r`,d:`M110 61 Q120 57 130 61`}),(0,v.jsx)(`g`,{className:`eyes`,children:c.map(({side:e,x:t,crescent:n,closed:r})=>(0,v.jsxs)(`g`,{className:`eye ${e}`,children:[(0,v.jsxs)(`g`,{className:`blink`,children:[(0,v.jsx)(`circle`,{className:`ball`,cx:t,cy:72,r:9}),(0,v.jsx)(`circle`,{className:`pupil`,cx:t,cy:72.7,r:5.2}),(0,v.jsx)(`circle`,{className:`glint g1`,cx:t+2.5,cy:69.3,r:2.3}),(0,v.jsx)(`circle`,{className:`glint g2`,cx:t-2,cy:75.1,r:1.2})]}),(0,v.jsx)(`path`,{className:`crescent`,d:n}),(0,v.jsx)(`path`,{className:`closed`,d:r})]},e))}),(0,v.jsxs)(`g`,{className:`mouth`,children:[(0,v.jsx)(`path`,{className:`smile`,d:o}),(0,v.jsx)(`path`,{className:`frown`,d:`M92 96 Q100 91 108 96`}),(0,v.jsx)(`circle`,{className:`oo`,cx:`100`,cy:`92.5`,r:`4`}),(0,v.jsxs)(`g`,{className:`mouth-open`,children:[(0,v.jsx)(`path`,{className:`mouth-fill`,d:`M89 86 Q100 100 111 86 Z`}),(0,v.jsx)(`path`,{className:`tongue`,d:`M93 95 Q100 99 107 95`})]})]})]})]}),(0,v.jsxs)(`g`,{className:`sparks`,children:[(0,v.jsx)(`path`,{d:`M36 44 L36 56 M30 50 L42 50`}),(0,v.jsx)(`path`,{d:`M166 34 L166 46 M160 40 L172 40`}),(0,v.jsx)(`path`,{d:`M174 84 L182 84`})]}),(0,v.jsxs)(`g`,{className:`zzz`,children:[(0,v.jsx)(`text`,{x:`148`,y:`36`,children:`z`}),(0,v.jsx)(`text`,{x:`160`,y:`22`,children:`z`})]})]})]}),g&&(0,v.jsx)(`div`,{className:`muted-badge`,title:`Mavéa's voice is muted`,children:(0,v.jsx)(r,{})})]})}var b=(0,_.memo)(y);export{g as n,b as t};
@@ -1 +1 @@
1
- import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-y8GL67bB.js";import{i as r,n as i,o as a}from"./notes-lROPCorS.js";import{t as o}from"./registry-DujBAgn_.js";import{t as s}from"./pageVisibility-BxUVsw7Z.js";var c=n(),l=e(),u=t(),d=10,f=5,p=1500,m=60,h=1.5;function g(e){return`${Math.floor(e/60)}:${(e%60).toString().padStart(2,`0`)}`}function _(e){return e instanceof HTMLElement?e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?!0:e.isContentEditable:!1}var v=[{keys:`→ / Space / Page Down`,action:`Next slide`},{keys:`← / Page Up`,action:`Previous slide`},{keys:`Home / End`,action:`First / last slide`},{keys:`0–9, then Enter`,action:`Jump to a slide number`},{keys:`B`,action:`Blackout the screen`},{keys:`W`,action:`Whiteout the screen`},{keys:`F`,action:`Toggle fullscreen`},{keys:`O or G`,action:`Overview — every slide at once`},{keys:`S`,action:`Presenter notes`},{keys:`R`,action:`Reset the timer`},{keys:`X`,action:`Skip this slide for this run (restore it from the overview)`},{keys:`?`,action:`This help`},{keys:`Esc`,action:`Close the topmost panel — or end the show`}];function ee(e){let t=(0,c.c)(24),{slides:n,skipped:i,skin:a,selected:o,presentedIndex:s,onJump:l,onToggleSkip:d,onClose:f}=e,p;t[0]===f?p=t[1]:(p=(0,u.jsx)(`button`,{type:`button`,className:`preso-overview-close`,onClick:f,"aria-label":`Close overview`,children:`×`}),t[0]=f,t[1]=p);let m;t[2]===i.size?m=t[3]:(m=i.size>0&&(0,u.jsxs)(`div`,{className:`preso-overview-skipnote`,children:[i.size,` slide`,i.size===1?``:`s`,` skipped this run`]}),t[2]=i.size,t[3]=m);let h;if(t[4]!==l||t[5]!==d||t[6]!==s||t[7]!==o||t[8]!==a||t[9]!==n){let e;t[11]!==l||t[12]!==d||t[13]!==s||t[14]!==o||t[15]!==a||t[16]!==n.length?(e=(e,t)=>{let i=s(t),c=i<0;return(0,u.jsxs)(`div`,{className:`preso-overview-cell`+(!c&&i===o?` is-selected`:``)+(c?` is-skipped`:``),children:[(0,u.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":!c&&i===o,className:`preso-overview-open`,"aria-label":c?`Slide ${t+1}, skipped — restore it`:`Go to slide ${t+1}`,onClick:()=>c?d(e.id):l(i),children:[(0,u.jsx)(`span`,{className:`preso-overview-thumb`,children:(0,u.jsx)(r,{slide:e,skin:a,ctx:{index:t,total:n.length}})}),(0,u.jsx)(`span`,{className:`preso-overview-num`,children:t+1})]}),(0,u.jsx)(`button`,{type:`button`,className:`preso-overview-skip`,"aria-label":c?`Restore slide ${t+1}`:`Skip slide ${t+1} this run`,title:c?`Restore`:`Skip for this run`,onClick:()=>d(e.id),children:c?`↩`:`×`})]},e.id)},t[11]=l,t[12]=d,t[13]=s,t[14]=o,t[15]=a,t[16]=n.length,t[17]=e):e=t[17],h=n.map(e),t[4]=l,t[5]=d,t[6]=s,t[7]=o,t[8]=a,t[9]=n,t[10]=h}else h=t[10];let g;t[18]===h?g=t[19]:(g=(0,u.jsx)(`div`,{className:`preso-overview-grid`,children:h}),t[18]=h,t[19]=g);let _;return t[20]!==p||t[21]!==m||t[22]!==g?(_=(0,u.jsxs)(`div`,{className:`preso-overview`,role:`listbox`,"aria-label":`All slides`,children:[p,m,g]}),t[20]=p,t[21]=m,t[22]=g,t[23]=_):_=t[23],_}function te(e){let t=(0,c.c)(6),{onClose:n}=e,r;t[0]===n?r=t[1]:(r=(0,u.jsx)(`button`,{type:`button`,className:`preso-help-close`,onClick:n,"aria-label":`Close help`,children:`×`}),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,u.jsx)(`h2`,{className:`preso-help-title`,children:`Keyboard shortcuts`}),t[2]=i):i=t[2];let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,u.jsx)(`dl`,{className:`preso-help-list`,children:v.map(y)}),t[3]=a):a=t[3];let o;return t[4]===r?o=t[5]:(o=(0,u.jsxs)(`div`,{className:`preso-help`,role:`dialog`,"aria-modal":`true`,"aria-label":`Keyboard shortcuts`,children:[r,i,a]}),t[4]=r,t[5]=o),o}function y(e){return(0,u.jsxs)(`div`,{className:`preso-help-row`,children:[(0,u.jsx)(`dt`,{children:e.keys}),(0,u.jsx)(`dd`,{children:e.action})]},e.keys)}function ne(e){let t=(0,c.c)(3),{mode:n,onDismiss:r}=e,i=`preso-curtain preso-curtain-${n}`,a;return t[0]!==r||t[1]!==i?(a=(0,u.jsx)(`div`,{className:i,role:`presentation`,onClick:r}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a}function b({spec:e,question:t,narration:n,skinId:c,autoAdvanceMs:v,onExit:y}){let[b]=(0,l.useState)(()=>Date.now()),x=(0,l.useMemo)(()=>a(e?[e]:[],b),[e,b]).slides,[S,re]=(0,l.useState)(new Set),C=(0,l.useMemo)(()=>x.filter(e=>!S.has(e.id)),[x,S]),w=(0,l.useCallback)(e=>{re(t=>{let n=new Set(t);return n.has(e)?n.delete(e):x.filter(e=>!t.has(e.id)).length>1&&n.add(e),n})},[x]),T=o[c],[E,D]=(0,l.useState)(0),[O,k]=(0,l.useState)(!1),[ie,ae]=(0,l.useState)(0),[A,j]=(0,l.useState)(null),[M,N]=(0,l.useState)(!1),[P,F]=(0,l.useState)(0),[I,L]=(0,l.useState)(!1),[R,z]=(0,l.useState)(``),oe=(0,l.useRef)(null),B=(0,l.useRef)(null),V=(0,l.useRef)(null),H=C.length,U=(0,l.useCallback)(e=>Math.max(0,Math.min(H-1,e)),[H]),W=(0,l.useCallback)(()=>D(e=>U(e+1)),[U]),G=(0,l.useCallback)(()=>D(e=>U(e-1)),[U]),K=(0,l.useCallback)(()=>ae(0),[]),q=(0,l.useCallback)(()=>{let e=oe.current;e&&(document.fullscreenElement===e?document.exitFullscreen().catch(()=>{}):e.requestFullscreen?.().catch(()=>{}))},[]);(0,l.useEffect)(()=>()=>{B.current!==null&&window.clearTimeout(B.current)},[]);let se=(0,l.useCallback)(e=>{z(t=>t+e),B.current!==null&&window.clearTimeout(B.current),B.current=window.setTimeout(()=>z(``),p)},[]),ce=(0,l.useCallback)(()=>{B.current!==null&&(window.clearTimeout(B.current),B.current=null),R&&D(U(Number(R)-1)),z(``)},[R,U]);(0,l.useEffect)(()=>{let e=window.setInterval(()=>{s()||ae(e=>e+1)},1e3);return()=>window.clearInterval(e)},[]),(0,l.useEffect)(()=>{if(!v)return;let e=window.setInterval(()=>{s()||D(e=>e>=H-1?e:U(e+1))},v);return()=>window.clearInterval(e)},[v,H,U]),(0,l.useEffect)(()=>{let e=e=>{if(!_(e.target)){if(e.key===`Escape`){I?(e.preventDefault(),e.stopPropagation(),L(!1)):M?(e.preventDefault(),e.stopPropagation(),N(!1)):A?(e.preventDefault(),e.stopPropagation(),j(null)):O?(e.preventDefault(),e.stopPropagation(),k(!1)):y();return}if(I){e.key===`?`&&(e.preventDefault(),L(!1));return}if(M){if(e.key===`ArrowRight`){e.preventDefault(),F(e=>Math.min(H-1,e+1));return}else if(e.key===`ArrowLeft`){e.preventDefault(),F(e=>Math.max(0,e-1));return}else if(e.key===`ArrowDown`){e.preventDefault(),F(e=>Math.min(H-1,e+f));return}else if(e.key===`ArrowUp`){e.preventDefault(),F(e=>Math.max(0,e-f));return}else if(e.key===`Enter`){e.preventDefault(),D(P),N(!1);return}}if(R&&!/^[0-9]$/.test(e.key)&&e.key!==`Enter`&&(B.current!==null&&(window.clearTimeout(B.current),B.current=null),z(``)),e.key===`ArrowRight`||e.key===`PageDown`||e.key===` `)e.preventDefault(),j(null),W();else if(e.key===`ArrowLeft`||e.key===`PageUp`)e.preventDefault(),j(null),G();else if(e.key===`Home`)e.preventDefault(),j(null),D(0);else if(e.key===`End`)e.preventDefault(),j(null),D(H-1);else if(e.key===`s`||e.key===`S`)k(e=>!e);else if(e.key===`b`||e.key===`B`)j(e=>e===`black`?null:`black`);else if(e.key===`w`||e.key===`W`)j(e=>e===`white`?null:`white`);else if(e.key===`f`||e.key===`F`)q();else if(e.key===`o`||e.key===`O`||e.key===`g`||e.key===`G`)M?N(!1):(F(U(E)),N(!0));else if(e.key===`?`)L(e=>!e);else if(e.key===`x`||e.key===`X`){let e=C[U(E)];e&&w(e.id)}else e.key===`r`||e.key===`R`?K():e.key===`Enter`?R&&(e.preventDefault(),ce()):/^[0-9]$/.test(e.key)&&(e.preventDefault(),se(e.key))}};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},[W,G,H,U,E,y,I,M,P,A,O,R,q,K,se,ce,C,w]);let J=U(E),Y=C[J],X=(0,l.useRef)(J),le=J>=X.current?`next`:`prev`,[Z,Q]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(X.current===J)return;Q(X.current),X.current=J;let e=window.setTimeout(()=>Q(null),380);return()=>window.clearTimeout(e)},[J]);let ue=Y?.notes??(Y?.kind===`cover`?n||t||``:i(Y)),$=C[J+1],de=$?i($):`— end —`,fe=H?Math.round((J+1)/H*100):0,pe=(0,l.useCallback)(e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`||e.target instanceof Element&&e.target.closest(`button`)||(V.current={x:e.clientX,y:e.clientY})},[]),me=(0,l.useCallback)(e=>{let t=V.current;if(V.current=null,!t||e.pointerType!==`touch`&&e.pointerType!==`pen`)return;let n=e.clientX-t.x,r=e.clientY-t.y;Math.abs(n)<m||Math.abs(n)<Math.abs(r)*h||(j(null),n<0?W():G())},[W,G]);return(0,u.jsxs)(`div`,{className:`preso-deck`,role:`region`,"aria-label":`Presentation`,style:{background:`#0a0c11`},ref:oe,children:[(0,u.jsx)(`div`,{className:`preso-sr`,"aria-live":`polite`,"aria-atomic":`true`,children:A?A===`black`?`Screen blacked out.`:`Screen whited out.`:H?`Slide ${J+1} of ${H}: ${i(Y)||Y?.kind||``}`:``}),(0,u.jsx)(`div`,{className:`preso-stage`,onPointerDown:pe,onPointerUp:me,children:(0,u.jsxs)(`div`,{className:`preso-skinframe`,style:{aspectRatio:`16 / 9`,width:`min(86vw, calc(84vh * 16 / 9))`,margin:`auto`,position:`relative`,borderRadius:12,overflow:`hidden`,border:`1px solid rgba(255,255,255,.08)`,boxShadow:`0 30px 90px rgba(0,0,0,.55)`},children:[Z!==null&&Z!==J&&C[Z]&&(0,u.jsx)(`div`,{className:`preso-slide-ghost`,"aria-hidden":!0,children:(0,u.jsx)(r,{slide:C[Z],skin:T,ctx:{index:Z,total:H}})}),Y&&(0,u.jsx)(`div`,{className:`preso-slide-anim preso-dir-${le}`,children:(0,u.jsx)(r,{slide:Y,skin:T,ctx:{index:J,total:H}})},J)]})}),(0,u.jsx)(`button`,{type:`button`,className:`preso-zone preso-zone-prev`,onClick:G,"aria-label":`Previous slide`,disabled:E===0}),(0,u.jsx)(`button`,{type:`button`,className:`preso-zone preso-zone-next`,onClick:W,"aria-label":`Next slide`,disabled:E>=H-1}),(0,u.jsxs)(`div`,{className:`preso-rail`,children:[R&&(0,u.jsxs)(`span`,{className:`preso-jumpchip`,role:`status`,children:[(0,u.jsx)(`span`,{"aria-hidden":!0,children:`→`}),` `,R]}),(0,u.jsxs)(`span`,{className:`preso-count`,children:[J+1,` / `,H]}),(0,u.jsx)(`button`,{type:`button`,className:`preso-jump`,onClick:()=>D(0),"aria-label":`First slide`,disabled:J===0,children:`⤒`}),H<=d&&(0,u.jsx)(`div`,{className:`preso-dots`,role:`presentation`,children:C.map((e,t)=>(0,u.jsx)(`button`,{type:`button`,className:`preso-dot`+(t===J?` is-active`:``),onClick:()=>D(t),"aria-label":`Go to slide ${t+1}`,"aria-current":t===J},t))}),(0,u.jsx)(`button`,{type:`button`,className:`preso-jump`,onClick:()=>D(H-1),"aria-label":`Last slide`,disabled:J>=H-1,children:`⤓`}),(0,u.jsx)(`button`,{type:`button`,className:`preso-notes-btn`+(O?` is-on`:``),onClick:()=>k(e=>!e),"aria-pressed":O,title:`Presenter notes (S)`,children:`Notes`})]}),O&&(0,u.jsxs)(`aside`,{className:`preso-presenter`,"aria-label":`Presenter notes`,children:[(0,u.jsxs)(`div`,{className:`preso-presenter-head`,children:[(0,u.jsx)(`button`,{type:`button`,className:`preso-timer`,onClick:K,title:`Reset timer (R)`,children:g(ie)}),(0,u.jsxs)(`span`,{className:`preso-presenter-pct`,children:[fe,`%`]}),(0,u.jsx)(`button`,{type:`button`,className:`preso-presenter-close`,onClick:()=>k(!1),"aria-label":`Hide presenter notes`,children:`×`})]}),(0,u.jsx)(`div`,{className:`preso-presenter-progress`,"aria-hidden":!0,children:(0,u.jsx)(`span`,{style:{width:`${fe}%`}})}),(0,u.jsxs)(`p`,{className:`preso-presenter-slide`,children:[J+1,`. `,i(Y)||Y?.kind]}),(0,u.jsx)(`p`,{className:`preso-presenter-notes`,children:ue||`No notes for this slide.`}),(0,u.jsxs)(`div`,{className:`preso-presenter-next`,children:[(0,u.jsx)(`span`,{className:`preso-presenter-next-label`,children:`Next`}),$?(0,u.jsx)(`div`,{className:`preso-presenter-thumb`,children:(0,u.jsx)(r,{slide:$,skin:T,ctx:{index:J+1,total:H}})}):null,(0,u.jsx)(`span`,{className:`preso-presenter-next-text`,children:de})]})]}),A&&(0,u.jsx)(ne,{mode:A,onDismiss:()=>j(null)}),M&&(0,u.jsx)(ee,{slides:x,skipped:S,skin:T,selected:P,presentedIndex:e=>S.has(x[e].id)?-1:x.slice(0,e).filter(e=>!S.has(e.id)).length,onJump:e=>{D(e),N(!1)},onToggleSkip:w,onClose:()=>N(!1)}),I&&(0,u.jsx)(te,{onClose:()=>L(!1)})]})}export{b as PresentationDeck};
1
+ import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-BlCH2LG4.js";import{i as r,n as i,o as a}from"./notes-0ZgJ597y.js";import{t as o}from"./registry-D5sMUiCn.js";import{t as s}from"./pageVisibility-BxUVsw7Z.js";var c=n(),l=e(),u=t(),d=10,f=5,p=1500,m=60,h=1.5;function g(e){return`${Math.floor(e/60)}:${(e%60).toString().padStart(2,`0`)}`}function _(e){return e instanceof HTMLElement?e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?!0:e.isContentEditable:!1}var v=[{keys:`→ / Space / Page Down`,action:`Next slide`},{keys:`← / Page Up`,action:`Previous slide`},{keys:`Home / End`,action:`First / last slide`},{keys:`0–9, then Enter`,action:`Jump to a slide number`},{keys:`B`,action:`Blackout the screen`},{keys:`W`,action:`Whiteout the screen`},{keys:`F`,action:`Toggle fullscreen`},{keys:`O or G`,action:`Overview — every slide at once`},{keys:`S`,action:`Presenter notes`},{keys:`R`,action:`Reset the timer`},{keys:`X`,action:`Skip this slide for this run (restore it from the overview)`},{keys:`?`,action:`This help`},{keys:`Esc`,action:`Close the topmost panel — or end the show`}];function ee(e){let t=(0,c.c)(24),{slides:n,skipped:i,skin:a,selected:o,presentedIndex:s,onJump:l,onToggleSkip:d,onClose:f}=e,p;t[0]===f?p=t[1]:(p=(0,u.jsx)(`button`,{type:`button`,className:`preso-overview-close`,onClick:f,"aria-label":`Close overview`,children:`×`}),t[0]=f,t[1]=p);let m;t[2]===i.size?m=t[3]:(m=i.size>0&&(0,u.jsxs)(`div`,{className:`preso-overview-skipnote`,children:[i.size,` slide`,i.size===1?``:`s`,` skipped this run`]}),t[2]=i.size,t[3]=m);let h;if(t[4]!==l||t[5]!==d||t[6]!==s||t[7]!==o||t[8]!==a||t[9]!==n){let e;t[11]!==l||t[12]!==d||t[13]!==s||t[14]!==o||t[15]!==a||t[16]!==n.length?(e=(e,t)=>{let i=s(t),c=i<0;return(0,u.jsxs)(`div`,{className:`preso-overview-cell`+(!c&&i===o?` is-selected`:``)+(c?` is-skipped`:``),children:[(0,u.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":!c&&i===o,className:`preso-overview-open`,"aria-label":c?`Slide ${t+1}, skipped — restore it`:`Go to slide ${t+1}`,onClick:()=>c?d(e.id):l(i),children:[(0,u.jsx)(`span`,{className:`preso-overview-thumb`,children:(0,u.jsx)(r,{slide:e,skin:a,ctx:{index:t,total:n.length}})}),(0,u.jsx)(`span`,{className:`preso-overview-num`,children:t+1})]}),(0,u.jsx)(`button`,{type:`button`,className:`preso-overview-skip`,"aria-label":c?`Restore slide ${t+1}`:`Skip slide ${t+1} this run`,title:c?`Restore`:`Skip for this run`,onClick:()=>d(e.id),children:c?`↩`:`×`})]},e.id)},t[11]=l,t[12]=d,t[13]=s,t[14]=o,t[15]=a,t[16]=n.length,t[17]=e):e=t[17],h=n.map(e),t[4]=l,t[5]=d,t[6]=s,t[7]=o,t[8]=a,t[9]=n,t[10]=h}else h=t[10];let g;t[18]===h?g=t[19]:(g=(0,u.jsx)(`div`,{className:`preso-overview-grid`,children:h}),t[18]=h,t[19]=g);let _;return t[20]!==p||t[21]!==m||t[22]!==g?(_=(0,u.jsxs)(`div`,{className:`preso-overview`,role:`listbox`,"aria-label":`All slides`,children:[p,m,g]}),t[20]=p,t[21]=m,t[22]=g,t[23]=_):_=t[23],_}function te(e){let t=(0,c.c)(6),{onClose:n}=e,r;t[0]===n?r=t[1]:(r=(0,u.jsx)(`button`,{type:`button`,className:`preso-help-close`,onClick:n,"aria-label":`Close help`,children:`×`}),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,u.jsx)(`h2`,{className:`preso-help-title`,children:`Keyboard shortcuts`}),t[2]=i):i=t[2];let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,u.jsx)(`dl`,{className:`preso-help-list`,children:v.map(y)}),t[3]=a):a=t[3];let o;return t[4]===r?o=t[5]:(o=(0,u.jsxs)(`div`,{className:`preso-help`,role:`dialog`,"aria-modal":`true`,"aria-label":`Keyboard shortcuts`,children:[r,i,a]}),t[4]=r,t[5]=o),o}function y(e){return(0,u.jsxs)(`div`,{className:`preso-help-row`,children:[(0,u.jsx)(`dt`,{children:e.keys}),(0,u.jsx)(`dd`,{children:e.action})]},e.keys)}function ne(e){let t=(0,c.c)(3),{mode:n,onDismiss:r}=e,i=`preso-curtain preso-curtain-${n}`,a;return t[0]!==r||t[1]!==i?(a=(0,u.jsx)(`div`,{className:i,role:`presentation`,onClick:r}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a}function b({spec:e,question:t,narration:n,skinId:c,autoAdvanceMs:v,onExit:y}){let[b]=(0,l.useState)(()=>Date.now()),x=(0,l.useMemo)(()=>a(e?[e]:[],b),[e,b]).slides,[S,re]=(0,l.useState)(new Set),C=(0,l.useMemo)(()=>x.filter(e=>!S.has(e.id)),[x,S]),w=(0,l.useCallback)(e=>{re(t=>{let n=new Set(t);return n.has(e)?n.delete(e):x.filter(e=>!t.has(e.id)).length>1&&n.add(e),n})},[x]),T=o[c],[E,D]=(0,l.useState)(0),[O,k]=(0,l.useState)(!1),[ie,ae]=(0,l.useState)(0),[A,j]=(0,l.useState)(null),[M,N]=(0,l.useState)(!1),[P,F]=(0,l.useState)(0),[I,L]=(0,l.useState)(!1),[R,z]=(0,l.useState)(``),oe=(0,l.useRef)(null),B=(0,l.useRef)(null),V=(0,l.useRef)(null),H=C.length,U=(0,l.useCallback)(e=>Math.max(0,Math.min(H-1,e)),[H]),W=(0,l.useCallback)(()=>D(e=>U(e+1)),[U]),G=(0,l.useCallback)(()=>D(e=>U(e-1)),[U]),K=(0,l.useCallback)(()=>ae(0),[]),q=(0,l.useCallback)(()=>{let e=oe.current;e&&(document.fullscreenElement===e?document.exitFullscreen().catch(()=>{}):e.requestFullscreen?.().catch(()=>{}))},[]);(0,l.useEffect)(()=>()=>{B.current!==null&&window.clearTimeout(B.current)},[]);let se=(0,l.useCallback)(e=>{z(t=>t+e),B.current!==null&&window.clearTimeout(B.current),B.current=window.setTimeout(()=>z(``),p)},[]),ce=(0,l.useCallback)(()=>{B.current!==null&&(window.clearTimeout(B.current),B.current=null),R&&D(U(Number(R)-1)),z(``)},[R,U]);(0,l.useEffect)(()=>{let e=window.setInterval(()=>{s()||ae(e=>e+1)},1e3);return()=>window.clearInterval(e)},[]),(0,l.useEffect)(()=>{if(!v)return;let e=window.setInterval(()=>{s()||D(e=>e>=H-1?e:U(e+1))},v);return()=>window.clearInterval(e)},[v,H,U]),(0,l.useEffect)(()=>{let e=e=>{if(!_(e.target)){if(e.key===`Escape`){I?(e.preventDefault(),e.stopPropagation(),L(!1)):M?(e.preventDefault(),e.stopPropagation(),N(!1)):A?(e.preventDefault(),e.stopPropagation(),j(null)):O?(e.preventDefault(),e.stopPropagation(),k(!1)):y();return}if(I){e.key===`?`&&(e.preventDefault(),L(!1));return}if(M){if(e.key===`ArrowRight`){e.preventDefault(),F(e=>Math.min(H-1,e+1));return}else if(e.key===`ArrowLeft`){e.preventDefault(),F(e=>Math.max(0,e-1));return}else if(e.key===`ArrowDown`){e.preventDefault(),F(e=>Math.min(H-1,e+f));return}else if(e.key===`ArrowUp`){e.preventDefault(),F(e=>Math.max(0,e-f));return}else if(e.key===`Enter`){e.preventDefault(),D(P),N(!1);return}}if(R&&!/^[0-9]$/.test(e.key)&&e.key!==`Enter`&&(B.current!==null&&(window.clearTimeout(B.current),B.current=null),z(``)),e.key===`ArrowRight`||e.key===`PageDown`||e.key===` `)e.preventDefault(),j(null),W();else if(e.key===`ArrowLeft`||e.key===`PageUp`)e.preventDefault(),j(null),G();else if(e.key===`Home`)e.preventDefault(),j(null),D(0);else if(e.key===`End`)e.preventDefault(),j(null),D(H-1);else if(e.key===`s`||e.key===`S`)k(e=>!e);else if(e.key===`b`||e.key===`B`)j(e=>e===`black`?null:`black`);else if(e.key===`w`||e.key===`W`)j(e=>e===`white`?null:`white`);else if(e.key===`f`||e.key===`F`)q();else if(e.key===`o`||e.key===`O`||e.key===`g`||e.key===`G`)M?N(!1):(F(U(E)),N(!0));else if(e.key===`?`)L(e=>!e);else if(e.key===`x`||e.key===`X`){let e=C[U(E)];e&&w(e.id)}else e.key===`r`||e.key===`R`?K():e.key===`Enter`?R&&(e.preventDefault(),ce()):/^[0-9]$/.test(e.key)&&(e.preventDefault(),se(e.key))}};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},[W,G,H,U,E,y,I,M,P,A,O,R,q,K,se,ce,C,w]);let J=U(E),Y=C[J],X=(0,l.useRef)(J),le=J>=X.current?`next`:`prev`,[Z,Q]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(X.current===J)return;Q(X.current),X.current=J;let e=window.setTimeout(()=>Q(null),380);return()=>window.clearTimeout(e)},[J]);let ue=Y?.notes??(Y?.kind===`cover`?n||t||``:i(Y)),$=C[J+1],de=$?i($):`— end —`,fe=H?Math.round((J+1)/H*100):0,pe=(0,l.useCallback)(e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`||e.target instanceof Element&&e.target.closest(`button`)||(V.current={x:e.clientX,y:e.clientY})},[]),me=(0,l.useCallback)(e=>{let t=V.current;if(V.current=null,!t||e.pointerType!==`touch`&&e.pointerType!==`pen`)return;let n=e.clientX-t.x,r=e.clientY-t.y;Math.abs(n)<m||Math.abs(n)<Math.abs(r)*h||(j(null),n<0?W():G())},[W,G]);return(0,u.jsxs)(`div`,{className:`preso-deck`,role:`region`,"aria-label":`Presentation`,style:{background:`#0a0c11`},ref:oe,children:[(0,u.jsx)(`div`,{className:`preso-sr`,"aria-live":`polite`,"aria-atomic":`true`,children:A?A===`black`?`Screen blacked out.`:`Screen whited out.`:H?`Slide ${J+1} of ${H}: ${i(Y)||Y?.kind||``}`:``}),(0,u.jsx)(`div`,{className:`preso-stage`,onPointerDown:pe,onPointerUp:me,children:(0,u.jsxs)(`div`,{className:`preso-skinframe`,style:{aspectRatio:`16 / 9`,width:`min(86vw, calc(84vh * 16 / 9))`,margin:`auto`,position:`relative`,borderRadius:12,overflow:`hidden`,border:`1px solid rgba(255,255,255,.08)`,boxShadow:`0 30px 90px rgba(0,0,0,.55)`},children:[Z!==null&&Z!==J&&C[Z]&&(0,u.jsx)(`div`,{className:`preso-slide-ghost`,"aria-hidden":!0,children:(0,u.jsx)(r,{slide:C[Z],skin:T,ctx:{index:Z,total:H}})}),Y&&(0,u.jsx)(`div`,{className:`preso-slide-anim preso-dir-${le}`,children:(0,u.jsx)(r,{slide:Y,skin:T,ctx:{index:J,total:H}})},J)]})}),(0,u.jsx)(`button`,{type:`button`,className:`preso-zone preso-zone-prev`,onClick:G,"aria-label":`Previous slide`,disabled:E===0}),(0,u.jsx)(`button`,{type:`button`,className:`preso-zone preso-zone-next`,onClick:W,"aria-label":`Next slide`,disabled:E>=H-1}),(0,u.jsxs)(`div`,{className:`preso-rail`,children:[R&&(0,u.jsxs)(`span`,{className:`preso-jumpchip`,role:`status`,children:[(0,u.jsx)(`span`,{"aria-hidden":!0,children:`→`}),` `,R]}),(0,u.jsxs)(`span`,{className:`preso-count`,children:[J+1,` / `,H]}),(0,u.jsx)(`button`,{type:`button`,className:`preso-jump`,onClick:()=>D(0),"aria-label":`First slide`,disabled:J===0,children:`⤒`}),H<=d&&(0,u.jsx)(`div`,{className:`preso-dots`,role:`presentation`,children:C.map((e,t)=>(0,u.jsx)(`button`,{type:`button`,className:`preso-dot`+(t===J?` is-active`:``),onClick:()=>D(t),"aria-label":`Go to slide ${t+1}`,"aria-current":t===J},t))}),(0,u.jsx)(`button`,{type:`button`,className:`preso-jump`,onClick:()=>D(H-1),"aria-label":`Last slide`,disabled:J>=H-1,children:`⤓`}),(0,u.jsx)(`button`,{type:`button`,className:`preso-notes-btn`+(O?` is-on`:``),onClick:()=>k(e=>!e),"aria-pressed":O,title:`Presenter notes (S)`,children:`Notes`})]}),O&&(0,u.jsxs)(`aside`,{className:`preso-presenter`,"aria-label":`Presenter notes`,children:[(0,u.jsxs)(`div`,{className:`preso-presenter-head`,children:[(0,u.jsx)(`button`,{type:`button`,className:`preso-timer`,onClick:K,title:`Reset timer (R)`,children:g(ie)}),(0,u.jsxs)(`span`,{className:`preso-presenter-pct`,children:[fe,`%`]}),(0,u.jsx)(`button`,{type:`button`,className:`preso-presenter-close`,onClick:()=>k(!1),"aria-label":`Hide presenter notes`,children:`×`})]}),(0,u.jsx)(`div`,{className:`preso-presenter-progress`,"aria-hidden":!0,children:(0,u.jsx)(`span`,{style:{width:`${fe}%`}})}),(0,u.jsxs)(`p`,{className:`preso-presenter-slide`,children:[J+1,`. `,i(Y)||Y?.kind]}),(0,u.jsx)(`p`,{className:`preso-presenter-notes`,children:ue||`No notes for this slide.`}),(0,u.jsxs)(`div`,{className:`preso-presenter-next`,children:[(0,u.jsx)(`span`,{className:`preso-presenter-next-label`,children:`Next`}),$?(0,u.jsx)(`div`,{className:`preso-presenter-thumb`,children:(0,u.jsx)(r,{slide:$,skin:T,ctx:{index:J+1,total:H}})}):null,(0,u.jsx)(`span`,{className:`preso-presenter-next-text`,children:de})]})]}),A&&(0,u.jsx)(ne,{mode:A,onDismiss:()=>j(null)}),M&&(0,u.jsx)(ee,{slides:x,skipped:S,skin:T,selected:P,presentedIndex:e=>S.has(x[e].id)?-1:x.slice(0,e).filter(e=>!S.has(e.id)).length,onJump:e=>{D(e),N(!1)},onToggleSkip:w,onClose:()=>N(!1)}),I&&(0,u.jsx)(te,{onClose:()=>L(!1)})]})}export{b as PresentationDeck};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PrismOverlay-B7lEspdu.js","assets/index-y8GL67bB.js","assets/chunk-BVpWp9h4.js","assets/jsx-runtime-DaSxXjOY.js","assets/react-BQSORdFI.js","assets/lazyRetry-D50B1UMY.js","assets/index-CepQEz75.css","assets/providers-wzm7E8Pa.js","assets/http-CJCtjYpA.js","assets/info-CiqHR5cs.js","assets/sourceHost-BV3t2XDb.js","assets/toast-BBNs2h3L.js","assets/penStrokes-9Q_l7NTt.js","assets/gesture-DabMpPcq.js","assets/citation-BcvmjKS8.js","assets/verbatim-CBMzUDlf.js","assets/officeDoc-B6nEhNp4.js","assets/search-DnjHupRf.js","assets/streamParse-DRgMHWye.js","assets/useFocusTrap-DbfG6zbM.js","assets/PrismOverlay-BTfAicBt.css"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{I as n,J as r,L as i,M as a,N as o,ht as s,k as ee,q as c}from"./index-y8GL67bB.js";import{n as l}from"./icons-CHVz6kv_.js";import{t as te}from"./FeatureUseNotice-DPtQ0OGb.js";import{c as ne,i as re,p as ie,u as ae}from"./providers-wzm7E8Pa.js";import{t as oe}from"./homeTarget-BgWKI_E1.js";import{l as se,n as ce}from"./useLiveConfig-X9Wxh90k.js";/* empty css */var u=s(),d=e(),f=t();r();var p=n(()=>c(()=>import(`./PrismOverlay-B7lEspdu.js`).then(e=>({default:e.PrismOverlay})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),le=p.Component,m={"too-large":`File is too large. Documents up to 40 MB, images up to 10 MB.`,unsupported:`Unsupported file type. Try a PDF, Word doc, spreadsheet, image, or text file.`};function h(){let e=(0,u.c)(40),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=oe(),e[0]=t):t=e[0];let n=t,r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[1]=r):r=e[1],(0,d.useEffect)(de,r);let a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],e[2]=a):a=e[2];let[o,s]=(0,d.useState)(a),[c,h]=(0,d.useState)(null),[b,x]=(0,d.useState)(!1),[S,C]=(0,d.useState)(!1),[w,T]=(0,d.useState)(null),E=(0,d.useRef)(null),D;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(D=se(ce()),e[3]=D):D=e[3];let fe=D,O;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(O=async e=>{if(!e||e.length===0)return;p.preload().catch(y),T(null);let t=Array.from(e).flatMap(e=>{let t=ne(e);return t?(T(m[t]),[]):[e]});t.length>0&&s(e=>{let n=new Set(e.map(v));return[...e,...t.filter(e=>!n.has(e.name))]}),E.current&&(E.current.value=``)},e[4]=O):O=e[4];let k=O,A;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>{s(t=>t.filter(t=>t.name!==e))},e[5]=A):A=e[5];let pe=A,j;e[6]!==b||e[7]!==o?(j=async()=>{if(o.length===0||b)return;x(!0),T(null),p.preload().catch(_);let e=await Promise.all(o.map(ie)),t=e.flatMap(g);t.length===o.length?h(t):T(m[e.find(ue)?.error??`unsupported`]),x(!1)},e[6]=b,e[7]=o,e[8]=j):j=e[8];let M=j,N;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>{e.preventDefault(),C(!1),k(e.dataTransfer.files)},e[9]=N):N=e[9];let P=N,F;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>{e.preventDefault(),C(!0)},e[10]=F):F=e[10];let me=F,I;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>{e.currentTarget.contains(e.relatedTarget)||C(!1)},e[11]=I):I=e[11];let he=I;if(c){let t;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(t=()=>h(null),e[12]=t):t=e[12];let n;return e[13]===c?n=e[14]:(n=(0,f.jsx)(ee,{label:`Prism workbench`,overlay:!0,children:(0,f.jsx)(le,{pdf:c,cfg:fe,onClose:t})}),e[13]=c,e[14]=n),n}let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>{window.location.hash=n.href},e[15]=L):L=e[15];let R;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,f.jsxs)(`header`,{className:`prism-app-header`,children:[(0,f.jsx)(`button`,{type:`button`,className:`prism-app-back`,onClick:L,"aria-label":`Back to ${n.label}`,title:`Back to ${n.label}`,children:(0,f.jsx)(l.chevL,{})}),(0,f.jsx)(`span`,{className:`prism-app-brand`,children:`Prism`})]}),e[16]=R):R=e[16];let z;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,f.jsxs)(`div`,{className:`prism-app-hero`,children:[(0,f.jsx)(`h1`,{className:`prism-app-title`,children:`Understand any document`}),(0,f.jsx)(`p`,{className:`prism-app-lede`,children:`Drop a PDF, Word doc, spreadsheet, or text file. Prism maps every claim, finding, and risk — every card cites its exact source.`}),(0,f.jsx)(te,{kind:`upload`})]}),e[17]=z):z=e[17];let B=`prism-dropzone${S?` prism-dropzone--over`:``}`,V;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>E.current?.click(),e[18]=V):V=e[18];let H,U;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>{(e.key===`Enter`||e.key===` `)&&E.current?.click()},U=i(p.preload),e[19]=H,e[20]=U):(H=e[19],U=e[20]);let W,G;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,f.jsx)(`input`,{ref:E,type:`file`,accept:re,multiple:!0,className:`prism-dropzone-input`,onChange:e=>void k(e.target.files),"aria-hidden":`true`}),G=(0,f.jsx)(l.upload,{}),e[21]=W,e[22]=G):(W=e[21],G=e[22]);let K=S?`Drop to add`:o.length>0?`Drop more files or click to add`:`Drop files or click to browse`,q;e[23]===K?q=e[24]:(q=(0,f.jsx)(`span`,{className:`prism-dropzone-label`,children:K}),e[23]=K,e[24]=q);let J;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,f.jsx)(`span`,{className:`prism-dropzone-hint`,children:`PDF · Word · Excel · PowerPoint · Image · Text`}),e[25]=J):J=e[25];let Y;e[26]!==B||e[27]!==q?(Y=(0,f.jsxs)(`div`,{className:B,onDrop:P,onDragOver:me,onDragLeave:he,onClick:V,role:`button`,tabIndex:0,"aria-label":`Upload a document`,onKeyDown:H,...U,children:[W,G,q,J]}),e[26]=B,e[27]=q,e[28]=Y):Y=e[28];let X;e[29]===w?X=e[30]:(X=w&&(0,f.jsx)(`p`,{className:`prism-app-error`,role:`alert`,children:w}),e[29]=w,e[30]=X);let Z;e[31]!==M||e[32]!==b||e[33]!==o?(Z=o.length>0&&(0,f.jsxs)(`div`,{className:`prism-staged`,children:[(0,f.jsx)(`p`,{className:`prism-staged-label`,children:o.length===1?`1 document ready`:`${o.length} documents ready`}),(0,f.jsx)(`ul`,{className:`prism-staged-list`,children:o.map(e=>(0,f.jsxs)(`li`,{className:`prism-staged-item`,children:[(0,f.jsx)(l.doc,{}),(0,f.jsx)(`span`,{className:`prism-staged-name`,children:ae({name:e.name,mime:e.type,data:``,size:e.size})}),(0,f.jsx)(`button`,{type:`button`,className:`prism-staged-remove`,onClick:t=>{t.stopPropagation(),pe(e.name)},"aria-label":`Remove ${e.name}`,children:(0,f.jsx)(l.x,{})})]},e.name))}),(0,f.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>void M(),disabled:b,...i(p.preload),children:[b?`Preparing documents…`:`Open in Prism`,(0,f.jsx)(l.chevR,{})]})]}),e[31]=M,e[32]=b,e[33]=o,e[34]=Z):Z=e[34];let Q;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,f.jsxs)(`ul`,{className:`prism-app-features`,children:[(0,f.jsxs)(`li`,{children:[(0,f.jsx)(`strong`,{children:`Maps claims spatially`}),` — regions, findings, and risks laid out so you can see the whole shape at once.`]}),(0,f.jsxs)(`li`,{children:[(0,f.jsx)(`strong`,{children:`Every card cites its source`}),` — verbatim quote + page number, always. If Mavéa can't cite it, the card doesn't exist.`]}),(0,f.jsxs)(`li`,{children:[(0,f.jsx)(`strong`,{children:`Ask the whole document`}),` — highlight any claim and ask a follow-up; the answer lights up the exact lines it came from.`]})]}),e[35]=Q):Q=e[35];let $;return e[36]!==Y||e[37]!==X||e[38]!==Z?($=(0,f.jsxs)(`div`,{className:`prism-app`,children:[R,(0,f.jsxs)(`main`,{className:`prism-app-main`,children:[z,Y,X,Z,Q]})]}),e[36]=Y,e[37]=X,e[38]=Z,e[39]=$):$=e[39],$}function ue(e){return e.error}function g(e){return e.attachment?[e.attachment]:[]}function _(){}function v(e){return e.name}function y(){}function de(){return a(o())}export{h as PrismApp};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PrismOverlay-DJ-JBI6j.js","assets/index-BlCH2LG4.js","assets/chunk-BVpWp9h4.js","assets/jsx-runtime-DaSxXjOY.js","assets/react-BQSORdFI.js","assets/lazyRetry-D50B1UMY.js","assets/index-CepQEz75.css","assets/providers-wzm7E8Pa.js","assets/http-CJCtjYpA.js","assets/info-CiqHR5cs.js","assets/sourceHost-BV3t2XDb.js","assets/toast-BBNs2h3L.js","assets/penStrokes-9Q_l7NTt.js","assets/gesture-DabMpPcq.js","assets/citation-BcvmjKS8.js","assets/verbatim-CBMzUDlf.js","assets/officeDoc-B6nEhNp4.js","assets/search-Be63DJkp.js","assets/streamParse-DRgMHWye.js","assets/useFocusTrap-DbfG6zbM.js","assets/PrismOverlay-BTfAicBt.css"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{I as n,J as r,L as i,M as a,N as o,ht as s,k as ee,q as c}from"./index-BlCH2LG4.js";import{n as l}from"./icons-CHVz6kv_.js";import{t as te}from"./FeatureUseNotice-CoK5HkbR.js";import{c as ne,i as re,p as ie,u as ae}from"./providers-wzm7E8Pa.js";import{t as oe}from"./homeTarget-BcZYH3DY.js";import{l as se,n as ce}from"./useLiveConfig-BhFHwoy3.js";/* empty css */var u=s(),d=e(),f=t();r();var p=n(()=>c(()=>import(`./PrismOverlay-DJ-JBI6j.js`).then(e=>({default:e.PrismOverlay})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),le=p.Component,m={"too-large":`File is too large. Documents up to 40 MB, images up to 10 MB.`,unsupported:`Unsupported file type. Try a PDF, Word doc, spreadsheet, image, or text file.`};function h(){let e=(0,u.c)(40),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=oe(),e[0]=t):t=e[0];let n=t,r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[1]=r):r=e[1],(0,d.useEffect)(de,r);let a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],e[2]=a):a=e[2];let[o,s]=(0,d.useState)(a),[c,h]=(0,d.useState)(null),[b,x]=(0,d.useState)(!1),[S,C]=(0,d.useState)(!1),[w,T]=(0,d.useState)(null),E=(0,d.useRef)(null),D;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(D=se(ce()),e[3]=D):D=e[3];let fe=D,O;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(O=async e=>{if(!e||e.length===0)return;p.preload().catch(y),T(null);let t=Array.from(e).flatMap(e=>{let t=ne(e);return t?(T(m[t]),[]):[e]});t.length>0&&s(e=>{let n=new Set(e.map(v));return[...e,...t.filter(e=>!n.has(e.name))]}),E.current&&(E.current.value=``)},e[4]=O):O=e[4];let k=O,A;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>{s(t=>t.filter(t=>t.name!==e))},e[5]=A):A=e[5];let pe=A,j;e[6]!==b||e[7]!==o?(j=async()=>{if(o.length===0||b)return;x(!0),T(null),p.preload().catch(_);let e=await Promise.all(o.map(ie)),t=e.flatMap(g);t.length===o.length?h(t):T(m[e.find(ue)?.error??`unsupported`]),x(!1)},e[6]=b,e[7]=o,e[8]=j):j=e[8];let M=j,N;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>{e.preventDefault(),C(!1),k(e.dataTransfer.files)},e[9]=N):N=e[9];let P=N,F;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>{e.preventDefault(),C(!0)},e[10]=F):F=e[10];let me=F,I;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>{e.currentTarget.contains(e.relatedTarget)||C(!1)},e[11]=I):I=e[11];let he=I;if(c){let t;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(t=()=>h(null),e[12]=t):t=e[12];let n;return e[13]===c?n=e[14]:(n=(0,f.jsx)(ee,{label:`Prism workbench`,overlay:!0,children:(0,f.jsx)(le,{pdf:c,cfg:fe,onClose:t})}),e[13]=c,e[14]=n),n}let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>{window.location.hash=n.href},e[15]=L):L=e[15];let R;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,f.jsxs)(`header`,{className:`prism-app-header`,children:[(0,f.jsx)(`button`,{type:`button`,className:`prism-app-back`,onClick:L,"aria-label":`Back to ${n.label}`,title:`Back to ${n.label}`,children:(0,f.jsx)(l.chevL,{})}),(0,f.jsx)(`span`,{className:`prism-app-brand`,children:`Prism`})]}),e[16]=R):R=e[16];let z;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,f.jsxs)(`div`,{className:`prism-app-hero`,children:[(0,f.jsx)(`h1`,{className:`prism-app-title`,children:`Understand any document`}),(0,f.jsx)(`p`,{className:`prism-app-lede`,children:`Drop a PDF, Word doc, spreadsheet, or text file. Prism maps every claim, finding, and risk — every card cites its exact source.`}),(0,f.jsx)(te,{kind:`upload`})]}),e[17]=z):z=e[17];let B=`prism-dropzone${S?` prism-dropzone--over`:``}`,V;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>E.current?.click(),e[18]=V):V=e[18];let H,U;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>{(e.key===`Enter`||e.key===` `)&&E.current?.click()},U=i(p.preload),e[19]=H,e[20]=U):(H=e[19],U=e[20]);let W,G;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,f.jsx)(`input`,{ref:E,type:`file`,accept:re,multiple:!0,className:`prism-dropzone-input`,onChange:e=>void k(e.target.files),"aria-hidden":`true`}),G=(0,f.jsx)(l.upload,{}),e[21]=W,e[22]=G):(W=e[21],G=e[22]);let K=S?`Drop to add`:o.length>0?`Drop more files or click to add`:`Drop files or click to browse`,q;e[23]===K?q=e[24]:(q=(0,f.jsx)(`span`,{className:`prism-dropzone-label`,children:K}),e[23]=K,e[24]=q);let J;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,f.jsx)(`span`,{className:`prism-dropzone-hint`,children:`PDF · Word · Excel · PowerPoint · Image · Text`}),e[25]=J):J=e[25];let Y;e[26]!==B||e[27]!==q?(Y=(0,f.jsxs)(`div`,{className:B,onDrop:P,onDragOver:me,onDragLeave:he,onClick:V,role:`button`,tabIndex:0,"aria-label":`Upload a document`,onKeyDown:H,...U,children:[W,G,q,J]}),e[26]=B,e[27]=q,e[28]=Y):Y=e[28];let X;e[29]===w?X=e[30]:(X=w&&(0,f.jsx)(`p`,{className:`prism-app-error`,role:`alert`,children:w}),e[29]=w,e[30]=X);let Z;e[31]!==M||e[32]!==b||e[33]!==o?(Z=o.length>0&&(0,f.jsxs)(`div`,{className:`prism-staged`,children:[(0,f.jsx)(`p`,{className:`prism-staged-label`,children:o.length===1?`1 document ready`:`${o.length} documents ready`}),(0,f.jsx)(`ul`,{className:`prism-staged-list`,children:o.map(e=>(0,f.jsxs)(`li`,{className:`prism-staged-item`,children:[(0,f.jsx)(l.doc,{}),(0,f.jsx)(`span`,{className:`prism-staged-name`,children:ae({name:e.name,mime:e.type,data:``,size:e.size})}),(0,f.jsx)(`button`,{type:`button`,className:`prism-staged-remove`,onClick:t=>{t.stopPropagation(),pe(e.name)},"aria-label":`Remove ${e.name}`,children:(0,f.jsx)(l.x,{})})]},e.name))}),(0,f.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>void M(),disabled:b,...i(p.preload),children:[b?`Preparing documents…`:`Open in Prism`,(0,f.jsx)(l.chevR,{})]})]}),e[31]=M,e[32]=b,e[33]=o,e[34]=Z):Z=e[34];let Q;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,f.jsxs)(`ul`,{className:`prism-app-features`,children:[(0,f.jsxs)(`li`,{children:[(0,f.jsx)(`strong`,{children:`Maps claims spatially`}),` — regions, findings, and risks laid out so you can see the whole shape at once.`]}),(0,f.jsxs)(`li`,{children:[(0,f.jsx)(`strong`,{children:`Every card cites its source`}),` — verbatim quote + page number, always. If Mavéa can't cite it, the card doesn't exist.`]}),(0,f.jsxs)(`li`,{children:[(0,f.jsx)(`strong`,{children:`Ask the whole document`}),` — highlight any claim and ask a follow-up; the answer lights up the exact lines it came from.`]})]}),e[35]=Q):Q=e[35];let $;return e[36]!==Y||e[37]!==X||e[38]!==Z?($=(0,f.jsxs)(`div`,{className:`prism-app`,children:[R,(0,f.jsxs)(`main`,{className:`prism-app-main`,children:[z,Y,X,Z,Q]})]}),e[36]=Y,e[37]=X,e[38]=Z,e[39]=$):$=e[39],$}function ue(e){return e.error}function g(e){return e.attachment?[e.attachment]:[]}function _(){}function v(e){return e.name}function y(){}function de(){return a(o())}export{h as PrismApp};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-y8GL67bB.js";import{r}from"./sourceHost-BV3t2XDb.js";import{t as i}from"./providers-wzm7E8Pa.js";import{a,t as o}from"./search-DnjHupRf.js";import{t as s}from"./verbatim-CBMzUDlf.js";import{t as c}from"./citation-BcvmjKS8.js";var l=e(),u=n(),d=t(),f={full:{label:`in the document`,token:`var(--insight)`},partial:{label:`partly in the document`,token:`var(--warning)`},none:{label:`not in this document`,token:`var(--text-muted)`}};function p(e,t){return!!e&&e.doc===t.doc&&e.page===t.page&&e.quote===t.quote}function m(e){let t=(0,u.c)(50),{turns:n,busy:i,onAsk:a,onFocusSpan:o,activeSpan:s,multiDoc:c,docLabel:m,onClose:g}=e,[_,v]=(0,l.useState)(``),y=(0,l.useRef)(null),b=(0,l.useRef)(null),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>{let e=y.current;e&&(e.scrollTop=e.scrollHeight)},t[0]=x):x=t[0];let S;t[1]===n?S=t[2]:(S=[n],t[1]=n,t[2]=S),(0,l.useEffect)(x,S);let C,w;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{b.current?.focus()},w=[],t[3]=C,t[4]=w):(C=t[3],w=t[4]),(0,l.useEffect)(C,w);let T;t[5]!==i||t[6]!==_||t[7]!==a?(T=()=>{let e=_.trim();!e||i||(a(e),v(``))},t[5]=i,t[6]=_,t[7]=a,t[8]=T):T=t[8];let E=T,D=h,O;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,d.jsxs)(`span`,{className:`prism-ask-title`,children:[(0,d.jsx)(`span`,{className:`prism-ask-spark`,"aria-hidden":`true`}),`Ask this document`]}),t[9]=O):O=t[9];let k;t[10]===g?k=t[11]:(k=(0,d.jsxs)(`header`,{className:`prism-ask-head`,children:[O,(0,d.jsx)(`button`,{type:`button`,className:`prism-ask-min`,onClick:g,"aria-label":`Hide the ask panel`,children:`▾`})]}),t[10]=g,t[11]=k);let A;t[12]===n.length?A=t[13]:(A=n.length===0&&(0,d.jsx)(`p`,{className:`prism-ask-empty`,children:`Ask anything. The answer lights up the exact lines on the page — and says so honestly when the document doesn’t cover it.`}),t[12]=n.length,t[13]=A);let j;if(t[14]!==s||t[15]!==m||t[16]!==c||t[17]!==o||t[18]!==n){let e;t[20]!==s||t[21]!==m||t[22]!==c||t[23]!==o?(e=e=>(0,d.jsxs)(`div`,{className:`prism-ask-turn`,children:[(0,d.jsx)(`p`,{className:`prism-ask-q`,children:e.question}),e.status===`pending`&&(0,d.jsxs)(`p`,{className:`prism-ask-pending`,children:[(0,d.jsx)(`span`,{className:`prism-ask-dot`,"aria-hidden":`true`}),`Reading the document…`]}),e.status===`error`&&(0,d.jsx)(`p`,{className:`prism-ask-err`,children:e.error}),e.status===`done`&&e.answer&&(0,d.jsxs)(`div`,{className:`prism-ask-a`,children:[(0,d.jsxs)(`span`,{className:`prism-ask-cover`,"data-coverage":e.answer.coverage,style:{"--cover-color":f[e.answer.coverage].token},children:[(0,d.jsx)(`span`,{className:`prism-ask-cover-dot`,"aria-hidden":`true`}),e.answer.unpinned?`in the document — couldn’t highlight the exact line`:f[e.answer.coverage].label]}),e.answer.text&&(0,d.jsx)(`p`,{className:`prism-ask-text`,children:e.answer.text}),e.answer.spans.length>0&&(0,d.jsx)(`div`,{className:`prism-ask-spans`,role:`group`,"aria-label":`Where this is in the document`,children:e.answer.spans.map((e,t)=>(0,d.jsx)(`button`,{type:`button`,className:`prism-ask-chip`+(p(s,e)?` is-active`:``),onClick:()=>o(e),title:e.quote,children:c?`${m(e.doc)} · p.${e.page}`:`p.${e.page}`},`${e.doc}:${e.page}:${t}`))}),e.answer.outside&&(()=>{let t=r(e.answer.outside.citation.url),n=(0,d.jsxs)(d.Fragment,{children:[`“`,e.answer.outside.citation.quote,`”`,(0,d.jsxs)(`span`,{className:`prism-ask-outside-host`,children:[`— `,e.answer.outside.citation.host,e.answer.outside.citation.date?` · ${e.answer.outside.citation.date}`:``]})]});return(0,d.jsxs)(`div`,{className:`prism-ask-outside`,children:[(0,d.jsx)(`span`,{className:`prism-ask-outside-tag`,children:`from outside this document`}),(0,d.jsx)(`p`,{className:`prism-ask-outside-fact`,children:e.answer.outside.fact}),t?(0,d.jsx)(`a`,{className:`prism-ask-outside-cite`,href:t,target:`_blank`,rel:`noopener noreferrer`,children:n}):(0,d.jsx)(`span`,{className:`prism-ask-outside-cite`,children:n})]})})()]})]},e.id),t[20]=s,t[21]=m,t[22]=c,t[23]=o,t[24]=e):e=t[24],j=n.map(e),t[14]=s,t[15]=m,t[16]=c,t[17]=o,t[18]=n,t[19]=j}else j=t[19];let M;t[25]!==A||t[26]!==j?(M=(0,d.jsxs)(`div`,{className:`prism-ask-thread`,ref:y,children:[A,j]}),t[25]=A,t[26]=j,t[27]=M):M=t[27];let N;t[28]===E?N=t[29]:(N=e=>{e.preventDefault(),E()},t[28]=E,t[29]=N);let P;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>v(e.target.value),t[30]=P):P=t[30];let F;t[31]===E?F=t[32]:(F=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),E())},t[31]=E,t[32]=F);let I=i?`Reading the document…`:`Ask this document a question…`,L;t[33]!==_||t[34]!==F||t[35]!==I?(L=(0,d.jsx)(`textarea`,{ref:b,className:`prism-ask-input`,value:_,onChange:P,onKeyDown:F,rows:1,placeholder:I,"aria-label":`Ask this document a question`}),t[33]=_,t[34]=F,t[35]=I,t[36]=L):L=t[36];let R;t[37]!==i||t[38]!==_?(R=i||_.trim().length===0,t[37]=i,t[38]=_,t[39]=R):R=t[39];let z;t[40]===R?z=t[41]:(z=(0,d.jsx)(`button`,{type:`submit`,className:`prism-ask-send`,disabled:R,"aria-label":`Ask`,children:`↵`}),t[40]=R,t[41]=z);let B;t[42]!==N||t[43]!==L||t[44]!==z?(B=(0,d.jsxs)(`form`,{className:`prism-ask-form`,onSubmit:N,children:[L,z]}),t[42]=N,t[43]=L,t[44]=z,t[45]=B):B=t[45];let V;return t[46]!==M||t[47]!==B||t[48]!==k?(V=(0,d.jsxs)(`section`,{className:`prism-ask`,"aria-label":`Ask this document`,onPointerDown:D,onWheel:D,onClick:D,children:[k,M,B]}),t[46]=M,t[47]=B,t[48]=k,t[49]=V):V=t[49],V}function h(e){return e.stopPropagation()}var g=14e3,_=1500,v=8;function y(e){let t=[];return e.forEach((e,n)=>e.forEach((e,r)=>{let i=e.trim();i&&t.push({doc:n,page:r+1,text:i.slice(0,_)})})),t}function b(e,t,n=g){let r=y(e);if(r.reduce((e,t)=>e+t.text.length,0)<=n)return r;let i=Array.from(new Set(t.toLowerCase().match(/[a-z0-9]{4,}/g)??[])),a=e=>{let t=e.text.toLowerCase();return i.reduce((e,n)=>e+ +!!t.includes(n),0)},o=r.map(e=>({p:e,s:a(e)})).sort((e,t)=>t.s-e.s||e.p.doc-t.p.doc||e.p.page-t.p.page),s=[],c=0;for(let{p:e}of o)if(c+e.text.length>n&&s.length>=6||(s.push(e),c+=e.text.length,c>=n))break;return s.sort((e,t)=>e.doc-t.doc||e.page-t.page)}function x(e,t){return`DOCUMENT TEXT (cite "doc"/"page" by these markers):\n${e.map(e=>`[${t?`doc ${e.doc} · `:``}page ${e.page}]\n${e.text}`).join(`
1
+ import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-BlCH2LG4.js";import{r}from"./sourceHost-BV3t2XDb.js";import{t as i}from"./providers-wzm7E8Pa.js";import{a,t as o}from"./search-Be63DJkp.js";import{t as s}from"./verbatim-CBMzUDlf.js";import{t as c}from"./citation-BcvmjKS8.js";var l=e(),u=n(),d=t(),f={full:{label:`in the document`,token:`var(--insight)`},partial:{label:`partly in the document`,token:`var(--warning)`},none:{label:`not in this document`,token:`var(--text-muted)`}};function p(e,t){return!!e&&e.doc===t.doc&&e.page===t.page&&e.quote===t.quote}function m(e){let t=(0,u.c)(50),{turns:n,busy:i,onAsk:a,onFocusSpan:o,activeSpan:s,multiDoc:c,docLabel:m,onClose:g}=e,[_,v]=(0,l.useState)(``),y=(0,l.useRef)(null),b=(0,l.useRef)(null),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>{let e=y.current;e&&(e.scrollTop=e.scrollHeight)},t[0]=x):x=t[0];let S;t[1]===n?S=t[2]:(S=[n],t[1]=n,t[2]=S),(0,l.useEffect)(x,S);let C,w;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{b.current?.focus()},w=[],t[3]=C,t[4]=w):(C=t[3],w=t[4]),(0,l.useEffect)(C,w);let T;t[5]!==i||t[6]!==_||t[7]!==a?(T=()=>{let e=_.trim();!e||i||(a(e),v(``))},t[5]=i,t[6]=_,t[7]=a,t[8]=T):T=t[8];let E=T,D=h,O;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,d.jsxs)(`span`,{className:`prism-ask-title`,children:[(0,d.jsx)(`span`,{className:`prism-ask-spark`,"aria-hidden":`true`}),`Ask this document`]}),t[9]=O):O=t[9];let k;t[10]===g?k=t[11]:(k=(0,d.jsxs)(`header`,{className:`prism-ask-head`,children:[O,(0,d.jsx)(`button`,{type:`button`,className:`prism-ask-min`,onClick:g,"aria-label":`Hide the ask panel`,children:`▾`})]}),t[10]=g,t[11]=k);let A;t[12]===n.length?A=t[13]:(A=n.length===0&&(0,d.jsx)(`p`,{className:`prism-ask-empty`,children:`Ask anything. The answer lights up the exact lines on the page — and says so honestly when the document doesn’t cover it.`}),t[12]=n.length,t[13]=A);let j;if(t[14]!==s||t[15]!==m||t[16]!==c||t[17]!==o||t[18]!==n){let e;t[20]!==s||t[21]!==m||t[22]!==c||t[23]!==o?(e=e=>(0,d.jsxs)(`div`,{className:`prism-ask-turn`,children:[(0,d.jsx)(`p`,{className:`prism-ask-q`,children:e.question}),e.status===`pending`&&(0,d.jsxs)(`p`,{className:`prism-ask-pending`,children:[(0,d.jsx)(`span`,{className:`prism-ask-dot`,"aria-hidden":`true`}),`Reading the document…`]}),e.status===`error`&&(0,d.jsx)(`p`,{className:`prism-ask-err`,children:e.error}),e.status===`done`&&e.answer&&(0,d.jsxs)(`div`,{className:`prism-ask-a`,children:[(0,d.jsxs)(`span`,{className:`prism-ask-cover`,"data-coverage":e.answer.coverage,style:{"--cover-color":f[e.answer.coverage].token},children:[(0,d.jsx)(`span`,{className:`prism-ask-cover-dot`,"aria-hidden":`true`}),e.answer.unpinned?`in the document — couldn’t highlight the exact line`:f[e.answer.coverage].label]}),e.answer.text&&(0,d.jsx)(`p`,{className:`prism-ask-text`,children:e.answer.text}),e.answer.spans.length>0&&(0,d.jsx)(`div`,{className:`prism-ask-spans`,role:`group`,"aria-label":`Where this is in the document`,children:e.answer.spans.map((e,t)=>(0,d.jsx)(`button`,{type:`button`,className:`prism-ask-chip`+(p(s,e)?` is-active`:``),onClick:()=>o(e),title:e.quote,children:c?`${m(e.doc)} · p.${e.page}`:`p.${e.page}`},`${e.doc}:${e.page}:${t}`))}),e.answer.outside&&(()=>{let t=r(e.answer.outside.citation.url),n=(0,d.jsxs)(d.Fragment,{children:[`“`,e.answer.outside.citation.quote,`”`,(0,d.jsxs)(`span`,{className:`prism-ask-outside-host`,children:[`— `,e.answer.outside.citation.host,e.answer.outside.citation.date?` · ${e.answer.outside.citation.date}`:``]})]});return(0,d.jsxs)(`div`,{className:`prism-ask-outside`,children:[(0,d.jsx)(`span`,{className:`prism-ask-outside-tag`,children:`from outside this document`}),(0,d.jsx)(`p`,{className:`prism-ask-outside-fact`,children:e.answer.outside.fact}),t?(0,d.jsx)(`a`,{className:`prism-ask-outside-cite`,href:t,target:`_blank`,rel:`noopener noreferrer`,children:n}):(0,d.jsx)(`span`,{className:`prism-ask-outside-cite`,children:n})]})})()]})]},e.id),t[20]=s,t[21]=m,t[22]=c,t[23]=o,t[24]=e):e=t[24],j=n.map(e),t[14]=s,t[15]=m,t[16]=c,t[17]=o,t[18]=n,t[19]=j}else j=t[19];let M;t[25]!==A||t[26]!==j?(M=(0,d.jsxs)(`div`,{className:`prism-ask-thread`,ref:y,children:[A,j]}),t[25]=A,t[26]=j,t[27]=M):M=t[27];let N;t[28]===E?N=t[29]:(N=e=>{e.preventDefault(),E()},t[28]=E,t[29]=N);let P;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>v(e.target.value),t[30]=P):P=t[30];let F;t[31]===E?F=t[32]:(F=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),E())},t[31]=E,t[32]=F);let I=i?`Reading the document…`:`Ask this document a question…`,L;t[33]!==_||t[34]!==F||t[35]!==I?(L=(0,d.jsx)(`textarea`,{ref:b,className:`prism-ask-input`,value:_,onChange:P,onKeyDown:F,rows:1,placeholder:I,"aria-label":`Ask this document a question`}),t[33]=_,t[34]=F,t[35]=I,t[36]=L):L=t[36];let R;t[37]!==i||t[38]!==_?(R=i||_.trim().length===0,t[37]=i,t[38]=_,t[39]=R):R=t[39];let z;t[40]===R?z=t[41]:(z=(0,d.jsx)(`button`,{type:`submit`,className:`prism-ask-send`,disabled:R,"aria-label":`Ask`,children:`↵`}),t[40]=R,t[41]=z);let B;t[42]!==N||t[43]!==L||t[44]!==z?(B=(0,d.jsxs)(`form`,{className:`prism-ask-form`,onSubmit:N,children:[L,z]}),t[42]=N,t[43]=L,t[44]=z,t[45]=B):B=t[45];let V;return t[46]!==M||t[47]!==B||t[48]!==k?(V=(0,d.jsxs)(`section`,{className:`prism-ask`,"aria-label":`Ask this document`,onPointerDown:D,onWheel:D,onClick:D,children:[k,M,B]}),t[46]=M,t[47]=B,t[48]=k,t[49]=V):V=t[49],V}function h(e){return e.stopPropagation()}var g=14e3,_=1500,v=8;function y(e){let t=[];return e.forEach((e,n)=>e.forEach((e,r)=>{let i=e.trim();i&&t.push({doc:n,page:r+1,text:i.slice(0,_)})})),t}function b(e,t,n=g){let r=y(e);if(r.reduce((e,t)=>e+t.text.length,0)<=n)return r;let i=Array.from(new Set(t.toLowerCase().match(/[a-z0-9]{4,}/g)??[])),a=e=>{let t=e.text.toLowerCase();return i.reduce((e,n)=>e+ +!!t.includes(n),0)},o=r.map(e=>({p:e,s:a(e)})).sort((e,t)=>t.s-e.s||e.p.doc-t.p.doc||e.p.page-t.p.page),s=[],c=0;for(let{p:e}of o)if(c+e.text.length>n&&s.length>=6||(s.push(e),c+=e.text.length,c>=n))break;return s.sort((e,t)=>e.doc-t.doc||e.page-t.page)}function x(e,t){return`DOCUMENT TEXT (cite "doc"/"page" by these markers):\n${e.map(e=>`[${t?`doc ${e.doc} · `:``}page ${e.page}]\n${e.text}`).join(`
2
2
 
3
3
  `)}`}var S=`You answer a question strictly from the document text provided, quoting verbatim, and return strict JSON only. You never use outside knowledge and never invent a quote, page, or fact — when the document does not address the question you say so plainly.`;function C(e,t,n){return`${x(t,n)}
4
4
 
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/kokoro-D4GKpSL0.js","assets/chunk-BVpWp9h4.js","assets/index-y8GL67bB.js","assets/jsx-runtime-DaSxXjOY.js","assets/react-BQSORdFI.js","assets/lazyRetry-D50B1UMY.js","assets/index-CepQEz75.css","assets/spokenText-D4zPX9JY.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{J as t,q as n}from"./index-y8GL67bB.js";import{t as r}from"./BriefingPlayer-DO205Qkh.js";var i=e();t();function a({beats:e,onBeat:t,onExit:a}){return(0,i.jsx)(r,{beats:e,onBeat:t,onExit:a,speak:e=>{n(()=>import(`./kokoro-D4GKpSL0.js`).then(e=>e.i).then(t=>t.speakKokoroResult(e,`mavea`)),__vite__mapDeps([0,1,2,3,4,5,6,7]))},cancelSpeak:()=>{n(()=>import(`./kokoro-D4GKpSL0.js`).then(e=>e.i).then(e=>e.cancelKokoro()),__vite__mapDeps([0,1,2,3,4,5,6,7]))}})}export{a as PrismBriefingPlayer};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/kokoro-BCXTWbLb.js","assets/chunk-BVpWp9h4.js","assets/index-BlCH2LG4.js","assets/jsx-runtime-DaSxXjOY.js","assets/react-BQSORdFI.js","assets/lazyRetry-D50B1UMY.js","assets/index-CepQEz75.css","assets/spokenText-D4zPX9JY.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{J as t,q as n}from"./index-BlCH2LG4.js";import{t as r}from"./BriefingPlayer-BaC5XjsP.js";var i=e();t();function a({beats:e,onBeat:t,onExit:a}){return(0,i.jsx)(r,{beats:e,onBeat:t,onExit:a,speak:e=>{n(()=>import(`./kokoro-BCXTWbLb.js`).then(e=>e.i).then(t=>t.speakKokoroResult(e,`mavea`)),__vite__mapDeps([0,1,2,3,4,5,6,7]))},cancelSpeak:()=>{n(()=>import(`./kokoro-BCXTWbLb.js`).then(e=>e.i).then(e=>e.cancelKokoro()),__vite__mapDeps([0,1,2,3,4,5,6,7]))}})}export{a as PrismBriefingPlayer};