1import{_ as I,X as k,r as n,A as S,o as w,V as x,H as B,j as d,B as z,d as L,e as P,g as l,Y as p,Z as v,f as N,$ as V,h as $,C}from"./BykImpXR.js";const E={key:0},q=["xlink:href"],M={class:"placeholder"},O={__name:"ImageItem",props:{imageSrc:{type:String,required:!0},labelType:{type:String,required:!0},isPublicSrc:{type:Boolean,default:!1},imagePath:{type:String,default:"carousel"},lazyLoad:{type:Boolean,default:!0}},setup(o){const f=k(),e=o,c=n(!1),i=n(!1),t=n(null),s=n(null);e.lazyLoad||(s.value=e.imagePath==="carousel"?`https://image.pkgames.org/carousel/${e.imageSrc}.webp`:`https://image.pkgames.org/gameIcon/${e.imageSrc}.webp`);const u=S(()=>({hot:"#hot-label",new:"#new-label",top:"#toprated-label",update:"#updated-label"})[e.labelType]||""),h=()=>{if(!t.value||!(t.value instanceof Element)){console.error("Invalid element for IntersectionObserver:",t.value);return}const a=new IntersectionObserver(r=>{r[0].isIntersecting&&(c.value=!0,s.value=e.imagePath==="carousel"?`https://image.pkgames.org/carousel/${e.imageSrc}.webp`:`https://image.pkgames.org/gameIcon/${e.imageSrc}.webp`,a.unobserve(t.value))});a.observe(t.value)},m=a=>{if(!a||a.length===0)return"";let r=a.replace(/-/g," ");return r==="blocky puzzle"&&(r="Blocky Blast!"),r},b=()=>{i.value=!0},y=()=>{};return w(()=>{e.lazyLoad&&h()}),x(()=>{t.value&&new IntersectionObserver(()=>{}).disconnect()}),(a,r)=>{const g=V,_=C;return d(),B(_,{to:$(f)({name:"detail-gameId",params:{gameId:o.imageSrc}}),class:"image-container",title:m(o.imageSrc)},{default:z(()=>[u.value&&c.value?(d(),L("svg",E,[l("use",{"xlink:href":u.value},null,8,q)])):P("",!0),l("div",{class:"image-item",ref_key:"imageContainer",ref:t},[p(l("div",M,null,512),[[v,!i.value]]),p(N(g,{src:s.value,alt:m(o.imageSrc),loading:o.lazyLoad?"lazy":"eager",fetchPriority:o.lazyLoad?"auto":"high",class:"item-image",onLoad:b,onError:y,quality:"80",sizes:"sm:100vw md:50vw lg:400px"},null,8,["src","alt","loading","fetchPriority"]),[[v,s.value]])],512)]),_:1},8,["to","title"])}}},T=I(O,[["__scopeId","data-v-239178d4"]]);export{T as I};
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.