PageSourceSearch

https://ethioexplorer.com/assets/LazyImage-CcZWVcn8.js

js ethioexplorer.com collected 2026-10-02 13:12:15 UTC 2,848 bytes, 1 lines download raw bytes

1import{r as s,j as e,R as J}from"./index-D82aNb1r.js";import{g as K}from"./imageOptimization-DN6a4zir.js";import{I as Q}from"./image-B4PVkrHk.js";import{C as U}from"./circle-alert-C1FYXkSG.js";function L({src:i,alt:R="",className:S="",containerClassName:E="",fallbackSrc:p="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Rome_Stele.jpg/800px-Rome_Stele.jpg",rootMargin:g="200px 0px",threshold:v=.01,showShimmer:N=!0,showErrorIcon:z=!0,priority:r=!1,preset:$="card",aspectRatio:P="16/9",fetchPriority:C,srcSet:I,sizes:k,width:D,height:H,onImageLoaded:c,...O}){const[w,o]=s.useState(!1),[m,a]=s.useState(r),[l,x]=s.useState(i),[u,h]=s.useState(!1),[V,b]=s.useState(!1),j=s.useRef(null),y=s.useRef(null);s.useEffect(()=>{x(i),h(!1),o(!1),r&&a(!0)},[i,r]),s.useEffect(()=>{var t;(t=y.current)!=null&&t.complete&&(o(!0),c==null||c())},[l,m]),s.useEffect(()=>{if(r){a(!0);return}if(typeof window>"u"||!("IntersectionObserver"in window)){a(!0);return}const t=j.current;if(!t)return;const n=new IntersectionObserver(G=>{const[d]=G;d&&(d.isIntersecting||d.intersectionRatio>0)&&(a(!0),n.unobserve(t),n.disconnect())},{rootMargin:g,threshold:v});return n.observe(t),()=>{t&&n.unobserve(t),n.disconnect()}},[g,v,r]);const _=()=>{u||(h(!0),p&&p!==l&&x(p))},A=t=>{t.stopPropagation(),b(!0),h(!1),o(!1);const n=i.includes("?")?`${i}&retry=${Date.now()}`:`${i}?retry=${Date.now()}`;x(n),setTimeout(()=>b(!1),500)},f=K(l,$,P),F=I||(u?void 0:f.srcSet),T=k||f.sizes,W=D||f.width,q=H||f.height,B=C||(r?"high":"auto");return e.jsxs("div",{ref:j,className:`relative overflow-hidden ${E}`,children:[N&&(!m||!w&&!u)&&e.jsx("div",{className:"absolute inset-0 bg-slate-200 dark:bg-slate-800/90 animate-pulse flex items-center justify-center pointer-events-none z-0",children:e.jsx("div",{className:"flex flex-col items-center gap-1 text-slate-400 dark:text-slate-600",children:e.jsx(Q,{className:"w-6 h-6 opacity-40 animate-pulse"})})}),(m||r)&&e.jsx("img",{ref:y,src:l,srcSet:F,sizes:T,width:W,height:q,alt:R,loading:r?"eager":"lazy",decoding:"async",fetchPriority:B,referrerPolicy:"no-referrer",className:`transition-opacity duration-500 ease-out ${w?"opacity-100":"opacity-0"} ${S}`,onLoad:()=>{o(!0),c==null||c()},onError:_,...O}),u&&e.jsxs("div",{className:"absolute inset-0 bg-slate-900/95 flex flex-col items-center justify-center p-2 text-center text-slate-400 z-10 space-y-1",children:[z&&e.jsx(U,{className:"w-5 h-5 text-amber-500"}),e.jsx("span",{className:"text-[10px] text-slate-400 font-mono",children:"Image unavailable"}),e.jsxs("button",{type:"button",onClick:A,className:"px-2 py-0.5 mt-1 bg-slate-800 hover:bg-slate-700 text-slate-200 rounded text-[9px] font-bold flex items-center gap-1 transition-colors cursor-pointer",children:[e.jsx(J,{className:`w-2.5 h-2.5 ${V?"animate-spin":""}`}),e.jsx("span",{children:"Retry"})]})]})]})}export{L};

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.