import{j as l,a4 as t,au as p,N as d,D as n,aa as u,o as f,ac as g}from"./index-CNZMR1GT.js";import{I as w}from"./ImageWithError-BqB24ruv.js";import{O as c}from"./icon-BZFY9fuK.js";import"./index-DsSWFirV.js";import"./Layout-CjSD56n-.js";import"./useTitle-BClow7LS.js";import"./FolderTree-CTh3_qOS.js";import"./index-B-NmelxC.js";import"./index-DvQYEsdd.js";import"./share-BRMiJJnc.js";import"./index-DUl6hczb.js";const _=()=>{const m=f(),{replace:a}=l();let e=t.objs.filter(r=>r.type===c.IMAGE);e.length===0&&(e=[t.obj]);const i=r=>{const o=e.findIndex(s=>s.name===t.obj.name);r.key==="ArrowLeft"&&o>0?a(e[o-1].name):r.key==="ArrowRight"&&o<e.length-1&&a(e[o+1].name)};return p(()=>{window.addEventListener("keydown",i)}),d(()=>{window.removeEventListener("keydown",i)}),n(w,{maxH:"75vh",rounded:"$lg",get src(){return t.raw_url},get fallback(){return n(g,{})},get fallbackErr(){return n(u,{get msg(){return m("home.preview.failed_load_img")}})}})};export{_ as default};
