(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3979],{370:(e,a,s)=>{Promise.resolve().then(s.bind(s,7313))},1469:(e,a,s)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),!function(e,a){for(var s in a)Object.defineProperty(e,s,{enumerable:!0,get:a[s]})}(a,{default:function(){return i},getImageProps:function(){return c}});let t=s(8229),l=s(8883),r=s(3063),o=t._(s(1193));function c(e){let{props:a}=(0,l.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,s]of Object.entries(a))void 0===s&&delete a[e];return{props:a}}let i=r.Image},2015:()=>{},4120:()=>{},6052:()=>{},6766:(e,a,s)=>{"use strict";s.d(a,{default:()=>l.a});var t=s(1469),l=s.n(t)},7313:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>c});var t=s(5155),l=s(2115),r=s(6766);s(2015),s(4120),s(6052);let o=()=>{let[e,a]=(0,l.useState)(null),[s,o]=(0,l.useState)(null),[c,i]=(0,l.useState)(!0),[n,d]=(0,l.useState)("fallback"),[m,p]=(0,l.useState)(""),[h,_]=(0,l.useState)(null),[u,g]=(0,l.useState)(!1),[y,x]=(0,l.useState)(null),[v,j]=(0,l.useState)(!1),f="https://ns5j6tzwu4.execute-api.ap-southeast-2.amazonaws.com/prod",b=async()=>{try{let e=await fetch("".concat(f,"/leaderboard?limit=10"));if(!e.ok)throw Error("Failed to fetch leaderboard");let s=await e.json();s.leaderboard.length>0?(console.log("Successfully fetched leaderboard from API"),d("api"),a(s)):(console.log("API returned empty leaderboard"),d("fallback"),a({leaderboard:[{username:"GameMaster42",highest_score:312,total_score:2150,games_played:11,total_playtime:1650,last_played:"2025-07-26T08:10:00Z"},{username:"ProGamer2025",highest_score:287,total_score:1980,games_played:10,total_playtime:1400,last_played:"2025-07-26T07:55:00Z"},{username:"YuuMaster",highest_score:245,total_score:1240,games_played:8,total_playtime:1200,last_played:"2025-07-26T08:00:00Z"},{username:"FlappyFan",highest_score:234,total_score:1580,games_played:9,total_playtime:1340,last_played:"2025-07-26T06:45:00Z"},{username:"WingCommander",highest_score:201,total_score:1205,games_played:8,total_playtime:980,last_played:"2025-07-25T18:10:00Z"},{username:"PixelHunter",highest_score:189,total_score:920,games_played:6,total_playtime:900,last_played:"2025-07-25T15:30:00Z"},{username:"Flappyologist",highest_score:178,total_score:890,games_played:6,total_playtime:720,last_played:"2025-07-26T07:20:00Z"},{username:"SkyDancer",highest_score:167,total_score:1010,games_played:7,total_playtime:850,last_played:"2025-07-25T20:15:00Z"},{username:"YuuEnthusiast",highest_score:156,total_score:780,games_played:5,total_playtime:650,last_played:"2025-07-25T14:40:00Z"},{username:"BirdBrain",highest_score:98,total_score:456,games_played:5,total_playtime:600,last_played:"2025-07-24T12:20:00Z"}],total_shown:10,limit:10}))}catch(e){console.error("Error fetching leaderboard:",e),d("fallback"),a({leaderboard:[{username:"GameMaster42",highest_score:312,total_score:2150,games_played:11,total_playtime:1650,last_played:"2025-07-26T08:10:00Z"},{username:"ProGamer2025",highest_score:287,total_score:1980,games_played:10,total_playtime:1400,last_played:"2025-07-26T07:55:00Z"},{username:"YuuMaster",highest_score:245,total_score:1240,games_played:8,total_playtime:1200,last_played:"2025-07-26T08:00:00Z"},{username:"FlappyFan",highest_score:234,total_score:1580,games_played:9,total_playtime:1340,last_played:"2025-07-26T06:45:00Z"},{username:"WingCommander",highest_score:201,total_score:1205,games_played:8,total_playtime:980,last_played:"2025-07-25T18:10:00Z"},{username:"PixelHunter",highest_score:189,total_score:920,games_played:6,total_playtime:900,last_played:"2025-07-25T15:30:00Z"},{username:"Flappyologist",highest_score:178,total_score:890,games_played:6,total_playtime:720,last_played:"2025-07-26T07:20:00Z"},{username:"SkyDancer",highest_score:167,total_score:1010,games_played:7,total_playtime:850,last_played:"2025-07-25T20:15:00Z"},{username:"YuuEnthusiast",highest_score:156,total_score:780,games_played:5,total_playtime:650,last_played:"2025-07-25T14:40:00Z"},{username:"BirdBrain",highest_score:98,total_score:456,games_played:5,total_playtime:600,last_played:"2025-07-24T12:20:00Z"}],total_shown:10,limit:10})}},N=async()=>{try{let e=await fetch("".concat(f,"/stats/global"));if(e.ok){let a=await e.json();o(a);return}let a=null;for(let e of["globalstats","global-stats","global_stats","stats"])try{let s=await fetch("".concat(f,"/").concat(e));if(s.ok){a=await s.json();break}}catch(a){console.log("Endpoint ".concat(e," failed, trying next..."))}a?o(a):o({global_stats:{total_players:11,total_games_played:79,total_score:12245,total_playtime:10620,average_score_per_game:Math.round(155),average_playtime_per_game:Math.round(10620/79),average_games_per_player:Math.round(79/11)},computed:{total_players:11,total_games_played:79,total_score:12245,total_playtime:10620,average_score_per_game:Math.round(155),average_playtime_per_game:Math.round(10620/79),average_games_per_player:Math.round(79/11)},raw_stats:{total_players:11,total_games_played:79,total_score:12245,total_playtime:10620,average_score_per_game:0,average_playtime_per_game:0,average_games_per_player:0}})}catch(e){console.error("Error fetching global stats"),o({global_stats:{total_players:11,total_games_played:79,total_score:12245,total_playtime:10620,average_score_per_game:Math.round(155),average_playtime_per_game:Math.round(10620/79),average_games_per_player:Math.round(79/11)},computed:{total_players:11,total_games_played:79,total_score:12245,total_playtime:10620,average_score_per_game:Math.round(155),average_playtime_per_game:Math.round(10620/79),average_games_per_player:Math.round(79/11)},raw_stats:{total_players:11,total_games_played:79,total_score:12245,total_playtime:10620,average_score_per_game:0,average_playtime_per_game:0,average_games_per_player:0}})}},Q=async e=>{if(!e.trim())return void x("Please enter a username");g(!0),x(null);try{let a=await fetch("".concat(f,"/leaderboard/around/").concat(encodeURIComponent(e.trim()),"?range=5"));if(404===a.status){x("Player not found"),g(!1);return}if(!a.ok)throw Error("Failed to fetch player leaderboard");let s=await a.json();_(s),j(!0),console.log("Successfully fetched player leaderboard from API")}catch(e){console.error("Error searching for player:",e),x("Failed to search for player. Please try again.")}finally{g(!1)}};(0,l.useEffect)(()=>{(async()=>{i(!0),await Promise.all([b(),N()]),i(!1)})()},[]);let w=e=>{try{let a=new Date(e),s=new Date,t=Math.abs(s.getTime()-a.getTime()),l=Math.floor(t/864e5);if(0===l)return"Today";if(1===l)return"Yesterday";if(l<7)return"".concat(l," days ago");return a.toLocaleDateString()}catch(e){return"Unknown"}};return c?(0,t.jsx)("div",{className:"flappy-leaderboard-container",children:(0,t.jsxs)("div",{className:"leaderboard-loading",children:[(0,t.jsx)("div",{className:"loading-spinner"}),(0,t.jsx)("p",{children:"Loading leaderboard..."})]})}):(0,t.jsxs)("div",{className:"flappy-leaderboard-container",children:[(0,t.jsx)("h2",{className:"leaderboard-title",children:"\uD83C\uDFC6 Flappy Yuu Leaderboard"}),(0,t.jsxs)("div",{className:"leaderboard-section",children:[(0,t.jsxs)("div",{className:"section-header",children:[(0,t.jsx)("h3",{children:v?'Players around "'.concat(null==h?void 0:h.username,'"'):"Top 10 Players"}),(0,t.jsx)("div",{className:"search-controls",children:(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),Q(m)},className:"player-search-form",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>p(e.target.value),placeholder:"Search for player...",className:"search-input",disabled:u}),(0,t.jsx)("button",{type:"submit",className:"search-button",disabled:u||!m.trim(),children:u?"\uD83D\uDD04":"\uD83D\uDD0D"}),v&&(0,t.jsx)("button",{type:"button",onClick:()=>{j(!1),_(null),p(""),x(null)},className:"clear-search-button",children:"↩️"})]})}),(0,t.jsx)("div",{className:"data-status ".concat("api"===n?"live":"fallback"),children:"api"===n?"\uD83D\uDFE2 Live Data":"\uD83D\uDCCA Sample Data"})]}),y&&(0,t.jsx)("div",{className:"search-error",children:(0,t.jsxs)("p",{children:["⚠️ ",y]})}),(v?h:e)&&(v?h.leaderboard.length>0:e.leaderboard.length>0)?(0,t.jsxs)("div",{className:"leaderboard-table",children:[(0,t.jsxs)("div",{className:"leaderboard-header",children:[(0,t.jsx)("div",{className:"rank-col",children:"Rank"}),(0,t.jsx)("div",{className:"player-col",children:"Player"}),(0,t.jsx)("div",{className:"score-col",children:"High Score"}),(0,t.jsx)("div",{className:"total-col",children:"Total Score"}),(0,t.jsx)("div",{className:"games-col",children:"Games"}),(0,t.jsx)("div",{className:"time-col",children:"Last Played"})]}),(v?h.leaderboard:e.leaderboard).map(a=>{let s=v?a.rank||0:e.leaderboard.indexOf(a)+1,l=v&&a.is_current_player;return(0,t.jsxs)("div",{className:"leaderboard-row ".concat(s<=3?"rank-".concat(s):""," ").concat(l?"current-player":""),children:[(0,t.jsx)("div",{className:"rank-col",children:s<=3?(0,t.jsx)("span",{className:"medal",children:(0,t.jsx)(r.default,{src:"/content/icons/medals/yuucoin-".concat(1===s?"gold":2===s?"silver":"bronze",".webp"),alt:"".concat(1===s?"Gold":2===s?"Silver":"Bronze"," Medal"),className:"medal-image",width:24,height:24})}):(0,t.jsxs)("span",{className:"rank-number",children:["#",s]})}),(0,t.jsx)("div",{className:"player-col",children:(0,t.jsxs)("span",{className:"player-name ".concat(l?"current-player-name":""),children:[a.username,l&&" \uD83D\uDC64"]})}),(0,t.jsx)("div",{className:"score-col",children:(0,t.jsx)("span",{className:"high-score",children:a.highest_score.toLocaleString()})}),(0,t.jsx)("div",{className:"total-col",children:(0,t.jsx)("span",{className:"total-score",children:a.total_score.toLocaleString()})}),(0,t.jsx)("div",{className:"games-col",children:(0,t.jsx)("span",{className:"games-count",children:a.games_played})}),(0,t.jsx)("div",{className:"time-col",children:(0,t.jsx)("span",{className:"last-played",children:w(a.last_played)})})]},a.username)})]}):(0,t.jsx)("div",{className:"no-data",children:(0,t.jsx)("p",{children:"\uD83C\uDFAE No players found. Be the first to set a high score!"})})]}),(0,t.jsxs)("div",{className:"stats-section",children:[(0,t.jsx)("h3",{children:"Global Statistics"}),s?(0,t.jsxs)("div",{className:"stats-grid",children:[(0,t.jsxs)("div",{className:"stat-card",children:[(0,t.jsx)("div",{className:"stat-icon",children:"\uD83D\uDC65"}),(0,t.jsxs)("div",{className:"stat-content",children:[(0,t.jsx)("div",{className:"stat-number",children:s.global_stats.total_players.toLocaleString()}),(0,t.jsx)("div",{className:"stat-label",children:"Total Players"})]})]}),(0,t.jsxs)("div",{className:"stat-card",children:[(0,t.jsx)("div",{className:"stat-icon",children:"\uD83C\uDFAE"}),(0,t.jsxs)("div",{className:"stat-content",children:[(0,t.jsx)("div",{className:"stat-number",children:s.global_stats.total_games_played.toLocaleString()}),(0,t.jsx)("div",{className:"stat-label",children:"Games Played"})]})]}),(0,t.jsxs)("div",{className:"stat-card",children:[(0,t.jsx)("div",{className:"stat-icon",children:"⭐"}),(0,t.jsxs)("div",{className:"stat-content",children:[(0,t.jsx)("div",{className:"stat-number",children:s.global_stats.total_score.toLocaleString()}),(0,t.jsx)("div",{className:"stat-label",children:"Total Score"})]})]}),(0,t.jsxs)("div",{className:"stat-card",children:[(0,t.jsx)("div",{className:"stat-icon",children:"⏱️"}),(0,t.jsxs)("div",{className:"stat-content",children:[(0,t.jsx)("div",{className:"stat-number",children:(e=>{let a=Math.floor(e/3600),s=Math.floor(e%3600/60);return a>0?"".concat(a,"h ").concat(s,"m"):"".concat(s,"m")})(s.global_stats.total_playtime)}),(0,t.jsx)("div",{className:"stat-label",children:"Total Playtime"})]})]}),(0,t.jsxs)("div",{className:"stat-card",children:[(0,t.jsx)("div",{className:"stat-icon",children:"\uD83D\uDCCA"}),(0,t.jsxs)("div",{className:"stat-content",children:[(0,t.jsx)("div",{className:"stat-number",children:s.global_stats.average_score_per_game.toFixed(2)}),(0,t.jsx)("div",{className:"stat-label",children:"Avg Score/Game"})]})]}),(0,t.jsxs)("div",{className:"stat-card",children:[(0,t.jsx)("div",{className:"stat-icon",children:"\uD83C\uDFAF"}),(0,t.jsxs)("div",{className:"stat-content",children:[(0,t.jsx)("div",{className:"stat-number",children:s.global_stats.average_games_per_player.toFixed(2)}),(0,t.jsx)("div",{className:"stat-label",children:"Avg Games/Player"})]})]})]}):(0,t.jsx)("div",{className:"no-data",children:(0,t.jsx)("p",{children:"\uD83D\uDCCA Unable to load global statistics"})})]})]})};function c(){return(0,t.jsxs)("div",{className:"temp-game-layout navbar-spaced",children:[(0,t.jsxs)("div",{className:"temp-video-section video-section-with-navbar",children:[(0,t.jsx)("video",{src:"/content/games/flappy-yuu/flappyyuu-backgroundvideo-wide.mp4",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"temp-video"}),(0,t.jsx)("div",{className:"temp-logo-container",children:(0,t.jsx)(r.default,{src:"/content/games/flappy-yuu/GameLogo-FlappyYuu.webp",alt:"Flappy Yuu Game Logo",className:"temp-logo-image",width:400,height:200})}),(0,t.jsxs)("div",{className:"temp-scroll-arrow",onClick:()=>{let e=document.querySelector(".temp-content-box");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},children:[(0,t.jsx)("div",{className:"temp-scroll-arrow-clickable"}),(0,t.jsx)(r.default,{src:"/content/icons/general/triangle-64px.png",alt:"Scroll down",className:"temp-scroll-arrow-image",width:64,height:64})]})]}),(0,t.jsx)("div",{className:"temp-wave-transition",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 3200 64",className:"temp-wave-svg",children:[(0,t.jsx)("defs",{children:(0,t.jsx)("filter",{id:"topShadow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:(0,t.jsx)("feDropShadow",{dx:"0",dy:"-6",stdDeviation:"4",floodColor:"rgba(0,0,0,0.3)",floodOpacity:"1"})})}),(0,t.jsx)("path",{d:"M-800,32 Q-750,12 -700,32 Q-650,52 -600,32 Q-550,12 -500,32 Q-450,52 -400,32 Q-350,12 -300,32 Q-250,52 -200,32 Q-150,12 -100,32 Q-50,52 0,32 Q50,12 100,32 Q150,52 200,32 Q250,12 300,32 Q350,52 400,32 Q450,12 500,32 Q550,52 600,32 Q650,12 700,32 Q750,52 800,32 Q850,12 900,32 Q950,52 1000,32 Q1050,12 1100,32 Q1150,52 1200,32 Q1250,12 1300,32 Q1350,52 1400,32 Q1450,12 1500,32 Q1550,52 1600,32 Q1650,12 1700,32 Q1750,52 1800,32 Q1850,12 1900,32 Q1950,52 2000,32 Q2050,12 2100,32 Q2150,52 2200,32 Q2250,12 2300,32 Q2350,52 2400,32 Q2450,12 2500,32 Q2550,52 2600,32 Q2650,12 2700,32 Q2750,52 2800,32 Q2850,12 2900,32 Q2950,52 3000,32 Q3050,12 3100,32 Q3150,52 3200,32 L3200,64 L-800,64 Z",fill:"white"}),(0,t.jsx)("path",{d:"M-800,32 Q-750,12 -700,32 Q-650,52 -600,32 Q-550,12 -500,32 Q-450,52 -400,32 Q-350,12 -300,32 Q-250,52 -200,32 Q-150,12 -100,32 Q-50,52 0,32 Q50,12 100,32 Q150,52 200,32 Q250,12 300,32 Q350,52 400,32 Q450,12 500,32 Q550,52 600,32 Q650,12 700,32 Q750,52 800,32 Q850,12 900,32 Q950,52 1000,32 Q1050,12 1100,32 Q1150,52 1200,32 Q1250,12 1300,32 Q1350,52 1400,32 Q1450,12 1500,32 Q1550,52 1600,32 Q1650,12 1700,32 Q1750,52 1800,32 Q1850,12 1900,32 Q1950,52 2000,32 Q2050,12 2100,32 Q2150,52 2200,32 Q2250,12 2300,32 Q2350,52 2400,32 Q2450,12 2500,32 Q2550,52 2600,32 Q2650,12 2700,32 Q2750,52 2800,32 Q2850,12 2900,32 Q2950,52 3000,32 Q3050,12 3100,32 Q3150,52 3200,32 L3200,0 L-800,0 Z",fill:"transparent",filter:"url(#topShadow)"})]})}),(0,t.jsxs)("div",{className:"temp-content-box",children:[(0,t.jsxs)("div",{className:"temp-content-layout",children:[(0,t.jsxs)("div",{className:"temp-download-section",children:[(0,t.jsx)("h2",{children:"Download Links"}),(0,t.jsxs)("a",{href:"https://play.google.com/store/apps/details?id=com.liliovali.flappyyuu",target:"_blank",rel:"noopener noreferrer",className:"temp-download-btn googleplay-btn",children:[(0,t.jsx)(r.default,{src:"/content/icons/game-platforms/googleplay-64px.png",alt:"Google Play",className:"platform-icon",width:64,height:64}),"Google Play"]}),(0,t.jsxs)("a",{href:"https://liliovali.itch.io/flappy-yuu",target:"_blank",rel:"noopener noreferrer",className:"temp-download-btn itchio-btn",children:[(0,t.jsx)(r.default,{src:"/content/icons/game-platforms/itchio-64px.png",alt:"itch.io",className:"platform-icon",width:64,height:64}),"itch.io"]})]}),(0,t.jsxs)("div",{className:"temp-description-section",children:[(0,t.jsx)("h1",{children:"Flappy Yuu"}),(0,t.jsxs)("p",{children:["I made Flappy Yuu as a quick way to show off my mobile game dev skills. It features my character ",(0,t.jsx)("a",{href:"/lore?character=yuu",className:"yuui-link",children:"Yuu"}),", showing off their design and charm in a simple but fun game."]}),(0,t.jsx)("h2",{children:"More Than Just a Game"}),(0,t.jsxs)("p",{children:["Flappy Yuu also lives inside my ",(0,t.jsx)("a",{href:"/apps?app=yuui",className:"yuui-link",children:"Yuui desktop app"})," as a little minigame. I use it as a productivity tool - when I need a quick break from coding, I can play a round to reset my brain and stay motivated."]}),(0,t.jsx)("p",{children:"It's a neat example of how I like to make things that work together and serve multiple purposes."}),(0,t.jsx)("h2",{children:"Tools Used"}),(0,t.jsx)("p",{children:"Unity, C#, BFXR, Krita, Ableton"})]}),(0,t.jsx)("div",{className:"temp-margin-section"})]}),(0,t.jsx)("div",{className:"temp-leaderboard-section",children:(0,t.jsx)(o,{})})]})]})}}},e=>{var a=a=>e(e.s=a);e.O(0,[9270,4597,3063,8441,1684,7358],()=>a(370)),_N_E=e.O()}]);