1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{48312:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return r(52843)}])},91133:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(85893),a=r(18654),s=r(25675),i=r.n(s),l=r(67294);function o(e){var t,r,s;let{node:o,className:u,slider:c,imageIndex:f}=e,d=(0,l.useRef)(null),[m,p]=(0,l.useState)(!1),[w,h]=(0,l.useState)(),[x,v]=(0,l.useState)(),j=(null===(s=o.asset)||void 0===s?void 0:null===(r=s.metadata)||void 0===r?void 0:null===(t=r.dimensions)||void 0===t?void 0:t.aspectRatio)||1,g=j<1?"portrait":"landscape",_=(0,a.i)(o.asset).width(2400).auto("format").url();return((0,l.useEffect)(()=>{let e=()=>{let e=window.innerHeight-96-96,t=window.innerWidth;"landscape"===g?h(t*j<e?t:e*j):h(e*j)};return c&&d.current&&(e(),window.addEventListener("resize",e)),()=>window.removeEventListener("resize",e)},[d,c,g,h,j]),_&&(null==o?void 0:o.asset))?c?(0,n.jsxs)("figure",{style:{width:w,height:x},"data-ratio":g,className:u,ref:d,children:[(0,n.jsxs)("div",{className:"swiper-container relative",children:[(0,n.jsx)("div",{className:"relative","data-ratio":o.asset.metadata.dimensions.aspectRatio,style:{width:"100%",paddingBottom:"".concat(100/o.asset.metadata.dimensions.aspectRatio,"%")}}),(0,n.jsx)(i(),{src:_,className:"swiper-image max-w-full max-h-full",priority:f<2,fill:!0,loading:"eager",alt:o.alt,quality:80,sizes:"(min-width: 1024px) 50vw, 100vw",placeholder:"blur",blurDataURL:o.asset.metadata.lqip})]}),(0,n.jsx)("figcaption",{className:"absolute bottom-0 w-full text-center text-xs pt-2 transform translate-y-full",children:o.caption})]}):(0,n.jsx)("figure",{ref:d,"data-ratio":g,className:u,children:(0,n.jsx)(i(),{src:_,className:"max-w-full max-h-full",priority:!0,loading:"eager",alt:o.alt,width:2400,height:2400,sizes:"(min-width: 1024px) 50vw, 100vw"})}):null}},93666:function(e,t,r){"use strict";r.d(t,{i:function(){return a}});var n=r(17206);let a=e=>e?"string"==typeof e?e:Array.isArray(e)?e.map(a).join(" "):"block"===e._type?(0,n.Kv)(e):e.children?e.children.map(a).join(" "):"":""},34364:function(e,t,r){"use strict";r.d(t,{Cd:function(){return u},Sx:function(){return i},gx:function(){return s},hH:function(){return a},tW:function(){return l},wc:function(){return o}});var n=r(34155);let a=!1,s=c("production","Missing environment variable: NEXT_PUBLIC_SANITY_DATASET"),i=c("4meh7tqe","Missing environment variable: NEXT_PUBLIC_SANITY_PROJECT_ID");n.env.SANITY_API_READ_TOKEN;let l=n.env.NEXT_PUBLIC_SANITY_API_VERSION||"2023-06-21",o="preview.secret",u="/api/draft";function c(e,t){if(void 0===e)throw Error(t);return e}},18654:function(e,t,r){"use strict";r.d(t,{i:function(){return l}});var n=r(6803),a=r.n(n),s=r(34364);let i=a()({projectId:s.Sx,dataset:s.gx}),l=e=>i.image(e).auto("format").fit("max")},52843:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return d},default:function(){return m}});var n=r(85893),a=r(41664),s=r.n(a),i=r(67294),l=r(91133),o=function(e){let{work:t,width:r,x:a,y:o,setCaptionText:u}=e,c=(0,i.useRef)();return r?(0,n.jsx)(s(),{ref:c,href:"works/".concat(t.slug),className:"".concat(r," intro-link group"),onMouseOver:()=>{u(t.title)},onMouseOut:()=>{u("")},style:{mixBlendMode:"multiply",transform:"translate3D(".concat(a,"px, ").concat(o,"px, 0)"),cursor:"none"},children:(0,n.jsx)(l.Z,{node:t.mainImage})}):(0,n.jsx)(n.Fragment,{})};function u(e){let{works:t}=e,[r,a]=(0,i.useState)("down"),l=(0,i.useRef)(null),u=(0,i.useRef)(null),c=(0,i.useRef)(null),f=(0,i.useRef)(null),d=(0,i.useRef)(null),m=(0,i.useRef)(null),[p,w]=(0,i.useState)(""),h=(0,i.useRef)(r);h.current=r;let x=(0,i.useRef)(0),v=(0,i.useRef)(!1),[j,g]=(0,i.useState)([]),[_,N]=(0,i.useState)([]),[y,E]=(0,i.useState)([]),[T,S]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=[],r=[],n=[];t.forEach(t=>{let a=t.mainImage.asset.metadata.dimensions.aspectRatio,s=a<1?2:4;e.push("w-".concat(Math.floor(Math.random()*((a<1?6:7)-s)+s),"/12")),r.push(Math.floor(50*Math.random())*(.5>Math.random()?-1:1)),n.push(Math.floor(50*Math.random())*(.5>Math.random()?-1:1))}),g(e),N(r),E(n)},[t]),(0,i.useEffect)(()=>{let e;let t=()=>{if(l.current&&u.current&&c.current&&f.current&&d.current){v.current||(x.current=c.current.offsetTop,v.current=!0);let e="up"===h.current?-.5:.5;x.current+=e,"up"===h.current&&x.current<=0?x.current=f.current.offsetTop:"down"===h.current&&x.current>=d.current.offsetTop&&(x.current=c.current.offsetTop),l.current.style.transform="translateY(-".concat(x.current,"px)")}e=requestAnimationFrame(t)};return e=requestAnimationFrame(t),()=>{cancelAnimationFrame(e)}},[]),(0,i.useEffect)(()=>{let e=l.current;if(!e)return;let t=t=>{t.preventDefault(),t.deltaY>0?a("down"):t.deltaY<0&&a("up"),x.current+=t.deltaY,t.deltaY<0&&x.current<=0?x.current=f.current.offsetTop:t.deltaY>0&&x.current>=d.current.offsetTop&&(x.current=c.current.offsetTop),e.style.transform="translateY(-".concat(x.current,"px)")};return e.addEventListener("wheel",t,{passive:!1}),()=>{e.removeEventListener("wheel",t)}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"bg-white fixed top-0 left-0 w-screen h-screen overflow-hidden",style:{zIndex:90},onMouseMove:e=>{let t=m.current;if(!t)return;let{width:r,height:n}=t.getBoundingClientRect(),a=e.clientX-r/2,s=e.clientY-n/2;t.style.left="".concat(a,"px"),t.style.top="".concat(s,"px"),S(!0)},children:[(0,n.jsx)(s(),{href:"/overview",className:"fixed -translate-x-1/2 left-1/2 primary--button top-0 transform z-50 w-auto",children:"Soft Baroque"}),(0,n.jsx)("div",{className:"hidden w-1/12 w-2/12 w-3/12 w-4/12 w-5/12 w-6/12 w-7/12 w-8/12 w-9/12 w-10/12 w-11/12 w-full"}),(0,n.jsx)("div",{className:"absolute pointer-events-none z-50",ref:m,children:T?p:""}),(0,n.jsxs)("div",{ref:l,className:"relative w-full",style:{transition:"transform 0ms linear",willChange:"transform"},children:[(0,n.jsx)("div",{ref:u,className:"flex flex-wrap justify-center items-center w-full",children:t.map((e,t)=>(0,n.jsx)(o,{width:j[t],work:e,x:_[t],y:y[t],setCaptionText:w},"".concat(e._id,"-1")))}),(0,n.jsx)("div",{ref:c,className:"flex flex-wrap justify-center items-center w-full",children:t.map((e,t)=>(0,n.jsx)(o,{width:j[t],work:e,x:_[t],y:y[t],setCaptionText:w},"".concat(e._id,"-2")))}),(0,n.jsx)("div",{ref:f,className:"flex flex-wrap justify-center items-center w-full",children:t.map((e,t)=>(0,n.jsx)(o,{width:j[t],work:e,x:_[t],y:y[t],setCaptionText:w},"".concat(e._id,"-3")))}),(0,n.jsx)("div",{ref:d,className:"flex flex-wrap justify-center items-center w-full",children:t.map((e,t)=>(0,n.jsx)(o,{width:j[t],work:e,x:_[t],y:y[t],setCaptionText:w},"".concat(e._id,"-4")))})]})]})})}
1var c=r(93666),f=r(2962),d=!0;function m(e){var t;let{content:r,settings:a,draftMode:s}=e,[l,o]=(0,i.useState)([]);return((0,i.useEffect)(()=>{o(function(e){let t=e.slice();for(let e=t.length-1;e>0;e--){let r=Math.floor(Math.random()*(e+1));[t[e],t[r]]=[t[r],t[e]]}return t}(r.works))},[r.works]),l)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.PB,{title:"Home",description:(0,c.i)((null==a?void 0:a.description)||""),openGraph:{title:"Home",description:(0,c.i)((null==a?void 0:a.description)||""),images:[{url:(null==a?void 0:null===(t=a.ogImage)||void 0===t?void 0:t.url)||"",alt:(null==a?void 0:a.title)||"Soft Baroque"}]},canonical:"https://softbaroque.com"}),(0,n.jsx)(u,{works:r.works})]}):(0,n.jsx)(n.Fragment,{})}}},function(e){e.O(0,[753,86,774,888,179],function(){return e(e.s=48312)}),_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.