1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[119],{81174:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/videos/[id]",function(){return i(25385)}])},19093:function(e,t,i){"use strict";i.d(t,{F_:function(){return o},Q1:function(){return r},Si:function(){return s},yY:function(){return a}});var n=i(82729),l=i(68806);function _templateObject(){let e=(0,n._)(["\n query VideosUrlCollection($skip: Int) {\n videosCollection(order: [date_DESC], skip: $skip, limit: 1000){\n total\n skip\n items {\n urlTitle\n }\n }\n }\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,n._)(["\n query VideosCollection($skip: Int, $limit: Int) {\n videosCollection(skip: $skip, limit: $limit) {\n total\n skip\n items {\n sys {\n id\n }\n title\n urlTitle\n description\n opening\n players\n videoType\n video\n shortVideo\n playlist\n date\n imagesCollection(limit:1) {\n items {\n url\n }\n }\n }\n }\n }\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,n._)(["\n query VideosCollection($skip: Int, $limit: Int, $where: VideosFilter) {\n videosCollection(order: [date_DESC], skip: $skip, limit: $limit, where: $where) {\n total\n skip\n items {\n sys {\n id\n }\n title\n urlTitle\n description\n opening\n players\n videoType\n video\n shortVideo\n playlist\n date\n imagesCollection(limit:1) {\n items {\n url\n }\n }\n }\n }\n }\n"]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,n._)(["\n query PlaylistVideosCollection($where: VideosFilter) {\n videosCollection(order: [date_DESC], where: $where) {\n total\n skip\n items {\n sys {\n id\n }\n title\n urlTitle\n description\n opening\n players\n videoType\n video\n shortVideo\n playlist\n date\n imagesCollection(limit:1) {\n items {\n url\n }\n }\n }\n }\n }\n"]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,n._)(["\n query PlaylistByUrlCollection($where: VideosFilter) {\n videosCollection(limit: 1, where: $where) {\n items {\n date\n urlTitle\n playlist\n }\n }\n }\n"]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,n._)(["\n query FeaturedVideoCollection($where: VideosFilter) {\n videosCollection(limit: 1, order: [date_DESC], where: $where) {\n items {\n sys {\n id\n }\n title\n urlTitle\n description\n date\n playlist\n imagesCollection(limit: 1) {\n items {\n url\n }\n }\n }\n }\n }\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,n._)(["\n query getVideo($slug: String!) {\n videosCollection(where: { urlTitle: $slug }) {\n items {\n sys {\n id\n publishedAt\n }\n title\n urlTitle\n description\n opening\n players\n videoType\n video\n shortVideo\n tags\n teachersLibrary\n unlockForAllUsers\n playlist\n imagesCollection(limit: 1) {\n items {\n url\n }\n }\n }\n }\n }\n"]);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,n._)(["\n query GetVideos($skip: Int!, $limit: Int!) {\n videosCollection(skip: $skip, limit: $limit) {\n total\n skip\n items {\n sys {\n id\n publishedAt\n }\n title\n urlTitle\n description\n opening\n players\n videoType\n video\n shortVideo\n playlist\n imagesCollection(limit: 1) {\n items {\n url\n }\n }\n }\n }\n }\n"]);
1return _templateObject7=function(){return e},e}function _templateObject8(){let e=(0,n._)(["\n query GetVideos(\n $searchType: String!\n $searchPlayer: String!\n $searchTag: String!\n $searchText: String!\n $ecoTag: String!\n $playersTag: String!\n $teachersTag: String!\n $typeTag: String!\n $skip: Int!\n ) {\n videosCollection(\n limit: 10\n skip: $skip\n order: [date_DESC]\n where: {\n AND: [\n { tags_contains: $ecoTag }\n { teachersLibrary_contains: $teachersTag }\n { players_contains: $searchPlayer }\n { players_contains: $playersTag }\n { videoType_contains: $searchType }\n { videoType_contains: $typeTag }\n { tags_contains: $searchTag }\n ]\n OR: [{ players_contains: $searchText }, { title_contains: $searchText }]\n }\n ) {\n total\n items {\n sys {\n id\n }\n title\n urlTitle\n description\n opening\n players\n videoType\n video\n shortVideo\n featuredVideo\n date\n playlist\n imagesCollection(limit: 1) {\n items {\n url\n }\n }\n }\n }\n }\n"]);return _templateObject8=function(){return e},e}function _templateObject9(){let e=(0,n._)(["\n query GetFeaturedVideo($searchType: String!, $searchPlayer: String!, $searchTag: String!) {\n videosCollection(\n limit: 1\n order: [date_DESC]\n where: {\n featuredVideo: true\n AND: [\n { players_contains: $searchPlayer }\n { videoType_contains: $searchType }\n { tags_contains: $searchTag }\n ]\n }\n ) {\n total\n items {\n sys {\n id\n }\n title\n urlTitle\n description\n opening\n players\n videoType\n video\n shortVideo\n featuredVideo\n date\n playlist\n imagesCollection(limit: 1) {\n items {\n url\n }\n }\n }\n }\n }\n"]);return _templateObject9=function(){return e},e}(0,l.Ps)(_templateObject()),(0,l.Ps)(_templateObject1());let s=(0,l.Ps)(_templateObject2()),r=(0,l.Ps)(_templateObject3());(0,l.Ps)(_templateObject4()),(0,l.Ps)(_templateObject5()),(0,l.Ps)(_templateObject6()),(0,l.Ps)(_templateObject7());let a=(0,l.Ps)(_templateObject8()),o=(0,l.Ps)(_templateObject9())},70257:function(e,t,i){"use strict";i.d(t,{e:function(){return toCanonicalSlug}});let toCanonicalSlug=e=>{let t=e;try{t=decodeURIComponent(e)}catch(e){}return t.toLowerCase().replace(/[\s_]+/g,"-").replace(/[^a-z0-9.-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}},44397:function(e,t,i){"use strict";var n=i(85893),l=i(9008),s=i.n(l),r=i(11163);t.Z=e=>{let{title:t,description:i,children:l,customCanonicalUrl:a,hideCanonical:o}=e,c=(0,r.useRouter)(),d="".concat("https://www.chessclub.com").concat(a||c.asPath);return(0,n.jsxs)(s(),{children:[(0,n.jsx)("title",{children:"".concat(t," | ICC Chess Club")}),(0,n.jsx)("meta",{name:"description",content:i}),(0,n.jsx)("meta",{name:"apple-itunes-app",content:"app-id=643326555, app-argument=https://www.chessclub.com/, affiliate-data=pt=404703&ct=smart-banner"}),(0,n.jsx)("link",{rel:"manifest",href:"/manifest.json"}),!o&&(0,n.jsx)("link",{rel:"canonical",href:d}),l]})}},75616:function(e,t,i){"use strict";var n=i(85893),l=i(67294);let NewsArticleContent=e=>{let{html:t}=e;return(0,l.useEffect)(()=>
1{if(t.includes("cbreplay")){let e=document.getElementById("icc-cbreplay-css");if(!e){let e=document.createElement("link");e.id="icc-cbreplay-css",e.rel="stylesheet",e.type="text/css",e.href="/styles/CBReplay.css",document.head.appendChild(e)}let t=document.getElementById("icc-jquery");if(!t){let e=document.createElement("script");e.id="icc-jquery",e.src="/scripts/jquery-3.0.0.min.js",document.head.append(e)}let i=document.getElementById("icc-cbreplay");if(!i){let e=document.createElement("script");e.id="icc-cbreplay",e.src="/scripts/cbreplay.js",e.type="text/javascript",document.head.append(e)}}},[]),(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:t}})};NewsArticleContent.displayName="NewsArticleContent",t.Z=NewsArticleContent},25385:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSG:function(){return ei},default:function(){return en}});var n,l,s=i(85893),r=i(44397),a=i(5616),o=i(83965),c=i(47668),d=i(5152),p=i.n(d),m=i(25675),u=i.n(m),h=i(11163),g=i(67294),y=i(91846),x=i(18562),f=i(15861),v=i(41664),j=i.n(v),w=i(70257),T=i(63372),C=i(19093);let replaceAll=(e,t,i)=>{var n;return null==e?void 0:null===(n=e.split(t))||void 0===n?void 0:n.join(i)},getLimitedVideos=async(e,t,i)=>{var n;let{data:l}=await T.l.query({query:C.Si,variables:{skip:e,limit:t,where:{urlTitle_not:i}}});return null!==(n=null==l?void 0:l.videosCollection)&&void 0!==n?n:{total:0,skip:0,items:[]}},getPlaylistVideos=async(e,t)=>{var i;let{data:n}=await T.l.query({query:C.Q1,variables:{where:{AND:[{playlist:e},{urlTitle_not:t}]}}});return null!==(i=null==n?void 0:n.videosCollection)&&void 0!==i?i:{total:0,skip:0,items:[]}},parseCsvToArray=e=>{var t;if(!e)return[];let i=null===(t=replaceAll(e,"\n",","))||void 0===t?void 0:t.split(","),n=i.filter(e=>""!==e.trim()).map(e=>e.replace("_"," ").trim());return[...new Set(n)]},getVideoTypes=e=>parseCsvToArray(null==e?void 0:e.videoType),getTeachersTags=e=>parseCsvToArray(null==e?void 0:e.teachersLibrary),getPlayersTags=e=>parseCsvToArray(null==e?void 0:e.players),getEcoTags=e=>parseCsvToArray(null==e?void 0:e.tags);(n=l||(l={})).Teachers="teachers",n.Players="players",n.Type="type",n.Eco="eco";var b=i(21736),_=i(75616);let k={display:"flex","@media (min-width: 375px)":{flexDirection:"column",px:2},"@media (min-width: 1200px)":{flexDirection:"row",px:6}},S={display:"flex",flexDirection:"column",flexGrow:"1",p:1,"@media (min-width: 375px)":{flexBasis:"100%"},"@media (min-width: 1200px)":{flexBasis:"50%"},"@media (min-width: 1400px)":{flexBasis:"55%"}},$={pt:4,pb:2,lineHeight:"3rem",textTransform:"uppercase",fontSize:"3rem"},P={display:"flex",pb:2},V={fontFamily:"Space Grotesk",fontSize:"1.1rem",fontWeight:"500",lineHeight:"1.5rem",letterSpacing:"0"},O={...V,fontFamily:"Space Grotesk",fontWeight:"700",pr:1},Z={pb:1},N={fontFamily:"Space Grotesk",fontSize:"1rem",fontWeight:"400",lineHeight:"1.5em",letterSpacing:"0",pt:2},A={display:"flex",flexDirection:"column",flexGrow:"0",backgroundColor:"background.paper",overflowY:"auto","@media (min-width: 375px)":{flexBasis:"100%",maxHeight:"100%"},"@media (min-width: 1200px)":{flexBasis:"50%",maxHeight:"40rem"},"@media (min-width: 1400px)":{flexBasis:"45%",maxHeight:"40rem"}},E={display:"flex",p:2,cursor:"pointer","&:hover":{"& .imgBlock":{opacity:".6"},"& .linkBlock":{color:b.O.orange}},"&:last-child":{borderBottom:"0"},"@media (min-width: 375px)":{flexDirection:"column",gap:"1rem"},"@media (min-width: 768px)":{flexDirection:"row",gap:"1rem"},"@media (min-width: 1200px)":{flexDirection:"row",gap:"1rem"}},B={position:"relative",display:"flex","@media (min-width: 375px)":{flexBasis:"100%"},"@media (min-width: 768px)":{flexBasis:"30%"},"@media (min-width: 1000px)":{flexBasis:"20%"},"@media (min-width: 1200px)":{flexBasis:"40%"},"@media (min-width: 2000px)":{flexBasis:"30%"}},D={transitionProperty:"opacity",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"300ms",width:"100%",height:"100%",opacity:"1",objectFit:"fill"},I={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"40%",height:"40%"},F={display:"flex",flexDirection:"column",flexGrow:"1","@media (min-width: 375px)":{flexBasis:"100%"},"@media (min-width: 768px)":{flexBasis:"80%"},"@media (min-width: 1000px)":{flexBasis:"70%"},"@media (min-width: 1200px)":{flexBasis:"60%"},"@media (min-width: 2000px)":{flexBasis:"70%"}},G={fontFamily:"Space Grotesk",fontSize:"1.25rem",lineHeight:"1.75rem",textDecoration:"underline",fontWeight:"400",color:b.O.lightBlue,overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"1"},L={fontFamily:"Space Grotesk",fontSize:"1rem",fontWeight:"400",lineHeight:"1.2rem",textAlign:"left",py:1},q={pt:2},W={fontFamily:"Space Grotesk",fontWeight:"400",flexGrow:"1",fontSize:"1rem",lineHeight:"1.5rem",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical","@media (min-width: 375px)":{WebkitLineClamp:"2"},"@media (min-width: 1400px)":{WebkitLineClamp:"3"},"@media (min-width: 1800px)":{WebkitLineClamp:"4"}},tagStyle=e=>{let t="#C8C8C8",i="#000000";switch(e){case l.Teachers:t="#BFDBFE",i="#1D4ED8";break;case l.Type:t="#A7F3D0",i="#047857";break;case l.Eco:t="#FECACA",i="#B91C1C";break;case l.Players:t="#FED7AA",i="#C2410C"}return{display:"inline-flex",py:".25rem",px:".75rem",my:".25rem",mr:".5rem",alignItems:"center",borderRadius:"9999px",fontSize:".75rem",lineHeight:"1rem",fontWeight:"700",textTransform:"uppercase",cursor:"pointer",backgroundColor:t,color:i}},Playlist=e=>{let{videoData:t}=e,[i,n]=(0,g.useState)([]);(0,g.useEffect)(()=>{getPlaylist()},[]);let getPlaylist=async()=>{let e=[];
1if(t.playlist)try{let i=await getPlaylistVideos(t.playlist,t.urlTitle);e.push(...(null==i?void 0:i.items)||[])}catch(e){console.error("Error getting playlist videos: ",e)}if(0===e.length)try{let i=await getLimitedVideos(0,5,t.urlTitle);e.push(...(null==i?void 0:i.items)||[])}catch(e){console.error("Error getting limited videos: ",e)}n(e)},onVideoLinkClick=e=>{x.Y.dispatchEvent("clickVideo",{videoUrl:e})};return(0,s.jsx)(a.Z,{sx:A,children:i.map(e=>{var t;let i=(null==e?void 0:null===(t=e.imagesCollection)||void 0===t?void 0:t.items.length)>0?e.imagesCollection.items[0].url:y.VH,n=new Date(e.date),l="/videos/".concat((0,w.e)(e.urlTitle));return(0,s.jsx)(j(),{href:l,children:(0,s.jsxs)(a.Z,{sx:E,onClick:()=>onVideoLinkClick(e.urlTitle),children:[(0,s.jsxs)(a.Z,{sx:B,children:[(0,s.jsx)(o.Z,{className:"imgBlock",sx:D,component:"img",image:i}),(0,s.jsx)(c.Z,{sx:I,children:(0,s.jsx)(u(),{loading:"lazy",src:"/assets/images/svg/play.svg",alt:"Play video",width:"0",height:"0",sizes:"100vw",style:{width:"100%",height:"100%"}})})]}),(0,s.jsxs)(a.Z,{sx:F,children:[(0,s.jsx)(a.Z,{sx:G,className:"linkBlock",children:(0,s.jsx)(j(),{href:l,children:e.title})}),e.date&&(0,s.jsx)(f.Z,{sx:L,children:"Added on ".concat(n.toLocaleDateString("en-US"))}),(0,s.jsx)(a.Z,{sx:q,children:(0,s.jsx)(f.Z,{sx:W,dangerouslySetInnerHTML:{__html:e.description}})})]})]})},e.sys.id)})})};Playlist.displayName="Playlist";let Tag=e=>{let{tag:t,name:i,category:n,onTagClick:l}=e;return(0,s.jsx)(a.Z,{sx:tagStyle(n),onClick:()=>l(t,n),children:i})};Tag.displayName="Tag";let VideoArticle=e=>{let{videoData:t,onTagClick:i}=e,getTagName=e=>e.replaceAll("_"," ");return(0,s.jsxs)(a.Z,{sx:k,children:[(0,s.jsxs)(a.Z,{sx:S,children:[(0,s.jsx)(f.Z,{variant:"h1",sx:$,children:t.title}),"N/A"!==t.opening&&(0,s.jsxs)(a.Z,{sx:P,children:[(0,s.jsx)(f.Z,{sx:O,children:"Opening:"}),(0,s.jsx)(f.Z,{sx:V,children:t.opening})]}),"N/A"!==t.players&&(0,s.jsxs)(a.Z,{sx:P,children:[(0,s.jsx)(f.Z,{sx:O,children:"Player(s):"}),(0,s.jsx)(f.Z,{sx:V,children:t.players})]}),(0,s.jsxs)(a.Z,{sx:Z,children:[getTeachersTags(t).map(e=>"N/A"!==e&&(0,s.jsx)(Tag,{tag:e,name:"Teacher's library",category:l.Teachers,onTagClick:i},e)),getEcoTags(t).map(e=>"N/A"!==e&&(0,s.jsx)(Tag,{tag:e,name:getTagName(e),category:l.Eco,onTagClick:i},e)),getPlayersTags(t).map(e=>"N/A"!==e&&(0,s.jsx)(Tag,{tag:e,name:getTagName(e),category:l.Players,onTagClick:i},e)),getVideoTypes(t).map(e=>"N/A"!==e&&(0,s.jsx)(Tag,{tag:e,name:getTagName(e),category:l.Type,onTagClick:i},e))]}),(0,s.jsx)(a.Z,{sx:N,className:"no-normalize",children:(0,s.jsx)(_.Z,{html:t.description})})]}),(0,s.jsx)(Playlist,{videoData:t})]})};VideoArticle.displayName="VideoArticle";var z=i(91749),H=i(39712),U=i(86272),Q=i(22493),R=i(85508);let M=p()(()=>i.e(4).then(i.bind(i,22004)),{loadableGenerated:{webpack:()=>[22004]},ssr:!1}),Y={backgroundColor:"background.default",color:"text.primary"},X={display:"flex",justifyContent:"center"},J={width:"8rem",height:"8rem"},K={display:"flex",position:"relative",justifyContent:"center"},imageStyle=(e,t)=>({opacity:".2",objectFit:"fill",height:t,width:e}),ee={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",opacity:"0.2",width:"8rem",height:"8rem"},et={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},VideoPage=e=>{var t,i,n,l;let{data:d}=e,{loginState:p}=(0,z.b)(),[m,x]=(0,g.useState)(!1),f=null==d?void 0:null===(i=d.videosCollection)||void 0===i?void 0:null===(t=i.items)||void 0===t?void 0:t[0],v=(0,h.useRouter)(),{layout:j,resolution:w}=(0,R.xP)(),[T,C]=(0,g.useState)(),b=m?null==f?void 0:f.video:null==f?void 0:f.shortVideo,_=(null==f?void 0:null===(n=f.imagesCollection)||void 0===n?void 0:n.items.length)>0?f.imagesCollection.items[0].url:y.VH;return(0,g.useEffect)(()=>{let e=p===U.zD.LOGGED_IN,t=(0,Q.Fu)(U.iT.VIDEOS);x(e&&t||!!(null==f?void 0:f.unlockForAllUsers))},[p,f]),(0,g.useEffect)(()=>{var e;let t=(null===(e=window.screen)||void 0===e?void 0:e.availWidth)||document.body.clientWidth,i=t/(w.isMobile?1:2);C({width:i,height:i/(16/9)})},[j]),(0,s.jsxs)(g.Fragment,{children:[(0,s.jsx)(r.Z,{title:"Videos | ".concat(null!==(l=null==f?void 0:f.title)&&void 0!==l?l:""),description:null==f?void 0:f.description}),f&&(0,s.jsxs)(a.Z,{sx:Y,children:[(0,s.jsx)(a.Z,{sx:X,children:m?(0,s.jsx)(M,{url:b,controls:!0,width:(null==T?void 0:T.width)||0,height:(null==T?void 0:T.height)||0,playing:!0,playIcon:(0,s.jsx)(c.Z,{sx:J,children:(0,s.jsx)(u(),{loading:"lazy",src:"/assets/images/svg/play.svg",alt:"Play video",width:"0",height:"0",sizes:"100vw",style:{width:"100%",height:"100%"}})}),light:_}):(0,s.jsxs)(a.Z,{sx:K,children:[(0,s.jsx)(o.Z,{sx:imageStyle((null==T?void 0:T.width)||0,(null==T?void 0:T.height)||0),component:"img",image:_}),(0,s.jsx)(c.Z,{sx:ee,children:(0,s.jsx)(u(),{loading:"lazy",src:"/assets/images/svg/play.svg",alt:"Play video",width:"0",height:"0",sizes:"100vw",style:{width:"100%",height:"100%"}})}),(0,s.jsx)(a.Z,{sx:et,children:(0,s.jsx)(H.Z,{title:"Curious?",description:"Sign up to enjoy plenty of free videos and content."})})]})}),(0,s.jsx)(VideoArticle,{videoData:f,onTagClick:(e,t)=>{v.push({pathname:"/videos",query:{[t]:e}},"/videos")}})]})]})};VideoPage.displayName="VideoPage";var ei=!0,en=VideoPage},39712:function(e,t,i){"use strict";var n=i(85893),l=i(69417),s=i(47668),r=i(15861),a=i(46657),o=i(5016),c=i(16785);let LoginAction=e=>{let{title:t,description:i}=e,{registerDialog:d}=(0,a.qt)(),openOverlay=e=>{switch(e){case a.xQ.SIGNIN:d(a.xQ.SIGNIN,(0,n.jsx)(o.Z,{}));break;case a.xQ.SIGNUP:d(a.xQ.SIGNUP,(0,n.jsx)(c.Z,{}))}};return(0,n.jsxs)(s.Z,{spacing:1,sx:{alignItems:"center",justifyContent:"center",textAlign:"center",maxWidth:"340px",p:1},children:[t&&(0,n.jsx)(r.Z,{variant:"h3",color:"text.primary",children:t}),(0,n.jsx)(r.Z,{variant:"body1",color:"text.primary",children:i}),(0,n.jsxs)(s.Z,{spacing:2,sx:{pt:1},children:[(0,n.jsx)(l.Z,{sx:{minWidth:"260px"},onClick:()=>openOverlay(a.xQ.SIGNUP),children:"Sign up"}),(0,n.jsx)(l.Z,{variant:"outlined",sx:{minWidth:"260px"},onClick:()=>openOverlay(a.xQ.SIGNIN),children:"Log in"})]})]})};LoginAction.displayName="LoginAction",t.Z=LoginAction}},function(e){e.O(0,[310,774,888,179],function(){return e(e.s=81174)}),_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.