PageSourceSearch

https://tesana.com/assets/ImagePreview-DlhLxFM_.js

js tesana.com collected 2026-10-09 22:41:32 UTC 2,927 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-motion-hRg_q8lq.js";import{r as t}from"./vendor-react-E98sgxjj.js";import{du as n}from"./vendor-fa-Bn2dnpnC.js";import{u as f}from"./index-BKzE8EQ8.js";import"./vendor-query-bOUN_gKe.js";function v({asset:s}){const{t:o}=f("studio"),[l,a]=t.useState(1),[d,i]=t.useState(!1),c=t.useRef(null),u=t.useCallback(r=>{r.preventDefault(),a(x=>Math.min(5,Math.max(.25,x-r.deltaY*.001)))},[]),m=t.useCallback(()=>a(1),[]);return d?e.jsx("div",{className:"w-full h-full flex items-center justify-center bg-card",children:e.jsxs("div",{className:"flex flex-col items-center gap-3 text-center px-6",children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-destructive/15 border border-destructive/30 flex items-center justify-center text-destructive",children:e.jsx(n,{icon:["far","circle-exclamation"],className:"text-xl"})}),e.jsx("p",{className:"text-sm text-foreground",children:o("assetViewer.failedToLoadImage")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.url})]})}):e.jsxs("div",{className:"relative w-full h-full bg-card overflow-hidden",children:[e.jsx("div",{ref:c,className:"w-full h-full flex items-center justify-center overflow-auto scrollbar-hidden",onWheel:u,children:e.jsx("img",{src:s.url,alt:s.name,className:"max-w-full max-h-full object-contain transition-transform duration-100",style:{transform:`scale(${l})`},onError:()=>i(!0),draggable:!1})}),e.jsx("div",{className:"absolute top-4 left-4 z-10",children:e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-md bg-background/95 border border-border",children:[e.jsx("span",{className:"text-xs text-cyan-600 uppercase font-medium tracking-wide",children:o("assetViewer.imageBadge")}),e.jsx("span",{className:"text-sm text-foreground",children:s.name})]})}),e.jsxs("div",{className:"absolute bottom-4 right-4 z-10 flex items-center gap-1",children:[e.jsx("button",{onClick:()=>a(r=>Math.max(.25,r-.25)),className:"w-8 h-8 rounded-md bg-background/95 hover:bg-foreground
1/10 border border-border text-muted-foreground hover:text-foreground flex items-center justify-center transition-colors","aria-label":o("assetViewer.zoomOut",{defaultValue:"Zoom out"}),children:e.jsx(n,{icon:["far","magnifying-glass-minus"],className:"text-xs"})}),e.jsxs("button",{onClick:m,className:"h-8 px-2 rounded-md bg-background/95 hover:bg-foreground/10 border border-border text-muted-foreground hover:text-foreground text-xs flex items-center justify-center transition-colors",children:[Math.round(l*100),"%"]}),e.jsx("button",{onClick:()=>a(r=>Math.min(5,r+.25)),className:"w-8 h-8 rounded-md bg-background/95 hover:bg-foreground/10 border border-border text-muted-foreground hover:text-foreground flex items-center justify-center transition-colors","aria-label":o("assetViewer.zoomIn",{defaultValue:"Zoom in"}),children:e.jsx(n,{icon:["far","magnifying-glass-plus"],className:"text-xs"})})]})]})}export{v as default};

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.