"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2625,5006,7776],{57515:(e,t,o)=>{o.d(t,{A:()=>Y});var n=o(84577),r=o(96540),i=o(34164),a=o(75659),l=o(74136),d=o(17437),s=o(3552),p=o(50186),u=o(98301),c=o(38413),m=o(31609);function h(e){return(0,m.Ay)("MuiSkeleton",e)}(0,c.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var b=o(74848);function v(){let e=(0,n._)(["\n  0% {\n    opacity: 1;\n  }\n\n  50% {\n    opacity: 0.4;\n  }\n\n  100% {\n    opacity: 1;\n  }\n"]);return v=function(){return e},e}function g(){let e=(0,n._)(["\n  0% {\n    transform: translateX(-100%);\n  }\n\n  50% {\n    /* +0.5s of delay between each loop */\n    transform: translateX(100%);\n  }\n\n  100% {\n    transform: translateX(100%);\n  }\n"]);return g=function(){return e},e}function x(){let e=(0,n._)(["\n        animation: "," 2s ease-in-out 0.5s infinite;\n      "]);return x=function(){return e},e}function f(){let e=(0,n._)(["\n        &::after {\n          animation: "," 2s linear 0.5s infinite;\n        }\n      "]);return f=function(){return e},e}let k=e=>{let{classes:t,variant:o,animation:n,hasChildren:r,width:i,height:l}=e;return(0,a.A)({root:["root",o,n,r&&"withChildren",r&&!i&&"fitContent",r&&!l&&"heightAuto"]},h,t)},y=(0,d.i7)(v()),w=(0,d.i7)(g()),A="string"!=typeof y?(0,d.AH)(x(),y):null,C="string"!=typeof w?(0,d.AH)(f(),w):null,S=(0,s.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,t[o.variant],!1!==o.animation&&t[o.animation],o.hasChildren&&t.withChildren,o.hasChildren&&!o.width&&t.fitContent,o.hasChildren&&!o.height&&t.heightAuto]}})((0,p.A)(e=>{let{theme:t}=e,o=String(t.shape.borderRadius).match(/[\d.\-+]*\s*(.*)/)[1]||"px",n=parseFloat(t.shape.borderRadius);return{display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:(0,l.X4)(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(n).concat(o,"/").concat(Math.round(n/.6*10)/10).concat(o),"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:e=>{let{ownerState:t}=e;return t.hasChildren},style:{"& > *":{visibility:"hidden"}}},{props:e=>{let{ownerState:t}=e;return t.hasChildren&&!t.width},style:{maxWidth:"fit-content"}},{props:e=>{let{ownerState:t}=e;return t.hasChildren&&!t.height},style:{height:"auto"}},{props:{animation:"pulse"},style:A||{animation:"".concat(y," 2s ease-in-out 0.5s infinite")}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:"linear-gradient(\n                90deg,\n                transparent,\n                ".concat((t.vars||t).palette.action.hover,",\n                transparent\n              )"),content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:C||{"&::after":{animation:"".concat(w," 2s linear 0.5s infinite")}}}]}})),Y=r.forwardRef(function(e,t){let o=(0,u.b)({props:e,name:"MuiSkeleton"}),{animation:n="pulse",className:r,component:a="span",height:l,style:d,variant:s="text",width:p,...c}=o,m={...o,animation:n,component:a,variant:s,hasChildren:!!c.children},h=k(m);return(0,b.jsx)(S,{as:a,ref:t,className:(0,i.A)(h.root,r),ownerState:m,...c,style:{width:p,height:l,...d}})})},3752:(e,t,o)=>{o.d(t,{A:()=>c});var n=o(2445),r=o(52064),i=o(74136),a=o(42907),l=o(96540);o(79690),o(92598),o(31576),o(60600);var d=o(58943),s=o(46874);let p={root:e=>({position:"relative","& .swiper-pagination-bullet":{background:"none",backgroundColor:"text.primary",width:{mobile:"8px",tablet:"8px",desktop:"7px"},height:{mobile:"3px",desktop:"7px"},borderRadius:{mobile:0,tablet:"50px",desktop:"50%"}},"& .swiper-pagination-bullet-active":{backgroundColor:"secondary.main",width:{mobile:"16px",tablet:"16px",desktop:"7px"}},"& .swiper-button-prev, & .swiper-button-next":{borderRadius:"50%",aspectRatio:"1/1",width:{mobile:"28px",tablet:"32px"},height:{mobile:"auto"},background:(0,i.X4)(e.palette.primary.main,.8),padding:"8px",color:"text.primary","&::after":{fontSize:{mobile:"12px",tablet:"16px"},color:"text.primary"},"&.swiper-button-disabled":{background:(0,i.X4)(e.palette.primary.main,.5)}},"& .swiper-button-prev":{left:"4px"},"& .swiper-button-next":{right:"4px"}})},u=e=>{let{rootSx:t,slides:o,breakpoints:i,...u}=e,c=(0,a.A)(),m=(0,l.useMemo)(()=>{let e={};return(null==i?void 0:i.mobile)&&(e[c.breakpoints.values.mobile]=i.mobile),(null==i?void 0:i.tablet)&&(e[c.breakpoints.values.tablet]=i.tablet),(null==i?void 0:i.desktop)&&(e[c.breakpoints.values.desktop]=i.desktop),e},[c,i]),h=(0,l.useMemo)(()=>{let e=[];return u.autoplay&&e.push(d.Ij),u.pagination&&e.push(d.dK),u.navigation&&e.push(d.Vx),u.scrollbar&&e.push(d.Ze),u.freeMode&&e.push(d.U1),e},[u]);return(0,n.Y)(r.A,{sx:[p.root,...t?Array.isArray(t)?t:[t]:[]],children:(0,n.Y)(s.RC,{modules:h,slidesPerView:1,slidesPerGroup:1,...u,loop:(null!=o?o:[]).length>1?u.loop:void 0,breakpoints:m,children:(null!=o?o:[]).map((e,t)=>(0,n.Y)(s.qr,{children:e},t))})})};u.displayName="Carousel";let c=u},57776:(e,t,o)=>{o.r(t),o.d(t,{default:()=>a});var n=o(2445),r=o(29965),i=o.n(r);let a=(0,o(96540).memo)(e=>{let{unoptimized:t=!1,...o}=e;return(0,n.Y)(i(),{unoptimized:t,...o})})},4451:(e,t,o)=>{o.d(t,{A:()=>l});var n=o(2445),r=o(57776),i=o(79817),a=o(96540);let l=e=>{let{src:t,...o}=e,{currency:l}=(0,i.$)(),[d,s]=(0,a.useState)(!1),[p,u]=(0,a.useState)(t),c=(0,a.useCallback)(()=>{d||(u(t.replace("/".concat(l,"/"),"/")),s(!0))},[t,u,l,d,s]);return(0,n.Y)(r.default,{unoptimized:!0,src:p,...o,onError:c})}},15006:(e,t,o)=>{o.r(t),o.d(t,{default:()=>M});var n=o(2445),r=o(4451),i=o(43140),a=o(20304),l=o(14061),d=o(54480),s=o(52064),p=o(57515),u=o(53384),c=o(42413),m=o(91106),h=o.n(m),b=o(96540);let v={root:{borderStyle:"solid",borderWidth:{mobile:"1px",desktop:"0 0 1px 0"},borderColor:"divider",borderRadius:{mobile:"8px",desktop:0},backgroundColor:{mobile:"background.paper",desktop:"unset"},padding:{mobile:0,desktop:"16px 0"},cursor:"pointer",width:"100%",overflow:"hidden",display:"grid",gridTemplateColumns:{mobile:"minmax(0,1fr)",desktop:"repeat(2, minmax(0,1fr))"},gap:{mobile:"4px",desktop:"10px"}},wrapper:{alignSelf:"center",padding:{mobile:"0 12px 12px",desktop:0}},imgContainer:{aspectRatio:"140/105",borderRadius:{mobile:0,desktop:"8px"},overflow:"hidden","& img":{height:"100%",objectFit:"cover",objectPosition:"center",width:"100% !important"}},text:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},g=e=>{let{game:t,isLoading:o,type:m}=e,{user:g}=(0,a.Jd)(),{getVendorName:x,getGameName:f}=(0,i.B)(),k=(0,b.useMemo)(()=>{var e,o,n;return"popular-game-".concat(null!=m?m:l.Zt.Slot,"-").concat(null!==(o=null==t?void 0:null===(e=t.vendor)||void 0===e?void 0:e.code)&&void 0!==o?o:"","-").concat(null!==(n=null==t?void 0:t.code)&&void 0!==n?n:"")},[m,t]),y=(0,b.useMemo)(()=>{var e,o,n,r;return g?(0,d.s)({type:null!=m?m:l.Zt.Slot,game_code:null!==(o=null==t?void 0:t.code)&&void 0!==o?o:"",vendor_code:null!==(n=null==t?void 0:null===(e=t.vendor)||void 0===e?void 0:e.code)&&void 0!==n?n:"",currency:null!==(r=null==g?void 0:g.currency)&&void 0!==r?r:""}):"#login-prompt"},[t,m,g]),w=(0,b.useMemo)(()=>{var e,o,n;return t?null!==(n=null!==(o=null===(e=t.vendor)||void 0===e?void 0:e.name)&&void 0!==o?o:x(l.Zt.Slot,t.vendor.code))&&void 0!==n?n:t.vendor.code:""},[t,x]),A=(0,b.useMemo)(()=>f(null!=m?m:l.Zt.Slot),[f,m]);return(0,n.FD)(n.FK,{children:[o&&(0,n.Y)(p.A,{variant:"rectangular",sx:{width:"100%",height:{mobile:"193px",desktop:"135px"}}}),!o&&t&&(0,n.FD)(s.A,{component:h(),title:t.name,"aria-label":t.name,href:y,target:g?"_jw_game_launcher":void 0,sx:v.root,id:k,children:[(0,n.Y)(s.A,{sx:v.imgContainer,children:(0,n.Y)(r.A,{src:t.icon,alt:t.name,width:140,height:105})}),(0,n.FD)(u.A,{sx:v.wrapper,spacing:{mobile:"0",desktop:"4px"},children:[(0,n.Y)(c.A,{variant:"body2",color:"text.secondary",sx:v.text,children:w}),(0,n.Y)(c.A,{variant:"body1",fontWeight:"bold",sx:v.text,children:t.name}),(0,n.Y)(c.A,{variant:"body2",color:"text.secondary",fontWeight:"bold",sx:v.text,children:A})]})]})]})};var x=o(3752),f=o(79209),k=o(70728),y=o(55816),w=o(79817),A=o(27711),C=o(58065);let S={root:{padding:{mobile:"0"},width:{mobile:"100%",desktop:280}},container:{width:"100%",display:"grid",maxWidth:"100%",gap:{mobile:"12px",tablet:"16px",desktop:0},gridTemplateColumns:{desktop:"minmax(0,1fr)"},gridAutoColumns:{desktop:"minmax(0,1fr)"},gridAutoFlow:{mobile:"column",desktop:"row"},overflowX:{mobile:"auto",desktop:"unset"}},title:{display:"flex",flexDirection:"row",alignItems:"center","&::before":{content:'""',display:"block",width:"4px",height:{mobile:"20px",tablet:"24px"},backgroundColor:"primary.main",marginRight:"10px"},typography:{mobile:"h5",tablet:"h4"}},carousel:{"& .swiper-slide":{width:{mobile:"120px",tablet:"140px"}}}},Y=[],M=()=>{let{platform:e}=(0,y.P)(),{isDesktop:t}=(0,k.A)(),{language:o,currency:r}=(0,w.$)(),{melonApiClient:i}=(0,A.Y)(),{data:a,isLoading:l}=(0,f.P)({key:"popularGames",request:{language:o,currency:r,platform:e},fetcher:i.product.featuredGames}),d=(0,b.useMemo)(()=>{var e;return null!==(e=null==a?void 0:a.data)&&void 0!==e?e:[]},[a]),p=(0,b.useMemo)(()=>l?Array.from([,]).map((e,t)=>(0,n.Y)(g,{isLoading:!0},t)):[...Y,...d].map(e=>{var t;return(0,n.Y)(g,{game:e,type:null!==(t=null==e?void 0:e.type)&&void 0!==t?t:void 0},"".concat(e.vendor.code,"-").concat(e.code))}),[d,l]),m=(0,b.useMemo)(()=>t?(0,n.Y)(s.A,{sx:S.container,children:p}):(0,n.Y)(x.A,{rootSx:S.carousel,slides:p,navigation:!l,slidesPerView:"auto",breakpoints:{mobile:{spaceBetween:12},tablet:{spaceBetween:16}}}),[l,t,p]);return(0,n.FD)(u.A,{spacing:{mobile:"12px",tablet:"16px",desktop:"24px"},sx:S.root,children:[(0,n.Y)(c.A,{sx:S.title,variant:"h4",fontWeight:"bold",component:"h2",children:(0,n.Y)(C.A,{id:"/jinSy",defaultMessage:"Popular Games"})}),m]})}}}]);