4 lines
7.0 KiB
JavaScript
4 lines
7.0 KiB
JavaScript
;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="93356e25-4f71-674c-a8c8-befb59d6f5e0")}catch(e){}}();
|
||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,843325,e=>{"use strict";var t=e.i(452797),i=e.i(907358),a=e.i(663067),r=e.i(910353);let n=(0,e.i(933112).createMotionProxy)();var l=e.i(247237),o=e.i(286091);function s({children:e,features:a,strict:r=!1}){let[,n]=(0,i.useState)(!c(a)),s=(0,i.useRef)(void 0);if(!c(a)){let{renderer:e,...t}=a;s.current=e,(0,o.loadFeatures)(t)}return(0,i.useEffect)(()=>{c(a)&&a().then(({renderer:e,...t})=>{(0,o.loadFeatures)(t),s.current=e,n(!0)})},[]),(0,t.jsx)(l.LazyContext.Provider,{value:{renderer:s.current,strict:r},children:e})}function c(e){return"function"==typeof e}var u=e.i(140802),d=e.i(976819);function f({isOpen:l,images:o,initialIndex:c,onClose:f}){let h=(0,d.useRouter)(),m=(0,d.useSearchParams)(),x=(0,d.usePathname)(),[p,y]=(0,i.useState)(c),[b,v]=(0,i.useState)(!1),g=(0,i.useRef)(null),w=(0,i.useRef)(null);(0,i.useEffect)(()=>(v(!0),()=>v(!1)),[]);let j=(0,i.useCallback)(e=>{let t=new URLSearchParams(m.toString());null!==e?t.set("photo",e.toString()):t.delete("photo"),h.replace(`${x}?${t.toString()}`,{scroll:!1})},[x,h,m]),N=(0,i.useCallback)(()=>{y(e=>{let t=0===e?o.length-1:e-1;return j(t),t})},[o.length,j]),k=(0,i.useCallback)(()=>{y(e=>{let t=e===o.length-1?0:e+1;return j(t),t})},[o.length,j]);(0,i.useEffect)(()=>{let e=m.get("photo");if(null!==e){let t=parseInt(e,10);!isNaN(t)&&t>=0&&t<o.length&&y(t)}},[m,o.length]);let C=(0,i.useCallback)(()=>{j(null),f()},[j,f]);return((0,i.useEffect)(()=>{l&&j(p)},[l,p,j]),(0,i.useEffect)(()=>{if(!l){w.current&&w.current.focus();return}w.current=document.activeElement,setTimeout(()=>g.current?.focus(),100);let e=e=>{if("Escape"===e.key&&C(),"ArrowLeft"===e.key&&N(),"ArrowRight"===e.key&&k(),"Tab"===e.key){let t=Array.from(document.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(e=>document.querySelector('[role="dialog"]')?.contains(e));if(0===t.length)return;let i=t[0],a=t[t.length-1];e.shiftKey?document.activeElement===i&&(a.focus(),e.preventDefault()):document.activeElement===a&&(i.focus(),e.preventDefault())}},t=window.getComputedStyle(document.body).overflow,i=window.getComputedStyle(document.documentElement).overflow;return document.documentElement.style.setProperty("overflow","hidden","important"),document.body.style.setProperty("overflow","hidden","important"),window.addEventListener("keydown",e),()=>{document.documentElement.style.overflow=i,document.body.style.overflow=t,window.removeEventListener("keydown",e)}},[l,N,k,C]),b)?(0,r.createPortal)((0,t.jsx)(s,{strict:!0,features:()=>e.A(215418).then(e=>e.default),children:(0,t.jsx)(u.AnimatePresence,{children:l&&(0,t.jsxs)("div",{className:"fixed inset-0 z-[99999] flex items-center justify-center",role:"dialog","aria-modal":"true",children:[(0,t.jsx)(n.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"absolute inset-0 bg-primary/95 backdrop-blur-xl",onClick:C}),(0,t.jsx)(n.button,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{delay:.1,duration:.4},ref:g,onClick:C,className:"absolute top-6 right-6 text-white/60 hover:text-white transition-all duration-500 z-[10000] rounded-full w-14 h-14 flex items-center justify-center hover:bg-white/5 group border border-white/10","aria-label":"Close lightbox",children:(0,t.jsx)("div",{className:"relative w-full h-full flex items-center justify-center group-hover:rotate-90 transition-transform duration-500",children:(0,t.jsx)("span",{className:"text-3xl font-extralight leading-none mb-1",children:"×"})})}),(0,t.jsx)(n.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{delay:.2,duration:.4},onClick:N,className:"absolute left-6 top-1/2 -translate-y-1/2 text-white/60 hover:text-white transition-all duration-500 w-14 h-14 flex items-center justify-center hover:bg-white/5 rounded-full z-[10000] group border border-white/10","aria-label":"Previous image",children:(0,t.jsx)("span",{className:"text-4xl font-extralight group-hover:-translate-x-1 transition-transform duration-500",children:"‹"})}),(0,t.jsx)(n.button,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{delay:.2,duration:.4},onClick:k,className:"absolute right-6 top-1/2 -translate-y-1/2 text-white/60 hover:text-white transition-all duration-500 w-14 h-14 flex items-center justify-center hover:bg-white/5 rounded-full z-[10000] group border border-white/10","aria-label":"Next image",children:(0,t.jsx)("span",{className:"text-4xl font-extralight group-hover:translate-x-1 transition-transform duration-500",children:"›"})}),(0,t.jsx)(n.div,{initial:{opacity:0,y:40,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.98},transition:{duration:.6,ease:[.25,.46,.45,.94]},className:"relative w-full h-full max-w-6xl max-h-[85vh] flex flex-col items-center justify-center p-4 md:p-12 z-20 pointer-events-none",children:(0,t.jsxs)("div",{className:"pointer-events-auto w-full h-full flex flex-col items-center justify-center",children:[(0,t.jsxs)("div",{className:"relative w-full h-full shadow-[0_40px_100px_-20px_rgba(0,0,0,0.6)] ring-1 ring-white/20 overflow-hidden bg-primary-dark/50 rounded-2xl flex items-center justify-center",children:[(0,t.jsx)(u.AnimatePresence,{mode:"wait",initial:!1,children:(0,t.jsx)(n.div,{initial:{opacity:0,scale:1.1,filter:"blur(10px)"},animate:{opacity:1,scale:1,filter:"blur(0px)"},exit:{opacity:0,scale:.9,filter:"blur(10px)"},transition:{duration:.7,ease:[.25,.46,.45,.94]},className:"relative w-full h-full",children:(0,t.jsx)(a.default,{src:o[p],alt:`Gallery image ${p+1}`,fill:!0,className:"object-cover transition-transform duration-1000 hover:scale-[1.03]",unoptimized:!0})},p)}),(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none opacity-[0.03] bg-[url('/grid.svg')] bg-repeat z-10"}),(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none bg-gradient-to-tr from-white/10 via-transparent to-transparent opacity-40 z-10"})]}),(0,t.jsxs)(n.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{delay:.3,duration:.4},className:"mt-8 flex items-center gap-4",children:[(0,t.jsx)("div",{className:"h-px w-12 bg-white/20"}),(0,t.jsxs)("div",{className:"bg-white/5 backdrop-blur-2xl text-white px-6 py-2 rounded-full border border-white/10 text-[11px] font-bold tracking-[0.2em] uppercase",children:[p+1," ",(0,t.jsx)("span",{className:"text-accent mx-3",children:"/"})," ",o.length]}),(0,t.jsx)("div",{className:"h-px w-12 bg-white/20"})]})]})})]})})}),document.body):null}e.s(["default",()=>f],843325)},888085,e=>{e.n(e.i(843325))},215418,e=>{e.v(t=>Promise.all(["static/chunks/39ab1e7ab650e7f3.js"].map(t=>e.l(t))).then(()=>t(651725)))}]);
|
||
|
||
//# debugId=93356e25-4f71-674c-a8c8-befb59d6f5e0
|