1import{a as N,r,j as e,L as u}from"./vendor-react-B4BIr4_A.js";import{u as R,z as w,n as S,B as _,S as k,w as x,e as P}from"./app-BCfwVS8x.js";import{R as B,p as C}from"./RadarBlocks-CTepTkm9.js";import{R as L}from"./RadarPostAside-T_4qPXMS.js";/* empty css */import{L as z,R as A,A as f}from"./icone-sito-BiOTxGdK.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./crashBlackBox-NHteRanH.js";import"./evento-comune-FmQYl2SX.js";import"./vendor-firebase-AOn3Fvmd.js";import"./firebase-config-Dn2Tu_JL.js";import"./publicUrls-C1QEMgMu.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./SiteGallery-VS975YER.js";import"./RadarPulseIcon-DcjMgmpL.js";function E(...n){const a=n.find(l=>l&&String(l).trim());if(!a)return;const i=String(a).replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();if(!i)return;if(i.length<=155)return i;const s=i.slice(0,155),o=s.lastIndexOf(" ");return`${(o>80?s.slice(0,o):s).trim()}â¦`}function ie(){const{slug:n}=N(),[a,i]=r.useState("loading"),[s,o]=r.useState(null),l=R([a,s]),m=r.useRef(null);r.useEffect(()=>{let t=!1;return i("loading"),o(null),(async()=>{const c=await w(n);t||(c?(o(c),i("found")):i("missing"))})(),()=>{t=!0}},[n]);const[b,j]=r.useState([]);r.useEffect(()=>{const t=S(c=>j(c),{max:7});return()=>t&&t()},[]);const p=t=>P(t.color,t.slug||t.category||t.title),h=_(n),d=a==="found"&&s?p(s):h?p(h):null,g="site-band site-band-tight"+(d?" site-band-radar":""),v=s?E(s.excerpt,s.body_html):void 0,y=s&&s.cover_url||void 0;return e.jsx(k,{tone:"dark",accent:d,title:(s==null?void 0:s.title)||"Radar",description:v,ogImage:y,children:e.jsxs("div",{ref:l,children:[a==="loading"&&e.jsx("section",{className:g,children:e.jsx("div",{className:"site-wrap",children:e.jsxs("div",{className:"site-card site-empty",children:[e.jsx(z,{size:26,className:"site-spin site-empty-icon","aria-hidden":"true"}),e.jsx("p",{className:"site-empty-body",children:"Loadingâ¦"})]})})}),a==="missing"&&e.jsx("section",{className:"site-band site-band-tight site-band-radar",children:e.jsx("div",{className:"site-wrap",children:e.jsxs("div",{className:"site-card site-empty",children:[e.jsx(A,{size:30,className:"site-empty-icon","aria-hidden":"true"}),e.jsx("h1",{className:"site-empty-title",children:"Post not found"}),e.jsx("p",{className:"site-empty-body",children:"This update may have been moved or is no longer published."}),e.jsxs(u,{to:"/radar",className:"site-btn site-btn-primary",children:[e.jsx(f,{size:16,"aria-hidden":"true"})," Back to Climpact Radar"]})]})})}),a==="found"&&s&&e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"site-band site-band-tight site-band-radar",children:e.jsxs("div",{className:"site-wrap",children:[e.jsxs(u,{to:"/radar",className:"site-link-arrow reveal",style:{marginBottom:18},children:[e.jsx(f,{size:15,"aria-hidden":"true"})," Back to Climpact Radar"]}),e.jsx("p",{className:"site-eyebrow reveal",children:s.category_label||"Climpact Radar"}),e.jsx("h1",{className:"site-band-title reveal","data-d":"1",children:s.title}),(x(s.published_at)||s.author_name)&&e.jsx("p",{className:"site-lead reveal","data-d":"2",style:{marginTop:16,fontSize:"clamp(0.95rem, 1.3vw, 1.1rem)"},children:[x(s.published_at),s.author_name].filter(Boolean).join(" · ")})]})}),e.jsx("section",{className:"site-band site-band-tight site-band-invert site-band-white",children:e.jsx("div",{className:"site-wrap",children:e.jsxs("article",{className:"radar-post",ref:m,children:[e.jsx("div",{className:"radar-post-main",children:Array.isArray(s.blocks)&&s.blocks.length>0?e.jsx(B,{blocks:s.blocks,legacyHtml:s.body_html,accent:d}):e.jsx("div",{className:"radar-html",dangerouslySetInnerHTML:{__html:C(s.body_html)}})}),e.jsx(L,{post:s,recent:b,articleRef:m})]})})})]})]})})}export{ie as default};
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.