PageSourceSearch

https://podemos.org.br/assets/NewsCard-D1WFP8dd.js

js podemos.org.br collected 2026-10-02 11:15:47 UTC 3,670 bytes, 1 lines download raw bytes

1import{r as i,w as k,j as t,x as $,g as N,y as j,I,L as m,z as w}from"./index-CyFrY2OP.js";function L(e){const s=(e.split("/").pop()?.split("?")[0]??"").match(/^(\d{8,})_([0-9a-z]+)(?:_[a-z0-9]+)?(?:-[\w-]+)?\.(?:jpg|jpeg|png)$/i);return s?`https://live.staticflickr.com/65535/${s[1]}_${s[2]}_c.jpg`:null}function E({src:e,alt:a,className:s,fallback:o,fallbackSrc:n,showFallbackAsPlaceholder:x=!1,...f}){const c=i.useMemo(()=>{if(!e)return n?[n]:[];const r=L(e),d=k(e),h=e.includes("behold.pictures"),u=e.includes("cdninstagram.com")||e.includes("fbcdn.net"),y=h||u?[d,e]:[e,...r?[r]:[],d];return n&&y.push(n),Array.from(new Set(y))},[e,n]),[l,g]=i.useState(0),[b,p]=i.useState(!1);i.useEffect(()=>{g(0),p(!1)},[e]),i.useEffect(()=>{if(b||l>=c.length)return;const r=c[l]??"";if(r.startsWith("/")||r.startsWith("data:"))return;const h=setTimeout(()=>g(u=>u===l?u+1:u),1e4);return()=>clearTimeout(h)},[l,b,c]);const v=i.useCallback(r=>{r&&r.complete&&(r.naturalWidth>0?p(!0):g(d=>d+1))},[]);return l>=c.length?x?t.jsx("div",{className:`flex items-center justify-center bg-brand-purple-dark/30 ${s}`,children:t.jsx("div",{className:"text-white/20 font-display text-4xl font-black uppercase tracking-tighter opacity-20 select-none",children:"Podemos"})}):t.jsx(t.Fragment,{children:o??null}):t.jsx("img",{ref:v,src:c[l],alt:a,className:s,onLoad:()=>p(!0),onError:()=>g(r=>r+1),...f})}function W({post:e,size:a="md"}){const s=$(e,"medium"),o=N(e),n=j(e.title.rendered),x=j(e.excerpt.rendered),f=t.jsxs("div",{className:"w-full h-full flex flex-col gap-2 items-center justify-center bg-primary/10 text-primary font-display",children:[e.slug.startsWith("instagram-")&&t.jsx(I,{className:"h-8 w-8"}),t.jsx("span",{className:"text-xl font-bold",children:"Podemos"})]});return t.jsxs("article",{className:"group flex flex-col bg-card rounded-xl overflow-hidden border border-border hover:shadow-lg transition-shadow",children:[t.jsx(m,{to:"/noticia/$slug",params:{slug:e.slug},className:"block",children:t.jsx("div",{className:"aspect-[16/10] bg-soft overflow-hidden",children:t.jsx(E,{src:s.url||"",alt:s.alt||n,loading:"lazy",decoding:"async",width:640,height:400,fallback:f,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})})}),t.jsxs("div",{className:"p-4 flex flex-col gap-2 flex-1",children:[o&&t.jsx(m,{to:"/categoria/$slug",params:{slug:o.slug},className:"inline-flex w-fit text-[10px] font-bold uppercase tracking-wider px-2 py-1 rounded bg-primary text-primary-foreground",children:o.name}),t.jsx(m,{to:"/noticia/$slug",params:{slug:e.slug},children:t.jsx("h3",{className:`font-display font-bold text-foreground group-hover:text-primary leading-snug ${a==="lg"?"text-xl":"text-base"} line-clamp-3`,children:n})}),a!=="sm"&&x&&t.jsxs("p",{className:"text-sm text-muted-foreground line-clamp-3",children:[x," ",t.jsx(m,{to:"/noticia/$slug",params:{slug:e.slug},className:"font-bold text-primary hover:underline whitespace-nowrap",children:"Ler mais →"})]}),t.jsx("span",{className:"mt-auto pt-2 text-xs text-muted-foreground",children:w(e.date,{short:!0})})]})]})}function _({post:e}){const a=N(e),s=j(e.title.rendered);return t.jsxs(m,{to:"/noticia/$slug",params:{slug:e.slug},className:"block py-3 border-b border-border last:border-0 group",children:[a&&t.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-accent",children:a.name}),t.jsx("h4",{className:"text-sm font-semibold leading-snug text-foreground group-hover:text-primary mt-1 line-clamp-3",children:s}),t.jsx("span",{className:"text-xs text-muted-foreground mt-1 block",children:w(e.date,{short:!0})})]})}export{W as N,E as S,_ as a};

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.