1import{c as e,d as a,a as t,k as s,l as i,n as l,v as n,m as r,t as o,F as c,p as m,q as d,s as u,r as g,b as h,u as v,o as f,x as p,y,z as w,A as b,B as k,e as C}from"./vue-vendor-C8IFMTeP.js";import{_ as F}from"./index-BSholRiR.js";import{T as E,a as M}from"./TheFooter-By9_u6xH.js";import{g as I}from"./game-data-DeBK3C4i.js";const N={name:"GamePlayer",props:{game:{type:Object,required:!0},gameStarted:{type:Boolean,default:!1}},data:()=>({isFullscreen:!1,isIframeFullscreen:!1,showNotification:!1,notificationMessage:"",notificationTimeout:null,backgroundLoaded:!1}),computed:{gameUrl(){return this.game.iframeUrl||""},gameTitle(){return this.game.pageTitle||this.game.title||"Game"}},methods:{startGame(){this.$emit("start-game")},toggleFullscreen(){this.isFullscreen?this.exitFullscreen():this.enterFullscreen()},toggleIframeFullscreen(){this.isIframeFullscreen=!this.isIframeFullscreen,this.$emit("theater-mode-changed",this.isIframeFullscreen),this.$nextTick((()=>{this.isIframeFullscreen?(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"):(document.body.style.overflow="",document.documentElement.style.overflow="")}))},async toggleBrowserFullscreen(){if(this.gameStarted)try{document.fullscreenElement?await this.exitBrowserFullscreen():await this.enterBrowserFullscreen()}catch(e){throw e}else this.showNotificationMessage('Please click "PLAY NOW" to start the game first')},async enterBrowserFullscreen(){const e=this.$refs.gameContainer;if(e)try{e.requestFullscreen?await e.requestFullscreen():e.webkitRequestFullscreen?await e.webkitRequestFullscreen():e.msRequestFullscreen&&await e.msRequestFullscreen(),this.isIframeFullscreen&&(this.isIframeFullscreen=!1,document.body.style.overflow="",document.documentElement.style.overflow="")}catch(a){throw a}},async exitBrowserFullscreen(){try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.msExitFullscreen&&await document.msExitFullscreen()}catch(e){throw e}},showNotificationMessage(e){this.showNotification=!1,clearTimeout(this.notificationTimeout),this.notificationMessage=e,this.showNotification=!0,this.notificationTimeout=setTimeout((()=>{this.showNotification=!1}),3e3)},handleFullscreenChange(){this.isFullscreen=!!document.fullscreenElement},handleFullscreenClick(){this.toggleBrowserFullscreen()},handleIframeFullscreenClick(){this.gameStarted?this.toggleIframeFullscreen():this.showNotificationMessage('Please click "PLAY NOW" to start the game first')},onPreviewImageLoad(){requestIdleCallback((()=>{this.loadBackgroundImage()}),{timeout:100})},loadBackgroundImage(){if(!this.$refs.gameBackground||this.backgroundLoaded)return;const e=new Image;e.onload=()=>{this.$refs.gameBackground.style.backgroundImage=`url(${this.game.imageUrl})`,this.backgroundLoaded=!0},e.onerror=()=>{this.$refs.gameBackground.style.background="linear-gradient(135deg, #667eea 0%, #764ba2 100%)",this.backgroundLoaded=!0},e.src=this.game.imageUrl}},mounted(){document.addEventListener("fullscreenchange",this.handleFullscreenChange),document.addEventListener("webkitfullscreenchange",this.handleFullscreenChange),document.addEventListener("mozfullscreenchange",this.handleFullscreenChange),document.addEventListener("MSFullscreenChange",this.handleFullscreenChange)},beforeUnmount(){document.removeEventListener("fullscreenchange",this.handleFullscreenChange),document.removeEventListener("webkitfullscreenchange",this.handleFullscreenChange),document.removeEventListener("mozfullscreenchange",this.handleFullscreenChange),document.removeEventListener("MSFullscreenChange",this.handleFullscreenChange),this.isIframeFullscreen&&(document.body.style.overflow="",document.documentElement.style.overflow="",document.removeEventListener("touchmove",this.preventScroll),document.removeEventListener("wheel",this.preventScroll)),this.notificationTimeout&&clearTimeout(this.notificationTimeout)}},T={class:"game-iframe-container",ref:"gameContainer"},G=["src","title","aria-label"],R={key:1,class:"game-overlay"},L={class:"game-preview"},S=["src","alt"],x={class:"fullscreen-controls-bottom"}
1,B={class:"theater-controls-overlay"},P=F(N,[["render",function(o,c,m,d,u,g){return a(),e("div",{class:l(["game-container",{"theater-mode":u.isIframeFullscreen}])},[t("div",T,[g.gameUrl&&m.gameStarted?(a(),e("iframe",{key:0,ref:"gameIframe",src:g.gameUrl,frameborder:"0",allowfullscreen:"",allow:"fullscreen; autoplay; clipboard-write",referrerpolicy:"origin",sandbox:"allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts",title:g.gameTitle,"aria-label":g.gameTitle+" Game Interface"},null,8,G)):i("",!0),m.gameStarted?i("",!0):(a(),e("div",R,[t("div",{class:l(["game-background",{"background-loaded":u.backgroundLoaded}]),ref:"gameBackground"},null,2),c[5]||(c[5]=t("div",{class:"glass-effect"},null,-1)),t("div",L,[t("img",{src:m.game.imageUrl,alt:g.gameTitle,class:"game-preview-image",loading:"eager",fetchpriority:"high",decoding:"async",width:"150",height:"150",onLoad:c[0]||(c[0]=(...e)=>g.onPreviewImageLoad&&g.onPreviewImageLoad(...e))},null,40,S),t("button",{class:"play-now-button",onClick:c[1]||(c[1]=(...e)=>g.startGame&&g.startGame(...e)),"aria-label":"Play Now"}," PLAY NOW ")])]))],512),s(t("div",x,[t("button",{class:"fullscreen-button",onClick:c[2]||(c[2]=(...e)=>g.handleFullscreenClick&&g.handleFullscreenClick(...e)),title:"Browser Fullscreen","aria-label":"Browser Fullscreen"},c[6]||(c[6]=[t("svg",{viewBox:"0 0 24 24",width:"20",height:"20"},[t("path",{fill:"currentColor",d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})],-1),r(" Fullscreen ")])),t("button",{class:"fullscreen-button",onClick:c[3]||(c[3]=(...e)=>g.handleIframeFullscreenClick&&g.handleIframeFullscreenClick(...e)),title:"Theater Mode","aria-label":"Theater Mode"},c[7]||(c[7]=[t("svg",{viewBox:"0 0 24 24",width:"20",height:"20"},[t("path",{fill:"currentColor",d:"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H5V8h14v10z"})],-1),r(" Theater ")]))],512),[[n,!u.isIframeFullscreen]]),s(t("div",B,[t("button",{class:"fullscreen-button exit-theater",onClick:c[4]||(c[4]=(...e)=>g.handleIframeFullscreenClick&&g.handleIframeFullscreenClick(...e)),title:"Exit Theater Mode","aria-label":"Exit Theater Mode"},c[8]||(c[8]=[t("svg",{viewBox:"0 0 24 24",width:"20",height:"20"},[t("path",{fill:"currentColor",d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"})],-1),r(" Exit Theater ")]))],512),[[n,u.isIframeFullscreen]])],2)}],["__scopeId","data-v-e04bd184"]]),A={class:"game-details-wrapper"},U=["innerHTML"],q={key:1,class:"game-details"},z={class:"game-meta"},H=["aria-label"],$={class:"rating-value"},_=["aria-label"],V={key:1,class:"game-plays"},j=F({name:"GameInfo",props:{game:{type:Object,required:!0}},computed:{hasGameMeta(){return this.game.rating||this.game.playCount}}},[["render",function(s,n,r,d,u,g){return a(),e("div",A,[r.game.detailsHtml?(a(),e("div",{key:0,class:"game-details-html content-html",innerHTML:r.game.detailsHtml},null,8,U)):i("",!0),g.hasGameMeta?(a(),e("div",q,[t("div",z,[r.game.rating?(a(),e("div",{key:0,class:"game-rating","aria-label":"Game Rating: "+r.game.rating},[t("span",$,o(r.game.rating),1),t("div",{class:"stars",role:"img","aria-label":r.game.rating+" star rating"},[(a(),e(c,null,m(5,(e=>t("i",{key:e,class:l(["star",{filled:e<=Math.floor(r.game.rating)}])},null,2))),64))],8,_)],8,H)):i("",!0),r.game.playCount?(a(),e("div",V,[n[0]||(n[0]=t("svg",{viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":"true"},[t("path",{fill:"currentColor",d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})],-1)),t("span",null,o(r.game.playCount.toLocaleString())+" plays",1)])):i("",!0)])])):i("",!0)])}],["__scopeId","data-v-c100f5d9"]]),O={class:"comment-section"},Y={class:"message-icon"},D={key:0},W={key:1},J={key:2},K={key:3},Q={class:"message-content"},X={class:"comment-stats"},Z={class:"average-rating"},ee={class:"rating-number"},ae={class:"rating-stars"},te={class:"stars"},se={class:"rating-count"},ie={class:"rating-bars"},le={class:"rating-label"},ne={class:"rating-bar-container"},re={class:"rating-percentage"},oe={class:"comment-list"},ce={key:0,class:"loading-comments"},me={key:1,class:"error-message"},de={key:2,class:"no-comments"},ue={class:"comment-content"},ge={class:"comment-header"},he={class:"comment-user"},ve={class:"comment-date"},fe={class:"comment-rating"},pe={class:"stars"},ye={class:"comment-text"},we={class:"comment-form"},be={class:"form-group"},ke={class:"form-group"},Ce={key:0,class:"error-text"},Fe={class:"form-group rating-input"},Ee={class:"stars-input-container"},Me={class:"stars-input"},Ie=["onClick","onMouseover"],Ne={key:0,class:"rating-tooltip"},Te={key:1,class:"rating-tooltip selected"},Ge={class:"form-group"},Re={name:"GameSidebar",components:{CommentSection:F({name:"CommentSection",props:{gameId:{type:Number,required:!0}},data:()=>({userRating:0,hoverRating:0,userName:"",userEmail:"",userComment:"",comments:[],isLoading:!1,error:null,emailError:"",notification:{show:!1,type:"success",title:"",message:"",timeout:null},apiBaseUrl:"https://chill-guy-clicker-api.vercel.app/api"}),computed:{averageRating(){if(0===this.comments.length)return 0;const e=this.comments.reduce(((e,a)=>e+Number(a.rating)),0);return Number((e/this.comments.length).toFixed(1))}},watch:{gameId:{handler(e,a){e!==a&&this.loadComments()},immediate:!0}},methods:{async loadComments(){this.isLoading=!0,this.error=null,this.comments=[];try{const e=`${this.apiBaseUrl}/comments/game/${this.gameId}`,a=await fetch(e,{method:"GET",headers:{Accept:"application/json"}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const t=await a.json();this.comments=t.comments||t||[],this.ratingStats=t.ratingStats||{average:0,total:0}}catch(e){this.comments=[],this.ratingStats={average:0,total:0},this.error="Failed to load comments"}finally{this.isLoading=!1}},async addComment(e){try{const a=await fetch(`${this.apiBaseUrl}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),t=await a.text();if(!a.ok)throw new Error(`APIé误 ${a.status}: ${t}`);const s=JSON.parse(t);return await this.loadComments(),s}catch(a){throw a}},formatDate(e){try{const a=new Date(e);return isNaN(a.getTime())?"Invalid date":a.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch(a){return"Invalid date"}},isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),validateEmail(){if(!this.userEmail.trim())return this.emailError="",!0;const e=this.isValidEmail(this.userEmail);return this.emailError=e?"":"Please enter a valid email address",e},getRatingPercentage(e){if(0===this.comments.length)return 0;const a=this.comments.filter((a=>Math.round(Number(a.rating))===e)).length;return Math.round(a/this.comments.length*100)},setRating(e){this.userRating=e},showNotification(e,a,t,s=3e3){this.notification.timeout&&clearTimeout(this.notification.timeout),this.notification={show:!0,type:e||"info",message:t||a,timeout:null},this.notification.timeout=setTimeout((()=>{this.closeNotification()}),s)},closeNotification(){this.notification.show=!1,this.notification.timeout&&(clearTimeout(this.notification.timeout),this.notification.timeout=null)},async submitComment(){if(this.userName.trim())if(!this.userEmail.trim()||this.isValidEmail(this.userEmail))if(0!==this.userRating)if(this.userComment.trim())try{const e=document.querySelector(".submit-button");e&&(e.disabled=!0,e.textContent="Submitting...");const a={gameId:this.gameId,username:this.userName,email:this.userEmail,rating:this.userRating,content:this.userComment};await this.addComment(a),this.userName="",this.userEmail="",this.userRating=0,this.userComment="",this.showNotification("success",null,"Your review has been successfully added!")}catch(e){this.showNotification("error",null,`Failed to submit review: ${e.message||"Unknown error"}`)}finally{const e=document.querySelector(".submit-button");e&&(e.disabled=!1,e.textContent="Submit Review")}else this.showNotification("warning",null,"Please enter your review");else this.showNotification("warning",null,"Please select a rating");else this.showNotification("warning",null,"Please enter a valid email address");else this.showNotification("warning",null,"Please enter your name")}}},[["render",function(n,g,h,v,f,p){return a(),e("div",O,[f.notification.show?(a(),e("div",{key:0,class:l(["message-notification",{success:"success"===f.notification.type,error:"error"===f.notification.type,warning:"warning"===f.notification.type,info:"info"===f.notification.type}])},[t("span",Y,["success"===f.notification.type?(a(),e("span",D,"â")):"error"===f.notification.type?(a(),e("span",W,"â")):"warning"===f.notification.type?(a(),e("span",J,"!")):(a(),e("span",K,"i"))]),t("span",Q,o(f.notification.message),1),t("button",{class:"message-close",onClick:g[0]||(g[0]=(...e)=>p.closeNotification&&p.closeNotification(...e))},"Ã")],2)):i("",!0),g[16]||(g[16]=t("h3",{class:"section-title"},"Player Reviews",-1)),t("div",X,[t("div",Z,[t("div",ee,o(p.averageRating),1),t("div",ae,[t("div",te,[(a(),e(c,null,m(5,(e=>t("i",{key:e,class:l(["star",{filled:e<=Math.floor(p.averageRating),half:e===Math.ceil(p.averageRating)&&p.averageRating%1>=.5}])},null,2))),64))]),t("div",se,o(f.comments.length)+" reviews",1)])]),t("div",ie,[(a(),e(c,null,m(5,(e=>t("div",{class:"rating-bar-item",key:e},[t("div",le,o(6-e),1),t("div",ne,[t("div",{class:"rating-bar",style:u({width:p.getRatingPercentage(6-e)+"%"})}
1,null,4)]),t("div",re,o(p.getRatingPercentage(6-e))+"%",1)]))),64))])]),t("div",oe,[f.isLoading?(a(),e("div",ce,g[9]||(g[9]=[t("p",null,"Loading reviews...",-1)]))):f.error?(a(),e("div",me,[t("p",null,o(f.error),1),t("button",{onClick:g[1]||(g[1]=(...e)=>p.loadComments&&p.loadComments(...e)),class:"retry-button"},"Retry")])):0===f.comments.length?(a(),e("div",de,g[10]||(g[10]=[t("p",null,"No reviews yet. Be the first to leave a review!",-1)]))):(a(!0),e(c,{key:3},m(f.comments,(s=>(a(),e("div",{class:"comment-item",key:s.id},[t("div",ue,[t("div",ge,[t("div",he,o(s.username),1),t("div",ve,o(p.formatDate(s.created_at)),1)]),t("div",fe,[t("div",pe,[(a(),e(c,null,m(5,(e=>t("i",{key:e,class:l(["star",{filled:e<=Math.floor(Number(s.rating)),half:e===Math.ceil(Number(s.rating))&&Number(s.rating)%1>=.5}])},null,2))),64))])]),t("div",ye,o(s.content),1)])])))),128))]),t("div",we,[g[15]||(g[15]=t("h4",{class:"form-title"},"Leave a Review",-1)),t("div",be,[g[11]||(g[11]=t("label",{for:"userName"},"Your Name:",-1)),s(t("input",{type:"text",id:"userName",class:"form-input",placeholder:"Enter your name","onUpdate:modelValue":g[2]||(g[2]=e=>f.userName=e)},null,512),[[d,f.userName]])]),t("div",ke,[g[12]||(g[12]=t("label",{for:"userEmail"},[r("Your Email: "),t("span",{class:"optional"},"(Optional)")],-1)),s(t("input",{type:"email",id:"userEmail",class:l(["form-input",{"input-error":f.emailError}]),placeholder:"Enter your email (optional)","onUpdate:modelValue":g[3]||(g[3]=e=>f.userEmail=e),onInput:g[4]||(g[4]=(...e)=>p.validateEmail&&p.validateEmail(...e)),onBlur:g[5]||(g[5]=(...e)=>p.validateEmail&&p.validateEmail(...e))},null,34),[[d,f.userEmail]]),f.emailError?(a(),e("div",Ce,o(f.emailError),1)):i("",!0)]),t("div",Fe,[g[13]||(g[13]=t("span",{class:"rating-label"},"Your Rating:",-1)),t("div",Ee,[t("div",Me,[(a(),e(c,null,m(5,(e=>t("i",{key:e,class:l(["star",{filled:e<=f.userRating,hover:e<=f.hoverRating&&f.hoverRating>0}]),onClick:a=>p.setRating(e),onMouseover:a=>f.hoverRating=e,onMouseleave:g[6]||(g[6]=e=>f.hoverRating=0)},null,42,Ie))),64))]),f.hoverRating>0?(a(),e("div",Ne,o(f.hoverRating)+" "+o(1===f.hoverRating?"Star":"Stars"),1)):f.userRating>0?(a(),e("div",Te,o(f.userRating)+" "+o(1===f.userRating?"Star":"Stars"),1)):i("",!0)])]),t("div",Ge,[g[14]||(g[14]=t("label",{for:"userComment"},"Your Review:",-1)),s(t("textarea",{id:"userComment",class:"comment-textarea",placeholder:"Share your gaming experience...","onUpdate:modelValue":g[7]||(g[7]=e=>f.userComment=e)},null,512),[[d,f.userComment]])]),t("button",{class:"submit-button",onClick:g[8]||(g[8]=(...e)=>p.submitComment&&p.submitComment(...e))},"Submit Review")])])}],["__scopeId","data-v-cf062aae"]])},props:{hotGames:{type:Array,required:!0},newGames:{type:Array,default:()=>[]},gameId:{type:Number,default:null},isTheaterMode:{type:Boolean,default:!1}},methods:{getGameRoute:e=>1===e.id&&""===e.addressBar?"/":"/"+(e.addressBar||e.id)}},Le={class:"game-sidebar"},Se={class:"hot-games"},xe={class:"games-list"},Be=["href","aria-label"],Pe=["src","alt"],Ae={class:"game-title"},Ue={key:0,class:"new-games"},qe={class:"games-list"},ze=["href","aria-label"],He=["src","alt"],$e={class:"game-title"},_e={key:1,class:"player-reviews"},Ve=F(Re,[["render",function(s,l,n,r,d,u){const v=g("CommentSection");return a(),e("aside",Le,[t("section",Se,[l[0]||(l[0]=t("h2",{class:"section-title"},"Hot Games",-1)),t("div",xe,[(a(!0),e(c,null,m(n.hotGames,(s=>(a(),e("a",{key:"hot-"+s.id,class:"game-card",href:u.getGameRoute(s),"aria-label":"Play "+(s.pageTitle||s.title)+" game"},[t("img",{src:s.thumbnail||s.imageUrl,alt:s.imageAlt||s.title,class:"game-img"},null,8,Pe),t("h3",Ae,o(s.pageTitle||s.title),1)],8,Be)))),128))])]),n.newGames&&n.newGames.length>0?(a(),e("section",Ue,[l[2]||(l[2]=t("h2",{class:"section-title"},"New Games",-1)),t("div",qe,[(a(!0),e(c,null,m(n.newGames,(s=>(a(),e("a",{key:"new-"+s.id,class:"game-card",href:u.getGameRoute(s),"aria-label":"Play "+(s.pageTitle||s.title)+" game"},[t("img",{src:s.thumbnail||s.imageUrl,alt:s.imageAlt||s.title,class:"game-img"},null,8,He),t("h3",$e,o(s.pageTitle||s.title),1),l[1]||(l[1]=t("span",{class:"new-badge"},"NEW",-1))],8,ze)))),128))])])):i("",!0),n.gameId?(a(),e("section",_e,[h(v,{gameId:n.gameId,class:"sidebar-comment-section"},null,8,["gameId"])])):i("",!0)])}],["__scopeId","data-v-e843304f"]]),je={name:"MoreGames",props:{games:{type:Array,required:!0},showAllMoreGames:{type:Boolean,default:!1},isMobile:{type:Boolean,default:!1},toggleMoreGames:{type:Function,required:!0}},methods:{getGameRoute:e=>1===e.id?"/":2===e.id?"/Chill-Guy-Girl":"/"+(e.addressBar||e.id)}},Oe={class:"more-games"},Ye={class:"more-games-grid"},De=["href","aria-label"],We=["src","alt"],Je={class:"more-game-title"},Ke=F(je,[["render",function(s,i,n,r,d,g){return a(),e("section",Oe,[i[2]||(i[2]=t("h2",{class:"section-title"},"More Games",-1)),t("div",Ye,[(a(!0),e(c,null,m(n.games,((s,i)=>(a(),e("a",{key:s.id,class:l(["more-game-card",{"mobile-hidden":n.isMobile&&!n.showAllMoreGames&&i>=6}]),href:g.getGameRoute(s),"aria-label":"Play "+(s.pageTitle||s.title)+" game"},[t("img",{src:s.thumbnail||s.imageUrl,alt:s.imageAlt||s.title,class:"more-game-img"},null,8,We),t("h3",Je,o(s.pageTitle||s.title),1)],10,De)))),128))]),t("div",{class:"more-button-container",style:u({visibility:n.isMobile&&!n.showAllMoreGames?"visible":"hidden",height:n.isMobile&&!n.showAllMoreGames?"auto":"0"})},[t("button",{class:"more-button",onClick:i[0]||(i[0]=(...e)=>n.toggleMoreGames&&n.toggleMoreGames(...e))},i[1]||(i[1]=[t("span",{class:"more-button-text"},"More Games",-1),t("span",{class:"more-button-icon"},"â",-1)]))],4)])}],["__scopeId","data-v-f66a4a7a"]]),Qe={class:"home-wrapper"},Xe={key:0,class:"ads-left"},Ze={class:"main-content container"},ea={key:0,class:"ads-wrapper"},aa={key:1,class:"ads-wrapper"},ta={class:"game-layout"},sa={class:"game-main"},ia={class:"featured-game"},la={key:1,class:"ads-wrapper"},na={key:0,class:"ads-wrapper"},ra={key:1,class:"ads-right"},oa=F({__name:"HomeView",setup(r){const{isMobile:c}=function(){const e=v(!1),a=()=>{e.value=window.matchMedia("(max-width: 767px)").matches};return a(),f((()=>{window.addEventListener("resize",a)})),p((()=>{window.removeEventListener("resize",a)})),{isMobile:e,checkDeviceType:a}}(),m=w(),d=v(!1),u=v(!1),g=y((()=>{const e=m.params.addressBar,a="/"===m.path,t=I.find((e=>1===e.id))||I[0];return(!a||e&&""!==e)&&e&&I.find((a=>a.addressBar&&a.addressBar.toLowerCase()===e.toLowerCase()||a.id&&String(a.id).toLowerCase()===e.toLowerCase()))||t})),F=y((()=>g.value)),N=y((()=>I.filter((e=>e.isHot)))),T=y((()=>I.filter((e=>e.isNew)))),G=v(!1),R=I.find((e=>1===e.id))||I[0],L=I.filter((e=>e.isMore||e.isRecommended)),S=y((()=>L)),x=()=>{d.value=!0},B=e=>{u.value=e},A=()=>{G.value=!G.value};return f((()=>{setTimeout((()=>{try{(()=>{if(window.adsbygoogle&&"function"==typeof window.adsbygoogle.push)try{document.querySelectorAll(".adsbygoogle").forEach(((e,a)=>{try{"done"===e.getAttribute("data-adsbygoogle-status")||e.querySelector("iframe")||null===e.offsetParent||(window.adsbygoogle=window.adsbygoogle||[]).push({})}catch(t){}}))}catch(e){}})()}catch(e){}}),1e3)})),b(g,(e=>{e&&(d.value=!1)}),{immediate:!0}),(r,m)=>{var g,v,f,p,y,w,b,I,L;return a(),e("div",Qe,[h(E),t("div",{class:l(["home",{"theater-mode":u.value}])},[k(c)?i("",!0):(a(),e("aside",Xe,m[0]||(m[0]=[t("ins",{class:"adsbygoogle",style:{display:"block"},"data-ad-client":"ca-pub-4638984121333143","data-ad-slot":"6904540807","data-ad-format":"vertical","data-full-width-responsive":"true"},null,-1)]))),t("main",Ze,[k(c)?i("",!0):(a(),e("aside",ea,m[1]||(m[1]=[t("ins",{class:"adsbygoogle",style:{display:"block"},"data-ad-client":"ca-pub-4638984121333143","data-ad-slot":"3707198686","data-ad-format":"auto","data-full-width-responsive":"true"},null,-1)]))),k(c)?(a(),e("aside",aa,m[2]||(m[2]=[t("ins",{class:"adsbygoogle",style:{display:"block"},"data-ad-client":"ca-pub-4638984121333143","data-ad-slot":"3423077907","data-ad-format":"auto","data-full-width-responsive":"true"},null,-1)]))):i("",!0),s(t("h1",{class:"game-title"},o((null==(g=F.value)?void 0:g.pageTitle)||(null==(v=F.value)?void 0:v.title)||(null==(f=k(R))?void 0:f.pageTitle)||(null==(p=k(R))?void 0:p.title)||"Chill Guy Clicker"),513),[[n,!u.value]]),t("div",ta,[t("section",sa,[t("article",ia,[h(P,{game:F.value||k(R),gameStarted:d.value,onStartGame:x,onTheaterModeChanged:B},null,8,["game","gameStarted"]),(null==(y=F.value)?void 0:y.detailsHtml)||(null==(w=F.value)?void 0:w.rating)||(null==(b=k(R))?void 0:b.detailsHtml)||(null==(I=k(R))?void 0:I.rating)?(a(),C(j,{key:0,game:F.value||k(R)},null,8,["game"])):i("",!0),k(c)?(a(),e("aside",la,m[3]||(m[3]=[t("ins",{class:"adsbygoogle",style:{display:"block"},"data-ad-client":"ca-pub-4638984121333143","data-ad-slot":"5857669556","data-ad-format":"auto","data-full-width-responsive":"true"},null,-1)]))):i("",!0)])]),k(c)?(a(),e("aside",na,m[4]||(m[4]=[t("ins",{class:"adsbygoogle",style:{display:"block"},"data-ad-client":"ca-pub-4638984121333143","data-ad-slot":"8919996910","data-ad-format":"auto","data-full-width-responsive":"true"}
1,null,-1)]))):i("",!0),s(h(Ve,{hotGames:N.value,newGames:T.value,gameId:null==(L=F.value||k(R))?void 0:L.id,isTheaterMode:u.value},null,8,["hotGames","newGames","gameId","isTheaterMode"]),[[n,!u.value]])]),s(h(Ke,{games:S.value,showAllMoreGames:G.value,isMobile:k(c),toggleMoreGames:A},null,8,["games","showAllMoreGames","isMobile"]),[[n,!u.value]])]),h(M),k(c)?i("",!0):(a(),e("aside",ra,m[5]||(m[5]=[t("ins",{class:"adsbygoogle",style:{display:"block"},"data-ad-client":"ca-pub-4638984121333143","data-ad-slot":"5591459134","data-ad-format":"vertical"},null,-1)])))],2)])}}},[["__scopeId","data-v-87cd33cb"]]);export{oa as default};
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.