module.exports=[52495,a=>{"use strict";let b=(0,a.i(70106).default)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);a.s(["ExternalLink",0,b],52495)},18636,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(52495),e=a.i(4720),f=a.i(96221),g=a.i(70106);let h=(0,g.default)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),i=(0,g.default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var j=a.i(33508),k=a.i(68114);a.s(["SecureImageViewer",0,function({src:a,alt:g,mimeType:l="image/jpeg",className:m,imageClassName:n="h-full w-full object-cover"}){let[o,p]=(0,c.useState)(!1),[q,r]=(0,c.useState)(!0),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(1),w=(l??"").startsWith("image/");return((0,c.useEffect)(()=>{if(!o)return;let a=document.body.style.overflow;document.body.style.overflow="hidden";let b=a=>{"Escape"===a.key&&p(!1)};return window.addEventListener("keydown",b),()=>{document.body.style.overflow=a,window.removeEventListener("keydown",b)}},[o]),w)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{p(!0),r(!0),t(!1),v(1)},className:(0,k.cn)("relative block overflow-hidden bg-[var(--surface-muted)]",m),"aria-label":`عرض ${g} بحجم كبير`,children:[(0,b.jsx)("img",{src:a,alt:g,className:n}),(0,b.jsx)("span",{className:"absolute inset-x-0 bottom-0 bg-black/65 px-3 py-2 text-xs font-bold text-white",children:"عرض الصورة"})]}),o?(0,b.jsx)("div",{className:"fixed inset-0 z-50 grid overflow-y-auto bg-black/80 p-3 sm:p-6",role:"dialog","aria-modal":"true","aria-label":g,onMouseDown:a=>{a.target===a.currentTarget&&p(!1)},children:(0,b.jsxs)("div",{className:"mx-auto flex h-full max-h-[calc(100dvh-1.5rem)] w-full min-w-0 max-w-6xl flex-col overflow-hidden rounded-md bg-white sm:max-h-[calc(100dvh-3rem)]",children:[(0,b.jsxs)("div",{className:"flex min-h-14 min-w-0 items-center justify-between gap-2 border-b px-2 sm:gap-3 sm:px-4",children:[(0,b.jsx)("p",{className:"min-w-0 truncate text-sm font-black",children:g}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,b.jsx)("button",{type:"button",onClick:()=>v(a=>Math.max(1,a-.25)),className:"grid size-10 shrink-0 place-items-center rounded-md hover:bg-[var(--surface-muted)]",title:"تصغير","aria-label":"تصغير الصورة",children:(0,b.jsx)(h,{size:18,"aria-hidden":!0})}),(0,b.jsx)("button",{type:"button",onClick:()=>v(a=>Math.min(4,a+.25)),className:"grid size-10 shrink-0 place-items-center rounded-md hover:bg-[var(--surface-muted)]",title:"تكبير","aria-label":"تكبير الصورة",children:(0,b.jsx)(i,{size:18,"aria-hidden":!0})}),(0,b.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",className:"grid size-10 shrink-0 place-items-center rounded-md hover:bg-[var(--surface-muted)]",title:"فتح بالحجم الأصلي","aria-label":"فتح الصورة بالحجم الأصلي",children:(0,b.jsx)(d.ExternalLink,{size:18,"aria-hidden":!0})}),(0,b.jsx)("button",{type:"button",onClick:()=>p(!1),className:"grid size-10 shrink-0 place-items-center rounded-md hover:bg-[var(--surface-muted)]",title:"إغلاق","aria-label":"إغلاق عارض الصورة",children:(0,b.jsx)(j.X,{size:20,"aria-hidden":!0})})]})]}),(0,b.jsxs)("div",{className:"relative min-h-0 flex-1 overflow-auto bg-[#111815] touch-pan-x touch-pan-y",children:[q?(0,b.jsx)("div",{className:"absolute inset-0 z-10 grid place-items-center text-white",children:(0,b.jsxs)("div",{className:"grid justify-items-center gap-3 text-sm font-bold",children:[(0,b.jsx)(f.Loader2,{size:28,className:"animate-spin","aria-hidden":!0}),"جارٍ تحميل الصورة..."]})}):null,s?(0,b.jsx)("div",{className:"absolute inset-0 z-10 grid place-items-center p-5 text-center text-sm font-bold text-white",children:"تعذر تحميل الصورة. تحقق من الاتصال والصلاحيات ثم أعد المحاولة."}):null,(0,b.jsx)("img",{src:a,alt:g,onLoad:()=>r(!1),onError:()=>{r(!1),t(!0)},className:"mx-auto block max-w-none origin-top object-contain transition-transform",style:{transform:`scale(${u})`,width:1===u?"100%":"auto",minHeight:"100%"}})]})]})}):null]}):(0,b.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",className:(0,k.cn)("grid place-items-center bg-[var(--surface-muted)] text-[var(--primary)]",m),title:"فتح الملف",children:(0,b.jsx)(e.FileText,{size:30,"aria-hidden":!0})})}],18636)}];

//# sourceMappingURL=_0pxjmka._.js.map