@mavea/mavea 2.2.0 → 2.2.1
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/CHANGELOG.md +26 -0
- package/dist/.vite/manifest.json +354 -354
- package/dist/assets/{AnnotationLayer-HanjTRYY.js → AnnotationLayer-CzXCVZCu.js} +1 -1
- package/dist/assets/{AppCommandPalette-DBiuHUNL.js → AppCommandPalette-D6904cc9.js} +1 -1
- package/dist/assets/{CheckLogRail-CfoGgTqv.js → CheckLogRail-CeRhbIwa.js} +1 -1
- package/dist/assets/{ConversationVideoStudio-CEi_cgBR.js → ConversationVideoStudio-Cyu-M9Us.js} +1 -1
- package/dist/assets/{CourseLessonReader-CaLT_Y6N.js → CourseLessonReader-BvTabDPT.js} +2 -2
- package/dist/assets/{CoursesApp-IfWCeml5.js → CoursesApp-B8kZ6pFr.js} +2 -2
- package/dist/assets/{DashPresent-T7I-lAng.js → DashPresent-Dr0LLNnz.js} +1 -1
- package/dist/assets/{DashboardDetail-BhRSDenD.js → DashboardDetail-B5JZ6fRz.js} +2 -2
- package/dist/assets/{DashboardLoopGate-DBVAR7IS.js → DashboardLoopGate-UHcbTCXN.js} +2 -2
- package/dist/assets/DashboardLoopRuntime-BZutKupS.js +1 -0
- package/dist/assets/{DashboardsApp-C_awJ3hM.js → DashboardsApp-DzVa4Nqd.js} +2 -2
- package/dist/assets/{DeepZoomApp-C-66OasV.js → DeepZoomApp-CN8ZKeS4.js} +1 -1
- package/dist/assets/{DelegatePanel-DaJTDkYu.js → DelegatePanel-DO7J_rk_.js} +1 -1
- package/dist/assets/{DemoGallery-B9F7SUzp.js → DemoGallery-DMQP4JAa.js} +1 -1
- package/dist/assets/{DropSelect-IBjV5Ol1.js → DropSelect-BVDNR47E.js} +1 -1
- package/dist/assets/{ExportModal-gckBiikq.js → ExportModal-BVsirsNU.js} +1 -1
- package/dist/assets/{ExtractionPreview-DDOkCH9u.js → ExtractionPreview-872OE2ZI.js} +1 -1
- package/dist/assets/{FeatureUseNotice-BfnZH8Vt.js → FeatureUseNotice-BNDajs0p.js} +1 -1
- package/dist/assets/{FlagshipCommandPalette-CYQdl3Zu.js → FlagshipCommandPalette-mKkMVsza.js} +1 -1
- package/dist/assets/{FlagshipShowcase-CFMmbeff.js → FlagshipShowcase-CL_KWgKn.js} +1 -1
- package/dist/assets/{FlashcardsApp-KJ1bmlbp.js → FlashcardsApp-COYviD1h.js} +1 -1
- package/dist/assets/GalleryApp-B5z9rsrO.css +1 -0
- package/dist/assets/{GalleryApp-Dh8Nc_So.js → GalleryApp-D96R7Hdy.js} +2 -2
- package/dist/assets/{HonestByDesign-C3LTj4Bx.js → HonestByDesign-DOg91fEf.js} +1 -1
- package/dist/assets/{HowItWorks-C5Dqqvl-.js → HowItWorks-D4lHSwEb.js} +1 -1
- package/dist/assets/{LegalApp-DYVJIUyF.js → LegalApp-BSPhYvKz.js} +1 -1
- package/dist/assets/{LegalMarkdownDocument-CbuQ-pLN.js → LegalMarkdownDocument-DDUOgn72.js} +1 -1
- package/dist/assets/{LegalPageShell-CoEyiZGz.js → LegalPageShell-DSbe8dTr.js} +1 -1
- package/dist/assets/{LibraryOverlay-TQnxY9R8.js → LibraryOverlay-CEhVoSyv.js} +1 -1
- package/dist/assets/{LiveApp-DRnphsFA.js → LiveApp-DtpM4tO0.js} +4 -4
- package/dist/assets/{LiveSettings-Cz3XSqv8.js → LiveSettings-C7luyoWU.js} +1 -1
- package/dist/assets/{MindMapViewerDrawer-AUJlLC2R.js → MindMapViewerDrawer-DxcjLJzB.js} +1 -1
- package/dist/assets/{MindShape-BbuVOTaR.js → MindShape-DhEmAQeq.js} +1 -1
- package/dist/assets/{PinToDashboard-BdXI7oo9.js → PinToDashboard-CQHDENt1.js} +1 -1
- package/dist/assets/{PlanReview-CGRvSRAt.js → PlanReview-f7EY7XTc.js} +1 -1
- package/dist/assets/{PresentationDeck-CoPmOr2f.js → PresentationDeck-Bo1BVx73.js} +1 -1
- package/dist/assets/{PrismApp-DPECS285.js → PrismApp-CBr8XpUt.js} +2 -2
- package/dist/assets/{PrismBriefingPlayer-BvpG7oZs.js → PrismBriefingPlayer-qNjVbmUq.js} +2 -2
- package/dist/assets/{PrismOverlay-c8rcvt4V.js → PrismOverlay-L_lLIH_1.js} +3 -3
- package/dist/assets/{PrismWorkbench-BEaD7Arj.js → PrismWorkbench-DK-1IY4A.js} +1 -1
- package/dist/assets/{PrivacyApp-_O_MR088.js → PrivacyApp-DT8wZumn.js} +1 -1
- package/dist/assets/{ReplayCard-IN-ilb2E.js → ReplayCard-BQr6DWYi.js} +2 -2
- package/dist/assets/{ReplayOverlay-ZRjFP-zf.js → ReplayOverlay-CRVixwg2.js} +1 -1
- package/dist/assets/{RippleApp-D_Gd8Lw8.js → RippleApp-CMY2OCRm.js} +2 -2
- package/dist/assets/{RippleOverlay-vP2KxTiI.js → RippleOverlay-Dwi8Ir43.js} +2 -2
- package/dist/assets/{SeeDontRead-BmUyUai5.js → SeeDontRead-BkeAv1Jd.js} +1 -1
- package/dist/assets/{ShareModal-_KYCohqO.js → ShareModal-DVwc57KT.js} +2 -2
- package/dist/assets/{ShipCourse--ajDej06.js → ShipCourse-BNEPgsV5.js} +1 -1
- package/dist/assets/{SignatureLoop-DDw2gtQ_.js → SignatureLoop-C9GvENvP.js} +1 -1
- package/dist/assets/{SynthesisApp-CilzogOF.js → SynthesisApp-BPAT6v7a.js} +2 -2
- package/dist/assets/{SynthesisOverlay-CAK5h0hB.js → SynthesisOverlay-u_W105hD.js} +1 -1
- package/dist/assets/{TemplatePicker-3w18ViSc.js → TemplatePicker-CAC4ggbJ.js} +1 -1
- package/dist/assets/{TermsApp-BfTGOTq6.js → TermsApp-BlyUsTrJ.js} +1 -1
- package/dist/assets/{TopicCanvas-DSCNWNjv.js → TopicCanvas-CyBGLgb0.js} +2 -2
- package/dist/assets/{TourPrism-Y47m-KGq.js → TourPrism-Cn2YHIwh.js} +1 -1
- package/dist/assets/{TrackerTile-LXFQXcvH.js → TrackerTile-Ds3ks6Bh.js} +2 -2
- package/dist/assets/{TwoSurfaces-CSpKrgfJ.js → TwoSurfaces-cdP8bAG9.js} +1 -1
- package/dist/assets/{WorldOverlay-D5FWgYe3.js → WorldOverlay-DPkQobVE.js} +1 -1
- package/dist/assets/{WowFeatures-e6mkftpD.js → WowFeatures-BBtcWAOz.js} +1 -1
- package/dist/assets/{ZoomDeck-CC9zXPxF.js → ZoomDeck-Cdvkvo2H.js} +1 -1
- package/dist/assets/{audioTrack-w1tZwSoU.js → audioTrack-W_18XwGZ.js} +1 -1
- package/dist/assets/canvas-BX595EVB.js +1 -0
- package/dist/assets/{capture-Bomj_Egy.js → capture-Dyff_zSz.js} +1 -1
- package/dist/assets/{confirmAdd-CUFiPNWz.js → confirmAdd-D_hDIeaD.js} +1 -1
- package/dist/assets/{dashboardEvents-PktCbV72.js → dashboardEvents-BV0Ly6No.js} +1 -1
- package/dist/assets/{deepen-Dz4yTyJs.js → deepen-D8kPrlU5.js} +1 -1
- package/dist/assets/docs-6X4Ki_cV.js +1 -0
- package/dist/assets/{effort-BKGxLYoq.js → effort-QeWrMtZt.js} +1 -1
- package/dist/assets/{generateBeats-BjWC2fwl.js → generateBeats-Da9RmZke.js} +1 -1
- package/dist/assets/{generateLive-BLajGcNK.js → generateLive-CDIkclO4.js} +1 -1
- package/dist/assets/{index-CKRjGbeR.js → index-BMeoXWPR.js} +3 -3
- package/dist/assets/{kokoro-B-rc224u.js → kokoro-DcP-u0Tl.js} +1 -1
- package/dist/assets/{loader-BiYFMeRS.js → loader-BRfSnl9t.js} +2 -2
- package/dist/assets/{notes-nfocTnUv.js → notes-BDCTTA87.js} +1 -1
- package/dist/assets/{perfProbe-BqMK4N56.js → perfProbe-ssw0AtWX.js} +1 -1
- package/dist/assets/{pin-IyE46GaQ.js → pin-Bic4-gim.js} +1 -1
- package/dist/assets/{portal-C2b5NoMN.js → portal-Dpb34d3-.js} +1 -1
- package/dist/assets/{prewarm-Pvdu5Jt0.js → prewarm-xdXDmF8B.js} +1 -1
- package/dist/assets/{quietHours-lWcjQ2Iu.js → quietHours-uFS7n8N6.js} +1 -1
- package/dist/assets/{registry-BD1Zyd46.js → registry-BV02ROnH.js} +1 -1
- package/dist/assets/{registry-OUL5YJry.js → registry-BWx2f_wi.js} +1 -1
- package/dist/assets/{registry-BJFqryP_.js → registry-Bs5HUWIJ.js} +1 -1
- package/dist/assets/registry-CdPShFc3.js +1 -0
- package/dist/assets/{registry-BiT0eNZb.js → registry-DNIasVGX.js} +1 -1
- package/dist/assets/{registry-BTUHr4mQ.js → registry-DueizAoA.js} +1 -1
- package/dist/assets/{registry-CnmuVlAA.js → registry-PAcazQzL.js} +1 -1
- package/dist/assets/{relate-ZHm-ZvaR.js → relate-BHJl3RaA.js} +1 -1
- package/dist/assets/{replay-DBeCo_vn.js → replay-DoRQJHjZ.js} +1 -1
- package/dist/assets/{select-CejTsgpx.js → select-StjZ4ZRN.js} +1 -1
- package/dist/assets/shard010-Bal9PeRL.js +1 -0
- package/dist/assets/shard049-C4_IyApZ.js +1 -0
- package/dist/assets/{useDashboardLoop-SPlr1Mrm.js → useDashboardLoop-DEE_sLT0.js} +1 -1
- package/dist/assets/{walkSync-BtO3jsqQ.js → walkSync-CRhkAQFu.js} +1 -1
- package/dist/demo-assets/CREDITS.md +36 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/DashboardLoopRuntime-B55z8L4b.js +0 -1
- package/dist/assets/GalleryApp-B4KBdNyu.css +0 -1
- package/dist/assets/canvas-BRGFkCD-.js +0 -1
- package/dist/assets/docs-B2aDtm5K.js +0 -1
- package/dist/assets/registry-BmjYillB.js +0 -1
- package/dist/assets/shard010-CQfR6lnk.js +0 -1
- package/dist/assets/shard049-hPaNN2sL.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./compiler-runtime-qQQXpJgv.js";import{t}from"./jsx-runtime-DeHZSEgm.js";import{ot as n}from"./index-
|
|
1
|
+
import{t as e}from"./compiler-runtime-qQQXpJgv.js";import{t}from"./jsx-runtime-DeHZSEgm.js";import{ot as n}from"./index-BMeoXWPR.js";import{r}from"./info-CiqHR5cs.js";var i=e(),a=t(),o=[`No sign-up`,`No install`,`Key-free tour`,`Keys session-only`];function s(e){let t=(0,i.c)(16),{onEnterLive:s}=e,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,a.jsxs)(n,{eyebrow:`Yours in seconds`,children:[`No account. `,(0,a.jsx)(`em`,{children:`Your engine.`})]}),t[0]=u):u=t[0];let d,f,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,a.jsx)(`div`,{className:`fl-surface-tag insight`,children:`Instant · no sign-up`}),f=(0,a.jsx)(`div`,{className:`fl-surface-title`,children:`Nothing to sign up for`}),p=(0,a.jsx)(`p`,{className:`fl-surface-body`,children:`No account, no waitlist, no install. The tour and demos run key-free; Live starts the moment you paste a key.`}),t[1]=d,t[2]=f,t[3]=p):(d=t[1],f=t[2],p=t[3]);let m;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,a.jsx)(`div`,{className:`fl-surface-chips`,children:o.map(l)}),t[4]=m):m=t[4];let h;t[5]===s?h=t[6]:(h=(0,a.jsxs)(`div`,{className:`fl-surface`,children:[d,f,p,m,(0,a.jsx)(`button`,{type:`button`,className:`fl-ghost-btn`,onClick:()=>s(),children:`Open Mavéa →`})]}),t[5]=s,t[6]=h);let g,_,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,a.jsx)(`div`,{className:`fl-surface-tag live`,children:`Live · your model`}),_=(0,a.jsx)(`div`,{className:`fl-surface-title`,children:`Bring your own keys`}),v=(0,a.jsx)(`p`,{className:`fl-surface-body`,children:`Anthropic, OpenAI, Gemini, Grok, OpenRouter. Same beautiful canvas, your engine.`}),t[7]=g,t[8]=_,t[9]=v):(g=t[7],_=t[8],v=t[9]);let y;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,a.jsx)(`div`,{className:`fl-surface-chips`,children:r.map(c)}),t[10]=y):y=t[10];let b;t[11]===s?b=t[12]:(b=(0,a.jsxs)(`div`,{className:`fl-surface live`,children:[g,_,v,y,(0,a.jsx)(`button`,{type:`button`,className:`fl-ghost-btn live`,onClick:()=>s(),children:`Open Live →`})]}),t[11]=s,t[12]=b);let x;return t[13]!==b||t[14]!==h?(x=(0,a.jsxs)(a.Fragment,{children:[u,(0,a.jsxs)(`div`,{className:`fl-surfaces`,children:[h,b]})]}),t[13]=b,t[14]=h,t[15]=x):x=t[15],x}function c(e){return(0,a.jsx)(`span`,{className:`fl-surface-chip fl-model-chip`,children:e.label},e.id)}function l(e){return(0,a.jsx)(`span`,{className:`fl-surface-chip`,children:e},e)}export{s as TwoSurfaces};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lens-Ba83fBmq.js","assets/display-CAb_PiGv.js","assets/facts-CNQz8OQz.js","assets/types-DuEbJpIA.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{n as r,t as i}from"./preload-helper-CiWYd9n-.js";import{i as a,n as o,t as s}from"./loader-BiYFMeRS.js";import{t as c}from"./useFocusTrap-CJmpNZv2.js";import{r as l,t as u}from"./useSpatialCanvas-CfmZOXXP.js";import{i as d}from"./format-q0LwBjID.js";import{i as f,n as p}from"./openWorld-B4VY6xO7.js";import{a as m,i as h,n as g,t as _}from"./display-CAb_PiGv.js";import{t as v}from"./sentenceCase-CLDiNB0f.js";import{r as y,t as b}from"./sourceHost-BV3t2XDb.js";import{r as x}from"./stepDriver-DwjFet6U.js";import{a as S,i as C,s as w}from"./spokenText-Dy-GZvZV.js";import{d as T,l as E,s as D,u as O}from"./walkSync-BtO3jsqQ.js";import{n as k}from"./emphasize-BqCIst-B.js";import{c as A,s as j,t as M}from"./validate-MQG0EcTD.js";import{n as N,s as P}from"./receipts-D7zveV-I.js";import{n as F,r as I}from"./value-Dx7DZob4.js";import{t as L}from"./types-DuEbJpIA.js";import{a as R,c as z,d as B,f as V,i as H,l as U,n as W,o as G,r as ee,s as K,t as te,u as ne}from"./offers-eBNj_lSP.js";import{n as re,t as ie}from"./engine-BiM6INsW.js";var q=e(),J=t(),Y=n();function ae(e){return e.kind}var oe=.33,se=.1,ce=.005;function le(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))return`would barely change`;let n=Math.abs(e)>1e-9?Math.abs(e):1,r=(t-e)/n,i=Math.abs(r);if(i<=ce)return`would barely change`;let a=r>0?`rise`:`fall`;return i>=oe?`would ${a} meaningfully`:i>=se?`would ${a} somewhat`:`would ${a} slightly`}var ue=.6;function de(e){if(!Number.isFinite(e))return null;let t=e-1,n=Math.abs(t);if(n<=.005)return null;let r=t>0?`stronger`:`weaker`;return n>=ue?`much ${r}`:n>=oe?r:`slightly ${r}`}var fe=440,pe=2,me=1.25,he=320;function ge(e){if(!(e===void 0||!Number.isFinite(e))){if(e<.995)return`weaker`;if(e>1.005)return`stronger`}}var _e=[{id:`mv-arrow`,cls:`mv-marker-up`,refX:9,size:13,shape:(0,Y.jsx)(`path`,{d:`M0.5 1 L9.5 5 L0.5 9 Z`})},{id:`mv-arrow-damp`,cls:`mv-marker-down`,refX:8,size:17,shape:(0,Y.jsx)(`path`,{d:`M8 0.6 L8 9.4`})},{id:`mv-arrow-open`,cls:`mv-marker-open`,refX:9,size:13,shape:(0,Y.jsx)(`path`,{d:`M1 1.4 L9 5 L1 8.6 Z`})},{id:`mv-arrow-ring`,cls:`mv-marker-ring`,refX:7.4,size:13,shape:(0,Y.jsx)(`circle`,{cx:`5`,cy:`5`,r:`3`})},{id:`mv-dot`,cls:`mv-marker-dot`,refX:5,size:9,shape:(0,Y.jsx)(`circle`,{cx:`5`,cy:`5`,r:`2.6`})}];function ve(){let e=(0,J.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(`defs`,{children:_e.flatMap(ye)}),e[0]=t):t=e[0],t}function ye(e){return[!1,!0].map(t=>(0,Y.jsx)(`marker`,{id:t?`${e.id}-soft`:e.id,className:`mv-marker ${e.cls}${t?` mv-marker-soft`:``}`,viewBox:`0 0 10 10`,refX:e.refX,refY:`5`,markerUnits:`userSpaceOnUse`,markerWidth:e.size,markerHeight:e.size,orient:`auto`,children:e.shape},t?`${e.id}-soft`:e.id))}function be(e,t){let n=(0,J.c)(5),r;n[0]===e.current?r=n[1]:(r=()=>{let t=e.current;if(!t||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)return;let n=t.querySelectorAll(`[data-draw]:not(.m-draw-path):not([data-drawn])`),r=Array.from(n,Se);n.forEach((e,t)=>{let n=r[t];n!==null&&(e.style.setProperty(`--path-len`,`${n}px`),e.style.setProperty(`--delay`,`${fe}ms`),e.classList.add(`m-draw-path`))});let i=xe;return t.addEventListener(`animationend`,i),()=>t.removeEventListener(`animationend`,i)},n[0]=e.current,n[1]=r);let i;n[2]!==t||n[3]!==e?(i=[e,t],n[2]=t,n[3]=e,n[4]=i):i=n[4],(0,q.useEffect)(r,i)}function xe(e){if(e.animationName!==`mavea-draw`)return;let t=e.target;t.classList.remove(`m-draw-path`),t.style.removeProperty(`--path-len`),t.style.removeProperty(`--delay`),t.dataset.drawn=``}function Se(e){return typeof e.getTotalLength==`function`?e.getTotalLength():null}function Ce(e){let t=(0,J.c)(33),{chrome:n,bbox:r,exiting:i,onSettle:a}=e,o=(0,q.useRef)(null);be(o,n.paths);let s=i?``:void 0,c=i?!0:void 0,l=r.w,u=r.h,d=`${r.x} ${r.y} ${r.w} ${r.h}`,f;t[0]===n.bands?f=t[1]:(f=n.bands.map(Te),t[0]=n.bands,t[1]=f);let p;t[2]===n.paths?p=t[3]:(p=n.paths.map(we),t[2]=n.paths,t[3]=p);let m;t[4]!==r.h||t[5]!==r.w||t[6]!==d||t[7]!==f||t[8]!==p?(m=(0,Y.jsxs)(`svg`,{ref:o,className:`mv-chrome-svg`,width:l,height:u,viewBox:d,"aria-hidden":`true`,children:[f,p]}),t[4]=r.h,t[5]=r.w,t[6]=d,t[7]=f,t[8]=p,t[9]=m):m=t[9];let h;if(t[10]!==r.x||t[11]!==r.y||t[12]!==n.bands){let e;t[14]!==r.x||t[15]!==r.y?(e=e=>e.label===void 0?null:(0,Y.jsx)(`div`,{className:`mv-shelf-label`,style:{left:e.x-r.x+12,top:e.y-r.y+12},children:e.label},`${e.id}:label`),t[14]=r.x,t[15]=r.y,t[16]=e):e=t[16],h=n.bands.map(e),t[10]=r.x,t[11]=r.y,t[12]=n.bands,t[13]=h}else h=t[13];let g;if(t[17]!==r.x||t[18]!==r.y||t[19]!==n.labels){let e;t[21]!==r.x||t[22]!==r.y?(e=e=>(0,Y.jsx)(`div`,{className:`mv-chrome-label ${e.className}`,"data-anchor":e.anchor??`start`,style:{left:e.x-r.x,top:e.y-r.y},children:e.text},e.id),t[21]=r.x,t[22]=r.y,t[23]=e):e=t[23],g=n.labels.map(e),t[17]=r.x,t[18]=r.y,t[19]=n.labels,t[20]=g}else g=t[20];let _;t[24]!==g||t[25]!==h?(_=(0,Y.jsxs)(`div`,{className:`mv-chrome-labels`,children:[h,g]}),t[24]=g,t[25]=h,t[26]=_):_=t[26];let v;return t[27]!==a||t[28]!==s||t[29]!==_||t[30]!==c||t[31]!==m?(v=(0,Y.jsxs)(`div`,{className:`mv-chrome`,"data-exiting":s,onTransitionEnd:a,"aria-hidden":c,children:[m,_]}),t[27]=a,t[28]=s,t[29]=_,t[30]=c,t[31]=m,t[32]=v):v=t[32],v}function we(e){return(0,Y.jsx)(`path`,{className:e.className,d:e.d,fill:`none`,"data-draw":e.draw?``:void 0},e.id)}function Te(e){return(0,Y.jsx)(`rect`,{className:`mv-band ${e.className}`,x:e.x,y:e.y,width:e.w,height:e.h,rx:12},e.id)}function Ee(e){if(e instanceof Element)return e.closest(`.mv-node`)?.dataset.id}var De=60;function Oe(e){return[...e.positions.entries()].filter(([,e])=>e.folded!==!0).sort(([e,t],[n,r])=>{let i=Number(t.shelved===!0)-Number(r.shelved===!0);if(i!==0)return i;let a=Math.round(t.y/De)-Math.round(r.y/De);return a===0?t.x-r.x||e.localeCompare(n):a}).map(([e])=>e)}var ke=(0,q.memo)(function(e){let t=(0,J.c)(65),{nodes:n,edges:r,layout:i,exiting:a,settleExit:o,activate:s,lod:c,renderFace:l,onNodeClick:u,onEdgeClick:d,selectedId:f,litEdgeId:p}=e,m=(0,q.useRef)(null);be(m,i.edgePaths);let h;t[0]===i?h=t[1]:(h=Oe(i),t[0]=i,t[1]=h);let g=h,[_,v]=(0,q.useState)(null),y;t[2]!==_||t[3]!==g?(y=_!==null&&g.includes(_)?_:g[0]??null,t[2]=_,t[3]=g,t[4]=y):y=t[4];let b=y,x;t[5]!==g||t[6]!==b?(x=e=>{if(g.length===0)return;let t=b===null?0:g.indexOf(b),n=e===`first`?0:e===`last`?g.length-1:Math.min(g.length-1,Math.max(0,t+e)),r=g[n];v(r),document.querySelector(`.mv-node[data-id="${CSS.escape(r)}"]`)?.focus()},t[5]=g,t[6]=b,t[7]=x):x=t[7];let S=x,C;if(t[8]!==r){C=new Map;for(let e of r)e.label!==void 0&&C.set(e.id,e.label);t[8]=r,t[9]=C}else C=t[9];let w=C,{bbox:T}=i,E;if(t[10]!==r||t[11]!==n){let e=new Map(n.map(je));E=new Map;for(let t of r){let n=e.get(t.from);n!==void 0&&Number.isFinite(n)&&E.set(t.id,n)}t[10]=r,t[11]=n,t[12]=E}else E=t[12];let D=E,O;t[13]!==a||t[14]!==o?(O=a&&(0,Y.jsx)(Ce,{chrome:a.layout.chrome,bbox:a.layout.bbox,exiting:!0,onSettle:()=>o(a.token)},a.token),t[13]=a,t[14]=o,t[15]=O):O=t[15];let k;t[16]!==T||t[17]!==i.chrome||t[18]!==i.rep?(k=(0,Y.jsx)(Ce,{chrome:i.chrome,bbox:T},i.rep),t[16]=T,t[17]=i.chrome,t[18]=i.rep,t[19]=k):k=t[19];let A=T.w,j=T.h,M=`${T.x} ${T.y} ${T.w} ${T.h}`,N;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Y.jsx)(ve,{}),t[20]=N):N=t[20];let P;if(t[21]!==w||t[22]!==D||t[23]!==i.edgePaths||t[24]!==p||t[25]!==d){let e;t[27]!==w||t[28]!==D||t[29]!==p||t[30]!==d?(e=e=>(0,Y.jsxs)(`g`,{className:`mv-edge-g`,"data-lit":p===e.id?``:void 0,"data-shift":ge(D.get(e.id)),style:D.has(e.id)?{"--mv-shift":D.get(e.id)}:void 0,onClick:d?()=>d(e.id):void 0,children:[w.has(e.id)&&(0,Y.jsx)(`title`,{children:w.get(e.id)}),d&&(0,Y.jsx)(`path`,{className:`mv-edge-hit`,d:e.d,fill:`none`}),(0,Y.jsx)(`path`,{className:e.className,d:e.d,fill:`none`,"data-draw":``,style:e.width===void 0?void 0:{"--mv-edge-w":e.width}})]},e.id),t[27]=w,t[28]=D,t[29]=p,t[30]=d,t[31]=e):e=t[31],P=i.edgePaths.map(e),t[21]=w,t[22]=D,t[23]=i.edgePaths,t[24]=p,t[25]=d,t[26]=P}else P=t[26];let F;t[32]!==T.h||t[33]!==T.w||t[34]!==P||t[35]!==M?(F=(0,Y.jsxs)(`svg`,{ref:m,className:`mv-edges`,width:A,height:j,viewBox:M,"aria-hidden":`true`,children:[N,P]}),t[32]=T.h,t[33]=T.w,t[34]=P,t[35]=M,t[36]=F):F=t[36];let I;if(t[37]!==s||t[38]!==T.x||t[39]!==T.y||t[40]!==i.positions||t[41]!==c||t[42]!==S||t[43]!==n||t[44]!==u||t[45]!==l||t[46]!==b||t[47]!==f){let e;t[49]!==s||t[50]!==T.x||t[51]!==T.y||t[52]!==i.positions||t[53]!==c||t[54]!==S||t[55]!==u||t[56]!==l||t[57]!==b||t[58]!==f?(e=(e,t)=>{let n=i.positions.get(e.id);if(!n)return null;let r={"--nx":`${n.x+n.w/2-T.x}px`,"--ny":`${n.y+n.h/2-T.y}px`,"--mv-i":e.depth??t,...e.shift===void 0?{}:{"--mv-shift":e.shift}},a=u!==void 0&&!n.folded,o=n.folded?void 0:l,d=l?.(e,`entry`);return(0,Y.jsxs)(`div`,{className:`mv-node`,"data-id":e.id,"data-role":e.role,"data-tier":e.tier,"data-domain":e.domain,"data-series":e.series?.length?``:void 0,"data-face":n.face,"data-shelved":n.shelved?``:void 0,"data-folded":n.folded?``:void 0,"data-shift":ge(e.shift),"data-selected":f===e.id?``:void 0,"data-lod":c,style:r,"aria-hidden":n.folded?!0:void 0,role:a?`button`:void 0,tabIndex:a?e.id===b?0:-1:void 0,onFocus:a?()=>v(e.id):void 0,onClick:a?()=>s(e):void 0,onKeyDown:a?t=>{if(t.key===`Enter`||t.key===` `){t.preventDefault(),u?.(e);return}let n={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:`first`,End:`last`}[t.key];n!==void 0&&(t.preventDefault(),S(n))}:void 0,children:[(0,Y.jsxs)(`div`,{className:`mv-face mv-face-card`,"aria-hidden":n.face!==`card`||void 0,children:[(0,Y.jsx)(`span`,{className:`mv-label`,children:e.label}),(0,Y.jsxs)(`span`,{className:`mv-card-foot`,children:[e.domain!==void 0&&(0,Y.jsx)(`span`,{className:`mv-domain`,title:e.domain,"aria-label":e.domain}),e.value!==void 0&&(0,Y.jsxs)(`span`,{className:`mv-value`,children:[e.value.toLocaleString(),e.unit??``]}),o?.(e,`card`),e.tier!==void 0&&(0,Y.jsx)(`span`,{className:`mv-tier`,children:e.tier})]})]}),(0,Y.jsx)(`div`,{className:`mv-face mv-face-entry`,"aria-hidden":n.face!==`entry`||void 0,children:(0,Y.jsxs)(`span`,{className:`mv-label`,children:[d,d?` `:null,e.label]})}),(0,Y.jsx)(`div`,{className:`mv-face mv-face-mark`,"aria-hidden":n.face!==`mark`||void 0,children:o?.(e,`mark`)})]},e.id)},t[49]=s,t[50]=T.x,t[51]=T.y,t[52]=i.positions,t[53]=c,t[54]=S,t[55]=u,t[56]=l,t[57]=b,t[58]=f,t[59]=e):e=t[59],I=n.map(e),t[37]=s,t[38]=T.x,t[39]=T.y,t[40]=i.positions,t[41]=c,t[42]=S,t[43]=n,t[44]=u,t[45]=l,t[46]=b,t[47]=f,t[48]=I}else I=t[48];let L;return t[60]!==F||t[61]!==I||t[62]!==O||t[63]!==k?(L=(0,Y.jsxs)(Y.Fragment,{children:[O,k,F,I]}),t[60]=F,t[61]=I,t[62]=O,t[63]=k,t[64]=L):L=t[64],L});function Ae({stage:e,world:t,renderFace:n,onNodeClick:r,onEdgeClick:i,selectedId:a,litEdgeId:o}){let{cam:s,layout:c,exiting:l,lod:u,settleExit:d,morphing:f,settle:p}=e,{viewportRef:m,zoomAtClient:h,pan:g}=s,[_,v]=(0,q.useState)(!1),y=(0,q.useRef)(new Map),b=(0,q.useRef)(0),x=(0,q.useRef)(!1),S=(0,q.useRef)(!1),C=(0,q.useRef)(!1),w=(0,q.useRef)({x:0,y:0}),T=(0,q.useCallback)((t,n,r,i)=>{if(x.current){h(t,n,r);return}e.pinch(t,n,r,i)!==`zoom`&&(x.current=!0)},[e,h]),E=(0,q.useRef)(T);E.current=T,(0,q.useEffect)(()=>{let e=m.current;if(!e)return;let t,n=e=>{if(e.preventDefault(),p(),e.ctrlKey){E.current(Math.exp(-e.deltaY/100),e.clientX,e.clientY,Ee(e.target)),clearTimeout(t),t=setTimeout(()=>{x.current=!1},he);return}h(e.deltaY<0?1.12:1/1.12,e.clientX,e.clientY)};return e.addEventListener(`wheel`,n,{passive:!1}),()=>{clearTimeout(t),e.removeEventListener(`wheel`,n)}},[m,h,p]);let D=()=>{let[e,t]=[...y.current.values()];return{x:(e.x+t.x)/2,y:(e.y+t.y)/2,d:Math.hypot(e.x-t.x,e.y-t.y)}},O=(0,q.useCallback)(e=>{if(p(),y.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),y.current.size>=2){e.currentTarget.setPointerCapture(e.pointerId),S.current=!1,v(!1),b.current=0;return}S.current=!0,C.current=!1,v(!0),w.current={x:e.clientX,y:e.clientY}},[p]),k=(0,q.useRef)({dx:0,dy:0}),A=(0,q.useRef)(0),j=(0,q.useCallback)(()=>{A.current!==0&&(cancelAnimationFrame(A.current),A.current=0);let{dx:e,dy:t}=k.current;(e!==0||t!==0)&&(k.current={dx:0,dy:0},g(e,t))},[g]),M=(0,q.useCallback)((e,t)=>{k.current.dx+=e,k.current.dy+=t,A.current===0&&(A.current=requestAnimationFrame(()=>{A.current=0;let e=k.current;k.current={dx:0,dy:0},(e.dx!==0||e.dy!==0)&&g(e.dx,e.dy)}))},[g]);(0,q.useEffect)(()=>()=>cancelAnimationFrame(A.current),[]);let N=(0,q.useCallback)(e=>{let t=y.current;if(!t.has(e.pointerId))return;if(t.set(e.pointerId,{x:e.clientX,y:e.clientY}),t.size>=2){let{x:t,y:n,d:r}=D();if(b.current===0){b.current=r;return}let i=r/b.current;(i>me||i<1/me)&&(b.current=r,E.current(i,t,n,Ee(e.target)));return}if(!S.current)return;let n=e.clientX-w.current.x,r=e.clientY-w.current.y;Math.abs(n)+Math.abs(r)>pe&&!C.current&&(C.current=!0,e.currentTarget.setPointerCapture(e.pointerId)),w.current={x:e.clientX,y:e.clientY},M(n,r)},[M]),P=(0,q.useCallback)(e=>{j(),y.current.delete(e.pointerId),y.current.size<2&&(b.current=0,x.current=!1),y.current.size===0&&(S.current=!1,v(!1)),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},[j]),F=(0,q.useCallback)(e=>{C.current||r?.(e)},[r]),I=(0,q.useCallback)(e=>{e.propertyName===`transform`&&p()},[p]),{bbox:L}=c,R={transform:s.transform,width:L.w,height:L.h,"--mv-cam-scale":s.camera.scale};return(0,Y.jsx)(`div`,{className:`mv-viewport`,ref:m,"data-panning":_?`true`:void 0,style:{"--mv-cam-scale":s.camera.scale},onPointerDown:O,onPointerMove:N,onPointerUp:P,onPointerCancel:P,children:(0,Y.jsx)(`div`,{className:`mv-world`,style:R,"data-morphing":f?``:void 0,onTransitionEnd:I,children:(0,Y.jsx)(ke,{nodes:t.nodes,edges:t.edges,layout:c,exiting:l,settleExit:d,activate:F,lod:u,renderFace:n,onNodeClick:r,onEdgeClick:i,selectedId:a,litEdgeId:o})})})}function je(e){return[e.id,e.shift]}function Me(e,t){return e===`in`?`zoom-camera`:t?`ascend`:`zoom-camera`}var Ne={graph:{chip:`Graph`,caption:`What caused what`,legend:`Left to right is what led to what. Colour is the direction of the push; thickness is how much of the outcome the link explains.`},flow:{chip:`Contribution`,caption:`How much each one contributed`,legend:`Ribbon thickness is how much of the outcome that link was MEASURED to explain. A cause whose links carry no measured share is held aside rather than drawn thin, which would read as a finding nobody made.`},timeline:{chip:`Over time`,caption:`The same causes, in time`,legend:`Left to right is WHEN, read against the axis below; a bar is how long a cause lasted. Height only keeps entries from overlapping — it means nothing.`},spheres:{chip:`Spheres`,caption:`What kinds of force`,legend:`Each lane is a sphere the causes belong to. A link that CHANGES lane is a handoff between kinds of force and is drawn at full weight; one that stays inside a lane goes faint. A cause the answer put in no single sphere is held aside rather than filed under one it does not belong to.`},chart:{chip:`As a chart`,caption:`How much each one moved`,legend:`Each mark is a cause plotted against its own measured history. Causes with nothing measured are held aside rather than drawn at zero.`}},Pe={min:ne,max:2.2},Fe=56,Ie=1300,Le=1300,X=.7,Re=120,ze=120,Be={graph:K,timeline:R,chart:U,flow:z,spheres:G},Ve=e=>({x:0,y:0,w:e.w,h:e.h}),He=(e,t,n)=>[t-e.x,n-e.y];function Ue(e,t,n){let r=e.positions.get(t);if(!r)return null;let i=r.x,a=r.y,o=r.x+r.w,s=r.y+r.h;for(let r of n.get(t)??[]){let t=e.positions.get(r);!t||t.folded||(i=Math.min(i,t.x),a=Math.min(a,t.y),o=Math.max(o,t.x+t.w),s=Math.max(s,t.y+t.h))}let[c,l]=He(e.bbox,i-Re,a-Re);return{x:c,y:l,w:o-i+240,h:s-a+240}}function We(e){let{world:t,onAscend:n,driverId:r,insetBottom:i}=e,[a,o]=(0,q.useState)(e.initialRep??`graph`),[s,c]=(0,q.useState)(()=>new Set),[d,f]=(0,q.useState)(null),p=u({clamp:Pe,margin:Fe,...i===void 0?{}:{insetBottom:i}}),m=(0,q.useRef)(void 0),{viewport:h}=p,g=(0,q.useMemo)(()=>h?{w:Math.max(1,h.w-112),h:Math.max(1,h.h-112)}:void 0,[h]),_=(0,q.useMemo)(()=>Be[a](t,{expandedIds:s,previous:m.current,...g?{viewport:g}:{}}),[a,t,s,g]);(0,q.useEffect)(()=>{let e=new Map;for(let[t,n]of _.positions)e.set(t,{x:n.x,y:n.y});m.current=e},[_]);let v=(0,q.useRef)(a);v.current=a;let y=(0,q.useRef)(_);y.current=_;let b=(0,q.useRef)(p.camera);b.current=p.camera;let S=(0,q.useRef)(s);S.current=s;let C=(0,q.useRef)(n);C.current=n;let[w,T]=(0,q.useState)(null),{endFlight:E}=p,D=(0,q.useCallback)(()=>{T({layout:y.current,rep:v.current,expandedIds:S.current}),E()},[E]),O=(0,q.useRef)(0),k=(0,q.useRef)(void 0);(0,q.useEffect)(()=>()=>clearTimeout(k.current),[]);let A=(0,q.useCallback)(e=>{if(e===v.current)return;let t=++O.current;f({layout:y.current,token:t}),clearTimeout(k.current),k.current=setTimeout(()=>{t===O.current&&f(null)},Ie),v.current=e,o(e)},[]),j=(0,q.useCallback)(e=>{e===O.current&&(clearTimeout(k.current),f(null))},[]),M=(0,q.useRef)(null),N=(0,q.useCallback)(e=>{let t=new Set(S.current);t.delete(e)||(t.add(e),U.current(e)&&(M.current=e)),c(t)},[]),P=(0,q.useMemo)(()=>{let e=new Map;for(let n of t.nodes){if(n.parentId===void 0)continue;let t=e.get(n.parentId);t?t.push(n.id):e.set(n.parentId,[n.id])}return e},[t]),{fitTo:F,setCamera:I,viewportRef:L}=p;(0,q.useEffect)(()=>{let e=M.current;if(M.current=null,e!==null){let t=Ue(_,e,P);if(t){F(t);return}}F(Ve(_.bbox))},[_,P,F,I,L]);let R=(0,q.useMemo)(()=>new Map(t.nodes.map(e=>[e.id,e.parentId])),[t]),z=(0,q.useMemo)(()=>{let e=new Set;for(let t of R.values())t!==void 0&&e.add(t);return e},[R]),B=(0,q.useCallback)(e=>{let t=0,n=e,r=new Set;for(;n!==void 0&&!r.has(n);)r.add(n),n=R.get(n),n!==void 0&&(t+=1);return t},[R]),V=a===`graph`,H=(0,q.useCallback)(e=>{if(!V)return!1;let t=_.positions.get(e);return t===void 0||t.folded===!0||t.shelved===!0?!1:B(e)+1<=2},[V,_,B]),U=(0,q.useRef)(H);U.current=H;let{zoomAtClient:W}=p,G=(0,q.useCallback)((e,t,n,r)=>{if(e>=1)return r!==void 0&&z.has(r)&&!S.current.has(r)&&U.current(r)?(N(r),`expand`):(W(e,t,n),`zoom`);let i=L.current?.getBoundingClientRect();if(Me(`out`,!!i&&(i.width>0||i.height>0)&&l(b.current,Ve(y.current.bbox),{w:i.width,h:i.height},Fe,Pe))===`zoom-camera`)return W(e,t,n),`zoom`;let a=[...S.current];if(a.length>0){let e=a[0],t=B(e);for(let n of a){let r=B(n);r>t&&(e=n,t=r)}return N(e),`collapse`}return C.current?.(),`ascend`},[z,N,W,L,B]),ee=(0,q.useCallback)(e=>{let t=y.current,n=e===null?void 0:t.positions.get(e);if(!n||n.folded){F(Ve(t.bbox));return}let[r,i]=He(t.bbox,n.x-ze,n.y-ze);F({x:r,y:i,w:n.w+240,h:n.h+240})},[F]);(0,q.useEffect)(()=>{if(r!==void 0)return x(r,{count:te.length,setIndex:e=>A(te[Math.min(te.length-1,Math.max(0,Math.trunc(e)))]),spokenFor:()=>void 0,captionFor:e=>{let t=te[e];return t?Ne[t].caption:void 0}})},[r,A]);let K=w?.layout!==_||p.flying;return(0,q.useEffect)(()=>{if(!K)return;let e=setTimeout(D,Le);return()=>clearTimeout(e)},[K,_,D]),{rep:a,setRep:A,layout:_,exiting:d,settleExit:j,expandedIds:s,toggleExpand:N,expandable:z,unfoldsOnStage:H,cam:p,morphing:K,settle:D,lod:p.camera.scale>=X?`near`:`far`,pinch:G,focusNode:ee}}function Ge({label:e,min:t,max:n,step:r=1,value:i,onChange:a,format:o,color:s=`var(--presence)`}){let c=n-t||1,l=(i-t)/c*100;return(0,Y.jsxs)(`label`,{className:`viz-ctl`,style:{"--ctl-c":s,"--ctl-pct":l+`%`},children:[(0,Y.jsx)(`span`,{className:`viz-ctl-label`,children:e}),(0,Y.jsx)(`input`,{type:`range`,className:`viz-ctl-range`,min:t,max:n,step:r,value:i,"aria-label":e,onChange:e=>a(Number(e.target.value))}),(0,Y.jsx)(`span`,{className:`viz-ctl-val tab-num`,children:o?o(i):i.toLocaleString()})]})}var Ke=`No cause is established yet, so there is nothing to push on.`;function qe(e){let t=(0,J.c)(17),{levers:n,onSet:r,onReset:i}=e,a;t[0]===n?a=t[1]:(a=n.every(Je),t[0]=n,t[1]=a);let o=a,s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Y.jsx)(`h3`,{className:`tr-sec-title`,children:`WHAT IF`}),t[2]=s):s=t[2];let c;t[3]!==i||t[4]!==o?(c=(0,Y.jsxs)(`div`,{className:`tr-levers-head`,children:[s,(0,Y.jsx)(`button`,{type:`button`,className:`tr-reset`,onClick:i,disabled:o,children:`Reset`})]}),t[3]=i,t[4]=o,t[5]=c):c=t[5];let l;t[6]===n.length?l=t[7]:(l=n.length===0&&(0,Y.jsx)(`p`,{className:`tr-levers-empty`,children:Ke}),t[6]=n.length,t[7]=l);let u;if(t[8]!==n||t[9]!==r){let e;t[11]===r?e=t[12]:(e=e=>(0,Y.jsx)(Ge,{label:e.label,min:0,max:100,value:e.pct,onChange:t=>r(e.id,t),format:Z},e.id),t[11]=r,t[12]=e),u=n.map(e),t[8]=n,t[9]=r,t[10]=u}else u=t[10];let d;return t[13]!==c||t[14]!==l||t[15]!==u?(d=(0,Y.jsxs)(`div`,{className:`tr-levers`,children:[c,l,u]}),t[13]=c,t[14]=l,t[15]=u,t[16]=d):d=t[16],d}function Z(e){return`${e}%`}function Je(e){return e.pct===100}var Ye=(0,q.memo)(qe),Xe=(0,q.createContext)(null);function Ze(){return(0,q.useContext)(Xe)}function Qe(e){let t=(0,J.c)(19),{id:n,className:r}=e,i=Ze(),a,o,s,c,l,u;if(t[0]!==r||t[1]!==n||t[2]!==i){u=Symbol.for(`react.early_return_sentinel`);bb0:{let e=i?.registry.values.get(n);if(!e){u=null;break bb0}let d=`tr-num`+(r?` ${r}`:``);if(e.kind===`structure`){u=(0,Y.jsx)(`span`,{className:`${d} tr-num-qual`,"data-status":`structure`,children:e.resolution.raw});break bb0}a=`button`,o=d,s=ae(e),t[9]!==n||t[10]!==i?(c=e=>i?.open(n,e.currentTarget),t[9]=n,t[10]=i,t[11]=c):c=t[11],l=h(e)}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u}else a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8];if(u!==Symbol.for(`react.early_return_sentinel`))return u;let d;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Y.jsx)(`span`,{className:`tr-sr`,children:`, source available`}),t[12]=d):d=t[12];let f;return t[13]!==a||t[14]!==o||t[15]!==s||t[16]!==c||t[17]!==l?(f=(0,Y.jsxs)(`button`,{type:a,className:o,"data-status":s,onClick:c,children:[l,d]}),t[13]=a,t[14]=o,t[15]=s,t[16]=c,t[17]=l,t[18]=f):f=t[18],f}var Q=8,$e=6;function et(e,t,n){return Math.max(Q,Math.min(e,n-t-Q))}function tt(e,t,n){if(!(e.width>0||e.height>0||e.left>0||e.top>0))return{left:et((n.w-t.w)/2,t.w,n.w),top:et((n.h-t.h)/2,t.h,n.h)};let r=e.bottom+$e,i=e.top-$e-t.h,a=r+t.h+Q>n.h&&i>=Q;return{left:et(e.left,t.w,n.w),top:et(a?i:r,t.h,n.h)}}var $=320,nt=340,rt=8;function it(e){let t=(0,J.c)(64),{registry:n,valueId:r,anchorRect:i,trail:a,hinted:o,onMarkHinted:s,onDrill:l,onBack:u,onNavigate:d,onDismiss:f}=e,p=(0,q.useRef)(null),v;t[0]===f?v=t[1]:(v={onEscape:f},t[0]=f,t[1]=v),c(p,v);let[x]=(0,q.useState)(!o),S,C;t[2]===s?(S=t[3],C=t[4]):(S=()=>s(),C=[s],t[2]=s,t[3]=S,t[4]=C),(0,q.useEffect)(S,C);let w=(0,q.useRef)(!0),T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>{w.current||p.current?.focus({preventScroll:!0}),w.current=!1},t[5]=T):T=t[5];let E;t[6]===r?E=t[7]:(E=[r],t[6]=r,t[7]=E),(0,q.useEffect)(T,E);let D,O;t[8]===f?(D=t[9],O=t[10]):(D=()=>{let e=e=>{let t=p.current;t&&e.target instanceof Node&&!t.contains(e.target)&&f()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},O=[f],t[8]=f,t[9]=D,t[10]=O),(0,q.useEffect)(D,O);let k=n.values,A,j,M,N,P,F,I,L,R,z,B,V,H,U;if(t[11]!==i||t[12]!==u||t[13]!==l||t[14]!==d||t[15]!==n.usedIn||t[16]!==n.values||t[17]!==a||t[18]!==r){V=Symbol.for(`react.early_return_sentinel`);bb0:{if(U=k.get(r),!U){V=null;break bb0}let e=ae(U),o=U.scope,s=n.usedIn.get(r)??[],c=U.kind===`grounded`?U.resolution.receipt:null,f=U.kind===`grounded`&&U.resolution.tier===`T1`,v=c?.url?y(c.url):null,x=c?c.host??(c.url?b(c.url):null):null,S=U.kind===`calculated`?U.calc.inputs:[],C=S.slice(0,rt),w=S.length-C.length,T;t[33]!==n.values||t[34]!==a?(T=a.length>0?n.values.get(a[a.length-1]):void 0,t[33]=n.values,t[34]=a,t[35]=T):T=t[35];let E=T,D;t[36]===i?D=t[37]:(D=tt(i,{w:$,h:nt},{w:window.innerWidth,h:window.innerHeight}),t[36]=i,t[37]=D);let{left:O,top:W}=D;H=p,A=`tr-card`,j=`dialog`,M=`false`,N=`Where ${U.label} came from`,P=-1,t[38]!==O||t[39]!==W?(F={left:O,top:W,width:$,maxHeight:nt},t[38]=O,t[39]=W,t[40]=F):F=t[40];let G;t[41]!==u||t[42]!==E?(G=E&&(0,Y.jsxs)(`button`,{type:`button`,className:`tr-back`,onClick:u,"aria-label":`Back to ${E.label}`,children:[`‹ back`,(0,Y.jsxs)(`span`,{className:`tr-back-to`,children:[` to `,E.label]})]}),t[41]=u,t[42]=E,t[43]=G):G=t[43],I=(0,Y.jsxs)(`header`,{className:`tr-head`,children:[G,(0,Y.jsx)(`span`,{className:`tr-badge`,"data-status":e,children:_[e]}),(0,Y.jsx)(`p`,{className:`tr-figure`,children:h(U)}),(0,Y.jsx)(`p`,{className:`tr-label`,children:U.label})]}),L=c&&(0,Y.jsxs)(`section`,{className:`tr-sec`,children:[(0,Y.jsx)(`h3`,{className:`tr-sec-title`,children:`SOURCE`}),c.quote&&(0,Y.jsxs)(`blockquote`,{className:`tr-quote`,children:[`“`,c.quote,`”`]}),f?(0,Y.jsx)(`p`,{className:`tr-host`,children:m(c)}):x&&(0,Y.jsxs)(`p`,{className:`tr-host`,children:[v?(0,Y.jsx)(`a`,{href:v,target:`_blank`,rel:`noreferrer noopener`,children:x}):x,c.date&&(0,Y.jsxs)(`span`,{className:`tr-date`,children:[` · `,c.date]})]})]}),R=o&&(o.region||o.period||o.unit)&&(0,Y.jsxs)(`section`,{className:`tr-sec`,children:[(0,Y.jsx)(`h3`,{className:`tr-sec-title`,children:`SCOPE`}),(0,Y.jsx)(`p`,{className:`tr-chips`,children:[o.region,o.period,o.unit].filter(ot).map(at)})]}),z=U.kind===`calculated`&&(0,Y.jsxs)(`section`,{className:`tr-sec`,children:[(0,Y.jsx)(`h3`,{className:`tr-sec-title`,children:`CALCULATION`}),(0,Y.jsx)(`p`,{className:`tr-formula`,children:g(U.calc.formula,e=>n.values.get(e)?.label)}),(0,Y.jsx)(`ul`,{className:`tr-inputs`,children:C.map(e=>{let t=n.values.get(e);return(0,Y.jsx)(`li`,{children:t?(0,Y.jsxs)(`button`,{type:`button`,className:`tr-input`,onClick:()=>l(e),children:[(0,Y.jsx)(`span`,{className:`tr-input-label`,children:t.label}),(0,Y.jsx)(`span`,{className:`tr-input-val`,children:h(t)})]}):(0,Y.jsx)(`span`,{className:`tr-input tr-input-missing`,children:e})},e)})}),w>0&&(0,Y.jsxs)(`p`,{className:`tr-more`,children:[`…and `,w,` more`]}),U.calc.note&&(0,Y.jsx)(`p`,{className:`tr-note`,children:U.calc.note})]}),B=s.length>0&&(0,Y.jsxs)(`section`,{className:`tr-sec`,children:[(0,Y.jsx)(`h3`,{className:`tr-sec-title`,children:`USED IN`}),(0,Y.jsx)(`ul`,{className:`tr-used`,children:s.map(e=>(0,Y.jsx)(`li`,{children:d?(0,Y.jsx)(`button`,{type:`button`,className:`tr-usedin`,onClick:()=>d(e),children:e.label}):(0,Y.jsx)(`span`,{className:`tr-usedin tr-usedin-flat`,children:e.label})},`${e.surface}:${e.id}:${e.label}`))})]})}t[11]=i,t[12]=u,t[13]=l,t[14]=d,t[15]=n.usedIn,t[16]=n.values,t[17]=a,t[18]=r,t[19]=A,t[20]=j,t[21]=M,t[22]=N,t[23]=P,t[24]=F,t[25]=I,t[26]=L,t[27]=R,t[28]=z,t[29]=B,t[30]=V,t[31]=H,t[32]=U}else A=t[19],j=t[20],M=t[21],N=t[22],P=t[23],F=t[24],I=t[25],L=t[26],R=t[27],z=t[28],B=t[29],V=t[30],H=t[31],U=t[32];if(V!==Symbol.for(`react.early_return_sentinel`))return V;let W;t[44]!==U.kind||t[45]!==U.resolution?(W=U.kind===`illustrative`&&(0,Y.jsxs)(`p`,{className:`tr-caveat`,children:[`Illustrative — shows the shape, not a measured fact. `,U.resolution.illustrative]}),t[44]=U.kind,t[45]=U.resolution,t[46]=W):W=t[46];let G;t[47]===x?G=t[48]:(G=x&&(0,Y.jsx)(`p`,{className:`tr-hint`,children:`Any figure like this one opens its own receipt.`}),t[47]=x,t[48]=G);let ee;return t[49]!==A||t[50]!==j||t[51]!==M||t[52]!==N||t[53]!==P||t[54]!==F||t[55]!==I||t[56]!==L||t[57]!==R||t[58]!==z||t[59]!==B||t[60]!==W||t[61]!==G||t[62]!==H?(ee=(0,Y.jsxs)(`div`,{ref:H,className:A,role:j,"aria-modal":M,"aria-label":N,tabIndex:P,style:F,children:[I,L,R,z,B,W,G]}),t[49]=A,t[50]=j,t[51]=M,t[52]=N,t[53]=P,t[54]=F,t[55]=I,t[56]=L,t[57]=R,t[58]=z,t[59]=B,t[60]=W,t[61]=G,t[62]=H,t[63]=ee):ee=t[63],ee}function at(e){return(0,Y.jsx)(`span`,{className:`tr-chip`,children:e},e)}function ot(e){return!!e}function st(e){let t=(0,J.c)(23),{registry:n,onNavigate:r,children:i,ref:a}=e,[o,s]=(0,q.useState)(null),[c,l]=(0,q.useState)(!1),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>s(null),t[0]=u):u=t[0];let d;t[1]===n?d=t[2]:(d=[n],t[1]=n,t[2]=d),(0,q.useEffect)(u,d);let f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>s(null),t[3]=f):f=t[3];let p=f,m,h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>({dismiss:p}),h=[p],t[4]=m,t[5]=h):(m=t[4],h=t[5]),(0,q.useImperativeHandle)(a,m,h);let g;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=(e,t)=>{t.focus(),s({valueId:e,anchorRect:t.getBoundingClientRect(),trail:[]})},t[6]=g):g=t[6];let _=g,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>l(!0),t[7]=v):v=t[7];let y=v,b;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>{s(t=>t&&{valueId:e,anchorRect:t.anchorRect,trail:[...t.trail,t.valueId]})},t[8]=b):b=t[8];let x=b,S;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{s(ct)},t[9]=S):S=t[9];let C=S,w;t[10]!==c||t[11]!==r||t[12]!==n?(w={registry:n,open:_,onNavigate:r,hinted:c,markHinted:y},t[10]=c,t[11]=r,t[12]=n,t[13]=w):w=t[13];let T=w,E;t[14]!==o||t[15]!==c||t[16]!==r||t[17]!==n?(E=o&&(0,Y.jsx)(it,{registry:n,valueId:o.valueId,anchorRect:o.anchorRect,trail:o.trail,hinted:c,onMarkHinted:y,onDrill:x,onBack:C,onNavigate:r,onDismiss:p}),t[14]=o,t[15]=c,t[16]=r,t[17]=n,t[18]=E):E=t[18];let D;return t[19]!==i||t[20]!==E||t[21]!==T?(D=(0,Y.jsxs)(Xe.Provider,{value:T,children:[i,E]}),t[19]=i,t[20]=E,t[21]=T,t[22]=D):D=t[22],D}function ct(e){let t=e?.trail[e.trail.length-1];return!e||t===void 0?e:{valueId:t,anchorRect:e.anchorRect,trail:e.trail.slice(0,-1)}}var lt=`Recomputed locally from the causes above — a model of what would happen, never an observation.`,ut=`What was actually measured. This column never moves when a lever is pulled.`;function dt(e,t){return(e>0?`+`:``)+d(e,t)}function ft(e){return e!==null&&Number.isFinite(e)&&e>=0&&e<=1}function pt(e){return e.exactBase===null?`nothing measured stands behind this outcome`:`not every step is grounded, so the total stays unmeasured`}function mt(e){let t=(0,J.c)(22),{baseline:n,current:r,unit:i,active:a,observedNote:o}=e,s;t[0]!==n.exactBase||t[1]!==n.fullyGrounded||t[2]!==i?(s=n.fullyGrounded&&n.exactBase!==null?d(n.exactBase,i):null,t[0]=n.exactBase,t[1]=n.fullyGrounded,t[2]=i,t[3]=s):s=t[3];let c=s,l=r.exactBase??n.exactBase,u=a?`1`:void 0,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(`span`,{className:`tr-chip tr-wi-chip`,title:ut,children:`OBSERVED`}),t[4]=f):f=t[4];let p;t[5]!==n||t[6]!==c||t[7]!==o?(p=(0,Y.jsxs)(`div`,{className:`tr-wi-col`,children:[f,c===null?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`tr-wi-figure tr-wi-dash`,children:`—`}),(0,Y.jsx)(`p`,{className:`tr-wi-note tr-wi-why`,children:o??pt(n)})]}):(0,Y.jsx)(`p`,{className:`tr-wi-figure`,children:c})]}),t[5]=n,t[6]=c,t[7]=o,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==l||t[11]!==r.exactDelta||t[12]!==r.explainedPct||t[13]!==r.fullyGrounded||t[14]!==r.relBase||t[15]!==r.relCur||t[16]!==i?(m=a&&(0,Y.jsxs)(`div`,{className:`tr-wi-col tr-wi-hypo`,"data-world":`hypothetical`,children:[(0,Y.jsx)(`span`,{className:`tr-chip tr-wi-chip tr-wi-chip-hypo`,title:lt,children:`HYPOTHETICAL (MODELED)`}),r.fullyGrounded&&l!==null&&r.exactDelta!==null?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`tr-wi-figure`,children:d(l+r.exactDelta,i)}),(0,Y.jsx)(`p`,{className:`tr-wi-delta`,children:dt(r.exactDelta,i)}),ft(r.explainedPct)&&(0,Y.jsxs)(`p`,{className:`tr-wi-note`,children:[Math.round(r.explainedPct*100),`% explained`]})]}):r.relCur===null?(0,Y.jsx)(`p`,{className:`tr-wi-figure tr-wi-dash`,children:`—`}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`tr-wi-figure tr-wi-phrase`,children:le(r.relBase??0,r.relCur)}),(0,Y.jsx)(`p`,{className:`tr-wi-note`,children:`relative, not measured`})]})]}),t[9]=a,t[10]=l,t[11]=r.exactDelta,t[12]=r.explainedPct,t[13]=r.fullyGrounded,t[14]=r.relBase,t[15]=r.relCur,t[16]=i,t[17]=m):m=t[17];let h;return t[18]!==u||t[19]!==p||t[20]!==m?(h=(0,Y.jsxs)(`div`,{className:`tr-wi`,"data-active":u,children:[p,m]}),t[18]=u,t[19]=p,t[20]=m,t[21]=h):h=t[21],h}var ht=(0,q.memo)(mt);function gt(e){return{id:e.id,label:e.label,role:e.role,depth:e.depth,tier:e.tier,...e.value===void 0?{}:{value:e.value},...e.unit?{unit:e.unit}:{},...e.receipt?{receipt:e.receipt}:{}}}function _t(e){let t=e.receipts?.[0]??e.receipt;return{from:e.from,to:e.to,sign:e.sign,tier:e.tier,...e.verb?{verb:e.verb}:{},...e.weight===void 0?{}:{weight:e.weight},...t&&!e.provisional?{receipt:t}:{},...e.provisional?{provisional:!0}:{}}}function vt(e){return{center:e.title,outcomeId:e.outcomeId,nodes:e.nodes.map(gt),edges:e.edges.map(_t),provenance:{...e.provenance.illustrative?{illustrative:!0}:{},...e.provenance.notes?.length?{notes:e.provenance.notes}:{}}}}var yt=e=>`node:${e}`,bt=(e,t)=>`node:${e}@${t}`;function xt(e,t){let n=e.provenance.illustrative===!0,r=[],i=[],a=[],o=new Map,s=[],c=new Map,l=(e,t,n)=>{!e||o.has(e.id)||(o.set(e.id,e),s.push(t),i.push(n))},u=(e,t)=>{c.set(e.id,e.label),r.push({id:e.id,label:e.label,role:e.role,...e.detail===void 0?{}:{detail:e.detail},...e.domain===void 0?{}:{domain:e.domain},...t===void 0?{}:{parentId:t}});let i=e.series,a=e.unit??i?.unit,o=t=>({valueId:t,surface:`node`,id:e.id,label:e.label});if(e.value!==void 0){let t=yt(e.id);l(F(t,e.label,e.value,e.tier,a,e.receipt,n),o(t),{valueId:t,entityId:e.id})}if(i)for(let t of i.points){let r=bt(e.id,t.t),a=F(r,`${e.label} · ${t.t}`,t.value,i.tier,i.unit,t.receipt??i.receipt,n,t.t);l(a,o(r),{valueId:r,entityId:e.id,at:t.t})}for(let t of e.children??[])u(t,e.id)};for(let t of e.nodes)u(t);return B(e.edges).forEach((e,n)=>{let r=`${c.get(e.from)??e.from} ${e.verb??`→`} ${c.get(e.to)??e.to}`,i=t.edges[n]?.id;if(i!==void 0){a.push({id:i,from:e.from,to:e.to,...e.relation===void 0?{}:{kind:e.relation},...e.sign===void 0?{}:{sign:e.sign},...e.weight===void 0?{}:{weight:e.weight}});for(let t of[e.from,e.to])s.push({valueId:yt(t),surface:`edge`,id:i,label:r})}}),{title:e.title,entities:r,relations:a,facts:i,trust:I(o,s),outcomeId:e.outcomeId,...n?{illustrative:n}:{}}}var St=1100;function Ct(e,t,n,r){let i=!1,a=e=>{i||(i=!0,r(e))};(async()=>{for(let r=Math.max(0,t);r<e.length;r++){let t=e[r];if(!t)continue;if(n.isCancelled()){a(`cancelled`);return}let i=E(t.say),o=n.speakLine?.(t.say)??null,s=o?await T(o):!1;if(n.isCancelled()){a(`cancelled`);return}n.apply(t,r),o&&s?await O(o,i,St):await D(i)}a(n.isCancelled()?`cancelled`:`complete`)})()}function wt({beats:e,apply:t,speakLine:n}){let[r,i]=(0,q.useState)(-1),[a,o]=(0,q.useState)(!1),s=(0,q.useRef)(0),c=(0,q.useRef)(e);c.current=e;let l=(0,q.useRef)(t);l.current=t;let u=(0,q.useRef)(n);u.current=n;let d=(0,q.useCallback)(()=>{s.current+=1,o(!1)},[]),f=(0,q.useCallback)(e=>{let t=s.current+=1;o(!0),Ct(c.current,e,{speakLine:e=>u.current?.(e)??null,apply:(e,t)=>{i(t),l.current(e,t)},isCancelled:()=>s.current!==t},()=>{s.current===t&&o(!1)})},[]);(0,q.useEffect)(()=>()=>void(s.current+=1),[]),(0,q.useEffect)(()=>{s.current+=1,o(!1),i(-1)},[e]);let p=(0,q.useCallback)(()=>{if(a){d();return}let e=c.current.length;e!==0&&f(r>=0&&r<e-1?r:0)},[a,r,f,d]),m=(0,q.useCallback)(e=>{let t=c.current.length;t!==0&&f(Math.min(Math.max(e,0),t-1))},[f]),h=(0,q.useCallback)(()=>{d(),i(-1)},[d]);return{index:r,playing:a,caption:r>=0?e[r]?.caption??null:null,toggle:p,seek:m,reset:h}}function Tt(e){let t=(0,J.c)(33),{count:n,index:r,playing:i,caption:a,expanded:o,onToggle:s,onSeek:c,inviting:l}=e;if(n===0)return null;let u=Math.min(Math.max(r,-1),n-1),d=i?``:void 0,f=o?``:void 0,p=`${o?108:54}px`,m;t[0]===p?m=t[1]:(m={"--wo-transport-h":p},t[0]=p,t[1]=m);let h=m,g=l&&!i?``:void 0,_=i?`Pause the walkthrough`:`Walk me through it`,v=i?`❙❙`:`▶`,y;t[2]===v?y=t[3]:(y=(0,Y.jsx)(`span`,{className:`wo-play-glyph`,"aria-hidden":`true`,children:v}),t[2]=v,t[3]=y);let b=i?`Pause`:`Walk me through it`,x;t[4]===b?x=t[5]:(x=(0,Y.jsx)(`span`,{className:`wo-play-label`,children:b}),t[4]=b,t[5]=x);let S;t[6]!==s||t[7]!==x||t[8]!==g||t[9]!==_||t[10]!==y?(S=(0,Y.jsxs)(`button`,{type:`button`,className:`wo-play`,"data-inviting":g,onClick:s,"aria-label":_,children:[y,x]}),t[6]=s,t[7]=x,t[8]=g,t[9]=_,t[10]=y,t[11]=S):S=t[11];let C;t[12]!==l||t[13]!==i?(C=l&&!i&&(0,Y.jsx)(`span`,{className:`wo-play-aside`,children:`or press any cause`}),t[12]=l,t[13]=i,t[14]=C):C=t[14];let w;t[15]!==u||t[16]!==n||t[17]!==o||t[18]!==c?(w=o&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`wo-track`,role:`group`,"aria-label":`Walkthrough beats`,children:Array.from({length:n},(e,t)=>(0,Y.jsx)(`button`,{type:`button`,className:`wo-tick`,"data-state":t<u?`past`:t===u?`now`:`ahead`,onClick:()=>c(t),"aria-label":`Beat ${t+1} of ${n}`,"aria-current":t===u?`step`:void 0},t))}),(0,Y.jsxs)(`span`,{className:`wo-transport-count`,"aria-hidden":`true`,children:[u<0?n:u+1,`/`,n]})]}),t[15]=u,t[16]=n,t[17]=o,t[18]=c,t[19]=w):w=t[19];let T;t[20]!==S||t[21]!==C||t[22]!==w?(T=(0,Y.jsxs)(`div`,{className:`wo-transport-row`,children:[S,C,w]}),t[20]=S,t[21]=C,t[22]=w,t[23]=T):T=t[23];let E;t[24]!==a||t[25]!==o?(E=o&&(0,Y.jsx)(`p`,{className:`wo-caption`,"aria-live":`polite`,children:a===null?``:k(a)}),t[24]=a,t[25]=o,t[26]=E):E=t[26];let D;return t[27]!==d||t[28]!==T||t[29]!==E||t[30]!==f||t[31]!==h?(D=(0,Y.jsxs)(`div`,{className:`wo-transport`,"data-playing":d,"data-open":f,style:h,children:[T,E]}),t[27]=d,t[28]=T,t[29]=E,t[30]=f,t[31]=h,t[32]=D):D=t[32],D}var Et=170,Dt={contributes:`fed by`,causes:`driven by`,dampens:`held back by`,enables:`made possible by`,correlates:`moving together with`},Ot={1:`pushed up by`,[-1]:`pushed down by`};function kt(e){let t=e.split(` `,1)[0]??``;return t.length===0||/[A-Z]/.test(t.slice(1))?e:e[0].toLowerCase()+e.slice(1)}var At={graph:`And that is how the causes fit together.`,timeline:`And here are the same causes, in time.`,chart:`And here is what each one actually measured.`,flow:`And here is how much each one contributed.`,spheres:`And here are the kinds of force it is made of.`};function jt(e,t){let n=e.values.get(yt(t));if(!n||n.kind===`structure`)return null;let r=h(n);return n.kind===`illustrative`?{say:`Illustratively, about ${r}.`,shown:`Illustratively, about ${r}.`}:{say:`Measured at ${r}.`,shown:`Measured at ${r}.`}}function Mt(e){return e.kind?e.kind===`dampens`||e.kind===`enables`||e.kind===`correlates`:e.sign===-1}function Nt(e){return e.kind&&Dt[e.kind]?Dt[e.kind]:Ot[e.sign??1]??`fed by`}function Pt(e){let t=e.nodes.filter(e=>e.parentId===void 0),n=new Set(t.map(e=>e.id)),r=e.edges.filter(e=>n.has(e.from)&&n.has(e.to)),i=new Map(t.map(e=>[e.id,e.depth??0])),a=new Map;for(let e of r)a.set(e.from,(a.get(e.from)??0)+(e.weight??0));let o=new Map(t.map(e=>[e.id,0]));for(let e of r)o.set(e.to,(o.get(e.to)??0)+1);let s=(e,t)=>(i.get(e)??0)-(i.get(t)??0)||(a.get(t)??0)-(a.get(e)??0)||(e<t?-1:+(e>t)),c=t.filter(e=>o.get(e.id)===0).map(e=>e.id),l=[],u=new Set;for(;c.length>0;){c.sort(s);let e=c.shift();if(!(e===void 0||u.has(e))){u.add(e),l.push(e);for(let t of r){if(t.from!==e)continue;let n=(o.get(t.to)??0)-1;o.set(t.to,n),n<=0&&!u.has(t.to)&&c.push(t.to)}}}for(let e of t.map(e=>e.id).sort(s))u.has(e)||l.push(e);return l}function Ft(e,t,n,r={}){let i=Pt(t);if(i.length<2)return[];let a=new Map(e.nodes.map(e=>[e.id,e])),o=new Map(t.nodes.map(e=>[e.id,e.label])),s=new Map(i.map((e,t)=>[e,t])),c=e=>t.edges.filter(t=>t.to===e&&s.has(t.from)&&(s.get(t.from)??0)<(s.get(e)??0)).sort((e,t)=>(t.weight??0)-(e.weight??0)||(e.id<t.id?-1:1))[0],l=[],u=i.at(-1)===e.outcomeId?i.length-1:i.length,d=u===1?`One cause, one outcome. Here is how it connects.`:`${u} causes, one outcome. Here is how they connect.`;l.push({nodeId:e.outcomeId,wide:!0,rep:`graph`,say:d,caption:d});let f=null;for(let[t,r]of i.entries()){let s=a.get(r),u=o.get(r)??r,d=c(r),p=r===e.outcomeId&&t===i.length-1,m=d?o.get(d.from)??d.from:null,h;h=p?d?`And it ends here: ${kt(u)}, ${Nt(d)} ${d.from===f?`it`:kt(m??``)}.`:`And it ends here: ${kt(u)}.`:d?d.from===f?Mt(d)?`Then ${kt(u)}, ${Nt(d)} it.`:`Then ${kt(u)}.`:`${u}, ${Nt(d)} ${kt(m??``)}.`:t===0?`It starts with ${kt(u)}.`:`Alongside it: ${u}.`,f=r;let g=[h],_=[h],v=jt(n,r);v&&(g.push(v.say),_.push(v.shown));let y=s?.detail;y&&(g.push(w(S(y),Et)),_.push(w(C(y),Et))),l.push({nodeId:r,...d?{edgeId:d.id}:{},say:g.join(` `),caption:_.join(` `)})}if(r.closeOn){let t=At[r.closeOn];l.push({nodeId:e.outcomeId,wide:!0,rep:r.closeOn,say:t,caption:t})}return l}var It={economy:`var(--domain-economy)`,policy:`var(--domain-policy)`,technology:`var(--domain-technology)`,science:`var(--domain-science)`,environment:`var(--domain-environment)`,society:`var(--domain-society)`,health:`var(--domain-health)`,conflict:`var(--domain-conflict)`},Lt=.5;function Rt(e){let t=e.nodes.filter(e=>e.parentId===void 0);if(t.length===0)return null;let n=new Map;for(let e of t)e.domain!==void 0&&n.set(e.domain,(n.get(e.domain)??0)+1);if([...n.values()].reduce((e,t)=>e+t,0)/t.length<Lt)return null;let r=[...n.entries()].sort((e,t)=>t[1]-e[1]||(e[0]<t[0]?-1:1)).map(([e])=>It[e]).filter(e=>e!==void 0);return r.length===0?null:{air1:r[0],air2:r[1]??r[0]}}r();var zt=5,Bt=`wo-stage`,Vt=`an illustrative living answer measures nothing, so there is no baseline`;function Ht(e){if(e.length<2)return null;let t=e.reduce((e,t)=>Math.min(e,t.v),1/0),n=e.reduce((e,t)=>Math.max(e,t.v),-1/0)-t,r=e.length-1;return e.map((e,i)=>{let a=i/r*100,o=n===0?10:18-(e.v-t)/n*16;return`${i===0?`M`:`L`} ${Math.round(a*10)/10} ${Math.round(o*10)/10}`}).join(` `)}function Ut(e,t){return Wt(e,t)?.length??0}function Wt(e,t){for(let n of e){if(n.id===t)return n.children;let e=n.children===void 0?void 0:Wt(n.children,t);if(e)return e}}function Gt(e){let{value:t,...n}=e;return n}function Kt(e,t){let n=new Map;for(let[r,i]of e.relativeByNode){let e=t.relativeByNode.get(r)??0;i>0&&n.set(r,e/i)}return n}function qt(e,t,n,r){return{exactBase:n??null,exactDelta:e.outcomeDelta,explainedPct:e.explainedPct,fullyGrounded:e.fullyGrounded&&!r,relBase:t.relativeOutcome,relCur:e.relativeOutcome}}function Jt(e){let t=(0,J.c)(14),{spec:n,question:r,failed:i,onRetry:a,onClose:o,view:s,onExpandNode:c,autoWalk:l,speakLine:u}=e;if(n){let e;return t[0]!==l||t[1]!==o||t[2]!==c||t[3]!==u||t[4]!==n||t[5]!==s?(e=(0,Y.jsx)(Xt,{spec:n,view:s,onClose:o,onExpandNode:c,autoWalk:l,speakLine:u}),t[0]=l,t[1]=o,t[2]=c,t[3]=u,t[4]=n,t[5]=s,t[6]=e):e=t[6],e}let d;t[7]===r?d=t[8]:(d=r?v(r):``,t[7]=r,t[8]=d);let f=i===!0,p;return t[9]!==o||t[10]!==a||t[11]!==d||t[12]!==f?(p=(0,Y.jsx)(Yt,{title:d,failed:f,onRetry:a,onClose:o}),t[9]=o,t[10]=a,t[11]=d,t[12]=f,t[13]=p):p=t[13],p}function Yt(e){let t=(0,J.c)(17),{title:n,failed:r,onRetry:i,onClose:a}=e,o=`Living answer: ${n}`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Y.jsx)(`span`,{className:`wo-kicker`,children:`THE LIVING ANSWER`}),t[0]=s):s=t[0];let c;t[1]===n?c=t[2]:(c=(0,Y.jsxs)(`div`,{className:`wo-title`,children:[s,(0,Y.jsx)(`h2`,{children:n})]}),t[1]=n,t[2]=c);let l;t[3]===a?l=t[4]:(l=a&&(0,Y.jsx)(`div`,{className:`wo-head-actions`,children:(0,Y.jsx)(`button`,{type:`button`,className:`wo-btn wo-btn-close`,onClick:a,"aria-label":`Back to the answer`,children:`← Back to the answer`})}),t[3]=a,t[4]=l);let u;t[5]!==c||t[6]!==l?(u=(0,Y.jsxs)(`header`,{className:`wo-head`,children:[c,l]}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;t[8]!==r||t[9]!==i?(d=(0,Y.jsx)(`div`,{className:`wo-shell`,role:`status`,"aria-live":`polite`,children:r?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`wo-shell-line`,children:`This living answer didn’t come back.`}),(0,Y.jsx)(`p`,{className:`wo-shell-note`,children:`Nothing was built, and Mavéa won’t stand in a causal web it can’t source. The answer behind this card is untouched.`}),i&&(0,Y.jsx)(`button`,{type:`button`,className:`wo-btn`,onClick:i,children:`Try again`})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`wo-shell-ground`,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:`wo-shell-pulse`,"aria-hidden":`true`}),(0,Y.jsx)(`p`,{className:`wo-shell-line`,children:`Building your living answer…`}),(0,Y.jsx)(`p`,{className:`wo-shell-note`,children:`One model call, grounded in what this answer already found. Once it is built it is kept — re-opening it, and replaying this turn, costs nothing.`})]})}),t[8]=r,t[9]=i,t[10]=d):d=t[10];let f;t[11]!==u||t[12]!==d?(f=(0,Y.jsxs)(`div`,{className:`wo-panel`,children:[u,d]}),t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;return t[14]!==o||t[15]!==f?(p=(0,Y.jsx)(`section`,{className:`wo-scrim`,"aria-label":o,children:f}),t[14]=o,t[15]=f,t[16]=p):p=t[16],p}function Xt({spec:e,view:t,onClose:n,onExpandNode:r,autoWalk:c,speakLine:l}){let[u,d]=(0,q.useState)(()=>p(e.title));(0,q.useEffect)(()=>{f(e.title,u)},[e.title,u]);let[m,h]=(0,q.useState)(null),g=(0,q.useMemo)(()=>{if(u.size===0)return e;let t=e;for(let[e,n]of u)t=M(t,e,n);return t},[e,u]),_=g.provenance.illustrative===!0,y=(0,q.useMemo)(()=>V(g),[g]),b=(0,q.useMemo)(()=>xt(g,y),[g,y]),x=b.trust,S=(0,q.useMemo)(()=>vt(g),[g]),[C,w]=(0,q.useState)(()=>new Map),[T,E]=(0,q.useState)(null),[D,O]=(0,q.useState)(!1),k=(0,q.useMemo)(()=>[...C.values()].some(e=>e!==100),[C]),F=(0,q.useMemo)(()=>[...C].map(([e,t])=>({nodeId:e,pct:t/100})),[C]),I=(0,q.useMemo)(()=>ie(S,[]),[S]),R=(0,q.useMemo)(()=>ie(S,F),[S,F]),z=(0,q.useMemo)(()=>k?Kt(I,R):null,[k,I,R]),U=(0,q.useDeferredValue)(z),G=(0,q.useCallback)(e=>H(e,y),[y]),K=(0,q.useMemo)(()=>ee(y),[y]),te=(0,q.useMemo)(()=>{let e=g.nodes[0]?.tier;return e!==void 0&&g.nodes.every(t=>t.tier===e)?``:void 0},[g]),ne=(0,q.useMemo)(()=>Rt(y),[y]),J=t&&G(t)?t:void 0,ae=We({world:y,insetBottom:D?108:54,initialRep:J??W(y)}),{rep:oe,setRep:se,expandedIds:ce,toggleExpand:le,unfoldsOnStage:ue}=ae;(0,q.useEffect)(()=>{J&&se(J)},[J,se]);let fe=(0,q.useMemo)(()=>{let e=new Map(y.nodes.map(e=>[e.id,e.parentId])),t=new Map;for(let n of y.nodes){let r=n.id,i=new Set([r]),a=e.get(r);for(;a!==void 0&&!i.has(a);)i.add(a),r=a,a=e.get(r);t.set(n.id,r)}return t},[y]),pe=(0,q.useMemo)(()=>{let e=y.nodes.map(e=>{let t=Gt(e),n=U?.get(fe.get(e.id)??e.id),r=A(e.label);return{...t,label:r,...n===void 0?{}:{shift:n}}});return{...y,nodes:e}},[y,U,fe]),me=(0,q.useMemo)(()=>{let e=new Map,t=n=>{e.set(n.id,n);for(let e of n.children??[])t(e)};for(let e of g.nodes)t(e);return e},[g]),he=(0,q.useMemo)(()=>{let e=B(g.edges);return new Map(y.edges.map((t,n)=>[t.id,e[n]]))},[y,g]),ge=(0,q.useRef)(null),_e=(0,q.useCallback)(()=>ge.current?.dismiss(),[]),ve=(0,q.useCallback)(e=>{(e.surface===`node`||e.surface===`edge`)&&E({kind:e.surface,id:e.id})},[]),[ye,be]=(0,q.useState)(void 0),xe=K.find(e=>e!==`graph`),[Se,Ce]=(0,q.useState)([]);(0,q.useEffect)(()=>{let e=globalThis.requestIdleCallback,t=()=>Ce(Ft(g,y,x,xe?{closeOn:xe}:{}));if(typeof e==`function`){let n=e(t,{timeout:2e3});return()=>globalThis.cancelIdleCallback?.(n)}let n=setTimeout(t,1);return()=>clearTimeout(n)},[g,y,x,xe]);let{focusNode:we}=ae,Te=(0,q.useCallback)(e=>{e.rep&&se(e.rep),E({kind:`node`,id:e.nodeId}),be(e.edgeId),e.wide?we(null):e.rep||we(e.nodeId)},[we,se]),{index:Ee,playing:De,caption:Oe,toggle:ke,seek:je,reset:Me}=wt((0,q.useMemo)(()=>({beats:Se,apply:Te,...l?{speakLine:l}:{}}),[Se,Te,l]));(0,q.useEffect)(()=>{O(De||Ee>=0)},[De,Ee]);let Pe=(0,q.useRef)(!1);(0,q.useEffect)(()=>{typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches||!c||Pe.current||Se.length===0||(Pe.current=!0,ke())},[c,Se.length,ke]);let[Fe,Ie]=(0,q.useState)(!0),Le=(0,q.useCallback)(()=>Ie(!1),[]),X=(0,q.useCallback)(()=>{Me(),be(void 0)},[Me]),Re=(0,q.useRef)(n);Re.current=n;let ze=(0,q.useRef)(ke);ze.current=ke;let Be=(0,q.useRef)(X);Be.current=X,(0,q.useEffect)(()=>{let e=e=>{if(e.key===`Escape`){Be.current(),Re.current?.();return}(e.key===` `||e.key===`Spacebar`)&&(e.target?.closest(`button, input, select, textarea, [contenteditable="true"]`)||(e.preventDefault(),ze.current()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let Ve=(0,q.useCallback)(e=>{X(),E({kind:`node`,id:e.id})},[X]),He=(0,q.useCallback)(e=>{X(),E({kind:`edge`,id:e})},[X]),Ue=(0,q.useCallback)((e,t)=>{X(),w(n=>new Map(n).set(e,t))},[X]),Ge=(0,q.useCallback)(()=>{X(),w(new Map)},[X]),Ke=(0,q.useCallback)(e=>{!r||m!==null||(h(e),r(e,g).then(t=>{h(null);let n=t===null?void 0:Wt(t.nodes,e);n?.length&&(d(t=>new Map(t).set(e,n)),ue(e)?le(e):E({kind:`node`,id:e}))},()=>h(null)))},[r,ue,m,g,le]),qe=(0,q.useCallback)((e,t)=>{if(t===`entry`&&oe===`timeline`){let t=me.get(e.id),n=t?.date,r=t?.series?.points,i=n?.until!==void 0||(r?.length??0)>1,a=n?.t??r?.[0]?.t;return i||!a?null:(0,Y.jsx)(`span`,{className:`wo-when`,"data-said":e.dateGrounded?``:void 0,children:a})}if(t!==`card`)return null;let n=ce.has(e.id),i=Ut(g.nodes,e.id),a=i>0,o=Ht(e.series??[]),s=me.get(e.id),c=s?.value===void 0?s?.date:void 0,l=c===void 0||j(c.t)===null?null:c.until!==void 0&&j(c.until)!==null?`${c.t}–${c.until}`:c.t,u=a&&ue(e.id),d=!a&&r!==void 0,f=m===e.id,p=a&&!u?i:0;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Qe,{id:yt(e.id),className:`wo-num`}),e.shift!==void 0&&de(e.shift)!==null&&(0,Y.jsx)(`span`,{className:`wo-shift`,"data-dir":e.shift<1?`down`:`up`,children:de(e.shift)}),o!==null&&(0,Y.jsx)(`svg`,{className:`wo-trace`,viewBox:`0 0 100 20`,preserveAspectRatio:`none`,"aria-hidden":`true`,children:(0,Y.jsx)(`path`,{d:o,fill:`none`})}),l!==null&&(0,Y.jsx)(`span`,{className:`wo-when`,"data-said":e.dateGrounded?``:void 0,children:l}),p>0&&(0,Y.jsx)(`span`,{className:`wo-parts-count`,children:`${p} part${p===1?``:`s`}`}),(u||d)&&(0,Y.jsx)(`button`,{type:`button`,className:`wo-expand`,"aria-expanded":u?n:void 0,"aria-busy":f||void 0,disabled:f||d&&m!==null,"aria-label":`${u&&n?`Close`:`Break down`} ${e.label}`,onClick:t=>{t.stopPropagation(),u?le(e.id):Ke(e.id)},children:f?`breaking down…`:u&&n?`close`:`break down`})]})},[ue,g,me,ce,le,r,m,Ke,oe]),Z=me.get(g.outcomeId),Je=(0,q.useMemo)(()=>qt(I,I,Z?.value,_),[I,Z?.value,_]),Xe=(0,q.useMemo)(()=>qt(R,I,Z?.value,_),[R,I,Z?.value,_]),Ze=(0,q.useMemo)(()=>({causes:g.nodes.length,links:g.edges.length,sourced:g.nodes.filter(e=>e.receipt!==void 0).length}),[g]),Q=T?.kind===`node`?me.get(T.id):void 0,$e=(0,q.useMemo)(()=>Q===void 0?[]:L(b,Q.id),[b,Q]),[et,tt]=(0,q.useState)(null);(0,q.useEffect)(()=>{if(Q===void 0){tt(null);return}let e=!0;return(async()=>{let{hierarchyLens:t}=await i(async()=>{let{hierarchyLens:e}=await import(`./lens-Ba83fBmq.js`);return{hierarchyLens:e}},__vite__mapDeps([0,1,2,3]));if(!e)return;let n=t.compile(b,Q.id);if(n===null){tt(null);return}await a(o([n.block]));let r=s(n.block.type);e&&r&&tt({plan:n,render:r})})(),()=>{e=!1}},[b,Q]);let $=T?.kind===`edge`?he.get(T.id):void 0,nt=(0,q.useMemo)(()=>g.nodes.filter(e=>e.role===`root`).map(e=>({id:e.id,label:A(e.label),pct:C.get(e.id)??100})),[g.nodes,C]);return(0,Y.jsx)(st,{registry:x,onNavigate:ve,ref:ge,children:(0,Y.jsx)(`section`,{className:`wo-scrim`,"aria-label":`Living answer: ${v(g.title)}`,onPointerDownCapture:Le,onKeyDownCapture:Le,children:(0,Y.jsxs)(`div`,{className:`wo-panel`,children:[(0,Y.jsxs)(`header`,{className:`wo-head`,children:[(0,Y.jsxs)(`div`,{className:`wo-title`,children:[(0,Y.jsx)(`span`,{className:`wo-kicker`,children:`THE LIVING ANSWER`}),(0,Y.jsx)(`h2`,{children:v(g.title)})]}),(0,Y.jsxs)(`div`,{className:`wo-head-actions`,children:[K.length===1?(0,Y.jsx)(`span`,{className:`wo-chip wo-chip-sole`,children:Ne[K[0]].chip}):(0,Y.jsx)(`div`,{className:`wo-views`,role:`tablist`,"aria-label":`View`,children:K.slice(0,zt).map((e,t,n)=>(0,Y.jsx)(`button`,{type:`button`,id:`wo-tab-${e}`,className:`wo-chip`,role:`tab`,"aria-selected":oe===e,"aria-controls":Bt,tabIndex:oe===e?0:-1,onKeyDown:e=>{let r=e.key===`ArrowRight`?1:e.key===`ArrowLeft`?-1:0;if(r===0)return;e.preventDefault();let i=n[(t+r+n.length)%n.length];X(),se(i),document.getElementById(`wo-tab-${i}`)?.focus()},onClick:()=>{X(),se(e)},children:Ne[e].chip},e))}),(0,Y.jsx)(`button`,{type:`button`,className:`wo-btn`,onClick:Ge,disabled:!k,children:`Reset`}),n&&(0,Y.jsx)(`button`,{type:`button`,className:`wo-btn wo-btn-close`,onClick:n,"aria-label":`Back to the answer`,children:`← Back to the answer`})]})]}),_&&(0,Y.jsx)(`div`,{className:`wo-banner wo-banner-illustrative`,children:`Illustrative model — shows the shape, not your numbers.`}),(0,Y.jsxs)(`p`,{className:`wo-legend`,"aria-live":`polite`,children:[(0,Y.jsxs)(`span`,{className:`wo-legend-view`,children:[Ne[oe].caption,`.`]}),` `,Ne[oe].legend]}),(0,Y.jsxs)(`div`,{className:`wo-body`,children:[(0,Y.jsxs)(`div`,{className:`wo-stage`,id:Bt,role:K.length>1?`tabpanel`:void 0,"aria-labelledby":K.length>1?`wo-tab-${oe}`:void 0,"data-uniform-tier":te,"data-illustrative":_?``:void 0,onWheelCapture:_e,onPointerDownCapture:_e,style:ne===null?void 0:{"--wo-air-1":ne.air1,"--wo-air-2":ne.air2},children:[(0,Y.jsx)(Ae,{stage:ae,world:pe,renderFace:qe,onNodeClick:Ve,onEdgeClick:He,selectedId:T?.kind===`node`?T.id:void 0,litEdgeId:ye}),(0,Y.jsx)(Tt,{count:Se.length,index:Ee,playing:De,caption:Oe,expanded:D,onToggle:ke,onSeek:je,inviting:Fe})]}),(0,Y.jsxs)(`aside`,{className:`wo-rail`,children:[(0,Y.jsx)(Ye,{levers:nt,onSet:Ue,onReset:Ge}),(0,Y.jsx)(ht,{baseline:Je,current:Xe,unit:Z?.unit,active:k,observedNote:_?Vt:void 0}),(0,Y.jsxs)(`div`,{className:`wo-detail`,children:[(0,Y.jsx)(`span`,{className:`wo-rail-kicker`,children:`EVIDENCE`}),!T&&(0,Y.jsxs)(`div`,{className:`wo-standing`,children:[(0,Y.jsxs)(`p`,{className:`wo-invite`,children:[`Press `,(0,Y.jsx)(`strong`,{children:`Walk me through it`}),` and Mavéa takes you cause by cause — free, and as often as you like.`]}),(0,Y.jsx)(`p`,{className:`wo-hint`,children:`Or tap any cause or link to see what stands behind it.`}),(0,Y.jsxs)(`dl`,{className:`wo-facts`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{children:`Causes`}),(0,Y.jsx)(`dd`,{children:Ze.causes})]}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{children:`Links`}),(0,Y.jsx)(`dd`,{children:Ze.links})]}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{children:_?`Illustrative`:`With a source`}),(0,Y.jsx)(`dd`,{children:_?`every cause`:Ze.sourced})]})]}),Z&&(0,Y.jsxs)(`p`,{className:`wo-standing-outcome`,children:[(0,Y.jsx)(`span`,{className:`wo-standing-lead`,children:`It ends at`}),` `,Z.label,Z.detail?(0,Y.jsx)(`span`,{className:`wo-standing-note`,children:Z.detail}):null]}),(0,Y.jsx)(`p`,{className:`wo-hint`,children:`Turn a root cause down and the rest of the web re-weights — nothing is re-computed by a model, and no projected number is invented.`})]}),Q&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`h3`,{className:`wo-detail-title`,children:Q.label}),Q.detail&&(0,Y.jsx)(`p`,{className:`wo-detail-note`,children:Q.detail}),(0,Y.jsx)(`p`,{className:`wo-detail-figure`,children:(0,Y.jsx)(Qe,{id:yt(Q.id)})}),Q.series&&(0,Y.jsx)(`ul`,{className:`wo-series`,children:Q.series.points.map((e,t)=>(0,Y.jsxs)(`li`,{children:[(0,Y.jsx)(`span`,{className:`wo-series-t`,children:e.t}),(0,Y.jsx)(Qe,{id:bt(Q.id,e.t)})]},`${e.t}:${t}`))}),(et||$e.length>0)&&(0,Y.jsxs)(`div`,{className:`wo-parts`,children:[(0,Y.jsx)(`span`,{className:`wo-rail-kicker`,children:`WHAT THIS IS MADE OF`}),et?et.render(et.plan.block.props,{delay:0}):(0,Y.jsx)(`ul`,{className:`wo-part-list`,children:$e.map(e=>(0,Y.jsx)(`li`,{children:A(e.label)},e.id))})]})]}),$&&(0,Y.jsx)(re,{relation:P($.relation),sign:$.sign,status:$.status??N($),receipts:$.receipts??($.receipt?[$.receipt]:[]),counter:$.counter,provisional:$.provisional})]})]})]})]})})})}export{Jt as WorldOverlay};
|
|
2
|
+
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{n as r,t as i}from"./preload-helper-CiWYd9n-.js";import{i as a,n as o,t as s}from"./loader-BRfSnl9t.js";import{t as c}from"./useFocusTrap-CJmpNZv2.js";import{r as l,t as u}from"./useSpatialCanvas-CfmZOXXP.js";import{i as d}from"./format-q0LwBjID.js";import{i as f,n as p}from"./openWorld-B4VY6xO7.js";import{a as m,i as h,n as g,t as _}from"./display-CAb_PiGv.js";import{t as v}from"./sentenceCase-CLDiNB0f.js";import{r as y,t as b}from"./sourceHost-BV3t2XDb.js";import{r as x}from"./stepDriver-DwjFet6U.js";import{a as S,i as C,s as w}from"./spokenText-Dy-GZvZV.js";import{d as T,l as E,s as D,u as O}from"./walkSync-CRhkAQFu.js";import{n as k}from"./emphasize-BqCIst-B.js";import{c as A,s as j,t as M}from"./validate-MQG0EcTD.js";import{n as N,s as P}from"./receipts-D7zveV-I.js";import{n as F,r as I}from"./value-Dx7DZob4.js";import{t as L}from"./types-DuEbJpIA.js";import{a as R,c as z,d as B,f as V,i as H,l as U,n as W,o as G,r as ee,s as K,t as te,u as ne}from"./offers-eBNj_lSP.js";import{n as re,t as ie}from"./engine-BiM6INsW.js";var q=e(),J=t(),Y=n();function ae(e){return e.kind}var oe=.33,se=.1,ce=.005;function le(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))return`would barely change`;let n=Math.abs(e)>1e-9?Math.abs(e):1,r=(t-e)/n,i=Math.abs(r);if(i<=ce)return`would barely change`;let a=r>0?`rise`:`fall`;return i>=oe?`would ${a} meaningfully`:i>=se?`would ${a} somewhat`:`would ${a} slightly`}var ue=.6;function de(e){if(!Number.isFinite(e))return null;let t=e-1,n=Math.abs(t);if(n<=.005)return null;let r=t>0?`stronger`:`weaker`;return n>=ue?`much ${r}`:n>=oe?r:`slightly ${r}`}var fe=440,pe=2,me=1.25,he=320;function ge(e){if(!(e===void 0||!Number.isFinite(e))){if(e<.995)return`weaker`;if(e>1.005)return`stronger`}}var _e=[{id:`mv-arrow`,cls:`mv-marker-up`,refX:9,size:13,shape:(0,Y.jsx)(`path`,{d:`M0.5 1 L9.5 5 L0.5 9 Z`})},{id:`mv-arrow-damp`,cls:`mv-marker-down`,refX:8,size:17,shape:(0,Y.jsx)(`path`,{d:`M8 0.6 L8 9.4`})},{id:`mv-arrow-open`,cls:`mv-marker-open`,refX:9,size:13,shape:(0,Y.jsx)(`path`,{d:`M1 1.4 L9 5 L1 8.6 Z`})},{id:`mv-arrow-ring`,cls:`mv-marker-ring`,refX:7.4,size:13,shape:(0,Y.jsx)(`circle`,{cx:`5`,cy:`5`,r:`3`})},{id:`mv-dot`,cls:`mv-marker-dot`,refX:5,size:9,shape:(0,Y.jsx)(`circle`,{cx:`5`,cy:`5`,r:`2.6`})}];function ve(){let e=(0,J.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(`defs`,{children:_e.flatMap(ye)}),e[0]=t):t=e[0],t}function ye(e){return[!1,!0].map(t=>(0,Y.jsx)(`marker`,{id:t?`${e.id}-soft`:e.id,className:`mv-marker ${e.cls}${t?` mv-marker-soft`:``}`,viewBox:`0 0 10 10`,refX:e.refX,refY:`5`,markerUnits:`userSpaceOnUse`,markerWidth:e.size,markerHeight:e.size,orient:`auto`,children:e.shape},t?`${e.id}-soft`:e.id))}function be(e,t){let n=(0,J.c)(5),r;n[0]===e.current?r=n[1]:(r=()=>{let t=e.current;if(!t||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)return;let n=t.querySelectorAll(`[data-draw]:not(.m-draw-path):not([data-drawn])`),r=Array.from(n,Se);n.forEach((e,t)=>{let n=r[t];n!==null&&(e.style.setProperty(`--path-len`,`${n}px`),e.style.setProperty(`--delay`,`${fe}ms`),e.classList.add(`m-draw-path`))});let i=xe;return t.addEventListener(`animationend`,i),()=>t.removeEventListener(`animationend`,i)},n[0]=e.current,n[1]=r);let i;n[2]!==t||n[3]!==e?(i=[e,t],n[2]=t,n[3]=e,n[4]=i):i=n[4],(0,q.useEffect)(r,i)}function xe(e){if(e.animationName!==`mavea-draw`)return;let t=e.target;t.classList.remove(`m-draw-path`),t.style.removeProperty(`--path-len`),t.style.removeProperty(`--delay`),t.dataset.drawn=``}function Se(e){return typeof e.getTotalLength==`function`?e.getTotalLength():null}function Ce(e){let t=(0,J.c)(33),{chrome:n,bbox:r,exiting:i,onSettle:a}=e,o=(0,q.useRef)(null);be(o,n.paths);let s=i?``:void 0,c=i?!0:void 0,l=r.w,u=r.h,d=`${r.x} ${r.y} ${r.w} ${r.h}`,f;t[0]===n.bands?f=t[1]:(f=n.bands.map(Te),t[0]=n.bands,t[1]=f);let p;t[2]===n.paths?p=t[3]:(p=n.paths.map(we),t[2]=n.paths,t[3]=p);let m;t[4]!==r.h||t[5]!==r.w||t[6]!==d||t[7]!==f||t[8]!==p?(m=(0,Y.jsxs)(`svg`,{ref:o,className:`mv-chrome-svg`,width:l,height:u,viewBox:d,"aria-hidden":`true`,children:[f,p]}),t[4]=r.h,t[5]=r.w,t[6]=d,t[7]=f,t[8]=p,t[9]=m):m=t[9];let h;if(t[10]!==r.x||t[11]!==r.y||t[12]!==n.bands){let e;t[14]!==r.x||t[15]!==r.y?(e=e=>e.label===void 0?null:(0,Y.jsx)(`div`,{className:`mv-shelf-label`,style:{left:e.x-r.x+12,top:e.y-r.y+12},children:e.label},`${e.id}:label`),t[14]=r.x,t[15]=r.y,t[16]=e):e=t[16],h=n.bands.map(e),t[10]=r.x,t[11]=r.y,t[12]=n.bands,t[13]=h}else h=t[13];let g;if(t[17]!==r.x||t[18]!==r.y||t[19]!==n.labels){let e;t[21]!==r.x||t[22]!==r.y?(e=e=>(0,Y.jsx)(`div`,{className:`mv-chrome-label ${e.className}`,"data-anchor":e.anchor??`start`,style:{left:e.x-r.x,top:e.y-r.y},children:e.text},e.id),t[21]=r.x,t[22]=r.y,t[23]=e):e=t[23],g=n.labels.map(e),t[17]=r.x,t[18]=r.y,t[19]=n.labels,t[20]=g}else g=t[20];let _;t[24]!==g||t[25]!==h?(_=(0,Y.jsxs)(`div`,{className:`mv-chrome-labels`,children:[h,g]}),t[24]=g,t[25]=h,t[26]=_):_=t[26];let v;return t[27]!==a||t[28]!==s||t[29]!==_||t[30]!==c||t[31]!==m?(v=(0,Y.jsxs)(`div`,{className:`mv-chrome`,"data-exiting":s,onTransitionEnd:a,"aria-hidden":c,children:[m,_]}),t[27]=a,t[28]=s,t[29]=_,t[30]=c,t[31]=m,t[32]=v):v=t[32],v}function we(e){return(0,Y.jsx)(`path`,{className:e.className,d:e.d,fill:`none`,"data-draw":e.draw?``:void 0},e.id)}function Te(e){return(0,Y.jsx)(`rect`,{className:`mv-band ${e.className}`,x:e.x,y:e.y,width:e.w,height:e.h,rx:12},e.id)}function Ee(e){if(e instanceof Element)return e.closest(`.mv-node`)?.dataset.id}var De=60;function Oe(e){return[...e.positions.entries()].filter(([,e])=>e.folded!==!0).sort(([e,t],[n,r])=>{let i=Number(t.shelved===!0)-Number(r.shelved===!0);if(i!==0)return i;let a=Math.round(t.y/De)-Math.round(r.y/De);return a===0?t.x-r.x||e.localeCompare(n):a}).map(([e])=>e)}var ke=(0,q.memo)(function(e){let t=(0,J.c)(65),{nodes:n,edges:r,layout:i,exiting:a,settleExit:o,activate:s,lod:c,renderFace:l,onNodeClick:u,onEdgeClick:d,selectedId:f,litEdgeId:p}=e,m=(0,q.useRef)(null);be(m,i.edgePaths);let h;t[0]===i?h=t[1]:(h=Oe(i),t[0]=i,t[1]=h);let g=h,[_,v]=(0,q.useState)(null),y;t[2]!==_||t[3]!==g?(y=_!==null&&g.includes(_)?_:g[0]??null,t[2]=_,t[3]=g,t[4]=y):y=t[4];let b=y,x;t[5]!==g||t[6]!==b?(x=e=>{if(g.length===0)return;let t=b===null?0:g.indexOf(b),n=e===`first`?0:e===`last`?g.length-1:Math.min(g.length-1,Math.max(0,t+e)),r=g[n];v(r),document.querySelector(`.mv-node[data-id="${CSS.escape(r)}"]`)?.focus()},t[5]=g,t[6]=b,t[7]=x):x=t[7];let S=x,C;if(t[8]!==r){C=new Map;for(let e of r)e.label!==void 0&&C.set(e.id,e.label);t[8]=r,t[9]=C}else C=t[9];let w=C,{bbox:T}=i,E;if(t[10]!==r||t[11]!==n){let e=new Map(n.map(je));E=new Map;for(let t of r){let n=e.get(t.from);n!==void 0&&Number.isFinite(n)&&E.set(t.id,n)}t[10]=r,t[11]=n,t[12]=E}else E=t[12];let D=E,O;t[13]!==a||t[14]!==o?(O=a&&(0,Y.jsx)(Ce,{chrome:a.layout.chrome,bbox:a.layout.bbox,exiting:!0,onSettle:()=>o(a.token)},a.token),t[13]=a,t[14]=o,t[15]=O):O=t[15];let k;t[16]!==T||t[17]!==i.chrome||t[18]!==i.rep?(k=(0,Y.jsx)(Ce,{chrome:i.chrome,bbox:T},i.rep),t[16]=T,t[17]=i.chrome,t[18]=i.rep,t[19]=k):k=t[19];let A=T.w,j=T.h,M=`${T.x} ${T.y} ${T.w} ${T.h}`,N;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Y.jsx)(ve,{}),t[20]=N):N=t[20];let P;if(t[21]!==w||t[22]!==D||t[23]!==i.edgePaths||t[24]!==p||t[25]!==d){let e;t[27]!==w||t[28]!==D||t[29]!==p||t[30]!==d?(e=e=>(0,Y.jsxs)(`g`,{className:`mv-edge-g`,"data-lit":p===e.id?``:void 0,"data-shift":ge(D.get(e.id)),style:D.has(e.id)?{"--mv-shift":D.get(e.id)}:void 0,onClick:d?()=>d(e.id):void 0,children:[w.has(e.id)&&(0,Y.jsx)(`title`,{children:w.get(e.id)}),d&&(0,Y.jsx)(`path`,{className:`mv-edge-hit`,d:e.d,fill:`none`}),(0,Y.jsx)(`path`,{className:e.className,d:e.d,fill:`none`,"data-draw":``,style:e.width===void 0?void 0:{"--mv-edge-w":e.width}})]},e.id),t[27]=w,t[28]=D,t[29]=p,t[30]=d,t[31]=e):e=t[31],P=i.edgePaths.map(e),t[21]=w,t[22]=D,t[23]=i.edgePaths,t[24]=p,t[25]=d,t[26]=P}else P=t[26];let F;t[32]!==T.h||t[33]!==T.w||t[34]!==P||t[35]!==M?(F=(0,Y.jsxs)(`svg`,{ref:m,className:`mv-edges`,width:A,height:j,viewBox:M,"aria-hidden":`true`,children:[N,P]}),t[32]=T.h,t[33]=T.w,t[34]=P,t[35]=M,t[36]=F):F=t[36];let I;if(t[37]!==s||t[38]!==T.x||t[39]!==T.y||t[40]!==i.positions||t[41]!==c||t[42]!==S||t[43]!==n||t[44]!==u||t[45]!==l||t[46]!==b||t[47]!==f){let e;t[49]!==s||t[50]!==T.x||t[51]!==T.y||t[52]!==i.positions||t[53]!==c||t[54]!==S||t[55]!==u||t[56]!==l||t[57]!==b||t[58]!==f?(e=(e,t)=>{let n=i.positions.get(e.id);if(!n)return null;let r={"--nx":`${n.x+n.w/2-T.x}px`,"--ny":`${n.y+n.h/2-T.y}px`,"--mv-i":e.depth??t,...e.shift===void 0?{}:{"--mv-shift":e.shift}},a=u!==void 0&&!n.folded,o=n.folded?void 0:l,d=l?.(e,`entry`);return(0,Y.jsxs)(`div`,{className:`mv-node`,"data-id":e.id,"data-role":e.role,"data-tier":e.tier,"data-domain":e.domain,"data-series":e.series?.length?``:void 0,"data-face":n.face,"data-shelved":n.shelved?``:void 0,"data-folded":n.folded?``:void 0,"data-shift":ge(e.shift),"data-selected":f===e.id?``:void 0,"data-lod":c,style:r,"aria-hidden":n.folded?!0:void 0,role:a?`button`:void 0,tabIndex:a?e.id===b?0:-1:void 0,onFocus:a?()=>v(e.id):void 0,onClick:a?()=>s(e):void 0,onKeyDown:a?t=>{if(t.key===`Enter`||t.key===` `){t.preventDefault(),u?.(e);return}let n={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:`first`,End:`last`}[t.key];n!==void 0&&(t.preventDefault(),S(n))}:void 0,children:[(0,Y.jsxs)(`div`,{className:`mv-face mv-face-card`,"aria-hidden":n.face!==`card`||void 0,children:[(0,Y.jsx)(`span`,{className:`mv-label`,children:e.label}),(0,Y.jsxs)(`span`,{className:`mv-card-foot`,children:[e.domain!==void 0&&(0,Y.jsx)(`span`,{className:`mv-domain`,title:e.domain,"aria-label":e.domain}),e.value!==void 0&&(0,Y.jsxs)(`span`,{className:`mv-value`,children:[e.value.toLocaleString(),e.unit??``]}),o?.(e,`card`),e.tier!==void 0&&(0,Y.jsx)(`span`,{className:`mv-tier`,children:e.tier})]})]}),(0,Y.jsx)(`div`,{className:`mv-face mv-face-entry`,"aria-hidden":n.face!==`entry`||void 0,children:(0,Y.jsxs)(`span`,{className:`mv-label`,children:[d,d?` `:null,e.label]})}),(0,Y.jsx)(`div`,{className:`mv-face mv-face-mark`,"aria-hidden":n.face!==`mark`||void 0,children:o?.(e,`mark`)})]},e.id)},t[49]=s,t[50]=T.x,t[51]=T.y,t[52]=i.positions,t[53]=c,t[54]=S,t[55]=u,t[56]=l,t[57]=b,t[58]=f,t[59]=e):e=t[59],I=n.map(e),t[37]=s,t[38]=T.x,t[39]=T.y,t[40]=i.positions,t[41]=c,t[42]=S,t[43]=n,t[44]=u,t[45]=l,t[46]=b,t[47]=f,t[48]=I}else I=t[48];let L;return t[60]!==F||t[61]!==I||t[62]!==O||t[63]!==k?(L=(0,Y.jsxs)(Y.Fragment,{children:[O,k,F,I]}),t[60]=F,t[61]=I,t[62]=O,t[63]=k,t[64]=L):L=t[64],L});function Ae({stage:e,world:t,renderFace:n,onNodeClick:r,onEdgeClick:i,selectedId:a,litEdgeId:o}){let{cam:s,layout:c,exiting:l,lod:u,settleExit:d,morphing:f,settle:p}=e,{viewportRef:m,zoomAtClient:h,pan:g}=s,[_,v]=(0,q.useState)(!1),y=(0,q.useRef)(new Map),b=(0,q.useRef)(0),x=(0,q.useRef)(!1),S=(0,q.useRef)(!1),C=(0,q.useRef)(!1),w=(0,q.useRef)({x:0,y:0}),T=(0,q.useCallback)((t,n,r,i)=>{if(x.current){h(t,n,r);return}e.pinch(t,n,r,i)!==`zoom`&&(x.current=!0)},[e,h]),E=(0,q.useRef)(T);E.current=T,(0,q.useEffect)(()=>{let e=m.current;if(!e)return;let t,n=e=>{if(e.preventDefault(),p(),e.ctrlKey){E.current(Math.exp(-e.deltaY/100),e.clientX,e.clientY,Ee(e.target)),clearTimeout(t),t=setTimeout(()=>{x.current=!1},he);return}h(e.deltaY<0?1.12:1/1.12,e.clientX,e.clientY)};return e.addEventListener(`wheel`,n,{passive:!1}),()=>{clearTimeout(t),e.removeEventListener(`wheel`,n)}},[m,h,p]);let D=()=>{let[e,t]=[...y.current.values()];return{x:(e.x+t.x)/2,y:(e.y+t.y)/2,d:Math.hypot(e.x-t.x,e.y-t.y)}},O=(0,q.useCallback)(e=>{if(p(),y.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),y.current.size>=2){e.currentTarget.setPointerCapture(e.pointerId),S.current=!1,v(!1),b.current=0;return}S.current=!0,C.current=!1,v(!0),w.current={x:e.clientX,y:e.clientY}},[p]),k=(0,q.useRef)({dx:0,dy:0}),A=(0,q.useRef)(0),j=(0,q.useCallback)(()=>{A.current!==0&&(cancelAnimationFrame(A.current),A.current=0);let{dx:e,dy:t}=k.current;(e!==0||t!==0)&&(k.current={dx:0,dy:0},g(e,t))},[g]),M=(0,q.useCallback)((e,t)=>{k.current.dx+=e,k.current.dy+=t,A.current===0&&(A.current=requestAnimationFrame(()=>{A.current=0;let e=k.current;k.current={dx:0,dy:0},(e.dx!==0||e.dy!==0)&&g(e.dx,e.dy)}))},[g]);(0,q.useEffect)(()=>()=>cancelAnimationFrame(A.current),[]);let N=(0,q.useCallback)(e=>{let t=y.current;if(!t.has(e.pointerId))return;if(t.set(e.pointerId,{x:e.clientX,y:e.clientY}),t.size>=2){let{x:t,y:n,d:r}=D();if(b.current===0){b.current=r;return}let i=r/b.current;(i>me||i<1/me)&&(b.current=r,E.current(i,t,n,Ee(e.target)));return}if(!S.current)return;let n=e.clientX-w.current.x,r=e.clientY-w.current.y;Math.abs(n)+Math.abs(r)>pe&&!C.current&&(C.current=!0,e.currentTarget.setPointerCapture(e.pointerId)),w.current={x:e.clientX,y:e.clientY},M(n,r)},[M]),P=(0,q.useCallback)(e=>{j(),y.current.delete(e.pointerId),y.current.size<2&&(b.current=0,x.current=!1),y.current.size===0&&(S.current=!1,v(!1)),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},[j]),F=(0,q.useCallback)(e=>{C.current||r?.(e)},[r]),I=(0,q.useCallback)(e=>{e.propertyName===`transform`&&p()},[p]),{bbox:L}=c,R={transform:s.transform,width:L.w,height:L.h,"--mv-cam-scale":s.camera.scale};return(0,Y.jsx)(`div`,{className:`mv-viewport`,ref:m,"data-panning":_?`true`:void 0,style:{"--mv-cam-scale":s.camera.scale},onPointerDown:O,onPointerMove:N,onPointerUp:P,onPointerCancel:P,children:(0,Y.jsx)(`div`,{className:`mv-world`,style:R,"data-morphing":f?``:void 0,onTransitionEnd:I,children:(0,Y.jsx)(ke,{nodes:t.nodes,edges:t.edges,layout:c,exiting:l,settleExit:d,activate:F,lod:u,renderFace:n,onNodeClick:r,onEdgeClick:i,selectedId:a,litEdgeId:o})})})}function je(e){return[e.id,e.shift]}function Me(e,t){return e===`in`?`zoom-camera`:t?`ascend`:`zoom-camera`}var Ne={graph:{chip:`Graph`,caption:`What caused what`,legend:`Left to right is what led to what. Colour is the direction of the push; thickness is how much of the outcome the link explains.`},flow:{chip:`Contribution`,caption:`How much each one contributed`,legend:`Ribbon thickness is how much of the outcome that link was MEASURED to explain. A cause whose links carry no measured share is held aside rather than drawn thin, which would read as a finding nobody made.`},timeline:{chip:`Over time`,caption:`The same causes, in time`,legend:`Left to right is WHEN, read against the axis below; a bar is how long a cause lasted. Height only keeps entries from overlapping — it means nothing.`},spheres:{chip:`Spheres`,caption:`What kinds of force`,legend:`Each lane is a sphere the causes belong to. A link that CHANGES lane is a handoff between kinds of force and is drawn at full weight; one that stays inside a lane goes faint. A cause the answer put in no single sphere is held aside rather than filed under one it does not belong to.`},chart:{chip:`As a chart`,caption:`How much each one moved`,legend:`Each mark is a cause plotted against its own measured history. Causes with nothing measured are held aside rather than drawn at zero.`}},Pe={min:ne,max:2.2},Fe=56,Ie=1300,Le=1300,X=.7,Re=120,ze=120,Be={graph:K,timeline:R,chart:U,flow:z,spheres:G},Ve=e=>({x:0,y:0,w:e.w,h:e.h}),He=(e,t,n)=>[t-e.x,n-e.y];function Ue(e,t,n){let r=e.positions.get(t);if(!r)return null;let i=r.x,a=r.y,o=r.x+r.w,s=r.y+r.h;for(let r of n.get(t)??[]){let t=e.positions.get(r);!t||t.folded||(i=Math.min(i,t.x),a=Math.min(a,t.y),o=Math.max(o,t.x+t.w),s=Math.max(s,t.y+t.h))}let[c,l]=He(e.bbox,i-Re,a-Re);return{x:c,y:l,w:o-i+240,h:s-a+240}}function We(e){let{world:t,onAscend:n,driverId:r,insetBottom:i}=e,[a,o]=(0,q.useState)(e.initialRep??`graph`),[s,c]=(0,q.useState)(()=>new Set),[d,f]=(0,q.useState)(null),p=u({clamp:Pe,margin:Fe,...i===void 0?{}:{insetBottom:i}}),m=(0,q.useRef)(void 0),{viewport:h}=p,g=(0,q.useMemo)(()=>h?{w:Math.max(1,h.w-112),h:Math.max(1,h.h-112)}:void 0,[h]),_=(0,q.useMemo)(()=>Be[a](t,{expandedIds:s,previous:m.current,...g?{viewport:g}:{}}),[a,t,s,g]);(0,q.useEffect)(()=>{let e=new Map;for(let[t,n]of _.positions)e.set(t,{x:n.x,y:n.y});m.current=e},[_]);let v=(0,q.useRef)(a);v.current=a;let y=(0,q.useRef)(_);y.current=_;let b=(0,q.useRef)(p.camera);b.current=p.camera;let S=(0,q.useRef)(s);S.current=s;let C=(0,q.useRef)(n);C.current=n;let[w,T]=(0,q.useState)(null),{endFlight:E}=p,D=(0,q.useCallback)(()=>{T({layout:y.current,rep:v.current,expandedIds:S.current}),E()},[E]),O=(0,q.useRef)(0),k=(0,q.useRef)(void 0);(0,q.useEffect)(()=>()=>clearTimeout(k.current),[]);let A=(0,q.useCallback)(e=>{if(e===v.current)return;let t=++O.current;f({layout:y.current,token:t}),clearTimeout(k.current),k.current=setTimeout(()=>{t===O.current&&f(null)},Ie),v.current=e,o(e)},[]),j=(0,q.useCallback)(e=>{e===O.current&&(clearTimeout(k.current),f(null))},[]),M=(0,q.useRef)(null),N=(0,q.useCallback)(e=>{let t=new Set(S.current);t.delete(e)||(t.add(e),U.current(e)&&(M.current=e)),c(t)},[]),P=(0,q.useMemo)(()=>{let e=new Map;for(let n of t.nodes){if(n.parentId===void 0)continue;let t=e.get(n.parentId);t?t.push(n.id):e.set(n.parentId,[n.id])}return e},[t]),{fitTo:F,setCamera:I,viewportRef:L}=p;(0,q.useEffect)(()=>{let e=M.current;if(M.current=null,e!==null){let t=Ue(_,e,P);if(t){F(t);return}}F(Ve(_.bbox))},[_,P,F,I,L]);let R=(0,q.useMemo)(()=>new Map(t.nodes.map(e=>[e.id,e.parentId])),[t]),z=(0,q.useMemo)(()=>{let e=new Set;for(let t of R.values())t!==void 0&&e.add(t);return e},[R]),B=(0,q.useCallback)(e=>{let t=0,n=e,r=new Set;for(;n!==void 0&&!r.has(n);)r.add(n),n=R.get(n),n!==void 0&&(t+=1);return t},[R]),V=a===`graph`,H=(0,q.useCallback)(e=>{if(!V)return!1;let t=_.positions.get(e);return t===void 0||t.folded===!0||t.shelved===!0?!1:B(e)+1<=2},[V,_,B]),U=(0,q.useRef)(H);U.current=H;let{zoomAtClient:W}=p,G=(0,q.useCallback)((e,t,n,r)=>{if(e>=1)return r!==void 0&&z.has(r)&&!S.current.has(r)&&U.current(r)?(N(r),`expand`):(W(e,t,n),`zoom`);let i=L.current?.getBoundingClientRect();if(Me(`out`,!!i&&(i.width>0||i.height>0)&&l(b.current,Ve(y.current.bbox),{w:i.width,h:i.height},Fe,Pe))===`zoom-camera`)return W(e,t,n),`zoom`;let a=[...S.current];if(a.length>0){let e=a[0],t=B(e);for(let n of a){let r=B(n);r>t&&(e=n,t=r)}return N(e),`collapse`}return C.current?.(),`ascend`},[z,N,W,L,B]),ee=(0,q.useCallback)(e=>{let t=y.current,n=e===null?void 0:t.positions.get(e);if(!n||n.folded){F(Ve(t.bbox));return}let[r,i]=He(t.bbox,n.x-ze,n.y-ze);F({x:r,y:i,w:n.w+240,h:n.h+240})},[F]);(0,q.useEffect)(()=>{if(r!==void 0)return x(r,{count:te.length,setIndex:e=>A(te[Math.min(te.length-1,Math.max(0,Math.trunc(e)))]),spokenFor:()=>void 0,captionFor:e=>{let t=te[e];return t?Ne[t].caption:void 0}})},[r,A]);let K=w?.layout!==_||p.flying;return(0,q.useEffect)(()=>{if(!K)return;let e=setTimeout(D,Le);return()=>clearTimeout(e)},[K,_,D]),{rep:a,setRep:A,layout:_,exiting:d,settleExit:j,expandedIds:s,toggleExpand:N,expandable:z,unfoldsOnStage:H,cam:p,morphing:K,settle:D,lod:p.camera.scale>=X?`near`:`far`,pinch:G,focusNode:ee}}function Ge({label:e,min:t,max:n,step:r=1,value:i,onChange:a,format:o,color:s=`var(--presence)`}){let c=n-t||1,l=(i-t)/c*100;return(0,Y.jsxs)(`label`,{className:`viz-ctl`,style:{"--ctl-c":s,"--ctl-pct":l+`%`},children:[(0,Y.jsx)(`span`,{className:`viz-ctl-label`,children:e}),(0,Y.jsx)(`input`,{type:`range`,className:`viz-ctl-range`,min:t,max:n,step:r,value:i,"aria-label":e,onChange:e=>a(Number(e.target.value))}),(0,Y.jsx)(`span`,{className:`viz-ctl-val tab-num`,children:o?o(i):i.toLocaleString()})]})}var Ke=`No cause is established yet, so there is nothing to push on.`;function qe(e){let t=(0,J.c)(17),{levers:n,onSet:r,onReset:i}=e,a;t[0]===n?a=t[1]:(a=n.every(Je),t[0]=n,t[1]=a);let o=a,s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Y.jsx)(`h3`,{className:`tr-sec-title`,children:`WHAT IF`}),t[2]=s):s=t[2];let c;t[3]!==i||t[4]!==o?(c=(0,Y.jsxs)(`div`,{className:`tr-levers-head`,children:[s,(0,Y.jsx)(`button`,{type:`button`,className:`tr-reset`,onClick:i,disabled:o,children:`Reset`})]}),t[3]=i,t[4]=o,t[5]=c):c=t[5];let l;t[6]===n.length?l=t[7]:(l=n.length===0&&(0,Y.jsx)(`p`,{className:`tr-levers-empty`,children:Ke}),t[6]=n.length,t[7]=l);let u;if(t[8]!==n||t[9]!==r){let e;t[11]===r?e=t[12]:(e=e=>(0,Y.jsx)(Ge,{label:e.label,min:0,max:100,value:e.pct,onChange:t=>r(e.id,t),format:Z},e.id),t[11]=r,t[12]=e),u=n.map(e),t[8]=n,t[9]=r,t[10]=u}else u=t[10];let d;return t[13]!==c||t[14]!==l||t[15]!==u?(d=(0,Y.jsxs)(`div`,{className:`tr-levers`,children:[c,l,u]}),t[13]=c,t[14]=l,t[15]=u,t[16]=d):d=t[16],d}function Z(e){return`${e}%`}function Je(e){return e.pct===100}var Ye=(0,q.memo)(qe),Xe=(0,q.createContext)(null);function Ze(){return(0,q.useContext)(Xe)}function Qe(e){let t=(0,J.c)(19),{id:n,className:r}=e,i=Ze(),a,o,s,c,l,u;if(t[0]!==r||t[1]!==n||t[2]!==i){u=Symbol.for(`react.early_return_sentinel`);bb0:{let e=i?.registry.values.get(n);if(!e){u=null;break bb0}let d=`tr-num`+(r?` ${r}`:``);if(e.kind===`structure`){u=(0,Y.jsx)(`span`,{className:`${d} tr-num-qual`,"data-status":`structure`,children:e.resolution.raw});break bb0}a=`button`,o=d,s=ae(e),t[9]!==n||t[10]!==i?(c=e=>i?.open(n,e.currentTarget),t[9]=n,t[10]=i,t[11]=c):c=t[11],l=h(e)}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u}else a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8];if(u!==Symbol.for(`react.early_return_sentinel`))return u;let d;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Y.jsx)(`span`,{className:`tr-sr`,children:`, source available`}),t[12]=d):d=t[12];let f;return t[13]!==a||t[14]!==o||t[15]!==s||t[16]!==c||t[17]!==l?(f=(0,Y.jsxs)(`button`,{type:a,className:o,"data-status":s,onClick:c,children:[l,d]}),t[13]=a,t[14]=o,t[15]=s,t[16]=c,t[17]=l,t[18]=f):f=t[18],f}var Q=8,$e=6;function et(e,t,n){return Math.max(Q,Math.min(e,n-t-Q))}function tt(e,t,n){if(!(e.width>0||e.height>0||e.left>0||e.top>0))return{left:et((n.w-t.w)/2,t.w,n.w),top:et((n.h-t.h)/2,t.h,n.h)};let r=e.bottom+$e,i=e.top-$e-t.h,a=r+t.h+Q>n.h&&i>=Q;return{left:et(e.left,t.w,n.w),top:et(a?i:r,t.h,n.h)}}var $=320,nt=340,rt=8;function it(e){let t=(0,J.c)(64),{registry:n,valueId:r,anchorRect:i,trail:a,hinted:o,onMarkHinted:s,onDrill:l,onBack:u,onNavigate:d,onDismiss:f}=e,p=(0,q.useRef)(null),v;t[0]===f?v=t[1]:(v={onEscape:f},t[0]=f,t[1]=v),c(p,v);let[x]=(0,q.useState)(!o),S,C;t[2]===s?(S=t[3],C=t[4]):(S=()=>s(),C=[s],t[2]=s,t[3]=S,t[4]=C),(0,q.useEffect)(S,C);let w=(0,q.useRef)(!0),T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>{w.current||p.current?.focus({preventScroll:!0}),w.current=!1},t[5]=T):T=t[5];let E;t[6]===r?E=t[7]:(E=[r],t[6]=r,t[7]=E),(0,q.useEffect)(T,E);let D,O;t[8]===f?(D=t[9],O=t[10]):(D=()=>{let e=e=>{let t=p.current;t&&e.target instanceof Node&&!t.contains(e.target)&&f()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},O=[f],t[8]=f,t[9]=D,t[10]=O),(0,q.useEffect)(D,O);let k=n.values,A,j,M,N,P,F,I,L,R,z,B,V,H,U;if(t[11]!==i||t[12]!==u||t[13]!==l||t[14]!==d||t[15]!==n.usedIn||t[16]!==n.values||t[17]!==a||t[18]!==r){V=Symbol.for(`react.early_return_sentinel`);bb0:{if(U=k.get(r),!U){V=null;break bb0}let e=ae(U),o=U.scope,s=n.usedIn.get(r)??[],c=U.kind===`grounded`?U.resolution.receipt:null,f=U.kind===`grounded`&&U.resolution.tier===`T1`,v=c?.url?y(c.url):null,x=c?c.host??(c.url?b(c.url):null):null,S=U.kind===`calculated`?U.calc.inputs:[],C=S.slice(0,rt),w=S.length-C.length,T;t[33]!==n.values||t[34]!==a?(T=a.length>0?n.values.get(a[a.length-1]):void 0,t[33]=n.values,t[34]=a,t[35]=T):T=t[35];let E=T,D;t[36]===i?D=t[37]:(D=tt(i,{w:$,h:nt},{w:window.innerWidth,h:window.innerHeight}),t[36]=i,t[37]=D);let{left:O,top:W}=D;H=p,A=`tr-card`,j=`dialog`,M=`false`,N=`Where ${U.label} came from`,P=-1,t[38]!==O||t[39]!==W?(F={left:O,top:W,width:$,maxHeight:nt},t[38]=O,t[39]=W,t[40]=F):F=t[40];let G;t[41]!==u||t[42]!==E?(G=E&&(0,Y.jsxs)(`button`,{type:`button`,className:`tr-back`,onClick:u,"aria-label":`Back to ${E.label}`,children:[`‹ back`,(0,Y.jsxs)(`span`,{className:`tr-back-to`,children:[` to `,E.label]})]}),t[41]=u,t[42]=E,t[43]=G):G=t[43],I=(0,Y.jsxs)(`header`,{className:`tr-head`,children:[G,(0,Y.jsx)(`span`,{className:`tr-badge`,"data-status":e,children:_[e]}),(0,Y.jsx)(`p`,{className:`tr-figure`,children:h(U)}),(0,Y.jsx)(`p`,{className:`tr-label`,children:U.label})]}),L=c&&(0,Y.jsxs)(`section`,{className:`tr-sec`,children:[(0,Y.jsx)(`h3`,{className:`tr-sec-title`,children:`SOURCE`}),c.quote&&(0,Y.jsxs)(`blockquote`,{className:`tr-quote`,children:[`“`,c.quote,`”`]}),f?(0,Y.jsx)(`p`,{className:`tr-host`,children:m(c)}):x&&(0,Y.jsxs)(`p`,{className:`tr-host`,children:[v?(0,Y.jsx)(`a`,{href:v,target:`_blank`,rel:`noreferrer noopener`,children:x}):x,c.date&&(0,Y.jsxs)(`span`,{className:`tr-date`,children:[` · `,c.date]})]})]}),R=o&&(o.region||o.period||o.unit)&&(0,Y.jsxs)(`section`,{className:`tr-sec`,children:[(0,Y.jsx)(`h3`,{className:`tr-sec-title`,children:`SCOPE`}),(0,Y.jsx)(`p`,{className:`tr-chips`,children:[o.region,o.period,o.unit].filter(ot).map(at)})]}),z=U.kind===`calculated`&&(0,Y.jsxs)(`section`,{className:`tr-sec`,children:[(0,Y.jsx)(`h3`,{className:`tr-sec-title`,children:`CALCULATION`}),(0,Y.jsx)(`p`,{className:`tr-formula`,children:g(U.calc.formula,e=>n.values.get(e)?.label)}),(0,Y.jsx)(`ul`,{className:`tr-inputs`,children:C.map(e=>{let t=n.values.get(e);return(0,Y.jsx)(`li`,{children:t?(0,Y.jsxs)(`button`,{type:`button`,className:`tr-input`,onClick:()=>l(e),children:[(0,Y.jsx)(`span`,{className:`tr-input-label`,children:t.label}),(0,Y.jsx)(`span`,{className:`tr-input-val`,children:h(t)})]}):(0,Y.jsx)(`span`,{className:`tr-input tr-input-missing`,children:e})},e)})}),w>0&&(0,Y.jsxs)(`p`,{className:`tr-more`,children:[`…and `,w,` more`]}),U.calc.note&&(0,Y.jsx)(`p`,{className:`tr-note`,children:U.calc.note})]}),B=s.length>0&&(0,Y.jsxs)(`section`,{className:`tr-sec`,children:[(0,Y.jsx)(`h3`,{className:`tr-sec-title`,children:`USED IN`}),(0,Y.jsx)(`ul`,{className:`tr-used`,children:s.map(e=>(0,Y.jsx)(`li`,{children:d?(0,Y.jsx)(`button`,{type:`button`,className:`tr-usedin`,onClick:()=>d(e),children:e.label}):(0,Y.jsx)(`span`,{className:`tr-usedin tr-usedin-flat`,children:e.label})},`${e.surface}:${e.id}:${e.label}`))})]})}t[11]=i,t[12]=u,t[13]=l,t[14]=d,t[15]=n.usedIn,t[16]=n.values,t[17]=a,t[18]=r,t[19]=A,t[20]=j,t[21]=M,t[22]=N,t[23]=P,t[24]=F,t[25]=I,t[26]=L,t[27]=R,t[28]=z,t[29]=B,t[30]=V,t[31]=H,t[32]=U}else A=t[19],j=t[20],M=t[21],N=t[22],P=t[23],F=t[24],I=t[25],L=t[26],R=t[27],z=t[28],B=t[29],V=t[30],H=t[31],U=t[32];if(V!==Symbol.for(`react.early_return_sentinel`))return V;let W;t[44]!==U.kind||t[45]!==U.resolution?(W=U.kind===`illustrative`&&(0,Y.jsxs)(`p`,{className:`tr-caveat`,children:[`Illustrative — shows the shape, not a measured fact. `,U.resolution.illustrative]}),t[44]=U.kind,t[45]=U.resolution,t[46]=W):W=t[46];let G;t[47]===x?G=t[48]:(G=x&&(0,Y.jsx)(`p`,{className:`tr-hint`,children:`Any figure like this one opens its own receipt.`}),t[47]=x,t[48]=G);let ee;return t[49]!==A||t[50]!==j||t[51]!==M||t[52]!==N||t[53]!==P||t[54]!==F||t[55]!==I||t[56]!==L||t[57]!==R||t[58]!==z||t[59]!==B||t[60]!==W||t[61]!==G||t[62]!==H?(ee=(0,Y.jsxs)(`div`,{ref:H,className:A,role:j,"aria-modal":M,"aria-label":N,tabIndex:P,style:F,children:[I,L,R,z,B,W,G]}),t[49]=A,t[50]=j,t[51]=M,t[52]=N,t[53]=P,t[54]=F,t[55]=I,t[56]=L,t[57]=R,t[58]=z,t[59]=B,t[60]=W,t[61]=G,t[62]=H,t[63]=ee):ee=t[63],ee}function at(e){return(0,Y.jsx)(`span`,{className:`tr-chip`,children:e},e)}function ot(e){return!!e}function st(e){let t=(0,J.c)(23),{registry:n,onNavigate:r,children:i,ref:a}=e,[o,s]=(0,q.useState)(null),[c,l]=(0,q.useState)(!1),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>s(null),t[0]=u):u=t[0];let d;t[1]===n?d=t[2]:(d=[n],t[1]=n,t[2]=d),(0,q.useEffect)(u,d);let f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>s(null),t[3]=f):f=t[3];let p=f,m,h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>({dismiss:p}),h=[p],t[4]=m,t[5]=h):(m=t[4],h=t[5]),(0,q.useImperativeHandle)(a,m,h);let g;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=(e,t)=>{t.focus(),s({valueId:e,anchorRect:t.getBoundingClientRect(),trail:[]})},t[6]=g):g=t[6];let _=g,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>l(!0),t[7]=v):v=t[7];let y=v,b;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>{s(t=>t&&{valueId:e,anchorRect:t.anchorRect,trail:[...t.trail,t.valueId]})},t[8]=b):b=t[8];let x=b,S;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{s(ct)},t[9]=S):S=t[9];let C=S,w;t[10]!==c||t[11]!==r||t[12]!==n?(w={registry:n,open:_,onNavigate:r,hinted:c,markHinted:y},t[10]=c,t[11]=r,t[12]=n,t[13]=w):w=t[13];let T=w,E;t[14]!==o||t[15]!==c||t[16]!==r||t[17]!==n?(E=o&&(0,Y.jsx)(it,{registry:n,valueId:o.valueId,anchorRect:o.anchorRect,trail:o.trail,hinted:c,onMarkHinted:y,onDrill:x,onBack:C,onNavigate:r,onDismiss:p}),t[14]=o,t[15]=c,t[16]=r,t[17]=n,t[18]=E):E=t[18];let D;return t[19]!==i||t[20]!==E||t[21]!==T?(D=(0,Y.jsxs)(Xe.Provider,{value:T,children:[i,E]}),t[19]=i,t[20]=E,t[21]=T,t[22]=D):D=t[22],D}function ct(e){let t=e?.trail[e.trail.length-1];return!e||t===void 0?e:{valueId:t,anchorRect:e.anchorRect,trail:e.trail.slice(0,-1)}}var lt=`Recomputed locally from the causes above — a model of what would happen, never an observation.`,ut=`What was actually measured. This column never moves when a lever is pulled.`;function dt(e,t){return(e>0?`+`:``)+d(e,t)}function ft(e){return e!==null&&Number.isFinite(e)&&e>=0&&e<=1}function pt(e){return e.exactBase===null?`nothing measured stands behind this outcome`:`not every step is grounded, so the total stays unmeasured`}function mt(e){let t=(0,J.c)(22),{baseline:n,current:r,unit:i,active:a,observedNote:o}=e,s;t[0]!==n.exactBase||t[1]!==n.fullyGrounded||t[2]!==i?(s=n.fullyGrounded&&n.exactBase!==null?d(n.exactBase,i):null,t[0]=n.exactBase,t[1]=n.fullyGrounded,t[2]=i,t[3]=s):s=t[3];let c=s,l=r.exactBase??n.exactBase,u=a?`1`:void 0,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(`span`,{className:`tr-chip tr-wi-chip`,title:ut,children:`OBSERVED`}),t[4]=f):f=t[4];let p;t[5]!==n||t[6]!==c||t[7]!==o?(p=(0,Y.jsxs)(`div`,{className:`tr-wi-col`,children:[f,c===null?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`tr-wi-figure tr-wi-dash`,children:`—`}),(0,Y.jsx)(`p`,{className:`tr-wi-note tr-wi-why`,children:o??pt(n)})]}):(0,Y.jsx)(`p`,{className:`tr-wi-figure`,children:c})]}),t[5]=n,t[6]=c,t[7]=o,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==l||t[11]!==r.exactDelta||t[12]!==r.explainedPct||t[13]!==r.fullyGrounded||t[14]!==r.relBase||t[15]!==r.relCur||t[16]!==i?(m=a&&(0,Y.jsxs)(`div`,{className:`tr-wi-col tr-wi-hypo`,"data-world":`hypothetical`,children:[(0,Y.jsx)(`span`,{className:`tr-chip tr-wi-chip tr-wi-chip-hypo`,title:lt,children:`HYPOTHETICAL (MODELED)`}),r.fullyGrounded&&l!==null&&r.exactDelta!==null?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`tr-wi-figure`,children:d(l+r.exactDelta,i)}),(0,Y.jsx)(`p`,{className:`tr-wi-delta`,children:dt(r.exactDelta,i)}),ft(r.explainedPct)&&(0,Y.jsxs)(`p`,{className:`tr-wi-note`,children:[Math.round(r.explainedPct*100),`% explained`]})]}):r.relCur===null?(0,Y.jsx)(`p`,{className:`tr-wi-figure tr-wi-dash`,children:`—`}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`tr-wi-figure tr-wi-phrase`,children:le(r.relBase??0,r.relCur)}),(0,Y.jsx)(`p`,{className:`tr-wi-note`,children:`relative, not measured`})]})]}),t[9]=a,t[10]=l,t[11]=r.exactDelta,t[12]=r.explainedPct,t[13]=r.fullyGrounded,t[14]=r.relBase,t[15]=r.relCur,t[16]=i,t[17]=m):m=t[17];let h;return t[18]!==u||t[19]!==p||t[20]!==m?(h=(0,Y.jsxs)(`div`,{className:`tr-wi`,"data-active":u,children:[p,m]}),t[18]=u,t[19]=p,t[20]=m,t[21]=h):h=t[21],h}var ht=(0,q.memo)(mt);function gt(e){return{id:e.id,label:e.label,role:e.role,depth:e.depth,tier:e.tier,...e.value===void 0?{}:{value:e.value},...e.unit?{unit:e.unit}:{},...e.receipt?{receipt:e.receipt}:{}}}function _t(e){let t=e.receipts?.[0]??e.receipt;return{from:e.from,to:e.to,sign:e.sign,tier:e.tier,...e.verb?{verb:e.verb}:{},...e.weight===void 0?{}:{weight:e.weight},...t&&!e.provisional?{receipt:t}:{},...e.provisional?{provisional:!0}:{}}}function vt(e){return{center:e.title,outcomeId:e.outcomeId,nodes:e.nodes.map(gt),edges:e.edges.map(_t),provenance:{...e.provenance.illustrative?{illustrative:!0}:{},...e.provenance.notes?.length?{notes:e.provenance.notes}:{}}}}var yt=e=>`node:${e}`,bt=(e,t)=>`node:${e}@${t}`;function xt(e,t){let n=e.provenance.illustrative===!0,r=[],i=[],a=[],o=new Map,s=[],c=new Map,l=(e,t,n)=>{!e||o.has(e.id)||(o.set(e.id,e),s.push(t),i.push(n))},u=(e,t)=>{c.set(e.id,e.label),r.push({id:e.id,label:e.label,role:e.role,...e.detail===void 0?{}:{detail:e.detail},...e.domain===void 0?{}:{domain:e.domain},...t===void 0?{}:{parentId:t}});let i=e.series,a=e.unit??i?.unit,o=t=>({valueId:t,surface:`node`,id:e.id,label:e.label});if(e.value!==void 0){let t=yt(e.id);l(F(t,e.label,e.value,e.tier,a,e.receipt,n),o(t),{valueId:t,entityId:e.id})}if(i)for(let t of i.points){let r=bt(e.id,t.t),a=F(r,`${e.label} · ${t.t}`,t.value,i.tier,i.unit,t.receipt??i.receipt,n,t.t);l(a,o(r),{valueId:r,entityId:e.id,at:t.t})}for(let t of e.children??[])u(t,e.id)};for(let t of e.nodes)u(t);return B(e.edges).forEach((e,n)=>{let r=`${c.get(e.from)??e.from} ${e.verb??`→`} ${c.get(e.to)??e.to}`,i=t.edges[n]?.id;if(i!==void 0){a.push({id:i,from:e.from,to:e.to,...e.relation===void 0?{}:{kind:e.relation},...e.sign===void 0?{}:{sign:e.sign},...e.weight===void 0?{}:{weight:e.weight}});for(let t of[e.from,e.to])s.push({valueId:yt(t),surface:`edge`,id:i,label:r})}}),{title:e.title,entities:r,relations:a,facts:i,trust:I(o,s),outcomeId:e.outcomeId,...n?{illustrative:n}:{}}}var St=1100;function Ct(e,t,n,r){let i=!1,a=e=>{i||(i=!0,r(e))};(async()=>{for(let r=Math.max(0,t);r<e.length;r++){let t=e[r];if(!t)continue;if(n.isCancelled()){a(`cancelled`);return}let i=E(t.say),o=n.speakLine?.(t.say)??null,s=o?await T(o):!1;if(n.isCancelled()){a(`cancelled`);return}n.apply(t,r),o&&s?await O(o,i,St):await D(i)}a(n.isCancelled()?`cancelled`:`complete`)})()}function wt({beats:e,apply:t,speakLine:n}){let[r,i]=(0,q.useState)(-1),[a,o]=(0,q.useState)(!1),s=(0,q.useRef)(0),c=(0,q.useRef)(e);c.current=e;let l=(0,q.useRef)(t);l.current=t;let u=(0,q.useRef)(n);u.current=n;let d=(0,q.useCallback)(()=>{s.current+=1,o(!1)},[]),f=(0,q.useCallback)(e=>{let t=s.current+=1;o(!0),Ct(c.current,e,{speakLine:e=>u.current?.(e)??null,apply:(e,t)=>{i(t),l.current(e,t)},isCancelled:()=>s.current!==t},()=>{s.current===t&&o(!1)})},[]);(0,q.useEffect)(()=>()=>void(s.current+=1),[]),(0,q.useEffect)(()=>{s.current+=1,o(!1),i(-1)},[e]);let p=(0,q.useCallback)(()=>{if(a){d();return}let e=c.current.length;e!==0&&f(r>=0&&r<e-1?r:0)},[a,r,f,d]),m=(0,q.useCallback)(e=>{let t=c.current.length;t!==0&&f(Math.min(Math.max(e,0),t-1))},[f]),h=(0,q.useCallback)(()=>{d(),i(-1)},[d]);return{index:r,playing:a,caption:r>=0?e[r]?.caption??null:null,toggle:p,seek:m,reset:h}}function Tt(e){let t=(0,J.c)(33),{count:n,index:r,playing:i,caption:a,expanded:o,onToggle:s,onSeek:c,inviting:l}=e;if(n===0)return null;let u=Math.min(Math.max(r,-1),n-1),d=i?``:void 0,f=o?``:void 0,p=`${o?108:54}px`,m;t[0]===p?m=t[1]:(m={"--wo-transport-h":p},t[0]=p,t[1]=m);let h=m,g=l&&!i?``:void 0,_=i?`Pause the walkthrough`:`Walk me through it`,v=i?`❙❙`:`▶`,y;t[2]===v?y=t[3]:(y=(0,Y.jsx)(`span`,{className:`wo-play-glyph`,"aria-hidden":`true`,children:v}),t[2]=v,t[3]=y);let b=i?`Pause`:`Walk me through it`,x;t[4]===b?x=t[5]:(x=(0,Y.jsx)(`span`,{className:`wo-play-label`,children:b}),t[4]=b,t[5]=x);let S;t[6]!==s||t[7]!==x||t[8]!==g||t[9]!==_||t[10]!==y?(S=(0,Y.jsxs)(`button`,{type:`button`,className:`wo-play`,"data-inviting":g,onClick:s,"aria-label":_,children:[y,x]}),t[6]=s,t[7]=x,t[8]=g,t[9]=_,t[10]=y,t[11]=S):S=t[11];let C;t[12]!==l||t[13]!==i?(C=l&&!i&&(0,Y.jsx)(`span`,{className:`wo-play-aside`,children:`or press any cause`}),t[12]=l,t[13]=i,t[14]=C):C=t[14];let w;t[15]!==u||t[16]!==n||t[17]!==o||t[18]!==c?(w=o&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`wo-track`,role:`group`,"aria-label":`Walkthrough beats`,children:Array.from({length:n},(e,t)=>(0,Y.jsx)(`button`,{type:`button`,className:`wo-tick`,"data-state":t<u?`past`:t===u?`now`:`ahead`,onClick:()=>c(t),"aria-label":`Beat ${t+1} of ${n}`,"aria-current":t===u?`step`:void 0},t))}),(0,Y.jsxs)(`span`,{className:`wo-transport-count`,"aria-hidden":`true`,children:[u<0?n:u+1,`/`,n]})]}),t[15]=u,t[16]=n,t[17]=o,t[18]=c,t[19]=w):w=t[19];let T;t[20]!==S||t[21]!==C||t[22]!==w?(T=(0,Y.jsxs)(`div`,{className:`wo-transport-row`,children:[S,C,w]}),t[20]=S,t[21]=C,t[22]=w,t[23]=T):T=t[23];let E;t[24]!==a||t[25]!==o?(E=o&&(0,Y.jsx)(`p`,{className:`wo-caption`,"aria-live":`polite`,children:a===null?``:k(a)}),t[24]=a,t[25]=o,t[26]=E):E=t[26];let D;return t[27]!==d||t[28]!==T||t[29]!==E||t[30]!==f||t[31]!==h?(D=(0,Y.jsxs)(`div`,{className:`wo-transport`,"data-playing":d,"data-open":f,style:h,children:[T,E]}),t[27]=d,t[28]=T,t[29]=E,t[30]=f,t[31]=h,t[32]=D):D=t[32],D}var Et=170,Dt={contributes:`fed by`,causes:`driven by`,dampens:`held back by`,enables:`made possible by`,correlates:`moving together with`},Ot={1:`pushed up by`,[-1]:`pushed down by`};function kt(e){let t=e.split(` `,1)[0]??``;return t.length===0||/[A-Z]/.test(t.slice(1))?e:e[0].toLowerCase()+e.slice(1)}var At={graph:`And that is how the causes fit together.`,timeline:`And here are the same causes, in time.`,chart:`And here is what each one actually measured.`,flow:`And here is how much each one contributed.`,spheres:`And here are the kinds of force it is made of.`};function jt(e,t){let n=e.values.get(yt(t));if(!n||n.kind===`structure`)return null;let r=h(n);return n.kind===`illustrative`?{say:`Illustratively, about ${r}.`,shown:`Illustratively, about ${r}.`}:{say:`Measured at ${r}.`,shown:`Measured at ${r}.`}}function Mt(e){return e.kind?e.kind===`dampens`||e.kind===`enables`||e.kind===`correlates`:e.sign===-1}function Nt(e){return e.kind&&Dt[e.kind]?Dt[e.kind]:Ot[e.sign??1]??`fed by`}function Pt(e){let t=e.nodes.filter(e=>e.parentId===void 0),n=new Set(t.map(e=>e.id)),r=e.edges.filter(e=>n.has(e.from)&&n.has(e.to)),i=new Map(t.map(e=>[e.id,e.depth??0])),a=new Map;for(let e of r)a.set(e.from,(a.get(e.from)??0)+(e.weight??0));let o=new Map(t.map(e=>[e.id,0]));for(let e of r)o.set(e.to,(o.get(e.to)??0)+1);let s=(e,t)=>(i.get(e)??0)-(i.get(t)??0)||(a.get(t)??0)-(a.get(e)??0)||(e<t?-1:+(e>t)),c=t.filter(e=>o.get(e.id)===0).map(e=>e.id),l=[],u=new Set;for(;c.length>0;){c.sort(s);let e=c.shift();if(!(e===void 0||u.has(e))){u.add(e),l.push(e);for(let t of r){if(t.from!==e)continue;let n=(o.get(t.to)??0)-1;o.set(t.to,n),n<=0&&!u.has(t.to)&&c.push(t.to)}}}for(let e of t.map(e=>e.id).sort(s))u.has(e)||l.push(e);return l}function Ft(e,t,n,r={}){let i=Pt(t);if(i.length<2)return[];let a=new Map(e.nodes.map(e=>[e.id,e])),o=new Map(t.nodes.map(e=>[e.id,e.label])),s=new Map(i.map((e,t)=>[e,t])),c=e=>t.edges.filter(t=>t.to===e&&s.has(t.from)&&(s.get(t.from)??0)<(s.get(e)??0)).sort((e,t)=>(t.weight??0)-(e.weight??0)||(e.id<t.id?-1:1))[0],l=[],u=i.at(-1)===e.outcomeId?i.length-1:i.length,d=u===1?`One cause, one outcome. Here is how it connects.`:`${u} causes, one outcome. Here is how they connect.`;l.push({nodeId:e.outcomeId,wide:!0,rep:`graph`,say:d,caption:d});let f=null;for(let[t,r]of i.entries()){let s=a.get(r),u=o.get(r)??r,d=c(r),p=r===e.outcomeId&&t===i.length-1,m=d?o.get(d.from)??d.from:null,h;h=p?d?`And it ends here: ${kt(u)}, ${Nt(d)} ${d.from===f?`it`:kt(m??``)}.`:`And it ends here: ${kt(u)}.`:d?d.from===f?Mt(d)?`Then ${kt(u)}, ${Nt(d)} it.`:`Then ${kt(u)}.`:`${u}, ${Nt(d)} ${kt(m??``)}.`:t===0?`It starts with ${kt(u)}.`:`Alongside it: ${u}.`,f=r;let g=[h],_=[h],v=jt(n,r);v&&(g.push(v.say),_.push(v.shown));let y=s?.detail;y&&(g.push(w(S(y),Et)),_.push(w(C(y),Et))),l.push({nodeId:r,...d?{edgeId:d.id}:{},say:g.join(` `),caption:_.join(` `)})}if(r.closeOn){let t=At[r.closeOn];l.push({nodeId:e.outcomeId,wide:!0,rep:r.closeOn,say:t,caption:t})}return l}var It={economy:`var(--domain-economy)`,policy:`var(--domain-policy)`,technology:`var(--domain-technology)`,science:`var(--domain-science)`,environment:`var(--domain-environment)`,society:`var(--domain-society)`,health:`var(--domain-health)`,conflict:`var(--domain-conflict)`},Lt=.5;function Rt(e){let t=e.nodes.filter(e=>e.parentId===void 0);if(t.length===0)return null;let n=new Map;for(let e of t)e.domain!==void 0&&n.set(e.domain,(n.get(e.domain)??0)+1);if([...n.values()].reduce((e,t)=>e+t,0)/t.length<Lt)return null;let r=[...n.entries()].sort((e,t)=>t[1]-e[1]||(e[0]<t[0]?-1:1)).map(([e])=>It[e]).filter(e=>e!==void 0);return r.length===0?null:{air1:r[0],air2:r[1]??r[0]}}r();var zt=5,Bt=`wo-stage`,Vt=`an illustrative living answer measures nothing, so there is no baseline`;function Ht(e){if(e.length<2)return null;let t=e.reduce((e,t)=>Math.min(e,t.v),1/0),n=e.reduce((e,t)=>Math.max(e,t.v),-1/0)-t,r=e.length-1;return e.map((e,i)=>{let a=i/r*100,o=n===0?10:18-(e.v-t)/n*16;return`${i===0?`M`:`L`} ${Math.round(a*10)/10} ${Math.round(o*10)/10}`}).join(` `)}function Ut(e,t){return Wt(e,t)?.length??0}function Wt(e,t){for(let n of e){if(n.id===t)return n.children;let e=n.children===void 0?void 0:Wt(n.children,t);if(e)return e}}function Gt(e){let{value:t,...n}=e;return n}function Kt(e,t){let n=new Map;for(let[r,i]of e.relativeByNode){let e=t.relativeByNode.get(r)??0;i>0&&n.set(r,e/i)}return n}function qt(e,t,n,r){return{exactBase:n??null,exactDelta:e.outcomeDelta,explainedPct:e.explainedPct,fullyGrounded:e.fullyGrounded&&!r,relBase:t.relativeOutcome,relCur:e.relativeOutcome}}function Jt(e){let t=(0,J.c)(14),{spec:n,question:r,failed:i,onRetry:a,onClose:o,view:s,onExpandNode:c,autoWalk:l,speakLine:u}=e;if(n){let e;return t[0]!==l||t[1]!==o||t[2]!==c||t[3]!==u||t[4]!==n||t[5]!==s?(e=(0,Y.jsx)(Xt,{spec:n,view:s,onClose:o,onExpandNode:c,autoWalk:l,speakLine:u}),t[0]=l,t[1]=o,t[2]=c,t[3]=u,t[4]=n,t[5]=s,t[6]=e):e=t[6],e}let d;t[7]===r?d=t[8]:(d=r?v(r):``,t[7]=r,t[8]=d);let f=i===!0,p;return t[9]!==o||t[10]!==a||t[11]!==d||t[12]!==f?(p=(0,Y.jsx)(Yt,{title:d,failed:f,onRetry:a,onClose:o}),t[9]=o,t[10]=a,t[11]=d,t[12]=f,t[13]=p):p=t[13],p}function Yt(e){let t=(0,J.c)(17),{title:n,failed:r,onRetry:i,onClose:a}=e,o=`Living answer: ${n}`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Y.jsx)(`span`,{className:`wo-kicker`,children:`THE LIVING ANSWER`}),t[0]=s):s=t[0];let c;t[1]===n?c=t[2]:(c=(0,Y.jsxs)(`div`,{className:`wo-title`,children:[s,(0,Y.jsx)(`h2`,{children:n})]}),t[1]=n,t[2]=c);let l;t[3]===a?l=t[4]:(l=a&&(0,Y.jsx)(`div`,{className:`wo-head-actions`,children:(0,Y.jsx)(`button`,{type:`button`,className:`wo-btn wo-btn-close`,onClick:a,"aria-label":`Back to the answer`,children:`← Back to the answer`})}),t[3]=a,t[4]=l);let u;t[5]!==c||t[6]!==l?(u=(0,Y.jsxs)(`header`,{className:`wo-head`,children:[c,l]}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;t[8]!==r||t[9]!==i?(d=(0,Y.jsx)(`div`,{className:`wo-shell`,role:`status`,"aria-live":`polite`,children:r?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`wo-shell-line`,children:`This living answer didn’t come back.`}),(0,Y.jsx)(`p`,{className:`wo-shell-note`,children:`Nothing was built, and Mavéa won’t stand in a causal web it can’t source. The answer behind this card is untouched.`}),i&&(0,Y.jsx)(`button`,{type:`button`,className:`wo-btn`,onClick:i,children:`Try again`})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`wo-shell-ground`,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:`wo-shell-pulse`,"aria-hidden":`true`}),(0,Y.jsx)(`p`,{className:`wo-shell-line`,children:`Building your living answer…`}),(0,Y.jsx)(`p`,{className:`wo-shell-note`,children:`One model call, grounded in what this answer already found. Once it is built it is kept — re-opening it, and replaying this turn, costs nothing.`})]})}),t[8]=r,t[9]=i,t[10]=d):d=t[10];let f;t[11]!==u||t[12]!==d?(f=(0,Y.jsxs)(`div`,{className:`wo-panel`,children:[u,d]}),t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;return t[14]!==o||t[15]!==f?(p=(0,Y.jsx)(`section`,{className:`wo-scrim`,"aria-label":o,children:f}),t[14]=o,t[15]=f,t[16]=p):p=t[16],p}function Xt({spec:e,view:t,onClose:n,onExpandNode:r,autoWalk:c,speakLine:l}){let[u,d]=(0,q.useState)(()=>p(e.title));(0,q.useEffect)(()=>{f(e.title,u)},[e.title,u]);let[m,h]=(0,q.useState)(null),g=(0,q.useMemo)(()=>{if(u.size===0)return e;let t=e;for(let[e,n]of u)t=M(t,e,n);return t},[e,u]),_=g.provenance.illustrative===!0,y=(0,q.useMemo)(()=>V(g),[g]),b=(0,q.useMemo)(()=>xt(g,y),[g,y]),x=b.trust,S=(0,q.useMemo)(()=>vt(g),[g]),[C,w]=(0,q.useState)(()=>new Map),[T,E]=(0,q.useState)(null),[D,O]=(0,q.useState)(!1),k=(0,q.useMemo)(()=>[...C.values()].some(e=>e!==100),[C]),F=(0,q.useMemo)(()=>[...C].map(([e,t])=>({nodeId:e,pct:t/100})),[C]),I=(0,q.useMemo)(()=>ie(S,[]),[S]),R=(0,q.useMemo)(()=>ie(S,F),[S,F]),z=(0,q.useMemo)(()=>k?Kt(I,R):null,[k,I,R]),U=(0,q.useDeferredValue)(z),G=(0,q.useCallback)(e=>H(e,y),[y]),K=(0,q.useMemo)(()=>ee(y),[y]),te=(0,q.useMemo)(()=>{let e=g.nodes[0]?.tier;return e!==void 0&&g.nodes.every(t=>t.tier===e)?``:void 0},[g]),ne=(0,q.useMemo)(()=>Rt(y),[y]),J=t&&G(t)?t:void 0,ae=We({world:y,insetBottom:D?108:54,initialRep:J??W(y)}),{rep:oe,setRep:se,expandedIds:ce,toggleExpand:le,unfoldsOnStage:ue}=ae;(0,q.useEffect)(()=>{J&&se(J)},[J,se]);let fe=(0,q.useMemo)(()=>{let e=new Map(y.nodes.map(e=>[e.id,e.parentId])),t=new Map;for(let n of y.nodes){let r=n.id,i=new Set([r]),a=e.get(r);for(;a!==void 0&&!i.has(a);)i.add(a),r=a,a=e.get(r);t.set(n.id,r)}return t},[y]),pe=(0,q.useMemo)(()=>{let e=y.nodes.map(e=>{let t=Gt(e),n=U?.get(fe.get(e.id)??e.id),r=A(e.label);return{...t,label:r,...n===void 0?{}:{shift:n}}});return{...y,nodes:e}},[y,U,fe]),me=(0,q.useMemo)(()=>{let e=new Map,t=n=>{e.set(n.id,n);for(let e of n.children??[])t(e)};for(let e of g.nodes)t(e);return e},[g]),he=(0,q.useMemo)(()=>{let e=B(g.edges);return new Map(y.edges.map((t,n)=>[t.id,e[n]]))},[y,g]),ge=(0,q.useRef)(null),_e=(0,q.useCallback)(()=>ge.current?.dismiss(),[]),ve=(0,q.useCallback)(e=>{(e.surface===`node`||e.surface===`edge`)&&E({kind:e.surface,id:e.id})},[]),[ye,be]=(0,q.useState)(void 0),xe=K.find(e=>e!==`graph`),[Se,Ce]=(0,q.useState)([]);(0,q.useEffect)(()=>{let e=globalThis.requestIdleCallback,t=()=>Ce(Ft(g,y,x,xe?{closeOn:xe}:{}));if(typeof e==`function`){let n=e(t,{timeout:2e3});return()=>globalThis.cancelIdleCallback?.(n)}let n=setTimeout(t,1);return()=>clearTimeout(n)},[g,y,x,xe]);let{focusNode:we}=ae,Te=(0,q.useCallback)(e=>{e.rep&&se(e.rep),E({kind:`node`,id:e.nodeId}),be(e.edgeId),e.wide?we(null):e.rep||we(e.nodeId)},[we,se]),{index:Ee,playing:De,caption:Oe,toggle:ke,seek:je,reset:Me}=wt((0,q.useMemo)(()=>({beats:Se,apply:Te,...l?{speakLine:l}:{}}),[Se,Te,l]));(0,q.useEffect)(()=>{O(De||Ee>=0)},[De,Ee]);let Pe=(0,q.useRef)(!1);(0,q.useEffect)(()=>{typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches||!c||Pe.current||Se.length===0||(Pe.current=!0,ke())},[c,Se.length,ke]);let[Fe,Ie]=(0,q.useState)(!0),Le=(0,q.useCallback)(()=>Ie(!1),[]),X=(0,q.useCallback)(()=>{Me(),be(void 0)},[Me]),Re=(0,q.useRef)(n);Re.current=n;let ze=(0,q.useRef)(ke);ze.current=ke;let Be=(0,q.useRef)(X);Be.current=X,(0,q.useEffect)(()=>{let e=e=>{if(e.key===`Escape`){Be.current(),Re.current?.();return}(e.key===` `||e.key===`Spacebar`)&&(e.target?.closest(`button, input, select, textarea, [contenteditable="true"]`)||(e.preventDefault(),ze.current()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let Ve=(0,q.useCallback)(e=>{X(),E({kind:`node`,id:e.id})},[X]),He=(0,q.useCallback)(e=>{X(),E({kind:`edge`,id:e})},[X]),Ue=(0,q.useCallback)((e,t)=>{X(),w(n=>new Map(n).set(e,t))},[X]),Ge=(0,q.useCallback)(()=>{X(),w(new Map)},[X]),Ke=(0,q.useCallback)(e=>{!r||m!==null||(h(e),r(e,g).then(t=>{h(null);let n=t===null?void 0:Wt(t.nodes,e);n?.length&&(d(t=>new Map(t).set(e,n)),ue(e)?le(e):E({kind:`node`,id:e}))},()=>h(null)))},[r,ue,m,g,le]),qe=(0,q.useCallback)((e,t)=>{if(t===`entry`&&oe===`timeline`){let t=me.get(e.id),n=t?.date,r=t?.series?.points,i=n?.until!==void 0||(r?.length??0)>1,a=n?.t??r?.[0]?.t;return i||!a?null:(0,Y.jsx)(`span`,{className:`wo-when`,"data-said":e.dateGrounded?``:void 0,children:a})}if(t!==`card`)return null;let n=ce.has(e.id),i=Ut(g.nodes,e.id),a=i>0,o=Ht(e.series??[]),s=me.get(e.id),c=s?.value===void 0?s?.date:void 0,l=c===void 0||j(c.t)===null?null:c.until!==void 0&&j(c.until)!==null?`${c.t}–${c.until}`:c.t,u=a&&ue(e.id),d=!a&&r!==void 0,f=m===e.id,p=a&&!u?i:0;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Qe,{id:yt(e.id),className:`wo-num`}),e.shift!==void 0&&de(e.shift)!==null&&(0,Y.jsx)(`span`,{className:`wo-shift`,"data-dir":e.shift<1?`down`:`up`,children:de(e.shift)}),o!==null&&(0,Y.jsx)(`svg`,{className:`wo-trace`,viewBox:`0 0 100 20`,preserveAspectRatio:`none`,"aria-hidden":`true`,children:(0,Y.jsx)(`path`,{d:o,fill:`none`})}),l!==null&&(0,Y.jsx)(`span`,{className:`wo-when`,"data-said":e.dateGrounded?``:void 0,children:l}),p>0&&(0,Y.jsx)(`span`,{className:`wo-parts-count`,children:`${p} part${p===1?``:`s`}`}),(u||d)&&(0,Y.jsx)(`button`,{type:`button`,className:`wo-expand`,"aria-expanded":u?n:void 0,"aria-busy":f||void 0,disabled:f||d&&m!==null,"aria-label":`${u&&n?`Close`:`Break down`} ${e.label}`,onClick:t=>{t.stopPropagation(),u?le(e.id):Ke(e.id)},children:f?`breaking down…`:u&&n?`close`:`break down`})]})},[ue,g,me,ce,le,r,m,Ke,oe]),Z=me.get(g.outcomeId),Je=(0,q.useMemo)(()=>qt(I,I,Z?.value,_),[I,Z?.value,_]),Xe=(0,q.useMemo)(()=>qt(R,I,Z?.value,_),[R,I,Z?.value,_]),Ze=(0,q.useMemo)(()=>({causes:g.nodes.length,links:g.edges.length,sourced:g.nodes.filter(e=>e.receipt!==void 0).length}),[g]),Q=T?.kind===`node`?me.get(T.id):void 0,$e=(0,q.useMemo)(()=>Q===void 0?[]:L(b,Q.id),[b,Q]),[et,tt]=(0,q.useState)(null);(0,q.useEffect)(()=>{if(Q===void 0){tt(null);return}let e=!0;return(async()=>{let{hierarchyLens:t}=await i(async()=>{let{hierarchyLens:e}=await import(`./lens-Ba83fBmq.js`);return{hierarchyLens:e}},__vite__mapDeps([0,1,2,3]));if(!e)return;let n=t.compile(b,Q.id);if(n===null){tt(null);return}await a(o([n.block]));let r=s(n.block.type);e&&r&&tt({plan:n,render:r})})(),()=>{e=!1}},[b,Q]);let $=T?.kind===`edge`?he.get(T.id):void 0,nt=(0,q.useMemo)(()=>g.nodes.filter(e=>e.role===`root`).map(e=>({id:e.id,label:A(e.label),pct:C.get(e.id)??100})),[g.nodes,C]);return(0,Y.jsx)(st,{registry:x,onNavigate:ve,ref:ge,children:(0,Y.jsx)(`section`,{className:`wo-scrim`,"aria-label":`Living answer: ${v(g.title)}`,onPointerDownCapture:Le,onKeyDownCapture:Le,children:(0,Y.jsxs)(`div`,{className:`wo-panel`,children:[(0,Y.jsxs)(`header`,{className:`wo-head`,children:[(0,Y.jsxs)(`div`,{className:`wo-title`,children:[(0,Y.jsx)(`span`,{className:`wo-kicker`,children:`THE LIVING ANSWER`}),(0,Y.jsx)(`h2`,{children:v(g.title)})]}),(0,Y.jsxs)(`div`,{className:`wo-head-actions`,children:[K.length===1?(0,Y.jsx)(`span`,{className:`wo-chip wo-chip-sole`,children:Ne[K[0]].chip}):(0,Y.jsx)(`div`,{className:`wo-views`,role:`tablist`,"aria-label":`View`,children:K.slice(0,zt).map((e,t,n)=>(0,Y.jsx)(`button`,{type:`button`,id:`wo-tab-${e}`,className:`wo-chip`,role:`tab`,"aria-selected":oe===e,"aria-controls":Bt,tabIndex:oe===e?0:-1,onKeyDown:e=>{let r=e.key===`ArrowRight`?1:e.key===`ArrowLeft`?-1:0;if(r===0)return;e.preventDefault();let i=n[(t+r+n.length)%n.length];X(),se(i),document.getElementById(`wo-tab-${i}`)?.focus()},onClick:()=>{X(),se(e)},children:Ne[e].chip},e))}),(0,Y.jsx)(`button`,{type:`button`,className:`wo-btn`,onClick:Ge,disabled:!k,children:`Reset`}),n&&(0,Y.jsx)(`button`,{type:`button`,className:`wo-btn wo-btn-close`,onClick:n,"aria-label":`Back to the answer`,children:`← Back to the answer`})]})]}),_&&(0,Y.jsx)(`div`,{className:`wo-banner wo-banner-illustrative`,children:`Illustrative model — shows the shape, not your numbers.`}),(0,Y.jsxs)(`p`,{className:`wo-legend`,"aria-live":`polite`,children:[(0,Y.jsxs)(`span`,{className:`wo-legend-view`,children:[Ne[oe].caption,`.`]}),` `,Ne[oe].legend]}),(0,Y.jsxs)(`div`,{className:`wo-body`,children:[(0,Y.jsxs)(`div`,{className:`wo-stage`,id:Bt,role:K.length>1?`tabpanel`:void 0,"aria-labelledby":K.length>1?`wo-tab-${oe}`:void 0,"data-uniform-tier":te,"data-illustrative":_?``:void 0,onWheelCapture:_e,onPointerDownCapture:_e,style:ne===null?void 0:{"--wo-air-1":ne.air1,"--wo-air-2":ne.air2},children:[(0,Y.jsx)(Ae,{stage:ae,world:pe,renderFace:qe,onNodeClick:Ve,onEdgeClick:He,selectedId:T?.kind===`node`?T.id:void 0,litEdgeId:ye}),(0,Y.jsx)(Tt,{count:Se.length,index:Ee,playing:De,caption:Oe,expanded:D,onToggle:ke,onSeek:je,inviting:Fe})]}),(0,Y.jsxs)(`aside`,{className:`wo-rail`,children:[(0,Y.jsx)(Ye,{levers:nt,onSet:Ue,onReset:Ge}),(0,Y.jsx)(ht,{baseline:Je,current:Xe,unit:Z?.unit,active:k,observedNote:_?Vt:void 0}),(0,Y.jsxs)(`div`,{className:`wo-detail`,children:[(0,Y.jsx)(`span`,{className:`wo-rail-kicker`,children:`EVIDENCE`}),!T&&(0,Y.jsxs)(`div`,{className:`wo-standing`,children:[(0,Y.jsxs)(`p`,{className:`wo-invite`,children:[`Press `,(0,Y.jsx)(`strong`,{children:`Walk me through it`}),` and Mavéa takes you cause by cause — free, and as often as you like.`]}),(0,Y.jsx)(`p`,{className:`wo-hint`,children:`Or tap any cause or link to see what stands behind it.`}),(0,Y.jsxs)(`dl`,{className:`wo-facts`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{children:`Causes`}),(0,Y.jsx)(`dd`,{children:Ze.causes})]}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{children:`Links`}),(0,Y.jsx)(`dd`,{children:Ze.links})]}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{children:_?`Illustrative`:`With a source`}),(0,Y.jsx)(`dd`,{children:_?`every cause`:Ze.sourced})]})]}),Z&&(0,Y.jsxs)(`p`,{className:`wo-standing-outcome`,children:[(0,Y.jsx)(`span`,{className:`wo-standing-lead`,children:`It ends at`}),` `,Z.label,Z.detail?(0,Y.jsx)(`span`,{className:`wo-standing-note`,children:Z.detail}):null]}),(0,Y.jsx)(`p`,{className:`wo-hint`,children:`Turn a root cause down and the rest of the web re-weights — nothing is re-computed by a model, and no projected number is invented.`})]}),Q&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`h3`,{className:`wo-detail-title`,children:Q.label}),Q.detail&&(0,Y.jsx)(`p`,{className:`wo-detail-note`,children:Q.detail}),(0,Y.jsx)(`p`,{className:`wo-detail-figure`,children:(0,Y.jsx)(Qe,{id:yt(Q.id)})}),Q.series&&(0,Y.jsx)(`ul`,{className:`wo-series`,children:Q.series.points.map((e,t)=>(0,Y.jsxs)(`li`,{children:[(0,Y.jsx)(`span`,{className:`wo-series-t`,children:e.t}),(0,Y.jsx)(Qe,{id:bt(Q.id,e.t)})]},`${e.t}:${t}`))}),(et||$e.length>0)&&(0,Y.jsxs)(`div`,{className:`wo-parts`,children:[(0,Y.jsx)(`span`,{className:`wo-rail-kicker`,children:`WHAT THIS IS MADE OF`}),et?et.render(et.plan.block.props,{delay:0}):(0,Y.jsx)(`ul`,{className:`wo-part-list`,children:$e.map(e=>(0,Y.jsx)(`li`,{children:A(e.label)},e.id))})]})]}),$&&(0,Y.jsx)(re,{relation:P($.relation),sign:$.sign,status:$.status??N($),receipts:$.receipts??($.receipt?[$.receipt]:[]),counter:$.counter,provisional:$.provisional})]})]})]})]})})})}export{Jt as WorldOverlay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./compiler-runtime-qQQXpJgv.js";import{t}from"./jsx-runtime-DeHZSEgm.js";import{ot as n}from"./index-CKRjGbeR.js";import{t as r}from"./Orb-D8lhTdmY.js";var i=e(),a=t();function o(e){let t=(0,i.c)(17),{reverse:n,eyebrow:r,eyebrowTone:o,title:s,body:c,visual:l}=e,u=`fl-panel`+(n?` reverse`:``),d=`fl-panel-eyebrow tone-`+o,f;t[0]!==r||t[1]!==d?(f=(0,a.jsx)(`div`,{className:d,children:r}),t[0]=r,t[1]=d,t[2]=f):f=t[2];let p;t[3]===s?p=t[4]:(p=(0,a.jsx)(`h3`,{className:`fl-panel-title`,children:s}),t[3]=s,t[4]=p);let m;t[5]===c?m=t[6]:(m=(0,a.jsx)(`p`,{className:`fl-panel-body`,children:c}),t[5]=c,t[6]=m);let h;t[7]!==f||t[8]!==p||t[9]!==m?(h=(0,a.jsxs)(`div`,{className:`fl-panel-copy`,children:[f,p,m]}),t[7]=f,t[8]=p,t[9]=m,t[10]=h):h=t[10];let g;t[11]===l?g=t[12]:(g=(0,a.jsx)(`div`,{className:`fl-panel-visual`,children:l}),t[11]=l,t[12]=g);let _;return t[13]!==u||t[14]!==h||t[15]!==g?(_=(0,a.jsxs)(`div`,{className:u,children:[h,g]}),t[13]=u,t[14]=h,t[15]=g,t[16]=_):_=t[16],_}var s=[`46%`,`52%`,`50%`,`58%`,`74%`,`100%`],c=[[24,72],[98,98],[173,116],[247,98],[322,66],[396,36]],l=[`Q1`,`Q2`,`Q3`,`Q4`,`Q5`,`Q6`];function u(){let e=(0,i.c)(12),t,n,r,o,s,u,m,h,g;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)){let i=c.map(p).join(` `);u=`fl-card fl-pen`,m=(0,a.jsxs)(`div`,{className:`fl-pen-head`,children:[(0,a.jsx)(`span`,{className:`fl-ink-label`,children:`Revenue · the road back`}),(0,a.jsxs)(`span`,{className:`fl-pen-value`,children:[`$4.2M`,(0,a.jsx)(`i`,{className:`fl-pen-delta`,children:`▲ recovering`})]})]}),t=`fl-pen-plot`,n=`0 0 420 184`,r=`true`,o=(0,a.jsx)(`defs`,{children:(0,a.jsxs)(`linearGradient`,{id:`fl-pen-fill`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,a.jsx)(`stop`,{offset:`0`,className:`fl-pen-fill-top`}),(0,a.jsx)(`stop`,{offset:`1`,className:`fl-pen-fill-bot`})]})}),s=(0,a.jsxs)(`g`,{className:`fl-pen-grid`,children:[(0,a.jsx)(`line`,{x1:`24`,y1:`48`,x2:`396`,y2:`48`}),(0,a.jsx)(`line`,{x1:`24`,y1:`84`,x2:`396`,y2:`84`}),(0,a.jsx)(`line`,{x1:`24`,y1:`120`,x2:`396`,y2:`120`}),(0,a.jsx)(`line`,{x1:`24`,y1:`150`,x2:`396`,y2:`150`,className:`base`})]}),h=(0,a.jsx)(`path`,{className:`fl-pen-area`,d:`M${i.replace(/ /g,` L`)} L396,150 L24,150 Z`}),g=(0,a.jsx)(`polyline`,{className:`fl-pen-line`,points:i}),e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s,e[5]=u,e[6]=m,e[7]=h,e[8]=g}else t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],u=e[5],m=e[6],h=e[7],g=e[8];let _;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,a.jsx)(`g`,{className:`fl-pen-dots`,children:c.map(f)}),e[9]=_):_=e[9];let v;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,a.jsxs)(`svg`,{className:t,viewBox:n,"aria-hidden":r,children:[o,s,h,g,_,(0,a.jsx)(`g`,{className:`fl-pen-axis`,children:l.map(d)}),(0,a.jsx)(`path`,{className:`fl-pen-trend`,pathLength:1,d:`M166,126 C232,122 300,86 384,44 M384,44 l-13,1 m13,-1 l-3,12`}),(0,a.jsx)(`path`,{className:`fl-pen-star`,pathLength:1,d:`M396,18 L399,26 L407,26 L401,32 L403,40 L396,35 L389,40 L391,32 L385,26 L393,26 Z`})]}),e[10]=v):v=e[10];let y;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,a.jsxs)(`div`,{className:u,children:[m,v,(0,a.jsxs)(`div`,{className:`fl-pen-options`,children:[(0,a.jsxs)(`span`,{className:`fl-pen-chip`,children:[`Cut marketing`,(0,a.jsx)(`svg`,{viewBox:`0 0 120 26`,preserveAspectRatio:`none`,"aria-hidden":`true`,className:`fl-pen-strike`,children:(0,a.jsx)(`path`,{pathLength:1,d:`M5,15 C34,10 74,18 115,10`})})]}),(0,a.jsx)(`span`,{className:`fl-pen-chip kept`,children:`Raise prices ✓`})]})]}),e[11]=y):y=e[11],y}function d(e,t){return(0,a.jsx)(`text`,{x:c[t][0],y:`172`,children:e},e)}function f(e,t){let[n,r]=e;return(0,a.jsx)(`circle`,{cx:n,cy:r,r:`3.2`},t)}function p(e){let[t,n]=e;return`${t},${n}`}var m=[{id:`bars`,d:`M6,26 V14 M14,26 V6 M22,26 V18`,label:`chart`},{id:`line`,d:`M4,24 L11,14 L18,18 L26,6`,label:`trend`},{id:`donut`,d:`M14,4 A10,10 0 1 1 4,14`,label:`share`},{id:`pin`,d:`M14,4 a8,8 0 0 1 8,8 c0,6 -8,14 -8,14 s-8,-8 -8,-14 a8,8 0 0 1 8,-8`,label:`map`},{id:`steps`,d:`M4,24 H12 V16 H20 V8 H26`,label:`timeline`},{id:`net`,d:`M6,22 L14,8 L24,20 M6,22 L24,20`,label:`network`},{id:`gauge`,d:`M4,22 A11,11 0 0 1 26,22 M15,22 L21,12`,label:`gauge`},{id:`rows`,d:`M5,8 H25 M5,15 H25 M5,22 H17`,label:`table`}];function h(){return(0,a.jsx)(`div`,{className:`fl-card fl-instruments`,children:m.map((e,t)=>(0,a.jsxs)(`span`,{className:`fl-instrument`,style:{"--in-i":String(t)},children:[(0,a.jsx)(`svg`,{viewBox:`0 0 30 30`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:e.d})}),e.label]},e.id))})}function g(){let e=(0,i.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`div`,{className:`fl-ink-label`,children:`Revenue · last 6 quarters`}),e[0]=t):t=e[0];let n,r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsx)(`div`,{className:`fl-ink-bars`,children:s.map(_)}),r=(0,a.jsx)(`span`,{className:`fl-hl-sweep`}),e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,a.jsxs)(`div`,{className:`fl-card fl-ink`,children:[t,(0,a.jsxs)(`div`,{className:`fl-ink-plot`,children:[n,r,(0,a.jsxs)(`span`,{className:`fl-hl-chip`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M3 21l3.2-.9L18 8.3l-2.3-2.3L4 17.6 3 21z M14.7 7l2.3 2.3`})}),`Ask about this`]})]})]}),e[3]=o):o=e[3],o}function _(e,t){return(0,a.jsx)(`div`,{className:`fl-ink-barcol`,children:(0,a.jsx)(`div`,{className:`fl-ink-bar`+(e===`100%`?` peak`:``),style:{height:e}})},t)}function v(){return(0,a.jsxs)(`div`,{className:`fl-card fl-ghostwrap`,children:[(0,a.jsxs)(`div`,{className:`fl-ghost-said`,children:[(0,a.jsx)(`span`,{className:`fl-wave`,"aria-hidden":`true`,children:Array.from({length:12},(e,t)=>(0,a.jsx)(`i`,{style:{"--i":String(t)}},t))}),(0,a.jsxs)(`span`,{className:`fl-ghost-words`,children:[`“…and how does that compare to last year, and`,(0,a.jsx)(`span`,{className:`fl-caret`}),`”`]})]}),(0,a.jsxs)(`div`,{className:`fl-ghost-cards`,children:[(0,a.jsxs)(`div`,{className:`fl-ghost`,children:[(0,a.jsx)(`div`,{className:`fl-ghost-tag`,children:`Forming…`}),(0,a.jsxs)(`div`,{className:`fl-ghost-bars`,children:[(0,a.jsx)(`i`,{style:{height:`50%`}}),(0,a.jsx)(`i`,{style:{height:`80%`}}),(0,a.jsx)(`i`,{style:{height:`65%`}})]})]}),(0,a.jsxs)(`div`,{className:`fl-ghost delay`,children:[(0,a.jsx)(`div`,{className:`fl-ghost-tag`,children:`Forming…`}),(0,a.jsx)(`svg`,{viewBox:`0 0 120 50`,"aria-hidden":`true`,children:(0,a.jsx)(`polyline`,{points:`0,42 24,30 48,34 72,18 96,22 120,8`})})]})]})]})}var y=[{label:`Runway: 14mo`,meta:`4×`,x:92,y:52,tone:`blue`},{label:`Hiring freeze`,meta:`a worry`,x:86,y:200,tone:`amber`},{label:`Ship velocity`,meta:`slowing`,x:300,y:204,tone:`amber`},{label:`Churn signal`,meta:`watch`,x:300,y:50,tone:`pink`},{label:`Pricing`,meta:`your idea`,x:206,y:226,tone:`green`}],b=[[0,3],[3,2],[1,4],[4,2],[0,1]];function x(){let e=(0,i.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`svg`,{className:`fl-mindmap-links`,viewBox:`0 0 420 264`,"aria-hidden":`true`,children:b.map(C)}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsxs)(`div`,{className:`fl-card fl-mindmap`,children:[t,(0,a.jsx)(`div`,{className:`fl-mindmap-hub`,children:(0,a.jsx)(r,{size:46})}),y.map(S)]}),e[1]=n):n=e[1],n}function S(e){return(0,a.jsxs)(`div`,{className:`fl-node tone-`+e.tone,style:{left:`${e.x/420*100}%`,top:`${e.y/264*100}%`},children:[(0,a.jsx)(`div`,{className:`fl-node-label`,children:e.label}),(0,a.jsx)(`div`,{className:`fl-node-meta`,children:e.meta})]},e.label)}function C(e,t){let[n,r]=e,i=y[n],o=y[r],s=(i.x+o.x)/2,c=(i.y+o.y)/2-20;return(0,a.jsx)(`path`,{d:`M${i.x},${i.y} Q${s},${c} ${o.x},${o.y}`},t)}var w=[{icon:`⌨`,label:`Type it`},{icon:`🎙`,label:`Say it`},{icon:`▦`,label:`Drag a card`}];function T(){let e=(0,i.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`span`,{className:`fl-blank-num good`,children:`$2.1M`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsxs)(`span`,{className:`fl-blank-hole`,children:[`your burn / mo`,(0,a.jsx)(`span`,{className:`fl-caret`})]}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsxs)(`div`,{className:`fl-blank-sentence`,children:[`With `,t,` in the bank and a burn of`,` `,n,`, your runway is `,(0,a.jsx)(`span`,{className:`fl-blank-pending`,children:`— months`}),`.`]}),e[2]=r):r=e[2];let o;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,a.jsxs)(`div`,{className:`fl-card fl-blank`,children:[r,(0,a.jsx)(`div`,{className:`fl-blank-options`,"aria-hidden":`true`,children:w.map(E)})]}),e[3]=o):o=e[3],o}function E(e){return(0,a.jsxs)(`span`,{className:`fl-blank-btn`,children:[(0,a.jsx)(`span`,{className:`fl-blank-icon`,children:e.icon}),e.label]},e.label)}var D=[`“ARR climbed to $15.1M — up 21%.”`,`“The trend held steady all quarter.”`,`“North America still leads, at 54%.”`];function O(){return(0,a.jsxs)(`div`,{className:`fl-card fl-walk`,children:[(0,a.jsx)(`div`,{className:`fl-ink-label`,children:`Q3 revenue · read to you`}),(0,a.jsxs)(`div`,{className:`fl-walk-stage`,children:[(0,a.jsxs)(`div`,{className:`fl-walk-presenter`,children:[(0,a.jsx)(r,{size:44,className:`fl-walk-orb`}),(0,a.jsxs)(`div`,{className:`fl-walk-say`,children:[(0,a.jsx)(`span`,{className:`fl-wave`,"aria-hidden":`true`,children:Array.from({length:8},(e,t)=>(0,a.jsx)(`i`,{style:{"--i":String(t)}},t))}),(0,a.jsx)(`span`,{className:`fl-walk-caps`,children:D.map((e,t)=>(0,a.jsx)(`span`,{className:`fl-walk-line l${t+1}`,children:e},e))})]})]}),(0,a.jsxs)(`div`,{className:`fl-walk-items`,children:[(0,a.jsxs)(`div`,{className:`fl-walk-item`,children:[(0,a.jsx)(`span`,{className:`fl-walk-k`,children:`ARR`}),(0,a.jsx)(`span`,{className:`fl-walk-v`,children:`$15.1M`}),(0,a.jsx)(`span`,{className:`fl-walk-up`,children:`▲ 21%`})]}),(0,a.jsx)(`div`,{className:`fl-walk-item`,children:(0,a.jsx)(`svg`,{className:`fl-walk-spark`,viewBox:`0 0 120 26`,"aria-hidden":`true`,children:(0,a.jsx)(`polyline`,{points:`2,20 22,17 42,19 62,11 82,13 100,6 118,3`})})}),(0,a.jsxs)(`div`,{className:`fl-walk-item`,children:[(0,a.jsx)(`span`,{className:`fl-walk-k`,children:`N. America`}),(0,a.jsx)(`span`,{className:`fl-walk-v`,children:`54%`})]}),(0,a.jsx)(`span`,{className:`fl-walk-spot`,"aria-hidden":`true`})]})]}),(0,a.jsx)(`div`,{className:`fl-seen-note`,children:`Illustrative numbers`})]})}function k(){let e=(0,i.c)(8),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsxs)(n,{eyebrow:`Things a chat window can’t do`,children:[`It’s a `,(0,a.jsx)(`em`,{children:`friend at the whiteboard.`})]}),e[0]=t):t=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsx)(o,{eyebrow:`Highlight is the interface`,eyebrowTone:`presence`,title:`Highlight the answer to ask.`,body:`Drag across a bar, a row, a figure — the highlight grabs exactly what’s under it, and your next question is grounded on that piece, not the whole answer.`,visual:(0,a.jsx)(g,{})}),e[1]=r):r=e[1];let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,a.jsx)(o,{reverse:!0,eyebrow:`And the pen is in its hand`,eyebrowTone:`amber`,title:`It draws on its own answers.`,body:`A trend arrow along the recovery, a star on the number that matters, a strike through the option it rules out — the whiteboard marks a good teacher leaves.`,visual:(0,a.jsx)(u,{})}),e[2]=s):s=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,a.jsx)(o,{eyebrow:`It answers while you talk`,eyebrowTone:`blue`,title:`The answer forms mid-sentence.`,body:`Dashed “ghost” cards sketch the answer taking shape behind your words — and reshape live as your question turns. You see it thinking with you, not after you.`,visual:(0,a.jsx)(v,{})}),e[3]=c):c=e[3];let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,a.jsx)(o,{reverse:!0,eyebrow:`Watch it map your thinking`,eyebrowTone:`green`,title:`Ramble. Get a map of your mind.`,body:`Themes emerge from what you actually said — never fixed buckets — with the tensions between them drawn in. A minute of talking becomes a structure you can see.`,visual:(0,a.jsx)(x,{})}),e[4]=l):l=e[4];let d;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,a.jsx)(o,{eyebrow:`The Blank Space`,eyebrowTone:`pink`,title:`It won’t guess. It leaves a space.`,body:`When an answer needs a number only you have, Mavéa leaves a glowing hole to fill — type it, say it, or drag a card in. Uncertainty, made honest and interactive.`,visual:(0,a.jsx)(T,{})}),e[5]=d):d=e[5];let f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,a.jsx)(o,{reverse:!0,eyebrow:`One canvas, many instruments`,eyebrowTone:`presence`,title:`The answer picks its shape.`,body:`Charts, maps, timelines, networks, tables — hundreds of visual instruments on one canvas, and each answer reaches for the ones that fit.`,visual:(0,a.jsx)(h,{})}),e[6]=f):f=e[6];let p;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,a.jsxs)(a.Fragment,{children:[t,(0,a.jsxs)(`div`,{className:`fl-panels`,children:[r,s,c,l,d,f,(0,a.jsx)(o,{eyebrow:`It reads the answer to you`,eyebrowTone:`presence`,title:`It points, and talks you through.`,body:`Mavéa doesn’t drop a wall of cards and leave. It spotlights each part and speaks to it — walking you through the answer a piece at a time, the way a friend at the whiteboard would.`,visual:(0,a.jsx)(O,{})})]})]}),e[7]=p):p=e[7],p}export{k as WowFeatures};
|
|
1
|
+
import{t as e}from"./compiler-runtime-qQQXpJgv.js";import{t}from"./jsx-runtime-DeHZSEgm.js";import{ot as n}from"./index-BMeoXWPR.js";import{t as r}from"./Orb-D8lhTdmY.js";var i=e(),a=t();function o(e){let t=(0,i.c)(17),{reverse:n,eyebrow:r,eyebrowTone:o,title:s,body:c,visual:l}=e,u=`fl-panel`+(n?` reverse`:``),d=`fl-panel-eyebrow tone-`+o,f;t[0]!==r||t[1]!==d?(f=(0,a.jsx)(`div`,{className:d,children:r}),t[0]=r,t[1]=d,t[2]=f):f=t[2];let p;t[3]===s?p=t[4]:(p=(0,a.jsx)(`h3`,{className:`fl-panel-title`,children:s}),t[3]=s,t[4]=p);let m;t[5]===c?m=t[6]:(m=(0,a.jsx)(`p`,{className:`fl-panel-body`,children:c}),t[5]=c,t[6]=m);let h;t[7]!==f||t[8]!==p||t[9]!==m?(h=(0,a.jsxs)(`div`,{className:`fl-panel-copy`,children:[f,p,m]}),t[7]=f,t[8]=p,t[9]=m,t[10]=h):h=t[10];let g;t[11]===l?g=t[12]:(g=(0,a.jsx)(`div`,{className:`fl-panel-visual`,children:l}),t[11]=l,t[12]=g);let _;return t[13]!==u||t[14]!==h||t[15]!==g?(_=(0,a.jsxs)(`div`,{className:u,children:[h,g]}),t[13]=u,t[14]=h,t[15]=g,t[16]=_):_=t[16],_}var s=[`46%`,`52%`,`50%`,`58%`,`74%`,`100%`],c=[[24,72],[98,98],[173,116],[247,98],[322,66],[396,36]],l=[`Q1`,`Q2`,`Q3`,`Q4`,`Q5`,`Q6`];function u(){let e=(0,i.c)(12),t,n,r,o,s,u,m,h,g;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)){let i=c.map(p).join(` `);u=`fl-card fl-pen`,m=(0,a.jsxs)(`div`,{className:`fl-pen-head`,children:[(0,a.jsx)(`span`,{className:`fl-ink-label`,children:`Revenue · the road back`}),(0,a.jsxs)(`span`,{className:`fl-pen-value`,children:[`$4.2M`,(0,a.jsx)(`i`,{className:`fl-pen-delta`,children:`▲ recovering`})]})]}),t=`fl-pen-plot`,n=`0 0 420 184`,r=`true`,o=(0,a.jsx)(`defs`,{children:(0,a.jsxs)(`linearGradient`,{id:`fl-pen-fill`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,a.jsx)(`stop`,{offset:`0`,className:`fl-pen-fill-top`}),(0,a.jsx)(`stop`,{offset:`1`,className:`fl-pen-fill-bot`})]})}),s=(0,a.jsxs)(`g`,{className:`fl-pen-grid`,children:[(0,a.jsx)(`line`,{x1:`24`,y1:`48`,x2:`396`,y2:`48`}),(0,a.jsx)(`line`,{x1:`24`,y1:`84`,x2:`396`,y2:`84`}),(0,a.jsx)(`line`,{x1:`24`,y1:`120`,x2:`396`,y2:`120`}),(0,a.jsx)(`line`,{x1:`24`,y1:`150`,x2:`396`,y2:`150`,className:`base`})]}),h=(0,a.jsx)(`path`,{className:`fl-pen-area`,d:`M${i.replace(/ /g,` L`)} L396,150 L24,150 Z`}),g=(0,a.jsx)(`polyline`,{className:`fl-pen-line`,points:i}),e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s,e[5]=u,e[6]=m,e[7]=h,e[8]=g}else t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],u=e[5],m=e[6],h=e[7],g=e[8];let _;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,a.jsx)(`g`,{className:`fl-pen-dots`,children:c.map(f)}),e[9]=_):_=e[9];let v;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,a.jsxs)(`svg`,{className:t,viewBox:n,"aria-hidden":r,children:[o,s,h,g,_,(0,a.jsx)(`g`,{className:`fl-pen-axis`,children:l.map(d)}),(0,a.jsx)(`path`,{className:`fl-pen-trend`,pathLength:1,d:`M166,126 C232,122 300,86 384,44 M384,44 l-13,1 m13,-1 l-3,12`}),(0,a.jsx)(`path`,{className:`fl-pen-star`,pathLength:1,d:`M396,18 L399,26 L407,26 L401,32 L403,40 L396,35 L389,40 L391,32 L385,26 L393,26 Z`})]}),e[10]=v):v=e[10];let y;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,a.jsxs)(`div`,{className:u,children:[m,v,(0,a.jsxs)(`div`,{className:`fl-pen-options`,children:[(0,a.jsxs)(`span`,{className:`fl-pen-chip`,children:[`Cut marketing`,(0,a.jsx)(`svg`,{viewBox:`0 0 120 26`,preserveAspectRatio:`none`,"aria-hidden":`true`,className:`fl-pen-strike`,children:(0,a.jsx)(`path`,{pathLength:1,d:`M5,15 C34,10 74,18 115,10`})})]}),(0,a.jsx)(`span`,{className:`fl-pen-chip kept`,children:`Raise prices ✓`})]})]}),e[11]=y):y=e[11],y}function d(e,t){return(0,a.jsx)(`text`,{x:c[t][0],y:`172`,children:e},e)}function f(e,t){let[n,r]=e;return(0,a.jsx)(`circle`,{cx:n,cy:r,r:`3.2`},t)}function p(e){let[t,n]=e;return`${t},${n}`}var m=[{id:`bars`,d:`M6,26 V14 M14,26 V6 M22,26 V18`,label:`chart`},{id:`line`,d:`M4,24 L11,14 L18,18 L26,6`,label:`trend`},{id:`donut`,d:`M14,4 A10,10 0 1 1 4,14`,label:`share`},{id:`pin`,d:`M14,4 a8,8 0 0 1 8,8 c0,6 -8,14 -8,14 s-8,-8 -8,-14 a8,8 0 0 1 8,-8`,label:`map`},{id:`steps`,d:`M4,24 H12 V16 H20 V8 H26`,label:`timeline`},{id:`net`,d:`M6,22 L14,8 L24,20 M6,22 L24,20`,label:`network`},{id:`gauge`,d:`M4,22 A11,11 0 0 1 26,22 M15,22 L21,12`,label:`gauge`},{id:`rows`,d:`M5,8 H25 M5,15 H25 M5,22 H17`,label:`table`}];function h(){return(0,a.jsx)(`div`,{className:`fl-card fl-instruments`,children:m.map((e,t)=>(0,a.jsxs)(`span`,{className:`fl-instrument`,style:{"--in-i":String(t)},children:[(0,a.jsx)(`svg`,{viewBox:`0 0 30 30`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:e.d})}),e.label]},e.id))})}function g(){let e=(0,i.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`div`,{className:`fl-ink-label`,children:`Revenue · last 6 quarters`}),e[0]=t):t=e[0];let n,r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsx)(`div`,{className:`fl-ink-bars`,children:s.map(_)}),r=(0,a.jsx)(`span`,{className:`fl-hl-sweep`}),e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,a.jsxs)(`div`,{className:`fl-card fl-ink`,children:[t,(0,a.jsxs)(`div`,{className:`fl-ink-plot`,children:[n,r,(0,a.jsxs)(`span`,{className:`fl-hl-chip`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M3 21l3.2-.9L18 8.3l-2.3-2.3L4 17.6 3 21z M14.7 7l2.3 2.3`})}),`Ask about this`]})]})]}),e[3]=o):o=e[3],o}function _(e,t){return(0,a.jsx)(`div`,{className:`fl-ink-barcol`,children:(0,a.jsx)(`div`,{className:`fl-ink-bar`+(e===`100%`?` peak`:``),style:{height:e}})},t)}function v(){return(0,a.jsxs)(`div`,{className:`fl-card fl-ghostwrap`,children:[(0,a.jsxs)(`div`,{className:`fl-ghost-said`,children:[(0,a.jsx)(`span`,{className:`fl-wave`,"aria-hidden":`true`,children:Array.from({length:12},(e,t)=>(0,a.jsx)(`i`,{style:{"--i":String(t)}},t))}),(0,a.jsxs)(`span`,{className:`fl-ghost-words`,children:[`“…and how does that compare to last year, and`,(0,a.jsx)(`span`,{className:`fl-caret`}),`”`]})]}),(0,a.jsxs)(`div`,{className:`fl-ghost-cards`,children:[(0,a.jsxs)(`div`,{className:`fl-ghost`,children:[(0,a.jsx)(`div`,{className:`fl-ghost-tag`,children:`Forming…`}),(0,a.jsxs)(`div`,{className:`fl-ghost-bars`,children:[(0,a.jsx)(`i`,{style:{height:`50%`}}),(0,a.jsx)(`i`,{style:{height:`80%`}}),(0,a.jsx)(`i`,{style:{height:`65%`}})]})]}),(0,a.jsxs)(`div`,{className:`fl-ghost delay`,children:[(0,a.jsx)(`div`,{className:`fl-ghost-tag`,children:`Forming…`}),(0,a.jsx)(`svg`,{viewBox:`0 0 120 50`,"aria-hidden":`true`,children:(0,a.jsx)(`polyline`,{points:`0,42 24,30 48,34 72,18 96,22 120,8`})})]})]})]})}var y=[{label:`Runway: 14mo`,meta:`4×`,x:92,y:52,tone:`blue`},{label:`Hiring freeze`,meta:`a worry`,x:86,y:200,tone:`amber`},{label:`Ship velocity`,meta:`slowing`,x:300,y:204,tone:`amber`},{label:`Churn signal`,meta:`watch`,x:300,y:50,tone:`pink`},{label:`Pricing`,meta:`your idea`,x:206,y:226,tone:`green`}],b=[[0,3],[3,2],[1,4],[4,2],[0,1]];function x(){let e=(0,i.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`svg`,{className:`fl-mindmap-links`,viewBox:`0 0 420 264`,"aria-hidden":`true`,children:b.map(C)}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsxs)(`div`,{className:`fl-card fl-mindmap`,children:[t,(0,a.jsx)(`div`,{className:`fl-mindmap-hub`,children:(0,a.jsx)(r,{size:46})}),y.map(S)]}),e[1]=n):n=e[1],n}function S(e){return(0,a.jsxs)(`div`,{className:`fl-node tone-`+e.tone,style:{left:`${e.x/420*100}%`,top:`${e.y/264*100}%`},children:[(0,a.jsx)(`div`,{className:`fl-node-label`,children:e.label}),(0,a.jsx)(`div`,{className:`fl-node-meta`,children:e.meta})]},e.label)}function C(e,t){let[n,r]=e,i=y[n],o=y[r],s=(i.x+o.x)/2,c=(i.y+o.y)/2-20;return(0,a.jsx)(`path`,{d:`M${i.x},${i.y} Q${s},${c} ${o.x},${o.y}`},t)}var w=[{icon:`⌨`,label:`Type it`},{icon:`🎙`,label:`Say it`},{icon:`▦`,label:`Drag a card`}];function T(){let e=(0,i.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`span`,{className:`fl-blank-num good`,children:`$2.1M`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsxs)(`span`,{className:`fl-blank-hole`,children:[`your burn / mo`,(0,a.jsx)(`span`,{className:`fl-caret`})]}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsxs)(`div`,{className:`fl-blank-sentence`,children:[`With `,t,` in the bank and a burn of`,` `,n,`, your runway is `,(0,a.jsx)(`span`,{className:`fl-blank-pending`,children:`— months`}),`.`]}),e[2]=r):r=e[2];let o;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,a.jsxs)(`div`,{className:`fl-card fl-blank`,children:[r,(0,a.jsx)(`div`,{className:`fl-blank-options`,"aria-hidden":`true`,children:w.map(E)})]}),e[3]=o):o=e[3],o}function E(e){return(0,a.jsxs)(`span`,{className:`fl-blank-btn`,children:[(0,a.jsx)(`span`,{className:`fl-blank-icon`,children:e.icon}),e.label]},e.label)}var D=[`“ARR climbed to $15.1M — up 21%.”`,`“The trend held steady all quarter.”`,`“North America still leads, at 54%.”`];function O(){return(0,a.jsxs)(`div`,{className:`fl-card fl-walk`,children:[(0,a.jsx)(`div`,{className:`fl-ink-label`,children:`Q3 revenue · read to you`}),(0,a.jsxs)(`div`,{className:`fl-walk-stage`,children:[(0,a.jsxs)(`div`,{className:`fl-walk-presenter`,children:[(0,a.jsx)(r,{size:44,className:`fl-walk-orb`}),(0,a.jsxs)(`div`,{className:`fl-walk-say`,children:[(0,a.jsx)(`span`,{className:`fl-wave`,"aria-hidden":`true`,children:Array.from({length:8},(e,t)=>(0,a.jsx)(`i`,{style:{"--i":String(t)}},t))}),(0,a.jsx)(`span`,{className:`fl-walk-caps`,children:D.map((e,t)=>(0,a.jsx)(`span`,{className:`fl-walk-line l${t+1}`,children:e},e))})]})]}),(0,a.jsxs)(`div`,{className:`fl-walk-items`,children:[(0,a.jsxs)(`div`,{className:`fl-walk-item`,children:[(0,a.jsx)(`span`,{className:`fl-walk-k`,children:`ARR`}),(0,a.jsx)(`span`,{className:`fl-walk-v`,children:`$15.1M`}),(0,a.jsx)(`span`,{className:`fl-walk-up`,children:`▲ 21%`})]}),(0,a.jsx)(`div`,{className:`fl-walk-item`,children:(0,a.jsx)(`svg`,{className:`fl-walk-spark`,viewBox:`0 0 120 26`,"aria-hidden":`true`,children:(0,a.jsx)(`polyline`,{points:`2,20 22,17 42,19 62,11 82,13 100,6 118,3`})})}),(0,a.jsxs)(`div`,{className:`fl-walk-item`,children:[(0,a.jsx)(`span`,{className:`fl-walk-k`,children:`N. America`}),(0,a.jsx)(`span`,{className:`fl-walk-v`,children:`54%`})]}),(0,a.jsx)(`span`,{className:`fl-walk-spot`,"aria-hidden":`true`})]})]}),(0,a.jsx)(`div`,{className:`fl-seen-note`,children:`Illustrative numbers`})]})}function k(){let e=(0,i.c)(8),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsxs)(n,{eyebrow:`Things a chat window can’t do`,children:[`It’s a `,(0,a.jsx)(`em`,{children:`friend at the whiteboard.`})]}),e[0]=t):t=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsx)(o,{eyebrow:`Highlight is the interface`,eyebrowTone:`presence`,title:`Highlight the answer to ask.`,body:`Drag across a bar, a row, a figure — the highlight grabs exactly what’s under it, and your next question is grounded on that piece, not the whole answer.`,visual:(0,a.jsx)(g,{})}),e[1]=r):r=e[1];let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,a.jsx)(o,{reverse:!0,eyebrow:`And the pen is in its hand`,eyebrowTone:`amber`,title:`It draws on its own answers.`,body:`A trend arrow along the recovery, a star on the number that matters, a strike through the option it rules out — the whiteboard marks a good teacher leaves.`,visual:(0,a.jsx)(u,{})}),e[2]=s):s=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,a.jsx)(o,{eyebrow:`It answers while you talk`,eyebrowTone:`blue`,title:`The answer forms mid-sentence.`,body:`Dashed “ghost” cards sketch the answer taking shape behind your words — and reshape live as your question turns. You see it thinking with you, not after you.`,visual:(0,a.jsx)(v,{})}),e[3]=c):c=e[3];let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,a.jsx)(o,{reverse:!0,eyebrow:`Watch it map your thinking`,eyebrowTone:`green`,title:`Ramble. Get a map of your mind.`,body:`Themes emerge from what you actually said — never fixed buckets — with the tensions between them drawn in. A minute of talking becomes a structure you can see.`,visual:(0,a.jsx)(x,{})}),e[4]=l):l=e[4];let d;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,a.jsx)(o,{eyebrow:`The Blank Space`,eyebrowTone:`pink`,title:`It won’t guess. It leaves a space.`,body:`When an answer needs a number only you have, Mavéa leaves a glowing hole to fill — type it, say it, or drag a card in. Uncertainty, made honest and interactive.`,visual:(0,a.jsx)(T,{})}),e[5]=d):d=e[5];let f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,a.jsx)(o,{reverse:!0,eyebrow:`One canvas, many instruments`,eyebrowTone:`presence`,title:`The answer picks its shape.`,body:`Charts, maps, timelines, networks, tables — hundreds of visual instruments on one canvas, and each answer reaches for the ones that fit.`,visual:(0,a.jsx)(h,{})}),e[6]=f):f=e[6];let p;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,a.jsxs)(a.Fragment,{children:[t,(0,a.jsxs)(`div`,{className:`fl-panels`,children:[r,s,c,l,d,f,(0,a.jsx)(o,{eyebrow:`It reads the answer to you`,eyebrowTone:`presence`,title:`It points, and talks you through.`,body:`Mavéa doesn’t drop a wall of cards and leave. It spotlights each part and speaks to it — walking you through the answer a piece at a time, the way a friend at the whiteboard would.`,visual:(0,a.jsx)(O,{})})]})]}),e[7]=p):p=e[7],p}export{k as WowFeatures};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{n as r}from"./icons-gLFQTv74.js";import{t as i}from"./useFocusTrap-CJmpNZv2.js";import{t as a}from"./portal-
|
|
1
|
+
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{n as r}from"./icons-gLFQTv74.js";import{t as i}from"./useFocusTrap-CJmpNZv2.js";import{t as a}from"./portal-Dpb34d3-.js";import{t as o}from"./useZoomGesture-CN0p0lHL.js";var s=e(),c=t(),l=n();function u(e){let t=(0,c.c)(52),{model:n,level:u,onLevel:d,onJump:f,onClose:p}=e,m=(0,s.useRef)(null);i(m);let h;t[0]!==u||t[1]!==p||t[2]!==d?(h=e=>{e===`out`?d(`breath`):u===`breath`?d(`chapters`):p()},t[0]=u,t[1]=p,t[2]=d,t[3]=h):h=t[3],o(m,h);let g,_;t[4]!==u||t[5]!==p||t[6]!==d?(g=()=>{let e=e=>{e.key===`Escape`?(e.preventDefault(),p()):e.key===`ArrowRight`?(e.preventDefault(),u===`chapters`&&d(`breath`)):e.key===`ArrowLeft`&&(e.preventDefault(),u===`breath`?d(`chapters`):p())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},_=[u,p,d],t[4]=u,t[5]=p,t[6]=d,t[7]=g,t[8]=_):(g=t[7],_=t[8]),(0,s.useEffect)(g,_);let v;t[9]===p?v=t[10]:(v=e=>{e.target===e.currentTarget&&p()},t[9]=p,t[10]=v);let y=v,b;t[11]===y?b=t[12]:(b=e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),y(e))},t[11]=y,t[12]=b);let x=`zoom-deck level-`+u,S;t[13]===p?S=t[14]:(S=(0,l.jsx)(`button`,{type:`button`,className:`zoom-level`,onClick:p,children:`Canvas`}),t[13]=p,t[14]=S);let C=`zoom-level`+(u===`chapters`?` active`:``),w=u===`chapters`,T;t[15]===d?T=t[16]:(T=()=>d(`chapters`),t[15]=d,t[16]=T);let E;t[17]!==T||t[18]!==C||t[19]!==w?(E=(0,l.jsx)(`button`,{type:`button`,className:C,"aria-pressed":w,onClick:T,children:`Chapters`}),t[17]=T,t[18]=C,t[19]=w,t[20]=E):E=t[20];let D=`zoom-level`+(u===`breath`?` active`:``),O=u===`breath`,k;t[21]===d?k=t[22]:(k=()=>d(`breath`),t[21]=d,t[22]=k);let A;t[23]!==D||t[24]!==O||t[25]!==k?(A=(0,l.jsx)(`button`,{type:`button`,className:D,"aria-pressed":O,onClick:k,children:`One breath`}),t[23]=D,t[24]=O,t[25]=k,t[26]=A):A=t[26];let j;t[27]!==E||t[28]!==A||t[29]!==S?(j=(0,l.jsxs)(`div`,{className:`zoom-levelbar`,role:`group`,"aria-label":`Zoom level`,children:[S,E,A]}),t[27]=E,t[28]=A,t[29]=S,t[30]=j):j=t[30];let M;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,l.jsx)(r.x,{}),t[31]=M):M=t[31];let N;t[32]===p?N=t[33]:(N=(0,l.jsx)(`button`,{type:`button`,className:`zoom-close`,onClick:p,"aria-label":`Close zoom`,title:`Close`,children:M}),t[32]=p,t[33]=N);let P;t[34]!==j||t[35]!==N?(P=(0,l.jsxs)(`header`,{className:`zoom-toolbar`,children:[j,N]}),t[34]=j,t[35]=N,t[36]=P):P=t[36];let F;t[37]!==u||t[38]!==n.heading||t[39]!==n.meta||t[40]!==n.rows||t[41]!==f||t[42]!==d?(F=u===`breath`?(0,l.jsxs)(`div`,{className:`zoom-breath`,children:[(0,l.jsxs)(`p`,{className:`zoom-breath-line`,children:[n.heading.replace(/, so far\.$/,``),`: `,n.rows.map((e,t)=>(0,l.jsxs)(`button`,{type:`button`,className:`zoom-breath-topic`,onClick:()=>d(`chapters`),children:[e.title,t<n.rows.length-1?` · `:``]},e.frameIndex))]}),(0,l.jsxs)(`p`,{className:`zoom-meta`,children:[n.meta,` · one breath`]})]}):(0,l.jsxs)(`div`,{className:`zoom-chapters`,children:[(0,l.jsxs)(`header`,{className:`zoom-head`,children:[(0,l.jsx)(`span`,{className:`zoom-title`,children:n.heading}),(0,l.jsx)(`span`,{className:`zoom-meta`,children:n.meta})]}),(0,l.jsx)(`ul`,{className:`zoom-rows`,children:n.rows.map(e=>(0,l.jsx)(`li`,{children:(0,l.jsxs)(`button`,{type:`button`,className:`zoom-row`,onClick:()=>f(e.frameIndex),children:[(0,l.jsxs)(`span`,{className:`zoom-row-title`,children:[e.title,(0,l.jsx)(`span`,{className:`zoom-row-clock`,children:e.clock})]}),(0,l.jsx)(`span`,{className:`zoom-row-line`,children:e.line}),e.corrected&&(0,l.jsx)(`span`,{className:`zoom-row-corrected`,children:e.corrected})]})},e.frameIndex))})]}),t[37]=u,t[38]=n.heading,t[39]=n.meta,t[40]=n.rows,t[41]=f,t[42]=d,t[43]=F):F=t[43];let I;t[44]!==P||t[45]!==F||t[46]!==x?(I=(0,l.jsxs)(`div`,{ref:m,className:x,role:`dialog`,"aria-modal":`true`,"aria-label":`Conversation zoomed out`,tabIndex:-1,children:[P,F]}),t[44]=P,t[45]=F,t[46]=x,t[47]=I):I=t[47];let L;return t[48]!==y||t[49]!==I||t[50]!==b?(L=(0,l.jsx)(a,{children:(0,l.jsx)(`div`,{className:`zoom-scrim`,role:`button`,tabIndex:0,"aria-label":`Close`,onClick:y,onKeyDown:b,children:I})}),t[48]=y,t[49]=I,t[50]=b,t[51]=L):L=t[51],L}export{u as ZoomDeck};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{F as t}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{F as t}from"./index-BMeoXWPR.js";import{C as n,i as r,m as i}from"./kokoro-DcP-u0Tl.js";async function a(e,t,n){let r=Array(e.length),i=0,a=!1,o=async()=>{for(;!a;){let t=i++;if(t>=e.length)return;try{r[t]=await n(e[t],t)}catch(e){throw a=!0,e}}},s=Math.max(1,Math.min(t,e.length));return await Promise.all(Array.from({length:s},o)),r}var o=e({renderReelAudio:()=>h,synthesizeVoiceLine:()=>m}),s=24e3,c=.15,l=.18,u=240,d=.008,f=.89,p=6;async function m(e,t){let a=n(e).trim().slice(0,u);if(!a)return new Float32Array;for(let e=0;e<2;e++)try{let e=await fetch(`/tts/v1/audio/speech`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:`kokoro`,input:a,voice:r(`mavea`),response_format:`pcm`,speed:1}),signal:t});if(e.ok)return i(new Uint8Array(await e.arrayBuffer()),null).samples}catch{if(t?.aborted)return new Float32Array}return new Float32Array}async function h(e,n,r){let i=e.slides,o=i.map(e=>Math.max(800,Math.round(e.durationMs))),u=t(),h=i.map(e=>e.voiceover.trim()),g=h.find(Boolean);if(u===null||typeof OfflineAudioContext>`u`)return{buffer:null,timings:o,missing:h.filter(Boolean).length,...g?{firstMissingLine:g}:{}};let _=0,v=await a(i,2,async e=>{let t=await m(e.voiceover,n);return r?.(++_,i.length),t}),y=h.filter(Boolean).length,b=v.filter(e=>e.length>0).length,x=Math.max(0,y-b),S=h.find((e,t)=>e&&v[t].length===0);if(b===0)return{buffer:null,timings:o,missing:x,...S?{firstMissingLine:S}:{}};let C=i.map((e,t)=>{let n=v[t].length/s*1e3;return Math.round(n>0?Math.max(o[t],n+l*1e3):o[t])}),w=0;for(let e of v)for(let t=0;t<e.length;t++)w=Math.max(w,Math.abs(e[t]));let T=w>0?Math.min(p,f/w):1,E=.65+C.reduce((e,t)=>e+t/1e3,0),D=new OfflineAudioContext(1,Math.ceil(E*u),u),O=D.createGain();O.gain.value=T,O.connect(D.destination);let k=c;return C.forEach((e,t)=>{let n=v[t];if(n.length){let e=D.createBuffer(1,n.length,s);e.getChannelData(0).set(n);let t=D.createBufferSource();t.buffer=e;let r=D.createGain(),i=n.length/s,a=Math.min(d,i/2);r.gain.setValueAtTime(0,k),r.gain.linearRampToValueAtTime(1,k+a),r.gain.setValueAtTime(1,k+i-a),r.gain.linearRampToValueAtTime(0,k+i),t.connect(r).connect(O),t.start(k)}k+=e/1e3}),{buffer:await D.startRendering(),timings:C,missing:x,...S?{firstMissingLine:S}:{}}}export{m as n,a as r,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./TopicCanvas-CyBGLgb0.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/src-DG1n-LFe.js","assets/rolldown-runtime-DkW27tQK.js","assets/__vite-browser-external-gfE6fZcA.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,t}from"./preload-helper-CiWYd9n-.js";import{N as n,f as r}from"./index-CKRjGbeR.js";function i(e){let t=n();if(!t)return null;let{ctx:r,release:i}=t;if(typeof r.createMediaStreamDestination!=`function`)return i(),null;let a=r.createMediaStreamDestination(),o=r.createBufferSource();o.buffer=e,o.connect(a);let s=!1;return{stream:a.stream,start(){s||(s=!0,r.state!==`running`&&r.resume().catch(()=>{}),o.start())},stop(){try{o.stop()}catch{}try{o.disconnect()}catch{}i()}}}function a(e,t,n){return t+Math.max(0,n-e)}function o(e,t){return!Number.isFinite(t)||t<=0||e>=t?null:Math.max(0,e)}function s(e){let t=n();if(!t)return null;let{ctx:r,release:i}=t,s=r.createGain();s.connect(r.destination);let c=null,l=0,u=0,d=!1,f=()=>{try{c?.stop(),c?.disconnect()}catch{}c=null},p=t=>{f(),c=r.createBufferSource(),c.buffer=e,c.connect(s),c.start(0,t),l=t,u=r.currentTime,d=!1};return{play(){r.state!==`running`&&r.resume().catch(()=>{}),p(0)},setMuted(e){s.gain.value=+!e},pause(){d||!c||(l=Math.min(e.duration,a(u,l,r.currentTime)),f(),d=!0)},resume(){if(!d)return;d=!1;let t=o(l,e.duration);t!==null&&(r.state!==`running`&&r.resume().catch(()=>{}),p(t))},stop(){f();try{s.disconnect()}catch{}i()}}}var c=`opus`,l=[{container:`mp4`,mimeType:`video/mp4`,video:`av1`,audio:c},{container:`webm`,mimeType:`video/webm`,video:`vp9`,audio:c},{container:`webm`,mimeType:`video/webm`,video:`vp8`,audio:c}],u=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`];async function d(e,t){if(t.audio&&!await e.canEncodeAudio(c,{numberOfChannels:t.audio.numberOfChannels,sampleRate:t.audio.sampleRate,bitrate:t.audioBitrate??192e3}).catch(()=>!1))return null;for(let n of l)if(await e.canEncodeVideo(n.video,{width:t.width,height:t.height,bitrate:t.videoBitrate}).catch(()=>!1))return n;return null}function f(){return typeof MediaRecorder>`u`||typeof MediaRecorder.isTypeSupported!=`function`?null:u.find(e=>MediaRecorder.isTypeSupported(e))??null}function p(e,{fps:t,capS:n}){let r=null,i=!0;return{realtime:!1,accepting:()=>i,async end(a){if(r===null||!i)return;let o=r;r=null;try{await e.add(o,Math.max(1/t,Math.min(a,n)-o))}catch{i=!1}},begin(e){i&&(r=e)},finish(){if(i){i=!1;try{e.close()}catch{}}}}}function ee(){return{realtime:!0,accepting:()=>!0,async end(){},begin(){},finish(){}}}function m(e){let t=e.effect?.getComputedTiming();return t?.progress!==null&&t?.progress!==void 0}function h(e){let t=e.effect;return!t||!(`target`in t)?null:t.target}function te(e){let t=new WeakMap,n=[];return{refresh(r){n=e.getAnimations({subtree:!0}).map(e=>{if(!t.has(e)){t.set(e,r);try{e.pause()}catch{}}return{animation:e,target:h(e)}})},seek(e){for(let{animation:r}of n)try{r.currentTime=e-(t.get(r)??0)}catch{}},activeInside(e){return n.some(({animation:t,target:n})=>n!==null&&e.contains(n)&&m(t))},activeOutside(e){return n.some(({animation:t,target:n})=>!(e&&n&&e.contains(n))&&m(t))},release(){for(let{animation:e}of n)try{e.play()}catch{}n=[]}}}var g=201326592,_=864e5,v=256,y=32,b=/^mavea-video-(\d{13})-[a-z0-9]+[.](?:webm|mp4)$/,x=new WeakSet;async function S(e,t=Date.now()){let n=0,r=0;try{let i=e.entries();try{for(;n<v;){let a=await i.next();if(a.done)break;n+=1;let[o,s]=a.value;if(r>=y||s.kind!==`file`)continue;let c=b.exec(o);if(!c)continue;let l=Number(c[1]);if(!(!Number.isSafeInteger(l)||t-l<_))try{await e.removeEntry(o),r+=1}catch{}}}finally{await i.return?.()}}catch{}return r}function C(e){x.has(e)||(x.add(e),S(e))}async function w(e=`webm`){if(typeof navigator>`u`)return null;let t=navigator.storage;if(!t?.getDirectory)return null;try{let n=await t.getDirectory();C(n);let r=`mavea-video-${Date.now()}-${Math.random().toString(36).slice(2)}.${e}`,i=await n.getFileHandle(r,{create:!0});return{handle:i,name:r,root:n,writable:await i.createWritable()}}catch{return null}}async function ne(e,t=`webm`){let n=await w(t);return n?{target:new e(n.writable,{chunked:!0,chunkSize:4194304}),async finish(){return{blob:await n.handle.getFile(),dispose:()=>n.root.removeEntry(n.name).catch(()=>{})}},async discard(){await n.writable.abort().catch(()=>{}),await n.root.removeEntry(n.name).catch(()=>{})}}:null}async function re(){let e=await w();if(e){let t=!1,n=null,r=Promise.resolve();return{write(i){t||!i.size||(r=r.then(()=>e.writable.write(i)).catch(e=>{n=e instanceof Error?e:Error(`temporary-video-write-failed`)}))},async finish(){if(await r,n)throw n;return await e.writable.close(),{blob:await e.handle.getFile(),dispose:()=>e.root.removeEntry(e.name).catch(()=>{})}},async discard(){t=!0,await r.catch(()=>{}),await e.writable.abort().catch(()=>{}),await e.root.removeEntry(e.name).catch(()=>{})}}}let t=[],n=0,r=null,i=!1;return{write(e){if(!(i||!e.size||r)){if(n+=e.size,n>g){r=Error(`temporary-video-storage-unavailable`),t.length=0;return}t.push(e)}},async finish(){if(r)throw r;return{blob:new Blob(t,{type:`video/webm`})}},async discard(){i=!0,t.length=0}}}e();var T={balanced:{fps:15,bitrate:6e6},high:{fps:24,bitrate:7e6},ultra:{fps:24,bitrate:8e6}};function E(e,t=r()){let n=T[e],i=t===`lite`?{fps:12,bitrate:6e6}:{fps:24,bitrate:8e6};return{fps:Math.min(n.fps,i.fps),bitrate:Math.min(n.bitrate,i.bitrate)}}function D(e){let{fps:t,bitrate:n}=E(e);return`up to ${t} fps · ${Math.round(n/1e6)} Mbps`}async function ie(){try{let{Output:e,Mp4OutputFormat:n,WebMOutputFormat:r,BufferTarget:i,StreamTarget:a,CanvasSource:o,AudioBufferSource:s,canEncodeVideo:c,canEncodeAudio:l}=await t(async()=>{let{Output:e,Mp4OutputFormat:t,WebMOutputFormat:n,BufferTarget:r,StreamTarget:i,CanvasSource:a,AudioBufferSource:o,canEncodeVideo:s,canEncodeAudio:c}=await import(`./src-DG1n-LFe.js`);return{Output:e,Mp4OutputFormat:t,WebMOutputFormat:n,BufferTarget:r,StreamTarget:i,CanvasSource:a,AudioBufferSource:o,canEncodeVideo:s,canEncodeAudio:c}},__vite__mapDeps([0,1,2]));return{Output:e,Mp4OutputFormat:n,WebMOutputFormat:r,BufferTarget:i,StreamTarget:a,CanvasSource:o,AudioBufferSource:s,canEncodeVideo:c,canEncodeAudio:l}}catch{return null}}async function ae(){try{return await t(()=>import(`./dist-DRo0JOkC.js`),[])}catch{return null}}var oe={"9:16":{w:1080,h:1920},"1:1":{w:1080,h:1080},"16:9":{w:1920,h:1080}},se=12,ce=400,le=500;function ue(e,t){let n=performance.now(),r=0,i=0,a=()=>{n=performance.now(),r++},o=new MutationObserver(e=>{n=performance.now();for(let n of e)t&&(n.target===t||t.contains(n.target))?i++:r++});return o.observe(e,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),e.addEventListener(`load`,a,!0),e.addEventListener(`scroll`,a,!0),{still(){return performance.now()-n<ce||typeof e.getAnimations!=`function`||e.querySelector(`canvas, video`)?!1:e.getAnimations({subtree:!0}).every(e=>e.playState!==`running`)},changes:()=>r,layerChanges:()=>i,hasLiveMedia:()=>!!e.querySelector(`canvas, video`),dispose(){o.disconnect(),e.removeEventListener(`load`,a,!0),e.removeEventListener(`scroll`,a,!0)}}}function O(){if(typeof document>`u`)return!1;let e=f()!==null,t=typeof VideoEncoder<`u`&&globalThis.AudioEncoder!==void 0;return e||t}async function k(e){let t=E(e.quality??`high`),n=e.fps??t.fps,r=e.bitrate??t.bitrate,a=e.background??`#05070c`,{w:o,h:s}=e.dims??oe[e.aspect],c=e.maxDurationMs??1/0,l=c/1e3,u=await ae();if(!u)throw Error(`rasterizer-unavailable`);let m=typeof VideoEncoder<`u`&&globalThis.AudioEncoder!==void 0?await ie():null,h=m?await d(m,{width:o,height:s,videoBitrate:r,audio:e.audioBuffer}):null,g=!!(h&&m),_=!!e.cues&&Number.isFinite(c)&&g&&typeof e.el.getAnimations==`function`,v=e.el.clientWidth||o,y=Math.min(3,Math.max(1,o/v)),b=_&&e.liveLayer?e.el.querySelector(e.liveLayer.selector):null,x=b instanceof HTMLElement?b:null,S=x?e.liveLayer?.bleed??0:0,C=x?.getBoundingClientRect(),w=C?{w:Math.ceil(C.width+S*2),h:Math.ceil(C.height+S*2)}:null,T=x?document.createElement(`canvas`):null;T&&(T.width=o,T.height=s);let D=T?.getContext(`2d`,{alpha:!1})??null,ce=!!(x&&w&&D),O,k=null;try{O=await u.createContext(e.el,{scale:y,backgroundColor:a,filter:ce?e=>e!==x:void 0}),ce&&x&&w&&(k=await u.createContext(x,{scale:y,backgroundColor:null,width:w.w,height:w.h,style:{padding:`${S}px`}}))}catch{throw Error(`rasterizer-unavailable`)}let A=x&&k&&T&&D?{el:x,context:k,canvas:T,ctx:D}:null,j=0,M=0,N=null,de=()=>{M++,M>=se&&!N&&(N=Error(`rasterizer-failed`))},P=ue(e.el,A?.el??null),F=()=>{P.dispose(),u.destroyContext(O),k&&u.destroyContext(k)},I=document.createElement(`canvas`);I.width=o,I.height=s;let L=I.getContext(`2d`,{alpha:!1});L.fillStyle=a,L.fillRect(0,0,o,s);let R=document.createElement(`canvas`);R.width=Math.round(o/2),R.height=Math.round(s/2);let fe=R.getContext(`2d`),z=!1,B=()=>{fe&&(fe.drawImage(I,0,0,R.width,R.height),z=!0)},pe=()=>new Blob([],{type:`image/png`}),me=async()=>(!z&&j>0&&B(),z?await new Promise(e=>R.toBlob(e,`image/png`))??pe():pe()),V=async e=>{let t;try{t=await u.domToCanvas(e)}catch{return de(),null}return!t.width||!t.height?(de(),null):(M=0,t)},he=0,ge=()=>{if(j++,!e.onFrame)return;let t=performance.now();t-he<le||(he=t,e.onFrame(I))},H={scale:1,offsetX:0,offsetY:0},_e=(e,t)=>{let n=Math.max(o/t.width,s/t.height),r=t.width*n,i=t.height*n;H={scale:n,offsetX:(o-r)/2,offsetY:(s-i)/2},e.fillStyle=a,e.fillRect(0,0,o,s),e.drawImage(t,H.offsetX,H.offsetY,r,i)},U=async()=>{let e=await V(O);return e?(_e(L,e),ge(),!0):!1},W={x:0,y:0,w:w?.w??0,h:w?.h??0},ve=()=>{if(!A)return;let t=e.el.getBoundingClientRect(),n=A.el.getBoundingClientRect();W={...W,x:n.left-t.left-S,y:n.top-t.top-S}};ve();let ye=async(e,t)=>{if(!A)return U();let n=e?await V(O):null;if(e&&!n)return!1;let r=t?await V(A.context):null;if(t&&!r)return!1;n&&_e(A.ctx,n);let i=H.scale*y,a=Math.round(H.offsetX+W.x*i),o=Math.round(H.offsetY+W.y*i),s=Math.round(W.w*i),c=Math.round(W.h*i);return n?L.drawImage(A.canvas,0,0):L.drawImage(A.canvas,a,o,s,c,a,o,s,c),r&&L.drawImage(r,a,o,s,c),ge(),!0},G=0,K=null,q=()=>K===null?G:performance.now()-K,J=!0,Y=0,be=e.cues??[],xe=async e=>{let t=!1;for(;Y<be.length&&be[Y].atMs<=e;)await be[Y].apply(),Y++,t=!0;return t},Se=async t=>{let r=te(e.el),i=-1,a=-1,o=-1,s=!1,c=!1;try{for(let u=0;J&&t.accepting()&&!N;u++){let d=u/n;if(d>=l)break;let f=d*1e3;if(e.gate&&await e.gate(),!J)break;let p=await xe(f);p&&ve(),(p||P.changes()+P.layerChanges()!==i)&&(r.refresh(f),i=P.changes()+P.layerChanges()),r.seek(f);let ee=P.changes(),m=P.layerChanges(),h=ee!==a,te=m!==o,g=r.activeOutside(A?.el??null),_=A?r.activeInside(A.el):!1,v=P.hasLiveMedia(),y=u===0||h||g||s||v,b=!!A&&(y||te||_||c);if(s=g,c=_,y||b){await t.end(d);let e=A?await ye(y,b):await U();if(!J||!t.accepting()||N)break;e&&(a=ee,o=m),t.begin(d)}G=Math.min((u+1)/n,l)*1e3,!z&&d>1.2&&j>2&&M===0&&B(),await new Promise(e=>setTimeout(e,0))}}finally{r.release()}},Ce=async t=>{let r=performance.now();K=r;let i=!0;for(;J&&t.accepting()&&!N;){let a=performance.now();if(e.gate&&await e.gate(),!J)break;if(await xe(performance.now()-r),i||!P.still()){if(await t.end((performance.now()-r)/1e3),await U(),!J||!t.accepting()||N)break;t.begin(i?0:(performance.now()-r)/1e3),i=!1}let o=performance.now()-r;if(G=o,o>=c)break;!z&&o>1200&&j>2&&M===0&&B();let s=performance.now()-a;await new Promise(e=>setTimeout(e,Math.max(0,1e3/n-s)))}},we=e=>_&&!e.realtime?Se(e):Ce(e);if(h&&m){let t=await ne(m.StreamTarget,h.container),i=t?null:new m.BufferTarget,a=new m.Output({format:h.container===`mp4`?new m.Mp4OutputFormat:new m.WebMOutputFormat,target:t?.target??i}),o=new m.CanvasSource(I,{codec:h.video,bitrate:r});a.addVideoTrack(o);let s=null;if(e.audioBuffer){let t=new m.AudioBufferSource({codec:h.audio,bitrate:192e3});a.addAudioTrack(t);let n=e.audioBuffer;s=async()=>{try{await t.add(n),t.close()}catch{}}}await a.start(),s?.();let c=p(o,{fps:n,capS:l}),u=we(c);u.catch(()=>{});let d=()=>{J=!1,F(),I.width=I.height=0,R.width=R.height=0,A&&(A.canvas.width=A.canvas.height=0)};return{done:()=>u,async stop(){if(J=!1,N||j===0)throw a.cancel?.(),t?.discard(),d(),N??Error(`rasterizer-failed`);await c.end(q()/1e3);let n=await me();c.finish(),await a.finalize();let r=t?await t.finish():null;return d(),{blob:r?.blob??new Blob([i?.buffer??new ArrayBuffer(0)],{type:h.mimeType}),type:h.mimeType,poster:n,hasAudio:!!e.audioBuffer,durationMs:Math.round(q()),dispose:r?.dispose}},cancel(){J=!1,a.cancel?.(),t?.discard(),d()}}}let Te=I.captureStream(n),Ee=new MediaStream(Te.getVideoTracks()),De=e.audioBuffer?i(e.audioBuffer):null,Oe=De?.stream.getAudioTracks()[0]??null;Oe&&Ee.addTrack(Oe);let ke=f();if(!ke)throw F(),I.width=I.height=0,R.width=R.height=0,Error(`open-codec-unavailable`);let X=new MediaRecorder(Ee,{mimeType:ke,videoBitsPerSecond:r}),Z=await re();X.ondataavailable=e=>Z.write(e.data);let Ae=new Promise(e=>{X.addEventListener(`stop`,()=>e(),{once:!0})}),Q=()=>{try{X.state!==`inactive`&&X.stop()}catch{}};X.start(1e3),De?.start();let je=we(ee()).finally(()=>{(N||G>=c)&&Q()});je.catch(()=>{});let $=()=>{J=!1,F();for(let e of Ee.getTracks())e.stop();De?.stop(),I.width=I.height=0,R.width=R.height=0,A&&(A.canvas.width=A.canvas.height=0)};return{done:()=>je,async stop(){if(J=!1,N||j===0)throw Q(),Z.discard(),$(),N??Error(`rasterizer-failed`);let e=await me();Q(),await Ae;try{let t=await Z.finish(),n=Math.round(q());return $(),{blob:t.blob,type:ke,poster:e,hasAudio:!!Oe,durationMs:n,dispose:t.dispose}}catch(e){throw await Z.discard(),$(),e}},cancel(){J=!1,Q(),Z.discard(),$()}}}export{f as a,k as i,O as n,s as o,D as r,E as t};
|
|
2
|
+
import{n as e,t}from"./preload-helper-CiWYd9n-.js";import{N as n,f as r}from"./index-BMeoXWPR.js";function i(e){let t=n();if(!t)return null;let{ctx:r,release:i}=t;if(typeof r.createMediaStreamDestination!=`function`)return i(),null;let a=r.createMediaStreamDestination(),o=r.createBufferSource();o.buffer=e,o.connect(a);let s=!1;return{stream:a.stream,start(){s||(s=!0,r.state!==`running`&&r.resume().catch(()=>{}),o.start())},stop(){try{o.stop()}catch{}try{o.disconnect()}catch{}i()}}}function a(e,t,n){return t+Math.max(0,n-e)}function o(e,t){return!Number.isFinite(t)||t<=0||e>=t?null:Math.max(0,e)}function s(e){let t=n();if(!t)return null;let{ctx:r,release:i}=t,s=r.createGain();s.connect(r.destination);let c=null,l=0,u=0,d=!1,f=()=>{try{c?.stop(),c?.disconnect()}catch{}c=null},p=t=>{f(),c=r.createBufferSource(),c.buffer=e,c.connect(s),c.start(0,t),l=t,u=r.currentTime,d=!1};return{play(){r.state!==`running`&&r.resume().catch(()=>{}),p(0)},setMuted(e){s.gain.value=+!e},pause(){d||!c||(l=Math.min(e.duration,a(u,l,r.currentTime)),f(),d=!0)},resume(){if(!d)return;d=!1;let t=o(l,e.duration);t!==null&&(r.state!==`running`&&r.resume().catch(()=>{}),p(t))},stop(){f();try{s.disconnect()}catch{}i()}}}var c=`opus`,l=[{container:`mp4`,mimeType:`video/mp4`,video:`av1`,audio:c},{container:`webm`,mimeType:`video/webm`,video:`vp9`,audio:c},{container:`webm`,mimeType:`video/webm`,video:`vp8`,audio:c}],u=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`];async function d(e,t){if(t.audio&&!await e.canEncodeAudio(c,{numberOfChannels:t.audio.numberOfChannels,sampleRate:t.audio.sampleRate,bitrate:t.audioBitrate??192e3}).catch(()=>!1))return null;for(let n of l)if(await e.canEncodeVideo(n.video,{width:t.width,height:t.height,bitrate:t.videoBitrate}).catch(()=>!1))return n;return null}function f(){return typeof MediaRecorder>`u`||typeof MediaRecorder.isTypeSupported!=`function`?null:u.find(e=>MediaRecorder.isTypeSupported(e))??null}function p(e,{fps:t,capS:n}){let r=null,i=!0;return{realtime:!1,accepting:()=>i,async end(a){if(r===null||!i)return;let o=r;r=null;try{await e.add(o,Math.max(1/t,Math.min(a,n)-o))}catch{i=!1}},begin(e){i&&(r=e)},finish(){if(i){i=!1;try{e.close()}catch{}}}}}function ee(){return{realtime:!0,accepting:()=>!0,async end(){},begin(){},finish(){}}}function m(e){let t=e.effect?.getComputedTiming();return t?.progress!==null&&t?.progress!==void 0}function h(e){let t=e.effect;return!t||!(`target`in t)?null:t.target}function te(e){let t=new WeakMap,n=[];return{refresh(r){n=e.getAnimations({subtree:!0}).map(e=>{if(!t.has(e)){t.set(e,r);try{e.pause()}catch{}}return{animation:e,target:h(e)}})},seek(e){for(let{animation:r}of n)try{r.currentTime=e-(t.get(r)??0)}catch{}},activeInside(e){return n.some(({animation:t,target:n})=>n!==null&&e.contains(n)&&m(t))},activeOutside(e){return n.some(({animation:t,target:n})=>!(e&&n&&e.contains(n))&&m(t))},release(){for(let{animation:e}of n)try{e.play()}catch{}n=[]}}}var g=201326592,_=864e5,v=256,y=32,b=/^mavea-video-(\d{13})-[a-z0-9]+[.](?:webm|mp4)$/,x=new WeakSet;async function S(e,t=Date.now()){let n=0,r=0;try{let i=e.entries();try{for(;n<v;){let a=await i.next();if(a.done)break;n+=1;let[o,s]=a.value;if(r>=y||s.kind!==`file`)continue;let c=b.exec(o);if(!c)continue;let l=Number(c[1]);if(!(!Number.isSafeInteger(l)||t-l<_))try{await e.removeEntry(o),r+=1}catch{}}}finally{await i.return?.()}}catch{}return r}function C(e){x.has(e)||(x.add(e),S(e))}async function w(e=`webm`){if(typeof navigator>`u`)return null;let t=navigator.storage;if(!t?.getDirectory)return null;try{let n=await t.getDirectory();C(n);let r=`mavea-video-${Date.now()}-${Math.random().toString(36).slice(2)}.${e}`,i=await n.getFileHandle(r,{create:!0});return{handle:i,name:r,root:n,writable:await i.createWritable()}}catch{return null}}async function ne(e,t=`webm`){let n=await w(t);return n?{target:new e(n.writable,{chunked:!0,chunkSize:4194304}),async finish(){return{blob:await n.handle.getFile(),dispose:()=>n.root.removeEntry(n.name).catch(()=>{})}},async discard(){await n.writable.abort().catch(()=>{}),await n.root.removeEntry(n.name).catch(()=>{})}}:null}async function re(){let e=await w();if(e){let t=!1,n=null,r=Promise.resolve();return{write(i){t||!i.size||(r=r.then(()=>e.writable.write(i)).catch(e=>{n=e instanceof Error?e:Error(`temporary-video-write-failed`)}))},async finish(){if(await r,n)throw n;return await e.writable.close(),{blob:await e.handle.getFile(),dispose:()=>e.root.removeEntry(e.name).catch(()=>{})}},async discard(){t=!0,await r.catch(()=>{}),await e.writable.abort().catch(()=>{}),await e.root.removeEntry(e.name).catch(()=>{})}}}let t=[],n=0,r=null,i=!1;return{write(e){if(!(i||!e.size||r)){if(n+=e.size,n>g){r=Error(`temporary-video-storage-unavailable`),t.length=0;return}t.push(e)}},async finish(){if(r)throw r;return{blob:new Blob(t,{type:`video/webm`})}},async discard(){i=!0,t.length=0}}}e();var T={balanced:{fps:15,bitrate:6e6},high:{fps:24,bitrate:7e6},ultra:{fps:24,bitrate:8e6}};function E(e,t=r()){let n=T[e],i=t===`lite`?{fps:12,bitrate:6e6}:{fps:24,bitrate:8e6};return{fps:Math.min(n.fps,i.fps),bitrate:Math.min(n.bitrate,i.bitrate)}}function D(e){let{fps:t,bitrate:n}=E(e);return`up to ${t} fps · ${Math.round(n/1e6)} Mbps`}async function ie(){try{let{Output:e,Mp4OutputFormat:n,WebMOutputFormat:r,BufferTarget:i,StreamTarget:a,CanvasSource:o,AudioBufferSource:s,canEncodeVideo:c,canEncodeAudio:l}=await t(async()=>{let{Output:e,Mp4OutputFormat:t,WebMOutputFormat:n,BufferTarget:r,StreamTarget:i,CanvasSource:a,AudioBufferSource:o,canEncodeVideo:s,canEncodeAudio:c}=await import(`./src-DG1n-LFe.js`);return{Output:e,Mp4OutputFormat:t,WebMOutputFormat:n,BufferTarget:r,StreamTarget:i,CanvasSource:a,AudioBufferSource:o,canEncodeVideo:s,canEncodeAudio:c}},__vite__mapDeps([0,1,2]));return{Output:e,Mp4OutputFormat:n,WebMOutputFormat:r,BufferTarget:i,StreamTarget:a,CanvasSource:o,AudioBufferSource:s,canEncodeVideo:c,canEncodeAudio:l}}catch{return null}}async function ae(){try{return await t(()=>import(`./dist-DRo0JOkC.js`),[])}catch{return null}}var oe={"9:16":{w:1080,h:1920},"1:1":{w:1080,h:1080},"16:9":{w:1920,h:1080}},se=12,ce=400,le=500;function ue(e,t){let n=performance.now(),r=0,i=0,a=()=>{n=performance.now(),r++},o=new MutationObserver(e=>{n=performance.now();for(let n of e)t&&(n.target===t||t.contains(n.target))?i++:r++});return o.observe(e,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),e.addEventListener(`load`,a,!0),e.addEventListener(`scroll`,a,!0),{still(){return performance.now()-n<ce||typeof e.getAnimations!=`function`||e.querySelector(`canvas, video`)?!1:e.getAnimations({subtree:!0}).every(e=>e.playState!==`running`)},changes:()=>r,layerChanges:()=>i,hasLiveMedia:()=>!!e.querySelector(`canvas, video`),dispose(){o.disconnect(),e.removeEventListener(`load`,a,!0),e.removeEventListener(`scroll`,a,!0)}}}function O(){if(typeof document>`u`)return!1;let e=f()!==null,t=typeof VideoEncoder<`u`&&globalThis.AudioEncoder!==void 0;return e||t}async function k(e){let t=E(e.quality??`high`),n=e.fps??t.fps,r=e.bitrate??t.bitrate,a=e.background??`#05070c`,{w:o,h:s}=e.dims??oe[e.aspect],c=e.maxDurationMs??1/0,l=c/1e3,u=await ae();if(!u)throw Error(`rasterizer-unavailable`);let m=typeof VideoEncoder<`u`&&globalThis.AudioEncoder!==void 0?await ie():null,h=m?await d(m,{width:o,height:s,videoBitrate:r,audio:e.audioBuffer}):null,g=!!(h&&m),_=!!e.cues&&Number.isFinite(c)&&g&&typeof e.el.getAnimations==`function`,v=e.el.clientWidth||o,y=Math.min(3,Math.max(1,o/v)),b=_&&e.liveLayer?e.el.querySelector(e.liveLayer.selector):null,x=b instanceof HTMLElement?b:null,S=x?e.liveLayer?.bleed??0:0,C=x?.getBoundingClientRect(),w=C?{w:Math.ceil(C.width+S*2),h:Math.ceil(C.height+S*2)}:null,T=x?document.createElement(`canvas`):null;T&&(T.width=o,T.height=s);let D=T?.getContext(`2d`,{alpha:!1})??null,ce=!!(x&&w&&D),O,k=null;try{O=await u.createContext(e.el,{scale:y,backgroundColor:a,filter:ce?e=>e!==x:void 0}),ce&&x&&w&&(k=await u.createContext(x,{scale:y,backgroundColor:null,width:w.w,height:w.h,style:{padding:`${S}px`}}))}catch{throw Error(`rasterizer-unavailable`)}let A=x&&k&&T&&D?{el:x,context:k,canvas:T,ctx:D}:null,j=0,M=0,N=null,de=()=>{M++,M>=se&&!N&&(N=Error(`rasterizer-failed`))},P=ue(e.el,A?.el??null),F=()=>{P.dispose(),u.destroyContext(O),k&&u.destroyContext(k)},I=document.createElement(`canvas`);I.width=o,I.height=s;let L=I.getContext(`2d`,{alpha:!1});L.fillStyle=a,L.fillRect(0,0,o,s);let R=document.createElement(`canvas`);R.width=Math.round(o/2),R.height=Math.round(s/2);let fe=R.getContext(`2d`),z=!1,B=()=>{fe&&(fe.drawImage(I,0,0,R.width,R.height),z=!0)},pe=()=>new Blob([],{type:`image/png`}),me=async()=>(!z&&j>0&&B(),z?await new Promise(e=>R.toBlob(e,`image/png`))??pe():pe()),V=async e=>{let t;try{t=await u.domToCanvas(e)}catch{return de(),null}return!t.width||!t.height?(de(),null):(M=0,t)},he=0,ge=()=>{if(j++,!e.onFrame)return;let t=performance.now();t-he<le||(he=t,e.onFrame(I))},H={scale:1,offsetX:0,offsetY:0},_e=(e,t)=>{let n=Math.max(o/t.width,s/t.height),r=t.width*n,i=t.height*n;H={scale:n,offsetX:(o-r)/2,offsetY:(s-i)/2},e.fillStyle=a,e.fillRect(0,0,o,s),e.drawImage(t,H.offsetX,H.offsetY,r,i)},U=async()=>{let e=await V(O);return e?(_e(L,e),ge(),!0):!1},W={x:0,y:0,w:w?.w??0,h:w?.h??0},ve=()=>{if(!A)return;let t=e.el.getBoundingClientRect(),n=A.el.getBoundingClientRect();W={...W,x:n.left-t.left-S,y:n.top-t.top-S}};ve();let ye=async(e,t)=>{if(!A)return U();let n=e?await V(O):null;if(e&&!n)return!1;let r=t?await V(A.context):null;if(t&&!r)return!1;n&&_e(A.ctx,n);let i=H.scale*y,a=Math.round(H.offsetX+W.x*i),o=Math.round(H.offsetY+W.y*i),s=Math.round(W.w*i),c=Math.round(W.h*i);return n?L.drawImage(A.canvas,0,0):L.drawImage(A.canvas,a,o,s,c,a,o,s,c),r&&L.drawImage(r,a,o,s,c),ge(),!0},G=0,K=null,q=()=>K===null?G:performance.now()-K,J=!0,Y=0,be=e.cues??[],xe=async e=>{let t=!1;for(;Y<be.length&&be[Y].atMs<=e;)await be[Y].apply(),Y++,t=!0;return t},Se=async t=>{let r=te(e.el),i=-1,a=-1,o=-1,s=!1,c=!1;try{for(let u=0;J&&t.accepting()&&!N;u++){let d=u/n;if(d>=l)break;let f=d*1e3;if(e.gate&&await e.gate(),!J)break;let p=await xe(f);p&&ve(),(p||P.changes()+P.layerChanges()!==i)&&(r.refresh(f),i=P.changes()+P.layerChanges()),r.seek(f);let ee=P.changes(),m=P.layerChanges(),h=ee!==a,te=m!==o,g=r.activeOutside(A?.el??null),_=A?r.activeInside(A.el):!1,v=P.hasLiveMedia(),y=u===0||h||g||s||v,b=!!A&&(y||te||_||c);if(s=g,c=_,y||b){await t.end(d);let e=A?await ye(y,b):await U();if(!J||!t.accepting()||N)break;e&&(a=ee,o=m),t.begin(d)}G=Math.min((u+1)/n,l)*1e3,!z&&d>1.2&&j>2&&M===0&&B(),await new Promise(e=>setTimeout(e,0))}}finally{r.release()}},Ce=async t=>{let r=performance.now();K=r;let i=!0;for(;J&&t.accepting()&&!N;){let a=performance.now();if(e.gate&&await e.gate(),!J)break;if(await xe(performance.now()-r),i||!P.still()){if(await t.end((performance.now()-r)/1e3),await U(),!J||!t.accepting()||N)break;t.begin(i?0:(performance.now()-r)/1e3),i=!1}let o=performance.now()-r;if(G=o,o>=c)break;!z&&o>1200&&j>2&&M===0&&B();let s=performance.now()-a;await new Promise(e=>setTimeout(e,Math.max(0,1e3/n-s)))}},we=e=>_&&!e.realtime?Se(e):Ce(e);if(h&&m){let t=await ne(m.StreamTarget,h.container),i=t?null:new m.BufferTarget,a=new m.Output({format:h.container===`mp4`?new m.Mp4OutputFormat:new m.WebMOutputFormat,target:t?.target??i}),o=new m.CanvasSource(I,{codec:h.video,bitrate:r});a.addVideoTrack(o);let s=null;if(e.audioBuffer){let t=new m.AudioBufferSource({codec:h.audio,bitrate:192e3});a.addAudioTrack(t);let n=e.audioBuffer;s=async()=>{try{await t.add(n),t.close()}catch{}}}await a.start(),s?.();let c=p(o,{fps:n,capS:l}),u=we(c);u.catch(()=>{});let d=()=>{J=!1,F(),I.width=I.height=0,R.width=R.height=0,A&&(A.canvas.width=A.canvas.height=0)};return{done:()=>u,async stop(){if(J=!1,N||j===0)throw a.cancel?.(),t?.discard(),d(),N??Error(`rasterizer-failed`);await c.end(q()/1e3);let n=await me();c.finish(),await a.finalize();let r=t?await t.finish():null;return d(),{blob:r?.blob??new Blob([i?.buffer??new ArrayBuffer(0)],{type:h.mimeType}),type:h.mimeType,poster:n,hasAudio:!!e.audioBuffer,durationMs:Math.round(q()),dispose:r?.dispose}},cancel(){J=!1,a.cancel?.(),t?.discard(),d()}}}let Te=I.captureStream(n),Ee=new MediaStream(Te.getVideoTracks()),De=e.audioBuffer?i(e.audioBuffer):null,Oe=De?.stream.getAudioTracks()[0]??null;Oe&&Ee.addTrack(Oe);let ke=f();if(!ke)throw F(),I.width=I.height=0,R.width=R.height=0,Error(`open-codec-unavailable`);let X=new MediaRecorder(Ee,{mimeType:ke,videoBitsPerSecond:r}),Z=await re();X.ondataavailable=e=>Z.write(e.data);let Ae=new Promise(e=>{X.addEventListener(`stop`,()=>e(),{once:!0})}),Q=()=>{try{X.state!==`inactive`&&X.stop()}catch{}};X.start(1e3),De?.start();let je=we(ee()).finally(()=>{(N||G>=c)&&Q()});je.catch(()=>{});let $=()=>{J=!1,F();for(let e of Ee.getTracks())e.stop();De?.stop(),I.width=I.height=0,R.width=R.height=0,A&&(A.canvas.width=A.canvas.height=0)};return{done:()=>je,async stop(){if(J=!1,N||j===0)throw Q(),Z.discard(),$(),N??Error(`rasterizer-failed`);let e=await me();Q(),await Ae;try{let t=await Z.finish(),n=Math.round(q());return $(),{blob:t.blob,type:ke,poster:e,hasAudio:!!Oe,durationMs:n,dispose:t.dispose}}catch(e){throw await Z.discard(),$(),e}},cancel(){J=!1,Q(),Z.discard(),$()}}}export{f as a,k as i,O as n,s as o,D as r,E as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e,M as t,p as n,y as r}from"./store-D16dGt7I.js";import{n as i}from"./ledger-DHS2di3l.js";import{i as a}from"./format-BkvssSOr.js";import{n as o}from"./useDashboardLoop-
|
|
1
|
+
import{I as e,M as t,p as n,y as r}from"./store-D16dGt7I.js";import{n as i}from"./ledger-DHS2di3l.js";import{i as a}from"./format-BkvssSOr.js";import{n as o}from"./useDashboardLoop-DEE_sLT0.js";var s=`Checking a live source before this joins your board — a search can take up to a minute. You can close this; the result lands in your check log either way.`;function c(e,t=!1){return e===`no-model`?t?`Saved, but nothing can be checked until a model is connected — connect one in Live and this starts filling in.`:`Connect a model with an API key first — a tile only joins the board once a real search has confirmed it returns real data.`:t?`Saved, but no live source could confirm it yet — nothing is shown until real data lands. It keeps trying; you can also reword what to track.`:`Couldn't confirm this with a live source, so it wasn't added — a tile only joins the board once a real search returns real data. Try again in a moment, or reword what to track.`}var l=e=>`${e.conversationId}@${e.at}`;function u(e){return{metrics:new Set(e.metrics.map(e=>e.id)),widgets:new Set(e.widgets.map(e=>e.id)),tripwires:new Set(e.tripwires.map(e=>e.id)),sources:new Set(e.sources.map(l))}}function d(e,r){let i=n(e);i&&t(e,{metrics:i.metrics.filter(e=>r.metrics.has(e.id)),widgets:i.widgets.filter(e=>r.widgets.has(e.id)),tripwires:i.tripwires.filter(e=>r.tripwires.has(e.id)),sources:i.sources.filter(e=>r.sources.has(l(e)))})}var f=1500,p=45e3,m=2,h=1e4,g=e=>new Promise(t=>setTimeout(t,e));function _(e,t){return!(n(e)?.metrics??[]).filter(e=>!(t?.metrics.has(e.id)??!1)).some(e=>e.query.trim()!==``&&!e.blankKey&&e.lastValue==null)}var v={unverified:`no live source could confirm it returns real data`,"no-model":`no model was connected to check it with`,failed:`the model could not be reached to check it`};function y(t,n,a,o,s=Date.now()){let c=e(o);n===null?c&&r(t,c,s):d(t,n);let l=v[o];return i({kind:`alert`,text:n===null?`“${a}” is waiting on its first check — ${l}.`:`The addition to “${a}” was rolled back — ${l}.`,dashboardIds:[t],searches:0}),o}async function b(e,t){let r=n(e);if(!r)return`failed`;if(!a(r))return`confirmed`;let i=r.title,s=Date.now(),c=async()=>{let t=await o(e);for(let r=0;t===`busy`&&r<p;r+=f){if(await g(f),(n(e)?.lastRefreshedAt??0)>=s)return`landed`;t=await o(e)}return t},l=await c();for(let e=0;e<m&&l===`failed`;e++)await g(h),l=await c();return(l===`done`||l===`landed`)&&_(e,t)?`confirmed`:l===`landed`?y(e,t,i,`unverified`):y(e,t,i,l===`no-model`||l===`failed`?l:`unverified`)}export{b as i,u as n,c as r,s as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./react-BZJXY1be.js";import{a as t,i as n}from"./spokenText-Dy-GZvZV.js";import{O as r,k as i}from"./kokoro-
|
|
1
|
+
import{t as e}from"./react-BZJXY1be.js";import{a as t,i as n}from"./spokenText-Dy-GZvZV.js";import{O as r,k as i}from"./kokoro-DcP-u0Tl.js";import{n as a,t as o}from"./contentVault-XKWjF2FB.js";import{J as s,j as c}from"./store-D16dGt7I.js";import{n as l,s as u}from"./ledger-DHS2di3l.js";import{a as d,i as f}from"./format-BkvssSOr.js";var p=14,m=2,h=12096e5,g={"15min":()=>`hourly`,hourly:e=>e===0?`daily`:`6h`};function _(e){switch(e){case`15min`:return`every 15 min`;case`hourly`:return`hourly`;case`6h`:return`every 6 hours`;case`daily`:return`daily`;case`manual`:return`manual`}}function v(e,t,n){if(!f(e))return null;let r=g[e.cadence.data];if(!r||t<p||n>m)return null;let i=r(n),a=s[e.cadence.data],o=s[i];if(!Number.isFinite(a)||!Number.isFinite(o)||o<=a)return null;let c=Math.round(t*(1-a/o)*(30/7));return c<=0?null:{dashboardId:e.id,to:i,savesPerMonth:c,checks7d:t,opens7d:n}}function y(e,t,n){let r=n-h;return e.some(e=>e.kind===`savings`&&e.at>=r&&e.suggestion?.dashboardId===t)}function b(e,t,n,r,i,a=3){let o=[];for(let s of e){if(o.length>=a)break;if(y(t,s.id,i))continue;let e=v(s,n(s.id),r(s.id));e&&o.push(e)}return o}function x(e,t){let n=t.opens7d===1?`1 time`:`${t.opens7d} times`;return`You check ${e.title} ${_(e.cadence.data)} but only opened it ${n} this week. Dropping to ${_(t.to)} would save about ${t.savesPerMonth} searches a month.`}function S(e){return{action:`set-cadence`,dashboardId:e.dashboardId,to:e.to,savesPerMonth:e.savesPerMonth,state:`open`}}function C(e,t){let n=new Map(e.map(e=>[e.id,e]));for(let e of t){let t=n.get(e.dashboardId);t&&l({kind:`savings`,text:x(t,e),dashboardIds:[e.dashboardId],searches:0,suggestion:S(e)})}}function ee(e,t,n,r=Date.now()){c(t,{data:n},r),u(e,`applied`),l({kind:`savings`,text:`Applied — cadence dropped to ${_(n)}.`,dashboardIds:[t],searches:0})}function w(e){u(e,`dismissed`)}var T=`mavea-dash-optimizer-date`;function E(e){return new Date(e).toISOString().slice(0,10)}function D(e){try{return typeof localStorage>`u`?!1:localStorage.getItem(T)===E(e)}catch{return!1}}function O(e){try{typeof localStorage<`u`&&localStorage.setItem(T,E(e))}catch{}}function k(e,t,n,r,i=Date.now()){D(i)||(O(i),C(e,b(e,t,n,r,i)))}var A=e(),j=`mavea-dash-briefing-v1`,M=j,N=`mavea-dash-briefing-date`;function P(e){return new Date(e).toISOString().slice(0,10)}function F(e){return!!e&&typeof e==`object`}function I(e){return!F(e)||typeof e.dashboardId!=`string`||!e.dashboardId||typeof e.label!=`string`||typeof e.value!=`string`?null:{dashboardId:e.dashboardId,label:e.label,value:e.value}}function L(e){if(!F(e)||typeof e.date!=`string`||typeof e.text!=`string`||!e.text)return null;let t=typeof e.at==`number`&&Number.isFinite(e.at)?e.at:0,n=Array.isArray(e.chips)?e.chips.map(I).filter(e=>e!==null):[];return{date:e.date,at:t,text:e.text,...typeof e.spoken==`string`&&e.spoken?{spoken:e.spoken}:{},chips:n}}var R;async function z(e){try{if(typeof localStorage>`u`)return;localStorage.setItem(j,await a(e))}catch{}}function te(){try{if(typeof localStorage>`u`)return null;let e=localStorage.getItem(j);if(!e)return null;let t=L(JSON.parse(e));return t&&z(t),t}catch{return null}}async function B(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(j);if(!e)return;try{JSON.parse(e);return}catch{}let t=L(await o(e));R=t,typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(M,{detail:t}))}catch{}}B();function V(){return R??=te(),R}function H(e){R=e,z(e);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(M,{detail:e}))}catch{}}function U(e){return window.addEventListener(M,e),()=>window.removeEventListener(M,e)}function W(){return(0,A.useSyncExternalStore)(U,V,G)}function G(){return null}function K(){try{return typeof localStorage>`u`?null:localStorage.getItem(N)}catch{return null}}function q(e){try{typeof localStorage<`u`&&localStorage.setItem(N,e)}catch{}}function J(e){return K()!==P(e)}function Y(e){q(P(e))}function X(e,t){let n=[];for(let r of e){if(t.has(r.id))continue;let e=d(r);!e||e.value===`—`||n.push(`- ${r.title}: ${e.label} is ${e.value}`)}return n.join(`
|
|
2
2
|
`)}function Z(e){let t=[];for(let n of e){let e=d(n);!e||e.value===`—`||t.push({dashboardId:n.id,label:e.label,value:e.value})}return t}function Q(e,r,i){let a=n(e),o=t(e),s={date:P(i),at:i,text:a,...o&&o!==a?{spoken:o}:{},chips:Z(r)};return H(s),Y(i),s}function ne(e,t){i(r(t||e),`mavea`)}var $=`mavea-dashboard-tripwire-toast`;function re(e){try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent($,{detail:e}))}catch{}}function ie(e){let t=t=>e(t.detail);return window.addEventListener($,t),()=>window.removeEventListener($,t)}export{Q as a,ee as c,X as i,w as l,ie as n,ne as o,J as r,W as s,re as t,k as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,o as t,r as n,t as r}from"./deepenStore-BWLLzLCY.js";import{n as i}from"./catalog-vLsIS_Na.js";import{i as a}from"./blockTypes-DUDdP3pB.js";import{liveSystemPrompt as o,validateLiveResponse as s}from"./liveSchema-eKgFc5D0.js";import{t as c}from"./providers-CPhoN8j0.js";import{i as l,n as u,r as d,t as f}from"./cache-7UEbF3S6.js";import{n as p}from"./ledger-BssK9Pv2.js";import{a as m}from"./select-
|
|
1
|
+
import{n as e,o as t,r as n,t as r}from"./deepenStore-BWLLzLCY.js";import{n as i}from"./catalog-vLsIS_Na.js";import{i as a}from"./blockTypes-DUDdP3pB.js";import{liveSystemPrompt as o,validateLiveResponse as s}from"./liveSchema-eKgFc5D0.js";import{t as c}from"./providers-CPhoN8j0.js";import{i as l,n as u,r as d,t as f}from"./cache-7UEbF3S6.js";import{n as p}from"./ledger-BssK9Pv2.js";import{a as m}from"./select-StjZ4ZRN.js";var h=3,g=1300,_=24,v=`GO DEEPER DRAWER — the learner pressed "Go deeper" on ONE concept section of an answer you already gave. Author ONLY that drawer's content. BLOCK COUNT — override any count above: exactly 2-${h} blocks. Lead with a concrete worked example or the derivation/mechanism, then an edge case, analogy, or self-test check where one genuinely helps. These are REAL authored explanations for a learner who asked to go further — never a rehash of the cards already shown, never filler, and real data only. Set "title" to the section's name and keep "narration" to one short sentence; omit "tour".`;function y(e){return o(e,`brief`)}function b(e,t,n){let r=n.map(e=>`- ${e.type}: ${e.props.title??``}`).join(`
|
|
2
2
|
`).slice(0,1200),i=[...e.sections.keys()].filter(e=>e!==t).join(`; `);return`QUESTION: ${e.ask.slice(0,500)}
|
|
3
3
|
|
|
4
4
|
SECTION TO DEEPEN: ${t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={eligibilitycheck:{title:`Do you qualify for the first-time buyer down-payment grant`,icon:`proof`,overall:`depends`,requirements:[{rule:`First-time buyer (no owned home in the last 3 years)`,status:`pass`,detail:`You said you have rented for the past 6 years — clears the rule.`},{rule:`Household income under $96,000`,status:`pass`,detail:`You stated $78k combined, comfortably under the cap.`},{rule:`Complete an approved homebuyer education course`,status:`needs-info`,detail:`You have not mentioned a course, and it is required before closing.`,fix:`Finish a HUD-approved class (free, ~8 hours online) and keep the certificate.`},{rule:`Minimum credit score of 640`,status:`fail`,detail:`You mentioned a score around 615, below the 640 floor.`,fix:`Raise it ~25 points — clearing a balance or two often does it within a cycle.`}],caveat:`This weighs the published rules against what you told me — confirm the exact thresholds with the program office before you apply.`},evidencetrace:{title:`Why I flagged onboarding`,icon:`proof`,iconColor:`var(--presence)`,claim:`Confusing onboarding is the <b>top reason</b> first-month accounts churned.`,summary:`12 of 240 churned accounts`,items:[{text:`“I never figured out how to invite my team, so we gave up in week one.”`,source:`ticket #4821`,when:`Apr 12`},{text:`“The setup wizard kept looping me back to the start. Cancelled.”`,source:`cancel survey`,when:`Apr 19`},{text:`“Couldn’t connect our calendar — no clear next step after sign-up.”`,source:`ticket #4910`,when:`Apr 23`},{text:`“Too many empty screens on day one. Didn’t know where to begin.”`,source:`exit interview`,when:`May 2`},{text:`“Import failed silently and I assumed the product was broken.”`,source:`ticket #5033`,when:`May 8`}],caveat:`Self-reported in cancellation flows — weighted toward people who chose to explain why they left.`,footer:`Each line is a verbatim record from a churned account, not a summary.`},reviewsynth:{title:`What buyers say about the cashmere wrap`,rating:4.4,count:1842,distribution:[1180,410,150,60,42],loves:[{theme:`Feels genuinely luxe`,freq:`68% mention`,quote:`Softer than scarves twice the price — it actually feels special.`},{theme:`Generous, drapey size`,freq:`common`,quote:`Big enough to wrap up in on a cold flight, not a flimsy little thing.`}],complaints:[{theme:`Sheds at first`,freq:`1 in 5`,quote:`Lost a few fibers the first week, then it settled down.`},{theme:`Hand-wash only`,freq:`occasional`,quote:`Wish I could toss it in the machine — the care is fussy.`}],dealbreaker:`It must be hand-washed and laid flat — if she would not fuss over it, the machine-washable merino blend is the safer gift.`,footer:`Synthesized from 1,842 verified-purchase reviews.`},annotateddoc:{title:`The trial abstract, annotated`,icon:`doc`,iconColor:`var(--presence)`,docName:`STEP 1 · NEJM 2021 · abstract`,paragraphs:[`In this 68-week, double-blind trial, we randomly assigned 1,961 adults with a body-mass index of 30 or greater to once-weekly semaglutide (2.4 mg) or placebo, plus lifestyle intervention.`,`The mean change in body weight from baseline to week 68 was −14.9% in the semaglutide group, as compared with −2.4% with placebo. Participants who received semaglutide had greater improvements in cardiometabolic risk factors.`,`Nausea and diarrhea were the most common adverse events; they were typically transient and mild-to-moderate and subsided over time.`],highlights:[{phrase:`1,961 adults`,note:`Large, adequately powered sample for a Phase 3 obesity RCT.`,color:`var(--insight)`,author:`Sample`},{phrase:`−14.9%`,note:`The headline efficacy figure, replicated downstream in STEP 2–4.`,color:`var(--presence)`,author:`Endpoint`},{phrase:`Nausea and diarrhea`,note:`Real but tolerable, drives much of the early discontinuation.`,color:`var(--warning)`,author:`Safety`}],footer:`Click a highlight to read why it matters to the verdict.`},redline:{title:`How the abstract's claim was tightened`,icon:`edit`,iconColor:`var(--warning)`,docName:`Draft conclusion · v3 → v4`,tokens:[{text:`Semaglutide `},{del:`cures obesity`,by:`AM`},{ins:`produces clinically meaningful weight loss`,by:`AM`},{text:` and `},{del:`eliminates`,by:`ED`},{ins:`reduces`,by:`ED`},{text:` cardiovascular risk in trial populations.`}],footer:`2 deletions · 2 insertions, softening "cure" to "clinically meaningful."`},citationchain:{title:`Claim → source → sub-evidence`,icon:`link`,iconColor:`var(--presence-soft)`,root:{label:`<b>Semaglutide drives ~15% weight loss</b> at 68 weeks`,cite:`synthesis`,color:`var(--insight)`,strength:`strong`,children:[{label:`STEP 1 randomized trial`,cite:`nejm.org`,color:`var(--presence)`,strength:`strong`,children:[{label:`Table 2, mean change −14.9%`,cite:`p. 994`,strength:`strong`},{label:`Pre-registered endpoint`,cite:`NCT03548935`,strength:`strong`}]},{label:`Cochrane meta-analysis`,cite:`cochrane.org`,color:`var(--presence-soft)`,strength:`strong`,children:[{label:`Pooled across 11 RCTs`,cite:`2024`,strength:`strong`},{label:`Low heterogeneity (I²=22%)`,cite:`forest plot`,strength:`partial`}]}]},footer:`Every node traces to a primary document, expand to walk the chain.`},factcheck:{title:`The load-bearing claims, checked`,icon:`proof`,iconColor:`var(--presence)`,claims:[{claim:`Semaglutide produces ~15% mean weight loss at 68 weeks.`,verdict:`true`,confidence:96,sources:[`nejm.org`,`cochrane.org`],detail:`STEP 1 reported <mark>−14.9%</mark>; the Cochrane synthesis corroborates within 1pt.`},{claim:`Tirzepatide outperforms semaglutide on weight loss.`,verdict:`partly`,confidence:74,sources:[`nejm.org`,`jama.com`],detail:`SURMOUNT-1 (−20.9%) vs STEP 1 (−14.9%), but no head-to-head at matched doses yet.`},{claim:`GLP-1 drugs have cured the obesity epidemic.`,verdict:`false`,confidence:91,sources:[`cdc.gov`,`claims data`],detail:`Population obesity prevalence has not meaningfully fallen; reach is ~2% of eligible adults.`},{claim:`Therapy reduces major cardiovascular events.`,verdict:`true`,confidence:89,sources:[`nejm.org`],detail:`SELECT showed a <mark>20% relative MACE reduction</mark> in overweight CV patients.`}],footer:`Each verdict expands to its sources, green is replicated, amber is single-study.`},confidencemeter:{title:`Confidence in the headline number`,icon:`shield`,iconColor:`var(--insight)`,claim:`<b>~15% weight loss</b> at 68 weeks on semaglutide 2.4mg`,overall:94,segments:[{label:`RCT design`,weight:38,band:`strong`,basis:`Randomized, double-blind, placebo-controlled Phase 3.`},{label:`Replication`,weight:30,band:`strong`,basis:`Reproduced across STEP 1–4 and a Cochrane meta-analysis.`},{label:`Sample size`,weight:18,band:`strong`,basis:`n=1,961 in the anchor trial alone.`},{label:`Generalizability`,weight:14,band:`partial`,basis:`Trial adherence far exceeds real-world persistence.`}],footer:`The only soft segment is generalizing trial results to everyday use.`},highlightsnippet:{title:`The sentence everything hangs on`,icon:`quote`,iconColor:`var(--insight)`,quote:`The mean change in body weight from baseline to week 68 was −14.9% in the semaglutide group, as compared with −2.4% in the placebo group.`,phrase:`−14.9% in the semaglutide group`,source:`NEJM · STEP 1`,locator:`p. 994`,color:`var(--insight)`,footer:`Pulled verbatim, this is the primary endpoint, not a press summary.`},annotcallouts:{title:`Contact sheet · notes`,icon:`doc`,iconColor:`var(--presence)`,caption:`Day 2 selects, what made the cut and why.`,ratio:1.7777777777777777,callouts:[{x:20,y:30,label:`01 · keep`,note:`Cleanest horizon line of the morning, <b>this is the poster</b>.`,color:`var(--presence)`},{x:56,y:26,label:`02 · maybe`,note:`Nice light, but a tourist on the path. <mark>Clone-out or cut.</mark>`,color:`var(--warning)`},{x:38,y:70,label:`03 · cut`,note:`Cloud went flat here, no separation in the greens.`,color:`var(--danger)`},{x:80,y:64,label:`04 · keep`,note:`The transition frame for the hydrangea road.`,color:`var(--insight)`}],footer:`Pins map to the selects in your edit folder.`},sourcelist:{title:`Sources I kept`,icon:`doc`,iconColor:`var(--insight)`,sources:[{domain:`nejm.org`,titleText:`STEP 1: Once-Weekly Semaglutide in Adults with Overweight`,relevance:98,glyph:`N`,color:`var(--insight)`,date:`2021`,snippet:`The anchor efficacy RCT, <mark>−14.9%</mark> mean weight change.`},{domain:`nejm.org`,titleText:`SURMOUNT-1: Tirzepatide for Obesity`,relevance:95,glyph:`N`,color:`var(--insight)`,date:`2022`,snippet:`−20.9% at the 15mg dose over 72 weeks.`},{domain:`nejm.org`,titleText:`SELECT: Semaglutide and Cardiovascular Outcomes`,relevance:92,glyph:`N`,color:`var(--presence)`,date:`2023`,snippet:`20% relative reduction in major adverse CV events.`},{domain:`cochrane.org`,titleText:`GLP-1 agonists for weight management (review)`,relevance:90,glyph:`C`,color:`var(--presence-soft)`,date:`2024`},{domain:`cdc.gov`,titleText:`Adult Obesity Prevalence Maps`,relevance:78,glyph:`C`,color:`var(--text-muted)`,date:`2025`}],footer:`Ranked by relevance, three NEJM RCTs carry the efficacy claim.`},claimgrid:{title:`Claims × evidence, who backs what`,icon:`table`,iconColor:`var(--presence-soft)`,columns:[`STEP 1`,`SURMOUNT-1`,`SELECT`,`Cochrane`,`Claims data`],rows:[{claim:`~15% weight loss`,cells:[{state:`yes`,note:`−14.9% primary endpoint`},{state:`yes`,note:`Exceeds it (−20.9%)`},{state:`partial`,note:`Secondary outcome`},{state:`yes`,note:`Pooled confirmation`},{state:`na`}]},{claim:`Cardiovascular benefit`,cells:[{state:`na`},{state:`na`},{state:`yes`,note:`−20% MACE`},{state:`partial`,note:`Noted, not pooled`},{state:`na`}]},{claim:`Durable in real life`,cells:[{state:`partial`,note:`Only to 68 weeks`},{state:`partial`},{state:`na`},{state:`no`,note:`Trials ≠ adherence`},{state:`no`,note:`33% persist at 1yr`}]},{claim:`Cured obesity epidemic`,cells:[{state:`no`},{state:`no`},{state:`no`},{state:`no`},{state:`no`,note:`Prevalence flat`}]}],footer:`The bottom row is empty of green, which is exactly the headline.`},docoutline:{title:`How the report is structured`,icon:`layers`,iconColor:`var(--insight)`,docName:`GLP-1 evidence review`,activeIndex:1,sections:[{heading:`1 · The question`,loc:`p.1`,weight:6},{heading:`2 · Efficacy evidence`,loc:`p.2`,weight:40,children:[{heading:`2.1 Anchor RCT (STEP 1)`,loc:`p.2`,weight:16},{heading:`2.2 Tirzepatide comparison`,loc:`p.4`,weight:14},{heading:`2.3 Meta-analysis`,loc:`p.5`,weight:10}]},{heading:`3 · Real-world impact`,loc:`p.6`,weight:28,children:[{heading:`3.1 Adherence & persistence`,loc:`p.6`,weight:16},{heading:`3.2 Access & cost`,loc:`p.7`,weight:12}]},{heading:`4 · Verdict & caveats`,loc:`p.8`,weight:14}],footer:`The efficacy section carries the most weight, and the strongest evidence.`},docview:{title:`The method paper, the scheme I used`,icon:`doc`,iconColor:`var(--presence)`,source:`Hoffmann et al. · uploaded · 22 pp`,page:{n:7,of:22},blocks:[{kind:`h2`,text:`§4.1, Pressure-velocity coupling`},{kind:`p`,text:`We use a collocated finite-volume discretization with Rhie–Chow interpolation to suppress checkerboard pressure modes.`},{kind:`p`,text:`Stability requires the under-relaxation factors to satisfy α_p + α_u ≤ 1 on stretched meshes.`,spot:!0},{kind:`eq`,text:`α_p = 0.3 , α_u = 0.7 ⇒ α_p + α_u = 1.0`},{kind:`p`,text:`Outside this bound the continuity residual stalls rather than decays, the failure mode in run 043.`}],note:`This is the line your run 043 violated (you had α_u = 0.85). Run 044 sits exactly on the bound, which is why the residual finally <b>decays instead of stalling</b>.`,footer:`I pulled the stability condition straight from the paper and tied it to why 043 stalled and 044 converged, no re-reading 22 pages.`},pdfreader:{title:`The reference, in full`,icon:`doc`,iconColor:`var(--text-muted)`,source:`NASA TM 108834 · Holst, 1994 · public domain`,file:`/demo-assets/pdf/cfd-primer.pdf`,footer:`The actual report, embedded, scroll the real PDF for the derivations behind the scheme.`},diffviewer:{title:`Your answer, corrected`,leftLabel:`submitted`,rightLabel:`key`,lines:[{kind:`ctx`,text:`Step 1: identify the nucleophile`,oldNo:1,newNo:1},{kind:`del`,text:`Step 2: SN1, backside attack`,oldNo:2},{kind:`add`,text:`Step 2: SN2, backside attack inverts config`,newNo:2},{kind:`ctx`,text:`Step 3: name the product`,oldNo:3,newNo:3}]},clinicaltimeline:{title:`Admission timeline, Mr. Alvarez`,events:[{date:`48h ago`,type:`symptom`,label:`Fever 39.1°C, productive cough, dyspnoea on exertion`},{date:`36h ago`,type:`visit`,label:`ED presentation, SpO₂ 91% on room air`},{date:`34h ago`,type:`test`,label:`CXR ordered, right lower lobe infiltrate`},{date:`34h ago`,type:`test`,label:`Blood cultures × 2, CBC, CRP, procalcitonin`},{date:`30h ago`,type:`result`,label:`WBC 14.2, CRP 187, procalcitonin 2.1, bacterial picture`},{date:`29h ago`,type:`diagnosis`,label:`Community-acquired pneumonia, RLL, admitted`},{date:`28h ago`,type:`treatment`,label:`IV amoxicillin-clavulanate started, O₂ via NRB mask`},{date:`Now`,type:`result`,label:`Fever breaking, SpO₂ 96% on 2L nasal cannula`}]},researchsummary:{title:`GLP-1 agonists, evidence summary`,question:`Are GLP-1 receptor agonists effective and safe for long-term weight management in adults with obesity?`,method:`Cochrane systematic review + meta-analysis of 14 RCTs`,sampleSize:`~18,000 participants, follow-up 52–208 weeks`,year:`2023`,findings:[`Semaglutide 2.4 mg achieved mean body-weight reduction of 12–15% vs 2–3% for placebo.`,`All GLP-1 agonists outperformed placebo on the primary weight outcome (high certainty).`,`Cardiovascular event rates fell significantly in high-risk populations (SELECT trial).`,`Gastrointestinal side-effects (nausea, vomiting) are common but typically transient.`],conclusion:`GLP-1 agonists are the most effective pharmacotherapy for obesity currently available. Long-term benefit requires continuous use, discontinuation leads to weight regain within one year.`,limitations:`Most trials exclude people with prior GI surgery; long-term safety beyond 5 years is not yet established.`,source:`Iepsen et al. · Cochrane Database Syst Rev · 2023`},hypothesiscard:{title:`SELECT trial, primary hypothesis`,icon:`proof`,iconColor:`var(--presence)`,h0:`Semaglutide 2.4 mg does not reduce the rate of major adverse cardiovascular events (MACE) versus placebo in adults with overweight or obesity and established cardiovascular disease, without diabetes.`,h1:`Semaglutide 2.4 mg reduces the rate of MACE versus placebo in this population.`,direction:`two-tailed`,alpha:.05,variables:{iv:`Treatment arm, semaglutide 2.4 mg vs placebo`,dv:`Time to first MACE (CV death, non-fatal MI, non-fatal stroke)`},rejected:!0,footer:`HR 0.80 (95% CI 0.72–0.90), p < 0.001 — a highly significant reduction in MACE.`},paralleltext:{title:`One line, three hands`,icon:`layers`,iconColor:`var(--presence)`,caption:`Dante, Inferno I.1 — the opening tercet, original beside two canonical English renderings.`,columns:[{label:`Dante (1320)`,lang:`Italian`},{label:`Longfellow, 1867`,lang:`en`},{label:`Ciardi, 1954`,lang:`en`}],rows:[{cells:[`Nel mezzo del cammin di nostra vita`,`Midway upon the journey of our life`,`Midway in our life’s journey, I went astray`],note:`Ciardi pulls “I went astray” up from line 3 to keep the pentameter; Longfellow tracks the Italian word order.`},{cells:[`mi ritrovai per una selva oscura,`,`I found myself within a forest dark,`,`from the straight road and woke to find myself`],note:`Both keep the dark wood, but Longfellow mirrors the line break while Ciardi enjambs across it.`,diverge:!0},{cells:[`ché la diritta via era smarrita.`,`For the straightforward pathway had been lost.`,`alone in a dark wood. How shall I say`],note:`“diritta via” — the straight way — is rendered literally by Longfellow; Ciardi defers it, ending instead on the speaker’s hesitation.`,diverge:!0}],footer:`Read each row across: the same Italian line, weighed differently for <strong>meter</strong> vs <strong>literal sense</strong>.`},resume:{name:`John Smith`,title:`Senior Product Manager`,icon:`doc`,iconColor:`var(--presence)`,contact:[`john.smith@example.com`,`Austin, TX`,`example.com/in/johnsmith`],summary:`Product leader with eight years in B2B SaaS, the last three managing a team of five. Led the usage-based pricing rework that lifted net revenue retention 18 points.`,experience:[{role:`Senior Product Manager`,org:`Meridian Analytics`,start:`2022`,location:`Austin, TX`,bullets:[`Led the pricing-model rework that took net revenue retention from 96% to 114%.`,`Grew the team from two to five PMs and stood up a quarterly roadmap review.`,`Owned the platform API surface used by 40+ enterprise integrations.`]},{role:`Product Manager`,org:`Northwind Labs`,start:`2019`,end:`2022`,location:`Remote`,bullets:[`Shipped the self-serve onboarding flow that cut time-to-first-value from 9 days to 36 hours.`,`Ran discovery for the mobile app, now 30% of monthly active usage.`]},{role:`Associate Product Manager`,org:`Fieldstone Software`,start:`2017`,end:`2019`,location:`Chicago, IL`,bullets:[`Owned the reporting-module roadmap for the mid-market tier.`]}],education:[{school:`University of Illinois at Urbana-Champaign`,credential:`B.S. Industrial Engineering`,start:`2013`,end:`2017`,detail:`Minor in Computer Science`}],skills:[`Product strategy`,`Pricing & packaging`,`SQL`,`Roadmapping`,`A/B testing`,`Stakeholder management`,`API design`],footer:`Kept current from your LinkedIn export, in case the new role wants it this week.`},changelog:{title:`What six weeks of a source publication could look like`,icon:`doc`,iconColor:`var(--presence)`,versions:[{version:`v1.0`,date:`Wk 6`,entries:[{kind:`added`,text:`Public release: docs site and the reviewed source-available snapshot.`},{kind:`added`,text:`Maintainer-built connector catalog.`}]},{version:`v0.4`,date:`Wk 4`,entries:[{kind:`added`,text:`Soft launch to twelve design-partner teams.`},{kind:`changed`,text:`Switched the component schema to the stable v1 contract.`},{kind:`fixed`,text:`Local build no longer requires the internal package registry.`}]},{version:`v0.3`,date:`Wk 3`,entries:[{kind:`added`,text:`PolyForm Noncommercial terms, feedback policy, and legal notices.`},{kind:`deprecated`,text:`The old private-snapshot publication script.`}]},{version:`v0.2`,date:`Wk 2`,entries:[{kind:`removed`,text:`Internal-only connectors, scrubbed from the public snapshot.`},{kind:`security`,text:`Purged secrets accidentally left in the git history before the split.`}]},{version:`v0.1`,date:`Wk 1`,entries:[{kind:`added`,text:`Client and schema carved out into their own repository.`}]}],footer:`Five fictional milestones from carve-out to public source release.`},lessonplan:{title:`Today's tutoring session: reaction mechanisms`,icon:`doc`,iconColor:`var(--presence)`,subject:`Organic Chemistry`,gradeLevel:`Undergraduate · Org Chem II`,objectives:[`Distinguish SN1 from SN2 by substrate, nucleophile strength, and solvent.`,`Predict the major product and stereochemistry for a given substitution reaction.`,`Read a rate law and identify the reaction order it implies.`],materials:[`Flashcard deck`,`Practice problem set 7`,`Molecular model kit`],procedure:[{step:`Warm-up recall`,detail:`Quick flashcard pass on SN1 vs SN2 triggers.`,minutes:10},{step:`Mechanism walkthrough`,detail:`Work three mechanisms on the board, narrating each arrow-pushing step.`,minutes:25},{step:`Paired practice`,detail:`Two students per problem from set 7, then swap and check.`,minutes:20},{step:`Timed mini-mock`,detail:`Five questions, exam conditions, no notes.`,minutes:15},{step:`Debrief`,detail:`Review the two most-missed questions together.`,minutes:10}],assessment:`Exit ticket: one SN1 and one SN2 prediction, graded on mechanism arrows and stereochemistry, not just the final product.`,footer:`Built around the two gaps your last mock exposed: arrow-pushing notation and solvent effects.`},casebrief:{title:`The precedent behind that redline`,icon:`proof`,iconColor:`var(--presence)`,citation:`812 F. Supp. 2d 501 (D. Del. 2019)`,parties:{plaintiff:`Bell Fabrication, Inc.`,defendant:`Meridian Systems, LLC`},facts:`Bell signed a 24-month services agreement with a silent auto-renewal clause requiring 90 days notice to opt out. Bell missed the window by six days and was billed for a full renewal term it no longer wanted.`,issue:`Whether a 90-day auto-renewal notice window, buried in a boilerplate term clause, is enforceable against a sophisticated commercial buyer who never separately negotiated it.`,holding:`Enforceable, but only narrowly — the clause was conspicuously formatted and the buyer had counsel review the contract; the court signaled a shorter, negotiated window would likely have been required otherwise.`,reasoning:`The court weighed three things: whether the term was buried or set apart, whether the buyer had a real chance to negotiate it, and whether 90 days exceeds commercial custom (it found market practice clusters at 30–60 days). All three cut close, so it upheld the clause narrowly rather than setting a bright-line rule.`,footer:`The takeaway for §8.2: a 90-day window is defensible, but only barely, negotiating it down to 30 removes the risk entirely.`},patentclaimchart:{title:`One more diligence check: Acme's sync engine against a live patent`,icon:`table`,iconColor:`var(--presence)`,claimElements:[{id:`1.1`,text:`receiving, at a server, a stream of shipment-location updates from a plurality of mobile devices`},{id:`1.2`,text:`storing each location update in a distributed ledger replicated across at least three nodes`},{id:`1.3`,text:`detecting a conflict between two location updates for the same shipment received within a threshold time window`},{id:`1.4`,text:`automatically resolving the conflict using a timestamp-priority rule without human intervention`},{id:`1.5`,text:`pushing the resolved location to a customer-facing dashboard in real time`}],references:[`Acme's platform (accused)`,`US 9,112,233 (prior art)`],cells:[[{state:`disclosed`,quote:`Edge devices stream GPS pings to the ingest cluster every 4 seconds.`},{state:`disclosed`,quote:`Sensor readings are logged to a central event bus polled by field units.`}],[{state:`disclosed`,quote:`Every update is written to a 3-node Raft-replicated ledger before ack.`},{state:`disclosed`,quote:`Readings are mirrored to a backup store for durability.`}],[{state:`disputed`,quote:`Acme’s docs describe "duplicate suppression," which may or may not be the claimed conflict detection — worth a follow-up question.`},{state:`not-disclosed`}],[{state:`not-disclosed`},{state:`not-disclosed`}],[{state:`disclosed`,quote:`Resolved coordinates post to the live tracking map within 400ms.`},{state:`not-disclosed`}]],footer:`Acme's platform is missing element 1.4 — conflicts get flagged for manual review, not auto-resolved — so it doesn't literally practice the claim; no license carve-out needed to sign. Same gap means this reference doesn't invalidate the patent either, so revisit if Acme ever ships auto-resolution.`},storystructure:{title:`Draft: council approves bridge funding`,icon:`doc`,iconColor:`var(--presence)`,lede:`The City Council voted 5-2 Tuesday night to approve $12 million in emergency funding for a new pedestrian bridge over Route 9, after two years of delay following a fatal crossing accident.`,nutGraf:`The vote ends a contentious two-year debate that pitted residents demanding safer crossings against a council wary of the price tag. Construction is expected to begin next spring and finish by 2028, funded largely by a state safety grant secured last month.`,body:[`Council member Elena Vasquez, who sponsored the funding measure, said the vote “finally puts safety ahead of cost” after years of near-misses at the intersection.`,`The bridge will connect the Riverside neighborhood to the transit hub on the north side of Route 9, a stretch pedestrians currently cross at grade despite a 45 mph speed limit.`,`Two council members who voted no, Raymond Chu and Priya Patel, said they support the bridge in principle but wanted a competitive bid process before locking in a contractor.`,`Construction is slated to begin in April, with the city's public works department targeting a completion date in late 2027.`],background:[`The push for a bridge gained urgency after a cyclist was struck and killed at the intersection in March 2025, prompting a petition that collected more than 3,000 signatures.`,`The city considered a traffic-light-only fix in 2023 but shelved it after a traffic study found it would only reduce, not eliminate, the crossing risk.`,`The $12 million project includes an $8 million state Safe Streets grant awarded last month, with the remaining $4 million drawn from the city's capital reserve fund.`],wordCount:179,wordCountBudget:250,footer:`Inverted pyramid: the vote and its stakes lead, the who-said-what follows, history stays below the fold.`},vetpatientchart:{title:`Biscuit's first wellness exam`,icon:`doc`,iconColor:`var(--presence)`,species:`Canine`,name:`Biscuit`,breed:`Golden Retriever`,sex:`Male`,weightKg:5,vitals:[{label:`Temperature`,value:101.8,unit:`°F`},{label:`Heart rate`,value:150,unit:`bpm`},{label:`Respiratory rate`,value:24,unit:`bpm`},{label:`Body condition score`,value:`5/9`},{label:`Gum color`,value:`Pink`},{label:`Capillary refill`,value:`<2s`}],problems:[`Transient loose stool — post-adoption stress, monitoring`],footer:`All vitals normal for a 9-week Golden. The loose stool is expected from the move; call Maple Animal Care if it persists past a couple more days.`},scoutingreport:{title:`Up next: scouting Thursday's Nuggets`,icon:`chart`,iconColor:`var(--presence)`,opponent:`Denver Nuggets`,tendencies:[`Run their offense almost entirely through Jokić at the elbow, he's averaging 9 assists a game from the post.`,`Switch aggressively on the perimeter, which has bothered Golden State's off-ball movement in past meetings.`,`Struggle to defend in transition, allowing the 4th-most fast-break points in the league.`,`Lean heavily on their bench trio in the second quarter, often their most vulnerable defensive stretch.`],matchupNotes:[{label:`Pace`,note:`Denver plays slower than Golden State prefers; expect the Warriors to push tempo early rather than get pulled into a half-court grind.`},{label:`Rebounding`,note:`The Nuggets crash the offensive glass hard, Golden State needs to box out or risk giving up second-chance points.`},{label:`3-point defense`,note:`Denver ranks middle-of-the-pack defending the arc, exactly where Golden State's offense lives.`}],keyPlayers:[{name:`Nikola Jokić`,role:`C`,note:`Reigning MVP-caliber center who doubles as their point guard from the elbow. He's a step slower going left, force him that direction.`},{name:`Jamal Murray`,role:`PG`,note:`Streaky scorer who heats up in isolation late in games; live with early clock jumpers rather than switching everything off him.`},{name:`Aaron Gordon`,role:`PF`,note:`Their best transition finisher, get back on makes and misses alike.`}],footer:`A win Thursday pulls the Warriors within one game of Denver for the 2-seed, exactly the matchup the West race hinges on.`}};export{e as default};
|