@mavea/mavea 1.1.0 → 1.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 +98 -0
- package/DISCLAIMER.md +2 -1
- package/PRIVACY.md +5 -4
- package/README.md +20 -15
- package/TERMS.md +3 -1
- package/dist/.vite/manifest.json +645 -576
- package/dist/assets/AnnotationLayer-8JABh1Dm.js +0 -0
- package/dist/assets/{AppCommandPalette-Dm3SedPO.js → AppCommandPalette-CgDUWU08.js} +1 -1
- package/dist/assets/AreaChart-DZGCSEwt.js +1 -0
- package/dist/assets/CadenceCard-P4teI7Se.js +1 -0
- package/dist/assets/CanvasSkeleton-CRGWlafo.js +1 -0
- package/dist/assets/{CheckLogRail-BU_rmAFH.js → CheckLogRail-DO7sbZwC.js} +1 -1
- package/dist/assets/{CommandPalette-E3reEqYR.js → CommandPalette-Bs6tpdZl.js} +1 -1
- package/dist/assets/{ConversationVideoStudio-DEZBpJUz.js → ConversationVideoStudio-tpqQQnOs.js} +1 -1
- package/dist/assets/CourseLessonReader-PFJn-4tj.js +2 -0
- package/dist/assets/{CourseRail-C8MJG-zf.js → CourseRail-DXt3bzjU.js} +1 -1
- package/dist/assets/{CoursesApp-DFVkhP2f.js → CoursesApp-5pnHYJR8.js} +2 -2
- package/dist/assets/{DashPresent-DwWDtjrU.js → DashPresent-B6MP1i_4.js} +1 -1
- package/dist/assets/DashboardDetail-8J8TsdQg.css +1 -0
- package/dist/assets/DashboardDetail-DYFghZ4p.js +2 -0
- package/dist/assets/DashboardLoopGate-C0blM1w9.js +2 -0
- package/dist/assets/DashboardLoopRuntime-C9R-z9-o.js +1 -0
- package/dist/assets/DashboardSettings-CE0B2y2y.js +1 -0
- package/dist/assets/DashboardsApp-Dh_jh1dF.js +2 -0
- package/dist/assets/{DeepZoomApp-CxdcUeFJ.js → DeepZoomApp-UEPtylG7.js} +1 -1
- package/dist/assets/{DelegatePanel-B0kIu8Et.js → DelegatePanel-DKWsRY9I.js} +1 -1
- package/dist/assets/{DemoGallery-B__X0_H3.js → DemoGallery-CkuqAXje.js} +1 -1
- package/dist/assets/{DropSelect-C3uYlej-.js → DropSelect-QcBm3N4D.js} +1 -1
- package/dist/assets/{ExportModal-CDGlhpdH.js → ExportModal-Ya0VBbxa.js} +1 -1
- package/dist/assets/{ExtractionPreview-CloJnrQi.js → ExtractionPreview-BFrmqKDo.js} +2 -2
- package/dist/assets/{FeatureUseNotice-CwHstxBh.js → FeatureUseNotice-Dc3GNBvy.js} +1 -1
- package/dist/assets/{FlagshipCommandPalette-CHsD5BSH.js → FlagshipCommandPalette-B1yHwI6V.js} +1 -1
- package/dist/assets/{FlagshipShowcase-D53Q_4m0.js → FlagshipShowcase-BHAlRDAE.js} +1 -1
- package/dist/assets/{FlashcardsApp-CnLfEnDH.js → FlashcardsApp-DteNeHpz.js} +1 -1
- package/dist/assets/{GalleryApp-2Ffc6CY6.js → GalleryApp-DziLKFJZ.js} +1 -1
- package/dist/assets/{HonestByDesign-5jIu2ZC8.js → HonestByDesign-DZltb3Ss.js} +1 -1
- package/dist/assets/{HowItWorks-BiJF84EM.js → HowItWorks-D-hgfN6a.js} +1 -1
- package/dist/assets/{LegalApp-zC-rvTww.js → LegalApp-ChzcKiY0.js} +1 -1
- package/dist/assets/{LegalMarkdownDocument-CJ-gRHdX.js → LegalMarkdownDocument-j6UHhPnp.js} +1 -1
- package/dist/assets/{LegalPageShell-Dyd4Uh3r.js → LegalPageShell-Wcsviye1.js} +1 -1
- package/dist/assets/{LibraryOverlay-_xpWdhLN.js → LibraryOverlay-YHBrdVKo.js} +1 -1
- package/dist/assets/LiveApp-C-OPBybd.css +1 -0
- package/dist/assets/LiveApp-D6vkyhZb.js +79 -0
- package/dist/assets/{LiveSettings-BceODlOb.js → LiveSettings-C9cKOrSb.js} +3 -3
- package/dist/assets/{MindMapViewerDrawer-BuDodC0s.js → MindMapViewerDrawer-DI_S7fRZ.js} +1 -1
- package/dist/assets/{MindShape-CBcCC7hP.js → MindShape-C_Bo9hW9.js} +1 -1
- package/dist/assets/{PinToDashboard-DBIXvhlF.js → PinToDashboard-BCiWaSg8.js} +1 -1
- package/dist/assets/PlanReview-BIERfK1t.js +1 -0
- package/dist/assets/{Presence-CKSoyuhE.js → Presence-UqXfH4Y-.js} +1 -1
- package/dist/assets/{PresentationDeck-C518t9pP.js → PresentationDeck-BW_7qecK.js} +1 -1
- package/dist/assets/{PrismApp-DRLl8841.js → PrismApp-BY71jJvW.js} +2 -2
- package/dist/assets/{PrismAskController-QRwxRP8D.js → PrismAskController-Bt0k9hAA.js} +1 -1
- package/dist/assets/{PrismBriefingPlayer-Kyb8Vs_w.js → PrismBriefingPlayer-DLAPs6eZ.js} +2 -2
- package/dist/assets/{PrismOverlay-Bj7tCu5Q.js → PrismOverlay-DJDGPGxo.js} +3 -3
- package/dist/assets/{PrismWorkbench-BCnhkp-S.js → PrismWorkbench-DHLvpguj.js} +1 -1
- package/dist/assets/{PrivacyApp-DHSRr8wq.js → PrivacyApp-uMjq2z14.js} +6 -5
- package/dist/assets/{ReplayCard-CKo5reXy.js → ReplayCard-F7U3LYAg.js} +2 -2
- package/dist/assets/{ReplayOverlay-DqAwLshS.js → ReplayOverlay-BTldvkU7.js} +1 -1
- package/dist/assets/{RewindOverlay-CkJIETE0.js → RewindOverlay-CousnxXo.js} +1 -1
- package/dist/assets/{RippleApp-C76VTaZK.js → RippleApp-DZw8op-E.js} +2 -2
- package/dist/assets/{RippleAskController-CdlMlRH8.js → RippleAskController-9SxpZnHX.js} +1 -1
- package/dist/assets/{RippleOverlay-Mvz3CXhD.js → RippleOverlay-D7ItTvS-.js} +2 -2
- package/dist/assets/{SeeDontRead-BkySmnP3.js → SeeDontRead-DmmtWAzn.js} +1 -1
- package/dist/assets/{ShareModal-Cl3ryjgK.js → ShareModal-9jSn52Mw.js} +2 -2
- package/dist/assets/{ShipCourse-Cy5ldKLE.js → ShipCourse-Up9gRR07.js} +1 -1
- package/dist/assets/{SignatureLoop-Cdkifjb8.js → SignatureLoop-Cq790dMw.js} +1 -1
- package/dist/assets/{SynthesisApp-C5udWwng.js → SynthesisApp-4ZPLZgmJ.js} +2 -2
- package/dist/assets/{SynthesisOverlay-1o-CJsyX.js → SynthesisOverlay-iesJ0hEt.js} +1 -1
- package/dist/assets/{TermsApp-DIAESAZs.js → TermsApp-DL2hFKsv.js} +4 -2
- package/dist/assets/TopicCanvas-DozfZFto.js +2 -0
- package/dist/assets/{TourPrism-Bxp--s0i.js → TourPrism-kInUOv-M.js} +1 -1
- package/dist/assets/TrackerTile-BryDo0sm.js +2 -0
- package/dist/assets/{TwoSurfaces-C_0XBpwA.js → TwoSurfaces-Cmj95ofx.js} +1 -1
- package/dist/assets/{WhyMachineOverlay-QDSZx5Y7.js → WhyMachineOverlay-ks9-rRiL.js} +1 -1
- package/dist/assets/{WorldOverlay-DRdBQMnb.css → WorldOverlay-D7ay5y4D.css} +1 -1
- package/dist/assets/WorldOverlay-yhxq328s.js +2 -0
- package/dist/assets/{WowFeatures-DNEeO2pr.js → WowFeatures-DDICbxl_.js} +1 -1
- package/dist/assets/{ZoomDeck-qdlPe_yl.js → ZoomDeck-CKOjYS9z.js} +1 -1
- package/dist/assets/{annotationAuto-BmKrZ3hU.js → annotationAuto-CDv6Es44.js} +1 -1
- package/dist/assets/{backup-PaRBwjJy.js → backup-ZrlVatXc.js} +1 -1
- package/dist/assets/canvas-vqIFVmtP.js +1 -0
- package/dist/assets/{capture-CL9ENM-c.js → capture-9OrAc1p2.js} +1 -1
- package/dist/assets/confirmAdd-DkmbWaSk.js +1 -0
- package/dist/assets/{coreIcons-BzqW7Qiz.js → coreIcons-DDTChE1H.js} +1 -1
- package/dist/assets/{dashboardEvents-D-wLCp1A.js → dashboardEvents-D-XVj666.js} +1 -1
- package/dist/assets/{dashboards-CdzGklae.css → dashboards-C1u2ks-d.css} +1 -1
- package/dist/assets/dataPending-DGdCvY5Y.js +1 -0
- package/dist/assets/display-CAb_PiGv.js +1 -0
- package/dist/assets/{engine-2U7mvPIl.js → engine-BiM6INsW.js} +1 -1
- package/dist/assets/{engine-BF8FqSbi.css → engine-CTvOaA86.css} +1 -1
- package/dist/assets/{explode-qQ7Fzt6V.js → explode-BgZIWY9m.js} +1 -1
- package/dist/assets/format-g3dP8OI3.js +1 -0
- package/dist/assets/{generate-C9vOL1C2.js → generate-Dl2EJ_SR.js} +1 -1
- package/dist/assets/{generateBeats-DpDpBcgV.js → generateBeats-DtptFLlG.js} +1 -1
- package/dist/assets/{generateCourse-DU281tDE.js → generateCourse-C9qvaJRo.js} +1 -1
- package/dist/assets/{generateLive-_x2tWkBH.js → generateLive-B6purd69.js} +13 -13
- package/dist/assets/{index-D4FIsool.css → index-DrzNHwlO.css} +1 -1
- package/dist/assets/index-zIa6h_8b.js +22 -0
- package/dist/assets/{kokoro-CdL8Kl48.js → kokoro-B3oG_8sd.js} +1 -1
- package/dist/assets/lens-ChFJD9il.js +1 -0
- package/dist/assets/loader-DCA6Njbf.js +2 -0
- package/dist/assets/{model-DxwoIVpo.js → model-BFRTN9Eh.js} +1 -1
- package/dist/assets/{notes-CUeZ1cYu.js → notes-B6eX5XWk.js} +1 -1
- package/dist/assets/{number-Bmf7DqLj.js → number-zqlPMliA.js} +1 -1
- package/dist/assets/{pen-BAEq0JnM.js → pen-DNMslo3e.js} +1 -1
- package/dist/assets/{perfProbe-3Ip5n0yx.js → perfProbe-CE7hsUEo.js} +1 -1
- package/dist/assets/{pin-BwWjjqmt.js → pin-BZuh1acO.js} +1 -1
- package/dist/assets/{planTracker-BI9z_0gW.js → planTracker-KKAtTBWs.js} +1 -1
- package/dist/assets/{portal-BJzn-Tgn.js → portal-k_BMgWND.js} +1 -1
- package/dist/assets/{prewarm-CheeUP2L.js → prewarm-uKxmzjjd.js} +1 -1
- package/dist/assets/{providers-B2OCzEo1.js → providers-BovElgRL.js} +1 -1
- package/dist/assets/{quietHours-DCMczU9R.js → quietHours-DI1ayIIq.js} +1 -1
- package/dist/assets/{ready-DZY1bETr.js → ready-jtAUOb62.js} +1 -1
- package/dist/assets/receipts-D7zveV-I.js +1 -0
- package/dist/assets/{registry-D_4_HlMg.js → registry-1wlTAh5b.js} +1 -1
- package/dist/assets/registry-6DGRAB1m.js +1 -0
- package/dist/assets/{registry-ChQGee7C.js → registry-B2QzCuWH.js} +1 -1
- package/dist/assets/registry-BFrgx1tE.js +1 -0
- package/dist/assets/registry-Cse2wF7x.css +1 -0
- package/dist/assets/registry-DGNSqTxE.js +1 -0
- package/dist/assets/{registry-BM9FDQxO.js → registry-DtV2UjBx.js} +1 -1
- package/dist/assets/{registry-BRbEINOV.js → registry-Dwbh-GWu.js} +1 -1
- package/dist/assets/{relate-BXcg3Ioz.js → relate-UW-sUlJH.js} +1 -1
- package/dist/assets/{replay-rSsGKjEc.js → replay-B5TkHPri.js} +1 -1
- package/dist/assets/{run-ndUTOxjM.js → run-Df10YPyB.js} +1 -1
- package/dist/assets/{run-CkaYNX89.js → run-DlvA3l28.js} +1 -1
- package/dist/assets/{run-aj7robML.js → run-gmqUaxcL.js} +1 -1
- package/dist/assets/seed-D_P5jyog.js +1 -0
- package/dist/assets/shapes-Cx5SCKgj.js +39 -0
- package/dist/assets/store-CsjDEADX.js +1 -0
- package/dist/assets/tiles-D-s6v-mA.js +1 -0
- package/dist/assets/types-DuEbJpIA.js +1 -0
- package/dist/assets/useDashboardLoop-BoVNM-pT.js +5 -0
- package/dist/assets/{useDashboards-GafZIADI.js → useDashboards-SRk8LqHe.js} +1 -1
- package/dist/assets/{useLiveConfig-DWz7BRdk.js → useLiveConfig-Cpy0_E_-.js} +1 -1
- package/dist/assets/{useStudy-CFIuakaM.js → useStudy-5CsF_L-s.js} +1 -1
- package/dist/assets/validate-sGUCmPAs.js +4 -0
- package/dist/assets/value-Dx7DZob4.js +1 -0
- package/dist/assets/{walkSync-AAocUygp.js → walkSync-CT8kmbzY.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/legal/DISCLAIMER.md +2 -1
- package/dist/legal/PRIVACY.md +5 -4
- package/dist/legal/TERMS.md +3 -1
- package/docs/media/course-lesson.jpg +0 -0
- package/docs/media/living-answer.jpg +0 -0
- package/package.json +3 -1
- package/dist/assets/AnnotationLayer-IiuYsoSa.js +0 -0
- package/dist/assets/CanvasSkeleton-CcHXJqdq.js +0 -2
- package/dist/assets/CourseLessonReader-Bpt-DkJo.js +0 -2
- package/dist/assets/DashboardDetail-D4wkiTux.js +0 -2
- package/dist/assets/DashboardLoopGate-B5UBPsvU.js +0 -2
- package/dist/assets/DashboardLoopRuntime-CAnZX234.js +0 -1
- package/dist/assets/DashboardSettings-eMhHliVh.js +0 -1
- package/dist/assets/DashboardsApp-BwFtTdWa.js +0 -2
- package/dist/assets/LiveApp-BNae3fDZ.css +0 -1
- package/dist/assets/LiveApp-DjcJQURO.js +0 -78
- package/dist/assets/PlanReview-DUQ7OMvV.js +0 -1
- package/dist/assets/TopicCanvas-DkzJORfl.js +0 -2
- package/dist/assets/TrackerTile-CyPD0A6b.js +0 -2
- package/dist/assets/WorldOverlay-DorHCLzw.js +0 -1
- package/dist/assets/canvas-BlkTFnVo.js +0 -1
- package/dist/assets/confirmAdd-CZPBG1xe.js +0 -1
- package/dist/assets/dataPending-lZUzUEo6.js +0 -1
- package/dist/assets/display-BrieMea1.js +0 -1
- package/dist/assets/format-rPI6ZwwH.js +0 -1
- package/dist/assets/index-CfcUMOBf.js +0 -22
- package/dist/assets/receipts-ClyzFFGD.js +0 -1
- package/dist/assets/registry-9QjeHgKs.js +0 -1
- package/dist/assets/registry-D4Xdd7dO.js +0 -1
- package/dist/assets/registry-DScSjt8p.css +0 -1
- package/dist/assets/registry-DuP_q42N.js +0 -1
- package/dist/assets/seed-DN4mRJp-.js +0 -1
- package/dist/assets/shapes-C5fjibEc.js +0 -42
- package/dist/assets/store-B39HvB_l.js +0 -1
- package/dist/assets/tiles-pdNi6MGe.js +0 -1
- package/dist/assets/useDashboardLoop-B_YA5jLs.js +0 -5
- package/dist/assets/validate-CnG23_8J.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./compiler-runtime-qQQXpJgv.js";import{t as r}from"./jsx-runtime-DeHZSEgm.js";import{n as i}from"./icons-gLFQTv74.js";import{t as a}from"./richText-BkxJhl9N.js";import{t as o}from"./safeImageUrl-BINWXOTz.js";import{r as s}from"./lib-B7OE1ZQQ.js";import{t as c}from"./registry-types-D3q_LrlV.js";import{r as l,s as u,t as d}from"./kokoro-CdL8Kl48.js";import{t as f}from"./safeCssColor-di93BXgG.js";var p=t(),m=r(),h=480,g=90,_=240,v=390,y=120,b=38,x=14;function S(e){let t=e.toLowerCase();return t.includes(`proto`)||t.includes(`pie`)||t.includes(`indo`)?`var(--text-muted)`:t.includes(`latin`)||t.includes(`greek`)||t.includes(`ancient`)?`var(--presence)`:t.includes(`french`)||t.includes(`romance`)||t.includes(`spanish`)||t.includes(`italian`)?`var(--insight)`:t.includes(`german`)||t.includes(`dutch`)||t.includes(`nordic`)||t.includes(`norse`)?`var(--warning)`:t.includes(`arabic`)||t.includes(`persian`)||t.includes(`sanskrit`)?`var(--danger)`:`var(--text-secondary)`}var C=18,w=22;function T(e,t){return e.length>t?e.slice(0,t-1).trimEnd()+`…`:e}function E({word:e,roots:t,descendants:n,note:r,footer:i,delay:o}){let{vbH:s,wordY:c,wordCY:l,rootBoxes:u,descBoxes:d}=(0,p.useMemo)(()=>{let e=t??[],r=n??[],i=e.length,a=r.length,o=Math.max(i,a,1)*52-x+32+12,s=Math.max(o,120),c=s/2,l=c-b/2,u=c-(i*52-(i>0?x:0))/2,d=e.map((e,t)=>({r:e,x:g-y/2,y:u+t*52,cy:u+t*52+b/2,color:S(e.lang)})),f=c-(a*52-(a>0?x:0))/2;return{vbH:s,wordY:l,wordCY:c,rootBoxes:d,descBoxes:r.map((e,t)=>({d:e,x:v-y/2,y:f+t*52,cy:f+t*52+b/2,color:S(e.lang??``)}))}},[t,n]),f=(e,t,n,r)=>{let i=(e+n)/2;return`M ${e.toFixed(1)},${t.toFixed(1)} C ${i.toFixed(1)},${t.toFixed(1)} ${i.toFixed(1)},${r.toFixed(1)} ${n.toFixed(1)},${r.toFixed(1)}`};return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(o??0)+`ms`},children:[(0,m.jsx)(`div`,{className:`et-wrap`,children:(0,m.jsxs)(`svg`,{className:`et-svg`,viewBox:`0 0 ${h} ${s}`,role:`img`,"aria-label":`Etymology of "${e}"`,preserveAspectRatio:`xMidYMid meet`,children:[u.map((e,t)=>(0,m.jsx)(`path`,{d:f(150,e.cy,_-y/2,l),fill:`none`,stroke:e.color,strokeWidth:`1.5`,opacity:`0.75`},`rc${t}`)),d.map((e,t)=>(0,m.jsx)(`path`,{d:f(300,l,v-y/2,e.cy),fill:`none`,stroke:e.color,strokeWidth:`1.5`,opacity:`0.75`},`dc${t}`)),u.map(({r:e,x:t,y:n,cy:r,color:i},a)=>{let o=e.lang+(e.gloss?` · ${e.gloss}`:``);return(0,m.jsxs)(`g`,{children:[(0,m.jsx)(`rect`,{x:t,y:n,width:y,height:b,rx:6,className:`et-box`,style:{stroke:i}}),(0,m.jsxs)(`text`,{x:g,y:r-7,textAnchor:`middle`,className:`et-form`,children:[e.form.length>C&&(0,m.jsx)(`title`,{children:e.form}),T(e.form,C)]}),(0,m.jsxs)(`text`,{x:g,y:r+9,textAnchor:`middle`,className:`et-lang`,style:{fill:i},children:[o.length>w&&(0,m.jsx)(`title`,{children:o}),T(o,w)]})]},`r${a}`)}),(0,m.jsx)(`rect`,{x:_-y/2,y:c,width:y,height:b,rx:8,className:`et-word-box`}),(0,m.jsx)(`text`,{x:_,y:l+5,textAnchor:`middle`,className:`et-word`,children:e}),d.map(({d:e,x:t,y:n,cy:r,color:i},a)=>{let o=e.lang?`${e.lang}${e.gloss?` · ${e.gloss}`:``}`:e.gloss??``;return(0,m.jsxs)(`g`,{children:[(0,m.jsx)(`rect`,{x:t,y:n,width:y,height:b,rx:6,className:`et-box`,style:{stroke:i}}),(0,m.jsxs)(`text`,{x:v,y:r-7,textAnchor:`middle`,className:`et-form`,children:[e.form.length>C&&(0,m.jsx)(`title`,{children:e.form}),T(e.form,C)]}),(0,m.jsxs)(`text`,{x:v,y:r+9,textAnchor:`middle`,className:`et-lang`,style:{fill:i},children:[o.length>w&&(0,m.jsx)(`title`,{children:o}),T(o,w)]})]},`d${a}`)}),(0,m.jsx)(`text`,{x:g,y:12,textAnchor:`middle`,className:`et-col-hdr`,children:`Roots`}),d.length>0&&(0,m.jsx)(`text`,{x:v,y:12,textAnchor:`middle`,className:`et-col-hdr`,children:`Descendants`})]})}),r&&(0,m.jsx)(`div`,{className:`et-note`,children:r}),i&&(0,m.jsx)(`div`,{className:`insight-summary`,dangerouslySetInnerHTML:a(i),style:{marginTop:12}})]})}function D({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,subject:r,tagline:o,facts:s,body:c,footer:l,delay:u}){let d=i[t]??i.doc,f=s??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`fs-subject`,children:r}),o&&(0,m.jsx)(`div`,{className:`fs-tagline`,children:o}),f.length>0&&(0,m.jsx)(`div`,{className:`fs-facts`,children:f.map((e,t)=>(0,m.jsxs)(`div`,{className:`fs-row`,children:[(0,m.jsx)(`span`,{className:`fs-label`,children:e.label}),(0,m.jsxs)(`span`,{className:`fs-value`,...t===0?{"data-mark":`underline`}:{},children:[e.value,e.note&&(0,m.jsxs)(`span`,{className:`fs-note`,children:[` `,e.note]})]})]},t))}),c&&(0,m.jsx)(`div`,{className:`fs-body`,dangerouslySetInnerHTML:a(c)}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}var O=n(),k={flammable:`Flammable`,corrosive:`Corrosive`,toxic:`Toxic`,irritant:`Irritant`,oxidizer:`Oxidizer`,healthHazard:`Health hazard`,environment:`Environment`,explosive:`Explosive`,compressedGas:`Compressed gas`},ee=`12,1.6 22.4,12 12,22.4 1.6,12`,te={flammable:()=>(0,m.jsx)(`path`,{className:`ghs-symbol-fill`,d:`M12 6c1.9 2.4 2.9 4.2 2.9 6a2.9 2.9 0 0 1-5.8 0c0-.7.15-1.3.45-1.85-.05.5.1.9.5 1.15-.15-1.7.3-3.4 1.95-5.3Z`}),corrosive:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`line`,{x1:`5.6`,y1:`13.4`,x2:`18.4`,y2:`13.4`}),(0,m.jsx)(`path`,{d:`M9 6.6v3.6q0 1.7-1.1 3.2`}),(0,m.jsx)(`path`,{d:`M15 6.6v3.6q0 1.7 1.1 3.2`}),(0,m.jsx)(`path`,{d:`M7.6 15.4q.6 1.2 0 2.4`}),(0,m.jsx)(`path`,{d:`M16.4 15.4q.6 1.4-.2 2.6`})]}),toxic:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`circle`,{cx:`12`,cy:`10.1`,r:`3.15`}),(0,m.jsx)(`circle`,{className:`ghs-symbol-fill`,cx:`10.6`,cy:`9.8`,r:`0.55`}),(0,m.jsx)(`circle`,{className:`ghs-symbol-fill`,cx:`13.4`,cy:`9.8`,r:`0.55`}),(0,m.jsx)(`path`,{d:`M10.6 12.3q1.4 1 2.8 0`}),(0,m.jsx)(`path`,{d:`M8.1 17.1 15.9 13.7`}),(0,m.jsx)(`path`,{d:`M8.1 13.7 15.9 17.1`})]}),irritant:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol-fill`,children:[(0,m.jsx)(`rect`,{x:`11.05`,y:`6.4`,width:`1.9`,height:`6.6`,rx:`0.95`}),(0,m.jsx)(`circle`,{cx:`12`,cy:`15.9`,r:`1.1`})]}),oxidizer:()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`circle`,{className:`ghs-symbol`,cx:`12`,cy:`15.1`,r:`3.05`}),(0,m.jsx)(`path`,{className:`ghs-symbol-fill`,d:`M12 6c1.5 2 2.3 3.5 2.3 5a2.3 2.3 0 0 1-4.6 0c0-.55.1-1 .3-1.45-.05.4.1.7.4.9-.1-1.35.35-2.7 1.6-4.45Z`})]}),healthHazard:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`circle`,{cx:`12`,cy:`7.5`,r:`1.75`}),(0,m.jsx)(`path`,{d:`M8.3 17c.1-3.15 1.7-5.1 3.7-5.1s3.6 1.95 3.7 5.1`}),(0,m.jsx)(`path`,{d:`M12 12.6v3.4`}),(0,m.jsx)(`path`,{d:`M10.5 14.3h3`}),(0,m.jsx)(`path`,{d:`M10.8 13.15l2.4 2.4`}),(0,m.jsx)(`path`,{d:`M13.2 13.15l-2.4 2.4`})]}),environment:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`path`,{d:`M8.7 7.4v6.2`}),(0,m.jsx)(`path`,{d:`M8.7 9.7 7 8.2`}),(0,m.jsx)(`path`,{d:`M8.7 8.9l1.9-1.6`}),(0,m.jsx)(`path`,{d:`M8.7 11.7 7 13`}),(0,m.jsx)(`path`,{d:`M6 15.9c1.35.85 2.85.85 4.2 0`}),(0,m.jsx)(`path`,{d:`M13.6 15.9c1.35.85 2.85.85 4.2 0`}),(0,m.jsx)(`path`,{className:`ghs-symbol-fill`,d:`M14.9 12.6c1.7-.35 3.05.2 3.7 1.15-.7.95-2.1 1.5-3.7 1.15.35-.5.35-1.8 0-2.3Z`})]}),explosive:()=>(0,m.jsxs)(`g`,{children:[(0,m.jsx)(`circle`,{className:`ghs-symbol-fill`,cx:`12`,cy:`12`,r:`1.55`}),(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`path`,{d:`M12 6.5v2.3`}),(0,m.jsx)(`path`,{d:`M12 15.2v2.3`}),(0,m.jsx)(`path`,{d:`M6.5 12h2.3`}),(0,m.jsx)(`path`,{d:`M15.2 12h2.3`}),(0,m.jsx)(`path`,{d:`M8.3 8.3l1.6 1.6`}),(0,m.jsx)(`path`,{d:`M14.1 14.1l1.6 1.6`}),(0,m.jsx)(`path`,{d:`M15.7 8.3l-1.6 1.6`}),(0,m.jsx)(`path`,{d:`M9.9 14.1l-1.6 1.6`})]})]}),compressedGas:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`rect`,{x:`9.3`,y:`9.1`,width:`5.4`,height:`8.4`,rx:`1.3`}),(0,m.jsx)(`rect`,{x:`10.55`,y:`6.35`,width:`2.9`,height:`2.4`,rx:`0.5`}),(0,m.jsx)(`line`,{x1:`9.6`,y1:`12.6`,x2:`14.4`,y2:`12.6`})]})};function ne(e){let t=(0,O.c)(7),{kind:n,className:r}=e,i=te[n],a=k[n],o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,m.jsx)(`polygon`,{className:`ghs-diamond`,points:ee}),t[0]=o):o=t[0];let s;t[1]===i?s=t[2]:(s=(0,m.jsx)(i,{}),t[1]=i,t[2]=s);let c;return t[3]!==r||t[4]!==a||t[5]!==s?(c=(0,m.jsxs)(`svg`,{viewBox:`0 0 24 24`,role:`img`,"aria-label":a,className:r,children:[o,s]}),t[3]=r,t[4]=a,t[5]=s,t[6]=c):c=t[6],c}function re({title:e,icon:t=`alert`,iconColor:n=`var(--danger)`,cas:r,signalWord:o,pictograms:s,hazards:c,precautions:l,footer:u,delay:d}){let f=i[t]??i.alert,p=o===`Warning`,h=p?`var(--warning)`:`var(--danger)`,g=(s??[]).filter(e=>e in k),_=c??[],v=l??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,m.jsxs)(`div`,{className:`hc-cas`,children:[`CAS `,r]}),(0,m.jsxs)(`div`,{className:`hc-signal`,style:{"--hc-c":h},role:`status`,children:[(0,m.jsx)(`span`,{className:`hc-signal-icon`,children:(0,m.jsx)(i.alert,{})}),(0,m.jsx)(`span`,{className:`hc-signal-word`,children:p?`Warning`:`Danger`})]}),g.length>0&&(0,m.jsx)(`div`,{className:`hc-pictograms`,children:g.map((e,t)=>(0,m.jsxs)(`div`,{className:`hc-pic m-stagger-item m-scale-in`,style:{"--i":t},children:[(0,m.jsx)(ne,{kind:e,className:`hc-pic-glyph`}),(0,m.jsx)(`span`,{className:`hc-pic-label`,children:k[e]})]},t))}),_.length>0&&(0,m.jsxs)(`div`,{className:`hc-section`,children:[(0,m.jsx)(`div`,{className:`hc-section-label`,children:`Hazards`}),(0,m.jsx)(`div`,{className:`hc-codes`,children:_.map((e,t)=>(0,m.jsxs)(`div`,{className:`hc-code-row m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,m.jsx)(`span`,{className:`hc-code`,children:e.code}),(0,m.jsx)(`span`,{className:`hc-code-text`,children:e.text})]},t))})]}),v.length>0&&(0,m.jsxs)(`div`,{className:`hc-section`,children:[(0,m.jsx)(`div`,{className:`hc-section-label`,children:`Precautions`}),(0,m.jsx)(`div`,{className:`hc-codes`,children:v.map((e,t)=>(0,m.jsxs)(`div`,{className:`hc-code-row m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,m.jsx)(`span`,{className:`hc-code`,children:e.code}),(0,m.jsx)(`span`,{className:`hc-code-text`,children:e.text})]},t))})]}),u&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function ie({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,topic:r,asOf:o,items:s,footer:c,delay:l}){let u=i[t]??i.globe,d=s??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`nd-meta`,children:[r&&(0,m.jsx)(`span`,{className:`nd-topic`,children:r}),(0,m.jsx)(`span`,{className:`nd-asof`,children:o})]}),(0,m.jsx)(`div`,{className:`nd-items`,children:d.map((e,t)=>(0,m.jsxs)(`div`,{className:`nd-item`,children:[(0,m.jsx)(`div`,{className:`nd-headline`,...t===0?{"data-mark":`underline`}:{},children:e.headline}),(e.source||e.time||e.category)&&(0,m.jsxs)(`div`,{className:`nd-item-meta`,children:[e.source&&(0,m.jsx)(`span`,{className:`nd-source`,children:e.source}),e.time&&(0,m.jsx)(`span`,{className:`nd-time`,children:e.time}),e.category&&(0,m.jsx)(`span`,{className:`nd-cat`,children:e.category})]}),e.summary&&(0,m.jsx)(`div`,{className:`nd-summary`,children:e.summary})]},t))}),c&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}function ae({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,fromLang:r,toLang:o,text:c,result:l,pairs:u,footer:d,delay:f}){let p=i[t]??i.globe,h=u??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`tl-langs`,children:[(0,m.jsx)(`span`,{className:`tl-from`,children:r}),(0,m.jsx)(`span`,{className:`tl-arrow`,children:`→`}),(0,m.jsx)(`span`,{className:`tl-to`,children:o})]}),(0,m.jsxs)(`div`,{className:`tl-pair`,children:[(0,m.jsx)(`div`,{className:`tl-source`,children:(0,m.jsx)(`div`,{className:`tl-text`,style:{color:`var(--text-secondary)`},children:c})}),(0,m.jsx)(`div`,{className:`tl-result`,children:(0,m.jsx)(`div`,{className:`tl-text`,style:{fontWeight:600},"data-mark":`underline`,children:l})})]}),(0,m.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:6},children:(0,m.jsx)(s,{text:l,label:`Copy ${o} translation`})}),h.length>0&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`div`,{style:{fontSize:`var(--fs-xs, 11px)`,fontWeight:700,color:`var(--text-muted)`,textTransform:`uppercase`,letterSpacing:`0.07em`,marginTop:14,marginBottom:4},children:`Breakdown`}),(0,m.jsx)(`div`,{className:`tl-breakdowns`,children:h.map((e,t)=>(0,m.jsxs)(`div`,{className:`tl-bp`,children:[(0,m.jsx)(`span`,{className:`tl-bp-orig`,children:e.original}),(0,m.jsxs)(`span`,{className:`tl-bp-trans`,children:[e.translated,e.note&&(0,m.jsx)(`span`,{className:`tl-bp-note`,style:{display:`block`,marginTop:2},children:e.note})]})]},t))})]}),d&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}function oe({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,word:r,ipa:o,syllables:s,tips:c,footer:l,delay:u}){let d=i[t]??i.doc,f=c??[],p=(()=>{if(!s)return[];let e=s.split(`·`);if(!o)return e.map(e=>({text:e,stressed:!1}));let t=(()=>{let t=o.indexOf(`ˈ`);if(t===-1)return-1;let n=o.replace(/[/[\]]/g,``),r=t/Math.max(n.length,1);return Math.min(Math.round(r*e.length),e.length-1)})();return e.map((e,n)=>({text:e,stressed:n===t}))})();return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`pr-word`,children:r}),o&&(0,m.jsx)(`div`,{className:`pr-ipa`,style:{display:`inline-block`,fontFamily:`var(--font-mono, monospace)`,fontStyle:`normal`,background:`var(--grid-line)`,borderRadius:`var(--r-sm, 4px)`,padding:`2px 8px`,marginTop:6,fontSize:`var(--fs-sm, 14px)`,color:`var(--text-primary)`,letterSpacing:`0.04em`},children:o}),p.length>0&&(0,m.jsx)(`div`,{className:`pr-syllables`,children:p.map((e,t)=>(0,m.jsxs)(`span`,{children:[t>0&&(0,m.jsx)(`span`,{"aria-hidden":`true`,style:{color:`var(--text-muted)`},children:`·`}),(0,m.jsx)(`span`,{style:e.stressed?{fontWeight:800,color:`var(--presence)`}:{fontWeight:400,color:`var(--text-secondary)`},...e.stressed?{"data-mark":`underline`}:{},children:e.text})]},t))}),f.length>0&&(0,m.jsx)(`div`,{className:`pr-tips`,children:f.map((e,t)=>(0,m.jsx)(`div`,{className:`pr-tip`,children:e},t))}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function se({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,word:r,phonetic:o,senses:s,etymology:c,footer:l,delay:u}){let d=i[t]??i.doc,f=s??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`dc-word`,children:r}),o&&(0,m.jsx)(`div`,{className:`dc-phonetic`,style:{fontFamily:`monospace`,fontStyle:`normal`},children:o}),f.length>0&&(0,m.jsx)(`ol`,{className:`dc-senses`,style:{listStyle:`none`,padding:0,margin:0},children:f.map((e,t)=>(0,m.jsxs)(`li`,{className:`dc-sense`,children:[(0,m.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},children:[(0,m.jsxs)(`span`,{style:{fontSize:`var(--fs-xs, 11px)`,fontWeight:700,color:`var(--text-faint)`,minWidth:`1.4em`},children:[t+1,`.`]}),(0,m.jsx)(`span`,{className:`dc-pos`,children:e.pos})]}),(0,m.jsx)(`div`,{className:`dc-def`,style:{paddingLeft:`calc(1.4em + 8px)`},...t===0?{"data-mark":`underline`}:{},children:e.definition}),e.example&&(0,m.jsx)(`div`,{className:`dc-example`,style:{marginLeft:`calc(1.4em + 8px)`},children:e.example}),(e.synonyms??[]).length>0&&(0,m.jsxs)(`div`,{className:`dc-synonyms`,style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:4,marginLeft:`calc(1.4em + 8px)`},children:[(0,m.jsx)(`span`,{style:{color:`var(--text-faint)`,marginRight:2},children:`syn.`}),(e.synonyms??[]).map((e,t)=>(0,m.jsx)(`span`,{style:{fontSize:`var(--fs-xs, 11px)`,padding:`1px 7px`,borderRadius:999,background:`var(--track)`,color:`var(--text-secondary)`,lineHeight:1.7},children:e},t))]})]},t))}),c&&(0,m.jsxs)(`div`,{className:`dc-etymology`,children:[(0,m.jsx)(`span`,{style:{fontWeight:600,fontStyle:`normal`,color:`var(--text-muted)`},children:`Etymology `}),c]}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function ce({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,domain:r,entries:o,footer:s,delay:c}){let l=i[t]??i.doc,u=(0,p.useMemo)(()=>[...o??[]].sort((e,t)=>e.term.localeCompare(t.term,void 0,{sensitivity:`base`})),[o]);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,m.jsx)(`div`,{className:`gl-domain`,children:r}),(0,m.jsx)(`div`,{className:`gl-entries`,children:u.map((e,t)=>{let n=e.term.charAt(0).toUpperCase(),r=n!==(t===0?null:u[t-1].term.charAt(0).toUpperCase());return(0,m.jsxs)(`div`,{children:[r&&(0,m.jsx)(`div`,{className:`gl-letter-divider`,"aria-hidden":`true`,children:n}),(0,m.jsxs)(`div`,{className:`gl-entry`,children:[(0,m.jsx)(`div`,{className:`gl-term`,children:e.term}),(0,m.jsx)(`div`,{className:`gl-def`,children:e.definition}),e.see&&(0,m.jsxs)(`div`,{className:`gl-see`,children:[`See also: `,(0,m.jsx)(`span`,{style:{fontStyle:`italic`},children:e.see})]})]})]},t)})}),s&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function A({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,value:r,unit:o,comparisons:s,footer:c,delay:l}){let u=i[t]??i.layers,d=s??[],f=e=>{let t=typeof e.howMany==`number`?e.howMany:Number(String(e.howMany).trim());return Number.isFinite(t)&&t>0?t:null},p=d.reduce((e,t)=>{let n=f(t);return n!==null&&n>e?n:e},0);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`scf-figure`,"data-mark":`underline`,children:[(0,m.jsx)(`span`,{className:`scf-value`,children:r}),o&&(0,m.jsx)(`span`,{className:`scf-unit`,children:o})]}),d.length>0&&(0,m.jsx)(`div`,{className:`scf-rows`,children:d.map((e,t)=>{let n=f(e),r=n!==null&&p>0?Math.max(n/p*100,4):0;return(0,m.jsxs)(`div`,{className:`scf-row`,children:[(0,m.jsxs)(`div`,{className:`scf-line`,children:[(0,m.jsx)(`span`,{className:`scf-count`,children:e.howMany}),(0,m.jsx)(`span`,{className:`scf-to`,children:e.to})]}),r>0&&(0,m.jsx)(`div`,{className:`scf-track`,"aria-hidden":`true`,children:(0,m.jsx)(`div`,{className:`scf-bar`,style:{width:r+`%`}})}),e.note&&(0,m.jsx)(`div`,{className:`scf-note`,children:e.note})]},t)})}),c&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var j=typeof window<`u`?window.AudioContext??window.webkitAudioContext:void 0,le={C:0,"C#":1,DB:1,D:2,"D#":3,EB:3,E:4,FB:4,F:5,"E#":5,"F#":6,GB:6,G:7,"G#":8,AB:8,A:9,"A#":10,BB:10,B:11,CB:11};function ue(e){let t=/^([A-Ga-g])([#b]?)(-?\d{1,2})$/.exec(e.trim());if(!t)return null;let n=le[t[1].toUpperCase()+(t[2]===`#`?`#`:t[2]===`b`?`B`:``)];return n===void 0?null:440*2**((n+(Number(t[3])+1)*12-69)/12)}function M(e){if(typeof e==`number`)return Number.isFinite(e)?e:null;let t=e.trim(),n=Number(t);return t!==``&&Number.isFinite(n)?n:ue(t)}var N={word:`chat`,note:`speaker`,tone:`speaker`};function P({title:e,icon:t=`speaker`,iconColor:n=`var(--presence)`,items:r,footer:o,delay:s}){let c=i[t]??i.speaker,f=r??[],[h,g]=(0,p.useState)(null),[_,v]=(0,p.useState)(!1),y=(0,p.useRef)(null),b=(0,p.useRef)(null),x=(0,p.useCallback)(()=>{if(b.current!==null&&(clearTimeout(b.current),b.current=null),y.current){let e=y.current;y.current=null,e.close().catch(()=>{})}d()},[]);(0,p.useEffect)(()=>x,[x]);let S=(0,p.useCallback)((e,t)=>{g(t),u(e,`mavea`).then(e=>{g(e=>e===t?null:e),!e&&l()===!1&&v(!0)})},[]),C=(0,p.useCallback)((e,t)=>{if(!j)return;let n=new j;y.current=n;let r=n.currentTime,i=.6,a=n.createOscillator();a.type=`sine`,a.frequency.setValueAtTime(e,r);let o=n.createGain();o.gain.setValueAtTime(1e-4,r),o.gain.exponentialRampToValueAtTime(.22,r+.04),o.gain.exponentialRampToValueAtTime(1e-4,r+i),a.connect(o).connect(n.destination),a.start(r),a.stop(r+i),g(t),a.onended=()=>{g(e=>e===t?null:e),y.current===n&&(y.current=null,n.close().catch(()=>{}))},b.current=setTimeout(()=>{y.current===n&&(y.current=null,n.close().catch(()=>{}),g(e=>e===t?null:e))},750)},[]),w=(0,p.useCallback)((e,t)=>{if(x(),e.kind===`word`){S(String(e.value),t);return}let n=M(e.value);n===null||n<=0||C(n,t)},[x,S,C]),T=e=>e.kind===`word`||!!j&&M(e.value)!==null,E=j?`This note can’t be played`:`Audio playback is unavailable in this browser`;return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`ul`,{className:`hri-rows`,children:f.map((e,t)=>{let n=T(e),r=h===t,a=i[N[e.kind]]??i.speaker;return(0,m.jsxs)(`li`,{className:`hri-row`,"data-playing":r||void 0,children:[(0,m.jsx)(`button`,{type:`button`,className:`hri-play`,onClick:()=>w(e,t),disabled:!n,title:n?`Play ${e.label}`:E,"aria-label":n?`Play ${e.label}`:`${e.label} — ${E}`,children:r?(0,m.jsxs)(`span`,{className:`hri-wave`,"aria-hidden":`true`,children:[(0,m.jsx)(`span`,{}),(0,m.jsx)(`span`,{}),(0,m.jsx)(`span`,{})]}):(0,m.jsx)(i.play,{className:`ic hri-play-ic`,style:{width:13,height:13}})}),(0,m.jsxs)(`div`,{className:`hri-body`,children:[(0,m.jsx)(`div`,{className:`hri-label`,children:e.label}),e.sub&&(0,m.jsx)(`div`,{className:`hri-sub`,children:e.sub})]}),(0,m.jsxs)(`span`,{className:`hri-kind`,children:[(0,m.jsx)(a,{className:`ic hri-kind-ic`,style:{width:12,height:12}}),e.kind]})]},t)})}),_&&(0,m.jsx)(`p`,{className:`insight-summary`,role:`status`,style:{marginTop:12},children:`Voice is off — start the local voice service to hear this.`}),o&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var F=[{s:`i`,back:0,high:0},{s:`y`,back:0,high:0,rounded:!0},{s:`ɨ`,back:.5,high:0},{s:`u`,back:1,high:0,rounded:!0},{s:`ɪ`,back:.18,high:.18},{s:`ʊ`,back:.82,high:.18,rounded:!0},{s:`e`,back:0,high:.34},{s:`ø`,back:0,high:.34,rounded:!0},{s:`ə`,back:.5,high:.5},{s:`o`,back:1,high:.34,rounded:!0},{s:`ɛ`,back:.08,high:.66},{s:`ɜ`,back:.5,high:.66},{s:`ʌ`,back:.78,high:.66},{s:`ɔ`,back:1,high:.66,rounded:!0},{s:`a`,back:.06,high:1},{s:`æ`,back:.16,high:.84},{s:`ɑ`,back:.9,high:1},{s:`ɒ`,back:1,high:1,rounded:!0}],I=[`Plosive`,`Nasal`,`Fricative`,`Approx.`,`Lateral`],L=[`Bilab.`,`Labiod.`,`Dental`,`Alveolar`,`Postalv.`,`Velar`,`Glottal`],R={"Plosive|Bilab.":[`p`,`b`],"Plosive|Alveolar":[`t`,`d`],"Plosive|Velar":[`k`,`g`],"Plosive|Glottal":[`ʔ`,``],"Nasal|Bilab.":[``,`m`],"Nasal|Alveolar":[``,`n`],"Nasal|Velar":[``,`ŋ`],"Fricative|Labiod.":[`f`,`v`],"Fricative|Dental":[`θ`,`ð`],"Fricative|Alveolar":[`s`,`z`],"Fricative|Postalv.":[`ʃ`,`ʒ`],"Fricative|Glottal":[`h`,``],"Approx.|Postalv.":[``,`ɹ`],"Approx.|Velar":[``,`w`],"Lateral|Alveolar":[``,`l`]};function z(e){return e.replace(/[ː/[\].ˈˌ]/g,``).trim()}function B({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,kind:r=`vowels`,highlight:o,examples:s,caption:c,footer:l,delay:u}){let d=i[t]??i.globe,f=s??[],p=new Set((o??[]).map(z)),h=e=>p.has(z(e));return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),r===`consonants`?(0,m.jsx)(U,{isHot:h}):(0,m.jsx)(V,{isHot:h}),c&&(0,m.jsx)(`div`,{className:`ipa-caption`,children:c}),f.length>0&&(0,m.jsx)(`ul`,{className:`ipa-examples`,children:f.map((e,t)=>(0,m.jsxs)(`li`,{className:`ipa-ex`,...h(e.symbol)?{"data-hot":``}:{},children:[(0,m.jsx)(`span`,{className:`ipa-ex-sym`,children:e.symbol}),(0,m.jsx)(`span`,{className:`ipa-ex-word`,children:e.word})]},t))}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function V(e){let t=(0,O.c)(31),{isHot:n}=e,r,i,a,o,s,c,l,u,d,f,p,h;if(t[0]!==n){let e={x:12,y:14},g={x:92,y:14},_={x:34,y:86},v={x:80,y:86},y=H,b=(t,n)=>{let r=y(e.x,_.x,n),i=y(g.x,v.x,n),a=y(e.y,_.y,n);return{x:y(r,i,t),y:a}};o=`ipa-quad`,r=`0 0 104 100`,s=`100%`,c=`img`,l=`IPA vowel quadrilateral`;let x=`${e.x},${e.y} ${g.x},${g.y} ${v.x},${v.y} ${_.x},${_.y}`;t[13]===x?u=t[14]:(u=(0,m.jsx)(`polygon`,{points:x,fill:`none`,stroke:`var(--line-strong)`,strokeWidth:.8}),t[13]=x,t[14]=u),d=[.34,.5,.66].map((e,t)=>{let n=b(0,e),r=b(1,e);return(0,m.jsx)(`line`,{x1:n.x,y1:n.y,x2:r.x,y2:r.y,stroke:`var(--grid-line)`,strokeWidth:.5},t)}),f=(0,m.jsx)(`line`,{x1:b(.5,0).x,y1:b(.5,0).y,x2:b(.5,1).x,y2:b(.5,1).y,stroke:`var(--grid-line)`,strokeWidth:.5}),p=(0,m.jsx)(`text`,{x:e.x,y:9,className:`ipa-axis`,textAnchor:`start`,children:`Front`}),h=(0,m.jsx)(`text`,{x:g.x,y:9,className:`ipa-axis`,textAnchor:`end`,children:`Back`}),t[15]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,m.jsx)(`text`,{className:`ipa-axis`,transform:`translate(6, 50) rotate(-90)`,textAnchor:`middle`,children:`Close → Open`}),t[15]=i):i=t[15],a=F.map(e=>{let t=b(e.back,e.high),r=e.rounded?3:0,i=n(e.s);return(0,m.jsxs)(`g`,{transform:`translate(${t.x+r}, ${t.y})`,children:[i&&(0,m.jsx)(`circle`,{r:4.4,className:`ipa-vowel-halo`}),(0,m.jsx)(`text`,{className:`ipa-vowel`,textAnchor:`middle`,dominantBaseline:`central`,...i?{"data-hot":``}:{},children:e.s})]},e.s)}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=h}else r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],h=t[12];let g;t[16]!==r||t[17]!==i||t[18]!==a||t[19]!==s||t[20]!==c||t[21]!==l||t[22]!==u||t[23]!==d||t[24]!==f||t[25]!==p||t[26]!==h?(g=(0,m.jsxs)(`svg`,{viewBox:r,width:s,role:c,"aria-label":l,children:[u,d,f,p,h,i,a]}),t[16]=r,t[17]=i,t[18]=a,t[19]=s,t[20]=c,t[21]=l,t[22]=u,t[23]=d,t[24]=f,t[25]=p,t[26]=h,t[27]=g):g=t[27];let _;return t[28]!==o||t[29]!==g?(_=(0,m.jsx)(`div`,{className:o,children:g}),t[28]=o,t[29]=g,t[30]=_):_=t[30],_}function H(e,t,n){return e+(t-e)*n}function U(e){let t=(0,O.c)(7),{isHot:n}=e,r;t[0]===n?r=t[1]:(r=e=>{let{s:t}=e;return t?(0,m.jsx)(`span`,{className:`ipa-cgrid-sym`,...n(t)?{"data-hot":``}:{},children:t}):(0,m.jsx)(`span`,{className:`ipa-cgrid-empty`,children:`·`})},t[0]=n,t[1]=r);let i=r,a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,m.jsx)(`thead`,{children:(0,m.jsxs)(`tr`,{children:[(0,m.jsx)(`th`,{className:`ipa-cgrid-corner`}),L.map(de)]})}),t[2]=a):a=t[2];let o;t[3]===i?o=t[4]:(o=I.map(e=>(0,m.jsxs)(`tr`,{children:[(0,m.jsx)(`th`,{className:`ipa-cgrid-manner`,scope:`row`,children:e}),L.map(t=>{let n=R[`${e}|${t}`];return(0,m.jsx)(`td`,{className:`ipa-cgrid-cell`,children:n?(0,m.jsxs)(`span`,{className:`ipa-cgrid-pair`,children:[(0,m.jsx)(i,{s:n[0]}),(0,m.jsx)(i,{s:n[1]})]}):(0,m.jsx)(`span`,{className:`ipa-cgrid-na`,"aria-hidden":`true`})},t)})]},e)),t[3]=i,t[4]=o);let s;return t[5]===o?s=t[6]:(s=(0,m.jsx)(`div`,{className:`ipa-cgrid-wrap`,children:(0,m.jsxs)(`table`,{className:`ipa-cgrid`,children:[a,(0,m.jsx)(`tbody`,{children:o})]})}),t[5]=o,t[6]=s),s}function de(e){return(0,m.jsx)(`th`,{className:`ipa-cgrid-place`,scope:`col`,children:e},e)}function fe(e){let t=e.match(/-?\d*\.?\d+/g);if(!t||t.length<2)return null;let n=Number(t[0]),r=Number(t[1]);return!Number.isFinite(n)||!Number.isFinite(r)?null:{x:n,y:r}}function pe({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,glyph:r,strokes:o,grid:s=`mi`,romanization:c,meaning:l,caption:u,footer:d,delay:f}){let p=i[t]??i.edit,h=[...o??[]].sort((e,t)=>e.order-t.order),g=h.some(e=>e.path&&e.path.trim().length>0);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`ss-stage`,children:[(0,m.jsx)(`div`,{className:`ss-square`,children:(0,m.jsxs)(`svg`,{viewBox:`0 0 100 100`,width:`100%`,role:`img`,"aria-label":`Writing guide for ${r}`,children:[(0,m.jsx)(`rect`,{x:1,y:1,width:98,height:98,rx:2,fill:`none`,stroke:`var(--line-strong)`,strokeWidth:.8}),s!==`none`&&(0,m.jsxs)(`g`,{stroke:`var(--grid-line)`,strokeWidth:.6,strokeDasharray:`3 2.5`,children:[(0,m.jsx)(`line`,{x1:50,y1:1,x2:50,y2:99}),(0,m.jsx)(`line`,{x1:1,y1:50,x2:99,y2:50}),s===`mi`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`line`,{x1:1,y1:1,x2:99,y2:99}),(0,m.jsx)(`line`,{x1:99,y1:1,x2:1,y2:99})]})]}),g?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`text`,{x:50,y:54,className:`ss-ghost`,textAnchor:`middle`,dominantBaseline:`central`,children:r}),h.map((e,t)=>e.path?(0,m.jsx)(`path`,{d:e.path,className:`ss-stroke`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{"--i":t}},`p${t}`):null),h.map((e,t)=>{let n=e.path?fe(e.path):null;return n?(0,m.jsxs)(`g`,{transform:`translate(${n.x}, ${n.y})`,children:[(0,m.jsx)(`circle`,{r:4.6,className:`ss-badge-bg`}),(0,m.jsx)(`text`,{className:`ss-badge-num`,textAnchor:`middle`,dominantBaseline:`central`,children:e.order})]},`b${t}`):null})]}):(0,m.jsx)(`text`,{x:50,y:54,className:`ss-glyph`,textAnchor:`middle`,dominantBaseline:`central`,children:r})]})}),(0,m.jsxs)(`div`,{className:`ss-meta`,children:[(0,m.jsx)(`div`,{className:`ss-glyph-sm`,"aria-hidden":`true`,children:r}),c&&(0,m.jsxs)(`div`,{className:`ss-romanization`,children:[(0,m.jsx)(`span`,{className:`ss-meta-k`,children:`Reading`}),(0,m.jsx)(`span`,{className:`ss-meta-v`,children:c})]}),l&&(0,m.jsxs)(`div`,{className:`ss-meaning`,children:[(0,m.jsx)(`span`,{className:`ss-meta-k`,children:`Meaning`}),(0,m.jsx)(`span`,{className:`ss-meta-v`,children:l})]}),(0,m.jsxs)(`div`,{className:`ss-count`,children:[h.length,` `,h.length===1?`stroke`:`strokes`]})]})]}),h.length>0&&(0,m.jsx)(`ol`,{className:`ss-steps`,children:h.map((e,t)=>(0,m.jsxs)(`li`,{className:`ss-step`,children:[(0,m.jsx)(`span`,{className:`ss-step-num`,children:e.order}),(0,m.jsx)(`span`,{className:`ss-step-hint`,children:e.hint??`Stroke ${e.order}`})]},t))}),u&&(0,m.jsx)(`div`,{className:`ipa-caption`,children:u}),d&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}var me=`silent`;function he({title:e,icon:t=`captions`,iconColor:n=`var(--presence)`,word:r,chunks:o,rhymes:s,caption:c,footer:f,delay:h}){let g=i[t]??i.captions,_=(o??[]).filter(e=>e&&e.text),v=(s??[]).filter(Boolean),[y,b]=(0,p.useState)(null),[x,S]=(0,p.useState)(!1);(0,p.useEffect)(()=>()=>d(),[]);let C=(0,p.useCallback)((e,t)=>{d(),b(t),u(e,`mavea`).then(e=>{b(e=>e===t?null:e),!e&&l()===!1&&S(!0)})},[]);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h??0)+`ms`},children:[e&&(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`pw-word`,role:`group`,"aria-label":`Sound out ${r}`,children:_.map((e,t)=>{let n=e.kind??`grapheme`,r=n===me;return(0,m.jsxs)(`button`,{type:`button`,className:`pw-chunk`,"data-kind":n,"data-playing":y===t||void 0,disabled:r,onClick:()=>C(e.text,t),title:r?`"${e.text}" is silent`:`Hear "${e.text}"`,"aria-label":r?`${e.text}, silent`:`Hear ${e.text}${e.sound?`, ${e.sound}`:``}`,children:[(0,m.jsx)(`span`,{className:`pw-chunk-text`,children:e.text}),e.sound&&(0,m.jsx)(`span`,{className:`pw-chunk-sound`,children:e.sound})]},t)})}),(0,m.jsxs)(`button`,{type:`button`,className:`pw-blend`,"data-playing":y===-1||void 0,onClick:()=>C(r,-1),title:`Hear "${r}"`,"aria-label":`Hear the whole word, ${r}`,children:[y===-1?(0,m.jsxs)(`span`,{className:`pw-wave`,"aria-hidden":`true`,children:[(0,m.jsx)(`span`,{}),(0,m.jsx)(`span`,{}),(0,m.jsx)(`span`,{})]}):(0,m.jsx)(i.play,{className:`ic pw-blend-ic`,style:{width:12,height:12}}),(0,m.jsx)(`span`,{className:`pw-blend-word`,children:r})]}),x&&(0,m.jsx)(`p`,{className:`insight-summary`,role:`status`,style:{marginTop:10},children:`Voice is off — start the local voice service to hear this.`}),c&&(0,m.jsx)(`div`,{className:`ipa-caption`,children:c}),v.length>0&&(0,m.jsxs)(`div`,{className:`pw-rhymes`,children:[(0,m.jsx)(`span`,{className:`pw-rhymes-k`,children:`Rhymes with`}),(0,m.jsx)(`ul`,{className:`pw-rhyme-list`,children:v.map((e,t)=>(0,m.jsx)(`li`,{className:`pw-rhyme`,children:e},t))})]}),f&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}var ge=[`noun`,`verb`,`adjective`,`adverb`,`pronoun`,`preposition`,`conjunction`,`determiner`,`interjection`],W={noun:`n.`,verb:`v.`,adjective:`adj.`,adverb:`adv.`,pronoun:`pron.`,preposition:`prep.`,conjunction:`conj.`,determiner:`det.`,interjection:`interj.`},_e=e=>typeof e==`string`&&Object.prototype.hasOwnProperty.call(W,e),ve=/^[¿¡([{«‹“‘]+$/;function G({title:e,icon:t=`captions`,iconColor:n=`var(--presence)`,tokens:r,sentence:o,translation:s,footer:c,delay:l}){let u=i[t]??i.captions,{groups:d,legend:f,notes:h}=(0,p.useMemo)(()=>{let e=Array.isArray(r)?r:[],t=0,n=[];for(let r of e){if(typeof r==`string`){r.trim()&&n.push({word:r});continue}if(!r||typeof r!=`object`)continue;let e=r;if(typeof e.word!=`string`||!e.word.trim())continue;if(e.pos===`punctuation`){n.push({word:e.word,punct:!0});continue}let i=typeof e.note==`string`&&e.note.trim()?e.note:void 0;n.push({word:e.word,pos:_e(e.pos)?e.pos:void 0,note:i,noteIdx:i?++t:void 0})}let i=[],a=[];for(let e of n)if(e.punct){let t=i[i.length-1];t&&!ve.test(e.word)?t.trail.push(e):a.push(e)}else i.push({lead:a,word:e,trail:[]}),a=[];if(a.length){let e=i[i.length-1];e?e.trail.push(...a):i.push({lead:a,trail:[]})}let o=new Map;for(let e of n)e.pos&&o.set(e.pos,(o.get(e.pos)??0)+1);return{groups:i,legend:ge.filter(e=>o.has(e)).map(e=>({pos:e,count:o.get(e)??0})),notes:n.filter(e=>e.noteIdx!==void 0)}},[r]),[g,_]=(0,p.useState)(null),v=g&&f.some(e=>e.pos===g)?g:null,y=(e,t)=>(0,m.jsx)(`span`,{className:`psb-punct`,"data-dim":!!v||void 0,children:e.word},t);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),d.length>0?(0,m.jsx)(`div`,{className:`psb-flow`,children:d.map((e,t)=>(0,m.jsxs)(`span`,{className:`psb-group`,children:[e.lead.map((e,t)=>y(e,`l${t}`)),e.word&&(0,m.jsxs)(`span`,{className:`psb-token`,"data-pos":e.word.pos,"data-dim":!!v&&e.word.pos!==v||void 0,title:e.word.note?`${e.word.word} — ${e.word.note}`:void 0,children:[(0,m.jsxs)(`span`,{className:`psb-word`,children:[e.word.word,e.word.noteIdx!==void 0&&(0,m.jsx)(`sup`,{className:`psb-note-mark`,"aria-hidden":`true`,children:e.word.noteIdx})]}),e.word.pos&&(0,m.jsx)(`span`,{className:`psb-abbr`,"aria-hidden":`true`,children:W[e.word.pos]})]}),e.trail.map((e,t)=>y(e,`t${t}`))]},t))}):o?(0,m.jsx)(`p`,{className:`psb-plain`,children:o}):(0,m.jsx)(`div`,{className:`psb-empty`,children:`Nothing to break down yet.`}),s&&(0,m.jsx)(`div`,{className:`psb-translation`,children:s}),f.length>0&&(0,m.jsx)(`div`,{className:`psb-legend`,role:`group`,"aria-label":`Word classes in this sentence`,children:f.map(({pos:e,count:t})=>(0,m.jsxs)(`button`,{type:`button`,className:`psb-leg`,"data-pos":e,"aria-pressed":v===e,onClick:()=>_(t=>t===e?null:e),title:v===e?`Show every word`:`Spotlight every ${e}`,children:[(0,m.jsx)(`span`,{className:`psb-leg-dot`,"aria-hidden":`true`}),e,t>1&&(0,m.jsxs)(`span`,{className:`psb-leg-n`,children:[`×`,t]})]},e))}),h.length>0&&(0,m.jsx)(`ul`,{className:`psb-notes`,children:h.map(e=>(0,m.jsxs)(`li`,{className:`psb-note`,children:[(0,m.jsx)(`sup`,{className:`psb-note-num`,children:e.noteIdx}),(0,m.jsxs)(`span`,{className:`psb-note-text`,children:[(0,m.jsx)(`span`,{className:`psb-note-word`,children:e.word}),` — `,e.note]})]},e.noteIdx))}),c&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}function ye({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,commonName:r,scientificName:s,image:c,marks:l,lookalikes:u,status:d,caption:p,footer:h,delay:g}){let _=i[t]??i.globe,v=f(c?.from,`var(--presence-deep)`),y=f(c?.to,`var(--presence-soft)`),b=o(c?.src),x=l??[],S=u??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g??0)+`ms`},children:[e&&(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`sp-banner`,style:{background:`linear-gradient(150deg, ${v}, ${y})`},children:[b&&(0,m.jsx)(`img`,{className:`me-img-fill`,src:b,alt:``,loading:`lazy`,decoding:`async`,referrerPolicy:`no-referrer`,onError:e=>{e.currentTarget.style.display=`none`}}),d&&(0,m.jsx)(`span`,{className:`sp-status`,children:d})]}),(0,m.jsx)(`div`,{className:`sp-common`,"data-mark":`underline`,children:r}),s&&(0,m.jsx)(`div`,{className:`sp-scientific`,children:s}),p&&(0,m.jsx)(`div`,{className:`sp-caption`,children:p}),x.length>0&&(0,m.jsx)(`div`,{className:`sp-marks`,children:x.map((e,t)=>(0,m.jsxs)(`div`,{className:`sp-mark`,children:[(0,m.jsx)(`span`,{className:`sp-mark-label`,children:e.label}),(0,m.jsx)(`span`,{className:`sp-mark-value`,children:e.value})]},t))}),S.length>0&&(0,m.jsxs)(`div`,{className:`sp-lookalikes`,children:[(0,m.jsxs)(`span`,{className:`sp-lookalikes-k`,children:[(0,m.jsx)(i.layers,{className:`ic sp-lookalikes-ic`}),` Easily confused with`]}),(0,m.jsx)(`ul`,{className:`sp-lookalike-list`,children:S.map((e,t)=>(0,m.jsx)(`li`,{className:`sp-lookalike`,children:e},t))})]}),h&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(h)})]})}function be({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,terms:r,footer:o,delay:s}){let c=i[t]??i.table,l=e=>typeof e==`string`&&e.trim()?e.trim():`—`,{rows:u,langs:d}=(0,p.useMemo)(()=>{let e=r??[],t=[],n=new Set;return{rows:e.map(e=>{let r=new Map;for(let i of e.translations??[]){if(!i||typeof i!=`object`)continue;let e=l(i.lang);n.has(e)||(n.add(e),t.push(e)),r.has(e)||r.set(e,i)}return{term:e,cells:r}}),langs:t}},[r]),f=e=>{if(e===`preferred`)return`var(--insight)`;if(e===`deprecated`)return`var(--warning)`;if(e===`avoid`)return`var(--danger)`};return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),u.length===0?(0,m.jsx)(`div`,{className:`tb-empty`,children:`No terms yet.`}):d.length===0?(0,m.jsx)(`ul`,{className:`tb-flat`,children:u.map(({term:e},t)=>(0,m.jsx)(`li`,{className:`tb-flat-term m-stagger-item m-fade-rise`,style:{"--i":t},children:e.term},t))}):(0,m.jsx)(`div`,{className:`tb-wrap`,children:(0,m.jsxs)(`table`,{className:`tb-table`,children:[(0,m.jsx)(`thead`,{children:(0,m.jsxs)(`tr`,{children:[(0,m.jsx)(`th`,{scope:`col`,children:`Term`}),d.map(e=>(0,m.jsx)(`th`,{scope:`col`,children:e},e))]})}),(0,m.jsx)(`tbody`,{children:u.map(({term:e,cells:t},n)=>(0,m.jsxs)(`tr`,{className:`m-stagger-item m-fade-rise`,style:{"--i":n},children:[(0,m.jsx)(`td`,{className:`tb-term-col`,children:e.term}),d.map(e=>{let n=t.get(e),r=n&&typeof n.text==`string`?n.text:``,i=f(n?.status);return(0,m.jsx)(`td`,{className:`tb-cell`,children:r?(0,m.jsxs)(`span`,{className:`tb-cell-text`,children:[i&&(0,m.jsx)(`span`,{className:`tb-dot`,style:{"--tb-c":i},title:n?.status}),r]}):(0,m.jsx)(`span`,{className:`tb-dash`,children:`—`})},e)})]},n))})]})}),o&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var K={whale:{w:240,h:70,orient:`horizontal`},bus:{w:200,h:90,orient:`horizontal`},generic:{w:90,h:70,orient:`horizontal`},human:{w:40,h:100,orient:`vertical`},building:{w:70,h:160,orient:`vertical`}};function xe(e){return typeof e==`string`&&e in K}function Se(e){let t=(0,O.c)(21),n,r;t[0]===e?(n=t[1],r=t[2]):({shape:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i=K[n],a=`0 0 ${i.w} ${i.h}`,o;t[3]===n?o=t[4]:(o=n===`human`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`circle`,{cx:`20`,cy:`11`,r:`10`}),(0,m.jsx)(`path`,{d:`M8 30 Q20 22 32 30 L34 62 Q27 68 20 68 Q13 68 6 62 Z`}),(0,m.jsx)(`path`,{d:`M11 66 L8 100 L17 100 L19 70 Z`}),(0,m.jsx)(`path`,{d:`M29 66 L32 100 L23 100 L21 70 Z`})]}),t[3]=n,t[4]=o);let s;t[5]===n?s=t[6]:(s=n===`bus`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M6 20 Q6 8 18 8 H172 Q188 8 188 24 V58 Q188 66 180 66 H16 Q6 66 6 56 Z`}),(0,m.jsx)(`rect`,{x:`18`,y:`17`,width:`152`,height:`19`,rx:`3`,className:`szc-glyph-cut`,fill:`var(--surface-elevated)`}),(0,m.jsx)(`circle`,{cx:`46`,cy:`70`,r:`13`}),(0,m.jsx)(`circle`,{cx:`154`,cy:`70`,r:`13`})]}),t[5]=n,t[6]=s);let c;t[7]===n?c=t[8]:(c=n===`whale`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M4 40 C4 20 40 10 100 9 C170 8 210 20 224 32 L236 26 L232 42 L236 56 L224 50 C214 60 170 66 100 65 C40 64 4 56 4 40 Z`}),(0,m.jsx)(`path`,{d:`M60 12 C64 2 76 2 78 12 C72 14 66 14 60 12 Z`}),(0,m.jsx)(`path`,{d:`M18 46 C22 54 34 56 40 50 C34 46 24 44 18 46 Z`})]}),t[7]=n,t[8]=c);let l;t[9]===n?l=t[10]:(l=n===`building`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`rect`,{x:`10`,y:`6`,width:`50`,height:`154`,rx:`2`}),Array.from({length:8},Ce)]}),t[9]=n,t[10]=l);let u;t[11]===n?u=t[12]:(u=n===`generic`&&(0,m.jsx)(`path`,{d:`M8 55 Q2 30 28 18 Q46 4 66 14 Q86 22 82 42 Q90 52 78 58 Q55 68 30 64 Q12 62 8 55 Z`}),t[11]=n,t[12]=u);let d;return t[13]!==r||t[14]!==a||t[15]!==o||t[16]!==s||t[17]!==c||t[18]!==l||t[19]!==u?(d=(0,m.jsxs)(`svg`,{viewBox:a,preserveAspectRatio:`xMidYMax meet`,fill:`currentColor`,"aria-hidden":`true`,...r,children:[o,s,c,l,u]}),t[13]=r,t[14]=a,t[15]=o,t[16]=s,t[17]=c,t[18]=l,t[19]=u,t[20]=d):d=t[20],d}function Ce(e,t){return Array.from({length:3},(e,n)=>(0,m.jsx)(`rect`,{x:17+n*13,y:16+t*17,width:`8`,height:`9`,rx:`1`,className:`szc-glyph-cut`,fill:`var(--surface-elevated)`},`${t}-${n}`))}var we=190,q=16;function Te(e,t){if(typeof e!=`number`||!Number.isFinite(e))return`—`;let n=e.toLocaleString(void 0,{maximumFractionDigits:2});return t?`${n} ${t}`:n}function Ee({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,unit:r,subjects:o,footer:s,delay:c}){let l=i[t]??i.layers,u=o??[],d=u.reduce((e,t)=>{let n=typeof t.length==`number`&&Number.isFinite(t.length)?t.length:-1/0;return n>e?n:e},0),f=d>0?we/d:0,p=u.map(e=>{let t=xe(e.shape)?e.shape:`generic`,n=K[t],r=typeof e.length==`number`&&Number.isFinite(e.length)&&e.length>0&&f>0?Math.max(e.length*f,q):q;return{subject:e,shape:t,width:n.orient===`horizontal`?r:r*(n.w/n.h),height:n.orient===`vertical`?r:r*(n.h/n.w)}}),h=Math.max(...p.map(e=>e.height),q);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),p.length===0?(0,m.jsx)(`div`,{className:`szc-empty`,children:`No subjects yet.`}):(0,m.jsx)(`div`,{className:`szc-scroll`,children:(0,m.jsx)(`div`,{className:`szc-row`,style:{"--szc-track-h":h+`px`},children:p.map(({subject:e,shape:t,width:i,height:a},o)=>(0,m.jsxs)(`div`,{className:`szc-item m-stagger-item m-scale-in`,style:{"--i":o,color:n},children:[(0,m.jsx)(`div`,{className:`szc-shape-box`,children:(0,m.jsx)(Se,{shape:t,style:{width:i,height:a}})}),(0,m.jsx)(`div`,{className:`szc-item-label`,...o===0?{"data-mark":`underline`}:{},children:e.label}),(0,m.jsx)(`div`,{className:`szc-item-value`,children:Te(e.length,r)})]},o))})}),s&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function De(e){let t=Array.from(e),n=t.length;return t.map((e,t)=>({ch:e,group:Math.floor((n-1-t)/4)}))}function Oe({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,value:r,bases:o,footer:s,delay:c}){let l=i[t]??i.chart,u=o??[],d=typeof r==`string`||typeof r==`number`?String(r):``;return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),d&&(0,m.jsx)(`div`,{className:`bcv-value`,"data-mark":`underline`,children:d}),u.length>0?(0,m.jsx)(`div`,{className:`bcv-rows`,children:u.map((e,t)=>{let n=typeof e.digits==`string`?e.digits.trim():``,r=typeof e.radix==`number`&&Number.isFinite(e.radix)?e.radix:null;return(0,m.jsxs)(`div`,{className:`bcv-row m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,m.jsxs)(`div`,{className:`bcv-row-head`,children:[(0,m.jsx)(`span`,{className:`bcv-label`,children:e.label}),r!==null&&(0,m.jsxs)(`span`,{className:`bcv-radix`,children:[`base `,r]})]}),n?(0,m.jsx)(`div`,{className:`bcv-digits`,children:De(n).map((e,t)=>(0,m.jsx)(`span`,{className:`bcv-digit`,"data-group":e.group%2==0?`a`:`b`,children:e.ch},t))}):(0,m.jsx)(`span`,{className:`bcv-dash`,children:`—`})]},t)})}):(0,m.jsx)(`div`,{className:`bcv-empty`,children:`No bases yet.`}),s&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function ke(e){let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?`?`:t.length===1?t[0][0]?.toUpperCase()??`?`:((t[0][0]??``)+(t[t.length-1][0]??``)).toUpperCase()}function Ae(e){return typeof e==`string`&&e.trim()||typeof e==`number`&&Number.isFinite(e)?String(e):`—`}function je({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,name:r,era:o,born:s,died:c,knownFor:l,facts:u,lifeEvents:d,legacy:f,footer:p,delay:h}){let g=i[t]??i.doc,_=u??[],v=d??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`hp-head`,children:[(0,m.jsx)(`div`,{className:`hp-medallion`,"aria-hidden":`true`,children:ke(r)}),(0,m.jsxs)(`div`,{className:`hp-headline`,children:[(0,m.jsx)(`div`,{className:`hp-name`,"data-mark":`underline`,children:r}),o&&(0,m.jsx)(`div`,{className:`hp-era`,children:o}),l&&(0,m.jsx)(`div`,{className:`hp-known`,children:l})]})]}),(s||c)&&(0,m.jsxs)(`div`,{className:`hp-dates`,children:[s&&(0,m.jsxs)(`div`,{className:`hp-date`,children:[(0,m.jsx)(`span`,{className:`hp-date-k`,children:`Born`}),(0,m.jsx)(`span`,{className:`hp-date-v`,children:s})]}),c&&(0,m.jsxs)(`div`,{className:`hp-date`,children:[(0,m.jsx)(`span`,{className:`hp-date-k`,children:`Died`}),(0,m.jsx)(`span`,{className:`hp-date-v`,children:c})]})]}),v.length>0&&(0,m.jsx)(`div`,{className:`hp-beats`,children:v.map((e,t)=>(0,m.jsxs)(`div`,{className:`hp-beat m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,m.jsx)(`span`,{className:`hp-beat-year`,children:Ae(e.year)}),(0,m.jsx)(`span`,{className:`hp-beat-label`,children:e.label})]},t))}),_.length>0&&(0,m.jsx)(`div`,{className:`hp-facts`,children:_.map((e,t)=>(0,m.jsxs)(`div`,{className:`hp-fact-row`,children:[(0,m.jsx)(`span`,{className:`hp-fact-label`,children:e.label}),(0,m.jsx)(`span`,{className:`hp-fact-value`,children:e.value})]},t))}),f&&(0,m.jsx)(`div`,{className:`hp-legacy`,children:f}),p&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)})]})}function J(e){return typeof e==`string`&&e.trim()||typeof e==`number`&&Number.isFinite(e)?String(e):`—`}function Me({title:e,icon:t=`clock`,iconColor:n=`var(--presence)`,date:r,events:o,born:s,died:c,footer:l,delay:u}){let d=i[t]??i.clock,f=o??[],p=s??[],h=c??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`otd-date`,children:r}),f.length>0?(0,m.jsx)(`div`,{className:`otd-events`,children:f.map((e,t)=>(0,m.jsxs)(`div`,{className:`otd-event m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,m.jsx)(`span`,{className:`otd-year-chip`,children:J(e.year)}),(0,m.jsxs)(`div`,{className:`otd-event-body`,children:[(0,m.jsx)(`div`,{className:`otd-label`,...t===0?{"data-mark":`underline`}:{},children:e.label}),e.category&&(0,m.jsx)(`span`,{className:`otd-cat`,children:e.category})]})]},t))}):(0,m.jsx)(`div`,{className:`otd-empty`,children:`No events yet.`}),(p.length>0||h.length>0)&&(0,m.jsxs)(`div`,{className:`otd-people`,children:[p.length>0&&(0,m.jsxs)(`div`,{className:`otd-people-col`,children:[(0,m.jsx)(`span`,{className:`otd-people-k`,children:`Born`}),p.map((e,t)=>(0,m.jsxs)(`div`,{className:`otd-person`,children:[(0,m.jsx)(`span`,{className:`otd-person-year`,children:J(e.year)}),(0,m.jsx)(`span`,{className:`otd-person-name`,children:e.name})]},t))]}),h.length>0&&(0,m.jsxs)(`div`,{className:`otd-people-col`,children:[(0,m.jsx)(`span`,{className:`otd-people-k`,children:`Died`}),h.map((e,t)=>(0,m.jsxs)(`div`,{className:`otd-person`,children:[(0,m.jsx)(`span`,{className:`otd-person-year`,children:J(e.year)}),(0,m.jsx)(`span`,{className:`otd-person-name`,children:e.name})]},t))]})]}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function Ne({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,name:r,flag:o,capital:s,population:c,area:l,officialLanguages:u,currency:d,facts:f,footer:p,delay:h}){let g=i[t]??i.globe,_=Array.isArray(f)?f:[],v=(Array.isArray(u)?u:[]).filter(e=>typeof e==`string`&&e.trim().length>0),y=[{label:`Capital`,value:s},{label:`Population`,value:c},{label:`Area`,value:l},{label:`Currency`,value:d}].filter(e=>typeof e.value==`string`&&!!e.value);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h??0)+`ms`},children:[e&&(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`cc-banner`,children:(0,m.jsx)(`span`,{className:`cc-flag`,role:`img`,"aria-label":`Flag of ${r}`,children:typeof o==`string`&&o.trim()?o:`🌐`})}),(0,m.jsx)(`div`,{className:`cc-name`,"data-mark":`underline`,children:r}),y.length>0&&(0,m.jsx)(`div`,{className:`cc-marks`,children:y.map((e,t)=>(0,m.jsxs)(`div`,{className:`cc-mark`,children:[(0,m.jsx)(`span`,{className:`cc-mark-label`,children:e.label}),(0,m.jsx)(`span`,{className:`cc-mark-value`,children:e.value})]},t))}),v.length>0&&(0,m.jsx)(`div`,{className:`cc-langs`,children:v.map((e,t)=>(0,m.jsx)(`span`,{className:`cc-lang-chip`,children:e},t))}),_.length>0&&(0,m.jsx)(`div`,{className:`cc-facts`,children:_.map((e,t)=>(0,m.jsxs)(`div`,{className:`cc-fact-row`,children:[(0,m.jsx)(`span`,{className:`cc-fact-label`,children:e.label}),(0,m.jsx)(`span`,{className:`cc-fact-value`,children:e.value})]},t))}),p&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)})]})}function Pe({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,countries:r,footer:o,delay:s}){let c=i[t]??i.globe,l=Array.isArray(r)?r:[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),l.length===0?(0,m.jsx)(`div`,{className:`wg-empty`,children:`No countries yet.`}):(0,m.jsx)(`div`,{className:`wg-grid`,children:l.map((e,t)=>(0,m.jsxs)(`div`,{className:`wg-tile m-stagger-item m-scale-in`,style:{"--i":t},children:[(0,m.jsx)(`span`,{className:`wg-flag`,role:`img`,"aria-label":`Flag of ${e.name}`,children:typeof e.flag==`string`&&e.flag.trim()?e.flag:`🌐`}),(0,m.jsx)(`div`,{className:`wg-name`,children:e.name}),e.capital&&(0,m.jsxs)(`div`,{className:`wg-row`,children:[(0,m.jsx)(`span`,{className:`wg-row-k`,children:`Capital`}),(0,m.jsx)(`span`,{className:`wg-row-v`,children:e.capital})]}),e.currency&&(0,m.jsxs)(`div`,{className:`wg-row`,children:[(0,m.jsx)(`span`,{className:`wg-row-k`,children:`Currency`}),(0,m.jsx)(`span`,{className:`wg-row-v`,children:e.currency})]}),e.language&&(0,m.jsxs)(`div`,{className:`wg-row`,children:[(0,m.jsx)(`span`,{className:`wg-row-k`,children:`Language`}),(0,m.jsx)(`span`,{className:`wg-row-v`,children:e.language})]})]},t))}),o&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var Y=[`var(--presence)`,`var(--danger)`,`var(--warning)`,`var(--text-muted)`],Fe=new Set(Y);function Ie(e,t){return typeof e.color==`string`&&Fe.has(e.color)?e.color:Y[t%Y.length]}function Le({title:e,icon:t=`shield`,iconColor:n=`var(--danger)`,dates:r,sides:o,keyBattles:s,casualties:c,outcome:l,footer:u,delay:d}){let f=i[t]??i.shield,p=Array.isArray(o)?o:[],h=Array.isArray(s)?s:[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,m.jsx)(`div`,{className:`wc-dates`,children:r}),p.length>0&&(0,m.jsx)(`div`,{className:`wc-sides`,children:p.map((e,t)=>{let n=Ie(e,t),r=Array.isArray(e.leaders)?e.leaders:[];return(0,m.jsxs)(`div`,{className:`wc-side m-stagger-item m-fade-rise`,style:{"--i":t,"--wc-c":n},children:[(0,m.jsx)(`div`,{className:`wc-side-name`,children:e.name}),r.length>0&&(0,m.jsx)(`ul`,{className:`wc-leaders`,children:r.filter(e=>typeof e==`string`&&e.trim().length>0).map((e,t)=>(0,m.jsx)(`li`,{className:`wc-leader`,children:e},t))})]},t)})}),h.length>0&&(0,m.jsx)(`div`,{className:`wc-battles`,children:h.map((e,t)=>(0,m.jsxs)(`div`,{className:`wc-battle`,children:[(0,m.jsx)(`span`,{className:`wc-battle-dot`,"aria-hidden":`true`}),(0,m.jsx)(`span`,{className:`wc-battle-label`,children:e.label}),e.at&&(0,m.jsx)(`span`,{className:`wc-battle-at`,children:e.at})]},t))}),c&&(0,m.jsxs)(`div`,{className:`wc-stat-row`,children:[(0,m.jsx)(`span`,{className:`wc-stat-k`,children:`Casualties`}),(0,m.jsx)(`span`,{className:`wc-stat-v`,children:c})]}),l&&(0,m.jsx)(`div`,{className:`wc-outcome`,children:l}),u&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var X=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--text-muted)`],Re=new Set([`var(--presence)`,`var(--presence-soft)`,`var(--presence-deep)`,`var(--insight)`,`var(--insight-soft)`,`var(--warning)`,`var(--warning-soft)`,`var(--danger)`,`var(--text-muted)`]);function ze(e,t){return typeof e.color==`string`&&Re.has(e.color)?e.color:X[t%X.length]}var Z=3;function Be(e){return e<=Z?Math.max(e,1):Math.ceil(e/Math.ceil(e/Z))}function Q(e){return typeof e==`string`&&e.trim().length>0}function Ve({title:e,icon:t=`proof`,iconColor:n=`var(--presence)`,terms:r,discriminator:o,discriminatorLabel:s,commonMistake:c,footer:l,delay:u}){let d=i[t]??i.proof,f=(Array.isArray(r)?r:[]).filter(e=>!!e&&Q(e.term)),p=Be(f.length),h=Q(o),g=Q(s)?s:`The test`;return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),f.length>0&&(0,m.jsx)(`div`,{className:`dcd-terms`,style:{"--dcd-cols":p,"--dcd-cols-narrow":Math.min(p,2)},children:f.map((e,t)=>(0,m.jsxs)(`div`,{className:`dcd-term m-stagger-item m-fade-rise`,style:{"--i":t,"--dcd-c":ze(e,t)},children:[(0,m.jsxs)(`div`,{className:`dcd-term-head`,children:[(0,m.jsx)(`span`,{className:`dcd-term-name`,children:e.term}),Q(e.tag)&&(0,m.jsx)(`span`,{className:`dcd-term-tag`,children:e.tag})]}),Q(e.gist)&&(0,m.jsx)(`p`,{className:`dcd-gist`,children:e.gist}),Q(e.example)&&(0,m.jsxs)(`p`,{className:`dcd-example`,children:[(0,m.jsx)(`span`,{className:`dcd-example-k`,children:`e.g.`}),e.example]})]},t))}),h&&(0,m.jsxs)(`div`,{className:`dcd-rule m-stagger-item m-fade-rise`,style:{"--i":f.length},children:[(0,m.jsxs)(`div`,{className:`dcd-rule-label`,children:[(0,m.jsx)(i.spark,{className:`ic`,"aria-hidden":`true`}),g]}),(0,m.jsx)(`p`,{className:`dcd-rule-text`,"data-mark":`underline`,children:o})]}),Q(c)&&(0,m.jsxs)(`p`,{className:`dcd-mistake`,children:[(0,m.jsx)(i.alert,{className:`ic`,"aria-hidden":`true`}),(0,m.jsxs)(`span`,{className:`dcd-mistake-text`,children:[(0,m.jsx)(`span`,{className:`dcd-mistake-k`,children:`Common slip `}),c]})]}),f.length===0&&!h&&(0,m.jsx)(`div`,{className:`dcd-empty`,children:`No terms to tell apart yet.`}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}var He=e({referenceRegistry:()=>$}),$={factsheet:c(D),newsdigest:c(ie),dictionary:c(se),translation:c(ae),pronunciation:c(oe),gloss:c(ce),scalefelt:c(A),hearit:c(P),ipachart:c(B),scriptstroke:c(pe),phonicsword:c(he),speciescard:c(ye),etymtree:c(E),hazardcard:c(re),termbase:c(be),sizecompare:c(Ee),baseconversion:c(Oe),historicalperson:c(je),onthisday:c(Me),countrycard:c(Ne),worldgrid:c(Pe),warconflict:c(Le),posbreakdown:c(G),distinctioncard:c(Ve)};export{He as n,$ as t};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./compiler-runtime-qQQXpJgv.js";import{t as r}from"./jsx-runtime-DeHZSEgm.js";import{n as i}from"./icons-gLFQTv74.js";import{t as a}from"./richText-BkxJhl9N.js";import{t as o}from"./safeImageUrl-BINWXOTz.js";import{r as s}from"./lib-B7OE1ZQQ.js";import{t as c}from"./registry-types-D3q_LrlV.js";import{r as l,s as u,t as d}from"./kokoro-B3oG_8sd.js";import{t as f}from"./safeCssColor-di93BXgG.js";var p=t(),m=r(),h=480,g=90,_=240,v=390,y=120,b=38,x=14;function S(e){let t=e.toLowerCase();return t.includes(`proto`)||t.includes(`pie`)||t.includes(`indo`)?`var(--text-muted)`:t.includes(`latin`)||t.includes(`greek`)||t.includes(`ancient`)?`var(--presence)`:t.includes(`french`)||t.includes(`romance`)||t.includes(`spanish`)||t.includes(`italian`)?`var(--insight)`:t.includes(`german`)||t.includes(`dutch`)||t.includes(`nordic`)||t.includes(`norse`)?`var(--warning)`:t.includes(`arabic`)||t.includes(`persian`)||t.includes(`sanskrit`)?`var(--danger)`:`var(--text-secondary)`}var C=18,w=22;function T(e,t){return e.length>t?e.slice(0,t-1).trimEnd()+`…`:e}function E({word:e,roots:t,descendants:n,note:r,footer:i,delay:o}){let{vbH:s,wordY:c,wordCY:l,rootBoxes:u,descBoxes:d}=(0,p.useMemo)(()=>{let e=t??[],r=n??[],i=e.length,a=r.length,o=Math.max(i,a,1)*52-x+32+12,s=Math.max(o,120),c=s/2,l=c-b/2,u=c-(i*52-(i>0?x:0))/2,d=e.map((e,t)=>({r:e,x:g-y/2,y:u+t*52,cy:u+t*52+b/2,color:S(e.lang)})),f=c-(a*52-(a>0?x:0))/2;return{vbH:s,wordY:l,wordCY:c,rootBoxes:d,descBoxes:r.map((e,t)=>({d:e,x:v-y/2,y:f+t*52,cy:f+t*52+b/2,color:S(e.lang??``)}))}},[t,n]),f=(e,t,n,r)=>{let i=(e+n)/2;return`M ${e.toFixed(1)},${t.toFixed(1)} C ${i.toFixed(1)},${t.toFixed(1)} ${i.toFixed(1)},${r.toFixed(1)} ${n.toFixed(1)},${r.toFixed(1)}`};return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(o??0)+`ms`},children:[(0,m.jsx)(`div`,{className:`et-wrap`,children:(0,m.jsxs)(`svg`,{className:`et-svg`,viewBox:`0 0 ${h} ${s}`,role:`img`,"aria-label":`Etymology of "${e}"`,preserveAspectRatio:`xMidYMid meet`,children:[u.map((e,t)=>(0,m.jsx)(`path`,{d:f(150,e.cy,_-y/2,l),fill:`none`,stroke:e.color,strokeWidth:`1.5`,opacity:`0.75`},`rc${t}`)),d.map((e,t)=>(0,m.jsx)(`path`,{d:f(300,l,v-y/2,e.cy),fill:`none`,stroke:e.color,strokeWidth:`1.5`,opacity:`0.75`},`dc${t}`)),u.map(({r:e,x:t,y:n,cy:r,color:i},a)=>{let o=e.lang+(e.gloss?` · ${e.gloss}`:``);return(0,m.jsxs)(`g`,{children:[(0,m.jsx)(`rect`,{x:t,y:n,width:y,height:b,rx:6,className:`et-box`,style:{stroke:i}}),(0,m.jsxs)(`text`,{x:g,y:r-7,textAnchor:`middle`,className:`et-form`,children:[e.form.length>C&&(0,m.jsx)(`title`,{children:e.form}),T(e.form,C)]}),(0,m.jsxs)(`text`,{x:g,y:r+9,textAnchor:`middle`,className:`et-lang`,style:{fill:i},children:[o.length>w&&(0,m.jsx)(`title`,{children:o}),T(o,w)]})]},`r${a}`)}),(0,m.jsx)(`rect`,{x:_-y/2,y:c,width:y,height:b,rx:8,className:`et-word-box`}),(0,m.jsx)(`text`,{x:_,y:l+5,textAnchor:`middle`,className:`et-word`,children:e}),d.map(({d:e,x:t,y:n,cy:r,color:i},a)=>{let o=e.lang?`${e.lang}${e.gloss?` · ${e.gloss}`:``}`:e.gloss??``;return(0,m.jsxs)(`g`,{children:[(0,m.jsx)(`rect`,{x:t,y:n,width:y,height:b,rx:6,className:`et-box`,style:{stroke:i}}),(0,m.jsxs)(`text`,{x:v,y:r-7,textAnchor:`middle`,className:`et-form`,children:[e.form.length>C&&(0,m.jsx)(`title`,{children:e.form}),T(e.form,C)]}),(0,m.jsxs)(`text`,{x:v,y:r+9,textAnchor:`middle`,className:`et-lang`,style:{fill:i},children:[o.length>w&&(0,m.jsx)(`title`,{children:o}),T(o,w)]})]},`d${a}`)}),(0,m.jsx)(`text`,{x:g,y:12,textAnchor:`middle`,className:`et-col-hdr`,children:`Roots`}),d.length>0&&(0,m.jsx)(`text`,{x:v,y:12,textAnchor:`middle`,className:`et-col-hdr`,children:`Descendants`})]})}),r&&(0,m.jsx)(`div`,{className:`et-note`,children:r}),i&&(0,m.jsx)(`div`,{className:`insight-summary`,dangerouslySetInnerHTML:a(i),style:{marginTop:12}})]})}function D({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,subject:r,tagline:o,facts:s,body:c,footer:l,delay:u}){let d=i[t]??i.doc,f=s??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`fs-subject`,children:r}),o&&(0,m.jsx)(`div`,{className:`fs-tagline`,children:o}),f.length>0&&(0,m.jsx)(`div`,{className:`fs-facts`,children:f.map((e,t)=>(0,m.jsxs)(`div`,{className:`fs-row`,children:[(0,m.jsx)(`span`,{className:`fs-label`,children:e.label}),(0,m.jsxs)(`span`,{className:`fs-value`,...t===0?{"data-mark":`underline`}:{},children:[e.value,e.note&&(0,m.jsxs)(`span`,{className:`fs-note`,children:[` `,e.note]})]})]},t))}),c&&(0,m.jsx)(`div`,{className:`fs-body`,dangerouslySetInnerHTML:a(c)}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}var O=n(),k={flammable:`Flammable`,corrosive:`Corrosive`,toxic:`Toxic`,irritant:`Irritant`,oxidizer:`Oxidizer`,healthHazard:`Health hazard`,environment:`Environment`,explosive:`Explosive`,compressedGas:`Compressed gas`},ee=`12,1.6 22.4,12 12,22.4 1.6,12`,te={flammable:()=>(0,m.jsx)(`path`,{className:`ghs-symbol-fill`,d:`M12 6c1.9 2.4 2.9 4.2 2.9 6a2.9 2.9 0 0 1-5.8 0c0-.7.15-1.3.45-1.85-.05.5.1.9.5 1.15-.15-1.7.3-3.4 1.95-5.3Z`}),corrosive:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`line`,{x1:`5.6`,y1:`13.4`,x2:`18.4`,y2:`13.4`}),(0,m.jsx)(`path`,{d:`M9 6.6v3.6q0 1.7-1.1 3.2`}),(0,m.jsx)(`path`,{d:`M15 6.6v3.6q0 1.7 1.1 3.2`}),(0,m.jsx)(`path`,{d:`M7.6 15.4q.6 1.2 0 2.4`}),(0,m.jsx)(`path`,{d:`M16.4 15.4q.6 1.4-.2 2.6`})]}),toxic:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`circle`,{cx:`12`,cy:`10.1`,r:`3.15`}),(0,m.jsx)(`circle`,{className:`ghs-symbol-fill`,cx:`10.6`,cy:`9.8`,r:`0.55`}),(0,m.jsx)(`circle`,{className:`ghs-symbol-fill`,cx:`13.4`,cy:`9.8`,r:`0.55`}),(0,m.jsx)(`path`,{d:`M10.6 12.3q1.4 1 2.8 0`}),(0,m.jsx)(`path`,{d:`M8.1 17.1 15.9 13.7`}),(0,m.jsx)(`path`,{d:`M8.1 13.7 15.9 17.1`})]}),irritant:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol-fill`,children:[(0,m.jsx)(`rect`,{x:`11.05`,y:`6.4`,width:`1.9`,height:`6.6`,rx:`0.95`}),(0,m.jsx)(`circle`,{cx:`12`,cy:`15.9`,r:`1.1`})]}),oxidizer:()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`circle`,{className:`ghs-symbol`,cx:`12`,cy:`15.1`,r:`3.05`}),(0,m.jsx)(`path`,{className:`ghs-symbol-fill`,d:`M12 6c1.5 2 2.3 3.5 2.3 5a2.3 2.3 0 0 1-4.6 0c0-.55.1-1 .3-1.45-.05.4.1.7.4.9-.1-1.35.35-2.7 1.6-4.45Z`})]}),healthHazard:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`circle`,{cx:`12`,cy:`7.5`,r:`1.75`}),(0,m.jsx)(`path`,{d:`M8.3 17c.1-3.15 1.7-5.1 3.7-5.1s3.6 1.95 3.7 5.1`}),(0,m.jsx)(`path`,{d:`M12 12.6v3.4`}),(0,m.jsx)(`path`,{d:`M10.5 14.3h3`}),(0,m.jsx)(`path`,{d:`M10.8 13.15l2.4 2.4`}),(0,m.jsx)(`path`,{d:`M13.2 13.15l-2.4 2.4`})]}),environment:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`path`,{d:`M8.7 7.4v6.2`}),(0,m.jsx)(`path`,{d:`M8.7 9.7 7 8.2`}),(0,m.jsx)(`path`,{d:`M8.7 8.9l1.9-1.6`}),(0,m.jsx)(`path`,{d:`M8.7 11.7 7 13`}),(0,m.jsx)(`path`,{d:`M6 15.9c1.35.85 2.85.85 4.2 0`}),(0,m.jsx)(`path`,{d:`M13.6 15.9c1.35.85 2.85.85 4.2 0`}),(0,m.jsx)(`path`,{className:`ghs-symbol-fill`,d:`M14.9 12.6c1.7-.35 3.05.2 3.7 1.15-.7.95-2.1 1.5-3.7 1.15.35-.5.35-1.8 0-2.3Z`})]}),explosive:()=>(0,m.jsxs)(`g`,{children:[(0,m.jsx)(`circle`,{className:`ghs-symbol-fill`,cx:`12`,cy:`12`,r:`1.55`}),(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`path`,{d:`M12 6.5v2.3`}),(0,m.jsx)(`path`,{d:`M12 15.2v2.3`}),(0,m.jsx)(`path`,{d:`M6.5 12h2.3`}),(0,m.jsx)(`path`,{d:`M15.2 12h2.3`}),(0,m.jsx)(`path`,{d:`M8.3 8.3l1.6 1.6`}),(0,m.jsx)(`path`,{d:`M14.1 14.1l1.6 1.6`}),(0,m.jsx)(`path`,{d:`M15.7 8.3l-1.6 1.6`}),(0,m.jsx)(`path`,{d:`M9.9 14.1l-1.6 1.6`})]})]}),compressedGas:()=>(0,m.jsxs)(`g`,{className:`ghs-symbol`,children:[(0,m.jsx)(`rect`,{x:`9.3`,y:`9.1`,width:`5.4`,height:`8.4`,rx:`1.3`}),(0,m.jsx)(`rect`,{x:`10.55`,y:`6.35`,width:`2.9`,height:`2.4`,rx:`0.5`}),(0,m.jsx)(`line`,{x1:`9.6`,y1:`12.6`,x2:`14.4`,y2:`12.6`})]})};function ne(e){let t=(0,O.c)(7),{kind:n,className:r}=e,i=te[n],a=k[n],o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,m.jsx)(`polygon`,{className:`ghs-diamond`,points:ee}),t[0]=o):o=t[0];let s;t[1]===i?s=t[2]:(s=(0,m.jsx)(i,{}),t[1]=i,t[2]=s);let c;return t[3]!==r||t[4]!==a||t[5]!==s?(c=(0,m.jsxs)(`svg`,{viewBox:`0 0 24 24`,role:`img`,"aria-label":a,className:r,children:[o,s]}),t[3]=r,t[4]=a,t[5]=s,t[6]=c):c=t[6],c}function re({title:e,icon:t=`alert`,iconColor:n=`var(--danger)`,cas:r,signalWord:o,pictograms:s,hazards:c,precautions:l,footer:u,delay:d}){let f=i[t]??i.alert,p=o===`Warning`,h=p?`var(--warning)`:`var(--danger)`,g=(s??[]).filter(e=>e in k),_=c??[],v=l??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,m.jsxs)(`div`,{className:`hc-cas`,children:[`CAS `,r]}),(0,m.jsxs)(`div`,{className:`hc-signal`,style:{"--hc-c":h},role:`status`,children:[(0,m.jsx)(`span`,{className:`hc-signal-icon`,children:(0,m.jsx)(i.alert,{})}),(0,m.jsx)(`span`,{className:`hc-signal-word`,children:p?`Warning`:`Danger`})]}),g.length>0&&(0,m.jsx)(`div`,{className:`hc-pictograms`,children:g.map((e,t)=>(0,m.jsxs)(`div`,{className:`hc-pic m-stagger-item m-scale-in`,style:{"--i":t},children:[(0,m.jsx)(ne,{kind:e,className:`hc-pic-glyph`}),(0,m.jsx)(`span`,{className:`hc-pic-label`,children:k[e]})]},t))}),_.length>0&&(0,m.jsxs)(`div`,{className:`hc-section`,children:[(0,m.jsx)(`div`,{className:`hc-section-label`,children:`Hazards`}),(0,m.jsx)(`div`,{className:`hc-codes`,children:_.map((e,t)=>(0,m.jsxs)(`div`,{className:`hc-code-row m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,m.jsx)(`span`,{className:`hc-code`,children:e.code}),(0,m.jsx)(`span`,{className:`hc-code-text`,children:e.text})]},t))})]}),v.length>0&&(0,m.jsxs)(`div`,{className:`hc-section`,children:[(0,m.jsx)(`div`,{className:`hc-section-label`,children:`Precautions`}),(0,m.jsx)(`div`,{className:`hc-codes`,children:v.map((e,t)=>(0,m.jsxs)(`div`,{className:`hc-code-row m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,m.jsx)(`span`,{className:`hc-code`,children:e.code}),(0,m.jsx)(`span`,{className:`hc-code-text`,children:e.text})]},t))})]}),u&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function ie({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,topic:r,asOf:o,items:s,footer:c,delay:l}){let u=i[t]??i.globe,d=s??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`nd-meta`,children:[r&&(0,m.jsx)(`span`,{className:`nd-topic`,children:r}),(0,m.jsx)(`span`,{className:`nd-asof`,children:o})]}),(0,m.jsx)(`div`,{className:`nd-items`,children:d.map((e,t)=>(0,m.jsxs)(`div`,{className:`nd-item`,children:[(0,m.jsx)(`div`,{className:`nd-headline`,...t===0?{"data-mark":`underline`}:{},children:e.headline}),(e.source||e.time||e.category)&&(0,m.jsxs)(`div`,{className:`nd-item-meta`,children:[e.source&&(0,m.jsx)(`span`,{className:`nd-source`,children:e.source}),e.time&&(0,m.jsx)(`span`,{className:`nd-time`,children:e.time}),e.category&&(0,m.jsx)(`span`,{className:`nd-cat`,children:e.category})]}),e.summary&&(0,m.jsx)(`div`,{className:`nd-summary`,children:e.summary})]},t))}),c&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}function ae({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,fromLang:r,toLang:o,text:c,result:l,pairs:u,footer:d,delay:f}){let p=i[t]??i.globe,h=u??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`tl-langs`,children:[(0,m.jsx)(`span`,{className:`tl-from`,children:r}),(0,m.jsx)(`span`,{className:`tl-arrow`,children:`→`}),(0,m.jsx)(`span`,{className:`tl-to`,children:o})]}),(0,m.jsxs)(`div`,{className:`tl-pair`,children:[(0,m.jsx)(`div`,{className:`tl-source`,children:(0,m.jsx)(`div`,{className:`tl-text`,style:{color:`var(--text-secondary)`},children:c})}),(0,m.jsx)(`div`,{className:`tl-result`,children:(0,m.jsx)(`div`,{className:`tl-text`,style:{fontWeight:600},"data-mark":`underline`,children:l})})]}),(0,m.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:6},children:(0,m.jsx)(s,{text:l,label:`Copy ${o} translation`})}),h.length>0&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`div`,{style:{fontSize:`var(--fs-xs, 11px)`,fontWeight:700,color:`var(--text-muted)`,textTransform:`uppercase`,letterSpacing:`0.07em`,marginTop:14,marginBottom:4},children:`Breakdown`}),(0,m.jsx)(`div`,{className:`tl-breakdowns`,children:h.map((e,t)=>(0,m.jsxs)(`div`,{className:`tl-bp`,children:[(0,m.jsx)(`span`,{className:`tl-bp-orig`,children:e.original}),(0,m.jsxs)(`span`,{className:`tl-bp-trans`,children:[e.translated,e.note&&(0,m.jsx)(`span`,{className:`tl-bp-note`,style:{display:`block`,marginTop:2},children:e.note})]})]},t))})]}),d&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}function oe({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,word:r,ipa:o,syllables:s,tips:c,footer:l,delay:u}){let d=i[t]??i.doc,f=c??[],p=(()=>{if(!s)return[];let e=s.split(`·`);if(!o)return e.map(e=>({text:e,stressed:!1}));let t=(()=>{let t=o.indexOf(`ˈ`);if(t===-1)return-1;let n=o.replace(/[/[\]]/g,``),r=t/Math.max(n.length,1);return Math.min(Math.round(r*e.length),e.length-1)})();return e.map((e,n)=>({text:e,stressed:n===t}))})();return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`pr-word`,children:r}),o&&(0,m.jsx)(`div`,{className:`pr-ipa`,style:{display:`inline-block`,fontFamily:`var(--font-mono, monospace)`,fontStyle:`normal`,background:`var(--grid-line)`,borderRadius:`var(--r-sm, 4px)`,padding:`2px 8px`,marginTop:6,fontSize:`var(--fs-sm, 14px)`,color:`var(--text-primary)`,letterSpacing:`0.04em`},children:o}),p.length>0&&(0,m.jsx)(`div`,{className:`pr-syllables`,children:p.map((e,t)=>(0,m.jsxs)(`span`,{children:[t>0&&(0,m.jsx)(`span`,{"aria-hidden":`true`,style:{color:`var(--text-muted)`},children:`·`}),(0,m.jsx)(`span`,{style:e.stressed?{fontWeight:800,color:`var(--presence)`}:{fontWeight:400,color:`var(--text-secondary)`},...e.stressed?{"data-mark":`underline`}:{},children:e.text})]},t))}),f.length>0&&(0,m.jsx)(`div`,{className:`pr-tips`,children:f.map((e,t)=>(0,m.jsx)(`div`,{className:`pr-tip`,children:e},t))}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function se({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,word:r,phonetic:o,senses:s,etymology:c,footer:l,delay:u}){let d=i[t]??i.doc,f=s??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`dc-word`,children:r}),o&&(0,m.jsx)(`div`,{className:`dc-phonetic`,style:{fontFamily:`monospace`,fontStyle:`normal`},children:o}),f.length>0&&(0,m.jsx)(`ol`,{className:`dc-senses`,style:{listStyle:`none`,padding:0,margin:0},children:f.map((e,t)=>(0,m.jsxs)(`li`,{className:`dc-sense`,children:[(0,m.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},children:[(0,m.jsxs)(`span`,{style:{fontSize:`var(--fs-xs, 11px)`,fontWeight:700,color:`var(--text-faint)`,minWidth:`1.4em`},children:[t+1,`.`]}),(0,m.jsx)(`span`,{className:`dc-pos`,children:e.pos})]}),(0,m.jsx)(`div`,{className:`dc-def`,style:{paddingLeft:`calc(1.4em + 8px)`},...t===0?{"data-mark":`underline`}:{},children:e.definition}),e.example&&(0,m.jsx)(`div`,{className:`dc-example`,style:{marginLeft:`calc(1.4em + 8px)`},children:e.example}),(e.synonyms??[]).length>0&&(0,m.jsxs)(`div`,{className:`dc-synonyms`,style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:4,marginLeft:`calc(1.4em + 8px)`},children:[(0,m.jsx)(`span`,{style:{color:`var(--text-faint)`,marginRight:2},children:`syn.`}),(e.synonyms??[]).map((e,t)=>(0,m.jsx)(`span`,{style:{fontSize:`var(--fs-xs, 11px)`,padding:`1px 7px`,borderRadius:999,background:`var(--track)`,color:`var(--text-secondary)`,lineHeight:1.7},children:e},t))]})]},t))}),c&&(0,m.jsxs)(`div`,{className:`dc-etymology`,children:[(0,m.jsx)(`span`,{style:{fontWeight:600,fontStyle:`normal`,color:`var(--text-muted)`},children:`Etymology `}),c]}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function ce({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,domain:r,entries:o,footer:s,delay:c}){let l=i[t]??i.doc,u=(0,p.useMemo)(()=>[...o??[]].sort((e,t)=>e.term.localeCompare(t.term,void 0,{sensitivity:`base`})),[o]);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,m.jsx)(`div`,{className:`gl-domain`,children:r}),(0,m.jsx)(`div`,{className:`gl-entries`,children:u.map((e,t)=>{let n=e.term.charAt(0).toUpperCase(),r=n!==(t===0?null:u[t-1].term.charAt(0).toUpperCase());return(0,m.jsxs)(`div`,{children:[r&&(0,m.jsx)(`div`,{className:`gl-letter-divider`,"aria-hidden":`true`,children:n}),(0,m.jsxs)(`div`,{className:`gl-entry`,children:[(0,m.jsx)(`div`,{className:`gl-term`,children:e.term}),(0,m.jsx)(`div`,{className:`gl-def`,children:e.definition}),e.see&&(0,m.jsxs)(`div`,{className:`gl-see`,children:[`See also: `,(0,m.jsx)(`span`,{style:{fontStyle:`italic`},children:e.see})]})]})]},t)})}),s&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function A({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,value:r,unit:o,comparisons:s,footer:c,delay:l}){let u=i[t]??i.layers,d=s??[],f=e=>{let t=typeof e.howMany==`number`?e.howMany:Number(String(e.howMany).trim());return Number.isFinite(t)&&t>0?t:null},p=d.reduce((e,t)=>{let n=f(t);return n!==null&&n>e?n:e},0);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`scf-figure`,"data-mark":`underline`,children:[(0,m.jsx)(`span`,{className:`scf-value`,children:r}),o&&(0,m.jsx)(`span`,{className:`scf-unit`,children:o})]}),d.length>0&&(0,m.jsx)(`div`,{className:`scf-rows`,children:d.map((e,t)=>{let n=f(e),r=n!==null&&p>0?Math.max(n/p*100,4):0;return(0,m.jsxs)(`div`,{className:`scf-row`,children:[(0,m.jsxs)(`div`,{className:`scf-line`,children:[(0,m.jsx)(`span`,{className:`scf-count`,children:e.howMany}),(0,m.jsx)(`span`,{className:`scf-to`,children:e.to})]}),r>0&&(0,m.jsx)(`div`,{className:`scf-track`,"aria-hidden":`true`,children:(0,m.jsx)(`div`,{className:`scf-bar`,style:{width:r+`%`}})}),e.note&&(0,m.jsx)(`div`,{className:`scf-note`,children:e.note})]},t)})}),c&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var j=typeof window<`u`?window.AudioContext??window.webkitAudioContext:void 0,le={C:0,"C#":1,DB:1,D:2,"D#":3,EB:3,E:4,FB:4,F:5,"E#":5,"F#":6,GB:6,G:7,"G#":8,AB:8,A:9,"A#":10,BB:10,B:11,CB:11};function ue(e){let t=/^([A-Ga-g])([#b]?)(-?\d{1,2})$/.exec(e.trim());if(!t)return null;let n=le[t[1].toUpperCase()+(t[2]===`#`?`#`:t[2]===`b`?`B`:``)];return n===void 0?null:440*2**((n+(Number(t[3])+1)*12-69)/12)}function M(e){if(typeof e==`number`)return Number.isFinite(e)?e:null;let t=e.trim(),n=Number(t);return t!==``&&Number.isFinite(n)?n:ue(t)}var N={word:`chat`,note:`speaker`,tone:`speaker`};function P({title:e,icon:t=`speaker`,iconColor:n=`var(--presence)`,items:r,footer:o,delay:s}){let c=i[t]??i.speaker,f=r??[],[h,g]=(0,p.useState)(null),[_,v]=(0,p.useState)(!1),y=(0,p.useRef)(null),b=(0,p.useRef)(null),x=(0,p.useCallback)(()=>{if(b.current!==null&&(clearTimeout(b.current),b.current=null),y.current){let e=y.current;y.current=null,e.close().catch(()=>{})}d()},[]);(0,p.useEffect)(()=>x,[x]);let S=(0,p.useCallback)((e,t)=>{g(t),u(e,`mavea`).then(e=>{g(e=>e===t?null:e),!e&&l()===!1&&v(!0)})},[]),C=(0,p.useCallback)((e,t)=>{if(!j)return;let n=new j;y.current=n;let r=n.currentTime,i=.6,a=n.createOscillator();a.type=`sine`,a.frequency.setValueAtTime(e,r);let o=n.createGain();o.gain.setValueAtTime(1e-4,r),o.gain.exponentialRampToValueAtTime(.22,r+.04),o.gain.exponentialRampToValueAtTime(1e-4,r+i),a.connect(o).connect(n.destination),a.start(r),a.stop(r+i),g(t),a.onended=()=>{g(e=>e===t?null:e),y.current===n&&(y.current=null,n.close().catch(()=>{}))},b.current=setTimeout(()=>{y.current===n&&(y.current=null,n.close().catch(()=>{}),g(e=>e===t?null:e))},750)},[]),w=(0,p.useCallback)((e,t)=>{if(x(),e.kind===`word`){S(String(e.value),t);return}let n=M(e.value);n===null||n<=0||C(n,t)},[x,S,C]),T=e=>e.kind===`word`||!!j&&M(e.value)!==null,E=j?`This note can’t be played`:`Audio playback is unavailable in this browser`;return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`ul`,{className:`hri-rows`,children:f.map((e,t)=>{let n=T(e),r=h===t,a=i[N[e.kind]]??i.speaker;return(0,m.jsxs)(`li`,{className:`hri-row`,"data-playing":r||void 0,children:[(0,m.jsx)(`button`,{type:`button`,className:`hri-play`,onClick:()=>w(e,t),disabled:!n,title:n?`Play ${e.label}`:E,"aria-label":n?`Play ${e.label}`:`${e.label} — ${E}`,children:r?(0,m.jsxs)(`span`,{className:`hri-wave`,"aria-hidden":`true`,children:[(0,m.jsx)(`span`,{}),(0,m.jsx)(`span`,{}),(0,m.jsx)(`span`,{})]}):(0,m.jsx)(i.play,{className:`ic hri-play-ic`,style:{width:13,height:13}})}),(0,m.jsxs)(`div`,{className:`hri-body`,children:[(0,m.jsx)(`div`,{className:`hri-label`,children:e.label}),e.sub&&(0,m.jsx)(`div`,{className:`hri-sub`,children:e.sub})]}),(0,m.jsxs)(`span`,{className:`hri-kind`,children:[(0,m.jsx)(a,{className:`ic hri-kind-ic`,style:{width:12,height:12}}),e.kind]})]},t)})}),_&&(0,m.jsx)(`p`,{className:`insight-summary`,role:`status`,style:{marginTop:12},children:`Voice is off — start the local voice service to hear this.`}),o&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var F=[{s:`i`,back:0,high:0},{s:`y`,back:0,high:0,rounded:!0},{s:`ɨ`,back:.5,high:0},{s:`u`,back:1,high:0,rounded:!0},{s:`ɪ`,back:.18,high:.18},{s:`ʊ`,back:.82,high:.18,rounded:!0},{s:`e`,back:0,high:.34},{s:`ø`,back:0,high:.34,rounded:!0},{s:`ə`,back:.5,high:.5},{s:`o`,back:1,high:.34,rounded:!0},{s:`ɛ`,back:.08,high:.66},{s:`ɜ`,back:.5,high:.66},{s:`ʌ`,back:.78,high:.66},{s:`ɔ`,back:1,high:.66,rounded:!0},{s:`a`,back:.06,high:1},{s:`æ`,back:.16,high:.84},{s:`ɑ`,back:.9,high:1},{s:`ɒ`,back:1,high:1,rounded:!0}],I=[`Plosive`,`Nasal`,`Fricative`,`Approx.`,`Lateral`],L=[`Bilab.`,`Labiod.`,`Dental`,`Alveolar`,`Postalv.`,`Velar`,`Glottal`],R={"Plosive|Bilab.":[`p`,`b`],"Plosive|Alveolar":[`t`,`d`],"Plosive|Velar":[`k`,`g`],"Plosive|Glottal":[`ʔ`,``],"Nasal|Bilab.":[``,`m`],"Nasal|Alveolar":[``,`n`],"Nasal|Velar":[``,`ŋ`],"Fricative|Labiod.":[`f`,`v`],"Fricative|Dental":[`θ`,`ð`],"Fricative|Alveolar":[`s`,`z`],"Fricative|Postalv.":[`ʃ`,`ʒ`],"Fricative|Glottal":[`h`,``],"Approx.|Postalv.":[``,`ɹ`],"Approx.|Velar":[``,`w`],"Lateral|Alveolar":[``,`l`]};function z(e){return e.replace(/[ː/[\].ˈˌ]/g,``).trim()}function B({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,kind:r=`vowels`,highlight:o,examples:s,caption:c,footer:l,delay:u}){let d=i[t]??i.globe,f=s??[],p=new Set((o??[]).map(z)),h=e=>p.has(z(e));return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),r===`consonants`?(0,m.jsx)(U,{isHot:h}):(0,m.jsx)(V,{isHot:h}),c&&(0,m.jsx)(`div`,{className:`ipa-caption`,children:c}),f.length>0&&(0,m.jsx)(`ul`,{className:`ipa-examples`,children:f.map((e,t)=>(0,m.jsxs)(`li`,{className:`ipa-ex`,...h(e.symbol)?{"data-hot":``}:{},children:[(0,m.jsx)(`span`,{className:`ipa-ex-sym`,children:e.symbol}),(0,m.jsx)(`span`,{className:`ipa-ex-word`,children:e.word})]},t))}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function V(e){let t=(0,O.c)(31),{isHot:n}=e,r,i,a,o,s,c,l,u,d,f,p,h;if(t[0]!==n){let e={x:12,y:14},g={x:92,y:14},_={x:34,y:86},v={x:80,y:86},y=H,b=(t,n)=>{let r=y(e.x,_.x,n),i=y(g.x,v.x,n),a=y(e.y,_.y,n);return{x:y(r,i,t),y:a}};o=`ipa-quad`,r=`0 0 104 100`,s=`100%`,c=`img`,l=`IPA vowel quadrilateral`;let x=`${e.x},${e.y} ${g.x},${g.y} ${v.x},${v.y} ${_.x},${_.y}`;t[13]===x?u=t[14]:(u=(0,m.jsx)(`polygon`,{points:x,fill:`none`,stroke:`var(--line-strong)`,strokeWidth:.8}),t[13]=x,t[14]=u),d=[.34,.5,.66].map((e,t)=>{let n=b(0,e),r=b(1,e);return(0,m.jsx)(`line`,{x1:n.x,y1:n.y,x2:r.x,y2:r.y,stroke:`var(--grid-line)`,strokeWidth:.5},t)}),f=(0,m.jsx)(`line`,{x1:b(.5,0).x,y1:b(.5,0).y,x2:b(.5,1).x,y2:b(.5,1).y,stroke:`var(--grid-line)`,strokeWidth:.5}),p=(0,m.jsx)(`text`,{x:e.x,y:9,className:`ipa-axis`,textAnchor:`start`,children:`Front`}),h=(0,m.jsx)(`text`,{x:g.x,y:9,className:`ipa-axis`,textAnchor:`end`,children:`Back`}),t[15]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,m.jsx)(`text`,{className:`ipa-axis`,transform:`translate(6, 50) rotate(-90)`,textAnchor:`middle`,children:`Close → Open`}),t[15]=i):i=t[15],a=F.map(e=>{let t=b(e.back,e.high),r=e.rounded?3:0,i=n(e.s);return(0,m.jsxs)(`g`,{transform:`translate(${t.x+r}, ${t.y})`,children:[i&&(0,m.jsx)(`circle`,{r:4.4,className:`ipa-vowel-halo`}),(0,m.jsx)(`text`,{className:`ipa-vowel`,textAnchor:`middle`,dominantBaseline:`central`,...i?{"data-hot":``}:{},children:e.s})]},e.s)}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=h}else r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],h=t[12];let g;t[16]!==r||t[17]!==i||t[18]!==a||t[19]!==s||t[20]!==c||t[21]!==l||t[22]!==u||t[23]!==d||t[24]!==f||t[25]!==p||t[26]!==h?(g=(0,m.jsxs)(`svg`,{viewBox:r,width:s,role:c,"aria-label":l,children:[u,d,f,p,h,i,a]}),t[16]=r,t[17]=i,t[18]=a,t[19]=s,t[20]=c,t[21]=l,t[22]=u,t[23]=d,t[24]=f,t[25]=p,t[26]=h,t[27]=g):g=t[27];let _;return t[28]!==o||t[29]!==g?(_=(0,m.jsx)(`div`,{className:o,children:g}),t[28]=o,t[29]=g,t[30]=_):_=t[30],_}function H(e,t,n){return e+(t-e)*n}function U(e){let t=(0,O.c)(7),{isHot:n}=e,r;t[0]===n?r=t[1]:(r=e=>{let{s:t}=e;return t?(0,m.jsx)(`span`,{className:`ipa-cgrid-sym`,...n(t)?{"data-hot":``}:{},children:t}):(0,m.jsx)(`span`,{className:`ipa-cgrid-empty`,children:`·`})},t[0]=n,t[1]=r);let i=r,a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,m.jsx)(`thead`,{children:(0,m.jsxs)(`tr`,{children:[(0,m.jsx)(`th`,{className:`ipa-cgrid-corner`}),L.map(de)]})}),t[2]=a):a=t[2];let o;t[3]===i?o=t[4]:(o=I.map(e=>(0,m.jsxs)(`tr`,{children:[(0,m.jsx)(`th`,{className:`ipa-cgrid-manner`,scope:`row`,children:e}),L.map(t=>{let n=R[`${e}|${t}`];return(0,m.jsx)(`td`,{className:`ipa-cgrid-cell`,children:n?(0,m.jsxs)(`span`,{className:`ipa-cgrid-pair`,children:[(0,m.jsx)(i,{s:n[0]}),(0,m.jsx)(i,{s:n[1]})]}):(0,m.jsx)(`span`,{className:`ipa-cgrid-na`,"aria-hidden":`true`})},t)})]},e)),t[3]=i,t[4]=o);let s;return t[5]===o?s=t[6]:(s=(0,m.jsx)(`div`,{className:`ipa-cgrid-wrap`,children:(0,m.jsxs)(`table`,{className:`ipa-cgrid`,children:[a,(0,m.jsx)(`tbody`,{children:o})]})}),t[5]=o,t[6]=s),s}function de(e){return(0,m.jsx)(`th`,{className:`ipa-cgrid-place`,scope:`col`,children:e},e)}function fe(e){let t=e.match(/-?\d*\.?\d+/g);if(!t||t.length<2)return null;let n=Number(t[0]),r=Number(t[1]);return!Number.isFinite(n)||!Number.isFinite(r)?null:{x:n,y:r}}function pe({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,glyph:r,strokes:o,grid:s=`mi`,romanization:c,meaning:l,caption:u,footer:d,delay:f}){let p=i[t]??i.edit,h=[...o??[]].sort((e,t)=>e.order-t.order),g=h.some(e=>e.path&&e.path.trim().length>0);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`ss-stage`,children:[(0,m.jsx)(`div`,{className:`ss-square`,children:(0,m.jsxs)(`svg`,{viewBox:`0 0 100 100`,width:`100%`,role:`img`,"aria-label":`Writing guide for ${r}`,children:[(0,m.jsx)(`rect`,{x:1,y:1,width:98,height:98,rx:2,fill:`none`,stroke:`var(--line-strong)`,strokeWidth:.8}),s!==`none`&&(0,m.jsxs)(`g`,{stroke:`var(--grid-line)`,strokeWidth:.6,strokeDasharray:`3 2.5`,children:[(0,m.jsx)(`line`,{x1:50,y1:1,x2:50,y2:99}),(0,m.jsx)(`line`,{x1:1,y1:50,x2:99,y2:50}),s===`mi`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`line`,{x1:1,y1:1,x2:99,y2:99}),(0,m.jsx)(`line`,{x1:99,y1:1,x2:1,y2:99})]})]}),g?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`text`,{x:50,y:54,className:`ss-ghost`,textAnchor:`middle`,dominantBaseline:`central`,children:r}),h.map((e,t)=>e.path?(0,m.jsx)(`path`,{d:e.path,className:`ss-stroke`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{"--i":t}},`p${t}`):null),h.map((e,t)=>{let n=e.path?fe(e.path):null;return n?(0,m.jsxs)(`g`,{transform:`translate(${n.x}, ${n.y})`,children:[(0,m.jsx)(`circle`,{r:4.6,className:`ss-badge-bg`}),(0,m.jsx)(`text`,{className:`ss-badge-num`,textAnchor:`middle`,dominantBaseline:`central`,children:e.order})]},`b${t}`):null})]}):(0,m.jsx)(`text`,{x:50,y:54,className:`ss-glyph`,textAnchor:`middle`,dominantBaseline:`central`,children:r})]})}),(0,m.jsxs)(`div`,{className:`ss-meta`,children:[(0,m.jsx)(`div`,{className:`ss-glyph-sm`,"aria-hidden":`true`,children:r}),c&&(0,m.jsxs)(`div`,{className:`ss-romanization`,children:[(0,m.jsx)(`span`,{className:`ss-meta-k`,children:`Reading`}),(0,m.jsx)(`span`,{className:`ss-meta-v`,children:c})]}),l&&(0,m.jsxs)(`div`,{className:`ss-meaning`,children:[(0,m.jsx)(`span`,{className:`ss-meta-k`,children:`Meaning`}),(0,m.jsx)(`span`,{className:`ss-meta-v`,children:l})]}),(0,m.jsxs)(`div`,{className:`ss-count`,children:[h.length,` `,h.length===1?`stroke`:`strokes`]})]})]}),h.length>0&&(0,m.jsx)(`ol`,{className:`ss-steps`,children:h.map((e,t)=>(0,m.jsxs)(`li`,{className:`ss-step`,children:[(0,m.jsx)(`span`,{className:`ss-step-num`,children:e.order}),(0,m.jsx)(`span`,{className:`ss-step-hint`,children:e.hint??`Stroke ${e.order}`})]},t))}),u&&(0,m.jsx)(`div`,{className:`ipa-caption`,children:u}),d&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}var me=`silent`;function he({title:e,icon:t=`captions`,iconColor:n=`var(--presence)`,word:r,chunks:o,rhymes:s,caption:c,footer:f,delay:h}){let g=i[t]??i.captions,_=(o??[]).filter(e=>e&&e.text),v=(s??[]).filter(Boolean),[y,b]=(0,p.useState)(null),[x,S]=(0,p.useState)(!1);(0,p.useEffect)(()=>()=>d(),[]);let C=(0,p.useCallback)((e,t)=>{d(),b(t),u(e,`mavea`).then(e=>{b(e=>e===t?null:e),!e&&l()===!1&&S(!0)})},[]);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h??0)+`ms`},children:[e&&(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`pw-word`,role:`group`,"aria-label":`Sound out ${r}`,children:_.map((e,t)=>{let n=e.kind??`grapheme`,r=n===me;return(0,m.jsxs)(`button`,{type:`button`,className:`pw-chunk`,"data-kind":n,"data-playing":y===t||void 0,disabled:r,onClick:()=>C(e.text,t),title:r?`"${e.text}" is silent`:`Hear "${e.text}"`,"aria-label":r?`${e.text}, silent`:`Hear ${e.text}${e.sound?`, ${e.sound}`:``}`,children:[(0,m.jsx)(`span`,{className:`pw-chunk-text`,children:e.text}),e.sound&&(0,m.jsx)(`span`,{className:`pw-chunk-sound`,children:e.sound})]},t)})}),(0,m.jsxs)(`button`,{type:`button`,className:`pw-blend`,"data-playing":y===-1||void 0,onClick:()=>C(r,-1),title:`Hear "${r}"`,"aria-label":`Hear the whole word, ${r}`,children:[y===-1?(0,m.jsxs)(`span`,{className:`pw-wave`,"aria-hidden":`true`,children:[(0,m.jsx)(`span`,{}),(0,m.jsx)(`span`,{}),(0,m.jsx)(`span`,{})]}):(0,m.jsx)(i.play,{className:`ic pw-blend-ic`,style:{width:12,height:12}}),(0,m.jsx)(`span`,{className:`pw-blend-word`,children:r})]}),x&&(0,m.jsx)(`p`,{className:`insight-summary`,role:`status`,style:{marginTop:10},children:`Voice is off — start the local voice service to hear this.`}),c&&(0,m.jsx)(`div`,{className:`ipa-caption`,children:c}),v.length>0&&(0,m.jsxs)(`div`,{className:`pw-rhymes`,children:[(0,m.jsx)(`span`,{className:`pw-rhymes-k`,children:`Rhymes with`}),(0,m.jsx)(`ul`,{className:`pw-rhyme-list`,children:v.map((e,t)=>(0,m.jsx)(`li`,{className:`pw-rhyme`,children:e},t))})]}),f&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}var ge=[`noun`,`verb`,`adjective`,`adverb`,`pronoun`,`preposition`,`conjunction`,`determiner`,`interjection`],W={noun:`n.`,verb:`v.`,adjective:`adj.`,adverb:`adv.`,pronoun:`pron.`,preposition:`prep.`,conjunction:`conj.`,determiner:`det.`,interjection:`interj.`},_e=e=>typeof e==`string`&&Object.prototype.hasOwnProperty.call(W,e),ve=/^[¿¡([{«‹“‘]+$/;function G({title:e,icon:t=`captions`,iconColor:n=`var(--presence)`,tokens:r,sentence:o,translation:s,footer:c,delay:l}){let u=i[t]??i.captions,{groups:d,legend:f,notes:h}=(0,p.useMemo)(()=>{let e=Array.isArray(r)?r:[],t=0,n=[];for(let r of e){if(typeof r==`string`){r.trim()&&n.push({word:r});continue}if(!r||typeof r!=`object`)continue;let e=r;if(typeof e.word!=`string`||!e.word.trim())continue;if(e.pos===`punctuation`){n.push({word:e.word,punct:!0});continue}let i=typeof e.note==`string`&&e.note.trim()?e.note:void 0;n.push({word:e.word,pos:_e(e.pos)?e.pos:void 0,note:i,noteIdx:i?++t:void 0})}let i=[],a=[];for(let e of n)if(e.punct){let t=i[i.length-1];t&&!ve.test(e.word)?t.trail.push(e):a.push(e)}else i.push({lead:a,word:e,trail:[]}),a=[];if(a.length){let e=i[i.length-1];e?e.trail.push(...a):i.push({lead:a,trail:[]})}let o=new Map;for(let e of n)e.pos&&o.set(e.pos,(o.get(e.pos)??0)+1);return{groups:i,legend:ge.filter(e=>o.has(e)).map(e=>({pos:e,count:o.get(e)??0})),notes:n.filter(e=>e.noteIdx!==void 0)}},[r]),[g,_]=(0,p.useState)(null),v=g&&f.some(e=>e.pos===g)?g:null,y=(e,t)=>(0,m.jsx)(`span`,{className:`psb-punct`,"data-dim":!!v||void 0,children:e.word},t);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),d.length>0?(0,m.jsx)(`div`,{className:`psb-flow`,children:d.map((e,t)=>(0,m.jsxs)(`span`,{className:`psb-group`,children:[e.lead.map((e,t)=>y(e,`l${t}`)),e.word&&(0,m.jsxs)(`span`,{className:`psb-token`,"data-pos":e.word.pos,"data-dim":!!v&&e.word.pos!==v||void 0,title:e.word.note?`${e.word.word} — ${e.word.note}`:void 0,children:[(0,m.jsxs)(`span`,{className:`psb-word`,children:[e.word.word,e.word.noteIdx!==void 0&&(0,m.jsx)(`sup`,{className:`psb-note-mark`,"aria-hidden":`true`,children:e.word.noteIdx})]}),e.word.pos&&(0,m.jsx)(`span`,{className:`psb-abbr`,"aria-hidden":`true`,children:W[e.word.pos]})]}),e.trail.map((e,t)=>y(e,`t${t}`))]},t))}):o?(0,m.jsx)(`p`,{className:`psb-plain`,children:o}):(0,m.jsx)(`div`,{className:`psb-empty`,children:`Nothing to break down yet.`}),s&&(0,m.jsx)(`div`,{className:`psb-translation`,children:s}),f.length>0&&(0,m.jsx)(`div`,{className:`psb-legend`,role:`group`,"aria-label":`Word classes in this sentence`,children:f.map(({pos:e,count:t})=>(0,m.jsxs)(`button`,{type:`button`,className:`psb-leg`,"data-pos":e,"aria-pressed":v===e,onClick:()=>_(t=>t===e?null:e),title:v===e?`Show every word`:`Spotlight every ${e}`,children:[(0,m.jsx)(`span`,{className:`psb-leg-dot`,"aria-hidden":`true`}),e,t>1&&(0,m.jsxs)(`span`,{className:`psb-leg-n`,children:[`×`,t]})]},e))}),h.length>0&&(0,m.jsx)(`ul`,{className:`psb-notes`,children:h.map(e=>(0,m.jsxs)(`li`,{className:`psb-note`,children:[(0,m.jsx)(`sup`,{className:`psb-note-num`,children:e.noteIdx}),(0,m.jsxs)(`span`,{className:`psb-note-text`,children:[(0,m.jsx)(`span`,{className:`psb-note-word`,children:e.word}),` — `,e.note]})]},e.noteIdx))}),c&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}function ye({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,commonName:r,scientificName:s,image:c,marks:l,lookalikes:u,status:d,caption:p,footer:h,delay:g}){let _=i[t]??i.globe,v=f(c?.from,`var(--presence-deep)`),y=f(c?.to,`var(--presence-soft)`),b=o(c?.src),x=l??[],S=u??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g??0)+`ms`},children:[e&&(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`sp-banner`,style:{background:`linear-gradient(150deg, ${v}, ${y})`},children:[b&&(0,m.jsx)(`img`,{className:`me-img-fill`,src:b,alt:``,loading:`lazy`,decoding:`async`,referrerPolicy:`no-referrer`,onError:e=>{e.currentTarget.style.display=`none`}}),d&&(0,m.jsx)(`span`,{className:`sp-status`,children:d})]}),(0,m.jsx)(`div`,{className:`sp-common`,"data-mark":`underline`,children:r}),s&&(0,m.jsx)(`div`,{className:`sp-scientific`,children:s}),p&&(0,m.jsx)(`div`,{className:`sp-caption`,children:p}),x.length>0&&(0,m.jsx)(`div`,{className:`sp-marks`,children:x.map((e,t)=>(0,m.jsxs)(`div`,{className:`sp-mark`,children:[(0,m.jsx)(`span`,{className:`sp-mark-label`,children:e.label}),(0,m.jsx)(`span`,{className:`sp-mark-value`,children:e.value})]},t))}),S.length>0&&(0,m.jsxs)(`div`,{className:`sp-lookalikes`,children:[(0,m.jsxs)(`span`,{className:`sp-lookalikes-k`,children:[(0,m.jsx)(i.layers,{className:`ic sp-lookalikes-ic`}),` Easily confused with`]}),(0,m.jsx)(`ul`,{className:`sp-lookalike-list`,children:S.map((e,t)=>(0,m.jsx)(`li`,{className:`sp-lookalike`,children:e},t))})]}),h&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(h)})]})}function be({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,terms:r,footer:o,delay:s}){let c=i[t]??i.table,l=e=>typeof e==`string`&&e.trim()?e.trim():`—`,{rows:u,langs:d}=(0,p.useMemo)(()=>{let e=r??[],t=[],n=new Set;return{rows:e.map(e=>{let r=new Map;for(let i of e.translations??[]){if(!i||typeof i!=`object`)continue;let e=l(i.lang);n.has(e)||(n.add(e),t.push(e)),r.has(e)||r.set(e,i)}return{term:e,cells:r}}),langs:t}},[r]),f=e=>{if(e===`preferred`)return`var(--insight)`;if(e===`deprecated`)return`var(--warning)`;if(e===`avoid`)return`var(--danger)`};return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),u.length===0?(0,m.jsx)(`div`,{className:`tb-empty`,children:`No terms yet.`}):d.length===0?(0,m.jsx)(`ul`,{className:`tb-flat`,children:u.map(({term:e},t)=>(0,m.jsx)(`li`,{className:`tb-flat-term m-stagger-item m-fade-rise`,style:{"--i":t},children:e.term},t))}):(0,m.jsx)(`div`,{className:`tb-wrap`,children:(0,m.jsxs)(`table`,{className:`tb-table`,children:[(0,m.jsx)(`thead`,{children:(0,m.jsxs)(`tr`,{children:[(0,m.jsx)(`th`,{scope:`col`,children:`Term`}),d.map(e=>(0,m.jsx)(`th`,{scope:`col`,children:e},e))]})}),(0,m.jsx)(`tbody`,{children:u.map(({term:e,cells:t},n)=>(0,m.jsxs)(`tr`,{className:`m-stagger-item m-fade-rise`,style:{"--i":n},children:[(0,m.jsx)(`td`,{className:`tb-term-col`,children:e.term}),d.map(e=>{let n=t.get(e),r=n&&typeof n.text==`string`?n.text:``,i=f(n?.status);return(0,m.jsx)(`td`,{className:`tb-cell`,children:r?(0,m.jsxs)(`span`,{className:`tb-cell-text`,children:[i&&(0,m.jsx)(`span`,{className:`tb-dot`,style:{"--tb-c":i},title:n?.status}),r]}):(0,m.jsx)(`span`,{className:`tb-dash`,children:`—`})},e)})]},n))})]})}),o&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var K={whale:{w:240,h:70,orient:`horizontal`},bus:{w:200,h:90,orient:`horizontal`},generic:{w:90,h:70,orient:`horizontal`},human:{w:40,h:100,orient:`vertical`},building:{w:70,h:160,orient:`vertical`}};function xe(e){return typeof e==`string`&&e in K}function Se(e){let t=(0,O.c)(21),n,r;t[0]===e?(n=t[1],r=t[2]):({shape:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i=K[n],a=`0 0 ${i.w} ${i.h}`,o;t[3]===n?o=t[4]:(o=n===`human`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`circle`,{cx:`20`,cy:`11`,r:`10`}),(0,m.jsx)(`path`,{d:`M8 30 Q20 22 32 30 L34 62 Q27 68 20 68 Q13 68 6 62 Z`}),(0,m.jsx)(`path`,{d:`M11 66 L8 100 L17 100 L19 70 Z`}),(0,m.jsx)(`path`,{d:`M29 66 L32 100 L23 100 L21 70 Z`})]}),t[3]=n,t[4]=o);let s;t[5]===n?s=t[6]:(s=n===`bus`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M6 20 Q6 8 18 8 H172 Q188 8 188 24 V58 Q188 66 180 66 H16 Q6 66 6 56 Z`}),(0,m.jsx)(`rect`,{x:`18`,y:`17`,width:`152`,height:`19`,rx:`3`,className:`szc-glyph-cut`,fill:`var(--surface-elevated)`}),(0,m.jsx)(`circle`,{cx:`46`,cy:`70`,r:`13`}),(0,m.jsx)(`circle`,{cx:`154`,cy:`70`,r:`13`})]}),t[5]=n,t[6]=s);let c;t[7]===n?c=t[8]:(c=n===`whale`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M4 40 C4 20 40 10 100 9 C170 8 210 20 224 32 L236 26 L232 42 L236 56 L224 50 C214 60 170 66 100 65 C40 64 4 56 4 40 Z`}),(0,m.jsx)(`path`,{d:`M60 12 C64 2 76 2 78 12 C72 14 66 14 60 12 Z`}),(0,m.jsx)(`path`,{d:`M18 46 C22 54 34 56 40 50 C34 46 24 44 18 46 Z`})]}),t[7]=n,t[8]=c);let l;t[9]===n?l=t[10]:(l=n===`building`&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`rect`,{x:`10`,y:`6`,width:`50`,height:`154`,rx:`2`}),Array.from({length:8},Ce)]}),t[9]=n,t[10]=l);let u;t[11]===n?u=t[12]:(u=n===`generic`&&(0,m.jsx)(`path`,{d:`M8 55 Q2 30 28 18 Q46 4 66 14 Q86 22 82 42 Q90 52 78 58 Q55 68 30 64 Q12 62 8 55 Z`}),t[11]=n,t[12]=u);let d;return t[13]!==r||t[14]!==a||t[15]!==o||t[16]!==s||t[17]!==c||t[18]!==l||t[19]!==u?(d=(0,m.jsxs)(`svg`,{viewBox:a,preserveAspectRatio:`xMidYMax meet`,fill:`currentColor`,"aria-hidden":`true`,...r,children:[o,s,c,l,u]}),t[13]=r,t[14]=a,t[15]=o,t[16]=s,t[17]=c,t[18]=l,t[19]=u,t[20]=d):d=t[20],d}function Ce(e,t){return Array.from({length:3},(e,n)=>(0,m.jsx)(`rect`,{x:17+n*13,y:16+t*17,width:`8`,height:`9`,rx:`1`,className:`szc-glyph-cut`,fill:`var(--surface-elevated)`},`${t}-${n}`))}var we=190,q=16;function Te(e,t){if(typeof e!=`number`||!Number.isFinite(e))return`—`;let n=e.toLocaleString(void 0,{maximumFractionDigits:2});return t?`${n} ${t}`:n}function Ee({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,unit:r,subjects:o,footer:s,delay:c}){let l=i[t]??i.layers,u=o??[],d=u.reduce((e,t)=>{let n=typeof t.length==`number`&&Number.isFinite(t.length)?t.length:-1/0;return n>e?n:e},0),f=d>0?we/d:0,p=u.map(e=>{let t=xe(e.shape)?e.shape:`generic`,n=K[t],r=typeof e.length==`number`&&Number.isFinite(e.length)&&e.length>0&&f>0?Math.max(e.length*f,q):q;return{subject:e,shape:t,width:n.orient===`horizontal`?r:r*(n.w/n.h),height:n.orient===`vertical`?r:r*(n.h/n.w)}}),h=Math.max(...p.map(e=>e.height),q);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),p.length===0?(0,m.jsx)(`div`,{className:`szc-empty`,children:`No subjects yet.`}):(0,m.jsx)(`div`,{className:`szc-scroll`,children:(0,m.jsx)(`div`,{className:`szc-row`,style:{"--szc-track-h":h+`px`},children:p.map(({subject:e,shape:t,width:i,height:a},o)=>(0,m.jsxs)(`div`,{className:`szc-item m-stagger-item m-scale-in`,style:{"--i":o,color:n},children:[(0,m.jsx)(`div`,{className:`szc-shape-box`,children:(0,m.jsx)(Se,{shape:t,style:{width:i,height:a}})}),(0,m.jsx)(`div`,{className:`szc-item-label`,...o===0?{"data-mark":`underline`}:{},children:e.label}),(0,m.jsx)(`div`,{className:`szc-item-value`,children:Te(e.length,r)})]},o))})}),s&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function De(e){let t=Array.from(e),n=t.length;return t.map((e,t)=>({ch:e,group:Math.floor((n-1-t)/4)}))}function Oe({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,value:r,bases:o,footer:s,delay:c}){let l=i[t]??i.chart,u=o??[],d=typeof r==`string`||typeof r==`number`?String(r):``;return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),d&&(0,m.jsx)(`div`,{className:`bcv-value`,"data-mark":`underline`,children:d}),u.length>0?(0,m.jsx)(`div`,{className:`bcv-rows`,children:u.map((e,t)=>{let n=typeof e.digits==`string`?e.digits.trim():``,r=typeof e.radix==`number`&&Number.isFinite(e.radix)?e.radix:null;return(0,m.jsxs)(`div`,{className:`bcv-row m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,m.jsxs)(`div`,{className:`bcv-row-head`,children:[(0,m.jsx)(`span`,{className:`bcv-label`,children:e.label}),r!==null&&(0,m.jsxs)(`span`,{className:`bcv-radix`,children:[`base `,r]})]}),n?(0,m.jsx)(`div`,{className:`bcv-digits`,children:De(n).map((e,t)=>(0,m.jsx)(`span`,{className:`bcv-digit`,"data-group":e.group%2==0?`a`:`b`,children:e.ch},t))}):(0,m.jsx)(`span`,{className:`bcv-dash`,children:`—`})]},t)})}):(0,m.jsx)(`div`,{className:`bcv-empty`,children:`No bases yet.`}),s&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function ke(e){let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?`?`:t.length===1?t[0][0]?.toUpperCase()??`?`:((t[0][0]??``)+(t[t.length-1][0]??``)).toUpperCase()}function Ae(e){return typeof e==`string`&&e.trim()||typeof e==`number`&&Number.isFinite(e)?String(e):`—`}function je({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,name:r,era:o,born:s,died:c,knownFor:l,facts:u,lifeEvents:d,legacy:f,footer:p,delay:h}){let g=i[t]??i.doc,_=u??[],v=d??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsxs)(`div`,{className:`hp-head`,children:[(0,m.jsx)(`div`,{className:`hp-medallion`,"aria-hidden":`true`,children:ke(r)}),(0,m.jsxs)(`div`,{className:`hp-headline`,children:[(0,m.jsx)(`div`,{className:`hp-name`,"data-mark":`underline`,children:r}),o&&(0,m.jsx)(`div`,{className:`hp-era`,children:o}),l&&(0,m.jsx)(`div`,{className:`hp-known`,children:l})]})]}),(s||c)&&(0,m.jsxs)(`div`,{className:`hp-dates`,children:[s&&(0,m.jsxs)(`div`,{className:`hp-date`,children:[(0,m.jsx)(`span`,{className:`hp-date-k`,children:`Born`}),(0,m.jsx)(`span`,{className:`hp-date-v`,children:s})]}),c&&(0,m.jsxs)(`div`,{className:`hp-date`,children:[(0,m.jsx)(`span`,{className:`hp-date-k`,children:`Died`}),(0,m.jsx)(`span`,{className:`hp-date-v`,children:c})]})]}),v.length>0&&(0,m.jsx)(`div`,{className:`hp-beats`,children:v.map((e,t)=>(0,m.jsxs)(`div`,{className:`hp-beat m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,m.jsx)(`span`,{className:`hp-beat-year`,children:Ae(e.year)}),(0,m.jsx)(`span`,{className:`hp-beat-label`,children:e.label})]},t))}),_.length>0&&(0,m.jsx)(`div`,{className:`hp-facts`,children:_.map((e,t)=>(0,m.jsxs)(`div`,{className:`hp-fact-row`,children:[(0,m.jsx)(`span`,{className:`hp-fact-label`,children:e.label}),(0,m.jsx)(`span`,{className:`hp-fact-value`,children:e.value})]},t))}),f&&(0,m.jsx)(`div`,{className:`hp-legacy`,children:f}),p&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)})]})}function J(e){return typeof e==`string`&&e.trim()||typeof e==`number`&&Number.isFinite(e)?String(e):`—`}function Me({title:e,icon:t=`clock`,iconColor:n=`var(--presence)`,date:r,events:o,born:s,died:c,footer:l,delay:u}){let d=i[t]??i.clock,f=o??[],p=s??[],h=c??[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`otd-date`,children:r}),f.length>0?(0,m.jsx)(`div`,{className:`otd-events`,children:f.map((e,t)=>(0,m.jsxs)(`div`,{className:`otd-event m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,m.jsx)(`span`,{className:`otd-year-chip`,children:J(e.year)}),(0,m.jsxs)(`div`,{className:`otd-event-body`,children:[(0,m.jsx)(`div`,{className:`otd-label`,...t===0?{"data-mark":`underline`}:{},children:e.label}),e.category&&(0,m.jsx)(`span`,{className:`otd-cat`,children:e.category})]})]},t))}):(0,m.jsx)(`div`,{className:`otd-empty`,children:`No events yet.`}),(p.length>0||h.length>0)&&(0,m.jsxs)(`div`,{className:`otd-people`,children:[p.length>0&&(0,m.jsxs)(`div`,{className:`otd-people-col`,children:[(0,m.jsx)(`span`,{className:`otd-people-k`,children:`Born`}),p.map((e,t)=>(0,m.jsxs)(`div`,{className:`otd-person`,children:[(0,m.jsx)(`span`,{className:`otd-person-year`,children:J(e.year)}),(0,m.jsx)(`span`,{className:`otd-person-name`,children:e.name})]},t))]}),h.length>0&&(0,m.jsxs)(`div`,{className:`otd-people-col`,children:[(0,m.jsx)(`span`,{className:`otd-people-k`,children:`Died`}),h.map((e,t)=>(0,m.jsxs)(`div`,{className:`otd-person`,children:[(0,m.jsx)(`span`,{className:`otd-person-year`,children:J(e.year)}),(0,m.jsx)(`span`,{className:`otd-person-name`,children:e.name})]},t))]})]}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function Ne({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,name:r,flag:o,capital:s,population:c,area:l,officialLanguages:u,currency:d,facts:f,footer:p,delay:h}){let g=i[t]??i.globe,_=Array.isArray(f)?f:[],v=(Array.isArray(u)?u:[]).filter(e=>typeof e==`string`&&e.trim().length>0),y=[{label:`Capital`,value:s},{label:`Population`,value:c},{label:`Area`,value:l},{label:`Currency`,value:d}].filter(e=>typeof e.value==`string`&&!!e.value);return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h??0)+`ms`},children:[e&&(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,m.jsx)(`div`,{className:`cc-banner`,children:(0,m.jsx)(`span`,{className:`cc-flag`,role:`img`,"aria-label":`Flag of ${r}`,children:typeof o==`string`&&o.trim()?o:`🌐`})}),(0,m.jsx)(`div`,{className:`cc-name`,"data-mark":`underline`,children:r}),y.length>0&&(0,m.jsx)(`div`,{className:`cc-marks`,children:y.map((e,t)=>(0,m.jsxs)(`div`,{className:`cc-mark`,children:[(0,m.jsx)(`span`,{className:`cc-mark-label`,children:e.label}),(0,m.jsx)(`span`,{className:`cc-mark-value`,children:e.value})]},t))}),v.length>0&&(0,m.jsx)(`div`,{className:`cc-langs`,children:v.map((e,t)=>(0,m.jsx)(`span`,{className:`cc-lang-chip`,children:e},t))}),_.length>0&&(0,m.jsx)(`div`,{className:`cc-facts`,children:_.map((e,t)=>(0,m.jsxs)(`div`,{className:`cc-fact-row`,children:[(0,m.jsx)(`span`,{className:`cc-fact-label`,children:e.label}),(0,m.jsx)(`span`,{className:`cc-fact-value`,children:e.value})]},t))}),p&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)})]})}function Pe({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,countries:r,footer:o,delay:s}){let c=i[t]??i.globe,l=Array.isArray(r)?r:[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),l.length===0?(0,m.jsx)(`div`,{className:`wg-empty`,children:`No countries yet.`}):(0,m.jsx)(`div`,{className:`wg-grid`,children:l.map((e,t)=>(0,m.jsxs)(`div`,{className:`wg-tile m-stagger-item m-scale-in`,style:{"--i":t},children:[(0,m.jsx)(`span`,{className:`wg-flag`,role:`img`,"aria-label":`Flag of ${e.name}`,children:typeof e.flag==`string`&&e.flag.trim()?e.flag:`🌐`}),(0,m.jsx)(`div`,{className:`wg-name`,children:e.name}),e.capital&&(0,m.jsxs)(`div`,{className:`wg-row`,children:[(0,m.jsx)(`span`,{className:`wg-row-k`,children:`Capital`}),(0,m.jsx)(`span`,{className:`wg-row-v`,children:e.capital})]}),e.currency&&(0,m.jsxs)(`div`,{className:`wg-row`,children:[(0,m.jsx)(`span`,{className:`wg-row-k`,children:`Currency`}),(0,m.jsx)(`span`,{className:`wg-row-v`,children:e.currency})]}),e.language&&(0,m.jsxs)(`div`,{className:`wg-row`,children:[(0,m.jsx)(`span`,{className:`wg-row-k`,children:`Language`}),(0,m.jsx)(`span`,{className:`wg-row-v`,children:e.language})]})]},t))}),o&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var Y=[`var(--presence)`,`var(--danger)`,`var(--warning)`,`var(--text-muted)`],Fe=new Set(Y);function Ie(e,t){return typeof e.color==`string`&&Fe.has(e.color)?e.color:Y[t%Y.length]}function Le({title:e,icon:t=`shield`,iconColor:n=`var(--danger)`,dates:r,sides:o,keyBattles:s,casualties:c,outcome:l,footer:u,delay:d}){let f=i[t]??i.shield,p=Array.isArray(o)?o:[],h=Array.isArray(s)?s:[];return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,m.jsx)(`div`,{className:`wc-dates`,children:r}),p.length>0&&(0,m.jsx)(`div`,{className:`wc-sides`,children:p.map((e,t)=>{let n=Ie(e,t),r=Array.isArray(e.leaders)?e.leaders:[];return(0,m.jsxs)(`div`,{className:`wc-side m-stagger-item m-fade-rise`,style:{"--i":t,"--wc-c":n},children:[(0,m.jsx)(`div`,{className:`wc-side-name`,children:e.name}),r.length>0&&(0,m.jsx)(`ul`,{className:`wc-leaders`,children:r.filter(e=>typeof e==`string`&&e.trim().length>0).map((e,t)=>(0,m.jsx)(`li`,{className:`wc-leader`,children:e},t))})]},t)})}),h.length>0&&(0,m.jsx)(`div`,{className:`wc-battles`,children:h.map((e,t)=>(0,m.jsxs)(`div`,{className:`wc-battle`,children:[(0,m.jsx)(`span`,{className:`wc-battle-dot`,"aria-hidden":`true`}),(0,m.jsx)(`span`,{className:`wc-battle-label`,children:e.label}),e.at&&(0,m.jsx)(`span`,{className:`wc-battle-at`,children:e.at})]},t))}),c&&(0,m.jsxs)(`div`,{className:`wc-stat-row`,children:[(0,m.jsx)(`span`,{className:`wc-stat-k`,children:`Casualties`}),(0,m.jsx)(`span`,{className:`wc-stat-v`,children:c})]}),l&&(0,m.jsx)(`div`,{className:`wc-outcome`,children:l}),u&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var X=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--text-muted)`],Re=new Set([`var(--presence)`,`var(--presence-soft)`,`var(--presence-deep)`,`var(--insight)`,`var(--insight-soft)`,`var(--warning)`,`var(--warning-soft)`,`var(--danger)`,`var(--text-muted)`]);function ze(e,t){return typeof e.color==`string`&&Re.has(e.color)?e.color:X[t%X.length]}var Z=3;function Be(e){return e<=Z?Math.max(e,1):Math.ceil(e/Math.ceil(e/Z))}function Q(e){return typeof e==`string`&&e.trim().length>0}function Ve({title:e,icon:t=`proof`,iconColor:n=`var(--presence)`,terms:r,discriminator:o,discriminatorLabel:s,commonMistake:c,footer:l,delay:u}){let d=i[t]??i.proof,f=(Array.isArray(r)?r:[]).filter(e=>!!e&&Q(e.term)),p=Be(f.length),h=Q(o),g=Q(s)?s:`The test`;return(0,m.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,m.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,m.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),f.length>0&&(0,m.jsx)(`div`,{className:`dcd-terms`,style:{"--dcd-cols":p,"--dcd-cols-narrow":Math.min(p,2)},children:f.map((e,t)=>(0,m.jsxs)(`div`,{className:`dcd-term m-stagger-item m-fade-rise`,style:{"--i":t,"--dcd-c":ze(e,t)},children:[(0,m.jsxs)(`div`,{className:`dcd-term-head`,children:[(0,m.jsx)(`span`,{className:`dcd-term-name`,children:e.term}),Q(e.tag)&&(0,m.jsx)(`span`,{className:`dcd-term-tag`,children:e.tag})]}),Q(e.gist)&&(0,m.jsx)(`p`,{className:`dcd-gist`,children:e.gist}),Q(e.example)&&(0,m.jsxs)(`p`,{className:`dcd-example`,children:[(0,m.jsx)(`span`,{className:`dcd-example-k`,children:`e.g.`}),e.example]})]},t))}),h&&(0,m.jsxs)(`div`,{className:`dcd-rule m-stagger-item m-fade-rise`,style:{"--i":f.length},children:[(0,m.jsxs)(`div`,{className:`dcd-rule-label`,children:[(0,m.jsx)(i.spark,{className:`ic`,"aria-hidden":`true`}),g]}),(0,m.jsx)(`p`,{className:`dcd-rule-text`,"data-mark":`underline`,children:o})]}),Q(c)&&(0,m.jsxs)(`p`,{className:`dcd-mistake`,children:[(0,m.jsx)(i.alert,{className:`ic`,"aria-hidden":`true`}),(0,m.jsxs)(`span`,{className:`dcd-mistake-text`,children:[(0,m.jsx)(`span`,{className:`dcd-mistake-k`,children:`Common slip `}),c]})]}),f.length===0&&!h&&(0,m.jsx)(`div`,{className:`dcd-empty`,children:`No terms to tell apart yet.`}),l&&(0,m.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}var He=e({referenceRegistry:()=>$}),$={factsheet:c(D),newsdigest:c(ie),dictionary:c(se),translation:c(ae),pronunciation:c(oe),gloss:c(ce),scalefelt:c(A),hearit:c(P),ipachart:c(B),scriptstroke:c(pe),phonicsword:c(he),speciescard:c(ye),etymtree:c(E),hazardcard:c(re),termbase:c(be),sizecompare:c(Ee),baseconversion:c(Oe),historicalperson:c(je),onthisday:c(Me),countrycard:c(Ne),worldgrid:c(Pe),warconflict:c(Le),posbreakdown:c(G),distinctioncard:c(Ve)};export{He as n,$ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as e}from"./useDashboardLoop-BoVNM-pT.js";function t(e){return e.toLowerCase().replace(/[^a-z0-9 ]/g,` `).replace(/\s+/g,` `).trim()}function n(n,r){if(r.topic){let e=t(r.topic),i=n.find(n=>n.topic&&t(n.topic)===e);if(i)return i}let i=e(r.text);if(i.size===0)return null;let a=null,o=0;for(let t of n){let n=e([t.title,t.thesis.text,...t.metrics.map(e=>e.label)].join(` `)),r=0;for(let e of i)n.has(e)&&r++;r>o&&(o=r,a=t)}return o>=2?a:null}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./generateBeats-
|
|
1
|
+
import{t as e}from"./generateBeats-DtptFLlG.js";function t(e){let t=[];for(let n of e.tour){let r=e.spec.blocks[n.index]?.id;r&&t.push({spot:r,...n.say?{say:n.say}:{},marks:n.marks??(n.mark?[n.mark]:[])})}return t}function n(n){let r=t(n),i=e(n.spec.blocks,{opener:n.narration,...r.length?{tour:r.map(({spot:e,say:t})=>t?{spot:e,say:t}:{spot:e})}:{}});return{spec:n.spec,say:n.spoken??n.narration,beats:i,cues:r}}function r(e,t=0){let r=Math.max(0,Math.min(t,e.length));return e.slice(r).map(n)}export{r as n,n as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./streamParse-B-Gjwa9T.js";import{t}from"./providers-
|
|
1
|
+
import{n as e}from"./streamParse-B-Gjwa9T.js";import{t}from"./providers-BovElgRL.js";import{t as n}from"./verbatim-DBTj9sPD.js";var r=[`unstated-assumption`,`missing-baseline`,`cherry-pick`,`overgeneralization`,`undefined-term`,`circular`];function i(e){let t=String(e??``).toLowerCase().trim();return r.includes(t)?t:`unstated-assumption`}function a(e,t,r,a){let o=(e.anchorQuote??``).trim(),s=(e.question??``).trim();if(!o||!s)return null;let c=r[t.source];if(!c)return null;let l=n(o,c);if(l===0)return null;let u,d=(e.rebuttalQuote??``).trim();if(e.addressed&&d)for(let e=0;e<r.length;e+=1){let t=n(d,r[e]);if(t>0){u={quote:d,page:t,doc:e};break}}return{id:`obj-${t.id}-${a}`,claimId:t.id,doc:t.source,kind:i(e.kind),question:s,anchorQuote:o,anchorPage:l,status:u?`addressed`:`open`,...u?{rebuttalQuote:u.quote,rebuttalPage:u.page,rebuttalDoc:u.doc}:{}}}var o=10;function s(e){if(e&&typeof e==`object`)return e;let t=String(e),n=t.indexOf(`{`);if(n<0)return null;let r=0,i=!1,a=!1;for(let e=n;e<t.length;e+=1){let o=t[e];if(i){a?a=!1:o===`\\`?a=!0:o===`"`&&(i=!1);continue}if(o===`"`)i=!0;else if(o===`{`)r+=1;else if(o===`}`&&(--r,r===0))try{return JSON.parse(t.slice(n,e+1))}catch{return null}}return null}var c=`You are a meticulous, skeptical peer reviewer. You attack only a document's INTERNAL logic — never outside facts — you quote the document verbatim, and you return strict JSON only.`;function l(e){return`For each CLAIM below (a load-bearing assertion from one document), raise the single SHARPEST
|
|
2
2
|
objection to its internal logic, using ONLY this taxonomy:
|
|
3
3
|
- unstated-assumption | missing-baseline | cherry-pick | overgeneralization | undefined-term | circular
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./streamParse-B-Gjwa9T.js";import{t}from"./providers-
|
|
1
|
+
import{n as e}from"./streamParse-B-Gjwa9T.js";import{t}from"./providers-BovElgRL.js";import{t as n}from"./verbatim-DBTj9sPD.js";import{t as r}from"./extractNumbers-CuhagRkd.js";function i(e){return`${+e.toFixed(1)}%`}function a(e,t,n){return e.unit!==t.unit||Math.abs(e.value-t.value)<=(e.unit===`%`?.5:e.unit===`x`?.05:Math.max(1,Math.abs(e.value)*.02))?null:{label:n,stated:e.raw,computed:t.raw,detail:`p.${e.page}: ${e.raw} ✕ p.${t.page}: ${t.raw}`}}function o(e,t,n,r){if(e.unit!==`%`||t.unit!==n.unit||t.unit!==`currency`&&t.unit!==`count`||t.value===0)return null;let a=(n.value-t.value)/t.value*100,o=Math.max(1,Math.abs(e.value)*.05);return Math.abs(a-e.value)<=o?null:{label:r,stated:e.raw,computed:i(a),detail:`p.${e.page}: ${e.raw} ✕ p.${t.page}: ${t.raw}→${n.raw} = ${i(a)}`}}var s=60,c=8;function l(e){if(e&&typeof e==`object`)return e;let t=String(e),n=t.indexOf(`{`);if(n<0)return null;let r=0,i=!1,a=!1;for(let e=n;e<t.length;e+=1){let o=t[e];if(i){a?a=!1:o===`\\`?a=!0:o===`"`&&(i=!1);continue}if(o===`"`)i=!0;else if(o===`{`)r+=1;else if(o===`}`&&(--r,r===0))try{return JSON.parse(t.slice(n,e+1))}catch{return null}}return null}function u(e){return typeof e==`string`?e:``}var d=`You check a document's own numbers for internal consistency and return strict JSON only. You only relate figures the document ITSELF ties together, you never invent a quote, and when nothing checkably relates you return an empty list.`;function f(e){return`Below are figures extracted verbatim from ONE document. Find places where the document's own
|
|
2
2
|
numbers disagree — and ONLY those the document itself relates.
|
|
3
3
|
|
|
4
4
|
FIGURES:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./streamParse-B-Gjwa9T.js";import{t}from"./providers-
|
|
1
|
+
import{n as e}from"./streamParse-B-Gjwa9T.js";import{t}from"./providers-BovElgRL.js";import{t as n}from"./citation-BsSvaaer.js";import{t as r}from"./search-ZN7v_P5B.js";import{t as i}from"./extractNumbers-CuhagRkd.js";var a=.15;function o(e){return`${+e.toFixed(+(Math.abs(e)<10&&!Number.isInteger(e)))}`}function s(e,t,n,r){if(!r)return{status:`not-due`};if(!n)return{status:`incomparable`};if(e==null||t==null||!Number.isFinite(e)||!Number.isFinite(t))return{status:`unknown`};let i=Math.abs(e)>1e-9?Math.abs(e):1;if(Math.abs(t-e)/i<=a)return{status:`hit`,delta:`on target`};let s=Math.min(Math.abs(e),Math.abs(t)),c=s>1e-9?Math.max(Math.abs(e),Math.abs(t))/s:void 0;return{status:`missed`,delta:c&&c>=1.5?`${+c.toFixed(+(c<10))}× off`:`${t>e?`+`:`−`}${o(Math.abs(t-e))}`,...c?{factor:c}:{}}}function c(e,t){let n=r(e);return n.needsKey&&!t?r(`wikipedia`):n}function l(e){return e.quote.replace(/\s+/g,` `).trim().slice(0,200)}function u(e){let t=i([{id:`x`,page:0,quote:e}]);return t.length>0?{value:t[0].value,unit:t[0].unit}:null}function d(e){if(e&&typeof e==`object`)return e;let t=String(e),n=t.indexOf(`{`);if(n<0)return null;let r=0,i=!1,a=!1;for(let e=n;e<t.length;e+=1){let o=t[e];if(i){a?a=!1:o===`\\`?a=!0:o===`"`&&(i=!1);continue}if(o===`"`)i=!0;else if(o===`{`)r+=1;else if(o===`}`&&(--r,r===0))try{return JSON.parse(t.slice(n,e+1))}catch{return null}}return null}function f(e){return typeof e==`string`?e.trim():``}var p=`You compare a document's past PREDICTION against what actually happened, judging ONLY from the search snippets given to you, and return strict JSON. You never invent a source, URL, number, or outcome, and you default to an empty/unknown outcome when the sources do not clearly say.`;function m(e,t){return`For each PREDICTION below (made in a document in the past), report what ACTUALLY happened, using
|
|
2
2
|
ONLY the search snippets listed for it.
|
|
3
3
|
|
|
4
4
|
Return ONLY JSON (no prose, no fences):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`sample timeline`;function t(t,n,r){let i=e=>n===`%`?`${e}%`:`${e} ${n}`;return r.map(([n,r])=>({t:n,value:r,receipt:{quote:`${t} in ${n} measured ${i(r)}.`,host:e}}))}var n={quote:`Rising defaults hollowed out the pools behind the bonds. Accounted for 65% of the outcome.`,host:e},r={quote:`Each surprise writedown made every rival look suspect. Accounted for 70% of the outcome.`,host:e},i={title:`Why did the 2008 financial crisis happen?`,outcomeId:`credit-crisis`,provenance:{illustrative:!0,notes:[`Illustrative example — the classic 2008 causal web, not your data.`]},nodes:[{id:`cheap-mortgages`,label:`Cheap credit after 2001`,role:`root`,domain:`policy`,depth:0,tier:`T2`,date:{t:`2001`,until:`2004`},detail:`Policy rates near 1% through 2004 pushed lenders and investors toward yield.`,receipt:{quote:`Policy rates were held near 1 percent into 2004.`,host:e}},{id:`lending-standards`,label:`Lending standards loosened`,role:`root`,domain:`policy`,depth:0,tier:`T2`,date:{t:`2003`,until:`2006`},detail:`Low-doc and no-doc loans normalized as origination fees rewarded volume.`,receipt:{quote:`Documentation requirements fell steadily from 2003.`,host:e}},{id:`housing-boom`,label:`Housing boom`,role:`mechanism`,domain:`economy`,depth:1,tier:`T2`,date:{t:`2003`,until:`2006`},receipt:{quote:`Housing starts ran well above trend through 2005.`,host:e}},{id:`mortgage-volume`,label:`Mortgage volume surged`,role:`mechanism`,domain:`economy`,depth:1,tier:`T2`,unit:`$bn`,receipt:{quote:`Originations peaked near 3,100 billion dollars.`,host:e},series:{tier:`T2`,unit:`$bn`,receipt:{quote:`Annual originations, 2003-2009.`,host:e},points:t(`Originations`,`$bn`,[[`2003`,3800],[`2004`,2900],[`2005`,3100],[`2006`,3e3],[`2007`,2400],[`2008`,1500],[`2009`,1800]])},children:[{id:`mortgage-volume.prime`,label:`Prime`,role:`mechanism`,depth:1,tier:`T2`,value:1900,unit:`$bn`,receipt:{quote:`Prime loans made up about 1,900 of originations.`,host:e}},{id:`mortgage-volume.alt-a`,label:`Alt-A`,role:`mechanism`,depth:1,tier:`T2`,value:400,unit:`$bn`,receipt:{quote:`Alt-A lending reached roughly 400 billion.`,host:e}},{id:`mortgage-volume.subprime`,label:`Subprime`,role:`mechanism`,depth:1,tier:`T2`,value:600,unit:`$bn`,receipt:{quote:`Subprime originations touched 600 billion at the peak.`,host:e}},{id:`mortgage-volume.arm`,label:`Adjustable-rate`,role:`mechanism`,depth:1,tier:`T2`,value:100,unit:`$bn`,receipt:{quote:`Exotic adjustable-rate products added another 100.`,host:e}}]},{id:`home-prices`,label:`Home prices climbed, then fell`,role:`mechanism`,domain:`economy`,depth:2,tier:`T2`,receipt:{quote:`National prices rose two-thirds, then gave most of it back.`,host:e},series:{tier:`T2`,unit:`index`,receipt:{quote:`National house-price index, 2003-2009.`,host:e},points:t(`The national house-price index`,`index`,[[`2003`,100],[`2004`,127],[`2005`,152],[`2006`,168],[`2007`,160],[`2008`,132],[`2009`,115]])}},{id:`mbs-cdo-exposure`,label:`MBS / CDO exposure spread`,role:`mechanism`,domain:`economy`,depth:2,tier:`T2`,date:{t:`2004`,until:`2007`},detail:`Securitization moved mortgage risk onto bank and fund balance sheets worldwide.`,receipt:{quote:`Structured mortgage products spread across balance sheets.`,host:e}},{id:`defaults`,label:`Mortgage defaults rose`,role:`mechanism`,domain:`society`,depth:3,tier:`T2`,value:10.1,unit:`%`,receipt:{quote:`Delinquencies reached 10.1 percent by 2009.`,host:e},series:{tier:`T2`,unit:`%`,receipt:{quote:`Mortgage delinquency rate, 2003-2009.`,host:e},points:t(`The delinquency rate`,`%`,[[`2003`,4.5],[`2004`,4.3],[`2005`,4.6],[`2006`,5],[`2007`,6.3],[`2008`,8.9],[`2009`,10.1]])}},{id:`asset-values`,label:`MBS asset values`,role:`mechanism`,domain:`economy`,depth:4,tier:`T2`,date:{t:`2007`,until:`2008`},receipt:{quote:`Senior tranches once rated AAA traded at deep discounts.`,host:e}},{id:`bank-losses`,label:`Bank losses and writedowns`,role:`mechanism`,domain:`economy`,depth:4,tier:`T2`,receipt:{quote:`Writedowns climbed into the hundreds of billions.`,host:e},series:{tier:`T2`,unit:`$bn`,receipt:{quote:`Annual bank writedowns, 2003-2009.`,host:e},points:t(`Writedowns`,`$bn`,[[`2003`,2],[`2004`,3],[`2005`,4],[`2006`,12],[`2007`,160],[`2008`,490],[`2009`,280]])}},{id:`panic`,label:`Counterparty panic`,role:`mechanism`,domain:`society`,depth:5,tier:`T2`,date:{t:`2008-09`},detail:`Nobody could tell who held the losses, so everyone stopped trusting everyone.`,receipt:{quote:`After Lehman failed, counterparty trust evaporated.`,host:e}},{id:`liquidity`,label:`Interbank liquidity`,role:`mechanism`,domain:`economy`,depth:5,tier:`T2`,receipt:{quote:`Interbank lending spreads spiked to records.`,host:e},series:{tier:`T2`,unit:`bps`,receipt:{quote:`Interbank spread, annual average, 2003-2009.`,host:e},points:t(`The interbank spread`,`bps`,[[`2003`,30],[`2004`,28],[`2005`,35],[`2006`,40],[`2007`,110],[`2008`,160],[`2009`,65]])}},{id:`credit-crisis`,label:`Credit crisis`,role:`outcome`,domain:`economy`,depth:6,tier:`T2`,date:{t:`2008`,until:`2009`},value:4.3,unit:`%`,receipt:{quote:`Output fell 4.3 percent from peak to trough.`,host:e}}],edges:[{from:`cheap-mortgages`,to:`housing-boom`,verb:`fueled`,relation:`causes`,weight:.55,sign:1,tier:`T2`,status:`supported`,receipt:{quote:`Cheap financing pulled buyers forward into the boom. Accounted for 55% of the outcome.`,host:e}},{from:`cheap-mortgages`,to:`mortgage-volume`,verb:`expanded`,relation:`contributes`,weight:.35,sign:1,tier:`T2`,status:`supported`,receipt:{quote:`Low rates made ever-larger loans serviceable. Accounted for 35% of the outcome.`,host:e}},{from:`lending-standards`,to:`mortgage-volume`,verb:`opened`,relation:`enables`,weight:.5,sign:1,tier:`T2`,status:`supported`,receipt:{quote:`Looser underwriting admitted borrowers once turned away. Accounted for 50% of the outcome.`,host:e}},{from:`housing-boom`,to:`home-prices`,verb:`lifted`,relation:`causes`,weight:.7,sign:1,tier:`T2`,status:`supported`,receipt:{quote:`Demand outran supply and prices followed. Accounted for 70% of the outcome.`,host:e}},{from:`mortgage-volume`,to:`mbs-cdo-exposure`,verb:`fed`,relation:`causes`,weight:.8,sign:1,tier:`T2`,status:`supported`,receipt:{quote:`Nearly every new loan was pooled and resold. Accounted for 80% of the outcome.`,host:e}},{from:`home-prices`,to:`defaults`,verb:`suppressed`,relation:`dampens`,weight:.4,sign:-1,tier:`T2`,status:`supported`,receipt:{quote:`Rising prices let stressed borrowers refinance or sell. Accounted for 40% of the outcome.`,host:e}},{from:`mortgage-volume`,to:`defaults`,verb:`seeded`,relation:`contributes`,weight:.5,sign:1,tier:`T2`,status:`supported`,receipt:{quote:`The marginal loan was the first to sour. Accounted for 50% of the outcome.`,host:e}},{from:`defaults`,to:`asset-values`,verb:`crushed`,relation:`dampens`,weight:.65,sign:-1,tier:`T2`,status:`supported`,receipt:n,receipts:[n,{quote:`Tranche models had assumed defaults could not cluster.`,host:e}]},{from:`asset-values`,to:`bank-losses`,verb:`cushioned`,relation:`dampens`,weight:.6,sign:-1,tier:`T2`,status:`supported`,receipt:{quote:`While marks held up, balance sheets looked whole. Accounted for 60% of the outcome.`,host:e}},{from:`mbs-cdo-exposure`,to:`bank-losses`,verb:`transmitted`,relation:`contributes`,weight:.5,sign:1,tier:`T2`,status:`supported`,receipt:{quote:`The bigger the book of structured paper, the bigger the hit. Accounted for 50% of the outcome.`,host:e}},{from:`bank-losses`,to:`panic`,verb:`ignited`,relation:`causes`,weight:.7,sign:1,tier:`T2`,status:`supported`,receipt:r,receipts:[r,{quote:`Money funds broke the buck and the run went wholesale.`,host:e}]},{from:`panic`,to:`liquidity`,verb:`froze`,relation:`dampens`,weight:.6,sign:-1,tier:`T2`,status:`supported`,receipt:{quote:`Banks hoarded cash rather than lend to each other. Accounted for 60% of the outcome.`,host:e}},{from:`liquidity`,to:`credit-crisis`,verb:`restrained`,relation:`dampens`,weight:.3,sign:-1,tier:`T2`,status:`supported`,receipt:{quote:`While money still moved, the real economy held on. Accounted for 30% of the outcome.`,host:e}},{from:`bank-losses`,to:`credit-crisis`,verb:`drove`,relation:`contributes`,weight:.45,sign:1,tier:`T2`,status:`supported`,receipt:{quote:`Capital-starved banks pulled credit from firms and households. Accounted for 45% of the outcome.`,host:e}},{from:`panic`,to:`credit-crisis`,verb:`deepened`,relation:`contributes`,weight:.35,sign:1,tier:`T2`,status:`supported`,receipt:{quote:`Fear finished what the losses started. Accounted for 35% of the outcome.`,host:e}}]};export{i as WORLD_SEED};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import{s as e}from"./spokenText-C88IQJ0M.js";import{d as t,h as n,v as r,y as i}from"./attachments-BW-vki-E.js";import{t as a}from"./providers-BovElgRL.js";import{n as o}from"./speed-K5_Ebj-8.js";import{i as s,n as c,r as l,t as u}from"./cache-CvbSI-pr.js";import{a as d,d as f,i as p,l as m,o as h,r as g,u as _}from"./validate-sGUCmPAs.js";import{n as v}from"./number-zqlPMliA.js";import{a as ee,c as y,i as b,l as x,n as te,o as ne,r as re,s as S}from"./officeDoc-GU6Cssjf.js";import{n as ie,r as ae,t as oe}from"./csv-DAqzYXUs.js";import"./search-ZN7v_P5B.js";var C=null,w=!1,T=!1,E=0,D=new Map;function O(){if(!(C||T)){if(typeof Worker>`u`){T=!0;return}try{C=new Worker(new URL(`/assets/worker-D7eK-Ya8.js`,``+import.meta.url),{type:`module`}),C.onmessage=e=>{let t=e.data;if(t.type===`ready`)w=!0;else if(t.type===`error`)T=!0,k();else if(t.type===`result`){let e=D.get(t.id);D.delete(t.id),e?.kind===`fit`&&e.resolve(t.fits)}else if(t.type===`embedded`){let e=D.get(t.id);D.delete(t.id),e?.kind===`embed`&&e.resolve(t.vec.length?t.vec:null)}},C.onerror=()=>{T=!0,k()},C.postMessage({type:`init`,base:ue,modelId:le})}catch{T=!0}}}function k(){for(let e of D.values())e.resolve(null);D.clear();try{C?.terminate()}catch{}C=null,w=!1}function se(e,t=80){if(O(),!w||!C)return Promise.resolve(null);let n=++E;return new Promise(r=>{let i=setTimeout(()=>{D.delete(n),r(null)},t);D.set(n,{kind:`fit`,resolve:e=>{clearTimeout(i),r(e?new Map(e):null)}}),C.postMessage({type:`fit`,id:n,query:e})})}function ce(e,t=80){if(O(),!w||!C)return Promise.resolve(null);let n=++E;return new Promise(r=>{let i=setTimeout(()=>{D.delete(n),r(null)},t);D.set(n,{kind:`embed`,resolve:e=>{clearTimeout(i),r(e)}}),C.postMessage({type:`embed`,id:n,text:e})})}var le=`minishlab/potion-base-8M`,ue=`/semantic/`,de=/\b(poems?|haikus?|limericks?|sonnets?|ballads?|rhymes?|riddles?|puns?|jokes?|knock[- ]?knock|tongue[- ]?twisters?|lullab(?:y|ies)|raps?)\b/i,fe=/\b(write|compose|make(?:\s+me|\s+up)?|tell(?:\s+me)?\s+(?:a|an)|sing|invent|create|generate|come up with)\b[^.?!]{0,40}\b(story|stories|song|lyrics?|tale|fable|fiction|script|screenplay|verse|jingle)\b/i;function pe(e){let t=e.toLowerCase();return de.test(t)||fe.test(t)}var me=e=>!pe(e),A=`HARD HONESTY RULES:
|
|
2
|
+
- A node "value", a series point, or an edge "weight" (a 0..1 share of the outcome it explains) may ONLY be given when you can quote it VERBATIM from SOURCES — put that exact sentence in "quote" and set "tier":"T2" (or "T1" if it came from the user's own attached data). The weights of the edges INTO the outcome should sum to ≤ 1.
|
|
3
|
+
- If a cause, link, or figure comes from general knowledge with NO source sentence, set "tier":"T0" and OMIT value/weight/series/quote. Never invent a number, a percentage, or a citation.
|
|
4
|
+
- If SOURCES is empty, EVERY node and edge is "T0" with no numbers — a qualitative structure only.
|
|
5
|
+
- Every point of a "series" needs its OWN verbatim quote containing that point's digits. A series you cannot quote point-by-point must be omitted entirely, never smoothed or estimated.
|
|
6
|
+
- "sign" is 1 (reinforces) or -1 (dampens). "role" is "root" | "mechanism" | "outcome". "depth" grows from roots (0) to the outcome. Edges may only join TOP-LEVEL nodes — "children" are a breakdown of one node, never causal actors.
|
|
7
|
+
- Node "id" is a short stable slug of the label (lowercase, hyphens: "cheap-credit"), because a later turn has to be able to name the same node again.
|
|
8
|
+
- "date" is WHEN a cause happened, as a plain string: a year ("1986"), an ISO date ("1986-01-28"), or an ISO timestamp. Give one for every node you can place in time, even in an all-T0 world with no numbers anywhere, because it is what lets the reader lay the same causes out on a timeline. Omit it only when you would be guessing at the year. Where a source sentence states the date, make that the node's "quote" — a date the sources back is shown as established, and one only you know is shown as your own.
|
|
9
|
+
- "domain" is the sphere a node belongs to, one of: economy | policy | technology | science | environment | society | health | conflict. It is a description, not a claim, so it needs no source — but OMIT it when no single sphere fits, and never stretch one to cover a node.`,j=`Shape: {"title":"the question, verbatim","outcomeId":"<id of the outcome node>","nodes":[{"id":"","label":"","role":"","depth":0,"domain":"","date":"1986-01-28","tier":"T0","value":0,"unit":"","quote":"","detail":"","series":{"tier":"T0","unit":"","points":[{"t":"2008","value":0,"quote":""}]},"children":[{"id":"","label":"","tier":"T0"}]}],"edges":[{"from":"","to":"","verb":"","weight":0,"sign":1,"tier":"T0","quote":"","relation":""}],"provenance":{"illustrative":false}}`,M=`You are Mavéa's causal world-builder. Given a causal question and SOURCES, build the web that explains it: root causes → mechanisms → the outcome, each node carrying whatever the sources actually prove about it. Return ONLY compact JSON, no prose.
|
|
10
|
+
|
|
11
|
+
${A}
|
|
12
|
+
${j}`,N=`You are Mavéa's causal world-builder, EXTENDING a world that already exists. The user asked a follow-up about the SAME web. Return ONLY compact JSON, no prose.
|
|
13
|
+
|
|
14
|
+
ECHO THE IDS: every node you re-describe MUST reuse its EXISTING id, verbatim, from the roster you are given — that is the only way your answer lands on the world the user is looking at. Only a genuinely new cause gets a new slug id. Re-state "title" exactly as given.
|
|
15
|
+
A DELTA, NOT A WORLD: return ONLY the nodes the follow-up actually touches, and only the edges you are adding — every node you leave out keeps exactly what it already has. Re-listing the unchanged web wastes the reader's money and risks overwriting facts that are already proven.
|
|
16
|
+
Answer the follow-up by ENRICHING the nodes it is about (add a "series", a "children" breakdown, a "detail" sentence, a missing edge) — do not rebuild the web from scratch and do not rename anything.
|
|
17
|
+
|
|
18
|
+
${A}
|
|
19
|
+
${j}`,P={type:`object`,properties:{quote:{type:`string`},url:{type:`string`},host:{type:`string`},date:{type:`string`}},required:[`quote`]},F={type:`object`,properties:{tier:{type:`string`,enum:[`T0`,`T1`,`T2`,`T3`]},unit:{type:`string`},quote:{type:`string`},points:{type:`array`,items:{type:`object`,properties:{t:{type:`string`},value:{type:`number`},quote:{type:`string`}},required:[`t`,`value`]}}},required:[`tier`,`points`]},I={type:`object`,properties:{id:{type:`string`},label:{type:`string`},domain:{type:`string`,enum:[...h]},tier:{type:`string`,enum:[`T0`,`T1`,`T2`,`T3`]},value:{type:`number`},unit:{type:`string`},quote:{type:`string`}},required:[`id`,`label`]},L={type:`object`,properties:{title:{type:`string`},outcomeId:{type:`string`},nodes:{type:`array`,minItems:2,items:{type:`object`,properties:{id:{type:`string`},label:{type:`string`},role:{type:`string`,enum:[`root`,`mechanism`,`outcome`]},depth:{type:`number`},domain:{type:`string`,enum:[...h]},date:{type:`string`},tier:{type:`string`,enum:[`T0`,`T1`,`T2`,`T3`]},value:{type:`number`},unit:{type:`string`},quote:{type:`string`},detail:{type:`string`},series:F,children:{type:`array`,items:I}},required:[`id`,`label`,`role`]}},edges:{type:`array`,items:{type:`object`,properties:{from:{type:`string`},to:{type:`string`},verb:{type:`string`},weight:{type:`number`},sign:{type:`number`},tier:{type:`string`,enum:[`T0`,`T1`,`T2`,`T3`]},quote:{type:`string`},relation:{type:`string`},receipts:{type:`array`,items:P},counter:P},required:[`from`,`to`,`sign`]}},provenance:{type:`object`,properties:{illustrative:{type:`boolean`}}}},required:[`title`,`nodes`,`edges`]};function R(e){let t={slow:5,standard:8}[o(e)]??12;return{maxTokens:400+t*300,nodeCap:t}}var z=`(none — use only general knowledge; mark EVERY node and edge "T0" with no numbers and no series)`;function B(e){return e.text.trim()?e.text.trim().slice(0,6e3):z}function he(e,t,n){return`QUESTION: ${e.trim()}
|
|
20
|
+
|
|
21
|
+
SOURCES:
|
|
22
|
+
${B(t)}
|
|
23
|
+
|
|
24
|
+
Build the causal world (${n} nodes max). Quote SOURCES verbatim for any number, series point or weight; otherwise T0 with no numbers. DATE every cause you can place in time — a year is enough, and this is not a number needing a source. Reply as compact JSON on one line.`}function ge(e){return e.nodes.map(e=>`${e.id} = ${e.label}`).join(`
|
|
25
|
+
`)}function _e(e,t,n,r){return`TITLE (re-state verbatim): ${e.title}
|
|
26
|
+
|
|
27
|
+
EXISTING NODES — reuse these ids exactly:
|
|
28
|
+
${ge(e)}
|
|
29
|
+
|
|
30
|
+
FOLLOW-UP: ${t.trim()}
|
|
31
|
+
|
|
32
|
+
SOURCES:
|
|
33
|
+
${B(n)}
|
|
34
|
+
|
|
35
|
+
Answer the follow-up on THIS world with a DELTA — only the nodes it changes (${r} nodes max, existing ids echoed), never the whole web again. Quote SOURCES verbatim for any number, series point or weight; otherwise T0 with no numbers. DATE every cause you can place in time — a year is enough, and this is not a number needing a source. Reply as compact JSON on one line.`}async function V(e,t,n,r,i,o){let s;try{s=(await a(n.provider).generate({system:e,history:[],user:t,maxTokens:r,thinkingLevel:`minimal`,format:L,...o?{signal:o}:{}},n)).raw}catch{return null}return o?.aborted?null:g(s,i)}var H=new Map;function ve(e,t,n){return s(`world:${e}\0${t.text}`,n.provider)}function ye(e,t,n,r){let i=ve(e,t,n),a=H.get(i);if(a)return a;let o=be(i,e,t,n,r);for(H.set(i,o);H.size>16;){let e=H.keys().next().value;if(e===void 0||e===i)break;H.delete(e)}return o.then(e=>{e||H.delete(i)},()=>H.delete(i)),o}async function be(e,t,n,r,i){try{let t=await u(e);if(t)return t}catch{}let{maxTokens:a,nodeCap:o}=R(r.model??r.provider),s=await V(M,he(t,n,o),r,a,n,i);if(s)try{await c(e,s)}catch{}return s}var xe=.5;async function Se(e,t,n,r,i){let{maxTokens:a,nodeCap:o}=R(r.model??r.provider),s=await V(N,_e(e,t,n,o),r,a,n,i);return!s||d(e,s)<xe?null:p(e,s)}function Ce(e,t){let n=[],r=/<c\b([^>]*?)(?:\/>|>([\s\S]*?)<\/c>)/g,i;for(;(i=r.exec(e))!==null;){let e=i[1],r=/\br="([A-Z]+\d+)"/.exec(e)?.[1];if(!r)continue;let a=re(r);if(!a)continue;let o=ne(e,i[2]??``,t);o!==``&&n.push({col:a.col,row:a.row,addr:r,text:o})}return n}async function we(e){let t;try{t=await x(S(e))}catch{return null}if(!t)return null;let n=t.get(`xl/sharedStrings.xml`),r=n?ee(y(n)):[],i=[...t.keys()].filter(e=>/^xl\/worksheets\/sheet\d+\.xml$/.test(e)).sort((e,t)=>Number(e.match(/(\d+)\.xml$/)[1])-Number(t.match(/(\d+)\.xml$/)[1]));if(i.length===0)return null;let a=t.get(`xl/workbook.xml`),o=a?/<sheet[^>]*name="([^"]+)"/.exec(y(a))?.[1]??`Sheet1`:`Sheet1`,s=Ce(y(t.get(i[0])),r);if(s.length===0)return null;let c=[...new Set(s.map(e=>e.row))].sort((e,t)=>e-t),l=c[0],u=s.filter(e=>e.row===l).sort((e,t)=>e.col-t.col),d=u.map(e=>e.col),f=u.map((e,t)=>e.text||`col${t+1}`),p=new Map(s.map(e=>[`${e.col}:${e.row}`,e.text])),m=c.filter(e=>e>l),h=m.length,g=m.slice(0,ie),_=[],v=[];for(let e of g)_.push(d.map(t=>p.get(`${t}:${e}`)??``)),v.push(d.map(t=>`${b(t)}${e}`));return{headers:f,rows:_,addrs:v,sheet:o,sourceRowCount:h,truncated:h>_.length}}var U=/^\d{4}-\d{2}-\d{2}([ T]\d{2}:\d{2}(:\d{2})?)?$|^\d{1,2}[/-]\d{1,2}[/-]\d{2,4}$/,W=/^(true|false|yes|no)$/i;function G(e){let t=e.trim();if(!t)return null;let n=v(t);if(!n)return null;let r=n.kind===`pct`?`%`:/^[$€£]/.test(t)?t[0]:void 0;return{value:n.value,...r?{unit:r}:{}}}function Te(e){let t=e.trim();return t?G(t)?`number`:U.test(t)?`date`:W.test(t)?`boolean`:`text`:`empty`}function Ee(e,t,n){let r=n.filter(e=>e.trim()!==``);if(r.length===0)return{key:e,label:t,type:`empty`,values:n.map(()=>null),raw:n,parsedFraction:0};let i=r.slice(0,ae),a={number:0,date:0,boolean:0,text:0,empty:0};for(let e of i)a[Te(e)]+=1;let o=i.length,s=`text`;a.number/o>=.7?s=`number`:a.date/o>=.7?s=`date`:a.boolean/o>=.7&&(s=`boolean`);let c=0,l,u=n.map(e=>{let t=e.trim();if(!t)return null;if(s===`number`){let e=G(t);return e?(c+=1,e.unit&&!l&&(l=e.unit),e.value):null}return s===`boolean`?W.test(t)?(c+=1,/^(true|yes)$/i.test(t)):null:s===`date`?U.test(t)?(c+=1,t):null:(c+=1,t)});return{key:e,label:t,type:s,values:u,raw:n,parsedFraction:r.length?c/r.length:0,...l?{unit:l}:{}}}function De(e,t,n){let r=e.toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``)||`col${t+1}`,i=r,a=2;for(;n.has(i);)i=`${r}_${a++}`;return n.add(i),i}function Oe(e){let t=new Set;return e.headers.map((n,r)=>{let i=e.rows.map(e=>e[r]??``),a=Ee(De(n,r,t),n,i);return e.addrs&&(a.addrs=e.rows.map((t,n)=>e.addrs[n]?.[r]??``)),a})}async function ke(e,n){let r,a;if(i(e))a=`xlsx`,r=await we(e.data);else if(t(e)){a=`csv`;try{r=oe(new TextDecoder(`utf-8`).decode(S(e.data)))}catch{r=null}}else return{reason:`Not a CSV or Excel file.`};if(!r||r.headers.length===0)return{reason:`Could not read a table from ${e.name}.`};let o=Oe(r);return{dataset:{id:l(`${e.name}:${e.data.slice(0,2e5)}`),file:e.name,...r.sheet?{sheet:r.sheet}:{},columns:o,rowCount:r.rows.length,sourceRowCount:r.sourceRowCount,truncated:r.truncated,origin:a,parsedAt:n}}}var Ae=200;function je(e){let t=[`${e.file}: ${e.columns.map(e=>e.label).join(`, `)}`],n=Math.min(e.rowCount,Ae);for(let r=0;r<n;r+=1)t.push(e.columns.map(e=>`${e.label} ${e.raw[r]??``}`.trim()).join(` | `));return t.join(`
|
|
36
|
+
`)}async function Me(e){let a=[];for(let o of e)try{if(t(o)||i(o)){let{dataset:e}=await ke(o,0);e&&a.push(je(e))}else if(r(o))a.push(new TextDecoder(`utf-8`).decode(S(o.data)));else if(n(o)){let e=await te(o);e&&a.push(e.join(`
|
|
37
|
+
`))}}catch{}return a.join(`
|
|
38
|
+
|
|
39
|
+
`)}var Ne=8e3,K=new Map;function Pe(e,t){for(K.delete(e),K.set(e,t);K.size>2;){let e=K.keys().next().value;if(e===void 0)break;K.delete(e)}}async function Fe(e){let t=K.get(e);if(!t)return m;let n=await Promise.all(t.attachments.map(async e=>({source:{kind:`file`,title:e.name},text:await Me([e])})));return _([...n,...t.sources.map(f)],Ne)}var Ie=/\b(just (?:tell me|give me|the answer)|in one line|one[- ]liner|in a (?:sentence|word|line)|in a few words|brief(?:ly)?|tl;?dr|short (?:version|answer)|keep it (?:short|brief)|quick (?:answer|version|recap|rundown|summary)|in short|the short version|bottom line|in a nutshell|the gist)\b/,Le=/\b(tell me about|explain|overview|how (?:do|does|to|can|is|are|did|would|should)|why|guide|walk\s?(?:me\s)?through|break\s?down|breakdown|deep\s?dive|everything|compare|comparison|versus|vs\.?|pros and cons|plan|itinerary|roadmap|review|analy[sz]e|dashboard|trends?|history of|all about|summary of)\b/,q=/\b(teach (?:me|us)|help me (?:understand|learn|grasp|wrap my head around)|walk me through|crash course|get (?:me |us )?up to speed|bring me up to speed|from scratch|(?:the )?(?:basics|fundamentals|essentials|core concepts|key concepts) of|study (?:for|guide|plan)|prep(?:are)? (?:me |us )?for (?:my |an? |the |our )?(?:\w+ )?(?:interview|exam|test|quiz|midterm|final|cert\w*)|(?:interview|exam) prep|tutorial|lesson on|learn (?:about |how )?[a-z]+)\b/,Re=[/^[\s\d().,+\-*/^%×÷=]+\??$/,/\bwhat(?:'s| is| are| was)?\s*[\d().,\s+\-*/^%×÷]+\s*\??$/,/\b(calculate|compute|solve)\b/,/\b\d+(?:\.\d+)?\s*%\s*of\s+\d/,/\bconvert\b/,/\bhow many\s+\w+\s+(?:in|are in|per)\b/,/\b\d+\s*[a-z]+\s+(?:in|to)\s+[a-z]+\b/,/\b(define|definition of)\b/,/\bwhat does\s+.+\s+mean\b/,/\bcapital of\b/];function ze(e){let t=e.toLowerCase().trim();if(!t)return`rich`;let n=Ie.test(t);return q.test(t)||Le.test(t)?n?`brief`:`rich`:Re.some(e=>e.test(t))?`lean`:n?`brief`:`rich`}function Be(e){return q.test(e.toLowerCase())}var Ve=/\b(deriv\w*|prove|proof|theorem|integral|derivative|equation|algebra|calculus|optimi[sz]e|trade-?offs?|step[-\s]?by[-\s]?step|reason\w* through|figure out|work out|why (?:does|is|are|do)|analy[sz]e|compare\b.*\bvs\b|root cause|debug|diagnose|strategy|plan\b.*\b(?:budget|trip|itinerary|migration))\b/;function J(e){return Ve.test(e.toLowerCase())}function He(e,t){return e===`lean`?`minimal`:t?`low`:`minimal`}var Y=[`minimal`,`low`,`medium`,`high`];function Ue(e,t){let n=Y.indexOf(e);return Y[Math.min(Y.length-1,Math.max(0,n+t))]}function We(e,t,n=`fast`){let r=J(t);return e===`lean`&&!r?`minimal`:Ue(He(e,r),n===`thorough`?2:+(n===`balanced`))}var Ge=.1,Ke=.3,qe=.75;function Je(e,t,n){return t.creative?qe:e===`lean`||J(n)||t.troubleshoot?Ge:Ke}var X=140,Z=320;function Ye(t,n){let r=n===`lean`||n===`brief`?X:Z;return e(t.trim(),r)}function Q(e){return e===`lean`||e===`brief`?X:Z}var Xe=`OUTPUT ORDER — emit the "narration" field FIRST in the JSON, before "title", "sub", and "blocks", and write it as complete sentences. It is spoken aloud the moment it streams, so it must lead.`;function Ze(e){return e===`lean`||e===`brief`?`SPOKEN LINE ("narration") — keep it to ONE short sentence (≈${Q(e)} characters). Right to the point.`:`SPOKEN LINE ("narration") — at most two or three short sentences (≈${Q(`rich`)} characters), like a person talking. The visuals carry the detail; never narrate the whole canvas.`}var $=[{key:`decision`,test:/\b(should i|should we|worth it|is it worth|which (?:one|should|is better)|do i (?:need|have to)|ought i|better to|or should i)\b/},{key:`comparison`,test:/\b(vs\.?|versus|compare\w*|comparison|pros and cons|trade-?offs?|better than|which is better)\b/},{key:`risk`,test:/\b(risk\w*|danger\w*|downside|what could go wrong|threat\w*|is it safe|safe to|consequenc\w*|backfire|red flags?|pitfalls?)\b/},{key:`planning`,test:/\b(roadmap|schedule|timeline|milestone\w*|strateg\w*|prepare for|get ready|launch|plan (?:to|for|a|my|out)|over the next \d+|in \d+ (?:weeks?|months?|days?))\b/},{key:`troubleshoot`,test:/\b(troubleshoot|debug|not working|isn'?t working|won'?t \w+|broken|\berror\b|\bbug\b|fix\b|stopped working|fail(?:s|ing|ed)?|why (?:is|does|won'?t|isn'?t|can'?t))\b/},{key:`learning`,test:/\b(explain|how does|how do .* work|what is|what are|teach me|help me understand|learn\b|tell me about|why does|the difference between|concept of|crash course|walk me through|for (?:my|an?|the|our) (?:\w+ )?(?:interview|exam|test|midterm|final)|study for)\b/},{key:`creative`,test:/\b(brainstorm|ideas? for|come up with|imagine|invent|design a|creative|name (?:my|a|some|ideas)|suggest (?:some )?\w+ (?:names|ideas))\b/},{key:`whatIf`,test:/\b(what (?:if|happens if|would happen)|if i (?:do|don'?t|take|stay|leave|wait)|either way|both (?:paths|options|ways)|play(?:ed)? out|scenario\w*|down the road|in (?:each|both) cases?|stay or (?:go|leave|take)|futures?\b)\b/},{key:`reflection`,test:/\b(my (?:friend|partner|relationship|boyfriend|girlfriend|marriage|spouse|boss|family|mom|dad|kid)|feel(?:ing)?\b|emotionally|am i (?:wrong|right|overreacting|the problem)|should i feel|drain(?:s|ing|ed)?|toxic|healthy (?:relationship|friendship)|cope\b|burn(?:t|ed)?\s?out|overwhelm\w*|anxious|lonely)\b/},{key:`highStakes`,test:/\b(quit (?:my|the|this) (?:job|career)|get married|getting married|divorce|buy a (?:house|home)|mortgage|life savings|career change|drop out|move (?:abroad|across|countr|to another)|surgery|diagnos\w*|lawsuit|\bsue\b|custody|life-?changing)\b/},{key:`serious`,test:/\b(grief|grieving|death|dying|depress\w*|suicid\w*|self-?harm|abuse|trauma|addiction|crisis|terminal|miscarriage)\b/}],Qe=[{domain:`health`,test:/\b(health\w*|symptom\w*|doctor|medic\w*|diagnos\w*|disease|surgery|mental health|therap\w*|depress\w*|anxiety)\b/},{domain:`legal`,test:/\b(legal|lawyer|attorney|lawsuit|\bsue\b|court|custody|rights\b|contract\b)\b/},{domain:`money`,test:/\b(money|budget|invest\w*|savings|\bdebt\b|loan|mortgage|finance\w*|retire\w*|taxe?s?\b|salary)\b/},{domain:`career`,test:/\b(job\b|career|\bwork\b|boss|promotion|freelanc\w*|resume|interview|fired|laid off|quit)\b/},{domain:`relationship`,test:/\b(relationship|friend\w*|partner|boyfriend|girlfriend|marriage|spouse|dating|breakup|family)\b/},{domain:`travel`,test:/\b(travel|trip|vacation|flight|hotel|itinerary|destination|visit\b)\b/},{domain:`tech`,test:/\b(code|coding|software|\bapp\b|\bapi\b|database|server|deploy|programming|website|algorithm)\b/},{domain:`learning`,test:/\b(study|course|exam|tutorial|homework|\bclass\b|lesson|curriculum)\b/}];function $e(e){if(!e)return``;for(let t=e.length-1;t>=0;t--)if(e[t].role===`user`)return e[t].content;return``}function et(e,t){let n=e.toLowerCase(),r=$e(t).toLowerCase(),i=r?`${n} ${r}`:n,a={decision:!1,comparison:!1,risk:!1,planning:!1,troubleshoot:!1,learning:!1,creative:!1,whatIf:!1,reflection:!1,highStakes:!1,serious:!1};for(let e of $)e.test.test(i)&&(a[e.key]=!0);(a.highStakes||a.reflection)&&(a.serious=!0);for(let e of Qe)if(e.test.test(i)){a.domain=e.domain;break}return a}function tt(e){let t=new Set;return e.decision&&t.add(`decide`),e.comparison&&(t.add(`compare`),t.add(`decide`)),e.risk&&t.add(`decide`),e.planning&&(t.add(`plan`),t.add(`howto`)),e.troubleshoot&&(t.add(`howto`),t.add(`explain`)),e.learning&&(t.add(`explain`),t.add(`reference`)),e.creative&&t.add(`draft`),e.whatIf&&t.add(`decide`),e.reflection&&(t.add(`reflect`),t.add(`comfort`)),[...t]}var nt=[{shape:`composition`,weight:1,test:/\b(budget|allocat\w*|split|breakdown|where\s+(?:\w+\s+)?(?:my\s+|the\s+)?(?:money|time|spend\w*|budget)|(?:money|time|spend\w*)\s+goes?|portion|share|mix|composition|makeup|made up of|percent\w*|proportion|divid\w*)\b/},{shape:`series`,weight:1,test:/\b(trend\w*|over time|growth|history|historical|month\w*|week\w*|dai\w*|quarter\w*|year\w*|forecast|projection|trajectory|since|past \d+)\b/},{shape:`comparison`,weight:1,test:/\b(vs\.?|versus|compare\w*|comparison|better|which (?:one|should|is)|either|or should|pros and cons|trade-?offs?|options?|best|top \d+|worth it|should i (?:buy|get|pick|choose|use)|recommend\w*)\b/},{shape:`ranking`,weight:1,test:/\b(rank\w*|leaderboard|top \d+|best|worst|most|least|highest|lowest|fastest|biggest|smallest|standings)\b/},{shape:`status`,weight:1,test:/\b(progress|on track|readiness|ready|status|health\w*|complete\w*|how (?:far|close)|goal|target|score|rating|grade)\b/},{shape:`sequence`,weight:1,test:/\b(steps?|how (?:do|to)|process|guide|walk\s?through|plan|schedule|roadmap|sequence|order|first.*then|itinerary|timeline)\b/},{shape:`flow`,weight:.8,test:/\b(funnel|pipeline|workflow|conversion|stages?|flow|drop-?off|state\s?machine|feedback\s?loops?|decision\s?tree|control\s?flow)\b/},{shape:`geo`,weight:1,test:/\b(map|where is|near\w*|location|route|directions?|cities|country|countries|region|travel|trip|drive)\b/},{shape:`list`,weight:.8,test:/\b(list|tips?|checklist|things to|ways to|ideas|reasons|items|bullet\w*)\b/},{shape:`distribution`,weight:1,test:/\b(distribution|spread|histogram|range|variance|outliers?|percentile|frequency|how (?:often|spread))\b/},{shape:`relationship`,weight:1,test:/\b(correlat\w*|relationship between|scatter|vs.*axis|impact of|affect\w*|driver\w*)\b/},{shape:`structure`,weight:1,test:/\b(molecul\w*|chemical structure|molecular structure|skeletal (?:formula|structure)|lewis structure|smiles|functional group|benzene)\b/},{shape:`tabular`,weight:.9,test:/\b(table|rows?|columns?|spreadsheet|records|dataset|grid of|matrix)\b/},{shape:`media`,weight:1,test:/\b(image\w*|photos?|gallery|pictures?|visual\w*|video|watch|before and after|screenshot)\b/},{shape:`text`,weight:.8,test:/\b(quote\w*|testimonial\w*|said|opinions?|reviews?|feedback|explain|defin\w*|definition|what is|tell me about|meaning of|translate\w*|vocabulary)\b/},{shape:`code`,weight:1.1,test:/\b(code|coding|programming|software|function|algorithm\w*|recursi\w*|data structures?|linked lists?|binary (?:tree|search)|hash\s?(?:map|table)|big-?o|time complexity|syntax|compil\w*|debug\w*|refactor\w*|regex|sql|snippet|pseudo\s?code|api)\b/},{shape:`scalar`,weight:.7,test:/\b(how (?:many|much)|number of|total|count|metric|stat\w*|kpi|figure)\b/},{shape:`keyvalue`,weight:.7,test:/\b(stats|metrics|numbers|key figures|at a glance|summary of|overview)\b/},{shape:`selection`,weight:.9,test:/\b(choose|pick|select|decide|configure|settings|sign\s?up|form|filter|adjust|set up)\b/},{shape:`hierarchy`,weight:.9,test:/\b(hierarch\w*|tree|nested|org\s?chart|structure of|breakdown of .* into|parent|sub-?categor\w*)\b/}],rt=[{test:/\b(pdf|white\s?paper|the paper|the document|the report|the contract|the article|the spec|the manual|the filing|the brief|full text|read (?:it|the\b))\b/,types:[`pdfreader`,`docview`]},{test:/\b(images?|photos?|pictures?|gallery|pics?|snapshots?)\b/,types:[`gallery`]},{test:/\b(maps?|where is|located|directions?|on a map|near (?:the|downtown|campus)|walking distance|walkable|nearby|neighborhood|what'?s around|close to (?:downtown|the))\b/,types:[`geomap`]},{test:/\b(code|snippet|implementation|source code|pseudo\s?code)\b/,types:[`codeblock`]},{test:/\b(dialogue\w*|a scene\b|conversation between|exchange between|speakers?|write a (?:script|scene|transcript))\b/,types:[`dialogue`]},{test:/\b(defin\w*|etymology\b|what does .{1,30} mean|look up\b|vocabulary\b|word for\b)\b/,types:[`dictionary`]},{test:/\b(variant\w*|alternativ\w*|\d+ (?:version\w*|option\w*|draft\w*)|rewrit\w*|different (?:tone\w*|style\w*|version\w*))\b/,types:[`variants`]},{test:/\b(?:make|say|write|phrase|word|put) (?:it|this|that|the \w{2,14}) (?:more |a bit |a little |much |way )?(?:firm|soft|warm|blunt|gentl|harsh|kind|stern|polit|casual|formal|direct|punchi|short|long|terse|friendl)\w*\b|\b(?:firmer|softer|warmer|blunter|gentler|harsher|sterner|punchier|shorter|longer|friendlier) (?:version|tone|wording|take|draft|phrasing)\b|\bexplain (?:it|this|that) (?:for|to) (?:an? )?(?:exec|executive|engineer|beginner|expert|layperson)\b|\b(?:at|in) (?:different|two|three|several) (?:levels?|tones?|registers?|reading levels?)\b|\bfor (?:different|two|three|several) audiences\b/,types:[`variantswitch`]},{test:/\b(translat\w+|in (?:french|spanish|japanese|german|chinese|portuguese|italian|korean|arabic|russian|hindi|dutch|swedish|polish|turkish|vietnamese|thai|hebrew|greek|latin)|from (?:english|spanish|french|japanese|german|chinese) (?:to|into))\b/,types:[`translation`]},{test:/\b(rank (?:the )?top \d+|top \d+ (?:ranked|ranking)|leaderboard\b|ranked list\b|best \d+ .{1,30} rank\w*)\b/,types:[`bracketbar`]},{test:/\b(?:as|in|into) (?:a |an )?(?:data )?table\b|\b(?:make|build|draw|create|show|give|put|render|format)\b(?:[\w\s]{0,12})?\btable\b|\btabular\b|\bspreadsheet\b/,types:[`datatable`]},{test:/\b(?:draw|make|show|give|create|build)\b(?:[\w\s]{0,12})?\b(?:flow\s?chart|flow\s?diagram|diagram)\b|\bdiagram (?:this|it|of|the)\b|\bflow\s?chart\b|\bas an? [\w\s]{0,20}?diagram\b|\bstate\s?machine\b/,types:[`diagramflow`]},{test:/\b(?:as|make|draw|show|give|build|on)\b(?:[\w\s]{0,12})?\btime\s?line\b|\btime\s?line of\b/,types:[`timeline`]},{test:/\bcheck\s?list\b/,types:[`checklist`]},{test:/\bstep[-\s]?by[-\s]?step\b|\b(?:numbered|ordered) steps\b|\bwalk me through (?:the )?steps\b/,types:[`howtosteps`,`checklist`]},{test:/\bcompare\b|\bcomparison\b|\b\w+ (?:vs\.?|versus) \w+\b|\bdifference between\b|\bside[-\s]?by[-\s]?side\b/,types:[`compare`]},{test:/\bdifferences? between (?:an? |the )?\w+ and (?:an? |the )?\w+\b|\bhow (?:is|are|does|do) (?:an? |the )?\w+ (?:and (?:an? |the )?\w+ )?differ\w*\b|\bconfus\w+ (?:with|between|for)\b|\b(?:commonly|easily|often) confused\b|\bmix\w* (?:them|these two|those two|the two) up\b|\b(?:them|these two|those two|the two) (?:mixed|confused)\b|\btell\b[^.?!]{0,30}\bapart\b|\bwhich (?:one )?is which\b|\bare\b[^.?!]{1,40}\bthe same thing\b|\bwhen (?:to|do i|should i) use\b[^.?!]{1,30}\b(?:vs\.?|versus|instead of)\b/,types:[`distinctioncard`]},{test:/\bquiz\b|\btest me on\b|\bpractice questions\b/,types:[`quiz`]},{test:/\b(?:quiz|test|grill|drill) me\b|\btest my knowledge\b|\b(?:mock|practice|sample) (?:exam|test)\b|\b\d+[-\s]question\b|\b\d+ (?:practice|review|exam|multiple[-\s]choice|short[-\s]answer) questions?\b|\b(?:ask|give|write|make|generate) me \d+ questions\b|\bexam prep\b/,types:[`quizsession`]},{test:/\bflash\s?cards?\b/,types:[`flashcard`]},{test:/\b(?:100\s?%\s?)?stacked\s+(?:bar|column)s?(?:\s+(?:chart|graph))?\b|\bstacked\s+(?:chart|graph)\b|\b100\s?%\s?stacked\b/,types:[`stackedbars`]},{test:/\b(?:write|draft|compose|give me|make me) (?:me )?(?:an? |the )?(?:\w+[- ]){0,2}(?:essays?|articles?|blog posts?|op-?eds?)\b|\b(?:essays?|blog posts?) (?:about|on|arguing)\b|\b(?:cover letter|personal statement|statement of purpose|college essay)\b|\bin prose\b|\blong[-\s]?form\b|\b(?:wedding|best man'?s?|maid of honou?r|retirement|graduation|farewell) (?:toast|speech)\b|\b(?:few|couple(?: of)?|several|\d+) paragraphs\b|\bwrite (?:it|this) out in full\b/,types:[`longread`]},{test:/\bbrainstorm\w*\b|\b(?:ideas|suggestions) (?:for|on|about)\b|\b(?:some|any|other|more|fresh|a few) (?:ideas|suggestions|names)\b|\b(?:give|list|need|want) (?:me |us )?\d+ (?:ideas|suggestions|names)\b|\bgive me ideas\b|\bideas on how\b|\bwhat (?:should|could) (?:i|we) (?:call|name) (?:it|this|my|our|the)\b|\bname (?:ideas|suggestions)\b|\bwhat could (?:i|we) do about\b|\bpossible (?:approaches|angles|directions)\b|\bcome up with (?:some |a few |\d+ )?(?:ideas|names|concepts|angles|titles)\b/,types:[`ideaboard`]},{test:/\bdo(?:'|’)?s and don(?:'|’)?ts\b|\bwhat not to (?:say|do|wear|bring|ask|write|post)\b|\bwhat (?:should|do) i (?:say|do)\b[^.?!]{0,4}\b(?:when|if|at|during)\b|\bwhat (?:should|do) i avoid\b|\b(?:screw|mess|blow|botch) (?:this|it|that) up\b|\betiquette\b|\b(?:common|rookie|beginner|classic|typical) mistakes?\b|\bthings to avoid\b/,types:[`dosdonts`]},{test:/\banalog(?:y|ies) for\b|\bmetaphors? for\b|\b(?:an?|another|any|the) (?:\w+ ){0,2}analog(?:y|ies)\b|\bby analogy\b|\beli ?5\b|\blike i(?:'|’)?m (?:five|5)\b|\bfor a (?:five|5)[-\s]?year[-\s]?old\b|\b(?:explain|describe)\b[^.?!]{0,40}\blike\s+an?\b/,types:[`analogymap`]},{test:/\b(recipe\b|how to (?:make|cook|bake) |step\w*-?by\w*-?step .{0,20}(?:recipe|cook)|(?:dinner|lunch|breakfast|dessert|cookie|pasta|chicken|beef|vegan|gluten.free) recipe\b)\b/,types:[`recipecard`]},{test:/\b(workout plan|training plan|exercise plan|gym (?:program|plan|routine)|fitness (?:plan|program|routine)|sets? and reps?|push.?pull.?legs?|strength (?:program|plan)|build muscle (?:plan|program)|weekly (?:workout|training|gym) (?:plan|program|schedule))\b/,types:[`workoutplan`]},{test:/\b(macro(?:nutrient)?s?\b|(?:calorie|nutrition(?:al)?) (?:breakdown|facts?|info|content)|grams? of (?:protein|carbs?|fat)|protein.*carb\w*.*fat|caloric breakdown)\b/,types:[`macrobreakdown`]},{test:/\b(medication (?:schedule|reminder|timing)|dosing schedule|pill (?:schedule|reminder)|when (?:to|should i|do i) take .{0,30}(?:pill\w*|drug|medication|meds?|tablet\w*|dose\w*)|what time .{0,20}(?:take|dose) .{0,20}(?:pill\w*|medication|meds?)|drug dosage (?:schedule|timing))\b/,types:[`medicationschedule`]},{test:/\b(chord diagram|guitar chord\b|(?:how to (?:play|finger)|fingering for) .{0,20}chord|barre chord|power chord|open chord|chord shape\w*)\b/,types:[`chorddiagram`]},{test:/\b((?:baby|child|toddler|infant) (?:milestone\w*|developmental? milestone\w*)|developmental? milestone\w*|\d+[- ]month[- ]old milestone\w*|\d+[- ]year[- ]old milestone\w*|when (?:should|do) (?:babies|kids|toddlers|infants)\b)\b/,types:[`developmentmilestone`]},{test:/\b(argument map\b|arguments? (?:for and against\b|supporting and opposing)|philosophical argument\b|claim(?:s?) (?:and|with) (?:evidence|support\w*|objection\w*)|debate the (?:claim|motion|topic)\b|case for and against\b)\b/,types:[`argumentmap`]},{test:/\b((?:soccer|football|basketball|baseball|tennis) (?:formation\b|lineup\b|position\w*|play diagram|tactic\w*)|4-3-3\b|4-4-2\b|3-5-2\b|4-2-3-1\b|3-4-3\b|defensive (?:shift\b|formation\b)|starting (?:eleven\b|xi\b|lineup\b))\b/,types:[`sportspitch`]},{test:/\b(floor\s?plan\b|room layout\b|apartment layout\b|(?:house|home|office) (?:layout\b|floor plan)|room arrangement\b|furniture layout\b)\b/,types:[`floorplan`]},{test:/\b(medical (?:history|timeline|chronolog\w*)|clinical (?:history|course|timeline)|patient (?:history|chronolog\w*)|diagnosis timeline\b|treatment (?:history|timeline)|symptom (?:progression|history|chronolog\w*))\b/,types:[`clinicaltimeline`]},{test:/\b(research (?:finding\w*|result\w*|summary|paper summary)|what (?:does|did) (?:the research|studies|the study|the science) (?:say|show|find|reveal)\b|scientific (?:consensus|evidence|finding\w*)|meta-?analysis\b|randomized (?:controlled )?trial\b|clinical (?:evidence|finding\w*|trial\w*))\b/,types:[`researchsummary`]},{test:/\b(hourly itinerary|hour.?by.?hour|itinerary (?:for|of)\b|trip itinerary|travel itinerary|daily itinerary|day.?by.?day (?:plan|schedule|itinerary)|morning (?:to|through) (?:evening|night)|full day (?:plan|schedule|itinerary)|schedule (?:for|of) (?:my |a |the )?(?:trip|day|visit))\b/,types:[`agenda`]}];function it(e){let t=e.toLowerCase(),n=[];for(let e of rt)e.test.test(t)&&n.push(...e.types);return[...new Set(n)]}var at={datatable:`a data table`,diagramflow:`a flow diagram`,timeline:`a timeline`,codeblock:`a code block`,geomap:`a map`,gallery:`an image gallery`,pdfreader:`the document`,docview:`the document`,checklist:`a checklist`,howtosteps:`a step-by-step`,compare:`a side-by-side comparison`,quiz:`a quiz`,flashcard:`flashcards`,dictionary:`a definition`,recipecard:`a recipe`,dialogue:`a scripted dialogue`,variants:`variations`,translation:`a translation`,bracketbar:`a ranking`,stackedbars:`a stacked bar chart`,distinctioncard:`a distinction between the terms`,longread:`a long-form written piece`,ideaboard:`a board of ideas`,dosdonts:`a do's-and-don'ts list`,variantswitch:`the same content at several settings`,quizsession:`a graded quiz run`,analogymap:`an analogy`};function ot(e){return at[e]??`a ${e}`}function st(e){return e.length?`FORMAT REQUEST — the user explicitly asked for their answer in a specific FORM: ${[...new Set(e.map(ot))].join(`, `)}. Make that the LEAD block (position 0 or 1), built fully and completely; the rest of the canvas supports it. Never answer in a different shape than the one they named.`:``}function ct(e){if(!e)return``;for(let t=e.length-1;t>=0;t--)if(e[t].role===`user`)return e[t].content;return``}function lt(e,t){let n=e.toLowerCase(),r=ct(t).toLowerCase(),i={};for(let e of nt){let t=0;e.test.test(n)&&(t+=e.weight),r&&e.test.test(r)&&(t+=e.weight*.4),t>0&&(i[e.shape]=(i[e.shape]??0)+t)}return i}export{ye as _,tt as a,se as b,Q as c,We as d,ze as f,Se as g,Fe as h,et as i,Ze as l,Pe as m,lt as n,Xe as o,Be as p,st as r,Ye as s,it as t,Je as u,me as v,O as x,ce as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./friendlyAsk-BBdRZIar.js";import{n,t as r}from"./contentVault-xfUwSJ3i.js";var i={"15min":15,hourly:60,"6h":360,daily:1440,manual:1/0},a={daily:1440,weekly:10080,"on-change":1/0,manual:1/0};function o(e,t){return Number.isFinite(t)?e+t*6e4:2**53-1}function s(e){return e===`manual`?0:Math.round(43200/i[e])}function c(e,t){let n=e.window;if(n){if(t<n.startAt)return n.startAt;if(t>n.endAt)return 2**53-1}return o(t,i[e.data])}var l=`mavea-dash-opens-v1`,u=2592e6;function d(e){return!!e&&typeof e==`object`}function f(e,t){if(!d(e))return{};let n=t-u,r={};for(let[t,i]of Object.entries(e)){if(!t||!Array.isArray(i))continue;let e=i.filter(e=>typeof e==`number`&&Number.isFinite(e)&&e>=n).slice(-30);e.length&&(r[t]=e)}return r}var p;function ee(e){try{if(typeof localStorage>`u`)return{};let t=localStorage.getItem(l);return t?f(JSON.parse(t),e):{}}catch{return{}}}function m(e=Date.now()){return p??=ee(e),p}function h(e){p=e;try{typeof localStorage<`u`&&localStorage.setItem(l,JSON.stringify(e))}catch{}}function te(e,t=Date.now()){if(!e)return;let n=m(t),r=[...n[e]??[],t].filter(e=>e>=t-u).slice(-30);h({...n,[e]:r})}function ne(e,t,n=Date.now()){return(m(n)[e]??[]).filter(e=>e>=t).length}function g(e){let t=m(),n={};for(let[r,i]of Object.entries(t))e.has(r)&&(n[r]=i);h(n)}var re=12,_=new Map,ie=0,v=new Set;function y(){for(let e of v)e()}function ae(e){return v.add(e),()=>v.delete(e)}function oe(e,t=Date.now()){ie+=1;let n={id:`run-${ie}`,dashboardId:e,startedAt:t,steps:[{name:`scheduled`,ok:!0,at:t}]},r=_.get(e)??[];return _.set(e,[n,...r].slice(0,re)),y(),n}function se(e,t,n,r={}){e&&(e.steps.push({name:t,ok:n,at:r.at??Date.now(),...r.count===void 0?{}:{count:r.count},...r.detail?{detail:r.detail}:{}}),y())}function ce(e,t){e&&(e.endedAt=t.at??Date.now(),t.outcome&&(e.outcome=t.outcome),t.failure&&(e.failure=t.failure),t.attempts!==void 0&&(e.attempts=t.attempts),y())}var le=[];function ue(e){return _.get(e)??le}function de(e){e===void 0?_.clear():_.delete(e),y()}var fe=`mavea-dashboards`,b=`observations`,pe=1,me=200;function x(){return typeof indexedDB<`u`}var S=null;function C(){return S||(S=new Promise((e,t)=>{let n=indexedDB.open(fe,pe);n.onupgradeneeded=()=>{let e=n.result;if(!e.objectStoreNames.contains(b)){let t=e.createObjectStore(b,{keyPath:`id`});t.createIndex(`byTarget`,[`dashboardId`,`targetId`,`observedAt`]),t.createIndex(`byDashboard`,`dashboardId`)}},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error??Error(`indexedDB open failed`))}),S.catch(()=>{S=null}),S)}function w(e){return new Promise((t,n)=>{e.oncomplete=()=>t(),e.onerror=()=>n(e.error??Error(`indexedDB transaction failed`)),e.onabort=()=>n(e.error??Error(`indexedDB transaction aborted`))})}async function he(e,t,r,i=Date.now(),a){if(x())try{let o=await n({data:r,...a?.length?{receipts:a}:{}}),s=(await C()).transaction(b,`readwrite`),c=s.objectStore(b),l={id:`${e}:${t}:${i}`,dashboardId:e,targetId:t,observedAt:i,payload:o};c.put(l),await w(s),await ge(e,t)}catch{}}async function ge(e,t){try{let n=(await C()).transaction(b,`readwrite`),r=n.objectStore(b).index(`byTarget`),i=IDBKeyRange.bound([e,t,0],[e,t,1/0]),a=[];await new Promise((e,t)=>{let n=r.openKeyCursor(i,`next`);n.onsuccess=()=>{let t=n.result;if(!t)return e();a.push(t.primaryKey),t.continue()},n.onerror=()=>t(n.error??Error(`cursor failed`))});let o=a.length-me;if(o>0){let e=n.objectStore(b);for(let t of a.slice(0,o))e.delete(t)}await w(n)}catch{}}async function _e(e){if(x())try{let t=(await C()).transaction(b,`readwrite`),n=t.objectStore(b).index(`byDashboard`),r=t.objectStore(b);await new Promise((t,i)=>{let a=n.openKeyCursor(IDBKeyRange.only(e));a.onsuccess=()=>{let e=a.result;if(!e)return t();r.delete(e.primaryKey),e.continue()},a.onerror=()=>i(a.error??Error(`cursor failed`))}),await w(t)}catch{}}function T(e){return e.state?e.state:e.lastRefreshedAt===null?{status:`pending`}:e.lastDataOutcome===`unverified`?{status:`degraded`,lastSuccessAt:e.lastRefreshedAt,failure:{kind:`ungrounded`},lastAttemptAt:e.lastRefreshedAt}:{status:`active`,lastSuccessAt:e.lastRefreshedAt}}function E(e){return{status:`active`,lastSuccessAt:e}}function D(e,t,n){let r=e.status===`active`||e.status===`degraded`?e.lastSuccessAt:void 0;return r===void 0?{status:`pending`,failure:t,lastAttemptAt:n}:{status:`degraded`,lastSuccessAt:r,failure:t,lastAttemptAt:n}}function ve(e){switch(e.kind){case`auth`:return`Your model rejected the key — reconnect it in Live, then check again.`;case`rate-limit`:return`Your model provider is rate-limiting right now. This retries itself shortly.`;case`network`:return`Couldn't reach your model. This retries itself once the connection is back.`;case`no-model`:return`No model is connected yet — connect one in Live and this starts checking.`;case`ungrounded`:return`No live source backed this up — the model may not have searched. Try a stronger model in Settings, or reword what to track.`;case`provider-unavailable`:return`Your model provider is unavailable right now. This retries itself shortly.`}}function ye(e){switch(e){case`no-model`:return{kind:`no-model`};case`unverified`:return{kind:`ungrounded`};case`failed`:return{kind:`network`};default:return null}}var be=e({DASHBOARDS_EVENT:()=>k,DASHBOARDS_QUOTA_EVENT:()=>A,MAX_METRICS:()=>12,MAX_WIDGETS:()=>12,addDashboard:()=>He,addWidget:()=>$e,appendSource:()=>rt,applyRefreshResult:()=>yt,blockToWidget:()=>Ge,clearDashboards:()=>Ye,clearOneShot:()=>_t,createBlankDashboard:()=>We,ensureFirstCheck:()=>pt,foldInto:()=>$,getDashboard:()=>Ve,getDashboards:()=>Be,hasDroppedWrite:()=>Ee,invalidate:()=>J,markAiRefreshed:()=>mt,markDataRefreshed:()=>ut,markDataRetry:()=>ft,markTrackerFailure:()=>dt,markVerdictFailed:()=>lt,mergeDashboards:()=>Ue,newDashboardId:()=>N,removeDashboard:()=>Je,removeWidget:()=>Qe,reorderWidgets:()=>Xe,setCadenceWindow:()=>ht,setOneShot:()=>gt,setVerdict:()=>ct,setWidgetOrder:()=>tt,setWidgetRefreshQuery:()=>et,setWidgetSpan:()=>Ze,updateCadence:()=>qe,updateDashboard:()=>Ke,updateMetricValue:()=>ot,updateTripwireStates:()=>st,whenDashboardsHydrated:()=>K}),O=`mavea-dashboards-v1`,k=O,A=`${O}:quota`,j=24,xe=12,Se=4096,Ce=60,M=null,we=0,Te=!1;function Ee(){return Te}function N(){try{let e=globalThis.crypto;if(e?.randomUUID)return e.randomUUID()}catch{}return we+=1,`dash-${we.toString(36)}-${Math.floor(Math.random()*1e9).toString(36)}`}function De(e){let t=JSON.stringify(e,(e,t)=>typeof t==`string`&&t.length>Se&&t.startsWith(`data:`)?``:t);return JSON.parse(t)}function P(e){return!!e&&typeof e==`object`}function F(e,t){return typeof e==`number`&&Number.isFinite(e)?e:t}function I(e,t=``){return typeof e==`string`?e:t}function Oe(e){return e===`5min`?`15min`:I(e,`manual`)}function ke(e){if(!P(e))return null;let t=e.at,n=e.value;return typeof t!=`number`||!Number.isFinite(t)||typeof n!=`number`||!Number.isFinite(n)?null:{at:t,value:n}}var Ae=new Set([`auth`,`rate-limit`,`network`,`no-model`,`ungrounded`,`provider-unavailable`]);function L(e){if(!P(e))return;let t=P(e.failure)&&Ae.has(I(e.failure.kind))?{kind:I(e.failure.kind),...typeof e.failure.retryAt==`number`&&Number.isFinite(e.failure.retryAt)?{retryAt:e.failure.retryAt}:{}}:void 0,n=typeof e.lastAttemptAt==`number`&&Number.isFinite(e.lastAttemptAt)?e.lastAttemptAt:void 0,r=typeof e.lastSuccessAt==`number`&&Number.isFinite(e.lastSuccessAt)?e.lastSuccessAt:void 0;if(e.status===`pending`)return{status:`pending`,...t?{failure:t}:{},...n===void 0?{}:{lastAttemptAt:n}};if(e.status===`active`&&r!==void 0)return{status:`active`,lastSuccessAt:r};if(e.status===`degraded`&&t&&n!==void 0)return{status:`degraded`,failure:t,lastAttemptAt:n,...r===void 0?{}:{lastSuccessAt:r}}}function je(e){if(!P(e))return null;let t=(Array.isArray(e.history)?e.history:[]).map(ke).filter(e=>e!==null).slice(-60);return{...e,history:t.length?t:void 0}}function Me(e){if(!P(e))return;let t=e.startAt,n=e.endAt;if(!(typeof t!=`number`||!Number.isFinite(t))&&!(typeof n!=`number`||!Number.isFinite(n)||n<=t))return{label:I(e.label),startAt:t,endAt:n,origin:e.origin===`search`?`search`:`user`}}function Ne(e){if(!(!P(e)||typeof e.text!=`string`||!e.text))return{text:e.text,at:F(e.at,0)}}function Pe(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(!P(n)||typeof n.expected!=`string`||!n.expected)continue;let e=n.result;(e===`hit`||e===`miss`||e===`unclear`)&&t.push({at:F(n.at,0),expected:n.expected,result:e,...typeof n.note==`string`&&n.note?{note:n.note}:{}})}return t.slice(-20)}function R(e,t){if(!e.window||t<=e.window.endAt)return e;let{window:n,...r}=e;return r}var z=new Set([`thesis`,`alignmentgauge`,`standingalerts`,`sourceslineage`]);function Fe(e,t,n){let r=n||t;return r?e.map(e=>{if(e.refreshQuery?.trim()||e.metricId||z.has(e.block.type))return e;let t=e.block.props?.title,n=typeof t==`string`&&t.trim()?`${r} — ${t.trim()}`:r;return{...e,refreshQuery:n}}):e}function Ie(e){if(!P(e))return null;let n=I(e.id);if(!n)return null;let r=P(e.thesis)?e.thesis:null,i=Array.isArray(e.widgets)?e.widgets.filter(e=>P(e)&&P(e.block)):[],a=P(e.cadence)?e.cadence:{},o=P(e.alerts)?e.alerts:{},s=Le(e.lastVerdict),c=I(e.title,`Untitled`),l=t(I(e.question)),u=Me(a.window),d=Ne(e.prediction),f=Pe(e.predictionHistory);return{id:n,title:c,question:l,thesis:{text:I(r?.text),saidAt:F(r?.saidAt,0)},tripwires:Array.isArray(e.tripwires)?e.tripwires:[],metrics:Array.isArray(e.metrics)?e.metrics.map(je).filter(e=>e!==null):[],sources:Array.isArray(e.sources)?e.sources:[],widgets:Fe(i.slice(0,12),c,l),cadence:{data:Oe(a.data),ai:I(a.ai,`manual`),...u?{window:u}:{}},smartTrigger:typeof e.smartTrigger!=`boolean`||e.smartTrigger,alerts:{inApp:o.inApp!==!1,push:o.push===!0},...typeof e.topic==`string`&&e.topic?{topic:e.topic}:{},createdAt:F(e.createdAt,0),updatedAt:F(e.updatedAt,0),...typeof e.lastTouchedByUserAt==`number`&&Number.isFinite(e.lastTouchedByUserAt)?{lastTouchedByUserAt:e.lastTouchedByUserAt}:{},nextDataAt:F(e.nextDataAt,0),nextAiAt:F(e.nextAiAt,2**53-1),...typeof e.oneShotAt==`number`&&Number.isFinite(e.oneShotAt)?{oneShotAt:e.oneShotAt,oneShotLabel:I(e.oneShotLabel)}:{},...d?{prediction:d}:{},...f.length?{predictionHistory:f}:{},lastRefreshedAt:typeof e.lastRefreshedAt==`number`&&Number.isFinite(e.lastRefreshedAt)?e.lastRefreshedAt:null,...e.lastDataOutcome===`updated`||e.lastDataOutcome===`no-change`||e.lastDataOutcome===`unverified`?{lastDataOutcome:e.lastDataOutcome}:{},...L(e.state)?{state:L(e.state)}:{},...s?{lastVerdict:s}:{},...typeof e.lastVerdictAttemptAt==`number`&&Number.isFinite(e.lastVerdictAttemptAt)?{lastVerdictAttemptAt:e.lastVerdictAttemptAt}:{},...typeof e.lastVerdictError==`string`&&e.lastVerdictError?{lastVerdictError:e.lastVerdictError}:{}}}function Le(e){return!P(e)||typeof e.text!=`string`||!e.text?null:{text:e.text,at:F(e.at,0),grounded:e.grounded===!0,...Array.isArray(e.sources)?{sources:e.sources}:{},...typeof e.tripwireId==`string`?{tripwireId:e.tripwireId}:{}}}var B=!1,V=0;function H(e){return Array.isArray(e)?e.map(Ie).filter(e=>e!==null):[]}async function U(e){let t=++V;try{if(typeof localStorage>`u`)return;let r=await n(e);if(t!==V)return;localStorage.setItem(O,r)}catch(e){let t=e;if(t&&(t.name===`QuotaExceededError`||t.name===`NS_ERROR_DOM_QUOTA_REACHED`||t.code===22||t.code===1014)){Te=!0;try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(A))}catch{}}}}function Re(){try{if(typeof localStorage>`u`)return[];let e=localStorage.getItem(O);if(!e)return[];let t=H(JSON.parse(e));return t.length&&U(t),t}catch{return[]}}async function W(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(O);if(!e)return;try{JSON.parse(e);return}catch{}let t=H(await r(e));if(B)return;M=t,B=!0,typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(k,{detail:t}))}catch{}}var G=W();function K(){return G}function q(){return M??=Re(),M}function J(){let e=M;M=null,B=!1,G=W();try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(O);if(!e)return;JSON.parse(e)}catch{M=e}}function Y(e){return e.length<=j?e:[...e].sort((e,t)=>(t.lastTouchedByUserAt??t.updatedAt)-(e.lastTouchedByUserAt??e.updatedAt)).slice(0,j)}function X(e){let t=H(e);M=t,B=!0,U(t);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(k,{detail:t}))}catch{}}function Z(e,t,n=Date.now(),r={}){let i=!1,a=q().map(a=>a.id===e?(i=!0,{...t(a),updatedAt:n,...r.userTouch?{lastTouchedByUserAt:n}:{}}):a);i&&X(a)}var Q=null,ze=null;function Be(){let e=q();return(ze!==e||Q===null)&&(Q=[...e].sort((e,t)=>(t.lastTouchedByUserAt??t.createdAt)-(e.lastTouchedByUserAt??e.createdAt)),ze=e),Q}function Ve(e){return q().find(t=>t.id===e)??null}function He(e){X(Y([De({...e,lastTouchedByUserAt:e.lastTouchedByUserAt??e.updatedAt}),...q().filter(t=>t.id!==e.id)]))}function Ue(e){let t=H(e);if(!t.length)return 0;let n=new Map(q().map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);(!t||e.updatedAt>=t.updatedAt)&&n.set(e.id,e)}return X(Y([...n.values()])),t.length}function We(e){let t=e.now??Date.now();return{id:N(),title:e.title||`Untitled dashboard`,question:e.question??``,thesis:{text:``,saidAt:t},tripwires:[],metrics:[],sources:[{kind:`ORIGIN`,conversationId:`pin`,title:e.title||`Pinned cards`,contributed:`Started by pinning a card.`,at:t}],widgets:[],cadence:{data:`manual`,ai:`manual`},smartTrigger:!1,alerts:{inApp:!0,push:!1},...e.topic?{topic:e.topic}:{},createdAt:t,updatedAt:t,nextDataAt:2**53-1,nextAiAt:2**53-1,lastRefreshedAt:null}}function Ge(e,t=`pin`,n){let r=new Set([`chart`,`plot`,`dualaxis`,`bars`,`timeline`,`breakdown`,`table`]);return{id:`w-pin-`+Math.random().toString(36).slice(2,9),block:e,span:r.has(e.type)?2:1,fromSource:t,...n?.trim()?{refreshQuery:n.trim()}:{}}}function Ke(e,t){Z(e,e=>({...e,...t}),void 0,{userTouch:!0})}function qe(e,t,n=Date.now()){Z(e,e=>{let r={...e.cadence,...t};return{...e,cadence:r,...t.data===void 0?{}:{nextDataAt:c(r,n)},...t.ai===void 0?{}:{nextAiAt:o(n,a[r.ai])}}},n,{userTouch:!0})}function Je(e){let t=q().filter(t=>t.id!==e);t.length!==q().length&&(X(t),g(new Set(t.map(e=>e.id))),de(e),_e(e))}function Ye(){q().length!==0&&(X([]),g(new Set))}function Xe(e,t,n){Z(e,e=>{let r=[...e.widgets];if(t<0||t>=r.length||n<0||n>=r.length)return e;let[i]=r.splice(t,1);return r.splice(n,0,i),{...e,widgets:r}},void 0,{userTouch:!0})}function Ze(e,t,n){Z(e,e=>({...e,widgets:e.widgets.map(e=>e.id===t?{...e,span:n}:e)}),void 0,{userTouch:!0})}function Qe(e,t){Z(e,e=>({...e,widgets:e.widgets.filter(e=>e.id!==t)}),void 0,{userTouch:!0})}function $e(e,t,n={}){let r=Array.isArray(t)?t:[t];r.length!==0&&Z(e,e=>{let t=Math.max(0,Math.min(n.at??e.widgets.length,e.widgets.length)),i=[...e.widgets.slice(0,t),...r,...e.widgets.slice(t)],a=i;if(i.length>12){let e=i.filter(e=>!z.has(e.block.type)),t=i.length-12;if(e.length>=t){let n=new Set(e.slice(-t).map(e=>e.id));a=i.filter(e=>!n.has(e.id))}else a=i.slice(0,12)}return{...e,widgets:a,...n.source?{sources:[...e.sources,n.source].slice(-nt)}:{}}},void 0,{userTouch:!0})}function et(e,t,n){let r=n.trim();if(!r||t.length===0)return;let i=new Set(t);Z(e,e=>({...e,widgets:e.widgets.map(e=>i.has(e.id)?{...e,refreshQuery:r}:e)}))}function tt(e,t){Z(e,e=>{let n=new Map(e.widgets.map(e=>[e.id,e])),r=t.map(e=>n.get(e)).filter(e=>!!e),i=new Set(r.map(e=>e.id)),a=e.widgets.filter(e=>!i.has(e.id));return{...e,widgets:[...r,...a]}},void 0,{userTouch:!0})}var nt=24;function rt(e,t){Z(e,e=>({...e,sources:[...e.sources,t].slice(-24)}),void 0,{userTouch:!0})}var it=12;function $(e,t){Z(e,e=>({...e,metrics:[...e.metrics,...t.metrics].slice(0,12),tripwires:[...e.tripwires,...t.tripwires].slice(0,12),widgets:[...e.widgets,...t.widgets].slice(0,12),sources:[...e.sources,t.source].slice(-24)}),void 0,{userTouch:!0})}function at(e,t,n){if(n===null)return e;let r=[...e??[],{at:t,value:n}];return r.length>Ce?r.slice(-60):r}function ot(e,t,n,r,i,a=Date.now()){Z(e,e=>({...e,metrics:e.metrics.map(e=>e.id===t?{...e,lastValue:n,lastRaw:r,origin:i,asOf:a,history:at(e.history,a,n)}:e)}),a,{userTouch:i===`user`})}function st(e,t,n=Date.now()){Z(e,e=>({...e,tripwires:t}),n)}function ct(e,t,n=Date.now()){Z(e,e=>({...e,lastVerdict:t,lastVerdictAttemptAt:n,lastVerdictError:void 0}),n)}function lt(e,t,n){Z(e,e=>({...e,lastVerdictAttemptAt:t,lastVerdictError:n}),t)}function ut(e,t=Date.now(),n=`updated`){Z(e,e=>{let r=R(e.cadence,t);return{...e,cadence:r,nextDataAt:c(r,t),lastRefreshedAt:t,lastDataOutcome:n,state:E(t)}})}function dt(e,t,n=Date.now()){Z(e,e=>({...e,state:D(T(e),t,n)}))}function ft(e,t){Z(e,e=>({...e,nextDataAt:t,...e.oneShotAt!==void 0&&e.oneShotAt<t?{oneShotAt:t}:{}}))}function pt(e,t=Date.now()){Z(e,e=>e.oneShotAt===void 0?{...e,oneShotAt:t,oneShotLabel:`first check`}:e)}function mt(e,t=Date.now()){Z(e,e=>({...e,nextAiAt:o(t,a[e.cadence.ai])}))}function ht(e,t,n=Date.now()){Z(e,e=>{let r=t?{...e.cadence,window:t}:{...e.cadence,window:void 0};return{...e,cadence:r,nextDataAt:c(r,n)}},n,{userTouch:t?.origin===`user`})}function gt(e,t,n,r=Date.now()){Z(e,e=>({...e,oneShotAt:t,oneShotLabel:n}),r,{userTouch:!0})}function _t(e,t=Date.now()){Z(e,e=>({...e,oneShotAt:void 0,oneShotLabel:void 0}),t)}var vt=3e5;function yt(e,t,n=Date.now()){Z(e,e=>{let r=new Map((t.values??[]).map(e=>[e.metricId,e])),i=new Map((t.blocks??[]).map(e=>[e.widgetId,e.block])),a=e.prediction,o=e.predictionHistory;if(t.grade&&a){let e={at:n,expected:a.text,result:t.grade.result,...t.grade.note?{note:t.grade.note}:{}};o=[...o??[],e].slice(-20),a=void 0}t.expects?.trim()&&(a={text:t.expects.trim(),at:n});let s=R(e.cadence,n),l=c(s,n),u=t.outcome===`unverified`&&e.lastDataOutcome!==`unverified`&&l!==2**53-1&&(!s.window||n>=s.window.startAt)?Math.min(l,n+vt):l;return{...e,cadence:s,metrics:e.metrics.map(e=>{let t=r.get(e.id);return t?{...e,lastValue:t.value,lastRaw:t.raw,origin:t.origin,asOf:n,history:at(e.history,n,t.value)}:e}),widgets:e.widgets.map(e=>{let t=i.get(e.id);return t?{...e,block:t}:e}),...t.tripwires?{tripwires:t.tripwires}:{},...t.consumedOneShot?{oneShotAt:void 0,oneShotLabel:void 0}:{},nextDataAt:u,lastRefreshedAt:n,lastDataOutcome:t.outcome,state:t.outcome===`unverified`?D(T(e),{kind:`ungrounded`},n):E(n),prediction:a,predictionHistory:o}},n)}export{be as A,ue as B,Je as C,tt as D,ct as E,K as F,ne as G,se as H,ye as I,i as J,te as K,ve as L,Ke as M,ot as N,et as O,st as P,T as R,N as S,ht as T,oe as U,ce as V,ae as W,c as X,s as Y,o as Z,mt as _,He as a,lt as b,Ge as c,pt as d,$ as f,J as g,Ee as h,xe as i,qe as j,Ze as k,_t as l,Be as m,A as n,$e as o,Ve as p,a as q,it as r,yt as s,k as t,We as u,ft as v,Qe as w,Ue as x,dt as y,he as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./compiler-runtime-qQQXpJgv.js";import{t}from"./jsx-runtime-DeHZSEgm.js";var n=e(),r=t();function i(e){if(e<=0)return`due now`;let t=Math.round(e/6e4);if(t<60)return`${t}m`;let n=Math.floor(t/60),r=t%60;if(n<24)return r?`${n}h ${r}m`:`${n}h`;let i=Math.floor(n/24),a=n%24;return a?`${i}d ${a}h`:`${i}d`}function a(e){let t=(0,n.c)(9),{targetAt:a,now:o,label:s}=e,c=a-o,l;t[0]===c?l=t[1]:(l=i(c),t[0]=c,t[1]=l);let u;t[2]===l?u=t[3]:(u=(0,r.jsx)(`span`,{className:`tile-countdown-value`,children:l}),t[2]=l,t[3]=u);let d;t[4]===s?d=t[5]:(d=s&&(0,r.jsx)(`span`,{className:`tile-countdown-label`,children:s}),t[4]=s,t[5]=d);let f;return t[6]!==u||t[7]!==d?(f=(0,r.jsxs)(`div`,{className:`tile-countdown`,children:[u,d]}),t[6]=u,t[7]=d,t[8]=f):f=t[8],f}export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){return e.entities.filter(e=>e.parentId===t)}function t(e,t){return e.facts.filter(e=>e.entityId===t)}export{t as n,e as t};
|