// ResearchView — a blog where the research is explained in post form. // List of posts -> click into a full post. Posts live in data.blog. const RV = window.WINTELAcademicDesignSystem_045d4f; // Newest publication year for a topic tag (used to date posts that cite a body of work). function newestYearForTopic(topic) { const P = window.WINTEL_PUBLICATIONS; if (!P || !window.topicsFor) return null; const all = [...(P.inPress || []), ...(P.articles || []), ...(P.proceedings || []), ...(P.bookChapters || [])]; const years = all.filter((p) => window.topicsFor(p).some((t) => t.label === topic)).map((p) => Number(p.y || 0)); return years.length ? Math.max(...years) : null; } // Display date for a post — newest cited-reference year when it tracks a topic, else its own date. function postDate(p) { if (p.refs) { const y = newestYearForTopic(p.refs); if (y) return String(y); } return p.date; } // First figure in a post body, resolved through the offline-resource map. // A post may also declare an explicit `thumb` (used when its hero is an embed). function postThumb(p) { if (p.thumb) return (p.thumbResId && window.__resources && window.__resources[p.thumbResId]) || p.thumb; const fig = (p.body || []).find((b) => b && b.fig); if (!fig) return null; return (fig.resId && window.__resources && window.__resources[fig.resId]) || fig.fig; } // Renders the references for a post: all publications carrying the given topic tag. function PostReferences({ post }) { const prefix = (post.refs || 'post').toLowerCase(); const venueOf = (p) => p.conf ? (p.v || '').split(',')[0] : p.v; let refs, tagObj = null; if (post.references && post.references.length) { refs = post.references; // explicit, in citation order } else { const P = window.WINTEL_PUBLICATIONS; if (!P || !window.topicsFor) return null; const all = [...(P.inPress || []), ...(P.articles || []), ...(P.proceedings || []), ...(P.bookChapters || [])]; refs = all .filter((p) => window.topicsFor(p).some((t) => t.label === post.refs)) .filter((p) => !/data[\s-]?cent(er|re)/i.test(p.t || '')) .filter((p) => !/abdelhad|ghadhban/i.test(((p.a && p.a[0] && p.a[0].name) || ''))) .sort((a, b) => Number(b.y || 0) - Number(a.y || 0)); tagObj = (window.TOPICS || []).find((t) => t.label === post.refs); } if (!refs.length) return null; return (

References

{tagObj && window.TopicTag ? : null} {refs.length}
    {refs.map((p, i) => (
  1. {i + 1}.

    {(p.a || []).map((au, j, arr) => ( {j > 0 ? (j === arr.length - 1 ? (arr.length > 2 ? ', and ' : ' and ') : ', ') : ''} {au.name} ))} {', \u201C'}{p.t}{',\u201D '} {p.conf ? 'Proc. ' : ''}{venueOf(p)}{p.vol ? , vol. {p.vol} : null}{p.no ? , no. {p.no} : null}{p.p ? , pp. {p.p} : null}{p.y ? , {p.y} : null}. {p.u ? DOI : null}

  2. ))}
); } // Renders a body paragraph, turning [n] or [n, m] citation markers into // superscript links to the numbered reference list (id="-ref-n"). function CitedText({ text, refPrefix }) { const parts = String(text).split(/(\[\d+(?:\s*,\s*\d+)*\])/g); return ( {parts.map((seg, i) => { const m = seg.match(/^\[(\d+(?:\s*,\s*\d+)*)\]$/); if (!m) return {seg}; const nums = m[1].split(',').map((s) => s.trim()); return ( [{nums.map((n, j) => ( {j > 0 ? ', ' : ''} { e.preventDefault(); const el = document.getElementById(refPrefix + '-ref-' + n); if (el) el.scrollIntoView({ behavior: 'smooth', block: 'center' }); }}>{n} ))}] ); })} ); } function ResearchView({ data }) { const posts = (data.blog || []).filter((p) => !p.draft); const [open, setOpen] = React.useState(() => { const t = window.__researchOpen; if (t != null) { window.__researchOpen = null; const idx = (data.blog || []).filter((x) => !x.draft).findIndex((x) => x.title === t); return idx >= 0 ? idx : null; } return null; }); // index of open post, or null if (open !== null) { const p = posts[open]; const leadFig = (p.body || []).find((b) => b && b.fig); const leadSrc = leadFig ? ((leadFig.resId && window.__resources && window.__resources[leadFig.resId]) || leadFig.fig) : null; let leadShown = false; return (
setOpen(null)} style={{ alignSelf: 'flex-start', paddingLeft: 0, color: 'var(--text-muted)' }}> All posts {p.heroEmbed ? (