PageSourceSearch

https://www.ctzn.pub/_next/static/immutable/chunks/1cm3k38yr3u55.js

js ctzn.pub collected 2026-10-09 22:05:19 UTC 7,821 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,243922,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(522016),n=e.i(115057),r=e.i(282810);let l={essay:"essays",app:"apps",chart:"charts"},o={essay:{one:"Essay",many:"Essays"},app:{one:"App",many:"Apps"},chart:{one:"Chart",many:"Charts"}};var i=e.i(647163);let c=["type","topic","idea"],p=[...r.THEME_ORDER,"economy"],d=["essay","app","chart"].map(e=>l[e]);function u(e){if("type"===e.group)return d.indexOf(e.key);if("topic"===e.group){let t=p.indexOf(e.key);return -1===t?p.length:t}return-e.count}function m({label:e,count:a,active:s,onClick:n}){return(0,t.jsxs)("button",{type:"button",onClick:n,"aria-pressed":s,className:(0,i.cn)("shrink-0 inline-flex items-center gap-1.5 h-8 px-3 rounded-full border text-[13px] font-medium whitespace-nowrap","transition-[background-color,border-color,color,box-shadow] duration-200 ease-out motion-reduce:transition-none","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary focus-visible:ring-offset-2 focus-visible:ring-offset-brand-bg",s?"border-brand-text bg-brand-text text-white shadow-[0_6px_16px_-8px_rgba(12,14,20,0.55)]":"border-brand-border bg-brand-card text-brand-text hover:border-brand-text/40 hover:bg-brand-subtle"),children:[e,(0,t.jsx)("span",{className:(0,i.cn)("font-mono text-[10px] tabular-nums",s?"text-white/65":"text-brand-muted"),children:a})]})}function b({item:e}){let a=e.filterTags.filter(e=>"type"!==e.group),l=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"relative block aspect-[16/10] overflow-hidden bg-brand-subtle",children:[e.thumbnail?(0,t.jsx)("img",{src:e.thumbnail,alt:"","aria-hidden":!0,loading:"lazy",className:(0,i.cn)("w-full h-full transition-transform duration-500 ease-out group-hover:scale-[1.05] motion-reduce:transition-none motion-reduce:group-hover:scale-100","contain"===e.fit?"object-contain p-2 sm:p-3 bg-white":"object-cover object-top")}):(0,t.jsx)("span",{className:"block w-full h-full",style:{background:`linear-gradient(135deg, ${(0,r.colorForTheme)(e.topic)}33, ${(0,r.colorForTheme)(e.topic)}0d)`},"aria-hidden":!0}),(0,t.jsx)("span",{className:"absolute inset-x-0 bottom-0 h-px bg-brand-border/80","aria-hidden":!0}),(0,t.jsx)("span",{className:"absolute top-2 left-2 sm:top-3 sm:left-3 rounded-full bg-white/90 backdrop-blur px-2 py-0.5 font-mono text-[9px] sm:text-[10px] uppercase tracking-[0.14em] text-brand-text shadow-sm ring-1 ring-black/5",children:o[e.type].one}),e.external&&(0,t.jsx)("span",{className:"absolute top-2 right-2 sm:top-3 sm:right-3 grid place-items-center w-6 h-6 rounded-full bg-white/90 backdrop-blur text-brand-text shadow-sm ring-1 ring-black/5",children:(0,t.jsx)(n.ArrowUpRight,{size:13,"aria-label":"Opens in a new tab"})})]}),(0,t.jsxs)("span",{className:"flex flex-col flex-1 p-3 sm:p-4",children:[(0,t.jsx)("span",{className:"font-display font-semibold text-[0.9rem] sm:text-[1.02rem] leading-snug tracking-[-0.01em] text-brand-text line-clamp-3 sm:line-clamp-2 sm:text-balance transition-colors group-hover:text-brand-primary",children:e.title}),e.summary&&(0,t.jsx)("span",{className:"hidden sm:block mt-1.5",children:(0,t.jsx)("span",{className:"text-[13px] leading-relaxed text-brand-muted line-clamp-2",children:e.summary})}),a.length>0&&(0,t.jsx)("span",{className:"mt-auto pt-3 font-mono text-[10px] sm:text-[11px] leading-snug text-brand-muted line-clamp-1",children:a.map(e=>e.label).join(" · ")})]})]}),c=(0,i.cn)("group flex flex-col h-full overflow-hidden rounded-2xl border border-brand-border/80 bg-brand-card","shadow-[0_1px_2px_rgba(12,14,20,0.04)] transition-[transform,box-shadow,border-color] duration-300 ease-out","hover:-translate-y-1 hover:border-brand-border hover:shadow-[0_22px_44px_-24px_rgba(12,14,20,0.32)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary focus-visible:ring-offset-2 focus-visible:ring-offset-brand-bg","motion-reduce:transition-none motion-reduce:hover:translate-y-0");return"chart"===e.type?(0,t.jsx)(s.default,{href:e.href,className:c,children:l}):(0,t.jsx)("a",{href:e.href,className:c,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},children:l})}e.s(["Gallery",0,function({items:e}){let[s,n]=(0,a.useState)(null),r=(0,a.useMemo)(()=>{let t=new Map;for(let a of e)for(let e of a.filterTags){let a=t.get(e.key);a?a.count++:t.set(e.key,{...e,count:1})}return c.map(e=>[...t.values()].filter(t=>t.group===e).sort((e,t)=>
1u(e)-u(t)||e.label.localeCompare(t.label))).filter(e=>e.length)},[e]),o=(0,a.useMemo)(()=>new Set(r.flat().map(e=>e.key)),[r]),[i,p]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get("type"),a=e.get("tag")??(t&&l[t]?l[t]:null)??e.get("topic");a&&o.has(a)&&n(a),p(!0)},[o]),(0,a.useEffect)(()=>{if(!i)return;let e=s?`?tag=${encodeURIComponent(s)}`:"";window.history.replaceState(null,"",`${window.location.pathname}${e}`)},[i,s]);let d=(0,a.useMemo)(()=>s?e.filter(e=>e.filterTags.some(e=>e.key===s)):e,[e,s]),h=s?r.flat().find(e=>e.key===s)?.label:null;return(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8 sm:pt-12 pb-20",children:[(0,t.jsx)("h1",{className:"sr-only",children:"ctzn.pub — essays, apps and charts"}),(0,t.jsxs)("div",{className:"no-scrollbar -mx-4 px-4 sm:mx-0 sm:px-0 flex flex-nowrap sm:flex-wrap items-center gap-1.5 overflow-x-auto sm:overflow-visible pb-1",role:"group","aria-label":"Filter by tag",children:[(0,t.jsx)(m,{label:"All",count:e.length,active:null===s,onClick:()=>n(null)}),r.map(e=>(0,t.jsxs)("span",{className:"contents",children:[(0,t.jsx)("span",{className:"shrink-0 w-px h-4 mx-1.5 bg-brand-border","aria-hidden":!0}),e.map(e=>(0,t.jsx)(m,{label:e.label,count:e.count,active:s===e.key,onClick:()=>n(s===e.key?null:e.key)},e.key))]},e[0].group))]}),(0,t.jsxs)("div",{className:"mt-6 sm:mt-8 mb-4 sm:mb-5 flex items-baseline justify-between gap-4",children:[(0,t.jsxs)("p",{className:"font-mono text-[11px] uppercase tracking-[0.14em] text-brand-muted","aria-live":"polite",children:[h?`${h} \xb7 `:"",d.length," ",1===d.length?"item":"items"]}),s&&(0,t.jsx)("button",{type:"button",onClick:()=>n(null),className:"font-mono text-[11px] uppercase tracking-[0.14em] text-brand-primary hover:underline underline-offset-4",children:"Clear filter"})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3 sm:gap-6 motion-safe:animate-fade-in",children:d.map(e=>(0,t.jsx)(b,{item:e},e.key))},s??"all")]})},"GalleryCard",0,b],243922)},282810,e=>{"use strict";let t={politics:"Politics & Polarization",happiness:"Happiness & Well-Being",health:"Health","consumer-finance":"Consumer Finance",society:"Society & Belief"},a={politics:"#2442F4",happiness:"#E0567E",health:"#1D9E75","consumer-finance":"#BA7517",society:"#7F77DD",guns:"#993C1D"};e.s(["THEME_ORDER",0,["politics","happiness","health","consumer-finance","society"],"colorForTheme",0,function(e){return a[e]??"#6B7078"},"labelForTheme",0,function(e){return t[e]??e.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},"sourceFamily",0,function(e=""){let t=e.toLowerCase();return/gss|general social/.test(t)?"GSS":/gallup/.test(t)?"Gallup":/anes/.test(t)?"ANES":/ces|cooperative election/.test(t)?"CES":/cdc|nchs|places|nssp|usaleep|nhanes/.test(t)?"CDC":/census|acs|rucc/.test(t)?"Census":/shed|federal reserve/.test(t)?"Fed":/monitoring the future|mtf/.test(t)?"MTF":/precinct|election lab|county returns|mit election/.test(t)?"Elections":/pew/.test(t)?"Pew":/cepii|baci/.test(t)?"Trade":"Other"}])},115057,e=>{"use strict";let t=(0,e.i(475254).default)("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["ArrowUpRight",0,t],115057)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.