(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[495],{6105:function(e,t,a){Promise.resolve().then(a.bind(a,9605)),Promise.resolve().then(a.bind(a,4899)),Promise.resolve().then(a.bind(a,8764)),Promise.resolve().then(a.bind(a,511)),Promise.resolve().then(a.bind(a,6844)),Promise.resolve().then(a.t.bind(a,231,23))},4899:function(e,t,a){"use strict";a.d(t,{default:function(){return o}});var l=a(7437);a(1984);var s=a(7138),r=a(4593),n=a(8764),i=a(3415),c=a(1802),d=e=>{let{data:t,idx:a,lang:d}=e;return(0,l.jsx)("div",{className:"card-exhibition-upcoming cursor-pointer relative",children:(0,l.jsxs)(s.default,{href:"/".concat(d,"/exhibition/").concat(t.slug),children:[(0,l.jsx)("div",{className:"aspect-[16/9] object-contain overflow-hidden relative w-full",children:t.coverImage&&(0,l.jsx)(n.default,{src:t.coverImage,alt:"exhibition",className:"absolute object-cover inset-0 h-full w-full",priority:0==a})}),(0,l.jsxs)("section",{className:"bottom-0 glass-white grid grid-cols-1 md:grid-cols-3 gap-y-2 md:gap-y-1 md:gap-4 py-4 w-full",children:[(0,l.jsx)("div",{className:"col-span-2 flex",children:(0,l.jsxs)("div",{className:"flex flex-wrap gap-x-[1rem]",children:[(0,l.jsx)("p",{className:"font-bold",children:"| EXHIBITION |"}),(0,l.jsx)(c.default,{data:t.dates})]})}),(0,l.jsx)("div",{className:"col-span-1 flex md:justify-end order-last md:order-[unset]",children:t.dates&&(0,l.jsx)(r.Z,{data:t.dates,lang:d})}),(0,l.jsx)("div",{className:"col-span-2",children:(0,l.jsx)("h1",{className:"italic text-head-02 md:text-head-01",children:t.title})}),(0,l.jsx)("h2",{className:"col-span-2 text-p md:text-head-02",children:t.artistList&&(0,l.jsx)(i.Z,{data:t.artistList,lang:d})})]})]})})},o=e=>{let{data:t,lang:a}=e;return(0,l.jsx)(l.Fragment,{children:t[0]&&(0,l.jsx)("div",{className:"keen-slider fader",children:(0,l.jsx)("div",{className:"keen-slider__slide fader__slide",children:(0,l.jsx)(d,{data:t[0],idx:t[0].idx,lang:a})},t[0].idx)})})}},9605:function(e,t,a){"use strict";a.d(t,{default:function(){return m}});var l=a(7437),s=a(2265),r=a(5199);a(1984);var n=a(7138),i=a(4593),c=a(8764),d=a(3415),o=a(1802),u=e=>{let{data:t,lang:a}=e;return(0,l.jsx)("div",{className:"card-exhibition cursor-pointer relative",children:(0,l.jsxs)(n.default,{href:"/".concat(a,"/exhibition/").concat(t.slug),children:[(0,l.jsx)("div",{className:"aspect-[3/2] object-cover overflow-hidden relative w-full",children:t.coverImage&&(0,l.jsx)(c.default,{src:t.coverImage,alt:"exhibition",className:"absolute object-cover inset-0 h-full w-full"})}),(0,l.jsxs)("section",{className:"md:absolute bottom-0 glass-white grid grid-cols-1 md:grid-cols-3 gap-y-2 md:gap-y-1 md:gap-4 py-4 md:px-4 w-full",children:[(0,l.jsx)("div",{className:"col-span-2 flex",children:(0,l.jsxs)("div",{className:"flex flex-wrap gap-x-[1rem]",children:[(0,l.jsx)("p",{className:"font-bold",children:"| EXHIBITION |"}),(0,l.jsx)(o.default,{data:t.dates})]})}),(0,l.jsxs)("div",{className:"col-span-1 flex md:justify-end order-last md:order-[unset]",children:[t.dates&&(0,l.jsx)(i.Z,{data:t.dates,lang:a}),(0,l.jsx)("div",{className:"",children:t.period})]}),(0,l.jsx)("div",{className:"col-span-2",children:(0,l.jsx)("h1",{className:"italic text-head-02 md:text-head-01",children:t.title})}),(0,l.jsx)("h2",{className:"col-span-2 text-p md:text-head-02",children:t.artistList&&(0,l.jsx)(d.Z,{data:t.artistList,lang:a})})]})]})})};function x(e){let t=e.disabled?" arrow--disabled":"";return(0,l.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:e.onClick,className:"arrow ".concat(e.left?"arrow--left":"arrow--right"," ").concat(t),children:[e.left&&(0,l.jsx)("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),!e.left&&(0,l.jsx)("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})]})}var m=e=>{let{data:t,lang:a}=e,[n,i]=(0,s.useState)(0),[c,d]=(0,s.useState)(!1),[o,m]=(0,s.useState)([]),[f,h]=(0,r.E)({initial:0,slideChanged(e){i(e.track.details.rel)},created(){d(!0)},loop:!0,slides:t.length,detailsChanged(e){m(e.track.details.slides.map(e=>e.portion))}},[e=>{e.on("created",()=>{e.container.addEventListener("mouseover",()=>{}),e.container.addEventListener("mouseout",()=>{})})}]);return(0,l.jsx)(l.Fragment,{children:t.length>1?(0,l.jsxs)("div",{className:"navigation-wrapper relative w-full",children:[(0,l.jsx)("div",{ref:f,className:"keen-slider fader",children:t.map((e,t)=>(0,l.jsx)("div",{className:"keen-slider__slide fader__slide",style:{opacity:o[t]},children:(0,l.jsx)(u,{data:e,lang:a})},t))}),c&&h.current&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"absolute cursor-pointer hidden md:flex items-center justify-center h-[24px] md:h-[80px] md:right-full w-[24px] md:w-[40px] top-full md:top-[calc(50%-40px)] z-50",children:(0,l.jsx)(x,{left:!0,onClick:e=>{var t;return e.stopPropagation()||(null===(t=h.current)||void 0===t?void 0:t.prev())},disabled:0==n})}),(0,l.jsx)("div",{className:"absolute cursor-pointer hidden md:flex items-center justify-center h-[24px] md:h-[80px] md:left-full w-[24px] md:w-[40px] right-0 top-full md:top-[calc(50%-40px)] z-50",children:(0,l.jsx)(x,{onClick:e=>{var t;return e.stopPropagation()||(null===(t=h.current)||void 0===t?void 0:t.next())},disabled:n==h.current.track.details.slides.length-1})})]}),c&&h.current&&(0,l.jsx)("div",{className:"dots absolute flex gap-x-2 justify-center md:justify-end p-2 top-full w-full",children:[...Array(h.current.track.details.slides.length).keys()].map(e=>(0,l.jsx)("button",{onClick:()=>{var t;null===(t=h.current)||void 0===t||t.moveToIdx(e)},className:"dot h-[10px] w-[10px] bg-grey-hover rounded-full"+(n===e?" active opacity-100":" opacity-30")},e))})]}):(0,l.jsx)("div",{className:"keen-slider fader",children:t.map((e,t)=>(0,l.jsx)("div",{className:"keen-slider__slide fader__slide",style:{opacity:o[t]},children:(0,l.jsx)(u,{data:e,lang:a})},t))})})}},4593:function(e,t,a){"use strict";var l=a(7437),s=a(2737),r=a.n(s);t.Z=e=>{let t,a,s,n,i,c,d,{data:{startDate:o,endDate:u},lang:x}=e;return[t,a,s]=o.split("-"),void 0!==u&&([n,i,c]=u.split("-")),"en"==x&&(void 0==u?d="".concat(r()(o).format("MMMM D, YYYY")):void 0!==u&&(a==i&&(d="".concat(r()(o).format("MMMM D")," — ").concat(r()(u).format("D, YYYY"))),t==n&&a!==i?d="".concat(r()(o).format("MMMM D")," — ").concat(r()(u).format("MMMM D, YYYY")):t!==n&&a!==i&&(d="".concat(r()(o).format("MMMM D, YYYY")," - ").concat(r()(u).format("MMMM D, YYYY"))))),"th"==x&&("01"==a?a="มกราคม":"02"==a?a="กุมภาพันธ์":"03"==a?a="มีนาคม":"04"==a?a="เมษายน":"05"==a?a="พฤษภาคม":"06"==a?a="มิถุนายน":"07"==a?a="กรกฎาคม":"08"==a?a="สิงหาคม":"09"==a?a="กันยายน":"10"==a?a="ตุลาคม":"11"==a?a="พฤศจิกายน":"12"==a&&(a="ธันวาคม"),"01"==i?i="มกราคม":"02"==i?i="กุมภาพันธ์":"03"==i?i="มีนาคม":"04"==i?i="เมษายน":"05"==i?i="พฤษภาคม":"06"==i?i="มิถุนายน":"07"==i?i="กรกฎาคม":"08"==i?i="สิงหาคม":"09"==i?i="กันยายน":"10"==i?i="ตุลาคม":"11"==i?i="พฤศจิกายน":"12"==i&&(i="ธันวาคม"),t=Number(t)+543,n=Number(n)+543,void 0==u?d="".concat(s," ").concat(a," ").concat(t):void 0!==u&&(a==i&&(d="".concat(s," — ").concat(c," ").concat(i," ").concat(n)),t==n&&a!==i?d="".concat(s," ").concat(a," — ").concat(c," ").concat(i," ").concat(n):t!==n&&a!==i&&(d="".concat(s," ").concat(a," ").concat(t," - ").concat(c," ").concat(i," ").concat(n)))),(0,l.jsx)("span",{children:d})}},8764:function(e,t,a){"use strict";var l=a(7437),s=a(6648);let r=e=>{let{src:t,quality:a}=e;return"".concat(t,"?q=").concat(a||75)};t.default=e=>{let{src:t,alt:a="cover",priority:n=!1,className:i}=e;return(0,l.jsx)(s.default,{fill:!0,loading:n?void 0:"lazy",loader:r,src:t,alt:a,priority:n,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",className:"".concat(i," absolute object-cover inset-0 h-full w-full")})}},3415:function(e,t,a){"use strict";var l=a(7437);t.Z=e=>{let{data:t,lang:a}=e;return(0,l.jsx)("div",{children:t.map((e,s)=>(0,l.jsxs)("span",{children:["peopleList"==e._type?e.people.name:e.name,s==t.length-1?"":s==t.length-2&&"en"==a?" and ":s==t.length-2&&"th"==a?" และ ":", "]},s))})}},511:function(e,t,a){"use strict";var l=a(7437),s=a(2265),r=a(3061);t.default=e=>{let{word:t="Word"}=e,a=(0,s.useRef)(null),n=(0,s.useRef)(null),[i,c]=(0,s.useState)(null),[d,o]=(0,s.useState)(null),[u,x]=(0,s.useState)(null),[m,f]=(0,s.useState)(null),[h,v]=(0,s.useState)(null),[p,j]=(0,s.useState)(0),[g,b]=(0,s.useState)(null),N=(0,r.iP)().width;return(0,s.useEffect)(()=>{a&&a.current&&j(a.current.offsetHeight)},[]),(0,s.useEffect)(()=>{n&&n.current&&N&&(c(n.current.offsetWidth),o(n.current.offsetHeight),x(N-32))},[N]),(0,s.useEffect)(()=>{u&&i&&p&&d&&(f(Math.ceil(u/i)+1),v(Math.ceil(p/d*1.1)))},[u,i,p,d,N]),(0,s.useEffect)(()=>{let e=0;setInterval(function(){h&&(e>h-1?e=0:e++,b(e))},600)},[h]),(0,l.jsx)("div",{ref:a,className:"outline absolute h-full flex aligns-center no-select pointer-events-none top-0",children:(0,l.jsxs)("div",{className:"relative flex font-bold items-center justify-center leading-[0.8] text-[46px]",children:[(0,l.jsx)("div",{ref:n,className:"absolute invisible w-max",children:t}),(0,l.jsx)("div",{className:"lines flex flex-col text-[rgb(225,225,225)]",children:h&&h>0&&Array(h).fill(0).map((e,a)=>(0,l.jsx)("span",{className:"even:rotate-180 even:translate-y-[8px] even:-scale-x-100",style:{color:""},children:Array(m).fill(0).map((e,s)=>(0,l.jsx)("span",{"data-row":a,"data-col":s,className:"".concat(a%2==0&&s%2==0?"text-color":"").concat(a%2!=0&&s%2!=0?"text-color":""),children:t},"".concat(a,"-").concat(s)))},a))})]})})}},1802:function(e,t,a){"use strict";a.d(t,{default:function(){return u}});var l=a(7437),s=a(2737),r=a.n(s),n=a(7701),i=a.n(n),c=a(780);let d=()=>(0,l.jsx)(c.Z,{title:"Current",bgColor:"bg-black",border:!1,borderColor:null,textColor:"text-white",imgSrc:null,imgW:void 0,imgH:void 0}),o=()=>(0,l.jsx)(c.Z,{title:"Upcoming",bgColor:"bg-black",border:!1,borderColor:"border-white",textColor:"text-white",imgSrc:null,imgW:void 0,imgH:void 0});var u=e=>{let t,a,{data:s}=e;return r().extend(i()),r()().isBetween(s.startDate,s.endDate,"day","[]")?t=r()().isBetween(s.startDate,s.endDate,"day","[]"):r()().isBefore(r()(s.startDate))&&(a=r()().isBefore(r()(s.startDate))),(0,l.jsxs)(l.Fragment,{children:[a&&(0,l.jsx)(o,{}),t&&(0,l.jsx)(d,{})]})}},780:function(e,t,a){"use strict";var l=a(7437);t.Z=e=>{let{bgColor:t="bg-white",border:a=!1,borderColor:s,imgSrc:r,imgW:n,imgH:i,textColor:c="text-black",title:d}=e;return(0,l.jsx)("div",{className:"".concat(t," ").concat(a?"border":void 0," ").concat(s&&"border-".concat(s)," inline-flex h-max items-center leading-[1] px-5 py-1 relative rounded-full ").concat(c," text-[14px] w-max"),children:d&&(0,l.jsx)("span",{className:"h-max relative -top-[1px]",children:d})})}}},function(e){e.O(0,[60,425,231,61,249,971,23,744],function(){return e(e.s=6105)}),_N_E=e.O()}]);