@mavea/mavea 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +606 -606
- package/dist/assets/{AppCommandPalette-DzUPm-Qa.js → AppCommandPalette-D_g8-7C0.js} +1 -1
- package/dist/assets/{BlockEmpty-Dp9IPo4S.js → BlockEmpty-Ddhgr5pu.js} +1 -1
- package/dist/assets/{BriefingPlayer-CTab7H0c.js → BriefingPlayer-D-QhLgXI.js} +1 -1
- package/dist/assets/{CanvasSkeleton-BCq4yAAN.js → CanvasSkeleton-BIiOmCMG.js} +2 -2
- package/dist/assets/{CheckLogRail-DbGJtneK.js → CheckLogRail-ZrDqyjQ7.js} +1 -1
- package/dist/assets/{CodeOutput-DjsCJAel.js → CodeOutput-D7sVg1Nr.js} +1 -1
- package/dist/assets/{CommandPalette-Cq9mDWiI.js → CommandPalette-DNa2q8E_.js} +1 -1
- package/dist/assets/{CourseLessonReader-Dz8IhHEw.js → CourseLessonReader-BIpGjcJk.js} +2 -2
- package/dist/assets/{CourseRail-DjK_L3eD.js → CourseRail-CQaotzN0.js} +1 -1
- package/dist/assets/{CoursesApp-Dv4yt63y.js → CoursesApp-q3kZJmu1.js} +2 -2
- package/dist/assets/{CrossExamPanel-DJCn13Aa.js → CrossExamPanel-BIJslibV.js} +1 -1
- package/dist/assets/{DashPresent-pfOEJGzV.js → DashPresent-DGSE0vYM.js} +1 -1
- package/dist/assets/{DashboardDetail-BSZ3CgcK.js → DashboardDetail-BpaLNg8R.js} +2 -2
- package/dist/assets/DashboardLoopRuntime-14yzj-xx.js +1 -0
- package/dist/assets/{DashboardOverview-DpJ2BDNu.js → DashboardOverview-8x3OxX2i.js} +1 -1
- package/dist/assets/{DashboardSettings-C1rC3iTs.js → DashboardSettings-f_zxcs5j.js} +1 -1
- package/dist/assets/{DashboardsApp-DeBWrYDk.js → DashboardsApp-mvMbGmp0.js} +2 -2
- package/dist/assets/{DeepZoomApp-B91oHx2Y.js → DeepZoomApp-E7bDmzuL.js} +1 -1
- package/dist/assets/{DelegatePanel-bFmfn9-D.js → DelegatePanel-pwRk9pFf.js} +1 -1
- package/dist/assets/{DemoGallery-fYIVdHQV.js → DemoGallery-DDzX8Z7I.js} +1 -1
- package/dist/assets/{DropSelect-DbxAWKQn.js → DropSelect-BMZYAX6q.js} +1 -1
- package/dist/assets/{ExportModal-HczU1Zg1.js → ExportModal-CTMJaU1l.js} +2 -2
- package/dist/assets/{ExtractionPreview-BfjJci-N.js → ExtractionPreview-C9wq7CrK.js} +1 -1
- package/dist/assets/{FlagshipCTA-CTb5P2Ix.js → FlagshipCTA-DPNSflKv.js} +1 -1
- package/dist/assets/{FlagshipCommandPalette-DLkDmsF-.js → FlagshipCommandPalette-55zqyPFm.js} +1 -1
- package/dist/assets/{FlagshipShowcase-CrFSCHHX.js → FlagshipShowcase-BWpoPWOn.js} +1 -1
- package/dist/assets/{FlashcardsApp-CV777TGC.js → FlashcardsApp-apCj3I17.js} +1 -1
- package/dist/assets/{ForecastPanel-BfAngk8l.js → ForecastPanel-CMRD-UKn.js} +1 -1
- package/dist/assets/{GalleryApp-DLssAAhN.js → GalleryApp-CcsbirLT.js} +1 -1
- package/dist/assets/{HonestByDesign-B0o03QVw.js → HonestByDesign-DU4qmc61.js} +1 -1
- package/dist/assets/{HowItWorks-DfUsQ2xD.js → HowItWorks-CkZXftN-.js} +1 -1
- package/dist/assets/{LegalApp-CnFE80Ja.js → LegalApp-BmZpqH-6.js} +1 -1
- package/dist/assets/{LegalMarkdownDocument-BidNcrNj.js → LegalMarkdownDocument-CcbAfubz.js} +1 -1
- package/dist/assets/{LegalPageShell-CFktFKTK.js → LegalPageShell-raMATqhx.js} +1 -1
- package/dist/assets/{LeverPanel-DgfX7mTL.js → LeverPanel-DVUgGcYW.js} +1 -1
- package/dist/assets/{Library-CAnmN5YL.js → Library-D725dNcx.js} +1 -1
- package/dist/assets/{LibraryOverlay-D7Gg_GIv.js → LibraryOverlay-D7PzQIpH.js} +1 -1
- package/dist/assets/LiveApp-B8Jw1Q0h.js +61 -0
- package/dist/assets/{LiveApp-COz1ZZp9.css → LiveApp-DQhDk2ma.css} +1 -1
- package/dist/assets/{LiveSettings-5UCN5UWM.js → LiveSettings-BQ06gZB7.js} +3 -3
- package/dist/assets/{MindMapViewerDrawer-DoXy6hCD.js → MindMapViewerDrawer-CIMuABKE.js} +1 -1
- package/dist/assets/{MindShape-BJCnqyTi.js → MindShape-0KPrv0CF.js} +1 -1
- package/dist/assets/MindShape-Bel2yDqO.css +1 -0
- package/dist/assets/{PinToDashboard-Dq77a2iP.js → PinToDashboard-ML4NFCAU.js} +1 -1
- package/dist/assets/{PlanReview-DvxM1675.js → PlanReview-CbJ_7Ld1.js} +1 -1
- package/dist/assets/{Presence-LNSqCz8N.js → Presence-B_zDfiE7.js} +1 -1
- package/dist/assets/{PresentationDeck-8kT0cMtk.js → PresentationDeck-Tm3PUdh5.js} +1 -1
- package/dist/assets/{PrismApp-Jf4pIAkh.js → PrismApp-Bc-6PO_P.js} +2 -2
- package/dist/assets/{PrismAskController-QXSoZBNb.js → PrismAskController-OwqFx5Pk.js} +1 -1
- package/dist/assets/{PrismBriefingPlayer-edFfwMNP.js → PrismBriefingPlayer-Bu_ZxYdh.js} +2 -2
- package/dist/assets/{PrismOverlay-CYItOpax.js → PrismOverlay-UTsJ8R5d.js} +4 -4
- package/dist/assets/{PrivacyApp-Dqz_BgOS.js → PrivacyApp-BLXan6dm.js} +1 -1
- package/dist/assets/{Recap-Ba2qZ2lX.js → Recap-5rYrcMCC.js} +1 -1
- package/dist/assets/{ReelJelly-9SCjNeHq.js → ReelJelly-Dg3XGB0c.js} +1 -1
- package/dist/assets/{RehearsalPanel-CtYKPl6O.js → RehearsalPanel-CM4466Os.js} +3 -3
- package/dist/assets/{ReplayCard-MSWq-Mxr.js → ReplayCard-wMIMlorH.js} +2 -2
- package/dist/assets/{ReplayOverlay-ChDrwMLh.js → ReplayOverlay-BomkTonB.js} +1 -1
- package/dist/assets/{RewindOverlay-CM9d5xhh.js → RewindOverlay-Izf89nG9.js} +1 -1
- package/dist/assets/{RippleApp-B7G_jg05.js → RippleApp-8QSIEjTX.js} +2 -2
- package/dist/assets/{RippleAskController-CJjt7VG8.js → RippleAskController-Cd86GrKs.js} +1 -1
- package/dist/assets/{RippleOverlay-Cfu3ZVL1.js → RippleOverlay-SCrXZTqz.js} +2 -2
- package/dist/assets/{SeeDontRead-DHhwv6RU.js → SeeDontRead-Bp8qsF20.js} +1 -1
- package/dist/assets/ShareModal-C-sD-aia.js +32 -0
- package/dist/assets/{ShareModal-C8S7ySls.css → ShareModal-PobtP7AJ.css} +1 -1
- package/dist/assets/{ShipCascade-B6kVuilv.js → ShipCascade-Cq_I4c_v.js} +1 -1
- package/dist/assets/{ShipCourse-CerQYrsy.js → ShipCourse-CzsJyMnT.js} +1 -1
- package/dist/assets/{ShipHotspots-DOmWYgHH.js → ShipHotspots-OMjPhQWP.js} +1 -1
- package/dist/assets/{ShipIncident-D0lvmytD.js → ShipIncident-Cqn6ZmKz.js} +1 -1
- package/dist/assets/{ShipMigration-D70LbiJk.js → ShipMigration-5_ZWn7K9.js} +1 -1
- package/dist/assets/{ShipOnboarding-B_0dp9a-.js → ShipOnboarding-Yr8oKgmQ.js} +1 -1
- package/dist/assets/{ShipRead-Cp2s7bSL.js → ShipRead-Bnw7mnv3.js} +1 -1
- package/dist/assets/{ShipRollout-Bw9pvbSM.js → ShipRollout-ECsDrqAd.js} +1 -1
- package/dist/assets/{ShipSuggestions-eHLjOJL5.js → ShipSuggestions-C6oDw2F8.js} +1 -1
- package/dist/assets/{ShipWorkspace-DwdoBSix.js → ShipWorkspace-BT6gZrqd.js} +1 -1
- package/dist/assets/{SignatureLoop-Bl43npTM.js → SignatureLoop-D7sibSnc.js} +1 -1
- package/dist/assets/{SynthesisApp-BkOWv_pc.js → SynthesisApp-B768x2r_.js} +2 -2
- package/dist/assets/{SynthesisOverlay-CHlVL7sT.js → SynthesisOverlay-Ds0MhZLQ.js} +1 -1
- package/dist/assets/{TermsApp-PakIMrh0.js → TermsApp-Da8FeMj3.js} +1 -1
- package/dist/assets/{TopicCanvas-wmAsICUd.js → TopicCanvas-D64O3lvD.js} +2 -2
- package/dist/assets/{TourPrism-VQqowXpY.js → TourPrism-CTf1G-Vv.js} +1 -1
- package/dist/assets/{TrackerTile-C1mU8Zxj.js → TrackerTile-DeujTCk-.js} +2 -2
- package/dist/assets/{TwoSurfaces-SNT4AVzV.js → TwoSurfaces-kyK2yqm0.js} +1 -1
- package/dist/assets/{UnderstoodPanel-BkwhDLhW.js → UnderstoodPanel-Dgwk_Cuj.js} +1 -1
- package/dist/assets/{WhyMachineOverlay-DgYhqU53.js → WhyMachineOverlay-C4eQC0lg.js} +1 -1
- package/dist/assets/{WowFeatures-Cky9THxT.js → WowFeatures-CaBZ5WPM.js} +1 -1
- package/dist/assets/{ZoomDeck-BXwcRCO_.js → ZoomDeck-DnCtbhx1.js} +1 -1
- package/dist/assets/{alternateFinishes-Cn5LyQ0-.js → alternateFinishes-FSV_gA1A.js} +1 -1
- package/dist/assets/{annotationAuto-L2AxlJ2F.js → annotationAuto-x_dV8z65.js} +1 -1
- package/dist/assets/annotationReel-SeXzv0P-.js +1 -0
- package/dist/assets/{backup-Cw4GBHBV.js → backup-0zODkqi-.js} +1 -1
- package/dist/assets/canvas-uhcwigAL.js +1 -0
- package/dist/assets/{catalog-2srqP2Jf.js → catalog-Car_1ocN.js} +1 -1
- package/dist/assets/{dashboardEvents-S4Y2aOP_.js → dashboardEvents-BqcPN-K8.js} +2 -2
- package/dist/assets/{dist-BJbBdhc0.js → dist-BTg4yEWr.js} +1 -1
- package/dist/assets/{fit-C3MkNFdn.js → fit-I3tuibfX.js} +1 -1
- package/dist/assets/{generateLive-Ci8kqPD9.js → generateLive-Dk24OxVt.js} +1 -1
- package/dist/assets/{index-DWHIOldG.js → index-CWqRe4-B.js} +3 -3
- package/dist/assets/{jspdf.es.min-CfZM9xhl.js → jspdf.es.min-wkD3BzGZ.js} +1 -1
- package/dist/assets/kokoro-B-3GqktX.js +1 -0
- package/dist/assets/{lib-C9jT-CD8.js → lib-CwruVYU_.js} +1 -1
- package/dist/assets/{liveSchema-Dw4t_k7M.js → liveSchema-CCpVMy0H.js} +1 -1
- package/dist/assets/{motion-QSGW_vc_.js → motion-CURfDtdH.js} +1 -1
- package/dist/assets/{notes-D21K92Wx.js → notes-BG5QP-Dj.js} +1 -1
- package/dist/assets/{pdf-BP_vXBKO.js → pdf-x4qTBJIZ.js} +1 -1
- package/dist/assets/{perfProbe-DFw7brPU.js → perfProbe-BFwfpxJt.js} +1 -1
- package/dist/assets/{pin-BzDcIYD4.js → pin-DRN5H7py.js} +1 -1
- package/dist/assets/{portal-n6TW0FuE.js → portal-BYHo9LOD.js} +1 -1
- package/dist/assets/{pptxgen.es-GleD8us4.js → pptxgen.es-DGywGiaX.js} +1 -1
- package/dist/assets/{prewarm-CehIIttc.js → prewarm-CQNCE4Uq.js} +1 -1
- package/dist/assets/{quietHours-Brg4oaDf.js → quietHours-CKjQ2pGY.js} +1 -1
- package/dist/assets/{registry-CoCl26Tl.js → registry-1BWL6SXY.js} +1 -1
- package/dist/assets/registry-5a-E7vEN.css +1 -0
- package/dist/assets/{registry-mmGDT0wn.js → registry-9S6KiKjR.js} +1 -1
- package/dist/assets/{registry-BE1QBNKm.js → registry-BZQeYzgv.js} +1 -1
- package/dist/assets/{registry-CG5W7Xs6.js → registry-Bc6_RQ8l.js} +1 -1
- package/dist/assets/{registry-_mqmf4_W.js → registry-BklPTZre.js} +1 -1
- package/dist/assets/{registry-ia68k5sK.js → registry-Bl3NkU-0.js} +1 -1
- package/dist/assets/{registry-NNLA0NQi.js → registry-BpBiRe-o.js} +1 -1
- package/dist/assets/{registry-h3m1zDGt.js → registry-Bpx4VBWb.js} +1 -1
- package/dist/assets/{registry-BvEfWbB0.js → registry-BueBIP-N.js} +1 -1
- package/dist/assets/{registry-eQ4cE0zj.js → registry-CNr6L-3z.js} +1 -1
- package/dist/assets/{registry-CrpEXqNF.js → registry-CfTTYQrE.js} +1 -1
- package/dist/assets/{registry-CePhqBU6.js → registry-CqfjqOX5.js} +2 -2
- package/dist/assets/{registry-D86iln18.js → registry-D84Bs-bD.js} +1 -1
- package/dist/assets/{registry-DgIia4dY.js → registry-DBsjgIxw.js} +1 -1
- package/dist/assets/{registry-vPwth4BB.js → registry-DEgW3zel.js} +1 -1
- package/dist/assets/{registry-BPpjU0S5.js → registry-DFmFBfRz.js} +1 -1
- package/dist/assets/{registry-Cpr0zSyk.js → registry-DrqQbf_n.js} +1 -1
- package/dist/assets/{registry-VKh9QiDf.js → registry-Dw42uggW.js} +1 -1
- package/dist/assets/{registry-HB-VAc6H.js → registry-GLjcQX0n.js} +1 -1
- package/dist/assets/{registry-BYn3Bcie.js → registry-Z3TIPbYJ.js} +1 -1
- package/dist/assets/{registry-ChG5tFfx.js → registry-_T6pLDPG.js} +2 -2
- package/dist/assets/{registry-VS55xdsN.js → registry-aUZZeh27.js} +1 -1
- package/dist/assets/{registry-CFU0k7VB.js → registry-cPmSqaRu.js} +1 -1
- package/dist/assets/{relate-DDWak0Tv.js → relate-yq30L3hZ.js} +1 -1
- package/dist/assets/{shikiHighlight-SWupBCFg.js → shikiHighlight-BgZoQAHs.js} +1 -1
- package/dist/assets/src-B-t8Mww-.js +2 -0
- package/dist/assets/{useDashboardLoop-BSBGTrE2.js → useDashboardLoop-mGmJwv27.js} +3 -3
- package/dist/assets/{useLiveConfig-Cc4IKgOd.js → useLiveConfig-vMyjo2gV.js} +1 -1
- package/dist/assets/{useSpatialCanvas-D3nfHkST.js → useSpatialCanvas-CEXy6ZC2.js} +1 -1
- package/dist/assets/{useSpotlightWalk-gVilFhpa.js → useSpotlightWalk-B9XJ6OLK.js} +1 -1
- package/dist/assets/{useSrsCards-BhFfq4vc.js → useSrsCards-Vc6B2_he.js} +1 -1
- package/dist/assets/{useStudy-DRNarubG.js → useStudy-6QnY-Fw_.js} +1 -1
- package/dist/assets/{useZoomGesture-BdeFOm7j.js → useZoomGesture-BONUz5cE.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/DashboardLoopRuntime-DfnDIGFz.js +0 -1
- package/dist/assets/LiveApp-DmU3RMfZ.js +0 -61
- package/dist/assets/MindShape-Ca3MXEgK.css +0 -1
- package/dist/assets/ShareModal-d_o2hebL.js +0 -32
- package/dist/assets/annotationReel-DdHNp2IH.js +0 -1
- package/dist/assets/canvas-BwR8ltlj.js +0 -1
- package/dist/assets/kokoro-Da60jB7C.js +0 -1
- package/dist/assets/registry-CtbuZWYz.css +0 -1
- package/dist/assets/src-DbgF7cRH.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/backup-
|
|
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-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/backup-0zODkqi-.js","assets/useStudy-6QnY-Fw_.js","assets/index-CWqRe4-B.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-vMyjo2gV.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-CWqRe4-B.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-B-3GqktX.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-6QnY-Fw_.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-vMyjo2gV.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-CKjQ2pGY.js";import{t as ye}from"./DropSelect-BMZYAX6q.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
3
|
|
|
4
4
|
---
|
|
5
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-Cw4GBHBV.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-Cw4GBHBV.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};
|
|
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-0zODkqi-.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-0zODkqi-.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:`How answers are written: 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". (How long Mavéa thinks is Thinking time, below.)`})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Thinking time`}),(0,N.jsx)(Y,{value:o.quality,options:[{value:`fast`,label:`Fast`,badge:`snappiest`},{value:`balanced`,label:`Balanced`,badge:`default`},{value:`thorough`,label:`Thorough`,badge:`thinks longer`}],onPick:e=>O({quality:e})}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`How long Mavéa reasons before answering — speed versus care on hard questions. (How the answer is written is Explanation level, above.)`})]}),(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-
|
|
1
|
+
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-CWqRe4-B.js";import{n}from"./icons-CHVz6kv_.js";import{t as r}from"./MindShape-0KPrv0CF.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-DWHIOldG.js";import{t as r}from"./useSpatialCanvas-D3nfHkST.js";import{t as i}from"./Presence-LNSqCz8N.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-CWqRe4-B.js";import{t as r}from"./useSpatialCanvas-CEXy6ZC2.js";import{t as i}from"./Presence-B_zDfiE7.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.mavea-app.watch-thinking .presence-layer,.mavea-app.watch-thinking .block-actions,.mavea-app.watch-thinking .ink-user-overlay{display:none}.ms-stage-fill{z-index:2;box-sizing:border-box;background:radial-gradient(ellipse 70% 55% at 50% 44%, var(--surface-raised) 0%, var(--surface-default) 100%);justify-content:center;align-items:center;padding:70px 32px 168px;transition:background .8s;display:flex;position:absolute;inset:0}.ms-stage-fill[data-phase=settled]{background:radial-gradient(ellipse 70% 55% at 50% 44%, color-mix(in oklab, var(--surface-raised) 85%, var(--insight) 15%) 0%, var(--surface-default) 100%)}.ms-stage-fill .ms-canvas{border-radius:0;width:100%;max-width:min(1100px,142.857dvh - 340px);max-height:100%;margin-inline:auto}.ms-stage-fill[data-phase=settled]{z-index:50}.ms-exit{z-index:3;font:600 10.5px/1 var(--font-data,var(--font));letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);background:var(--surface-elevated);border:1px solid var(--line-soft);border-radius:var(--r-full);cursor:pointer;opacity:.72;align-items:center;gap:5px;padding:7px 13px 7px 9px;transition:opacity .16s,color .16s,border-color .16s;display:inline-flex;position:absolute;top:72px;right:16px}.ms-exit:hover,.ms-exit:focus-visible{opacity:1;color:var(--text-primary);border-color:var(--line-strong)}.ms-exit svg{width:13px;height:13px}.ms-canvas{aspect-ratio:10/7;background:var(--surface-default);border-radius:10px;width:100%;max-width:640px;margin-inline:auto;position:relative;overflow:hidden}.ms-svg{pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.ms-spoke{fill:none;stroke:var(--text-muted);stroke-width:1px;opacity:.26;stroke-dasharray:1;stroke-dashoffset:1px;animation:.5s forwards ms-draw-spoke;animation-delay:calc(var(--ms-spoke-i,0) * 60ms + .1s)}@keyframes ms-draw-spoke{to{stroke-dashoffset:0}}.ms-thread{fill:none;stroke-width:1.5px;stroke-dasharray:5 4;opacity:0;animation:.4s forwards ms-fade-thread}@keyframes ms-fade-thread{0%{opacity:0}to{opacity:.7}}.ms-thread-label{fill:var(--text-muted);font-family:inherit;font-size:9px;font-style:italic}.ms-link{fill:none;stroke:color-mix(in oklab, var(--insight) 55%, var(--text-muted));stroke-width:1.25px;opacity:0;animation:.4s forwards ms-fade-link}@keyframes ms-fade-link{to{opacity:.4}}.ms-center{pointer-events:none;text-align:center;flex-direction:column;align-items:center;gap:4px;display:flex;position:absolute;top:47%;left:50%;transform:translate(-50%,-50%)}.ms-center-pip-wrap{--face-size:80px}.ms-center-pip-wrap .presence .mascot .shimmer,.ms-center-pip-wrap .presence .mascot .band,.ms-center-pip-wrap .presence .mascot .glint.g2{display:none}.ms-center-pip-wrap .presence .mascot .curtain .strand{stroke-width:4.2px}.ms-center-pip-wrap .presence .mascot .bell{filter:none}.ms-center-label{letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted);opacity:0;font-size:9px;font-weight:700;line-height:1;transition:opacity .4s}.ms-canvas[data-phase=listening] .ms-center-label,.ms-canvas[data-phase=pausing] .ms-center-label,.ms-canvas[data-phase=settled] .ms-center-label{opacity:1}.ms-center-question{max-width:180px;color:var(--text-primary,var(--text-muted));opacity:0;font-size:11px;font-weight:500;line-height:1.4;transition:opacity .6s .3s}.ms-center-label,.ms-center-question{transform:scale(clamp(.68, var(--ms-cam-scale,1), 1));transform-origin:top}.ms-canvas[data-phase=settled] .ms-center-question{opacity:1}.ms-live-text{max-width:220px;color:var(--text-secondary);text-align:center;opacity:0;-webkit-line-clamp:2;pointer-events:none;-webkit-box-orient:vertical;font-size:10px;font-style:italic;font-weight:400;line-height:1.4;transition:opacity .2s;display:-webkit-box;overflow:hidden}.ms-canvas[data-phase=listening] .ms-live-text,.ms-canvas[data-phase=pausing] .ms-live-text{opacity:1}.ms-thought-count{letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);opacity:0;pointer-events:none;align-items:center;gap:5px;font-size:9px;font-weight:600;transition:opacity .3s;display:flex}.ms-canvas[data-phase=listening] .ms-thought-count,.ms-canvas[data-phase=pausing] .ms-thought-count{opacity:1}.ms-mic-dot{background:var(--insight);border-radius:50%;width:5px;height:5px;animation:1.4s ease-in-out infinite ms-mic-pulse}.ms-canvas[data-phase=pausing] .ms-mic-dot{background:var(--text-muted);animation:none}@keyframes ms-mic-pulse{0%,to{opacity:1}50%{opacity:.3}}.ms-zoom-controls{z-index:2;flex-direction:column;gap:4px;display:flex;position:absolute;bottom:14px;right:14px}.ms-zoom-btn{border-radius:var(--r-sm);border:1px solid var(--line);background:var(--surface-elevated);width:28px;height:28px;color:var(--text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;place-items:center;font-size:16px;line-height:1;transition:background .15s,color .15s;display:grid}.ms-zoom-btn:hover{background:var(--surface-glass-strong);color:var(--text-primary)}.ms-zoom-layer{transform-origin:50%;will-change:transform;position:absolute;inset:0}.ms-cluster-label{text-align:center;letter-spacing:.01em;max-width:150px;color:var(--text-muted);background:color-mix(in oklab, var(--surface-elevated) 80%, transparent);pointer-events:none;opacity:0;border-radius:7px;padding:2px 7px;font-size:11px;font-weight:650;line-height:1.2;animation:.6s .3s forwards ms-cluster-rise;position:absolute;transform:translate(-50%,-50%)}@keyframes ms-cluster-rise{0%{opacity:0;transform:translate(-50%,-42%)}to{opacity:.85;transform:translate(-50%,-50%)}}@media (prefers-reduced-motion:reduce){.ms-cluster-label{opacity:.85;animation:none}}.ms-card{width:calc(184px * var(--ms-card-scale,1));background:var(--surface-elevated);border:1.5px solid var(--ms-kind-color,var(--grid-line));border-radius:var(--r-sm);cursor:default;opacity:0;animation:.35s forwards ms-card-in;animation-delay:calc(var(--ms-i,0) * 70ms + .1s);padding:7px 9px 8px;transition:box-shadow .2s;position:absolute;transform:translate(-50%,-50%)scale(.95);box-shadow:0 1px 4px #0000000f}@keyframes ms-card-in{to{opacity:1;transform:translate(-50%,-50%)scale(1)}}.ms-card[data-status=forming]{opacity:0;animation:.35s forwards ms-card-forming-in;animation-delay:calc(var(--ms-i,0) * 70ms + .1s);border-style:dashed}@keyframes ms-card-forming-in{to{opacity:.65;transform:translate(-50%,-50%)scale(.97)}}.ms-card[data-status=stable]{cursor:pointer;box-shadow:0 2px 8px #0000001a}.ms-card[data-status=stable]:hover{box-shadow:0 3px 12px #00000024}.ms-card.ms-unsaid{width:calc(240px * var(--ms-card-scale,1));background:color-mix(in oklab, var(--warning) 9%, var(--surface-elevated));border-color:var(--warning);border-style:dashed}.ms-card.ms-unsaid .ms-atom-label{overflow-wrap:anywhere}:root[data-theme=light] .ms-card.ms-unsaid{background:color-mix(in oklab, var(--warning) 8%, var(--surface-elevated))}:root[data-theme=dark] .ms-card.ms-unsaid{background:color-mix(in oklab, var(--warning) 14%, var(--surface-elevated))}.ms-card-header{align-items:center;gap:5px;margin-bottom:4px;display:flex}.ms-kind-dot{background:var(--ms-kind-color,var(--text-muted));border-radius:50%;flex-shrink:0;width:7px;height:7px}.ms-kind-label{font-size:max(9px, calc(9px * var(--ms-card-scale,1)));letter-spacing:.02em;text-transform:uppercase;color:var(--ms-kind-color,var(--text-muted));filter:brightness(.85);font-weight:700;line-height:1}.ms-atom-label{font-size:calc(11.5px * var(--ms-card-scale,1));color:var(--text-primary,inherit);word-break:break-word;font-weight:600;line-height:1.35}.ms-card-quote{max-height:0;font-size:calc(10.5px * var(--ms-card-scale,1));color:var(--text-muted);margin-top:0;line-height:1.45;transition:max-height .28s;overflow:hidden}.ms-card[data-open=true] .ms-card-quote{max-height:80px;margin-top:5px}.ms-you-said{color:var(--text-muted);font-style:italic;font-weight:600}.ms-card-remove{background:color-mix(in oklab, var(--surface-elevated) 88%, var(--text-muted));width:17px;height:17px;color:var(--text-muted);cursor:pointer;opacity:0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;font-size:13px;line-height:1;transition:opacity .15s,color .15s,background .15s;display:flex;position:absolute;top:2px;right:2px}.ms-card:hover .ms-card-remove,.ms-card:focus-within .ms-card-remove{opacity:1}.ms-card-remove:hover,.ms-card-remove:focus-visible{background:var(--warning,#c9705e);color:#fff;opacity:1}@media (hover:none){.ms-card-remove{opacity:1}}.ms-actions{background:linear-gradient(to top, var(--surface-default) 78%, transparent);flex-wrap:wrap;justify-content:center;gap:6px;padding:10px 12px;transition:transform .4s cubic-bezier(.22,1,.36,1) .6s;display:flex;position:absolute;bottom:14px;left:0;right:0;transform:translateY(calc(100% + 14px))}.ms-canvas[data-has-actions=true] .ms-actions,.ms-canvas[data-phase=settled] .ms-actions{transform:translateY(0)}.ms-action-btn{border:1.5px solid var(--grid-line);background:var(--surface-elevated);color:var(--text-primary,inherit);cursor:pointer;white-space:nowrap;border-radius:20px;padding:5px 11px;font-size:11px;font-weight:600;transition:background .15s,box-shadow .15s}.ms-action-btn:hover{background:color-mix(in oklab, var(--surface-elevated) 80%, var(--insight,#5b63e8));box-shadow:0 2px 6px #0000001a}.ms-action-primary{background:var(--insight,#5b63e8);border-color:var(--insight,#5b63e8);color:#fff}.ms-action-primary:hover{background:color-mix(in oklab, var(--insight,#5b63e8) 85%, #000)}.ms-action-btn.is-active{border-color:var(--insight,#5b63e8);background:color-mix(in oklab, var(--insight,#5b63e8) 14%, var(--surface-elevated));color:var(--insight,#5b63e8)}.ms-tension-callout{z-index:14;border-radius:var(--r-md,14px);border:1px solid color-mix(in oklab, var(--warning) 40%, var(--grid-line));background:var(--surface-elevated);width:min(300px,60%);box-shadow:var(--shadow-modal,0 18px 48px #00000047);transform-origin:100% 0;flex-direction:column;gap:8px;padding:14px 16px 16px;animation:.4s cubic-bezier(.22,1,.36,1) both ms-panel-in-corner;display:flex;position:absolute;top:16px;right:16px}@container (width<=460px){.ms-tension-callout{transform-origin:bottom;width:auto;inset:auto 12px 12px}}.ms-tension-eyebrow{font-family:var(--font-data);letter-spacing:.14em;color:var(--warning);font-size:9px;font-weight:700}.ms-tension-body{color:var(--text-primary,inherit);margin:0;font-size:13px;line-height:1.5}.ms-tension-body strong{color:var(--text-primary,inherit);font-weight:600}.ms-tension-cta{border:1.5px solid color-mix(in oklab, var(--warning) 55%, var(--grid-line));background:color-mix(in oklab, var(--warning) 12%, var(--surface-elevated));color:color-mix(in oklab, var(--warning) 78%, var(--text-primary,#222));cursor:pointer;border-radius:18px;align-self:flex-start;margin-top:2px;padding:6px 12px;font-size:11.5px;font-weight:600;transition:background .15s}.ms-tension-cta:hover{background:color-mix(in oklab, var(--warning) 22%, var(--surface-elevated))}.ms-tension-close{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:2px;font-size:16px;line-height:1;position:absolute;top:8px;right:10px}.ms-tension-close:hover{color:var(--text-primary,inherit)}.ms-plan,.ms-kept{z-index:16;border-radius:var(--r-lg,18px);border:1px solid var(--grid-line);background:var(--surface-elevated);width:min(440px,86%);max-height:78%;box-shadow:var(--shadow-modal,0 24px 60px #00000052);flex-direction:column;gap:12px;padding:20px 22px 22px;animation:.4s cubic-bezier(.22,1,.36,1) both ms-panel-in;display:flex;position:absolute;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%)}.ms-plan-head{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.ms-plan-title{color:var(--text-primary,inherit);font-size:14px;font-weight:600}.ms-plan-steps{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.ms-plan-step{align-items:flex-start;gap:10px;display:flex}.ms-plan-check{border:1.5px solid color-mix(in oklab, var(--insight,#5b63e8) 55%, var(--grid-line));background:color-mix(in oklab, var(--insight,#5b63e8) 8%, transparent);cursor:pointer;border-radius:5px;flex:none;justify-content:center;align-items:center;width:18px;height:18px;margin-top:1px;padding:0;transition:background .15s,border-color .15s;display:inline-flex}.ms-plan-check:hover{border-color:var(--insight,#5b63e8);background:color-mix(in oklab, var(--insight,#5b63e8) 16%, transparent)}.ms-plan-check[aria-checked=true]{background:var(--insight,#5b63e8);border-color:var(--insight,#5b63e8)}.ms-plan-check-mark{color:#fff;font-size:11px;font-weight:800;line-height:1}.ms-plan-step[data-done=true] .ms-plan-step-label{color:var(--text-muted);text-decoration:line-through}.ms-plan-step-body{flex-direction:column;gap:2px;display:flex}.ms-plan-step-label{color:var(--text-primary,inherit);font-size:13px;font-weight:600;line-height:1.35}.ms-plan-step-trace{color:var(--text-muted);font-size:11px;font-style:italic;line-height:1.4}.ms-plan-empty{color:var(--text-muted);margin:0;font-size:13px}.ms-plan-foot{border-top:1px solid var(--grid-line);justify-content:space-between;align-items:center;gap:12px;margin-top:2px;padding-top:12px;display:flex}.ms-plan-note{color:var(--text-muted);font-size:11px;line-height:1.4}.ms-kept{text-align:left;align-items:flex-start;width:min(380px,84%)}.ms-kept-eyebrow{font-family:var(--font-data);letter-spacing:.14em;color:var(--insight,#5b63e8);font-size:9px;font-weight:700}.ms-kept-body{color:var(--text-primary,inherit);margin:0;font-size:14px;line-height:1.5}.ms-kept-actions{flex-wrap:wrap;gap:8px;display:flex}.ms-kept-btn{border:1.5px solid var(--grid-line);background:var(--surface-default);color:var(--text-primary,inherit);cursor:pointer;border-radius:20px;padding:7px 14px;font-size:12px;font-weight:600;transition:border-color .15s}.ms-kept-btn:hover{border-color:var(--insight,#5b63e8)}.ms-kept-memory{color:var(--text-muted);font-size:11px;line-height:1.45}@keyframes ms-panel-in{0%{opacity:0;transform:translate(-50%,-50%)scale(.96)}to{opacity:1;transform:translate(-50%,-50%)scale(1)}}@keyframes ms-panel-in-corner{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.ms-signal-chip{white-space:nowrap;letter-spacing:.01em;color:var(--text-secondary);background:color-mix(in oklab, var(--surface-elevated) 88%, transparent);border:1px solid var(--line-soft);border-radius:var(--r-full);pointer-events:none;padding:4px 11px;font-size:10px;font-style:italic;font-weight:500;animation:.4s forwards ms-signal-in;position:absolute;bottom:calc(100% + 10px);left:50%;transform:translate(-50%)}@keyframes ms-signal-in{0%{opacity:0;transform:translate(-50%)translateY(4px)}to{opacity:1;transform:translate(-50%)translateY(0)}}.ms-signal-chip[data-kind=tension]{color:var(--warning);border-color:color-mix(in oklab, var(--warning) 35%, var(--line-soft))}.ms-signal-chip[data-kind=unsaid]{color:var(--insight);border-color:color-mix(in oklab, var(--insight) 30%, var(--line-soft))}@keyframes ms-breathe{0%,to{opacity:.55}50%{opacity:.8}}.ms-card[data-status=forming]{animation:.35s forwards ms-card-forming-in,2s ease-in-out .5s infinite ms-breathe}.ms-synthesis-line{max-width:200px;color:var(--text-muted);text-align:center;opacity:0;font-size:9.5px;font-style:italic;font-weight:400;line-height:1.4;transition:opacity .5s}.ms-canvas[data-phase=settled] .ms-synthesis-line{opacity:1;transition-delay:.9s}.ms-canvas[data-phase=settled] .ms-center-question{font-size:12.5px;font-weight:600}@keyframes ms-card-settle-glow{0%{box-shadow:0 0 #0000}35%{box-shadow:0 0 0 3px color-mix(in oklab, var(--ms-kind-color,var(--insight)) 28%, transparent)}to{box-shadow:0 2px 8px #00000014}}.ms-canvas[data-revealing=true] .ms-world .ms-card[data-status=stable]{animation:.35s forwards ms-card-in,.7s forwards ms-card-settle-glow;animation-delay:calc(var(--ms-i,0) * 40ms + .2s), calc(var(--ms-i,0) * 40ms + .2s)}@keyframes ms-thread-draw{0%{stroke-dashoffset:1px;opacity:.2}to{stroke-dashoffset:0;opacity:.7}}.ms-canvas[data-revealing=true] .ms-thread[data-hero=true]{stroke-dasharray:1;stroke-dashoffset:1px;animation:.8s .6s forwards ms-thread-draw}.ms-canvas[data-revealing=true] .ms-actions{opacity:0;animation:.4s 1.2s forwards ms-actions-rise}@keyframes ms-actions-rise{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.ms-unsaid-actions{gap:6px;margin-top:8px;display:flex}.ms-unsaid-btn{border-radius:var(--r-sm);border:1px solid var(--line);background:var(--surface-default);color:var(--text-secondary);cursor:pointer;text-align:center;white-space:nowrap;flex:1;padding:4px 8px;font-size:10px;font-weight:600;transition:background .15s,border-color .15s,color .15s}.ms-unsaid-btn:hover{background:var(--surface-elevated);color:var(--text-primary)}.ms-unsaid-confirm:hover{border-color:var(--insight);color:var(--insight)}.ms-unsaid-dismiss:hover{border-color:var(--text-muted)}@media (prefers-reduced-motion:reduce){.ms-spoke,.ms-thread,.ms-link,.ms-card,.ms-card[data-status=forming]{opacity:1;stroke-dashoffset:0;animation:none;transform:translate(-50%,-50%)scale(1)}.ms-spoke{opacity:.26}.ms-thread{opacity:.7}.ms-link{opacity:.4}.ms-card[data-status=forming]{opacity:.65;transform:translate(-50%,-50%)scale(.97)}.ms-card-quote,.ms-actions{transition:none}.ms-tension-callout,.ms-plan,.ms-kept{animation:none}.ms-signal-chip{opacity:1;animation:none}.ms-canvas[data-revealing=true] .ms-world .ms-card[data-status=stable],.ms-canvas[data-revealing=true] .ms-thread[data-hero=true],.ms-canvas[data-revealing=true] .ms-actions{opacity:1;stroke-dashoffset:0;animation:none;transform:none}}.ms-world{transform-origin:0 0;will-change:transform;--ms-counter:clamp(1, calc(1 / var(--ms-cam-scale,1)), 1.6);width:1000px;height:700px;transition:transform 1.1s cubic-bezier(.22,.9,.3,1);position:absolute;top:0;left:0}.ms-canvas .ms-center{top:50%}.ms-world .ms-spoke,.ms-world .ms-thread,.ms-world .ms-link{vector-effect:non-scaling-stroke}.ms-world .ms-card{transform:translate(-50%, -50%) scale(var(--ms-counter));transition:transform 1.1s cubic-bezier(.22,.9,.3,1),box-shadow .2s}.ms-world .ms-card[data-status=forming]{transform:translate(-50%, -50%) scale(calc(var(--ms-counter) * .97))}.ms-world .ms-card{animation-name:ms-card-in-world}.ms-world .ms-card[data-status=forming]{animation-name:ms-card-forming-in-world}@keyframes ms-card-in-world{to{opacity:1;transform:translate(-50%, -50%) scale(var(--ms-counter))}}@keyframes ms-card-forming-in-world{to{opacity:.65;transform:translate(-50%, -50%) scale(calc(var(--ms-counter) * .97))}}.ms-world .ms-cluster-label{transform:translate(-50%, -50%) scale(var(--ms-counter));animation-name:ms-cluster-rise-in-world}@keyframes ms-cluster-rise-in-world{0%{opacity:0;transform:translate(-50%, -42%) scale(var(--ms-counter))}to{opacity:.85;transform:translate(-50%, -50%) scale(var(--ms-counter))}}@media (prefers-reduced-motion:reduce){.ms-world{transition:none}.ms-world .ms-card{transition:box-shadow .2s}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-CWqRe4-B.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-6QnY-Fw_.js";import{l as c,n as l}from"./useLiveConfig-vMyjo2gV.js";import{r as u}from"./format-hc2QOoIu.js";import{t as d}from"./pin-DRN5H7py.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-DWHIOldG.js";import{D as r,H as i,V as a,b as o,p as s,y as c}from"./useStudy-DRNarubG.js";import{l,n as u}from"./useDashboardLoop-BSBGTrE2.js";/* empty css */import"./DashboardsApp-DeBWrYDk.js";import{t as d}from"./relate-DDWak0Tv.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-CWqRe4-B.js";import{D as r,H as i,V as a,b as o,p as s,y as c}from"./useStudy-6QnY-Fw_.js";import{l,n as u}from"./useDashboardLoop-mGmJwv27.js";/* empty css */import"./DashboardsApp-mvMbGmp0.js";import{t as d}from"./relate-yq30L3hZ.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-
|
|
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-CWqRe4-B.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-DWHIOldG.js";import{i as r,n as i,o as a}from"./notes-D21K92Wx.js";import{t as o}from"./registry-eQ4cE0zj.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-CWqRe4-B.js";import{i as r,n as i,o as a}from"./notes-BG5QP-Dj.js";import{t as o}from"./registry-CNr6L-3z.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-
|
|
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-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PrismOverlay-UTsJ8R5d.js","assets/index-CWqRe4-B.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-CWqRe4-B.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-vMyjo2gV.js";/* empty css */var u=s(),d=e(),f=t();r();var p=n(()=>c(()=>import(`./PrismOverlay-UTsJ8R5d.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-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-CWqRe4-B.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-
|
|
2
|
-
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{J as t,q as n}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/kokoro-B-3GqktX.js","assets/chunk-BVpWp9h4.js","assets/index-CWqRe4-B.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-CWqRe4-B.js";import{t as r}from"./BriefingPlayer-D-QhLgXI.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-B-3GqktX.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-B-3GqktX.js`).then(e=>e.i).then(e=>e.cancelKokoro()),__vite__mapDeps([0,1,2,3,4,5,6,7]))}})}export{a as PrismBriefingPlayer};
|