1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{7066:function(e,t,n){Promise.resolve().then(n.bind(n,1356))},1356:function(e,t,n){"use strict";n.d(t,{default:function(){return m}});var l=n(7437),i=n(4839),r=n(9582),s=n(6648),o=n(7138),c=n(6463),a=n(2265),u=n(9675),d=n(2905),f=n(7359);function m(e){let{projects:t}=e;(0,c.useRouter)();let[n,r]=a.useState(0);return(0,a.useEffect)(()=>(document.documentElement.classList.add("dark-mode"),()=>document.documentElement.classList.remove("dark-mode")),[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"pointer-events-none fixed inset-0",children:t.map((e,t)=>{var r,o;return(0,l.jsx)("div",{className:(0,i.W)("absolute inset-0 h-full w-full",n===t?"opacity-100":"opacity-0"),children:(null==e?void 0:null===(o=e.preview)||void 0===o?void 0:null===(r=o.asset)||void 0===r?void 0:r.video)?(0,l.jsx)(u.n,{poster:e.poster.webm,data:e.preview.asset.video,playing:n===t,className:"absolute inset-0 h-full w-full object-cover"}):(0,l.jsx)(s.default,{src:e.poster.src,width:e.poster.width,height:e.poster.height,alt:e.poster.alt||e.title,className:"absolute inset-0 h-full w-full object-cover"})},t)})}),(0,l.jsx)(f.pi,{root:!1,options:{wheelMultiplier:.5,infinite:!0,syncTouch:!0},className:"no-scrollbar fixed inset-0 overflow-x-hidden overflow-y-scroll",children:(0,l.jsx)("div",{className:"relative flex items-center justify-center",children:(0,l.jsx)("div",{className:"w-[32rem]",children:(0,l.jsx)(p,{projects:t,current:n,setCurrent:r})})})}),(0,l.jsx)("div",{className:"pointer-events-none absolute bottom-[1.2rem] left-0 right-0 hidden items-center justify-center lg:flex",children:(0,l.jsxs)("span",{className:"type-default",children:[n+1," / ",t.length]})})]})}let p=e=>{let{projects:t,current:n,setCurrent:i,repeat:s=!0}=e,o=(0,a.useRef)(),c=(0,a.useRef)(!1),{width:u,height:m}=(0,d.i)(),[p,v]=(0,a.useState)([]),x=(0,f.LZ)(e=>{let{scroll:t}=e;p.forEach(e=>{let l=.5*e.bounds.height,s=e.bounds.top+l-t,o=.5*m-l,c=.5*m+l,a=s<=c&&s>=o,u=r.p8.utils.clamp(0,1,r.p8.utils.mapRange(.25*m,o,0,1,s)),d=r.p8.utils.clamp(0,1,r.p8.utils.mapRange(c,.75*m,1,0,s)),f=s>=.5*m?d:u;a&&n!==e.index&&i(e.index),e.el.style.opacity=f})},[n,m]);(0,a.useEffect)(function(){var e,t;let n=(null==x?void 0:x.actualScroll)||0;v(Array.from(null==o?void 0:null===(t=o.current)||void 0===t?void 0:null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,".css-item")).map(e=>{let t=e.getBoundingClientRect(),l=parseInt(e.dataset.index);return{el:e,index:l,bounds:{top:t.top+n,left:t.left,right:t.right,bottom:t.bottom+n,width:t.width,height:t.height}}}))},[x,u,m]);let y=(0,a.useRef)(),w=(0,a.useRef)(),g=(0,a.useCallback)(()=>{w.current=setInterval(()=>{if(c.current){clearInterval(w.current);return}null==x||x.scrollTo((null==x?void 0:x.actualScroll)+3)},15)},[x]),j=(0,a.useCallback)(()=>{clearInterval(w.current),clearTimeout(y.current),c.current=!0,y.current=setTimeout(()=>{c.current=!1,g()},7e3)},[g]);return(0,a.useEffect)(function(){return null==x||x.virtualScroll.on("scroll",j),g(),()=>{clearInterval(w.current),clearTimeout(y.current)}},[g,p,x,j]),(0,l.jsxs)("div",{ref:o,className:"list flex h-[200vh] flex-col items-center justify-between",children:[(s?[0,1]:[0]).map((e,i)=>t.map((e,t)=>(0,l.jsx)(h,{item:e,current:n,index:t,...e},"item-".concat(i,"-").concat(t)))),(0,l.jsx)("div",{})]})},h=e=>{let{item:t,current:n,index:r,className:s=""}=e,a=(0,c.useRouter)();return(0,l.jsx)("div",{"data-index":r,className:(0,i.W)("css-item relative flex flex-row items-center gap-[24rem] opacity-0",s),children:(0,l.jsxs)("div",{className:(0,i.W)("flex flex-col text-center",n===r?"opacity-100":"opacity-50"),children:[t.category&&(0,l.jsx)("div",{children:(0,l.jsx)(o.default,{href:"/category/".concat(t.category.slug),className:"type-link",scroll:!1,children:t.category.title})}),(0,l.jsx)("button",{onClick:()=>{a.push("/project/".concat(t.slug))},className:(0,i.W)("type-label mb-[0.5rem] mt-[0.9rem] uppercase",n===r&&"underline decoration-[0.5px] underline-offset-2"),children:t.title}),t.director&&(0,l.jsxs)("p",{children:[(0,l.jsx)("span",{className:"opacity-90",children:"Directed by"})," ",(0,l.jsx)(o.default,{href:"/director/".concat(t.director.slug),scroll:!1,className:"opacity-90 transition-opacity duration-300 hover:opacity-100",children:t.director.title})]})]})})}},9675:function(e,t,n){"use strict";n.d(t,{n:function(){return s}});
1var l=n(7437),i=n(2265),r=n(7329);let s=(0,i.forwardRef)((e,t)=>{let{playing:n=!1,muted:s=!0,loop:o=!0,poster:c,data:a,className:u="",style:d={},...f}=e,m=(0,i.useRef)();return(0,i.useImperativeHandle)(t,()=>({player:m.current})),(0,l.jsx)(r.Y,{ref:m,poster:c,data:a,loading:"viewport",loop:o,title:null,muted:s,autoPlay:n,paused:!n,defaultHiddenCaptions:!0,className:u,style:{"--controls":"none","--dialog":"none","--loading-indicator":"none","--media-object-fit":"cover",...d},...f})});s.displayName="Video"},2905:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});var l=n(2265),i=n(9679);function r(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,[r,s]=(0,l.useState)(null===(e=window)||void 0===e?void 0:e.innerWidth),[o,c]=(0,l.useState)(null===(t=window)||void 0===t?void 0:t.innerHeight);return(0,l.useEffect)(()=>{let e=(0,i.Z)(()=>{s(Math.min(window.innerWidth,document.documentElement.clientWidth)),c(Math.min(window.innerHeight,document.documentElement.clientHeight))},n,!0);return window.addEventListener("resize",e,!1),e(),()=>window.removeEventListener("resize",e,!1)},[n]),{width:r,height:o}}},9679:function(e,t,n){"use strict";function l(e,t,n){let l=null,i=null,r=function(){l&&(clearTimeout(l),i=null,l=null)},s=function(){if(!t)return e.apply(this,arguments);let s=arguments,o=n&&!l;if(r(),i=()=>{e.apply(this,s)},l=setTimeout(function(){if(l=null,!o){let e=i;return i=null,e()}},t),o)return i()};return s.cancel=r,s.flush=function(){let e=i;r(),e&&e()},s}n.d(t,{Z:function(){return l}})}},function(e){e.O(0,[922,38,648,631,582,971,23,744],function(){return e(e.s=7066)}),_N_E=e.O()}]);
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.