1import{l as e,g as t,h as a,n as s,c as i,k as o,o as l,a as n,E as c,j as p,p as r}from"./_3jIQlEh.js";const m=["srcset","sizes"],u=["srcset","sizes"],g=["src","width","height","alt","title","loading"],d={__name:"Image",props:{item:{type:Object,required:!0},lazy:{type:Boolean,default:!0},eag:{type:Boolean,default:!1},aspect:{type:Boolean,default:!0},customAspect:{type:Number,default:null},contain:{type:Boolean,default:!1},clamp:{type:Boolean,default:!1},background:{type:Boolean,default:!0},transition:{type:Boolean,default:!0}},setup(d){const y=d,v=e(!1),f=e(null),b=e(null),I=t((()=>[y.contain?"media-contain":"media-fill",y.lazy&&"lazy",y.aspect?"relative w-full":"absolute inset-0"])),h=t((()=>y.customAspect||1/y.item.responsiveImage.aspectRatio*100)),k=t((()=>({objectFit:y.contain?"contain":"cover",objectPosition:y.item.focalPoint?`${100*y.item.focalPoint.x}% ${100*y.item.focalPoint.y}%`:"center"})));return a((async()=>{await s(),b.value&&(b.value.complete?v.value=!0:b.value.onload=()=>v.value=!0)})),(e,t)=>d.item?(l(),i("figure",{key:0,class:r([p(I),"overflow-hidden"])},[d.aspect&&!d.customAspect?(l(),i("div",{key:0,style:c(`padding-top: ${p(h)}%;`)},null,4)):o("",!0),d.aspect&&d.customAspect?(l(),i("div",{key:1,style:c(`padding-top: ${d.customAspect}%`)},null,4)):o("",!0),d.background?(l(),i("div",{key:2,class:"absolute inset-0 opacity-50",style:c(`background-color: ${d.item.responsiveImage.bgColor};`)},null,4)):o("",!0),n("picture",{ref_key:"picture",ref:f,class:"absolute inset-0"},[n("source",{srcset:d.item.responsiveImage.webpSrcSet,sizes:d.item.responsiveImage.sizes,type:"image/webp"},null,8,m),n("source",{srcset:d.item.responsiveImage.srcSet,sizes:d.item.responsiveImage.sizes,type:"image/jpeg"},null,8,u),n("img",{ref_key:"image",ref:b,src:d.item.responsiveImage.src,width:d.item.responsiveImage.width,height:d.item.responsiveImage.height,alt:d.item.responsiveImage.alt,title:d.item.responsiveImage.title,style:c(p(k)),class:r([d.transition&&"transition-opacity duration-500 ease-out",p(v)?"opacity-100":"opacity-0"]),loading:d.eag?"eager":"lazy",decoding:"async",draggable:"false"},null,14,g)],512)],2)):o("",!0)}};export{d as _};
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.