1import{bS as P,bE as S,bT as C,bU as I,bV as L,e as N,bW as $}from"#entry";import{D as M,aB as O,E as a,m as T,x as U,$ as u,L as l,W as V,aA as W,a7 as j,C as b,ac as D}from"./BZS6mqMC.js";const H=["type","sizes","srcset"],q=["src","sizes","srcset"],Q=M({__name:"NuxtPicture",props:P,emits:["load","error"],setup(y,{emit:_}){const s=y,v=O(),n=_,x=!1,o=S(),{attrs:z,options:A,modifiers:h}=C(s),d=a(()=>I(s.src)),E=a(()=>["png","webp","gif","svg"].includes(d.value)),i=a(()=>s.legacyFormat?s.legacyFormat:E.value?"png":"jpeg"),p=a(()=>{var g,t;const e=((g=s.format)==null?void 0:g.split(","))||(d.value==="svg"?["svg"]:(t=o.options.format)!=null&&t.length?[...o.options.format]:["webp"]);return e[0]==="svg"?[{src:s.src}]:(e.includes(i.value)&&e.splice(e.indexOf(i.value),1),e.push(i.value),e.map(f=>{const{srcset:F,sizes:w,src:B}=o.getSizes(s.src,{...A.value,sizes:s.sizes||o.options.screens,densities:s.densities,modifiers:{...h.value,format:f}});return{src:B,type:`image/${f}`,sizes:w,srcset:F}}))}),c=a(()=>p.value[p.value.length-1]),m={...s.imgAttrs,"data-nuxt-pic":""};for(const e in v)e in L&&!(e in m)&&(m[e]=v[e]);const r=T(),k=N().isHydrating;return U(()=>{r.value&&(r.value.complete&&k&&(r.value.getAttribute("data-error")?n("error",new Event("error")):n("load",new Event("load"))),r.value.onload=e=>{n("load",e)},r.value.onerror=e=>{n("error",e)},$("nuxt-picture"))}),(e,g)=>(u(),l("picture",null,[(u(!0),l(V,null,W(p.value.slice(0,-1),t=>(u(),l("source",{key:t.src,type:t.type,sizes:t.sizes,srcset:t.srcset},null,8,H))),128)),c.value?(u(),l("img",j({key:0,ref_key:"imgEl",ref:r},{...b(z),...b(x)?{onerror:"this.setAttribute('data-error', 1)"}:{},...m},{src:c.value.src,sizes:c.value.sizes,srcset:c.value.srcset}),null,16,q)):D("",!0)]))}});export{Q 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.