pacman-contribution-graph 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -7
- package/assets/packman-demo.png +0 -0
- package/dist/pacman-contribution-graph.js +372 -341
- package/dist/pacman-contribution-graph.js.map +1 -1
- package/dist/pacman-contribution-graph.min.js +1 -1
- package/embeded/canvas.html +41 -0
- package/embeded/svg.html +18 -0
- package/index.html +79 -47
- package/package.json +3 -2
- package/server/api/contributions/route.ts.z +31 -0
- package/server/page.zts.z +13 -0
- package/src/assets/images/ghosts/blinky.png +0 -0
- package/src/assets/images/ghosts/clyde.png +0 -0
- package/src/assets/images/ghosts/inky.png +0 -0
- package/src/assets/images/ghosts/pinky.png +0 -0
- package/src/assets/images/ghosts/scared.png +0 -0
- package/src/canvas.ts +82 -94
- package/src/constants.ts +29 -2
- package/src/game.ts +144 -121
- package/src/index.ts +38 -23
- package/src/music-player.ts +13 -7
- package/src/store.ts +3 -2
- package/src/svg.ts +69 -78
- package/src/types.ts +7 -4
- package/src/utils.ts +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pacman-contribution-graph.js","mappings":";;;;;;;;;;;;;;;;AAAkI;AACrF;AACb;AACA;AAEhC,MAAM,YAAY,GAAG,GAAG,EAAE;IACzB,MAAM,WAAW,GAAG,kDAAU,GAAG,CAAC,iDAAS,GAAG,gDAAQ,CAAC,CAAC;IACxD,MAAM,YAAY,GAAG,mDAAW,GAAG,CAAC,iDAAS,GAAG,gDAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,sCAAsC;IAEtG,yCAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC;IACxC,yCAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,YAAY,CAAC;AAC3C,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,GAAG,EAAE;IACrB,yCAAK,CAAC,MAAM,CAAC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mB,GAAG,CAAO,IAAY,EAAE,EAAE;IACzD,MAAM,cAAc,GAAW;QAC9B,QAAQ,EAAE,QAAQ;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,SAAyC;QACjD,YAAY,EAAE,KAAK;QACnB,WAAW,EAAE,CAAC,CAAS,EAAE,EAAE,GAAE,CAAC;QAC9B,gBAAgB,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC;QAChC,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,IAAI;KAClB,CAAC;IACF,yCAAK,CAAC,MAAM,mCAAQ,cAAc,GAAK,IAAI,CAAE,CAAC;IAE9C,QAAQ,IAAI,CAAC,QAAQ,EAAE;QACtB,KAAK,QAAQ;YACZ,yCAAK,CAAC,aAAa,GAAG,MAAM,yCAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACvE,MAAM;QAEP,KAAK,QAAQ;YACZ,yCAAK,CAAC,aAAa,GAAG,MAAM,yCAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACvE,MAAM;KACP;IAED,uCAAI,CAAC,SAAS,EAAE,CAAC;AAClB,CAAC,EAAC","sources":["webpack://pacman-contribution-graph/./src/canvas.ts","webpack://pacman-contribution-graph/./src/constants.ts","webpack://pacman-contribution-graph/./src/game.ts","webpack://pacman-contribution-graph/./src/music-player.ts","webpack://pacman-contribution-graph/./src/store.ts","webpack://pacman-contribution-graph/./src/svg.ts","webpack://pacman-contribution-graph/./src/utils.ts","webpack://pacman-contribution-graph/webpack/bootstrap","webpack://pacman-contribution-graph/webpack/runtime/define property getters","webpack://pacman-contribution-graph/webpack/runtime/hasOwnProperty shorthand","webpack://pacman-contribution-graph/webpack/runtime/make namespace object","webpack://pacman-contribution-graph/./src/index.ts"],"sourcesContent":["import { CELL_SIZE, GAP_SIZE, GRID_HEIGHT, GRID_WIDTH, PACMAN_COLOR, PACMAN_COLOR_DEAD, PACMAN_COLOR_POWERUP } from './constants';\nimport { MusicPlayer } from './music-player';\nimport { Store } from './store';\nimport { Utils } from './utils';\n\nconst resizeCanvas = () => {\n\tconst canvasWidth = GRID_WIDTH * (CELL_SIZE + GAP_SIZE);\n\tconst canvasHeight = GRID_HEIGHT * (CELL_SIZE + GAP_SIZE) + 20; // Adding some space for months on top\n\n\tStore.config.canvas.width = canvasWidth;\n\tStore.config.canvas.height = canvasHeight;\n};\n\nconst drawGrid = () => {\n\tStore.config.canvas.getContext('2d')!.fillStyle = Utils.getCurrentTheme().gridBackground;\n\tStore.config.canvas.getContext('2d')!.fillRect(0, 0, Store.config.canvas.width, Store.config.canvas.height);\n\n\tfor (let x = 0; x < GRID_HEIGHT; x++) {\n\t\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\t\tconst intensity = Store.grid[x][y];\n\t\t\tif (intensity > 0) {\n\t\t\t\tconst adjustedIntensity = intensity < 0.2 ? 0.3 : intensity;\n\t\t\t\tconst color = Utils.hexToRGBA(Utils.getCurrentTheme().contributionBoxColor, adjustedIntensity);\n\t\t\t\tStore.config.canvas.getContext('2d')!.fillStyle = color;\n\t\t\t} else {\n\t\t\t\tStore.config.canvas.getContext('2d')!.fillStyle = Utils.getCurrentTheme().emptyContributionBoxColor;\n\t\t\t}\n\t\t\tStore.config.canvas.getContext('2d')!.beginPath();\n\t\t\tStore.config.canvas\n\t\t\t\t.getContext('2d')!\n\t\t\t\t.roundRect(y * (CELL_SIZE + GAP_SIZE), x * (CELL_SIZE + GAP_SIZE) + 15, CELL_SIZE, CELL_SIZE, 5);\n\t\t\tStore.config.canvas.getContext('2d')!.fill();\n\t\t}\n\t}\n\n\tStore.config.canvas.getContext('2d')!.fillStyle = Utils.getCurrentTheme().textColor;\n\tStore.config.canvas.getContext('2d')!.font = '10px Arial';\n\tStore.config.canvas.getContext('2d')!.textAlign = 'center';\n\n\tlet lastMonth = '';\n\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\tif (Store.monthLabels[y] !== lastMonth) {\n\t\t\tconst xPos = y * (CELL_SIZE + GAP_SIZE) + CELL_SIZE / 2;\n\t\t\tStore.config.canvas.getContext('2d')!.fillText(Store.monthLabels[y], xPos, 10);\n\t\t\tlastMonth = Store.monthLabels[y];\n\t\t}\n\t}\n};\n\nconst drawPacman = () => {\n\tconst x = Store.pacman.y * (CELL_SIZE + GAP_SIZE) + CELL_SIZE / 2;\n\tconst y = Store.pacman.x * (CELL_SIZE + GAP_SIZE) + CELL_SIZE / 2 + 15;\n\tconst radius = CELL_SIZE / 2;\n\n\t// Change Pac-Man's color to red if he's on power-up, dead, else yellow\n\tif (Store.pacman.deadReaminingDuration) {\n\t\tStore.config.canvas.getContext('2d')!.fillStyle = PACMAN_COLOR_DEAD;\n\t} else if (Store.pacman.powerupReaminingDuration) {\n\t\tStore.config.canvas.getContext('2d')!.fillStyle = PACMAN_COLOR_POWERUP;\n\t} else {\n\t\tStore.config.canvas.getContext('2d')!.fillStyle = PACMAN_COLOR;\n\t}\n\n\tconst mouthAngle = Store.pacmanMouthOpen ? 0.35 * Math.PI : 0.1 * Math.PI;\n\n\tlet startAngle, endAngle;\n\tswitch (Store.pacman.direction) {\n\t\tcase 'up':\n\t\t\tstartAngle = 1.5 * Math.PI + mouthAngle;\n\t\t\tendAngle = 1.5 * Math.PI - mouthAngle;\n\t\t\tbreak;\n\t\tcase 'down':\n\t\t\tstartAngle = 0.5 * Math.PI + mouthAngle;\n\t\t\tendAngle = 0.5 * Math.PI - mouthAngle;\n\t\t\tbreak;\n\t\tcase 'left':\n\t\t\tstartAngle = Math.PI + mouthAngle;\n\t\t\tendAngle = Math.PI - mouthAngle;\n\t\t\tbreak;\n\t\tcase 'right':\n\t\tdefault:\n\t\t\tstartAngle = 0 + mouthAngle;\n\t\t\tendAngle = 2 * Math.PI - mouthAngle;\n\t\t\tbreak;\n\t}\n\n\tStore.config.canvas.getContext('2d')!.beginPath();\n\tStore.config.canvas.getContext('2d')!.arc(x, y, radius, startAngle, endAngle);\n\tStore.config.canvas.getContext('2d')!.lineTo(x, y);\n\tStore.config.canvas.getContext('2d')!.fill();\n};\n\nconst drawGhosts = () => {\n\tStore.ghosts.forEach((ghost) => {\n\t\tconst x = ghost.y * (CELL_SIZE + GAP_SIZE) + CELL_SIZE / 2;\n\t\tconst y = ghost.x * (CELL_SIZE + GAP_SIZE) + CELL_SIZE / 2 + 15;\n\t\tconst radius = CELL_SIZE / 2;\n\n\t\tStore.config.canvas.getContext('2d')!.fillStyle = ghost.scared ? 'blue' : ghost.color;\n\t\tStore.config.canvas.getContext('2d')!.beginPath();\n\t\tStore.config.canvas.getContext('2d')!.arc(x, y, radius, 0, Math.PI);\n\t\tStore.config.canvas.getContext('2d')!.rect(x - radius, y, radius * 2, radius);\n\t\tStore.config.canvas.getContext('2d')!.fill();\n\n\t\tStore.config.canvas.getContext('2d')!.fillStyle = 'white';\n\t\tStore.config.canvas.getContext('2d')!.beginPath();\n\t\tStore.config.canvas.getContext('2d')!.arc(x - radius / 3, y - radius / 3, radius / 4, 0, Math.PI * 2);\n\t\tStore.config.canvas.getContext('2d')!.arc(x + radius / 3, y - radius / 3, radius / 4, 0, Math.PI * 2);\n\t\tStore.config.canvas.getContext('2d')!.fill();\n\n\t\tStore.config.canvas.getContext('2d')!.fillStyle = 'black';\n\t\tStore.config.canvas.getContext('2d')!.beginPath();\n\t\tStore.config.canvas.getContext('2d')!.arc(x - radius / 3, y - radius / 3, radius / 8, 0, Math.PI * 2);\n\t\tStore.config.canvas.getContext('2d')!.arc(x + radius / 3, y - radius / 3, radius / 8, 0, Math.PI * 2);\n\t\tStore.config.canvas.getContext('2d')!.fill();\n\t});\n};\n\nconst renderGameOver = () => {\n\tStore.config.canvas.getContext('2d')!.fillStyle = 'black';\n\tStore.config.canvas.getContext('2d')!.font = '20px Arial';\n\tStore.config.canvas.getContext('2d')!.textAlign = 'center';\n\tStore.config.canvas.getContext('2d')!.fillText('Game Over', Store.config.canvas.width / 2, Store.config.canvas.height / 2);\n};\n\nconst drawSoundController = () => {\n\tif (!Store.config.enableSounds) {\n\t\tconsole.log('vvvv');\n\t\treturn;\n\t}\n\n\tconst width = 30,\n\t\theight = 30,\n\t\tleft = Store.config.canvas.width - width - 10,\n\t\ttop = 10;\n\tStore.config.canvas.getContext('2d')!.fillStyle = `rgba(0, 0, 0, ${MusicPlayer.getInstance().isMuted ? 0.3 : 0.5})`;\n\tStore.config.canvas.getContext('2d')!.beginPath();\n\tStore.config.canvas.getContext('2d')!.moveTo(left + 10, top + 10);\n\tStore.config.canvas.getContext('2d')!.lineTo(left + 20, top + 5);\n\tStore.config.canvas.getContext('2d')!.lineTo(left + 20, top + 25);\n\tStore.config.canvas.getContext('2d')!.lineTo(left + 10, top + 20);\n\tStore.config.canvas.getContext('2d')!.closePath();\n\tStore.config.canvas.getContext('2d')!.fill();\n\n\tif (!MusicPlayer.getInstance().isMuted) {\n\t\tStore.config.canvas.getContext('2d')!.strokeStyle = `rgba(0, 0, 0, 0.4)`;\n\t\tStore.config.canvas.getContext('2d')!.lineWidth = 2;\n\n\t\t// First wave\n\t\tStore.config.canvas.getContext('2d')!.beginPath();\n\t\tStore.config.canvas.getContext('2d')!.arc(left + 25, top + 15, 5, 0, Math.PI * 2);\n\t\tStore.config.canvas.getContext('2d')!.stroke();\n\n\t\t// Second wave\n\t\tStore.config.canvas.getContext('2d')!.beginPath();\n\t\tStore.config.canvas.getContext('2d')!.arc(left + 25, top + 15, 8, 0, Math.PI * 2);\n\t\tStore.config.canvas.getContext('2d')!.stroke();\n\t} else {\n\t\t// Mute line\n\t\tStore.config.canvas.getContext('2d')!.strokeStyle = 'rgba(255, 0, 0, 0.6)';\n\t\tStore.config.canvas.getContext('2d')!.lineWidth = 3;\n\t\tStore.config.canvas.getContext('2d')!.beginPath();\n\t\tStore.config.canvas.getContext('2d')!.moveTo(left + 25, top + 5);\n\t\tStore.config.canvas.getContext('2d')!.lineTo(left + 5, top + 25);\n\t\tStore.config.canvas.getContext('2d')!.stroke();\n\t}\n};\n\nconst listenToSoundController = () => {\n\tif (!Store.config.enableSounds) {\n\t\treturn;\n\t}\n\tStore.config.canvas.addEventListener('click', function (event) {\n\t\tconst rect = Store.config.canvas.getBoundingClientRect();\n\t\tconst x = event.clientX - rect.left,\n\t\t\ty = event.clientY - rect.top;\n\t\tconst width = 30,\n\t\t\theight = 30,\n\t\t\tleft = Store.config.canvas.width - width - 10,\n\t\t\ttop = 10;\n\n\t\tif (x >= left && x <= left + this.width && y >= top && y <= top + this.height) {\n\t\t\tif (MusicPlayer.getInstance().isMuted) {\n\t\t\t\tMusicPlayer.getInstance().unmute();\n\t\t\t} else {\n\t\t\t\tMusicPlayer.getInstance().mute();\n\t\t\t}\n\t\t}\n\t});\n};\n\nexport const Canvas = {\n\tresizeCanvas,\n\tdrawGrid,\n\tdrawPacman,\n\tdrawGhosts,\n\trenderGameOver,\n\tdrawSoundController,\n\tlistenToSoundController\n};\n","import { GameTheme, ThemeKeys } from './types';\n\nexport const CELL_SIZE = 20;\nexport const GAP_SIZE = 2;\nexport const GRID_WIDTH = 52;\nexport const GRID_HEIGHT = 7;\nexport const PACMAN_COLOR = 'yellow';\nexport const PACMAN_COLOR_POWERUP = 'red';\nexport const PACMAN_COLOR_DEAD = '#80808064';\nexport const GHOST_COLORS = ['red', 'pink', 'cyan', 'orange'];\nexport const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\nexport const DELTA_TIME = 250;\nexport const PACMAN_DEATH_DURATION = 10;\nexport const PACMAN_POWERUP_DURATION = 15;\nexport const GAME_THEMES: { [key in ThemeKeys]: GameTheme } = {\n\tgithub: {\n\t\ttextColor: '#586069',\n\t\tgridBackground: '#ffffff',\n\t\tcontributionBoxColor: '#9be9a8',\n\t\temptyContributionBoxColor: '#ebedf0'\n\t},\n\t'github-dark': {\n\t\ttextColor: '#8b949e',\n\t\tgridBackground: '#0d1117',\n\t\tcontributionBoxColor: '#26a641',\n\t\temptyContributionBoxColor: '#161b22'\n\t},\n\tgitlab: {\n\t\ttextColor: '#626167',\n\t\tgridBackground: '#ffffff',\n\t\tcontributionBoxColor: '#7992f5',\n\t\temptyContributionBoxColor: '#ececef'\n\t},\n\t'gitlab-dark': {\n\t\ttextColor: '#999999',\n\t\tgridBackground: '#1f1f1f',\n\t\tcontributionBoxColor: '#2e7db1',\n\t\temptyContributionBoxColor: '#2d2d2d'\n\t}\n};\n","import { Canvas } from './canvas';\nimport { DELTA_TIME, GHOST_COLORS, GRID_HEIGHT, GRID_WIDTH, MONTHS, PACMAN_DEATH_DURATION, PACMAN_POWERUP_DURATION } from './constants';\nimport { MusicPlayer, Sound } from './music-player';\nimport { Store } from './store';\nimport { SVG } from './svg';\n\nconst initializeGrid = () => {\n\tStore.grid = Array.from({ length: GRID_HEIGHT }, () => Array.from({ length: GRID_WIDTH }, () => 0));\n\tStore.monthLabels = Array(GRID_WIDTH).fill('');\n\tlet maxCommits = 1;\n\n\tconst now = new Date();\n\tconst startOfCurrentWeek = new Date(now);\n\tstartOfCurrentWeek.setDate(now.getDate() - now.getDay());\n\n\tStore.contributions.forEach((contribution) => {\n\t\tconst contributionDate = new Date(contribution.date);\n\t\tconst dayOfWeek = contributionDate.getDay();\n\t\tconst weeksAgo = Math.floor((+startOfCurrentWeek - +contributionDate) / (1000 * 60 * 60 * 24 * 7));\n\n\t\tif (weeksAgo >= 0 && weeksAgo < GRID_WIDTH && dayOfWeek >= 0 && dayOfWeek < GRID_HEIGHT) {\n\t\t\tStore.grid[dayOfWeek][GRID_WIDTH - 1 - weeksAgo] = contribution.count;\n\t\t\tif (contribution.count > maxCommits) maxCommits = contribution.count;\n\t\t}\n\t});\n\n\tfor (let x = 0; x < GRID_HEIGHT; x++) {\n\t\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\t\tif (Store.grid[x][y] > 0) {\n\t\t\t\tStore.grid[x][y] = Store.grid[x][y] / maxCommits;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\tconst weeksAgo = GRID_WIDTH - 1 - y;\n\t\tconst columnDate = new Date(startOfCurrentWeek);\n\t\tcolumnDate.setDate(columnDate.getDate() - weeksAgo * 7);\n\t\tStore.monthLabels[y] = MONTHS[columnDate.getMonth()];\n\t}\n};\n\nconst placePacman = () => {\n\tlet validCells = [];\n\tfor (let x = 0; x < GRID_HEIGHT; x++) {\n\t\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\t\tif (Store.grid[x][y] > 0) validCells.push({ x, y });\n\t\t}\n\t}\n\tif (validCells.length > 0) {\n\t\tconst randomCell = validCells[Math.floor(Math.random() * validCells.length)];\n\t\tStore.pacman = {\n\t\t\tx: randomCell.x,\n\t\t\ty: randomCell.y,\n\t\t\tdirection: 'right',\n\t\t\tpoints: 0,\n\t\t\tdeadReaminingDuration: 0,\n\t\t\tpowerupReaminingDuration: 0\n\t\t};\n\t}\n\tif (Store.config.outputFormat == 'canvas') Canvas.drawPacman();\n};\n\nconst placeGhosts = () => {\n\tStore.ghosts = [];\n\tStore.scaredGhostsDestinations = [];\n\t// Create 4 ghosts\n\tfor (let i = 0; i < 4; i++) {\n\t\tconst color = GHOST_COLORS[i % GHOST_COLORS.length];\n\t\tlet x, y;\n\t\tdo {\n\t\t\tx = Math.floor(Math.random() * GRID_HEIGHT);\n\t\t\ty = Math.floor(Math.random() * GRID_WIDTH);\n\t\t} while (Store.grid[x][y] === 0);\n\t\tStore.ghosts.push({ x, y, color, scared: false, target: undefined });\n\t\tStore.scaredGhostsDestinations.push({ x: 0, y: 0 });\n\t}\n\tif (Store.config.outputFormat == 'canvas') Canvas.drawGhosts();\n};\n\nconst startGame = async () => {\n\tif (Store.config.outputFormat == 'canvas') {\n\t\tStore.config.canvas = Store.config.canvas;\n\t\tCanvas.resizeCanvas();\n\t\tCanvas.listenToSoundController();\n\t}\n\n\tStore.frameCount = 0;\n\tStore.ghosts.forEach((ghost) => (ghost.scared = false));\n\n\tinitializeGrid();\n\tif (Store.config.outputFormat == 'canvas') Canvas.drawGrid();\n\n\tif (Store.config.outputFormat == 'canvas') {\n\t\tif (!Store.config.enableSounds) {\n\t\t\tMusicPlayer.getInstance().mute();\n\t\t}\n\t\tawait MusicPlayer.getInstance().preloadSounds();\n\t\tMusicPlayer.getInstance().startDefaultSound();\n\t\tawait MusicPlayer.getInstance().play(Sound.BEGINNING);\n\t}\n\n\tplacePacman();\n\tplaceGhosts();\n\n\tif (Store.config.outputFormat == 'svg') {\n\t\tconst remainingCells = () => Store.grid.some((row) => row.some((cell) => cell > 0));\n\t\twhile (remainingCells()) {\n\t\t\tawait updateGame();\n\t\t}\n\t\t// One more time to generate svg\n\t\tawait updateGame();\n\t} else {\n\t\tclearInterval(Store.gameInterval);\n\t\tStore.gameInterval = setInterval(async () => await updateGame(), DELTA_TIME);\n\t}\n};\n\nconst updateGame = async () => {\n\tStore.frameCount++;\n\tif (Store.frameCount % Store.config.gameSpeed !== 0) {\n\t\tStore.gameHistory.push({\n\t\t\tpacman: { ...Store.pacman },\n\t\t\tghosts: Store.ghosts.map((ghost) => ({ ...ghost })),\n\t\t\tgrid: Store.grid.map((row) => [...row])\n\t\t});\n\t\treturn;\n\t}\n\n\tif (Store.pacman.deadReaminingDuration) {\n\t\tStore.pacman.deadReaminingDuration--;\n\t\tif (!Store.pacman.deadReaminingDuration) {\n\t\t\t// IT'S ALIVE!\n\t\t\tif (Store.config.outputFormat == 'canvas')\n\t\t\t\tMusicPlayer.getInstance()\n\t\t\t\t\t.play(Sound.GAME_OVER)\n\t\t\t\t\t.then(() => MusicPlayer.getInstance().startDefaultSound());\n\t\t}\n\t}\n\n\tif (Store.pacman.powerupReaminingDuration) {\n\t\tStore.pacman.powerupReaminingDuration--;\n\t\tif (!Store.pacman.powerupReaminingDuration) {\n\t\t\tStore.ghosts.forEach((ghost) => (ghost.scared = false));\n\t\t\tStore.pacman.points = 0;\n\t\t}\n\t}\n\n\tconst remainingCells = Store.grid.some((row) => row.some((cell) => cell > 0));\n\tif (!remainingCells) {\n\t\tif (Store.config.outputFormat == 'canvas') {\n\t\t\tclearInterval(Store.gameInterval);\n\t\t\tif (Store.config.outputFormat == 'canvas') {\n\t\t\t\tCanvas.renderGameOver();\n\t\t\t\tMusicPlayer.getInstance()\n\t\t\t\t\t.play(Sound.BEGINNING)\n\t\t\t\t\t.then(() => MusicPlayer.getInstance().stopDefaultSound());\n\t\t\t}\n\t\t}\n\n\t\tif (Store.config.outputFormat == 'svg') {\n\t\t\tconst animatedSVG = SVG.generateAnimatedSVG();\n\t\t\tconst svgBlob = new Blob([animatedSVG], {\n\t\t\t\ttype: 'image/svg+xml;charset=utf-8'\n\t\t\t});\n\t\t\tconst svgUrl = URL.createObjectURL(svgBlob);\n\t\t\tStore.config.svgCallback(svgUrl);\n\t\t}\n\n\t\tStore.config.gameOverCallback();\n\t\treturn;\n\t}\n\n\tmovePacman();\n\tmoveGhosts();\n\tcheckCollisions();\n\n\tStore.pacmanMouthOpen = !Store.pacmanMouthOpen;\n\n\tStore.gameHistory.push({\n\t\tpacman: { ...Store.pacman },\n\t\tghosts: Store.ghosts.map((ghost) => ({ ...ghost })),\n\t\tgrid: Store.grid.map((row) => [...row])\n\t});\n\n\tif (Store.config.outputFormat == 'canvas') Canvas.drawGrid();\n\tif (Store.config.outputFormat == 'canvas') Canvas.drawPacman();\n\tif (Store.config.outputFormat == 'canvas') Canvas.drawGhosts();\n\tif (Store.config.outputFormat == 'canvas') Canvas.drawSoundController();\n};\n\nconst movePacman = () => {\n\tif (Store.pacman.deadReaminingDuration) {\n\t\treturn;\n\t}\n\tlet targetCells: { x: number; y: number; distance: number }[] = [];\n\n\tif (Store.pacman.powerupReaminingDuration) {\n\t\ttargetCells = Store.ghosts.map((ghost) => ({\n\t\t\tx: ghost.x,\n\t\t\ty: ghost.y,\n\t\t\tdistance: Infinity\n\t\t}));\n\t} else {\n\t\tfor (let x = 0; x < GRID_HEIGHT; x++) {\n\t\t\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\t\t\tif (Store.grid[x][y] > 0) targetCells.push({ x, y, distance: Infinity });\n\t\t\t}\n\t\t}\n\t}\n\n\tif (targetCells.length === 0) return;\n\n\tconst closest = targetCells.reduce(\n\t\t(closest, cell) => {\n\t\t\tconst distance = Math.abs(cell.x - Store.pacman.x) + Math.abs(cell.y - Store.pacman.y);\n\t\t\treturn distance < closest.distance ? { ...cell, distance } : closest;\n\t\t},\n\t\t{ x: Store.pacman.x, y: Store.pacman.y, distance: Infinity }\n\t);\n\n\tconst dx = closest.x - Store.pacman.x;\n\tconst dy = closest.y - Store.pacman.y;\n\n\tif (Math.abs(dx) > Math.abs(dy)) {\n\t\tStore.pacman.x += Math.sign(dx);\n\t\tStore.pacman.direction = dx > 0 ? 'down' : 'up';\n\t} else {\n\t\tStore.pacman.y += Math.sign(dy);\n\t\tStore.pacman.direction = dy > 0 ? 'right' : 'left';\n\t}\n\n\tif (Store.grid[Store.pacman.x][Store.pacman.y] > 0) {\n\t\tStore.pacman.points += 1;\n\t\tStore.grid[Store.pacman.x][Store.pacman.y] = 0;\n\n\t\tif (Store.pacman.points >= 30) activatePowerUp();\n\t}\n};\n\nconst moveGhosts = () => {\n\tStore.ghosts.forEach((ghost, index) => {\n\t\tif (ghost.scared) {\n\t\t\tif (!ghost.target) {\n\t\t\t\tghost.target = getRandomDestination(ghost.x, ghost.y);\n\t\t\t}\n\n\t\t\tconst dx = ghost.target.x - ghost.x;\n\t\t\tconst dy = ghost.target.y - ghost.y;\n\t\t\tconst moveX = Math.abs(dx) > Math.abs(dy) ? Math.sign(dx) : 0;\n\t\t\tconst moveY = Math.abs(dy) >= Math.abs(dx) ? Math.sign(dy) : 0;\n\n\t\t\tconst newX = ghost.x + moveX;\n\t\t\tconst newY = ghost.y + moveY;\n\n\t\t\tif (newX >= 0 && newX < GRID_HEIGHT && newY >= 0 && newY < GRID_WIDTH) {\n\t\t\t\tghost.x = newX;\n\t\t\t\tghost.y = newY;\n\t\t\t}\n\n\t\t\tif (ghost.x === ghost.target.x && ghost.y === ghost.target.y) {\n\t\t\t\tghost.target = getRandomDestination(ghost.x, ghost.y);\n\t\t\t}\n\t\t} else {\n\t\t\tconst directions = [\n\t\t\t\t[-1, 0],\n\t\t\t\t[1, 0],\n\t\t\t\t[0, -1],\n\t\t\t\t[0, 1]\n\t\t\t];\n\t\t\tconst [dx, dy] = directions[Math.floor(Math.random() * directions.length)];\n\n\t\t\t// If Pacman has the power-up, ghosts move slower (move every other frame)\n\t\t\tif (Store.pacman.powerupReaminingDuration && Math.random() < 0.5) return;\n\n\t\t\tconst newX = ghost.x + dx;\n\t\t\tconst newY = ghost.y + dy;\n\n\t\t\tif (newX >= 0 && newX < GRID_HEIGHT && newY >= 0 && newY < GRID_WIDTH) {\n\t\t\t\tghost.x = newX;\n\t\t\t\tghost.y = newY;\n\t\t\t}\n\t\t}\n\t});\n};\n\nconst getRandomDestination = (x: number, y: number) => {\n\tconst maxDistance = 10;\n\tconst randomX = x + Math.floor(Math.random() * (2 * maxDistance + 1)) - maxDistance;\n\tconst randomY = y + Math.floor(Math.random() * (2 * maxDistance + 1)) - maxDistance;\n\treturn {\n\t\tx: Math.max(0, Math.min(randomX, GRID_HEIGHT - 1)),\n\t\ty: Math.max(0, Math.min(randomY, GRID_WIDTH - 1))\n\t};\n};\n\nconst checkCollisions = () => {\n\tif (Store.pacman.deadReaminingDuration) return;\n\n\tStore.ghosts.forEach((ghost, index) => {\n\t\tif (ghost.x === Store.pacman.x && ghost.y === Store.pacman.y) {\n\t\t\tif (Store.pacman.powerupReaminingDuration && ghost.scared) {\n\t\t\t\trespawnGhost(index);\n\t\t\t\tStore.pacman.points += 10;\n\t\t\t\tif (Store.config.outputFormat == 'canvas') {\n\t\t\t\t\tMusicPlayer.getInstance().play(Sound.EAT_GHOST);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tStore.pacman.points = 0;\n\t\t\t\tStore.pacman.powerupReaminingDuration = 0;\n\t\t\t\tStore.pacman.deadReaminingDuration = PACMAN_DEATH_DURATION;\n\t\t\t\tif (Store.config.outputFormat == 'canvas') {\n\t\t\t\t\tMusicPlayer.getInstance()\n\t\t\t\t\t\t.play(Sound.GAME_OVER)\n\t\t\t\t\t\t.then(() => MusicPlayer.getInstance().stopDefaultSound());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n};\n\nconst respawnGhost = (ghostIndex: number) => {\n\tlet x, y;\n\tdo {\n\t\tx = Math.floor(Math.random() * GRID_HEIGHT);\n\t\ty = Math.floor(Math.random() * GRID_WIDTH);\n\t} while ((Math.abs(x - Store.pacman.x) <= 2 && Math.abs(y - Store.pacman.y) <= 2) || Store.grid[x][y] === 0);\n\tStore.ghosts[ghostIndex] = {\n\t\tx,\n\t\ty,\n\t\tcolor: GHOST_COLORS[ghostIndex % GHOST_COLORS.length],\n\t\tscared: false,\n\t\ttarget: undefined\n\t};\n};\n\nconst activatePowerUp = () => {\n\tStore.pacman.powerupReaminingDuration = PACMAN_POWERUP_DURATION;\n\tStore.ghosts.forEach((ghost) => (ghost.scared = true));\n};\n\nexport const Game = {\n\tstartGame\n};\n","export enum Sound {\n\tDEFAULT = '/src/assets/sounds/pacman_chomp.wav',\n\tBEGINNING = '/src/assets/sounds/pacman_beginning.wav',\n\tGAME_OVER = '/src/assets/sounds/pacman_death.wav',\n\tEAT_GHOST = '/src/assets/sounds/pacman_eatghost.wav'\n}\n\nexport class MusicPlayer {\n\tprivate static instance: MusicPlayer;\n\tprivate audioContext: AudioContext;\n\tprivate sounds: Map<Sound, AudioBuffer> = new Map();\n\tprivate currentSource: AudioBufferSourceNode | null = null;\n\tprivate defaultSource: AudioBufferSourceNode | null = null;\n\tpublic isMuted: boolean = false;\n\n\tprivate constructor() {\n\t\tthis.audioContext = new AudioContext();\n\t}\n\n\tpublic static getInstance(): MusicPlayer {\n\t\tif (!MusicPlayer.instance) {\n\t\t\tMusicPlayer.instance = new MusicPlayer();\n\t\t}\n\t\treturn MusicPlayer.instance;\n\t}\n\n\tpublic async preloadSounds(): Promise<void> {\n\t\tfor (const sound of Object.values(Sound)) {\n\t\t\tconst response = await fetch(sound);\n\t\t\tconst arrayBuffer = await response.arrayBuffer();\n\t\t\tconst audioBuffer = await this.audioContext.decodeAudioData(arrayBuffer);\n\t\t\tthis.sounds.set(sound as Sound, audioBuffer);\n\t\t}\n\t}\n\n\tpublic async play(sound: Sound): Promise<void> {\n\t\tif (this.isMuted) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.currentSource) {\n\t\t\tthis.currentSource.stop();\n\t\t}\n\n\t\tconst buffer = this.sounds.get(sound);\n\t\tif (!buffer) {\n\t\t\tconsole.error(`Sound ${sound} not found`);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.currentSource = this.audioContext.createBufferSource();\n\t\tthis.currentSource.buffer = buffer;\n\t\tthis.currentSource.connect(this.audioContext.destination);\n\n\t\tif (!this.isMuted) {\n\t\t\tthis.currentSource.start();\n\t\t}\n\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.currentSource!.onended = () => {\n\t\t\t\tthis.currentSource = null;\n\t\t\t\tresolve();\n\t\t\t};\n\t\t});\n\t}\n\n\tpublic startDefaultSound(): void {\n\t\tif (this.defaultSource) {\n\t\t\tthis.defaultSource.stop();\n\t\t}\n\n\t\tconst buffer = this.sounds.get(Sound.DEFAULT);\n\t\tif (!buffer) {\n\t\t\tconsole.error('Default sound not found');\n\t\t\treturn;\n\t\t}\n\n\t\tthis.defaultSource = this.audioContext.createBufferSource();\n\t\tthis.defaultSource.buffer = buffer;\n\t\tthis.defaultSource.loop = true;\n\t\tthis.defaultSource.connect(this.audioContext.destination);\n\n\t\tif (!this.isMuted) {\n\t\t\tthis.defaultSource.start();\n\t\t}\n\t}\n\n\tpublic stopDefaultSound(): void {\n\t\tif (this.defaultSource) {\n\t\t\tthis.defaultSource.stop();\n\t\t\tthis.defaultSource = null;\n\t\t}\n\t}\n\n\tpublic mute(): void {\n\t\tthis.isMuted = true;\n\t\tif (this.currentSource) {\n\t\t\tthis.currentSource.disconnect();\n\t\t}\n\t\tif (this.defaultSource) {\n\t\t\tthis.defaultSource.disconnect();\n\t\t}\n\t}\n\n\tpublic unmute(): void {\n\t\tthis.isMuted = false;\n\t\tif (this.currentSource) {\n\t\t\tthis.currentSource.connect(this.audioContext.destination);\n\t\t}\n\t\tif (this.defaultSource) {\n\t\t\tthis.defaultSource.connect(this.audioContext.destination);\n\t\t}\n\t}\n}\n","import type { Config, StoreType } from './types';\n\nexport const Store: StoreType = {\n\tframeCount: 0,\n\tcontributions: [],\n\tpacman: {\n\t\tx: 0,\n\t\ty: 0,\n\t\tdirection: 'right',\n\t\tpoints: 0,\n\t\tdeadReaminingDuration: 0,\n\t\tpowerupReaminingDuration: 0\n\t},\n\tghosts: [],\n\tgrid: [],\n\tmonthLabels: [],\n\tpacmanMouthOpen: true,\n\tgameInterval: 0,\n\tscaredGhostsDestinations: [],\n\tgameHistory: [],\n\tconfig: undefined as unknown as Config\n};\n","import { CELL_SIZE, GAP_SIZE, GRID_HEIGHT, GRID_WIDTH, PACMAN_COLOR, PACMAN_COLOR_DEAD, PACMAN_COLOR_POWERUP } from './constants';\nimport { Store } from './store';\nimport { Utils } from './utils';\n\nconst generateAnimatedSVG = () => {\n\tconst svgWidth = GRID_WIDTH * (CELL_SIZE + GAP_SIZE);\n\tconst svgHeight = GRID_HEIGHT * (CELL_SIZE + GAP_SIZE) + 20;\n\tlet svg = `<svg width=\"${svgWidth}\" height=\"${svgHeight}\" xmlns=\"http://www.w3.org/2000/svg\">`;\n\tsvg += `<rect width=\"100%\" height=\"100%\" fill=\"${Utils.getCurrentTheme().gridBackground}\"/>`;\n\n\t// Month labels\n\tlet lastMonth = '';\n\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\tif (Store.monthLabels[y] !== lastMonth) {\n\t\t\tconst xPos = y * (CELL_SIZE + GAP_SIZE) + CELL_SIZE / 2;\n\t\t\tsvg += `<text x=\"${xPos}\" y=\"10\" text-anchor=\"middle\" font-size=\"10\" fill=\"${Utils.getCurrentTheme().textColor}\">${Store.monthLabels[y]}</text>`;\n\t\t\tlastMonth = Store.monthLabels[y];\n\t\t}\n\t}\n\n\t// Grid\n\tfor (let x = 0; x < GRID_HEIGHT; x++) {\n\t\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\t\tconst cellX = y * (CELL_SIZE + GAP_SIZE);\n\t\t\tconst cellY = x * (CELL_SIZE + GAP_SIZE) + 15;\n\t\t\tconst intensity = Store.gameHistory[0].grid[x][y];\n\t\t\tconst color = intensity > 0 ? getContributionColor(intensity) : Utils.getCurrentTheme().emptyContributionBoxColor;\n\t\t\tsvg += `<rect id=\"cell-${x}-${y}\" x=\"${cellX}\" y=\"${cellY}\" width=\"${CELL_SIZE}\" height=\"${CELL_SIZE}\" rx=\"5\" fill=\"${color}\">\n <animate attributeName=\"fill\" dur=\"${Store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\" \n values=\"${generateCellColorValues(x, y)}\" \n keyTimes=\"${generateKeyTimes()}\"/>\n </rect>`;\n\t\t}\n\t}\n\n\t// Pacman\n\tsvg += `<path id=\"pacman\" d=\"${generatePacManPath(0.35)}\"\n transform=\"translate(${Store.pacman.y * (CELL_SIZE + GAP_SIZE)}, ${Store.pacman.x * (CELL_SIZE + GAP_SIZE) + 15})\">\n\t\t<animate attributeName=\"fill\" dur=\"${Store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes()}\"\n values=\"${generatePacManColors()}\"/>\n <animateTransform attributeName=\"transform\" type=\"translate\" dur=\"${Store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes()}\"\n values=\"${generatePacManPositions()}\"/>\n <animate attributeName=\"d\" dur=\"0.2s\" repeatCount=\"indefinite\"\n values=\"${generatePacManPath(0.25)};${generatePacManPath(0.05)};${generatePacManPath(0.25)}\"/>\n </path>`;\n\n\t// Ghosts\n\tStore.ghosts.forEach((ghost, index) => {\n\t\tsvg += `<path id=\"ghost${index}\" d=\"${generateGhostPath(CELL_SIZE / 2)}\" fill=\"${ghost.color}\">\n <animate attributeName=\"fill\" dur=\"${Store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes()}\"\n values=\"${generateGhostColors(index)}\"/>\n <animateTransform attributeName=\"transform\" type=\"translate\" dur=\"${Store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes()}\"\n values=\"${generateGhostPositions(index)}\"/>\n </path>\n <circle cx=\"${CELL_SIZE / 3}\" cy=\"${CELL_SIZE / 3}\" r=\"${CELL_SIZE / 8}\" fill=\"white\">\n <animateTransform attributeName=\"transform\" type=\"translate\" dur=\"${Store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes()}\"\n values=\"${generateGhostPositions(index)}\"/>\n </circle>\n <circle cx=\"${(CELL_SIZE * 2) / 3}\" cy=\"${CELL_SIZE / 3}\" r=\"${CELL_SIZE / 8}\" fill=\"white\">\n <animateTransform attributeName=\"transform\" type=\"translate\" dur=\"${Store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes()}\"\n values=\"${generateGhostPositions(index)}\"/>\n </circle>\n <circle cx=\"${CELL_SIZE / 3}\" cy=\"${CELL_SIZE / 3}\" r=\"${CELL_SIZE / 16}\" fill=\"black\">\n <animateTransform attributeName=\"transform\" type=\"translate\" dur=\"${Store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes()}\"\n values=\"${generateGhostPositions(index)}\"/>\n </circle>\n <circle cx=\"${(CELL_SIZE * 2) / 3}\" cy=\"${CELL_SIZE / 3}\" r=\"${CELL_SIZE / 16}\" fill=\"black\">\n <animateTransform attributeName=\"transform\" type=\"translate\" dur=\"${Store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes()}\"\n values=\"${generateGhostPositions(index)}\"/>\n </circle>`;\n\t});\n\n\tsvg += '</svg>';\n\treturn svg;\n};\n\nconst generatePacManPath = (mouthAngle: number) => {\n\tconst radius = CELL_SIZE / 2;\n\tconst startAngle = mouthAngle;\n\tconst endAngle = 2 * Math.PI - mouthAngle;\n\n\treturn `M ${radius},${radius}\n L ${radius + radius * Math.cos(startAngle)},${radius + radius * Math.sin(startAngle)}\n A ${radius},${radius} 0 1,1 ${radius + radius * Math.cos(endAngle)},${radius + radius * Math.sin(endAngle)}\n Z`;\n};\n\nconst generateKeyTimes = () => {\n\treturn Store.gameHistory.map((_, index) => index / (Store.gameHistory.length - 1)).join(';');\n};\n\nconst generatePacManPositions = () => {\n\treturn Store.gameHistory\n\t\t.map((state) => {\n\t\t\tconst x = state.pacman.y * (CELL_SIZE + GAP_SIZE);\n\t\t\tconst y = state.pacman.x * (CELL_SIZE + GAP_SIZE) + 15;\n\t\t\treturn `${x},${y}`;\n\t\t})\n\t\t.join(';');\n};\n\nconst generatePacManColors = () => {\n\treturn Store.gameHistory\n\t\t.map((state) => {\n\t\t\tif (state.pacman.deadReaminingDuration) {\n\t\t\t\treturn PACMAN_COLOR_DEAD;\n\t\t\t} else if (state.pacman.powerupReaminingDuration) {\n\t\t\t\treturn PACMAN_COLOR_POWERUP;\n\t\t\t} else {\n\t\t\t\treturn PACMAN_COLOR;\n\t\t\t}\n\t\t})\n\t\t.join(';');\n};\n\nconst generateCellColorValues = (x: number, y: number) => {\n\treturn Store.gameHistory\n\t\t.map((state) => {\n\t\t\tconst intensity = state.grid[x][y];\n\t\t\treturn intensity > 0 ? getContributionColor(intensity) : Utils.getCurrentTheme().emptyContributionBoxColor;\n\t\t})\n\t\t.join(';');\n};\n\nconst getContributionColor = (intensity: number) => {\n\tconst adjustedIntensity = intensity < 0.2 ? 0.3 : intensity;\n\treturn Utils.hexToRGBA(Utils.getCurrentTheme().contributionBoxColor, adjustedIntensity);\n};\n\nconst generateGhostPositions = (ghostIndex: number) => {\n\treturn Store.gameHistory\n\t\t.map((state) => {\n\t\t\tconst ghost = state.ghosts[ghostIndex];\n\t\t\tconst x = ghost.y * (CELL_SIZE + GAP_SIZE);\n\t\t\tconst y = ghost.x * (CELL_SIZE + GAP_SIZE) + 15;\n\t\t\treturn `${x},${y}`;\n\t\t})\n\t\t.join(';');\n};\n\nconst generateGhostPath = (radius: number) => {\n\treturn `M ${radius},${radius * 2}\n Q ${radius * 0.8},${radius * 1.5} ${radius * 0.5},${radius * 1.3}\n Q ${radius * 0.3},${radius * 1.1} 0,${radius}\n L 0,0\n L ${radius * 2},0\n L ${radius * 2},${radius}\n Q ${radius * 1.7},${radius * 1.1} ${radius * 1.5},${radius * 1.3}\n Q ${radius * 1.2},${radius * 1.5} ${radius},${radius * 2}\n Z`;\n};\n\nconst generateGhostColors = (ghostIndex: number) => {\n\treturn Store.gameHistory\n\t\t.map((state) => {\n\t\t\tconst ghost = state.ghosts[ghostIndex];\n\t\t\treturn ghost.scared ? 'blue' : ghost.color;\n\t\t})\n\t\t.join(';');\n};\n\nexport const SVG = {\n\tgenerateAnimatedSVG\n};\n","import { GAME_THEMES } from './constants';\nimport { Store } from './store';\nimport type { Contribution, GameTheme } from './types';\n\nconst getGitlabContribution = async (username: string): Promise<Contribution[]> => {\n\tconst response = await fetch(`https://gitlab.com/users/${username}/calendar.json`);\n\tconst contributionsList = await response.json();\n\treturn Object.entries(contributionsList).map(([date, count]) => ({\n\t\tdate: new Date(date),\n\t\tcount: Number(count)\n\t}));\n};\n\nconst getGithubContribution = async (username: string): Promise<Contribution[]> => {\n\tconst response = await fetch(\n\t\t`https://api.github.com/search/commits?q=author:${username}&sort=author-date&order=desc&page=1&per_page=1000`\n\t);\n\tconst contributionsList = await response.json();\n\treturn Array.from(\n\t\tcontributionsList.items\n\t\t\t.reduce((map: any, item: any) => {\n\t\t\t\tconst dateString = item.commit.committer.date.split('T')[0];\n\t\t\t\tconst date = new Date(dateString);\n\t\t\t\tconst count = (map.get(dateString) || { count: 0 }).count + 1;\n\t\t\t\treturn map.set(dateString, { date, count });\n\t\t\t}, new Map())\n\t\t\t.values()\n\t);\n};\n\nconst getCurrentTheme = (): GameTheme => {\n\treturn GAME_THEMES[Store.config.gameTheme] ?? GAME_THEMES['github'];\n};\n\nfunction hexToRGBA(hex: string, alpha: number): string {\n\tconst r = parseInt(hex.slice(1, 3), 16);\n\tconst g = parseInt(hex.slice(3, 5), 16);\n\tconst b = parseInt(hex.slice(5, 7), 16);\n\treturn `rgba(${r}, ${g}, ${b}, ${alpha})`;\n}\n\nexport const Utils = {\n\tgetGitlabContribution,\n\tgetGithubContribution,\n\tgetCurrentTheme,\n\thexToRGBA\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Game } from './game';\nimport { Store } from './store';\nimport { Config } from './types';\nimport { Utils } from './utils';\n\nexport const renderContributions = async (conf: Config) => {\n\tconst defaultConfing: Config = {\n\t\tplatform: 'github',\n\t\tusername: '',\n\t\tcanvas: undefined as unknown as HTMLCanvasElement,\n\t\toutputFormat: 'svg',\n\t\tsvgCallback: (_: string) => {},\n\t\tgameOverCallback: () => () => {},\n\t\tgameTheme: 'github',\n\t\tgameSpeed: 1,\n\t\tenableSounds: true\n\t};\n\tStore.config = { ...defaultConfing, ...conf };\n\n\tswitch (conf.platform) {\n\t\tcase 'gitlab':\n\t\t\tStore.contributions = await Utils.getGitlabContribution(conf.username);\n\t\t\tbreak;\n\n\t\tcase 'github':\n\t\t\tStore.contributions = await Utils.getGithubContribution(conf.username);\n\t\t\tbreak;\n\t}\n\n\tGame.startGame();\n};\n"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"pacman-contribution-graph.js","mappings":";;;;;;;;;;;;;;;AAA0I;AAC7F;AAEb;AAEhC,MAAM,YAAY,GAAG,CAAC,KAAgB,EAAE,EAAE;IACzC,MAAM,WAAW,GAAG,kDAAU,GAAG,CAAC,iDAAS,GAAG,gDAAQ,CAAC,CAAC;IACxD,MAAM,YAAY,GAAG,mDAAW,GAAG,CAAC,iDAAS,GAAG,gDAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,sCAAsC;IAEtG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC;IACxC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,YAAY,CAAC;AAC3C,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,KAAgB,EAAE,EAAE;IACrC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAE,CAAC,SAAS,GAAG,yCAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC;IAC9F,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU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gBACnB,SAAS,EAAE,CAAC;gBACZ,YAAY,EAAE,IAAI;gBAClB,uBAAuB,EAAE,CAAC,CAAS,EAAE,EAAE,GAAE,CAAC;aAC1C,CAAC;YACF,IAAI,CAAC,KAAK,CAAC,MAAM,mCAAQ,cAAc,GAAK,IAAI,CAAC,IAAI,CAAE,CAAC;YAExD,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;gBAC3B,KAAK,QAAQ;oBACZ,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,MAAM,yCAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBACjF,MAAM;gBAEP,KAAK,QAAQ;oBACZ,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,MAAM,yCAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBACjF,MAAM;aACP;YAED,uCAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;KAAA;IAEM,IAAI;QACV,uCAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;CACD","sources":["webpack://pacman-contribution-graph/./src/canvas.ts","webpack://pacman-contribution-graph/./src/constants.ts","webpack://pacman-contribution-graph/./src/game.ts","webpack://pacman-contribution-graph/./src/music-player.ts","webpack://pacman-contribution-graph/./src/store.ts","webpack://pacman-contribution-graph/./src/svg.ts","webpack://pacman-contribution-graph/./src/utils.ts","webpack://pacman-contribution-graph/webpack/bootstrap","webpack://pacman-contribution-graph/webpack/runtime/define property getters","webpack://pacman-contribution-graph/webpack/runtime/hasOwnProperty shorthand","webpack://pacman-contribution-graph/webpack/runtime/make namespace object","webpack://pacman-contribution-graph/./src/index.ts"],"sourcesContent":["import { CELL_SIZE, GAP_SIZE, GHOSTS, GRID_HEIGHT, GRID_WIDTH, PACMAN_COLOR, PACMAN_COLOR_DEAD, PACMAN_COLOR_POWERUP } from './constants';\nimport { MusicPlayer } from './music-player';\nimport { StoreType } from './types';\nimport { Utils } from './utils';\n\nconst resizeCanvas = (store: StoreType) => {\n\tconst canvasWidth = GRID_WIDTH * (CELL_SIZE + GAP_SIZE);\n\tconst canvasHeight = GRID_HEIGHT * (CELL_SIZE + GAP_SIZE) + 20; // Adding some space for months on top\n\n\tstore.config.canvas.width = canvasWidth;\n\tstore.config.canvas.height = canvasHeight;\n};\n\nconst drawGrid = (store: StoreType) => {\n\tstore.config.canvas.getContext('2d')!.fillStyle = Utils.getCurrentTheme(store).gridBackground;\n\tstore.config.canvas.getContext('2d')!.fillRect(0, 0, store.config.canvas.width, store.config.canvas.height);\n\n\tfor (let x = 0; x < GRID_HEIGHT; x++) {\n\t\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\t\tconst intensity = store.grid[x][y].intensity;\n\t\t\tif (intensity > 0) {\n\t\t\t\tconst adjustedIntensity = intensity < 0.2 ? 0.3 : intensity;\n\t\t\t\tconst color = Utils.hexToRGBA(Utils.getCurrentTheme(store).contributionBoxColor, adjustedIntensity);\n\t\t\t\tstore.config.canvas.getContext('2d')!.fillStyle = color;\n\t\t\t} else {\n\t\t\t\tstore.config.canvas.getContext('2d')!.fillStyle = Utils.getCurrentTheme(store).emptyContributionBoxColor;\n\t\t\t}\n\t\t\tstore.config.canvas.getContext('2d')!.beginPath();\n\t\t\tstore.config.canvas\n\t\t\t\t.getContext('2d')!\n\t\t\t\t.roundRect(y * (CELL_SIZE + GAP_SIZE), x * (CELL_SIZE + GAP_SIZE) + 15, CELL_SIZE, CELL_SIZE, 5);\n\t\t\tstore.config.canvas.getContext('2d')!.fill();\n\t\t}\n\t}\n\n\tstore.config.canvas.getContext('2d')!.fillStyle = Utils.getCurrentTheme(store).textColor;\n\tstore.config.canvas.getContext('2d')!.font = '10px Arial';\n\tstore.config.canvas.getContext('2d')!.textAlign = 'center';\n\n\tlet lastMonth = '';\n\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\tif (store.monthLabels[y] !== lastMonth) {\n\t\t\tconst xPos = y * (CELL_SIZE + GAP_SIZE) + CELL_SIZE / 2;\n\t\t\tstore.config.canvas.getContext('2d')!.fillText(store.monthLabels[y], xPos, 10);\n\t\t\tlastMonth = store.monthLabels[y];\n\t\t}\n\t}\n};\n\nconst drawPacman = (store: StoreType) => {\n\tconst x = store.pacman.y * (CELL_SIZE + GAP_SIZE) + CELL_SIZE / 2;\n\tconst y = store.pacman.x * (CELL_SIZE + GAP_SIZE) + CELL_SIZE / 2 + 15;\n\tconst radius = CELL_SIZE / 2;\n\n\t// Change Pac-Man's color to red if he's on power-up, dead, else yellow\n\tif (store.pacman.deadRemainingDuration) {\n\t\tstore.config.canvas.getContext('2d')!.fillStyle = PACMAN_COLOR_DEAD;\n\t} else if (store.pacman.powerupRemainingDuration) {\n\t\tstore.config.canvas.getContext('2d')!.fillStyle = PACMAN_COLOR_POWERUP;\n\t} else {\n\t\tstore.config.canvas.getContext('2d')!.fillStyle = PACMAN_COLOR;\n\t}\n\n\tconst mouthAngle = store.pacmanMouthOpen ? 0.35 * Math.PI : 0.1 * Math.PI;\n\n\tlet startAngle, endAngle;\n\tswitch (store.pacman.direction) {\n\t\tcase 'up':\n\t\t\tstartAngle = 1.5 * Math.PI + mouthAngle;\n\t\t\tendAngle = 1.5 * Math.PI - mouthAngle;\n\t\t\tbreak;\n\t\tcase 'down':\n\t\t\tstartAngle = 0.5 * Math.PI + mouthAngle;\n\t\t\tendAngle = 0.5 * Math.PI - mouthAngle;\n\t\t\tbreak;\n\t\tcase 'left':\n\t\t\tstartAngle = Math.PI + mouthAngle;\n\t\t\tendAngle = Math.PI - mouthAngle;\n\t\t\tbreak;\n\t\tcase 'right':\n\t\tdefault:\n\t\t\tstartAngle = 0 + mouthAngle;\n\t\t\tendAngle = 2 * Math.PI - mouthAngle;\n\t\t\tbreak;\n\t}\n\n\tstore.config.canvas.getContext('2d')!.beginPath();\n\tstore.config.canvas.getContext('2d')!.arc(x, y, radius, startAngle, endAngle);\n\tstore.config.canvas.getContext('2d')!.lineTo(x, y);\n\tstore.config.canvas.getContext('2d')!.fill();\n};\n\nconst drawGhosts = (store: StoreType) => {\n\tstore.ghosts.forEach((ghost) => {\n\t\tconst x = ghost.y * (CELL_SIZE + GAP_SIZE);\n\t\tconst y = ghost.x * (CELL_SIZE + GAP_SIZE) + 15;\n\t\tconst size = CELL_SIZE;\n\n\t\tconst ctx = store.config.canvas.getContext('2d')!;\n\t\tif (ghost.scared) {\n\t\t\tctx.drawImage(GHOSTS['scared'].img, x, y, size, size);\n\t\t} else {\n\t\t\tctx.drawImage(GHOSTS[ghost.name].img, x, y, size, size);\n\t\t}\n\t});\n};\n\nconst renderGameOver = (store: StoreType) => {\n\tstore.config.canvas.getContext('2d')!.fillStyle = Utils.getCurrentTheme(store).textColor;\n\tstore.config.canvas.getContext('2d')!.font = '20px Arial';\n\tstore.config.canvas.getContext('2d')!.textAlign = 'center';\n\tstore.config.canvas.getContext('2d')!.fillText('Game Over', store.config.canvas.width / 2, store.config.canvas.height / 2);\n};\n\nconst drawSoundController = (store: StoreType) => {\n\tif (!store.config.enableSounds) {\n\t\treturn;\n\t}\n\n\tconst width = 30,\n\t\theight = 30,\n\t\tleft = store.config.canvas.width - width - 10,\n\t\ttop = 10;\n\tstore.config.canvas.getContext('2d')!.fillStyle = `rgba(0, 0, 0, ${MusicPlayer.getInstance().isMuted ? 0.3 : 0.5})`;\n\tstore.config.canvas.getContext('2d')!.beginPath();\n\tstore.config.canvas.getContext('2d')!.moveTo(left + 10, top + 10);\n\tstore.config.canvas.getContext('2d')!.lineTo(left + 20, top + 5);\n\tstore.config.canvas.getContext('2d')!.lineTo(left + 20, top + 25);\n\tstore.config.canvas.getContext('2d')!.lineTo(left + 10, top + 20);\n\tstore.config.canvas.getContext('2d')!.closePath();\n\tstore.config.canvas.getContext('2d')!.fill();\n\n\tif (!MusicPlayer.getInstance().isMuted) {\n\t\tstore.config.canvas.getContext('2d')!.strokeStyle = `rgba(0, 0, 0, 0.4)`;\n\t\tstore.config.canvas.getContext('2d')!.lineWidth = 2;\n\n\t\t// First wave\n\t\tstore.config.canvas.getContext('2d')!.beginPath();\n\t\tstore.config.canvas.getContext('2d')!.arc(left + 25, top + 15, 5, 0, Math.PI * 2);\n\t\tstore.config.canvas.getContext('2d')!.stroke();\n\n\t\t// Second wave\n\t\tstore.config.canvas.getContext('2d')!.beginPath();\n\t\tstore.config.canvas.getContext('2d')!.arc(left + 25, top + 15, 8, 0, Math.PI * 2);\n\t\tstore.config.canvas.getContext('2d')!.stroke();\n\t} else {\n\t\t// Mute line\n\t\tstore.config.canvas.getContext('2d')!.strokeStyle = 'rgba(255, 0, 0, 0.6)';\n\t\tstore.config.canvas.getContext('2d')!.lineWidth = 3;\n\t\tstore.config.canvas.getContext('2d')!.beginPath();\n\t\tstore.config.canvas.getContext('2d')!.moveTo(left + 25, top + 5);\n\t\tstore.config.canvas.getContext('2d')!.lineTo(left + 5, top + 25);\n\t\tstore.config.canvas.getContext('2d')!.stroke();\n\t}\n};\n\nconst listenToSoundController = (store: StoreType) => {\n\tif (!store.config.enableSounds) {\n\t\treturn;\n\t}\n\tstore.config.canvas.addEventListener('click', function (event) {\n\t\tconst rect = store.config.canvas.getBoundingClientRect();\n\t\tconst x = event.clientX - rect.left,\n\t\t\ty = event.clientY - rect.top;\n\t\tconst width = 30,\n\t\t\theight = 30,\n\t\t\tleft = store.config.canvas.width - width - 10,\n\t\t\ttop = 10;\n\n\t\tif (x >= left && x <= left + this.width && y >= top && y <= top + this.height) {\n\t\t\tif (MusicPlayer.getInstance().isMuted) {\n\t\t\t\tMusicPlayer.getInstance().unmute();\n\t\t\t} else {\n\t\t\t\tMusicPlayer.getInstance().mute();\n\t\t\t}\n\t\t}\n\t});\n};\n\nexport const Canvas = {\n\tresizeCanvas,\n\tdrawGrid,\n\tdrawPacman,\n\tdrawGhosts,\n\trenderGameOver,\n\tdrawSoundController,\n\tlistenToSoundController\n};\n","import { GameTheme, GhostName, ThemeKeys } from './types';\n\nexport const CELL_SIZE = 20;\nexport const GAP_SIZE = 2;\nexport const GRID_WIDTH = 52;\nexport const GRID_HEIGHT = 7;\nexport const PACMAN_COLOR = 'yellow';\nexport const PACMAN_COLOR_POWERUP = 'red';\nexport const PACMAN_COLOR_DEAD = '#80808064';\nexport const GHOST_NAMES: GhostName[] = ['blinky', 'clyde', 'inky', 'pinky'];\nexport const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\nexport const DELTA_TIME = 250;\nexport const PACMAN_DEATH_DURATION = 10;\nexport const PACMAN_POWERUP_DURATION = 15;\nexport const GAME_THEMES: { [key in ThemeKeys]: GameTheme } = {\n\tgithub: {\n\t\ttextColor: '#586069',\n\t\tgridBackground: '#ffffff',\n\t\tcontributionBoxColor: '#9be9a8',\n\t\temptyContributionBoxColor: '#ebedf0'\n\t},\n\t'github-dark': {\n\t\ttextColor: '#8b949e',\n\t\tgridBackground: '#0d1117',\n\t\tcontributionBoxColor: '#26a641',\n\t\temptyContributionBoxColor: '#161b22'\n\t},\n\tgitlab: {\n\t\ttextColor: '#626167',\n\t\tgridBackground: '#ffffff',\n\t\tcontributionBoxColor: '#7992f5',\n\t\temptyContributionBoxColor: '#ececef'\n\t},\n\t'gitlab-dark': {\n\t\ttextColor: '#999999',\n\t\tgridBackground: '#1f1f1f',\n\t\tcontributionBoxColor: '#2e7db1',\n\t\temptyContributionBoxColor: '#2d2d2d'\n\t}\n};\nexport const GHOSTS: { [key in GhostName | 'scared']: { imgDate: string; img: HTMLImageElement } } = {\n\tblinky: {\n\t\timgDate:\n\t\t\t'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAfUlEQVQ4T+2TUQ7AIAhDy/0PzQIRAqxmLtnn/DJPWypBAVkKKOMCyOQN7IRElLrcnIrDLNK4wVtxNbkb6Hq+jOcSbim6QVzKEstkw92gxVeFrMpqokix4wA+NvCOnvfArvcEbHoe2G9QmmhDMUc65p3xYC6q3zQPxtdl3NgF5QpL/b/rs3IAAAAASUVORK5CYIIA',\n\t\timg: new Image()\n\t},\n\tclyde: {\n\t\timgDate:\n\t\t\t'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAgUlEQVQ4T+2T0Q6AIAhFLx9sH1MfTIPCAeLKrcd8PHqP4JBQLN7BFacNlHkAs+AQcqIueBs2mVWjgtWwl4yCdrd/pHYLLlVEgR2yK0wy4SoI5TcGXU4wM+AEJQfwsUCuXngDOR4rqKbngf0C94gyFHmkbd4rbkxD/pv2jfR1Ky7sBNrzXbHpnBX+AAAAAElFTkSuQmCC',\n\t\timg: new Image()\n\t},\n\tinky: {\n\t\timgDate:\n\t\t\t'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAg0lEQVQ4T+WTWxKAIAhFuQvK/a+jFoT5QAVxypn+6vMEx6sDIO/jk12OAMs1WDVOXV3UBW+bRVbTFMFu8yCZBExH/g26VHCXI0AJpKgdUCUrTlkwxE+FECdzS7HiJemXgvyeO29gE7jD8wDVFX4vSLNtR1q2z+OVlaZxTaXYrq7HbxYBS8VgMVrqzkEAAAAASUVORK5CYIIA',\n\t\timg: new Image()\n\t},\n\tpinky: {\n\t\timgDate:\n\t\t\t'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAhklEQVQ4T+2T0Q2AIAwF281wC50Qt9DNagoptqVESfyUz4N3vJCCECxaD4o47gt6bsAo2IWUqAnehkUmbYpgNqwlvSCnur+dtnnAuYUVyCGJimTAi8DUzwmwOoGI7hYjDgAfC/jqiTfg47ZBND0P7BeoR+Sh8CMt8x5xYSWkv2nbcF834swuA/9u49Yy5bgAAAAASUVORK5CYIIA',\n\t\timg: new Image()\n\t},\n\tscared: {\n\t\timgDate:\n\t\t\t'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAeUlEQVQ4T82TUQ6AMAhD7UX0/sdyF0GREVmDmTN+bH9r6Bs0A0t2VpFULwDrrfBkZFcA3YC3ZodViAFGzQHyP0B2w2NrB0/1AoDbHwLoQ5/nrw1OBuD5e/crbM9Aiz35njHWzpSB/m3+0r40mV41M8U19WJe3Uw/tQOKt08pUUbBEQAAAABJRU5ErkJgggAA',\n\t\timg: new Image()\n\t}\n};\n","import { Canvas } from './canvas';\nimport {\n\tDELTA_TIME,\n\tGHOST_NAMES,\n\tGHOSTS,\n\tGRID_HEIGHT,\n\tGRID_WIDTH,\n\tMONTHS,\n\tPACMAN_DEATH_DURATION,\n\tPACMAN_POWERUP_DURATION\n} from './constants';\nimport { MusicPlayer, Sound } from './music-player';\nimport { SVG } from './svg';\nimport { StoreType } from './types';\n\nconst initializeGrid = (store: StoreType) => {\n\tstore.pacman.points = 0;\n\tstore.pacman.totalPoints = 0;\n\tstore.grid = Array.from({ length: GRID_HEIGHT }, () => Array.from({ length: GRID_WIDTH }, () => ({ commitsCount: 0, intensity: 0 })));\n\tstore.monthLabels = Array(GRID_WIDTH).fill('');\n\tlet maxCommits = 1;\n\n\tconst now = new Date();\n\tconst startOfCurrentWeek = new Date(now);\n\tstartOfCurrentWeek.setDate(now.getDate() - now.getDay());\n\n\tstore.contributions.forEach((contribution) => {\n\t\tconst contributionDate = new Date(contribution.date);\n\t\tconst dayOfWeek = contributionDate.getDay();\n\t\tconst weeksAgo = Math.floor((+startOfCurrentWeek - +contributionDate) / (1000 * 60 * 60 * 24 * 7));\n\n\t\tif (weeksAgo >= 0 && weeksAgo < GRID_WIDTH && dayOfWeek >= 0 && dayOfWeek < GRID_HEIGHT) {\n\t\t\tstore.grid[dayOfWeek][GRID_WIDTH - 1 - weeksAgo] = { commitsCount: contribution.count, intensity: 0 };\n\t\t\tif (contribution.count > maxCommits) maxCommits = contribution.count;\n\t\t}\n\t});\n\n\tfor (let x = 0; x < GRID_HEIGHT; x++) {\n\t\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\t\tif (store.grid[x][y].commitsCount > 0) {\n\t\t\t\tstore.grid[x][y].intensity = store.grid[x][y].commitsCount / maxCommits;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\tconst weeksAgo = GRID_WIDTH - 1 - y;\n\t\tconst columnDate = new Date(startOfCurrentWeek);\n\t\tcolumnDate.setDate(columnDate.getDate() - weeksAgo * 7);\n\t\tstore.monthLabels[y] = MONTHS[columnDate.getMonth()];\n\t}\n};\n\nconst placePacman = (store: StoreType) => {\n\tlet validCells = [];\n\tfor (let x = 0; x < GRID_HEIGHT; x++) {\n\t\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\t\tif (store.grid[x][y].intensity > 0) validCells.push({ x, y });\n\t\t}\n\t}\n\tif (validCells.length > 0) {\n\t\tconst randomCell = validCells[Math.floor(Math.random() * validCells.length)];\n\t\tstore.pacman = {\n\t\t\tx: randomCell.x,\n\t\t\ty: randomCell.y,\n\t\t\tdirection: 'right',\n\t\t\tpoints: 0,\n\t\t\ttotalPoints: 0,\n\t\t\tdeadRemainingDuration: 0,\n\t\t\tpowerupRemainingDuration: 0\n\t\t};\n\t}\n\tif (store.config.outputFormat == 'canvas') Canvas.drawPacman(store);\n};\n\nconst placeGhosts = (store: StoreType) => {\n\tstore.ghosts = [];\n\tstore.scaredGhostsDestinations = [];\n\tfor (let i = 0; i < 4; i++) {\n\t\tlet x, y;\n\t\tdo {\n\t\t\tx = Math.floor(Math.random() * GRID_HEIGHT);\n\t\t\ty = Math.floor(Math.random() * GRID_WIDTH);\n\t\t} while (store.grid[x][y].intensity === 0);\n\t\tstore.ghosts.push({ x, y, name: GHOST_NAMES[i], scared: false, target: undefined });\n\t\tstore.scaredGhostsDestinations.push({ x: 0, y: 0 });\n\t}\n\tif (store.config.outputFormat == 'canvas') Canvas.drawGhosts(store);\n};\n\nconst stopGame = async (store: StoreType) => {\n\tclearInterval(store.gameInterval);\n};\n\nconst startGame = async (store: StoreType) => {\n\tif (store.config.outputFormat == 'canvas') {\n\t\tstore.config.canvas = store.config.canvas;\n\t\tCanvas.resizeCanvas(store);\n\t\tCanvas.listenToSoundController(store);\n\t}\n\n\tstore.frameCount = 0;\n\tstore.ghosts.forEach((ghost) => (ghost.scared = false));\n\n\tinitializeGrid(store);\n\tif (store.config.outputFormat == 'canvas') Canvas.drawGrid(store);\n\n\tif (store.config.outputFormat == 'canvas') {\n\t\tif (!store.config.enableSounds) {\n\t\t\tMusicPlayer.getInstance().mute();\n\t\t}\n\t\tawait MusicPlayer.getInstance().preloadSounds();\n\t\tMusicPlayer.getInstance().startDefaultSound();\n\t\tawait MusicPlayer.getInstance().play(Sound.BEGINNING);\n\t}\n\n\tplacePacman(store);\n\tplaceGhosts(store);\n\n\tGHOSTS.blinky.img.src = GHOSTS.blinky.imgDate;\n\tGHOSTS.clyde.img.src = GHOSTS.clyde.imgDate;\n\tGHOSTS.inky.img.src = GHOSTS.inky.imgDate;\n\tGHOSTS.pinky.img.src = GHOSTS.pinky.imgDate;\n\tGHOSTS.scared.img.src = GHOSTS.scared.imgDate;\n\n\tif (store.config.outputFormat == 'svg') {\n\t\tconst remainingCells = () => store.grid.some((row) => row.some((cell) => cell.intensity > 0));\n\t\twhile (remainingCells()) {\n\t\t\tawait updateGame(store);\n\t\t}\n\t\t// One more time to generate svg\n\t\tawait updateGame(store);\n\t} else {\n\t\tclearInterval(store.gameInterval);\n\t\tstore.gameInterval = setInterval(async () => await updateGame(store), DELTA_TIME);\n\t}\n};\n\nconst updateGame = async (store: StoreType) => {\n\tstore.frameCount++;\n\tif (store.frameCount % store.config.gameSpeed !== 0) {\n\t\tstore.gameHistory.push({\n\t\t\tpacman: { ...store.pacman },\n\t\t\tghosts: store.ghosts.map((ghost) => ({ ...ghost })),\n\t\t\tgrid: store.grid.map((row) => [...row.map((col) => col.intensity)])\n\t\t});\n\t\treturn;\n\t}\n\n\tif (store.pacman.deadRemainingDuration) {\n\t\tstore.pacman.deadRemainingDuration--;\n\t\tif (!store.pacman.deadRemainingDuration) {\n\t\t\t// IT'S ALIVE!\n\t\t\tif (store.config.outputFormat == 'canvas')\n\t\t\t\tMusicPlayer.getInstance()\n\t\t\t\t\t.play(Sound.GAME_OVER)\n\t\t\t\t\t.then(() => MusicPlayer.getInstance().startDefaultSound());\n\t\t}\n\t}\n\n\tif (store.pacman.powerupRemainingDuration) {\n\t\tstore.pacman.powerupRemainingDuration--;\n\t\tif (!store.pacman.powerupRemainingDuration) {\n\t\t\tstore.ghosts.forEach((ghost) => (ghost.scared = false));\n\t\t\tstore.pacman.points = 0;\n\t\t}\n\t}\n\n\tconst remainingCells = store.grid.some((row) => row.some((cell) => cell.intensity > 0));\n\tif (!remainingCells) {\n\t\tif (store.config.outputFormat == 'canvas') {\n\t\t\tclearInterval(store.gameInterval);\n\t\t\tif (store.config.outputFormat == 'canvas') {\n\t\t\t\tCanvas.renderGameOver(store);\n\t\t\t\tMusicPlayer.getInstance()\n\t\t\t\t\t.play(Sound.BEGINNING)\n\t\t\t\t\t.then(() => MusicPlayer.getInstance().stopDefaultSound());\n\t\t\t}\n\t\t}\n\n\t\tif (store.config.outputFormat == 'svg') {\n\t\t\tconst animatedSVG = SVG.generateAnimatedSVG(store);\n\t\t\tconst svgBlob = new Blob([animatedSVG], {\n\t\t\t\ttype: 'image/svg+xml;charset=utf-8'\n\t\t\t});\n\t\t\tconst svgUrl = URL.createObjectURL(svgBlob);\n\t\t\tstore.config.svgCallback(svgUrl);\n\t\t}\n\n\t\tstore.config.gameOverCallback();\n\t\treturn;\n\t}\n\n\tmovePacman(store);\n\tmoveGhosts(store);\n\tcheckCollisions(store);\n\n\tstore.pacmanMouthOpen = !store.pacmanMouthOpen;\n\n\tstore.gameHistory.push({\n\t\tpacman: { ...store.pacman },\n\t\tghosts: store.ghosts.map((ghost) => ({ ...ghost })),\n\t\tgrid: store.grid.map((row) => [...row.map((col) => col.intensity)])\n\t});\n\n\tif (store.config.outputFormat == 'canvas') Canvas.drawGrid(store);\n\tif (store.config.outputFormat == 'canvas') Canvas.drawPacman(store);\n\tif (store.config.outputFormat == 'canvas') Canvas.drawGhosts(store);\n\tif (store.config.outputFormat == 'canvas') Canvas.drawSoundController(store);\n};\n\nconst movePacman = (store: StoreType) => {\n\tif (store.pacman.deadRemainingDuration) {\n\t\treturn;\n\t}\n\tlet targetCells: { x: number; y: number; distance: number }[] = [];\n\n\tif (store.pacman.powerupRemainingDuration) {\n\t\ttargetCells = store.ghosts.map((ghost) => ({\n\t\t\tx: ghost.x,\n\t\t\ty: ghost.y,\n\t\t\tdistance: Infinity\n\t\t}));\n\t} else {\n\t\tfor (let x = 0; x < GRID_HEIGHT; x++) {\n\t\t\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\t\t\tif (store.grid[x][y].intensity > 0) targetCells.push({ x, y, distance: Infinity });\n\t\t\t}\n\t\t}\n\t}\n\n\tif (targetCells.length === 0) return;\n\n\tconst closest = targetCells.reduce(\n\t\t(closest, cell) => {\n\t\t\tconst distance = Math.abs(cell.x - store.pacman.x) + Math.abs(cell.y - store.pacman.y);\n\t\t\treturn distance < closest.distance ? { ...cell, distance } : closest;\n\t\t},\n\t\t{ x: store.pacman.x, y: store.pacman.y, distance: Infinity }\n\t);\n\n\tconst dx = closest.x - store.pacman.x;\n\tconst dy = closest.y - store.pacman.y;\n\n\tif (Math.abs(dx) > Math.abs(dy)) {\n\t\tstore.pacman.x += Math.sign(dx);\n\t\tstore.pacman.direction = dx > 0 ? 'down' : 'up';\n\t} else {\n\t\tstore.pacman.y += Math.sign(dy);\n\t\tstore.pacman.direction = dy > 0 ? 'right' : 'left';\n\t}\n\n\tif (store.grid[store.pacman.x][store.pacman.y].intensity > 0) {\n\t\tstore.pacman.totalPoints += store.grid[store.pacman.x][store.pacman.y].commitsCount;\n\t\tstore.pacman.points++;\n\t\tstore.config.pointsIncreasedCallback(store.pacman.totalPoints);\n\t\tstore.grid[store.pacman.x][store.pacman.y].intensity = 0;\n\n\t\tif (store.pacman.points >= 30) activatePowerUp(store);\n\t}\n};\n\nconst moveGhosts = (store: StoreType) => {\n\tstore.ghosts.forEach((ghost, index) => {\n\t\tif (ghost.scared) {\n\t\t\tif (!ghost.target) {\n\t\t\t\tghost.target = getRandomDestination(ghost.x, ghost.y);\n\t\t\t}\n\n\t\t\tconst dx = ghost.target.x - ghost.x;\n\t\t\tconst dy = ghost.target.y - ghost.y;\n\t\t\tconst moveX = Math.abs(dx) > Math.abs(dy) ? Math.sign(dx) : 0;\n\t\t\tconst moveY = Math.abs(dy) >= Math.abs(dx) ? Math.sign(dy) : 0;\n\n\t\t\tconst newX = ghost.x + moveX;\n\t\t\tconst newY = ghost.y + moveY;\n\n\t\t\tif (newX >= 0 && newX < GRID_HEIGHT && newY >= 0 && newY < GRID_WIDTH) {\n\t\t\t\tghost.x = newX;\n\t\t\t\tghost.y = newY;\n\t\t\t}\n\n\t\t\tif (ghost.x === ghost.target.x && ghost.y === ghost.target.y) {\n\t\t\t\tghost.target = getRandomDestination(ghost.x, ghost.y);\n\t\t\t}\n\t\t} else {\n\t\t\tconst directions = [\n\t\t\t\t[-1, 0],\n\t\t\t\t[1, 0],\n\t\t\t\t[0, -1],\n\t\t\t\t[0, 1]\n\t\t\t];\n\t\t\tconst [dx, dy] = directions[Math.floor(Math.random() * directions.length)];\n\n\t\t\t// If Pacman has the power-up, ghosts move slower (move every other frame)\n\t\t\tif (store.pacman.powerupRemainingDuration && Math.random() < 0.5) return;\n\n\t\t\tconst newX = ghost.x + dx;\n\t\t\tconst newY = ghost.y + dy;\n\n\t\t\tif (newX >= 0 && newX < GRID_HEIGHT && newY >= 0 && newY < GRID_WIDTH) {\n\t\t\t\tghost.x = newX;\n\t\t\t\tghost.y = newY;\n\t\t\t}\n\t\t}\n\t});\n};\n\nconst getRandomDestination = (x: number, y: number) => {\n\tconst maxDistance = 10;\n\tconst randomX = x + Math.floor(Math.random() * (2 * maxDistance + 1)) - maxDistance;\n\tconst randomY = y + Math.floor(Math.random() * (2 * maxDistance + 1)) - maxDistance;\n\treturn {\n\t\tx: Math.max(0, Math.min(randomX, GRID_HEIGHT - 1)),\n\t\ty: Math.max(0, Math.min(randomY, GRID_WIDTH - 1))\n\t};\n};\n\nconst checkCollisions = (store: StoreType) => {\n\tif (store.pacman.deadRemainingDuration) return;\n\n\tstore.ghosts.forEach((ghost, index) => {\n\t\tif (ghost.x === store.pacman.x && ghost.y === store.pacman.y) {\n\t\t\tif (store.pacman.powerupRemainingDuration && ghost.scared) {\n\t\t\t\trespawnGhost(store, index);\n\t\t\t\tstore.pacman.points += 10;\n\t\t\t\tif (store.config.outputFormat == 'canvas') {\n\t\t\t\t\tMusicPlayer.getInstance().play(Sound.EAT_GHOST);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstore.pacman.points = 0;\n\t\t\t\tstore.pacman.powerupRemainingDuration = 0;\n\t\t\t\tstore.pacman.deadRemainingDuration = PACMAN_DEATH_DURATION;\n\t\t\t\tif (store.config.outputFormat == 'canvas') {\n\t\t\t\t\tMusicPlayer.getInstance()\n\t\t\t\t\t\t.play(Sound.GAME_OVER)\n\t\t\t\t\t\t.then(() => MusicPlayer.getInstance().stopDefaultSound());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n};\n\nconst respawnGhost = (store: StoreType, ghostIndex: number) => {\n\tlet x, y;\n\tdo {\n\t\tx = Math.floor(Math.random() * GRID_HEIGHT);\n\t\ty = Math.floor(Math.random() * GRID_WIDTH);\n\t} while ((Math.abs(x - store.pacman.x) <= 2 && Math.abs(y - store.pacman.y) <= 2) || store.grid[x][y].intensity === 0);\n\tstore.ghosts[ghostIndex] = {\n\t\tx,\n\t\ty,\n\t\tname: GHOST_NAMES[ghostIndex % GHOST_NAMES.length],\n\t\tscared: false,\n\t\ttarget: undefined\n\t};\n};\n\nconst activatePowerUp = (store: StoreType) => {\n\tstore.pacman.powerupRemainingDuration = PACMAN_POWERUP_DURATION;\n\tstore.ghosts.forEach((ghost) => (ghost.scared = true));\n};\n\nexport const Game = {\n\tstartGame,\n\tstopGame\n};\n","export enum Sound {\n\tDEFAULT = 'https://cdn.jsdelivr.net/gh/abozanona/pacman-contribution-graph@1.0.2/src/assets/sounds/pacman_chomp.wav',\n\tBEGINNING = 'https://cdn.jsdelivr.net/gh/abozanona/pacman-contribution-graph@1.0.2/src/assets/sounds/pacman_beginning.wav',\n\tGAME_OVER = 'https://cdn.jsdelivr.net/gh/abozanona/pacman-contribution-graph@1.0.2/src/assets/sounds/pacman_death.wav',\n\tEAT_GHOST = 'https://cdn.jsdelivr.net/gh/abozanona/pacman-contribution-graph@1.0.2/src/assets/sounds/pacman_eatghost.wav'\n}\n\nexport class MusicPlayer {\n\tprivate static instance: MusicPlayer;\n\tprivate audioContext: AudioContext;\n\tprivate sounds: Map<Sound, AudioBuffer> = new Map();\n\tprivate currentSource: AudioBufferSourceNode | null = null;\n\tprivate defaultSource: AudioBufferSourceNode | null = null;\n\tpublic isMuted: boolean = false;\n\n\tprivate constructor() {\n\t\tthis.audioContext = new AudioContext();\n\t}\n\n\tpublic static getInstance(): MusicPlayer {\n\t\tif (!MusicPlayer.instance) {\n\t\t\tMusicPlayer.instance = new MusicPlayer();\n\t\t}\n\t\treturn MusicPlayer.instance;\n\t}\n\n\tpublic async preloadSounds(): Promise<void> {\n\t\tfor (const sound of Object.values(Sound)) {\n\t\t\tconst response = await fetch(sound);\n\t\t\tconst arrayBuffer = await response.arrayBuffer();\n\t\t\tconst audioBuffer = await this.audioContext.decodeAudioData(arrayBuffer);\n\t\t\tthis.sounds.set(sound as Sound, audioBuffer);\n\t\t}\n\t}\n\n\tpublic async play(sound: Sound): Promise<void> {\n\t\tif (this.isMuted) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.currentSource) {\n\t\t\ttry {\n\t\t\t\tthis.currentSource.stop();\n\t\t\t} catch (ex) {}\n\t\t}\n\n\t\tconst buffer = this.sounds.get(sound);\n\t\tif (!buffer) {\n\t\t\tconsole.error(`Sound ${sound} not found`);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.currentSource = this.audioContext.createBufferSource();\n\t\tthis.currentSource.buffer = buffer;\n\t\tthis.currentSource.connect(this.audioContext.destination);\n\n\t\tif (!this.isMuted) {\n\t\t\tthis.currentSource.start();\n\t\t}\n\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.currentSource!.onended = () => {\n\t\t\t\tthis.currentSource = null;\n\t\t\t\tresolve();\n\t\t\t};\n\t\t});\n\t}\n\n\tpublic startDefaultSound(): void {\n\t\tif (this.defaultSource) {\n\t\t\ttry {\n\t\t\t\tthis.defaultSource.stop();\n\t\t\t} catch (ex) {}\n\t\t}\n\n\t\tconst buffer = this.sounds.get(Sound.DEFAULT);\n\t\tif (!buffer) {\n\t\t\tconsole.error('Default sound not found');\n\t\t\treturn;\n\t\t}\n\n\t\tthis.defaultSource = this.audioContext.createBufferSource();\n\t\tthis.defaultSource.buffer = buffer;\n\t\tthis.defaultSource.loop = true;\n\t\tthis.defaultSource.connect(this.audioContext.destination);\n\n\t\tif (!this.isMuted) {\n\t\t\tthis.defaultSource.start();\n\t\t}\n\t}\n\n\tpublic stopDefaultSound(): void {\n\t\tif (this.defaultSource) {\n\t\t\ttry {\n\t\t\t\tthis.defaultSource.stop();\n\t\t\t} catch (ex) {}\n\t\t\tthis.defaultSource = null;\n\t\t}\n\t}\n\n\tpublic mute(): void {\n\t\tthis.isMuted = true;\n\t\tif (this.currentSource) {\n\t\t\tthis.currentSource.disconnect();\n\t\t}\n\t\tif (this.defaultSource) {\n\t\t\tthis.defaultSource.disconnect();\n\t\t}\n\t}\n\n\tpublic unmute(): void {\n\t\tthis.isMuted = false;\n\t\tif (this.currentSource) {\n\t\t\tthis.currentSource.connect(this.audioContext.destination);\n\t\t}\n\t\tif (this.defaultSource) {\n\t\t\tthis.defaultSource.connect(this.audioContext.destination);\n\t\t}\n\t}\n}\n","import type { Config, StoreType } from './types';\n\nexport const Store: StoreType = {\n\tframeCount: 0,\n\tcontributions: [],\n\tpacman: {\n\t\tx: 0,\n\t\ty: 0,\n\t\tdirection: 'right',\n\t\tpoints: 0,\n\t\ttotalPoints: 0,\n\t\tdeadRemainingDuration: 0,\n\t\tpowerupRemainingDuration: 0\n\t},\n\tghosts: [],\n\tgrid: [],\n\tmonthLabels: [],\n\tpacmanMouthOpen: true,\n\tgameInterval: 0,\n\tscaredGhostsDestinations: [],\n\tgameHistory: [],\n\tconfig: undefined as unknown as Config\n};\n","import { CELL_SIZE, GAP_SIZE, GHOSTS, GRID_HEIGHT, GRID_WIDTH, PACMAN_COLOR, PACMAN_COLOR_DEAD, PACMAN_COLOR_POWERUP } from './constants';\nimport { StoreType } from './types';\nimport { Utils } from './utils';\n\nconst generateAnimatedSVG = (store: StoreType) => {\n\tconst svgWidth = GRID_WIDTH * (CELL_SIZE + GAP_SIZE);\n\tconst svgHeight = GRID_HEIGHT * (CELL_SIZE + GAP_SIZE) + 20;\n\tlet svg = `<svg width=\"${svgWidth}\" height=\"${svgHeight}\" xmlns=\"http://www.w3.org/2000/svg\">`;\n\tsvg += `<rect width=\"100%\" height=\"100%\" fill=\"${Utils.getCurrentTheme(store).gridBackground}\"/>`;\n\n\tsvg += generateGhostsPredefinition();\n\n\t// Month labels\n\tlet lastMonth = '';\n\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\tif (store.monthLabels[y] !== lastMonth) {\n\t\t\tconst xPos = y * (CELL_SIZE + GAP_SIZE) + CELL_SIZE / 2;\n\t\t\tsvg += `<text x=\"${xPos}\" y=\"10\" text-anchor=\"middle\" font-size=\"10\" fill=\"${Utils.getCurrentTheme(store).textColor}\">${store.monthLabels[y]}</text>`;\n\t\t\tlastMonth = store.monthLabels[y];\n\t\t}\n\t}\n\n\t// Grid\n\tfor (let x = 0; x < GRID_HEIGHT; x++) {\n\t\tfor (let y = 0; y < GRID_WIDTH; y++) {\n\t\t\tconst cellX = y * (CELL_SIZE + GAP_SIZE);\n\t\t\tconst cellY = x * (CELL_SIZE + GAP_SIZE) + 15;\n\t\t\tconst intensity = store.gameHistory[0].grid[x][y];\n\t\t\tconst color = intensity > 0 ? getContributionColor(store, intensity) : Utils.getCurrentTheme(store).emptyContributionBoxColor;\n\t\t\tsvg += `<rect id=\"cell-${x}-${y}\" x=\"${cellX}\" y=\"${cellY}\" width=\"${CELL_SIZE}\" height=\"${CELL_SIZE}\" rx=\"5\" fill=\"${color}\">\n <animate attributeName=\"fill\" dur=\"${store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\" \n values=\"${generateCellColorValues(store, x, y)}\" \n keyTimes=\"${generateKeyTimes(store)}\"/>\n </rect>`;\n\t\t}\n\t}\n\n\t// Pacman\n\tsvg += `<path id=\"pacman\" d=\"${generatePacManPath(0.35)}\"\n transform=\"translate(${store.pacman.y * (CELL_SIZE + GAP_SIZE)}, ${store.pacman.x * (CELL_SIZE + GAP_SIZE) + 15})\">\n\t\t<animate attributeName=\"fill\" dur=\"${store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes(store)}\"\n values=\"${generatePacManColors(store)}\"/>\n <animateTransform attributeName=\"transform\" type=\"translate\" dur=\"${store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes(store)}\"\n values=\"${generatePacManPositions(store)}\"/>\n <animate attributeName=\"d\" dur=\"0.2s\" repeatCount=\"indefinite\"\n values=\"${generatePacManPath(0.25)};${generatePacManPath(0.05)};${generatePacManPath(0.25)}\"/>\n </path>`;\n\n\t// Ghosts\n\tstore.ghosts.forEach((ghost, index) => {\n\t\tsvg += `<use id=\"ghost${index}\" width=\"${CELL_SIZE}\" height=\"${CELL_SIZE}\" href=\"#ghost-${ghost.name}\">\n <animateTransform attributeName=\"transform\" type=\"translate\" dur=\"${store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes(store)}\"\n values=\"${generateGhostPositions(store, index)}\"/>\n <animate attributeName=\"href\" dur=\"${store.gameHistory.length * 300}ms\" repeatCount=\"indefinite\"\n keyTimes=\"${generateKeyTimes(store)}\"\n values=\"${generateGhostColors(store, index)}\"/>\n </use>`;\n\t});\n\n\tsvg += '</svg>';\n\t// TODO: minify SVG\n\treturn svg;\n};\n\nconst generatePacManPath = (mouthAngle: number) => {\n\tconst radius = CELL_SIZE / 2;\n\tconst startAngle = mouthAngle;\n\tconst endAngle = 2 * Math.PI - mouthAngle;\n\n\treturn `M ${radius},${radius}\n L ${radius + radius * Math.cos(startAngle)},${radius + radius * Math.sin(startAngle)}\n A ${radius},${radius} 0 1,1 ${radius + radius * Math.cos(endAngle)},${radius + radius * Math.sin(endAngle)}\n Z`;\n};\n\nconst generateKeyTimes = (store: StoreType) => {\n\treturn store.gameHistory.map((_, index) => index / (store.gameHistory.length - 1)).join(';');\n};\n\nconst generatePacManPositions = (store: StoreType) => {\n\treturn store.gameHistory\n\t\t.map((state) => {\n\t\t\tconst x = state.pacman.y * (CELL_SIZE + GAP_SIZE);\n\t\t\tconst y = state.pacman.x * (CELL_SIZE + GAP_SIZE) + 15;\n\t\t\treturn `${x},${y}`;\n\t\t})\n\t\t.join(';');\n};\n\nconst generatePacManColors = (store: StoreType) => {\n\treturn store.gameHistory\n\t\t.map((state) => {\n\t\t\tif (state.pacman.deadRemainingDuration) {\n\t\t\t\treturn PACMAN_COLOR_DEAD;\n\t\t\t} else if (state.pacman.powerupRemainingDuration) {\n\t\t\t\treturn PACMAN_COLOR_POWERUP;\n\t\t\t} else {\n\t\t\t\treturn PACMAN_COLOR;\n\t\t\t}\n\t\t})\n\t\t.join(';');\n};\n\nconst generateCellColorValues = (store: StoreType, x: number, y: number) => {\n\treturn store.gameHistory\n\t\t.map((state) => {\n\t\t\tconst intensity = state.grid[x][y];\n\t\t\treturn intensity > 0 ? getContributionColor(store, intensity) : Utils.getCurrentTheme(store).emptyContributionBoxColor;\n\t\t})\n\t\t.join(';');\n};\n\nconst getContributionColor = (store: StoreType, intensity: number) => {\n\tconst adjustedIntensity = intensity < 0.2 ? 0.3 : intensity;\n\treturn Utils.hexToRGBA(Utils.getCurrentTheme(store).contributionBoxColor, adjustedIntensity);\n};\n\nconst generateGhostPositions = (store: StoreType, ghostIndex: number) => {\n\treturn store.gameHistory\n\t\t.map((state) => {\n\t\t\tconst ghost = state.ghosts[ghostIndex];\n\t\t\tconst x = ghost.y * (CELL_SIZE + GAP_SIZE);\n\t\t\tconst y = ghost.x * (CELL_SIZE + GAP_SIZE) + 15;\n\t\t\treturn `${x},${y}`;\n\t\t})\n\t\t.join(';');\n};\n\nconst generateGhostColors = (store: StoreType, ghostIndex: number) => {\n\treturn store.gameHistory\n\t\t.map((state) => {\n\t\t\tconst ghost = state.ghosts[ghostIndex];\n\t\t\treturn ghost.scared ? '#scared' : '#' + ghost.name;\n\t\t})\n\t\t.join(';');\n};\n\nconst generateGhostsPredefinition = () => {\n\treturn `<defs>\n\t\t<symbol id=\"blinky\" viewBox=\"0 0 100 100\">\n <image href=\"${GHOSTS['blinky'].imgDate}\" width=\"100\" height=\"100\"/>\n\t\t</symbol>\n\t\t<symbol id=\"clyde\" viewBox=\"0 0 100 100\">\n <image href=\"${GHOSTS['clyde'].imgDate}\" width=\"100\" height=\"100\"/>\n\t\t</symbol>\n\t\t<symbol id=\"inky\" viewBox=\"0 0 100 100\">\n <image href=\"${GHOSTS['inky'].imgDate}\" width=\"100\" height=\"100\"/>\n\t\t</symbol>\n\t\t<symbol id=\"pinky\" viewBox=\"0 0 100 100\">\n <image href=\"${GHOSTS['pinky'].imgDate}\" width=\"100\" height=\"100\"/>\n\t\t</symbol>\n\t\t<symbol id=\"scared\" viewBox=\"0 0 100 100\">\n <image href=\"${GHOSTS['scared'].imgDate}\" width=\"100\" height=\"100\"/>\n\t\t</symbol>\n\t</defs>`;\n};\n\nexport const SVG = {\n\tgenerateAnimatedSVG\n};\n","import { GAME_THEMES } from './constants';\nimport type { Contribution, GameTheme, StoreType } from './types';\n\nconst getGitlabContribution = async (username: string): Promise<Contribution[]> => {\n\t// const response = await fetch(`https://gitlab.com/users/${username}/calendar.json`);\n\tconst response = await fetch(\n\t\t`https://v0-new-project-q1hhrdodoye-abozanona-gmailcoms-projects.vercel.app/api/contributions?username=${username}`\n\t);\n\tconst contributionsList = await response.json();\n\treturn Object.entries(contributionsList).map(([date, count]) => ({\n\t\tdate: new Date(date),\n\t\tcount: Number(count)\n\t}));\n};\n\nconst getGithubContribution = async (username: string): Promise<Contribution[]> => {\n\tconst response = await fetch(\n\t\t`https://api.github.com/search/commits?q=author:${username}&sort=author-date&order=desc&page=1&per_page=1000`\n\t);\n\tconst contributionsList = await response.json();\n\treturn Array.from(\n\t\tcontributionsList.items\n\t\t\t.reduce((map: any, item: any) => {\n\t\t\t\tconst dateString = item.commit.committer.date.split('T')[0];\n\t\t\t\tconst date = new Date(dateString);\n\t\t\t\tconst count = (map.get(dateString) || { count: 0 }).count + 1;\n\t\t\t\treturn map.set(dateString, { date, count });\n\t\t\t}, new Map())\n\t\t\t.values()\n\t);\n};\n\nconst getCurrentTheme = (store: StoreType): GameTheme => {\n\treturn GAME_THEMES[store.config.gameTheme] ?? GAME_THEMES['github'];\n};\n\nfunction hexToRGBA(hex: string, alpha: number): string {\n\tconst r = parseInt(hex.slice(1, 3), 16);\n\tconst g = parseInt(hex.slice(3, 5), 16);\n\tconst b = parseInt(hex.slice(5, 7), 16);\n\treturn `rgba(${r}, ${g}, ${b}, ${alpha})`;\n}\n\nexport const Utils = {\n\tgetGitlabContribution,\n\tgetGithubContribution,\n\tgetCurrentTheme,\n\thexToRGBA\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Game } from './game';\nimport { Store } from './store';\nimport { Config, StoreType } from './types';\nimport { Utils } from './utils';\n\nexport class PacmanRenderer {\n\tstore: StoreType;\n\tconf: Config;\n\n\tconstructor(conf: Config) {\n\t\tthis.store = { ...Store };\n\t\tthis.conf = { ...conf };\n\t}\n\n\tpublic async start() {\n\t\tconst defaultConfing: Config = {\n\t\t\tplatform: 'github',\n\t\t\tusername: '',\n\t\t\tcanvas: undefined as unknown as HTMLCanvasElement,\n\t\t\toutputFormat: 'svg',\n\t\t\tsvgCallback: (_: string) => {},\n\t\t\tgameOverCallback: () => () => {},\n\t\t\tgameTheme: 'github',\n\t\t\tgameSpeed: 1,\n\t\t\tenableSounds: true,\n\t\t\tpointsIncreasedCallback: (_: number) => {}\n\t\t};\n\t\tthis.store.config = { ...defaultConfing, ...this.conf };\n\n\t\tswitch (this.conf.platform) {\n\t\t\tcase 'gitlab':\n\t\t\t\tthis.store.contributions = await Utils.getGitlabContribution(this.conf.username);\n\t\t\t\tbreak;\n\n\t\t\tcase 'github':\n\t\t\t\tthis.store.contributions = await Utils.getGithubContribution(this.conf.username);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tGame.startGame(this.store);\n\t}\n\n\tpublic stop() {\n\t\tGame.stopGame(this.store);\n\t}\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t={d:(a,e)=>{for(var n in e)t.o(e,n)&&!t.o(a,n)&&Object.defineProperty(a,n,{enumerable:!0,get:e[n]})},o:(t,a)=>Object.prototype.hasOwnProperty.call(t,a)},a={};t.d(a,{U:()=>T});const e=20,n=52,o="yellow",r=["red","pink","cyan","orange"],s=[34,139,34],c="#ececef",i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],l={contributions:[],pacman:{x:0,y:0,direction:"right",points:0,powerUp:!1},ghosts:[],grid:[],monthLabels:[],pacmanMouthOpen:!0,gameInterval:0,scaredGhostsDestinations:[],gameHistory:[],canvas:void 0,outputFormat:"canvas",svgCallback:t=>{},gameOverCallback:()=>{}},m=()=>{l.canvas.getContext("2d").clearRect(0,0,l.canvas.width,l.canvas.height);for(let t=0;t<7;t++)for(let a=0;a<n;a++){const n=l.grid[t][a];if(n>0){const t=`rgba(${s[0]}, ${s[1]}, ${s[2]}, ${n<.2?.3:n})`;l.canvas.getContext("2d").fillStyle=t}else l.canvas.getContext("2d").fillStyle=c;l.canvas.getContext("2d").beginPath(),l.canvas.getContext("2d").roundRect(22*a,22*t+15,e,e,5),l.canvas.getContext("2d").fill()}l.canvas.getContext("2d").fillStyle="black",l.canvas.getContext("2d").font="10px Arial",l.canvas.getContext("2d").textAlign="center";let t="";for(let a=0;a<n;a++)if(l.monthLabels[a]!==t){const e=22*a+10;l.canvas.getContext("2d").fillText(l.monthLabels[a],e,10),t=l.monthLabels[a]}},h=()=>{const t=22*l.pacman.y+10,a=22*l.pacman.x+10+15;l.canvas.getContext("2d").fillStyle=l.pacman.powerUp?"red":o;const e=l.pacmanMouthOpen?.25*Math.PI:.1*Math.PI;let n,r;switch(l.pacman.direction){case"up":n=1.5*Math.PI+e,r=1.5*Math.PI-e;break;case"down":n=.5*Math.PI+e,r=.5*Math.PI-e;break;case"left":n=Math.PI+e,r=Math.PI-e;break;default:n=0+e,r=2*Math.PI-e}l.canvas.getContext("2d").beginPath(),l.canvas.getContext("2d").arc(t,a,10,n,r),l.canvas.getContext("2d").lineTo(t,a),l.canvas.getContext("2d").fill()},g=()=>{l.ghosts.forEach((t=>{const a=22*t.y+10,e=22*t.x+10+15,n=10;l.canvas.getContext("2d").fillStyle=t.scared?"blue":t.color,l.canvas.getContext("2d").beginPath(),l.canvas.getContext("2d").arc(a,e,n,0,Math.PI),l.canvas.getContext("2d").rect(a-n,e,20,n),l.canvas.getContext("2d").fill(),l.canvas.getContext("2d").fillStyle="white",l.canvas.getContext("2d").beginPath(),l.canvas.getContext("2d").arc(a-n/3,e-n/3,2.5,0,2*Math.PI),l.canvas.getContext("2d").arc(a+n/3,e-n/3,2.5,0,2*Math.PI),l.canvas.getContext("2d").fill(),l.canvas.getContext("2d").fillStyle="black",l.canvas.getContext("2d").beginPath(),l.canvas.getContext("2d").arc(a-n/3,e-n/3,1.25,0,2*Math.PI),l.canvas.getContext("2d").arc(a+n/3,e-n/3,1.25,0,2*Math.PI),l.canvas.getContext("2d").fill()}))},d=t=>{const a=10,e=t,n=2*Math.PI-t;return`M 10,10\n L ${a+a*Math.cos(e)},${a+a*Math.sin(e)}\n A 10,10 0 1,1 ${a+a*Math.cos(n)},${a+a*Math.sin(n)}\n Z`},p=()=>l.gameHistory.map(((t,a)=>a/(l.gameHistory.length-1))).join(";"),u=(t,a)=>l.gameHistory.map((e=>{const n=e.grid[t][a];return n>0?f(n):c})).join(";"),f=t=>`rgba(${s[0]}, ${s[1]}, ${s[2]}, ${t<.2?.3:t})`,v=t=>l.gameHistory.map((a=>{const e=a.ghosts[t];return`${22*e.y},${22*e.x+15}`})).join(";"),y=()=>{if("svg"==l.outputFormat){const t=()=>l.grid.some((t=>t.some((t=>t>0))));for(;t();)x();x()}else clearInterval(l.gameInterval),l.gameInterval=setInterval((()=>x()),200)},x=()=>{if(l.grid.some((t=>t.some((t=>t>0)))))$(),b(),C(),l.pacmanMouthOpen=!l.pacmanMouthOpen,l.gameHistory.push({pacman:Object.assign({},l.pacman),ghosts:l.ghosts.map((t=>Object.assign({},t))),grid:l.grid.map((t=>[...t]))}),"canvas"==l.outputFormat&&m(),"canvas"==l.outputFormat&&h(),"canvas"==l.outputFormat&&g();else{if("canvas"==l.outputFormat&&(clearInterval(l.gameInterval),"canvas"==l.outputFormat&&(l.canvas.getContext("2d").fillStyle="black",l.canvas.getContext("2d").font="20px Arial",l.canvas.getContext("2d").textAlign="center",l.canvas.getContext("2d").fillText("Game Over",l.canvas.width/2,l.canvas.height/2))),"svg"==l.outputFormat){const t=(()=>{let t='<svg width="1144" height="174" xmlns="http://www.w3.org/2000/svg">',a="";for(let e=0;e<n;e++)l.monthLabels[e]!==a&&(t+=`<text x="${22*e+10}" y="10" text-anchor="middle" font-size="10" fill="black">${l.monthLabels[e]}</text>`,a=l.monthLabels[e]);for(let a=0;a<7;a++)for(let e=0;e<n;e++){const n=22*e,o=22*a+15,r=l.gameHistory[0].grid[a][e],s=r>0?f(r):c;t+=`<rect id="cell-${a}-${e}" x="${n}" y="${o}" width="20" height="20" rx="5" fill="${s}">\n <animate attributeName="fill" dur="${300*l.gameHistory.length}ms" repeatCount="indefinite" \n values="${u(a,e)}" \n keyTimes="${p()}"/>\n </rect>`}return t+=`<path id="pacman" fill="${o}" d="${d(.25)}"\n transform="translate(${22*l.pacman.y}, ${22*l.pacman.x+15})">\n <animateTransform attributeName="transform" type="translate" dur="${300*l.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${p()}"\n values="${l.gameHistory.map((t=>`${22*t.pacman.y},${22*t.pacman.x+15}`)).join(";")}"/>\n <animate attributeName="d" dur="0.2s" repeatCount="indefinite"\n values="${d(.25)};${d(.05)};${d(.25)}"/>\n </path>`,l.ghosts.forEach(((a,n)=>{var o,r;t+=`<path id="ghost${n}" d="${r=10,`M ${r},${2*r}\n Q ${.8*r},${1.5*r} ${.5*r},${1.3*r}\n Q ${.3*r},${1.1*r} 0,${r}\n L 0,0\n L ${2*r},0\n L ${2*r},${r}\n Q ${1.7*r},${1.1*r} ${1.5*r},${1.3*r}\n Q ${1.2*r},${1.5*r} ${r},${2*r}\n Z`}" fill="${a.color}">\n <animate attributeName="fill" dur="${300*l.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${p()}"\n values="${o=n,l.gameHistory.map((t=>{const a=t.ghosts[o];return a.scared?"blue":a.color})).join(";")}"/>\n <animateTransform attributeName="transform" type="translate" dur="${300*l.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${p()}"\n values="${v(n)}"/>\n </path>\n <circle cx="${e/3}" cy="${e/3}" r="2.5" fill="white">\n <animateTransform attributeName="transform" type="translate" dur="${300*l.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${p()}"\n values="${v(n)}"/>\n </circle>\n <circle cx="${40/3}" cy="${e/3}" r="2.5" fill="white">\n <animateTransform attributeName="transform" type="translate" dur="${300*l.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${p()}"\n values="${v(n)}"/>\n </circle>\n <circle cx="${e/3}" cy="${e/3}" r="1.25" fill="black">\n <animateTransform attributeName="transform" type="translate" dur="${300*l.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${p()}"\n values="${v(n)}"/>\n </circle>\n <circle cx="${40/3}" cy="${e/3}" r="1.25" fill="black">\n <animateTransform attributeName="transform" type="translate" dur="${300*l.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${p()}"\n values="${v(n)}"/>\n </circle>`})),t+="</svg>",t})(),a=new Blob([t],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(a);l.svgCallback(r)}l.gameOverCallback()}},$=()=>{let t=[];if(l.pacman.powerUp)t=l.ghosts.map((t=>({x:t.x,y:t.y,distance:1/0})));else for(let a=0;a<7;a++)for(let e=0;e<n;e++)l.grid[a][e]>0&&t.push({x:a,y:e,distance:1/0});if(0===t.length)return;const a=t.reduce(((t,a)=>{const e=Math.abs(a.x-l.pacman.x)+Math.abs(a.y-l.pacman.y);return e<t.distance?Object.assign(Object.assign({},a),{distance:e}):t}),{x:l.pacman.x,y:l.pacman.y,distance:1/0}),e=a.x-l.pacman.x,o=a.y-l.pacman.y;Math.abs(e)>Math.abs(o)?(l.pacman.x+=Math.sign(e),l.pacman.direction=e>0?"down":"up"):(l.pacman.y+=Math.sign(o),l.pacman.direction=o>0?"right":"left"),l.grid[l.pacman.x][l.pacman.y]>0&&(l.pacman.points+=1,l.grid[l.pacman.x][l.pacman.y]=0,l.pacman.points>=30&&I())},b=()=>{l.ghosts.forEach(((t,a)=>{if(t.scared){t.target||(t.target=M(t.x,t.y));const a=t.target.x-t.x,e=t.target.y-t.y,o=Math.abs(a)>Math.abs(e)?Math.sign(a):0,r=Math.abs(e)>=Math.abs(a)?Math.sign(e):0,s=t.x+o,c=t.y+r;s>=0&&s<7&&c>=0&&c<n&&(t.x=s,t.y=c),t.x===t.target.x&&t.y===t.target.y&&(t.target=M(t.x,t.y))}else{const a=[[-1,0],[1,0],[0,-1],[0,1]],[e,o]=a[Math.floor(Math.random()*a.length)];if(l.pacman.powerUp&&Math.random()<.5)return;const r=t.x+e,s=t.y+o;r>=0&&r<7&&s>=0&&s<n&&(t.x=r,t.y=s)}}))},M=(t,a)=>{const e=t+Math.floor(21*Math.random())-10,n=a+Math.floor(21*Math.random())-10;return{x:Math.max(0,Math.min(e,6)),y:Math.max(0,Math.min(n,51))}},C=()=>{l.ghosts.forEach(((t,a)=>{t.x===l.pacman.x&&t.y===l.pacman.y&&(l.pacman.powerUp&&t.scared?(w(a),l.pacman.points+=10,"canvas"==l.outputFormat&&setTimeout((()=>{k(),y()}),5e3)):"canvas"==l.outputFormat?(clearInterval(l.gameInterval),setTimeout((()=>{k(),y()}),5e3)):k())}))},w=t=>{let a,e;do{a=Math.floor(7*Math.random()),e=Math.floor(Math.random()*n)}while(Math.abs(a-l.pacman.x)<=2&&Math.abs(e-l.pacman.y)<=2||0===l.grid[a][e]);l.ghosts[t]={x:a,y:e,color:r[t%r.length],scared:!1,target:void 0}},k=()=>{let t=[];for(let a=0;a<7;a++)for(let e=0;e<n;e++)l.grid[a][e]>0&&t.push({x:a,y:e});if(t.length>0){const a=t[Math.floor(Math.random()*t.length)];l.pacman={x:a.x,y:a.y,direction:"right",points:0,powerUp:!1}}l.ghosts.forEach((t=>t.scared=!1)),"canvas"==l.outputFormat&&m(),"canvas"==l.outputFormat&&h(),"canvas"==l.outputFormat&&g()},I=()=>{l.pacman.powerUp=!0,l.ghosts.forEach((t=>t.scared=!0)),setTimeout((()=>{l.pacman.powerUp=!1,l.ghosts.forEach((t=>t.scared=!1)),l.pacman.points=0}),5e3)};var P=function(t,a,e,n){return new(e||(e=Promise))((function(o,r){function s(t){try{i(n.next(t))}catch(t){r(t)}}function c(t){try{i(n.throw(t))}catch(t){r(t)}}function i(t){var a;t.done?o(t.value):(a=t.value,a instanceof e?a:new e((function(t){t(a)}))).then(s,c)}i((n=n.apply(t,a||[])).next())}))};const T=t=>{return a=void 0,e=void 0,s=function*(){var a;"gitlab"==t.platform?l.contributions=yield(a=t.username,P(void 0,void 0,void 0,(function*(){const t=yield fetch(`https://gitlab.com/users/${a}/calendar.json`),e=yield t.json();return Object.entries(e).map((([t,a])=>({date:new Date(t),count:Number(a)})))}))):l.contributions=yield(t=>P(void 0,void 0,void 0,(function*(){const a=yield fetch(`https://api.github.com/search/commits?q=author:${t}&sort=author-date&order=desc&page=1&per_page=1000`),e=yield a.json();return Array.from(e.items.reduce(((t,a)=>{const e=a.commit.committer.date.split("T")[0],n=new Date(e),o=(t.get(e)||{count:0}).count+1;return t.set(e,{date:n,count:o})}),new Map).values())})))(t.username),t.output&&(l.outputFormat=t.output),l.svgCallback=t.svgCallback,l.gameOverCallback=t.gameOverCallback,"canvas"==t.output&&(l.canvas=t.canvas,l.canvas.width=1144,l.canvas.height=174),(()=>{l.grid=Array.from({length:7},(()=>Array.from({length:n},(()=>0)))),l.monthLabels=Array(n).fill("");let t=1;const a=new Date,e=new Date(a);e.setDate(a.getDate()-a.getDay()),l.contributions.forEach((a=>{const o=new Date(a.date),r=o.getDay(),s=Math.floor((+e-+o)/6048e5);s>=0&&s<n&&r>=0&&r<7&&(l.grid[r][51-s]=a.count,a.count>t&&(t=a.count))}));for(let a=0;a<7;a++)for(let e=0;e<n;e++)l.grid[a][e]>0&&(l.grid[a][e]=l.grid[a][e]/t);for(let t=0;t<n;t++){const a=51-t,n=new Date(e);n.setDate(n.getDate()-7*a),l.monthLabels[t]=i[n.getMonth()]}})(),"canvas"==t.output&&m(),(()=>{let t=[];for(let a=0;a<7;a++)for(let e=0;e<n;e++)l.grid[a][e]>0&&t.push({x:a,y:e});if(t.length>0){const a=t[Math.floor(Math.random()*t.length)];l.pacman={x:a.x,y:a.y,direction:"right",points:0,powerUp:!1}}"canvas"==l.outputFormat&&h()})(),(()=>{l.ghosts=[],l.scaredGhostsDestinations=[];for(let t=0;t<4;t++){const a=r[t%r.length];let e,o;do{e=Math.floor(7*Math.random()),o=Math.floor(Math.random()*n)}while(0===l.grid[e][o]);l.ghosts.push({x:e,y:o,color:a,scared:!1,target:void 0}),l.scaredGhostsDestinations.push({x:0,y:0})}"canvas"==l.outputFormat&&g()})(),y()},new((o=void 0)||(o=Promise))((function(t,n){function r(t){try{i(s.next(t))}catch(t){n(t)}}function c(t){try{i(s.throw(t))}catch(t){n(t)}}function i(a){var e;a.done?t(a.value):(e=a.value,e instanceof o?e:new o((function(t){t(e)}))).then(r,c)}i((s=s.apply(a,e||[])).next())}));var a,e,o,s};var O=a.U;export{O as renderContributions};
|
|
1
|
+
var t={d:(n,e)=>{for(var a in e)t.o(e,a)&&!t.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:e[a]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)},n={};t.d(n,{C:()=>P});const e=52,a="yellow",o="#80808064",i=["blinky","clyde","inky","pinky"],s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],c={github:{textColor:"#586069",gridBackground:"#ffffff",contributionBoxColor:"#9be9a8",emptyContributionBoxColor:"#ebedf0"},"github-dark":{textColor:"#8b949e",gridBackground:"#0d1117",contributionBoxColor:"#26a641",emptyContributionBoxColor:"#161b22"},gitlab:{textColor:"#626167",gridBackground:"#ffffff",contributionBoxColor:"#7992f5",emptyContributionBoxColor:"#ececef"},"gitlab-dark":{textColor:"#999999",gridBackground:"#1f1f1f",contributionBoxColor:"#2e7db1",emptyContributionBoxColor:"#2d2d2d"}},r={blinky:{imgDate:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAfUlEQVQ4T+2TUQ7AIAhDy/0PzQIRAqxmLtnn/DJPWypBAVkKKOMCyOQN7IRElLrcnIrDLNK4wVtxNbkb6Hq+jOcSbim6QVzKEstkw92gxVeFrMpqokix4wA+NvCOnvfArvcEbHoe2G9QmmhDMUc65p3xYC6q3zQPxtdl3NgF5QpL/b/rs3IAAAAASUVORK5CYIIA",img:new Image},clyde:{imgDate:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAgUlEQVQ4T+2T0Q6AIAhFLx9sH1MfTIPCAeLKrcd8PHqP4JBQLN7BFacNlHkAs+AQcqIueBs2mVWjgtWwl4yCdrd/pHYLLlVEgR2yK0wy4SoI5TcGXU4wM+AEJQfwsUCuXngDOR4rqKbngf0C94gyFHmkbd4rbkxD/pv2jfR1Ky7sBNrzXbHpnBX+AAAAAElFTkSuQmCC",img:new Image},inky:{imgDate:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAg0lEQVQ4T+WTWxKAIAhFuQvK/a+jFoT5QAVxypn+6vMEx6sDIO/jk12OAMs1WDVOXV3UBW+bRVbTFMFu8yCZBExH/g26VHCXI0AJpKgdUCUrTlkwxE+FECdzS7HiJemXgvyeO29gE7jD8wDVFX4vSLNtR1q2z+OVlaZxTaXYrq7HbxYBS8VgMVrqzkEAAAAASUVORK5CYIIA",img:new Image},pinky:{imgDate:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAhklEQVQ4T+2T0Q2AIAwF281wC50Qt9DNagoptqVESfyUz4N3vJCCECxaD4o47gt6bsAo2IWUqAnehkUmbYpgNqwlvSCnur+dtnnAuYUVyCGJimTAi8DUzwmwOoGI7hYjDgAfC/jqiTfg47ZBND0P7BeoR+Sh8CMt8x5xYSWkv2nbcF834swuA/9u49Yy5bgAAAAASUVORK5CYIIA",img:new Image},scared:{imgDate:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAeUlEQVQ4T82TUQ6AMAhD7UX0/sdyF0GREVmDmTN+bH9r6Bs0A0t2VpFULwDrrfBkZFcA3YC3ZodViAFGzQHyP0B2w2NrB0/1AoDbHwLoQ5/nrw1OBuD5e/crbM9Aiz35njHWzpSB/m3+0r40mV41M8U19WJe3Uw/tQOKt08pUUbBEQAAAABJRU5ErkJgggAA",img:new Image}};var g,u=function(t,n,e,a){return new(e||(e=Promise))((function(o,i){function s(t){try{r(a.next(t))}catch(t){i(t)}}function c(t){try{r(a.throw(t))}catch(t){i(t)}}function r(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,c)}r((a=a.apply(t,n||[])).next())}))};!function(t){t.DEFAULT="https://cdn.jsdelivr.net/gh/abozanona/pacman-contribution-graph@1.0.2/src/assets/sounds/pacman_chomp.wav",t.BEGINNING="https://cdn.jsdelivr.net/gh/abozanona/pacman-contribution-graph@1.0.2/src/assets/sounds/pacman_beginning.wav",t.GAME_OVER="https://cdn.jsdelivr.net/gh/abozanona/pacman-contribution-graph@1.0.2/src/assets/sounds/pacman_death.wav",t.EAT_GHOST="https://cdn.jsdelivr.net/gh/abozanona/pacman-contribution-graph@1.0.2/src/assets/sounds/pacman_eatghost.wav"}(g||(g={}));class d{constructor(){this.sounds=new Map,this.currentSource=null,this.defaultSource=null,this.isMuted=!1,this.audioContext=new AudioContext}static getInstance(){return d.instance||(d.instance=new d),d.instance}preloadSounds(){return u(this,void 0,void 0,(function*(){for(const t of Object.values(g)){const n=yield fetch(t),e=yield n.arrayBuffer(),a=yield this.audioContext.decodeAudioData(e);this.sounds.set(t,a)}}))}play(t){return u(this,void 0,void 0,(function*(){if(this.isMuted)return;if(this.currentSource)try{this.currentSource.stop()}catch(t){}const n=this.sounds.get(t);if(n)return this.currentSource=this.audioContext.createBufferSource(),this.currentSource.buffer=n,this.currentSource.connect(this.audioContext.destination),this.isMuted||this.currentSource.start(),new Promise((t=>{this.currentSource.onended=()=>{this.currentSource=null,t()}}));console.error(`Sound ${t} not found`)}))}startDefaultSound(){if(this.defaultSource)try{this.defaultSource.stop()}catch(t){}const t=this.sounds.get(g.DEFAULT);t?(this.defaultSource=this.audioContext.createBufferSource(),this.defaultSource.buffer=t,this.defaultSource.loop=!0,this.defaultSource.connect(this.audioContext.destination),this.isMuted||this.defaultSource.start()):console.error("Default sound not found")}stopDefaultSound(){if(this.defaultSource){try{this.defaultSource.stop()}catch(t){}this.defaultSource=null}}mute(){this.isMuted=!0,this.currentSource&&this.currentSource.disconnect(),this.defaultSource&&this.defaultSource.disconnect()}unmute(){this.isMuted=!1,this.currentSource&&this.currentSource.connect(this.audioContext.destination),this.defaultSource&&this.defaultSource.connect(this.audioContext.destination)}}var m=function(t,n,e,a){return new(e||(e=Promise))((function(o,i){function s(t){try{r(a.next(t))}catch(t){i(t)}}function c(t){try{r(a.throw(t))}catch(t){i(t)}}function r(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,c)}r((a=a.apply(t,n||[])).next())}))};const l=t=>m(void 0,void 0,void 0,(function*(){const n=yield fetch(`https://v0-new-project-q1hhrdodoye-abozanona-gmailcoms-projects.vercel.app/api/contributions?username=${t}`),e=yield n.json();return Object.entries(e).map((([t,n])=>({date:new Date(t),count:Number(n)})))})),h=t=>m(void 0,void 0,void 0,(function*(){const n=yield fetch(`https://api.github.com/search/commits?q=author:${t}&sort=author-date&order=desc&page=1&per_page=1000`),e=yield n.json();return Array.from(e.items.reduce(((t,n)=>{const e=n.commit.committer.date.split("T")[0],a=new Date(e),o=(t.get(e)||{count:0}).count+1;return t.set(e,{date:a,count:o})}),new Map).values())})),f=t=>{var n;return null!==(n=c[t.config.gameTheme])&&void 0!==n?n:c.github},p=function(t,n){return`rgba(${parseInt(t.slice(1,3),16)}, ${parseInt(t.slice(3,5),16)}, ${parseInt(t.slice(5,7),16)}, ${n})`},y=t=>{t.config.canvas.getContext("2d").fillStyle=f(t).gridBackground,t.config.canvas.getContext("2d").fillRect(0,0,t.config.canvas.width,t.config.canvas.height);for(let n=0;n<7;n++)for(let a=0;a<e;a++){const e=t.grid[n][a].intensity;if(e>0){const n=e<.2?.3:e,a=p(f(t).contributionBoxColor,n);t.config.canvas.getContext("2d").fillStyle=a}else t.config.canvas.getContext("2d").fillStyle=f(t).emptyContributionBoxColor;t.config.canvas.getContext("2d").beginPath(),t.config.canvas.getContext("2d").roundRect(22*a,22*n+15,20,20,5),t.config.canvas.getContext("2d").fill()}t.config.canvas.getContext("2d").fillStyle=f(t).textColor,t.config.canvas.getContext("2d").font="10px Arial",t.config.canvas.getContext("2d").textAlign="center";let n="";for(let a=0;a<e;a++)if(t.monthLabels[a]!==n){const e=22*a+10;t.config.canvas.getContext("2d").fillText(t.monthLabels[a],e,10),n=t.monthLabels[a]}},A=t=>{const n=22*t.pacman.y+10,e=22*t.pacman.x+10+15;t.pacman.deadRemainingDuration?t.config.canvas.getContext("2d").fillStyle=o:t.pacman.powerupRemainingDuration?t.config.canvas.getContext("2d").fillStyle="red":t.config.canvas.getContext("2d").fillStyle=a;const i=t.pacmanMouthOpen?.35*Math.PI:.1*Math.PI;let s,c;switch(t.pacman.direction){case"up":s=1.5*Math.PI+i,c=1.5*Math.PI-i;break;case"down":s=.5*Math.PI+i,c=.5*Math.PI-i;break;case"left":s=Math.PI+i,c=Math.PI-i;break;default:s=0+i,c=2*Math.PI-i}t.config.canvas.getContext("2d").beginPath(),t.config.canvas.getContext("2d").arc(n,e,10,s,c),t.config.canvas.getContext("2d").lineTo(n,e),t.config.canvas.getContext("2d").fill()},v=t=>{t.ghosts.forEach((n=>{const e=22*n.y,a=22*n.x+15,o=t.config.canvas.getContext("2d");n.scared?o.drawImage(r.scared.img,e,a,20,20):o.drawImage(r[n.name].img,e,a,20,20)}))},x=t=>{t.config.enableSounds&&t.config.canvas.addEventListener("click",(function(n){const e=t.config.canvas.getBoundingClientRect(),a=n.clientX-e.left,o=n.clientY-e.top,i=t.config.canvas.width-30-10;a>=i&&a<=i+this.width&&o>=10&&o<=10+this.height&&(d.getInstance().isMuted?d.getInstance().unmute():d.getInstance().mute())}))},b=t=>{const n=10,e=t,a=2*Math.PI-t;return`M 10,10\n L ${n+n*Math.cos(e)},${n+n*Math.sin(e)}\n A 10,10 0 1,1 ${n+n*Math.cos(a)},${n+n*Math.sin(a)}\n Z`},C=t=>t.gameHistory.map(((n,e)=>e/(t.gameHistory.length-1))).join(";"),w=(t,n,e)=>t.gameHistory.map((a=>{const o=a.grid[n][e];return o>0?M(t,o):f(t).emptyContributionBoxColor})).join(";"),M=(t,n)=>{const e=n<.2?.3:n;return p(f(t).contributionBoxColor,e)},D=t=>{let n='<svg width="1144" height="174" xmlns="http://www.w3.org/2000/svg">';n+=`<rect width="100%" height="100%" fill="${f(t).gridBackground}"/>`,n+=`<defs>\n\t\t<symbol id="blinky" viewBox="0 0 100 100">\n <image href="${r.blinky.imgDate}" width="100" height="100"/>\n\t\t</symbol>\n\t\t<symbol id="clyde" viewBox="0 0 100 100">\n <image href="${r.clyde.imgDate}" width="100" height="100"/>\n\t\t</symbol>\n\t\t<symbol id="inky" viewBox="0 0 100 100">\n <image href="${r.inky.imgDate}" width="100" height="100"/>\n\t\t</symbol>\n\t\t<symbol id="pinky" viewBox="0 0 100 100">\n <image href="${r.pinky.imgDate}" width="100" height="100"/>\n\t\t</symbol>\n\t\t<symbol id="scared" viewBox="0 0 100 100">\n <image href="${r.scared.imgDate}" width="100" height="100"/>\n\t\t</symbol>\n\t</defs>`;let i="";for(let a=0;a<e;a++)t.monthLabels[a]!==i&&(n+=`<text x="${22*a+10}" y="10" text-anchor="middle" font-size="10" fill="${f(t).textColor}">${t.monthLabels[a]}</text>`,i=t.monthLabels[a]);for(let a=0;a<7;a++)for(let o=0;o<e;o++){const e=22*o,i=22*a+15,s=t.gameHistory[0].grid[a][o],c=s>0?M(t,s):f(t).emptyContributionBoxColor;n+=`<rect id="cell-${a}-${o}" x="${e}" y="${i}" width="20" height="20" rx="5" fill="${c}">\n <animate attributeName="fill" dur="${300*t.gameHistory.length}ms" repeatCount="indefinite" \n values="${w(t,a,o)}" \n keyTimes="${C(t)}"/>\n </rect>`}return n+=`<path id="pacman" d="${b(.35)}"\n transform="translate(${22*t.pacman.y}, ${22*t.pacman.x+15})">\n\t\t<animate attributeName="fill" dur="${300*t.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${C(t)}"\n values="${(t=>t.gameHistory.map((t=>t.pacman.deadRemainingDuration?o:t.pacman.powerupRemainingDuration?"red":a)).join(";"))(t)}"/>\n <animateTransform attributeName="transform" type="translate" dur="${300*t.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${C(t)}"\n values="${(t=>t.gameHistory.map((t=>`${22*t.pacman.y},${22*t.pacman.x+15}`)).join(";"))(t)}"/>\n <animate attributeName="d" dur="0.2s" repeatCount="indefinite"\n values="${b(.25)};${b(.05)};${b(.25)}"/>\n </path>`,t.ghosts.forEach(((e,a)=>{n+=`<use id="ghost${a}" width="20" height="20" href="#ghost-${e.name}">\n <animateTransform attributeName="transform" type="translate" dur="${300*t.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${C(t)}"\n values="${((t,n)=>t.gameHistory.map((t=>{const e=t.ghosts[n];return`${22*e.y},${22*e.x+15}`})).join(";"))(t,a)}"/>\n <animate attributeName="href" dur="${300*t.gameHistory.length}ms" repeatCount="indefinite"\n keyTimes="${C(t)}"\n values="${((t,n)=>t.gameHistory.map((t=>{const e=t.ghosts[n];return e.scared?"#scared":"#"+e.name})).join(";"))(t,a)}"/>\n </use>`})),n+="</svg>",n};var S=function(t,n,e,a){return new(e||(e=Promise))((function(o,i){function s(t){try{r(a.next(t))}catch(t){i(t)}}function c(t){try{r(a.throw(t))}catch(t){i(t)}}function r(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,c)}r((a=a.apply(t,n||[])).next())}))};const I=t=>S(void 0,void 0,void 0,(function*(){if(t.frameCount++,t.frameCount%t.config.gameSpeed==0)if(t.pacman.deadRemainingDuration&&(t.pacman.deadRemainingDuration--,t.pacman.deadRemainingDuration||"canvas"==t.config.outputFormat&&d.getInstance().play(g.GAME_OVER).then((()=>d.getInstance().startDefaultSound()))),t.pacman.powerupRemainingDuration&&(t.pacman.powerupRemainingDuration--,t.pacman.powerupRemainingDuration||(t.ghosts.forEach((t=>t.scared=!1)),t.pacman.points=0)),t.grid.some((t=>t.some((t=>t.intensity>0)))))k(t),B(t),O(t),t.pacmanMouthOpen=!t.pacmanMouthOpen,t.gameHistory.push({pacman:Object.assign({},t.pacman),ghosts:t.ghosts.map((t=>Object.assign({},t))),grid:t.grid.map((t=>[...t.map((t=>t.intensity))]))}),"canvas"==t.config.outputFormat&&y(t),"canvas"==t.config.outputFormat&&A(t),"canvas"==t.config.outputFormat&&v(t),"canvas"==t.config.outputFormat&&(t=>{if(!t.config.enableSounds)return;const n=t.config.canvas.width-30-10;t.config.canvas.getContext("2d").fillStyle=`rgba(0, 0, 0, ${d.getInstance().isMuted?.3:.5})`,t.config.canvas.getContext("2d").beginPath(),t.config.canvas.getContext("2d").moveTo(n+10,20),t.config.canvas.getContext("2d").lineTo(n+20,15),t.config.canvas.getContext("2d").lineTo(n+20,35),t.config.canvas.getContext("2d").lineTo(n+10,30),t.config.canvas.getContext("2d").closePath(),t.config.canvas.getContext("2d").fill(),d.getInstance().isMuted?(t.config.canvas.getContext("2d").strokeStyle="rgba(255, 0, 0, 0.6)",t.config.canvas.getContext("2d").lineWidth=3,t.config.canvas.getContext("2d").beginPath(),t.config.canvas.getContext("2d").moveTo(n+25,15),t.config.canvas.getContext("2d").lineTo(n+5,35),t.config.canvas.getContext("2d").stroke()):(t.config.canvas.getContext("2d").strokeStyle="rgba(0, 0, 0, 0.4)",t.config.canvas.getContext("2d").lineWidth=2,t.config.canvas.getContext("2d").beginPath(),t.config.canvas.getContext("2d").arc(n+25,25,5,0,2*Math.PI),t.config.canvas.getContext("2d").stroke(),t.config.canvas.getContext("2d").beginPath(),t.config.canvas.getContext("2d").arc(n+25,25,8,0,2*Math.PI),t.config.canvas.getContext("2d").stroke())})(t);else{if("canvas"==t.config.outputFormat&&(clearInterval(t.gameInterval),"canvas"==t.config.outputFormat&&((t=>{t.config.canvas.getContext("2d").fillStyle=f(t).textColor,t.config.canvas.getContext("2d").font="20px Arial",t.config.canvas.getContext("2d").textAlign="center",t.config.canvas.getContext("2d").fillText("Game Over",t.config.canvas.width/2,t.config.canvas.height/2)})(t),d.getInstance().play(g.BEGINNING).then((()=>d.getInstance().stopDefaultSound())))),"svg"==t.config.outputFormat){const n=D(t),e=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),a=URL.createObjectURL(e);t.config.svgCallback(a)}t.config.gameOverCallback()}else t.gameHistory.push({pacman:Object.assign({},t.pacman),ghosts:t.ghosts.map((t=>Object.assign({},t))),grid:t.grid.map((t=>[...t.map((t=>t.intensity))]))})})),k=t=>{if(t.pacman.deadRemainingDuration)return;let n=[];if(t.pacman.powerupRemainingDuration)n=t.ghosts.map((t=>({x:t.x,y:t.y,distance:1/0})));else for(let a=0;a<7;a++)for(let o=0;o<e;o++)t.grid[a][o].intensity>0&&n.push({x:a,y:o,distance:1/0});if(0===n.length)return;const a=n.reduce(((n,e)=>{const a=Math.abs(e.x-t.pacman.x)+Math.abs(e.y-t.pacman.y);return a<n.distance?Object.assign(Object.assign({},e),{distance:a}):n}),{x:t.pacman.x,y:t.pacman.y,distance:1/0}),o=a.x-t.pacman.x,i=a.y-t.pacman.y;Math.abs(o)>Math.abs(i)?(t.pacman.x+=Math.sign(o),t.pacman.direction=o>0?"down":"up"):(t.pacman.y+=Math.sign(i),t.pacman.direction=i>0?"right":"left"),t.grid[t.pacman.x][t.pacman.y].intensity>0&&(t.pacman.totalPoints+=t.grid[t.pacman.x][t.pacman.y].commitsCount,t.pacman.points++,t.config.pointsIncreasedCallback(t.pacman.totalPoints),t.grid[t.pacman.x][t.pacman.y].intensity=0,t.pacman.points>=30&&R(t))},B=t=>{t.ghosts.forEach(((n,a)=>{if(n.scared){n.target||(n.target=$(n.x,n.y));const t=n.target.x-n.x,a=n.target.y-n.y,o=Math.abs(t)>Math.abs(a)?Math.sign(t):0,i=Math.abs(a)>=Math.abs(t)?Math.sign(a):0,s=n.x+o,c=n.y+i;s>=0&&s<7&&c>=0&&c<e&&(n.x=s,n.y=c),n.x===n.target.x&&n.y===n.target.y&&(n.target=$(n.x,n.y))}else{const a=[[-1,0],[1,0],[0,-1],[0,1]],[o,i]=a[Math.floor(Math.random()*a.length)];if(t.pacman.powerupRemainingDuration&&Math.random()<.5)return;const s=n.x+o,c=n.y+i;s>=0&&s<7&&c>=0&&c<e&&(n.x=s,n.y=c)}}))},$=(t,n)=>{const e=t+Math.floor(21*Math.random())-10,a=n+Math.floor(21*Math.random())-10;return{x:Math.max(0,Math.min(e,6)),y:Math.max(0,Math.min(a,51))}},O=t=>{t.pacman.deadRemainingDuration||t.ghosts.forEach(((n,e)=>{n.x===t.pacman.x&&n.y===t.pacman.y&&(t.pacman.powerupRemainingDuration&&n.scared?(E(t,e),t.pacman.points+=10,"canvas"==t.config.outputFormat&&d.getInstance().play(g.EAT_GHOST)):(t.pacman.points=0,t.pacman.powerupRemainingDuration=0,t.pacman.deadRemainingDuration=10,"canvas"==t.config.outputFormat&&d.getInstance().play(g.GAME_OVER).then((()=>d.getInstance().stopDefaultSound()))))}))},E=(t,n)=>{let a,o;do{a=Math.floor(7*Math.random()),o=Math.floor(Math.random()*e)}while(Math.abs(a-t.pacman.x)<=2&&Math.abs(o-t.pacman.y)<=2||0===t.grid[a][o].intensity);t.ghosts[n]={x:a,y:o,name:i[n%i.length],scared:!1,target:void 0}},R=t=>{t.pacman.powerupRemainingDuration=15,t.ghosts.forEach((t=>t.scared=!0))},T={frameCount:0,contributions:[],pacman:{x:0,y:0,direction:"right",points:0,totalPoints:0,deadRemainingDuration:0,powerupRemainingDuration:0},ghosts:[],grid:[],monthLabels:[],pacmanMouthOpen:!0,gameInterval:0,scaredGhostsDestinations:[],gameHistory:[],config:void 0};class P{constructor(t){this.store=Object.assign({},T),this.conf=Object.assign({},t)}start(){return t=this,n=void 0,o=function*(){switch(this.store.config=Object.assign(Object.assign({},{platform:"github",username:"",canvas:void 0,outputFormat:"svg",svgCallback:t=>{},gameOverCallback:()=>()=>{},gameTheme:"github",gameSpeed:1,enableSounds:!0,pointsIncreasedCallback:t=>{}}),this.conf),this.conf.platform){case"gitlab":this.store.contributions=yield l(this.conf.username);break;case"github":this.store.contributions=yield h(this.conf.username)}var t;t=this.store,S(void 0,void 0,void 0,(function*(){if("canvas"==t.config.outputFormat&&(t.config.canvas=t.config.canvas,(t=>{t.config.canvas.width=1144,t.config.canvas.height=174})(t),x(t)),t.frameCount=0,t.ghosts.forEach((t=>t.scared=!1)),(t=>{t.pacman.points=0,t.pacman.totalPoints=0,t.grid=Array.from({length:7},(()=>Array.from({length:e},(()=>({commitsCount:0,intensity:0}))))),t.monthLabels=Array(e).fill("");let n=1;const a=new Date,o=new Date(a);o.setDate(a.getDate()-a.getDay()),t.contributions.forEach((a=>{const i=new Date(a.date),s=i.getDay(),c=Math.floor((+o-+i)/6048e5);c>=0&&c<e&&s>=0&&s<7&&(t.grid[s][51-c]={commitsCount:a.count,intensity:0},a.count>n&&(n=a.count))}));for(let a=0;a<7;a++)for(let o=0;o<e;o++)t.grid[a][o].commitsCount>0&&(t.grid[a][o].intensity=t.grid[a][o].commitsCount/n);for(let n=0;n<e;n++){const e=51-n,a=new Date(o);a.setDate(a.getDate()-7*e),t.monthLabels[n]=s[a.getMonth()]}})(t),"canvas"==t.config.outputFormat&&y(t),"canvas"==t.config.outputFormat&&(t.config.enableSounds||d.getInstance().mute(),yield d.getInstance().preloadSounds(),d.getInstance().startDefaultSound(),yield d.getInstance().play(g.BEGINNING)),(t=>{let n=[];for(let a=0;a<7;a++)for(let o=0;o<e;o++)t.grid[a][o].intensity>0&&n.push({x:a,y:o});if(n.length>0){const e=n[Math.floor(Math.random()*n.length)];t.pacman={x:e.x,y:e.y,direction:"right",points:0,totalPoints:0,deadRemainingDuration:0,powerupRemainingDuration:0}}"canvas"==t.config.outputFormat&&A(t)})(t),(t=>{t.ghosts=[],t.scaredGhostsDestinations=[];for(let n=0;n<4;n++){let a,o;do{a=Math.floor(7*Math.random()),o=Math.floor(Math.random()*e)}while(0===t.grid[a][o].intensity);t.ghosts.push({x:a,y:o,name:i[n],scared:!1,target:void 0}),t.scaredGhostsDestinations.push({x:0,y:0})}"canvas"==t.config.outputFormat&&v(t)})(t),r.blinky.img.src=r.blinky.imgDate,r.clyde.img.src=r.clyde.imgDate,r.inky.img.src=r.inky.imgDate,r.pinky.img.src=r.pinky.imgDate,r.scared.img.src=r.scared.imgDate,"svg"==t.config.outputFormat){const n=()=>t.grid.some((t=>t.some((t=>t.intensity>0))));for(;n();)yield I(t);yield I(t)}else clearInterval(t.gameInterval),t.gameInterval=setInterval((()=>S(void 0,void 0,void 0,(function*(){return yield I(t)}))),250)}))},new((a=void 0)||(a=Promise))((function(e,i){function s(t){try{r(o.next(t))}catch(t){i(t)}}function c(t){try{r(o.throw(t))}catch(t){i(t)}}function r(t){var n;t.done?e(t.value):(n=t.value,n instanceof a?n:new a((function(t){t(n)}))).then(s,c)}r((o=o.apply(t,n||[])).next())}));var t,n,a,o}stop(){var t;t=this.store,S(void 0,void 0,void 0,(function*(){clearInterval(t.gameInterval)}))}}var U=n.C;export{U as PacmanRenderer};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>GitLab Contributions Pac-Man</title>
|
|
7
|
+
<style>
|
|
8
|
+
body {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
}
|
|
12
|
+
canvas {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<canvas id="pacmancanvas"></canvas>
|
|
20
|
+
|
|
21
|
+
<script type="module">
|
|
22
|
+
const getQueryParams = () => {
|
|
23
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
24
|
+
const params = {};
|
|
25
|
+
for (const [key, value] of urlParams.entries()) {
|
|
26
|
+
params[key] = value;
|
|
27
|
+
}
|
|
28
|
+
return params;
|
|
29
|
+
};
|
|
30
|
+
import { renderContributions } from 'https://cdn.jsdelivr.net/gh/abozanona/pacman-contribution-graph@1.0.1/dist/pacman-contribution-graph.min.js';
|
|
31
|
+
const canvas = document.getElementById('pacmancanvas');
|
|
32
|
+
const initializeGameCanvas = () =>
|
|
33
|
+
renderContributions({
|
|
34
|
+
...getQueryParams(),
|
|
35
|
+
canvas: canvas,
|
|
36
|
+
output: 'canvas'
|
|
37
|
+
});
|
|
38
|
+
initializeGameCanvas();
|
|
39
|
+
</script>
|
|
40
|
+
</body>
|
|
41
|
+
</html>
|
package/embeded/svg.html
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>GitLab Contributions Pac-Man</title>
|
|
7
|
+
<style>
|
|
8
|
+
body {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<!-- TODO: render it from server side -->
|
|
16
|
+
COMING SOON
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|