PageSourceSearch

https://www.roastar.com/_nuxt/CH5njUTC.js

js roastar.com collected 2026-09-26 02:59:04 UTC 3,208 bytes, 2 lines download raw bytes

1import{_ as k}from"./DUudcvDl.js";import{_ as B}from"./D8N2DAGO.js";import{m as C,aA as I,N as S,o as M,C as m,P as f,a0 as w,a9 as v,a6 as N,T as A,G as E,_ as T,$ as q,j as x,p as o}from"./DUCOj2lJ.js";import{x as L}from"./zRKRMFEZ.js";const U={class:"relative overflow-hidden"},O={key:0},P=["srcset","sizes","media"],V={class:"absolute inset-0 flex items-center justify-center bg-white transition-all"},D=["src","alt"],G=C({__name:"StoryblokImage",props:{src:{},alt:{default:""},sizes:{default:"120px"},quality:{default:90},preload:{type:Boolean,default:!1},imageWidth:{},imageHeight:{},prioritizeHeight:{type:Boolean}},setup(i){const e=i,_=I(),u=x(!1),p=x(!1);let n=null;const y=o(()=>{var a;return((a=_.class)==null?void 0:a.split(" ").includes("object-cover"))??!1}),l=o(()=>{if(!e.sizes)return[];const a=/(\d+)(?=px)/g,t=[...e.sizes.matchAll(a)].map(s=>Number(s[1]));return t.length===0?[]:(t[0]>200&&t.unshift(200),t)}),d=o(()=>l.value.length?Math.max(...l.value):1024),W=o(()=>l.value.length?Math.min(...l.value):0),c=o(()=>!!(e.prioritizeHeight&&e.imageHeight)),b=o(()=>c.value?void 0:e.imageWidth||d.value),z=o(()=>c.value?e.imageHeight:e.imageHeight||$.value),$=o(()=>e.imageHeight?e.imageHeight:e.imageWidth?Math.round(e.imageWidth*.5625):600),r=({width:a=0,height:t=0,format:s="webp"})=>`${e.src}/m/fit-in/${a}x${t}/filters:format(${s}):quality(${e.quality})`,j=o(()=>{if(c.value&&e.imageHeight)return[`${r({width:0,height:e.imageHeight})} 1x`,`${r({width:0,height:e.imageHeight*2})} 2x`].join(", ");const a=new Set;return l.value.forEach(t=>a.add(t)),l.value.forEach(t=>a.add(t*2)),Array.from(a).sort((t,s)=>t-s).map(t=>{const s=e.imageHeight&&!e.imageWidth?0:t,g=e.imageHeight?e.imageHeight*(t/(e.imageWidth||d.value)):0;return`${r({width:s,height:Math.round(g)})} ${t}w`}).join(", ")}),H=o(()=>{if(c.value&&e.imageHeight)return r({width:0,height:e.imageHeight});const a=e.imageHeight&&!e.imageWidth?0:d.value;return r({width:a,height:e.imageHeight||0})}),h=()=>{u.value=!0};return S(()=>{setTimeout(()=>{u.value||(p.value=!0)},300),n=new Image,n.src=H.value,n.complete?h():(n.onload=h,n.onerror=h)}),M(()=>{n&&(n.onload=null,n.onerror=null)}),(a,t)=>{const s=k,g=B;return m(),f("div",U,[e.src.endsWith(".svg")?(m(),f("img",{key:1,src:i.src,alt:i.alt,class:"h-full w-full object-contain",width:"150",height:"50"},null,8,D)):(m(),f("picture",O,[w("source",{srcset:j.value,sizes:e.sizes,media:`(min-width: ${W.value}px)`},null,8,P),v(s,{src:H.value,fetchpriority:i.preload?"high":void 0,loading:i.preload?"eager":"lazy",decoding:i.preload?"sync":"async",provider:"storyblok",format:"webp",alt:e.alt,class:N([i.imageHeight&&!i.imageWidth?"h-full w-auto":"",i.imageWidth&&!i.imageHeight?"h-auto w-full":"",!i.imageHeight&&!i.imageWidth?"h-full w-full":"",y.value?"object-cover":"object-contain"]),width:b.value,height:z.value,onLoad:h,onError:h},null,8,["src","fetchpriority","loading","decoding","alt","class","width","height"]),v(A,{name:"fade"},{default:E(()=>[T(w("div",V,[v(g,{class:"text-3xl"})],512),[[q,!u.value&&!i.preload&&p.value]])]),_:1})]))])}}}),Q=Object.assign(L(G,[["__scopeId","data-v-ae1cd288"]]),{__name:"StoryblokImage"});export{Q as _};
2//# sourceMappingURL=CH5njUTC.js.map

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.