├── .babelrc ├── .eslintrc.json ├── .gitignore ├── README.md ├── assets ├── audio │ ├── bck.mp3 │ ├── dead.wav │ ├── finish.wav │ ├── hurt.wav │ ├── jump.wav │ ├── pop.wav │ ├── ring.wav │ └── spring.wav ├── data │ ├── level00.json │ ├── level01.json │ └── level02.json └── images │ ├── background.png │ ├── bat.png │ ├── block.png │ ├── bug.png │ ├── finish-static.png │ ├── finish.png │ ├── fireball.png │ ├── hero.png │ ├── invisible_wall.png │ ├── lava.png │ ├── letters.png │ ├── numbers.png │ ├── ring.png │ ├── spike1.png │ ├── spike3.png │ ├── spring.png │ ├── stone16x1.png │ ├── stone1x1.png │ ├── stone2x1.png │ ├── stone4x1.png │ └── stone8x1.png ├── config.xml ├── docs ├── assets │ ├── audio │ │ ├── bck.mp3 │ │ ├── dead.wav │ │ ├── finish.wav │ │ ├── hurt.wav │ │ ├── jump.wav │ │ ├── pop.wav │ │ ├── ring.wav │ │ └── spring.wav │ ├── data │ │ ├── level00.json │ │ ├── level01.json │ │ └── level02.json │ └── images │ │ ├── background.png │ │ ├── bat.png │ │ ├── block.png │ │ ├── bug.png │ │ ├── finish-static.png │ │ ├── finish.png │ │ ├── fireball.png │ │ ├── hero.png │ │ ├── invisible_wall.png │ │ ├── lava.png │ │ ├── letters.png │ │ ├── numbers.png │ │ ├── ring.png │ │ ├── spike1.png │ │ ├── spike3.png │ │ ├── spring.png │ │ ├── stone16x1.png │ │ ├── stone1x1.png │ │ ├── stone2x1.png │ │ ├── stone4x1.png │ │ └── stone8x1.png ├── index.html └── js │ ├── bundle.js │ └── vendor.bundle.js ├── index.html ├── package-lock.json ├── package.json ├── src ├── config.js ├── constants │ └── constants.js ├── index.html ├── main.js ├── sprites │ ├── Block.js │ ├── Enemy.js │ ├── Fireball.js │ ├── Hero.js │ └── Spike.js ├── states │ ├── LoadingState.js │ ├── PlayState.js │ └── SpriteState.js └── utils.js ├── webpack.config.js ├── webpack.cordova.config.js ├── webpack.production.config.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env"] 3 | } 4 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": "standard", 4 | "parserOptions": { 5 | "ecmaVersion": 6, 6 | "sourceType": "module" 7 | }, 8 | "env": { 9 | "browser": true 10 | }, 11 | "rules": { 12 | "import/no-unresolved": [2] 13 | }, 14 | "globals": { 15 | "phaser": true 16 | }, 17 | "settings": { 18 | "import/core-modules": ["phaser", "pixi", "p2"] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | www/ 3 | platforms/ 4 | plugins/ 5 | dist/ 6 | .vscode/ 7 | *.log 8 | /index.html 9 | build/ 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sonic the Hedgehog Javascript Game 2 | 3 | Demo: https://rzencoder.github.io/sonic-hedgehog-game/ 4 | 5 | Made a platform game to practice Javascript skills using the phaser.io framework 6 | 7 | Controls: 8 | * Left-Arrow: Move Left 9 | * Right-Arrow: Move Right 10 | * Up-Arrow: Jump 11 | -------------------------------------------------------------------------------- /assets/audio/bck.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/audio/bck.mp3 -------------------------------------------------------------------------------- /assets/audio/dead.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/audio/dead.wav -------------------------------------------------------------------------------- /assets/audio/finish.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/audio/finish.wav -------------------------------------------------------------------------------- /assets/audio/hurt.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/audio/hurt.wav -------------------------------------------------------------------------------- /assets/audio/jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/audio/jump.wav -------------------------------------------------------------------------------- /assets/audio/pop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/audio/pop.wav -------------------------------------------------------------------------------- /assets/audio/ring.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/audio/ring.wav -------------------------------------------------------------------------------- /assets/audio/spring.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/audio/spring.wav -------------------------------------------------------------------------------- /assets/data/level00.json: -------------------------------------------------------------------------------- 1 | { 2 | "platforms": [ 3 | {"image": "stone:4x1", "x": 0, "y": 558}, 4 | {"image": "stone:4x1", "x": 294, "y": 558}, 5 | {"image": "stone:4x1", "x": 294, "y": 516}, 6 | {"image": "stone:16x1", "x": 588, "y": 558}, 7 | {"image": "stone:4x1", "x": 588, "y": 350}, 8 | {"image": "stone:4x1", "x": 294, "y": 300}, 9 | {"image": "stone:4x1", "x": 0, "y": 240}, 10 | {"image": "stone:4x1", "x": 300, "y": 120}, 11 | {"image": "stone:2x1", "x": 900, "y": 120} 12 | ], 13 | "movingBlocks": [ 14 | {"image": "block", "x": 400, "y": 120} 15 | ], 16 | "lava": [ 17 | {"image": "lava", "x": 168, "y": 558}, 18 | {"image": "lava", "x": 210, "y": 558}, 19 | {"image": "lava", "x": 252, "y": 558}, 20 | {"image": "lava", "x": 462, "y": 558}, 21 | {"image": "lava", "x": 504, "y": 558}, 22 | {"image": "lava", "x": 546, "y": 558} 23 | ], 24 | "spike":[ 25 | {"image": "spike3", "x": 680, "y": 574}, 26 | {"image": "spike3", "x": 830, "y": 574}, 27 | {"image": "spike3", "x": 620, "y": 370}, 28 | {"image": "spike3", "x": 330, "y": 320}, 29 | {"image": "spike3", "x": 440, "y": 137} 30 | ], 31 | "decoration": [ 32 | 33 | ], 34 | "rings": [ 35 | {"x": 70, "y": 535}, {"x": 100, "y": 535}, {"x": 130, "y": 535}, 36 | {"x": 350, "y": 495}, {"x": 380, "y": 495}, {"x": 410, "y": 495}, 37 | {"x": 670, "y": 325}, {"x": 700, "y": 325}, {"x": 730, "y": 325}, 38 | {"x": 50, "y": 190}, {"x": 80, "y": 190}, {"x": 110, "y": 190}, 39 | {"x": 650, "y": 85}, {"x": 680, "y": 85}, {"x": 710, "y": 85} 40 | ], 41 | "hero": {"x": 30, "y": 535}, 42 | "enemies": [ 43 | {"image": "bug", "x": 700, "y": 540, "gravity": true}, 44 | {"image": "bat", "x": 800, "y": 480, "gravity": false}, 45 | {"image": "bat", "x": 700, "y": 280, "gravity": false}, 46 | {"image": "bat", "x": 240, "y": 190, "gravity": false}, 47 | {"image": "bat", "x": 800, "y": 60, "gravity": false} 48 | ], 49 | "finish": {"x": 930, "y": 120}, 50 | "spring": [ 51 | {"x": 920, "y": 542} 52 | ], 53 | "fireball": [ 54 | {"x": 231, "y": 570, "height": 350, "velocity": 220}, 55 | {"x": 525, "y": 570, "height": 280, "velocity": 200} 56 | ] 57 | } 58 | -------------------------------------------------------------------------------- /assets/data/level01.json: -------------------------------------------------------------------------------- 1 | { 2 | "spike": [ 3 | {"image": "spike", "x": 500, "y": 340}, 4 | {"image": "spike3", "x": 280, "y": 120}, 5 | {"image": "spike3", "x": 440, "y": 120} 6 | ], 7 | "platforms": [ 8 | {"image": "stone:4x1", "x": 0, "y": 558}, 9 | {"image": "stone:2x1", "x": 0, "y": 364}, 10 | {"image": "stone:8x1", "x": 200, "y": 100}, 11 | {"image": "stone:8x1", "x": 200, "y": 0}, 12 | {"image": "stone:1x1", "x": 480, "y": 322}, 13 | {"image": "stone:1x1", "x": 280, "y": 322}, 14 | {"image": "stone:2x1", "x": 878, "y": 558}, 15 | {"image": "stone:16x1", "x": 536, "y": 0}, 16 | {"image": "stone:16x1", "x": 606, "y": 154}, 17 | {"image": "stone:16x1", "x": 606, "y": 42} 18 | ], 19 | "movingBlocks": [ 20 | {"image": "block", "x": 168, "y": 530}, 21 | {"image": "block", "x": 836, "y": 530}, 22 | {"image": "block", "x": 836, "y": 322} 23 | ], 24 | "lava": [ 25 | {"image": "lava", "x": 168, "y": 558}, 26 | {"image": "lava", "x": 210, "y": 558}, 27 | {"image": "lava", "x": 252, "y": 558}, 28 | {"image": "lava", "x": 294, "y": 558}, 29 | {"image": "lava", "x": 336, "y": 558}, 30 | {"image": "lava", "x": 378, "y": 558}, 31 | {"image": "lava", "x": 420, "y": 558}, 32 | {"image": "lava", "x": 462, "y": 558}, 33 | {"image": "lava", "x": 504, "y": 558}, 34 | {"image": "lava", "x": 546, "y": 558}, 35 | {"image": "lava", "x": 588, "y": 558}, 36 | {"image": "lava", "x": 630, "y": 558}, 37 | {"image": "lava", "x": 672, "y": 558}, 38 | {"image": "lava", "x": 714, "y": 558}, 39 | {"image": "lava", "x": 756, "y": 558}, 40 | {"image": "lava", "x": 798, "y": 558}, 41 | {"image": "lava", "x": 840, "y": 558} 42 | ], 43 | "decoration": [ 44 | 45 | ], 46 | "rings": [ 47 | {"x": 80, "y": 535}, {"x": 110, "y": 535}, {"x": 140, "y": 535}, 48 | {"x": 500, "y": 510}, {"x": 530, "y": 510}, {"x": 560, "y": 510}, 49 | {"x": 375, "y": 260}, {"x": 405, "y": 260}, {"x": 435, "y": 260}, 50 | {"x": 650, "y": 120}, {"x": 680, "y": 120}, {"x": 710, "y": 120} 51 | ], 52 | "hero": {"x": 21, "y": 525}, 53 | "enemies": [ 54 | {"image": "bug", "x": 700, "y": 140, "gravity": true}, 55 | {"image": "bat", "x": 900, "y": 290, "gravity": false}, 56 | {"image": "bat", "x": 100, "y": 260, "gravity": false}, 57 | {"image": "bat", "x": 390, "y": 60, "gravity": false} 58 | ], 59 | "finish": {"x": 930, "y": 154}, 60 | "spring": [ 61 | {"x": 920, "y": 542}, 62 | {"x": 15, "y": 348} 63 | ], 64 | "fireball": [ 65 | {"x": 530, "y": 570, "height": 190, "velocity": 120} 66 | ] 67 | } -------------------------------------------------------------------------------- /assets/data/level02.json: -------------------------------------------------------------------------------- 1 | { 2 | "platforms": [ 3 | {"image": "stone:16x1", "x": 70, "y": 558}, 4 | {"image": "stone:16x1", "x": 0, "y": 432}, 5 | {"image": "stone:2x1", "x": 0, "y": 558}, 6 | {"image": "stone:2x1", "x": 912, "y": 558}, 7 | {"image": "stone:2x1", "x": 605, "y": 432}, 8 | {"image": "stone:2x1", "x": 155, "y": 516}, 9 | {"image": "stone:2x1", "x": 292, "y": 474}, 10 | {"image": "stone:2x1", "x": 426, "y": 516}, 11 | {"image": "stone:2x1", "x": 605, "y": 390}, 12 | {"image": "stone:2x1", "x": 0, "y": 390}, 13 | {"image": "stone:4x1", "x": 100, "y": 160}, 14 | {"image": "stone:1x1", "x": 380, "y": 118}, 15 | {"image": "stone:1x1", "x": 780, "y": 118}, 16 | {"image": "stone:2x1", "x": 918, "y": 118} 17 | ], 18 | "movingBlocks": [ 19 | {"image": "block", "x": 43, "y": 360}, 20 | {"image": "block", "x": 564, "y": 118} 21 | ], 22 | "lava": [ 23 | {"image": "lava", "x": 702, "y": 558}, 24 | {"image": "lava", "x": 744, "y": 558}, 25 | {"image": "lava", "x": 786, "y": 558}, 26 | {"image": "lava", "x": 828, "y": 558}, 27 | {"image": "lava", "x": 870, "y": 558}, 28 | {"image": "lava", "x": 42, "y": 390}, 29 | {"image": "lava", "x": 84, "y": 390}, 30 | {"image": "lava", "x": 126, "y": 390}, 31 | {"image": "lava", "x": 168, "y": 390}, 32 | {"image": "lava", "x": 210, "y": 390}, 33 | {"image": "lava", "x": 252, "y": 390}, 34 | {"image": "lava", "x": 294, "y": 390}, 35 | {"image": "lava", "x": 336, "y": 390}, 36 | {"image": "lava", "x": 378, "y": 390}, 37 | {"image": "lava", "x": 420, "y": 390}, 38 | {"image": "lava", "x": 462, "y": 390}, 39 | {"image": "lava", "x": 504, "y": 390}, 40 | {"image": "lava", "x": 546, "y": 390}, 41 | {"image": "lava", "x": 588, "y": 390} 42 | ], 43 | "spike": [ 44 | {"image": "spike3", "x": 265, "y": 575}, 45 | {"image": "spike3", "x": 400, "y": 575}, 46 | {"image": "spike", "x": 400, "y": 133}, 47 | {"image": "spike", "x": 800, "y": 133} 48 | ], 49 | "decoration": [ 50 | 51 | ], 52 | "rings": [ 53 | {"x": 167, "y": 500}, {"x": 197, "y": 500}, {"x": 227, "y": 500}, 54 | {"x": 437, "y": 500}, {"x": 467, "y": 500}, {"x": 497, "y": 500}, 55 | {"x": 120, "y": 140}, {"x": 150, "y": 140}, {"x": 180, "y": 140}, 56 | {"x": 615, "y": 375}, {"x": 645, "y": 375}, {"x": 675, "y": 375} 57 | ], 58 | "hero": {"x": 21, "y": 525}, 59 | "enemies": [ 60 | {"image": "bug", "x": 700, "y": 540, "gravity": true}, 61 | {"image": "bug", "x": 110, "y": 140, "gravity": true}, 62 | {"image": "bat", "x": 800, "y": 50, "gravity": false}, 63 | {"image": "bat", "x": 60, "y": 300, "gravity": false}, 64 | {"image": "bat", "x": 900, "y": 500, "gravity": false} 65 | ], 66 | "finish": {"x": 940, "y": 120}, 67 | "spring": [ 68 | {"x": 920, "y": 542}, 69 | {"x": 15, "y": 374} 70 | ], 71 | "fireball": [ 72 | {"x": 780, "y": 558, "height": 200, "velocity": 150}, 73 | {"x": 850, "y": 558, "height": 250, "velocity": 220}, 74 | {"x": 310, "y": 380, "height": 300, "velocity": 220}, 75 | {"x": 500, "y": 380, "height": 300, "velocity": 220} 76 | ] 77 | } -------------------------------------------------------------------------------- /assets/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/background.png -------------------------------------------------------------------------------- /assets/images/bat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/bat.png -------------------------------------------------------------------------------- /assets/images/block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/block.png -------------------------------------------------------------------------------- /assets/images/bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/bug.png -------------------------------------------------------------------------------- /assets/images/finish-static.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/finish-static.png -------------------------------------------------------------------------------- /assets/images/finish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/finish.png -------------------------------------------------------------------------------- /assets/images/fireball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/fireball.png -------------------------------------------------------------------------------- /assets/images/hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/hero.png -------------------------------------------------------------------------------- /assets/images/invisible_wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/invisible_wall.png -------------------------------------------------------------------------------- /assets/images/lava.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/lava.png -------------------------------------------------------------------------------- /assets/images/letters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/letters.png -------------------------------------------------------------------------------- /assets/images/numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/numbers.png -------------------------------------------------------------------------------- /assets/images/ring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/ring.png -------------------------------------------------------------------------------- /assets/images/spike1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/spike1.png -------------------------------------------------------------------------------- /assets/images/spike3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/spike3.png -------------------------------------------------------------------------------- /assets/images/spring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/spring.png -------------------------------------------------------------------------------- /assets/images/stone16x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/stone16x1.png -------------------------------------------------------------------------------- /assets/images/stone1x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/stone1x1.png -------------------------------------------------------------------------------- /assets/images/stone2x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/stone2x1.png -------------------------------------------------------------------------------- /assets/images/stone4x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/stone4x1.png -------------------------------------------------------------------------------- /assets/images/stone8x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/assets/images/stone8x1.png -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | PhaserES6Webpack 4 | 5 | 6 | 7 | leandro cabrera 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/assets/audio/bck.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/audio/bck.mp3 -------------------------------------------------------------------------------- /docs/assets/audio/dead.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/audio/dead.wav -------------------------------------------------------------------------------- /docs/assets/audio/finish.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/audio/finish.wav -------------------------------------------------------------------------------- /docs/assets/audio/hurt.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/audio/hurt.wav -------------------------------------------------------------------------------- /docs/assets/audio/jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/audio/jump.wav -------------------------------------------------------------------------------- /docs/assets/audio/pop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/audio/pop.wav -------------------------------------------------------------------------------- /docs/assets/audio/ring.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/audio/ring.wav -------------------------------------------------------------------------------- /docs/assets/audio/spring.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/audio/spring.wav -------------------------------------------------------------------------------- /docs/assets/data/level00.json: -------------------------------------------------------------------------------- 1 | { 2 | "platforms": [ 3 | {"image": "stone:4x1", "x": 0, "y": 558}, 4 | {"image": "stone:4x1", "x": 294, "y": 558}, 5 | {"image": "stone:4x1", "x": 294, "y": 516}, 6 | {"image": "stone:16x1", "x": 588, "y": 558}, 7 | {"image": "stone:4x1", "x": 588, "y": 350}, 8 | {"image": "stone:4x1", "x": 294, "y": 300}, 9 | {"image": "stone:4x1", "x": 0, "y": 240}, 10 | {"image": "stone:4x1", "x": 300, "y": 120}, 11 | {"image": "stone:2x1", "x": 900, "y": 120} 12 | ], 13 | "movingBlocks": [ 14 | {"image": "block", "x": 400, "y": 120} 15 | ], 16 | "lava": [ 17 | {"image": "lava", "x": 168, "y": 558}, 18 | {"image": "lava", "x": 210, "y": 558}, 19 | {"image": "lava", "x": 252, "y": 558}, 20 | {"image": "lava", "x": 462, "y": 558}, 21 | {"image": "lava", "x": 504, "y": 558}, 22 | {"image": "lava", "x": 546, "y": 558} 23 | ], 24 | "spike":[ 25 | {"image": "spike3", "x": 680, "y": 574}, 26 | {"image": "spike3", "x": 830, "y": 574}, 27 | {"image": "spike3", "x": 620, "y": 370}, 28 | {"image": "spike3", "x": 330, "y": 320}, 29 | {"image": "spike3", "x": 440, "y": 137} 30 | ], 31 | "decoration": [ 32 | 33 | ], 34 | "rings": [ 35 | {"x": 70, "y": 535}, {"x": 100, "y": 535}, {"x": 130, "y": 535}, 36 | {"x": 350, "y": 495}, {"x": 380, "y": 495}, {"x": 410, "y": 495}, 37 | {"x": 670, "y": 325}, {"x": 700, "y": 325}, {"x": 730, "y": 325}, 38 | {"x": 50, "y": 190}, {"x": 80, "y": 190}, {"x": 110, "y": 190}, 39 | {"x": 650, "y": 85}, {"x": 680, "y": 85}, {"x": 710, "y": 85} 40 | ], 41 | "hero": {"x": 30, "y": 535}, 42 | "enemies": [ 43 | {"image": "bug", "x": 700, "y": 540, "gravity": true}, 44 | {"image": "bat", "x": 800, "y": 480, "gravity": false}, 45 | {"image": "bat", "x": 700, "y": 280, "gravity": false}, 46 | {"image": "bat", "x": 240, "y": 190, "gravity": false}, 47 | {"image": "bat", "x": 800, "y": 60, "gravity": false} 48 | ], 49 | "finish": {"x": 930, "y": 120}, 50 | "spring": [ 51 | {"x": 920, "y": 542} 52 | ], 53 | "fireball": [ 54 | {"x": 231, "y": 570, "height": 350, "velocity": 220}, 55 | {"x": 525, "y": 570, "height": 280, "velocity": 200} 56 | ] 57 | } 58 | -------------------------------------------------------------------------------- /docs/assets/data/level01.json: -------------------------------------------------------------------------------- 1 | { 2 | "spike": [ 3 | {"image": "spike", "x": 500, "y": 340}, 4 | {"image": "spike3", "x": 280, "y": 120}, 5 | {"image": "spike3", "x": 440, "y": 120} 6 | ], 7 | "platforms": [ 8 | {"image": "stone:4x1", "x": 0, "y": 558}, 9 | {"image": "stone:2x1", "x": 0, "y": 364}, 10 | {"image": "stone:8x1", "x": 200, "y": 100}, 11 | {"image": "stone:8x1", "x": 200, "y": 0}, 12 | {"image": "stone:1x1", "x": 480, "y": 322}, 13 | {"image": "stone:1x1", "x": 280, "y": 322}, 14 | {"image": "stone:2x1", "x": 878, "y": 558}, 15 | {"image": "stone:16x1", "x": 536, "y": 0}, 16 | {"image": "stone:16x1", "x": 606, "y": 154}, 17 | {"image": "stone:16x1", "x": 606, "y": 42} 18 | ], 19 | "movingBlocks": [ 20 | {"image": "block", "x": 168, "y": 530}, 21 | {"image": "block", "x": 836, "y": 530}, 22 | {"image": "block", "x": 836, "y": 322} 23 | ], 24 | "lava": [ 25 | {"image": "lava", "x": 168, "y": 558}, 26 | {"image": "lava", "x": 210, "y": 558}, 27 | {"image": "lava", "x": 252, "y": 558}, 28 | {"image": "lava", "x": 294, "y": 558}, 29 | {"image": "lava", "x": 336, "y": 558}, 30 | {"image": "lava", "x": 378, "y": 558}, 31 | {"image": "lava", "x": 420, "y": 558}, 32 | {"image": "lava", "x": 462, "y": 558}, 33 | {"image": "lava", "x": 504, "y": 558}, 34 | {"image": "lava", "x": 546, "y": 558}, 35 | {"image": "lava", "x": 588, "y": 558}, 36 | {"image": "lava", "x": 630, "y": 558}, 37 | {"image": "lava", "x": 672, "y": 558}, 38 | {"image": "lava", "x": 714, "y": 558}, 39 | {"image": "lava", "x": 756, "y": 558}, 40 | {"image": "lava", "x": 798, "y": 558}, 41 | {"image": "lava", "x": 840, "y": 558} 42 | ], 43 | "decoration": [ 44 | 45 | ], 46 | "rings": [ 47 | {"x": 80, "y": 535}, {"x": 110, "y": 535}, {"x": 140, "y": 535}, 48 | {"x": 500, "y": 510}, {"x": 530, "y": 510}, {"x": 560, "y": 510}, 49 | {"x": 375, "y": 260}, {"x": 405, "y": 260}, {"x": 435, "y": 260}, 50 | {"x": 650, "y": 120}, {"x": 680, "y": 120}, {"x": 710, "y": 120} 51 | ], 52 | "hero": {"x": 21, "y": 525}, 53 | "enemies": [ 54 | {"image": "bug", "x": 700, "y": 140, "gravity": true}, 55 | {"image": "bat", "x": 900, "y": 290, "gravity": false}, 56 | {"image": "bat", "x": 100, "y": 260, "gravity": false}, 57 | {"image": "bat", "x": 390, "y": 60, "gravity": false} 58 | ], 59 | "finish": {"x": 930, "y": 154}, 60 | "spring": [ 61 | {"x": 920, "y": 542}, 62 | {"x": 15, "y": 348} 63 | ], 64 | "fireball": [ 65 | {"x": 530, "y": 570, "height": 190, "velocity": 120} 66 | ] 67 | } -------------------------------------------------------------------------------- /docs/assets/data/level02.json: -------------------------------------------------------------------------------- 1 | { 2 | "platforms": [ 3 | {"image": "stone:16x1", "x": 70, "y": 558}, 4 | {"image": "stone:16x1", "x": 0, "y": 432}, 5 | {"image": "stone:2x1", "x": 0, "y": 558}, 6 | {"image": "stone:2x1", "x": 912, "y": 558}, 7 | {"image": "stone:2x1", "x": 605, "y": 432}, 8 | {"image": "stone:2x1", "x": 155, "y": 516}, 9 | {"image": "stone:2x1", "x": 292, "y": 474}, 10 | {"image": "stone:2x1", "x": 426, "y": 516}, 11 | {"image": "stone:2x1", "x": 605, "y": 390}, 12 | {"image": "stone:2x1", "x": 0, "y": 390}, 13 | {"image": "stone:4x1", "x": 100, "y": 160}, 14 | {"image": "stone:1x1", "x": 380, "y": 118}, 15 | {"image": "stone:1x1", "x": 780, "y": 118}, 16 | {"image": "stone:2x1", "x": 918, "y": 118} 17 | ], 18 | "movingBlocks": [ 19 | {"image": "block", "x": 43, "y": 360}, 20 | {"image": "block", "x": 564, "y": 118} 21 | ], 22 | "lava": [ 23 | {"image": "lava", "x": 702, "y": 558}, 24 | {"image": "lava", "x": 744, "y": 558}, 25 | {"image": "lava", "x": 786, "y": 558}, 26 | {"image": "lava", "x": 828, "y": 558}, 27 | {"image": "lava", "x": 870, "y": 558}, 28 | {"image": "lava", "x": 42, "y": 390}, 29 | {"image": "lava", "x": 84, "y": 390}, 30 | {"image": "lava", "x": 126, "y": 390}, 31 | {"image": "lava", "x": 168, "y": 390}, 32 | {"image": "lava", "x": 210, "y": 390}, 33 | {"image": "lava", "x": 252, "y": 390}, 34 | {"image": "lava", "x": 294, "y": 390}, 35 | {"image": "lava", "x": 336, "y": 390}, 36 | {"image": "lava", "x": 378, "y": 390}, 37 | {"image": "lava", "x": 420, "y": 390}, 38 | {"image": "lava", "x": 462, "y": 390}, 39 | {"image": "lava", "x": 504, "y": 390}, 40 | {"image": "lava", "x": 546, "y": 390}, 41 | {"image": "lava", "x": 588, "y": 390} 42 | ], 43 | "spike": [ 44 | {"image": "spike3", "x": 265, "y": 575}, 45 | {"image": "spike3", "x": 400, "y": 575}, 46 | {"image": "spike", "x": 400, "y": 133}, 47 | {"image": "spike", "x": 800, "y": 133} 48 | ], 49 | "decoration": [ 50 | 51 | ], 52 | "rings": [ 53 | {"x": 167, "y": 500}, {"x": 197, "y": 500}, {"x": 227, "y": 500}, 54 | {"x": 437, "y": 500}, {"x": 467, "y": 500}, {"x": 497, "y": 500}, 55 | {"x": 120, "y": 140}, {"x": 150, "y": 140}, {"x": 180, "y": 140}, 56 | {"x": 615, "y": 375}, {"x": 645, "y": 375}, {"x": 675, "y": 375} 57 | ], 58 | "hero": {"x": 21, "y": 525}, 59 | "enemies": [ 60 | {"image": "bug", "x": 700, "y": 540, "gravity": true}, 61 | {"image": "bug", "x": 110, "y": 140, "gravity": true}, 62 | {"image": "bat", "x": 800, "y": 50, "gravity": false}, 63 | {"image": "bat", "x": 60, "y": 300, "gravity": false}, 64 | {"image": "bat", "x": 900, "y": 500, "gravity": false} 65 | ], 66 | "finish": {"x": 940, "y": 120}, 67 | "spring": [ 68 | {"x": 920, "y": 542}, 69 | {"x": 15, "y": 374} 70 | ], 71 | "fireball": [ 72 | {"x": 780, "y": 558, "height": 200, "velocity": 150}, 73 | {"x": 850, "y": 558, "height": 250, "velocity": 220}, 74 | {"x": 310, "y": 380, "height": 300, "velocity": 220}, 75 | {"x": 500, "y": 380, "height": 300, "velocity": 220} 76 | ] 77 | } -------------------------------------------------------------------------------- /docs/assets/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/background.png -------------------------------------------------------------------------------- /docs/assets/images/bat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/bat.png -------------------------------------------------------------------------------- /docs/assets/images/block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/block.png -------------------------------------------------------------------------------- /docs/assets/images/bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/bug.png -------------------------------------------------------------------------------- /docs/assets/images/finish-static.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/finish-static.png -------------------------------------------------------------------------------- /docs/assets/images/finish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/finish.png -------------------------------------------------------------------------------- /docs/assets/images/fireball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/fireball.png -------------------------------------------------------------------------------- /docs/assets/images/hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/hero.png -------------------------------------------------------------------------------- /docs/assets/images/invisible_wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/invisible_wall.png -------------------------------------------------------------------------------- /docs/assets/images/lava.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/lava.png -------------------------------------------------------------------------------- /docs/assets/images/letters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/letters.png -------------------------------------------------------------------------------- /docs/assets/images/numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/numbers.png -------------------------------------------------------------------------------- /docs/assets/images/ring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/ring.png -------------------------------------------------------------------------------- /docs/assets/images/spike1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/spike1.png -------------------------------------------------------------------------------- /docs/assets/images/spike3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/spike3.png -------------------------------------------------------------------------------- /docs/assets/images/spring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/spring.png -------------------------------------------------------------------------------- /docs/assets/images/stone16x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/stone16x1.png -------------------------------------------------------------------------------- /docs/assets/images/stone1x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/stone1x1.png -------------------------------------------------------------------------------- /docs/assets/images/stone2x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/stone2x1.png -------------------------------------------------------------------------------- /docs/assets/images/stone4x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/stone4x1.png -------------------------------------------------------------------------------- /docs/assets/images/stone8x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzencoder/sonic-hedgehog-game/499fdf307d37736a853a9eafa980695d789cc318/docs/assets/images/stone8x1.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | Sonic the Hedgehog
-------------------------------------------------------------------------------- /docs/js/bundle.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([0],[function(t,n,e){var r=e(2),i=e(21),o=e(12),u=e(13),a=e(18),s=function(t,n,e){var c,f,l,h,p=t&s.F,v=t&s.G,d=t&s.S,y=t&s.P,g=t&s.B,m=v?r:d?r[n]||(r[n]={}):(r[n]||{}).prototype,b=v?i:i[n]||(i[n]={}),w=b.prototype||(b.prototype={});v&&(e=n);for(c in e)f=!p&&m&&void 0!==m[c],l=(f?m:e)[c],h=g&&f?a(l,r):y&&"function"==typeof l?a(Function.call,l):l,m&&u(m,c,l,t&s.U),b[c]!=l&&o(b,c,h),y&&w[c]!=l&&(w[c]=l)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,n,e){var r=e(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(51)("wks"),i=e(33),o=e(2).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,n,e){t.exports=!e(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(1),i=e(92),o=e(22),u=Object.defineProperty;n.f=e(6)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(24),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n,e){var r=e(23);t.exports=function(t){return Object(r(t))}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(7),i=e(32);t.exports=e(6)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(2),i=e(12),o=e(11),u=e(33)("src"),a=Function.toString,s=(""+a).split("toString");e(21).inspectSource=function(t){return a.call(t)},(t.exports=function(t,n,e,a){var c="function"==typeof e;c&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(c&&(o(e,u)||i(e,u,t[n]?""+t[n]:s.join(String(n)))),t===r?t[n]=e:a?t[n]?t[n]=e:i(t,n,e):(delete t[n],i(t,n,e)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[u]||a.call(this)})},function(t,n,e){var r=e(0),i=e(3),o=e(23),u=/"/g,a=function(t,n,e,r){var i=String(o(t)),a="<"+n;return""!==e&&(a+=" "+e+'="'+String(r).replace(u,""")+'"'),a+">"+i+""};t.exports=function(t,n){var e={};e[t]=n(a),r(r.P+r.F*i(function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3}),"String",e)}},function(t,n,e){var r=e(48),i=e(23);t.exports=function(t){return r(i(t))}},function(t,n,e){var r=e(49),i=e(32),o=e(15),u=e(22),a=e(11),s=e(92),c=Object.getOwnPropertyDescriptor;n.f=e(6)?c:function(t,n){if(t=o(t),n=u(n,!0),s)try{return c(t,n)}catch(t){}if(a(t,n))return i(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(11),i=e(9),o=e(67)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){var r=e(10);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){"use strict";var r=e(3);t.exports=function(t,n){return!!t&&r(function(){n?t.call(null,function(){},1):t.call(null)})}},function(t,n){var e=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(4);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){var r=e(0),i=e(21),o=e(3);t.exports=function(t,n){var e=(i.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*o(function(){e(1)}),"Object",u)}},function(t,n,e){var r=e(18),i=e(48),o=e(9),u=e(8),a=e(84);t.exports=function(t,n){var e=1==t,s=2==t,c=3==t,f=4==t,l=6==t,h=5==t||l,p=n||a;return function(n,a,v){for(var d,y,g=o(n),m=i(g),b=r(a,v,3),w=u(m.length),x=0,_=e?p(n,w):s?p(n,0):void 0;w>x;x++)if((h||x in m)&&(d=m[x],y=b(d,x,g),t))if(e)_[x]=y;else if(y)switch(t){case 3:return!0;case 5:return d;case 6:return x;case 2:_.push(d)}else if(f)return!1;return l?-1:c||f?f:_}}},function(t,n,e){"use strict";if(e(6)){var r=e(34),i=e(2),o=e(3),u=e(0),a=e(61),s=e(90),c=e(18),f=e(40),l=e(32),h=e(12),p=e(42),v=e(24),d=e(8),y=e(118),g=e(36),m=e(22),b=e(11),w=e(50),x=e(4),_=e(9),S=e(81),O=e(37),E=e(17),k=e(38).f,P=e(83),M=e(33),j=e(5),F=e(26),T=e(52),N=e(59),A=e(86),I=e(45),R=e(56),L=e(39),C=e(85),D=e(108),W=e(7),G=e(16),B=W.f,V=G.f,U=i.RangeError,z=i.TypeError,H=i.Uint8Array,K=Array.prototype,J=s.ArrayBuffer,Y=s.DataView,q=F(0),X=F(2),$=F(3),Z=F(4),Q=F(5),tt=F(6),nt=T(!0),et=T(!1),rt=A.values,it=A.keys,ot=A.entries,ut=K.lastIndexOf,at=K.reduce,st=K.reduceRight,ct=K.join,ft=K.sort,lt=K.slice,ht=K.toString,pt=K.toLocaleString,vt=j("iterator"),dt=j("toStringTag"),yt=M("typed_constructor"),gt=M("def_constructor"),mt=a.CONSTR,bt=a.TYPED,wt=a.VIEW,xt=F(1,function(t,n){return kt(N(t,t[gt]),n)}),_t=o(function(){return 1===new H(new Uint16Array([1]).buffer)[0]}),St=!!H&&!!H.prototype.set&&o(function(){new H(1).set({})}),Ot=function(t,n){var e=v(t);if(e<0||e%n)throw U("Wrong offset!");return e},Et=function(t){if(x(t)&&bt in t)return t;throw z(t+" is not a typed array!")},kt=function(t,n){if(!(x(t)&&yt in t))throw z("It is not a typed array constructor!");return new t(n)},Pt=function(t,n){return Mt(N(t,t[gt]),n)},Mt=function(t,n){for(var e=0,r=n.length,i=kt(t,r);r>e;)i[e]=n[e++];return i},jt=function(t,n,e){B(t,n,{get:function(){return this._d[e]}})},Ft=function(t){var n,e,r,i,o,u,a=_(t),s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,h=P(a);if(void 0!=h&&!S(h)){for(u=h.call(a),r=[],n=0;!(o=u.next()).done;n++)r.push(o.value);a=r}for(l&&s>2&&(f=c(f,arguments[2],2)),n=0,e=d(a.length),i=kt(this,e);e>n;n++)i[n]=l?f(a[n],n):a[n];return i},Tt=function(){for(var t=0,n=arguments.length,e=kt(this,n);n>t;)e[t]=arguments[t++];return e},Nt=!!H&&o(function(){pt.call(new H(1))}),At=function(){return pt.apply(Nt?lt.call(Et(this)):Et(this),arguments)},It={copyWithin:function(t,n){return D.call(Et(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Et(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return C.apply(Et(this),arguments)},filter:function(t){return Pt(this,X(Et(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Et(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Et(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){q(Et(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return et(Et(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(Et(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Et(this),arguments)},lastIndexOf:function(t){return ut.apply(Et(this),arguments)},map:function(t){return xt(Et(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return at.apply(Et(this),arguments)},reduceRight:function(t){return st.apply(Et(this),arguments)},reverse:function(){for(var t,n=this,e=Et(n).length,r=Math.floor(e/2),i=0;i1?arguments[1]:void 0)},sort:function(t){return ft.call(Et(this),t)},subarray:function(t,n){var e=Et(this),r=e.length,i=g(t,r);return new(N(e,e[gt]))(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,d((void 0===n?r:g(n,r))-i))}},Rt=function(t,n){return Pt(this,lt.call(Et(this),t,n))},Lt=function(t){Et(this);var n=Ot(arguments[1],1),e=this.length,r=_(t),i=d(r.length),o=0;if(i+n>e)throw U("Wrong length!");for(;o255?255:255&r),i.v[p](e*n+i.o,r,_t)},j=function(t,n){B(t,n,{get:function(){return P(this,n)},set:function(t){return M(this,n,t)},enumerable:!0})};b?(v=e(function(t,e,r,i){f(t,v,c,"_d");var o,u,a,s,l=0,p=0;if(x(e)){if(!(e instanceof J||"ArrayBuffer"==(s=w(e))||"SharedArrayBuffer"==s))return bt in e?Mt(v,e):Ft.call(v,e);o=e,p=Ot(r,n);var g=e.byteLength;if(void 0===i){if(g%n)throw U("Wrong length!");if((u=g-p)<0)throw U("Wrong length!")}else if((u=d(i)*n)+p>g)throw U("Wrong length!");a=u/n}else a=y(e),u=a*n,o=new J(u);for(h(t,"_d",{b:o,o:p,l:u,e:a,v:new Y(o)});ldocument.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s.prototype[o[r]];return s()};t.exports=Object.create||function(t,n){var e;return null!==t?(a.prototype=r(t),e=new a,a.prototype=null,e[u]=t):e=s(),void 0===n?e:i(e,n)}},function(t,n,e){var r=e(94),i=e(68).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,n,e){"use strict";var r=e(2),i=e(7),o=e(6),u=e(5)("species");t.exports=function(t){var n=r[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){var r=e(18),i=e(106),o=e(81),u=e(1),a=e(8),s=e(83),c={},f={},n=t.exports=function(t,n,e,l,h){var p,v,d,y,g=h?function(){return t}:s(t),m=r(e,l,n?2:1),b=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=a(t.length);p>b;b++)if((y=n?m(u(v=t[b])[0],v[1]):m(t[b]))===c||y===f)return y}else for(d=g.call(t);!(v=d.next()).done;)if((y=i(d,m,v.value,n))===c||y===f)return y};n.BREAK=c,n.RETURN=f},function(t,n,e){var r=e(13);t.exports=function(t,n,e){for(var i in n)r(t,i,n[i],e);return t}},function(t,n,e){var r=e(7).f,i=e(11),o=e(5)("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,o)&&r(t,o,{configurable:!0,value:n})}},function(t,n,e){var r=e(0),i=e(23),o=e(3),u=e(71),a="["+u+"]",s="​…",c=RegExp("^"+a+a+"*"),f=RegExp(a+a+"*$"),l=function(t,n,e){var i={},a=o(function(){return!!u[t]()||s[t]()!=s}),c=i[t]=a?n(h):u[t];e&&(i[e]=c),r(r.P+r.F*a,"String",i)},h=l.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(c,"")),2&n&&(t=t.replace(f,"")),t};t.exports=l},function(t,n){t.exports={}},function(t,n,e){var r=e(4);t.exports=function(t,n){if(!r(t)||t._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return t}},,function(t,n,e){var r=e(19);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(19),i=e(5)("toStringTag"),o="Arguments"==r(function(){return arguments}()),u=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,e,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=u(n=Object(t),i))?e:o?r(n):"Object"==(a=r(n))&&"function"==typeof n.callee?"Arguments":a}},function(t,n,e){var r=e(2),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n,e){var r=e(15),i=e(8),o=e(36);t.exports=function(t){return function(n,e,u){var a,s=r(n),c=i(s.length),f=o(u,c);if(t&&e!=e){for(;c>f;)if((a=s[f++])!=a)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===e)return t||f||0;return!t&&-1}}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(19);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(4),i=e(19),o=e(5)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,e){var r=e(5)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var o=[7],u=o[r]();u.next=function(){return{done:e=!0}},o[r]=function(){return u},t(o)}catch(t){}return e}},function(t,n,e){"use strict";var r=e(1);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,e){"use strict";var r=e(12),i=e(13),o=e(3),u=e(23),a=e(5);t.exports=function(t,n,e){var s=a(t),c=e(u,s,""[t]),f=c[0],l=c[1];o(function(){var n={};return n[s]=function(){return 7},7!=""[t](n)})&&(i(String.prototype,t,f),r(RegExp.prototype,s,2==n?function(t,n){return l.call(t,this,n)}:function(t){return l.call(t,this)}))}},function(t,n,e){var r=e(1),i=e(10),o=e(5)("species");t.exports=function(t,n){var e,u=r(t).constructor;return void 0===u||void 0==(e=r(u)[o])?n:i(e)}},function(t,n,e){"use strict";var r=e(2),i=e(0),o=e(13),u=e(42),a=e(29),s=e(41),c=e(40),f=e(4),l=e(3),h=e(56),p=e(43),v=e(72);t.exports=function(t,n,e,d,y,g){var m=r[t],b=m,w=y?"set":"add",x=b&&b.prototype,_={},S=function(t){var n=x[t];o(x,t,"delete"==t?function(t){return!(g&&!f(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!f(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!f(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof b&&(g||x.forEach&&!l(function(){(new b).entries().next()}))){var O=new b,E=O[w](g?{}:-0,1)!=O,k=l(function(){O.has(1)}),P=h(function(t){new b(t)}),M=!g&&l(function(){for(var t=new b,n=5;n--;)t[w](n,n);return!t.has(-0)});P||(b=n(function(n,e){c(n,b,t);var r=v(new m,n,b);return void 0!=e&&s(e,y,r[w],r),r}),b.prototype=x,x.constructor=b),(k||M)&&(S("delete"),S("has"),y&&S("get")),(M||E)&&S(w),g&&x.clear&&delete x.clear}else b=d.getConstructor(n,t,y,w),u(b.prototype,e),a.NEED=!0;return p(b,t),_[t]=b,i(i.G+i.W+i.F*(b!=m),_),g||d.setStrong(b,t,y),b}},function(t,n,e){for(var r,i=e(2),o=e(12),u=e(33),a=u("typed_array"),s=u("view"),c=!(!i.ArrayBuffer||!i.DataView),f=c,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[h[l++]])?(o(r.prototype,a,!0),o(r.prototype,s,!0)):f=!1;t.exports={ABV:c,CONSTR:f,TYPED:a,VIEW:s}},function(t,n,e){"use strict";t.exports=e(34)||!e(3)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete e(2)[t]})},function(t,n,e){"use strict";var r=e(0);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}})}},function(t,n,e){"use strict";var r=e(0),i=e(10),o=e(18),u=e(41);t.exports=function(t){r(r.S,t,{from:function(t){var n,e,r,a,s=arguments[1];return i(this),n=void 0!==s,n&&i(s),void 0==t?new this:(e=[],n?(r=0,a=o(s,arguments[2],2),u(t,!1,function(t){e.push(a(t,r++))})):u(t,!1,e.push,e),new this(e))}})}},function(t,n,e){var r=e(4),i=e(2).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){var r=e(2),i=e(21),o=e(34),u=e(93),a=e(7).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||a(n,t,{value:u.f(t)})}},function(t,n,e){var r=e(51)("keys"),i=e(33);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(2).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(4),i=e(1),o=function(t,n){if(i(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{r=e(18)(Function.call,e(16).f(Object.prototype,"__proto__").set,2),r(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},function(t,n){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n,e){var r=e(4),i=e(70).set;t.exports=function(t,n,e){var o,u=n.constructor;return u!==e&&"function"==typeof u&&(o=u.prototype)!==e.prototype&&r(o)&&i&&i(t,o),t}},function(t,n,e){"use strict";var r=e(24),i=e(23);t.exports=function(t){var n=String(i(this)),e="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(n+=n))1&o&&(e+=n);return e}},function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},function(t,n,e){var r=e(24),i=e(23);t.exports=function(t){return function(n,e){var o,u,a=String(i(n)),s=r(e),c=a.length;return s<0||s>=c?t?"":void 0:(o=a.charCodeAt(s),o<55296||o>56319||s+1===c||(u=a.charCodeAt(s+1))<56320||u>57343?t?a.charAt(s):o:t?a.slice(s,s+2):u-56320+(o-55296<<10)+65536)}}},function(t,n,e){"use strict";var r=e(34),i=e(0),o=e(13),u=e(12),a=e(11),s=e(45),c=e(78),f=e(43),l=e(17),h=e(5)("iterator"),p=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,n,e,d,y,g,m){c(e,n,d);var b,w,x,_=function(t){if(!p&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},S=n+" Iterator",O="values"==y,E=!1,k=t.prototype,P=k[h]||k["@@iterator"]||y&&k[y],M=!p&&P||_(y),j=y?O?_("entries"):M:void 0,F="Array"==n?k.entries||P:P;if(F&&(x=l(F.call(new t)))!==Object.prototype&&x.next&&(f(x,S,!0),r||a(x,h)||u(x,h,v)),O&&P&&"values"!==P.name&&(E=!0,M=function(){return P.call(this)}),r&&!m||!p&&!E&&k[h]||u(k,h,M),s[n]=M,s[S]=v,y)if(b={values:O?M:_("values"),keys:g?M:_("keys"),entries:j},m)for(w in b)w in k||o(k,w,b[w]);else i(i.P+i.F*(p||E),n,b);return b}},function(t,n,e){"use strict";var r=e(37),i=e(32),o=e(43),u={};e(12)(u,e(5)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(u,{next:i(1,e)}),o(t,n+" Iterator")}},function(t,n,e){var r=e(55),i=e(23);t.exports=function(t,n,e){if(r(n))throw TypeError("String#"+e+" doesn't accept regex!");return String(i(t))}},function(t,n,e){var r=e(5)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,e){var r=e(45),i=e(5)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,n,e){"use strict";var r=e(7),i=e(32);t.exports=function(t,n,e){n in t?r.f(t,n,i(0,e)):t[n]=e}},function(t,n,e){var r=e(50),i=e(5)("iterator"),o=e(45);t.exports=e(21).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n,e){var r=e(221);t.exports=function(t,n){return new(r(t))(n)}},function(t,n,e){"use strict";var r=e(9),i=e(36),o=e(8);t.exports=function(t){for(var n=r(this),e=o(n.length),u=arguments.length,a=i(u>1?arguments[1]:void 0,e),s=u>2?arguments[2]:void 0,c=void 0===s?e:i(s,e);c>a;)n[a++]=t;return n}},function(t,n,e){"use strict";var r=e(30),i=e(109),o=e(45),u=e(15);t.exports=e(77)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,i(1)):"keys"==n?i(0,e):"values"==n?i(0,t[e]):i(0,[e,t[e]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,n,e){var r,i,o,u=e(18),a=e(99),s=e(69),c=e(65),f=e(2),l=f.process,h=f.setImmediate,p=f.clearImmediate,v=f.MessageChannel,d=f.Dispatch,y=0,g={},m=function(){var t=+this;if(g.hasOwnProperty(t)){var n=g[t];delete g[t],n()}},b=function(t){m.call(t.data)};h&&p||(h=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return g[++y]=function(){a("function"==typeof t?t:Function(t),n)},r(y),y},p=function(t){delete g[t]},"process"==e(19)(l)?r=function(t){l.nextTick(u(m,t,1))}:d&&d.now?r=function(t){d.now(u(m,t,1))}:v?(i=new v,o=i.port2,i.port1.onmessage=b,r=u(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(t){s.appendChild(c("script")).onreadystatechange=function(){s.removeChild(this),m.call(t)}}:function(t){setTimeout(u(m,t,1),0)}),t.exports={set:h,clear:p}},function(t,n,e){var r=e(2),i=e(87).set,o=r.MutationObserver||r.WebKitMutationObserver,u=r.process,a=r.Promise,s="process"==e(19)(u);t.exports=function(){var t,n,e,c=function(){var r,i;for(s&&(r=u.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?e():n=void 0,r}}n=void 0,r&&r.enter()};if(s)e=function(){u.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var f=a.resolve();e=function(){f.then(c)}}else e=function(){i.call(r,c)};else{var l=!0,h=document.createTextNode("");new o(c).observe(h,{characterData:!0}),e=function(){h.data=l=!l}}return function(r){var i={fn:r,next:void 0};n&&(n.next=i),t||(t=i,e()),n=i}}},function(t,n,e){"use strict";function r(t){var n,e;this.promise=new t(function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r}),this.resolve=i(n),this.reject=i(e)}var i=e(10);t.exports.f=function(t){return new r(t)}},function(t,n,e){"use strict";function r(t,n,e){var r,i,o,u=new Array(e),a=8*e-n-1,s=(1<>1,f=23===n?D(2,-24)-D(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for(t=C(t),t!=t||t===R?(i=t!=t?1:0,r=s):(r=W(G(t)/B),t*(o=D(2,-r))<1&&(r--,o*=2),t+=r+c>=1?f/o:f*D(2,1-c),t*o>=2&&(r++,o/=2),r+c>=s?(i=0,r=s):r+c>=1?(i=(t*o-1)*D(2,n),r+=c):(i=t*D(2,c-1)*D(2,n),r=0));n>=8;u[l++]=255&i,i/=256,n-=8);for(r=r<0;u[l++]=255&r,r/=256,a-=8);return u[--l]|=128*h,u}function i(t,n,e){var r,i=8*e-n-1,o=(1<>1,a=i-7,s=e-1,c=t[s--],f=127&c;for(c>>=7;a>0;f=256*f+t[s],s--,a-=8);for(r=f&(1<<-a)-1,f>>=-a,a+=n;a>0;r=256*r+t[s],s--,a-=8);if(0===f)f=1-u;else{if(f===o)return r?NaN:c?-R:R;r+=D(2,n),f-=u}return(c?-1:1)*r*D(2,f-n)}function o(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function u(t){return[255&t]}function a(t){return[255&t,t>>8&255]}function s(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function c(t){return r(t,52,8)}function f(t){return r(t,23,4)}function l(t,n,e){k(t[j],n,{get:function(){return this[e]}})}function h(t,n,e,r){var i=+e,o=O(i);if(o+n>t[U])throw I(F);var u=t[V]._b,a=o+t[z],s=u.slice(a,a+n);return r?s:s.reverse()}function p(t,n,e,r,i,o){var u=+e,a=O(u);if(a+n>t[U])throw I(F);for(var s=t[V]._b,c=a+t[z],f=r(+i),l=0;lY;)(H=J[Y++])in T||m(T,H,L[H]);y||(K.constructor=T)}var q=new N(new T(2)),X=N[j].setInt8;q.setInt8(0,2147483648),q.setInt8(1,2147483649),!q.getInt8(0)&&q.getInt8(1)||b(N[j],{setInt8:function(t,n){X.call(this,t,n<<24>>24)},setUint8:function(t,n){X.call(this,t,n<<24>>24)}},!0)}else T=function(t){x(this,T,"ArrayBuffer");var n=O(t);this._b=P.call(new Array(n),0),this[U]=n},N=function(t,n,e){x(this,N,"DataView"),x(t,T,"DataView");var r=t[U],i=_(n);if(i<0||i>r)throw I("Wrong offset!");if(e=void 0===e?r-i:S(e),i+e>r)throw I("Wrong length!");this[V]=t,this[z]=i,this[U]=e},d&&(l(T,"byteLength","_l"),l(N,"buffer","_b"),l(N,"byteLength","_l"),l(N,"byteOffset","_o")),b(N[j],{getInt8:function(t){return h(this,1,t)[0]<<24>>24},getUint8:function(t){return h(this,1,t)[0]},getInt16:function(t){var n=h(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=h(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return o(h(this,4,t,arguments[1]))},getUint32:function(t){return o(h(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return i(h(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return i(h(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){p(this,1,t,u,n)},setUint8:function(t,n){p(this,1,t,u,n)},setInt16:function(t,n){p(this,2,t,a,n,arguments[2])},setUint16:function(t,n){p(this,2,t,a,n,arguments[2])},setInt32:function(t,n){p(this,4,t,s,n,arguments[2])},setUint32:function(t,n){p(this,4,t,s,n,arguments[2])},setFloat32:function(t,n){p(this,4,t,f,n,arguments[2])},setFloat64:function(t,n){p(this,8,t,c,n,arguments[2])}});M(T,"ArrayBuffer"),M(N,"DataView"),m(N[j],g.VIEW,!0),n.ArrayBuffer=T,n.DataView=N},function(t,n,e){var r=e(2),i=r.navigator;t.exports=i&&i.userAgent||""},function(t,n,e){t.exports=!e(6)&&!e(3)(function(){return 7!=Object.defineProperty(e(65)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){n.f=e(5)},function(t,n,e){var r=e(11),i=e(15),o=e(52)(!1),u=e(67)("IE_PROTO");t.exports=function(t,n){var e,a=i(t),s=0,c=[];for(e in a)e!=u&&r(a,e)&&c.push(e);for(;n.length>s;)r(a,e=n[s++])&&(~o(c,e)||c.push(e));return c}},function(t,n,e){var r=e(7),i=e(1),o=e(35);t.exports=e(6)?Object.defineProperties:function(t,n){i(t);for(var e,u=o(n),a=u.length,s=0;a>s;)r.f(t,e=u[s++],n[e]);return t}},function(t,n,e){var r=e(15),i=e(38).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return i(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?a(t):i(r(t))}},function(t,n,e){"use strict";var r=e(35),i=e(53),o=e(49),u=e(9),a=e(48),s=Object.assign;t.exports=!s||e(3)(function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(t){n[t]=t}),7!=s({},t)[e]||Object.keys(s({},n)).join("")!=r})?function(t,n){for(var e=u(t),s=arguments.length,c=1,f=i.f,l=o.f;s>c;)for(var h,p=a(arguments[c++]),v=f?r(p).concat(f(p)):r(p),d=v.length,y=0;d>y;)l.call(p,h=v[y++])&&(e[h]=p[h]);return e}:s},function(t,n,e){"use strict";var r=e(10),i=e(4),o=e(99),u=[].slice,a={},s=function(t,n,e){if(!(n in a)){for(var r=[],i=0;i>>0||(u.test(e)?16:10))}:r},function(t,n,e){var r=e(2).parseFloat,i=e(44).trim;t.exports=1/r(e(71)+"-0")!=-1/0?function(t){var n=i(String(t),3),e=r(n);return 0===e&&"-"==n.charAt(0)?-0:e}:r},function(t,n,e){var r=e(19);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(n);return+t}},function(t,n,e){var r=e(4),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,n){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,e){var r=e(74),i=Math.pow,o=i(2,-52),u=i(2,-23),a=i(2,127)*(2-u),s=i(2,-126),c=function(t){return t+1/o-1/o};t.exports=Math.fround||function(t){var n,e,i=Math.abs(t),f=r(t);return ia||e!=e?f*(1/0):f*e)}},function(t,n,e){var r=e(1);t.exports=function(t,n,e,i){try{return i?n(r(e)[0],e[1]):n(e)}catch(n){var o=t.return;throw void 0!==o&&r(o.call(t)),n}}},function(t,n,e){var r=e(10),i=e(9),o=e(48),u=e(8);t.exports=function(t,n,e,a,s){r(n);var c=i(t),f=o(c),l=u(c.length),h=s?l-1:0,p=s?-1:1;if(e<2)for(;;){if(h in f){a=f[h],h+=p;break}if(h+=p,s?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;s?h>=0:l>h;h+=p)h in f&&(a=n(a,f[h],h,c));return a}},function(t,n,e){"use strict";var r=e(9),i=e(36),o=e(8);t.exports=[].copyWithin||function(t,n){var e=r(this),u=o(e.length),a=i(t,u),s=i(n,u),c=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===c?u:i(c,u))-s,u-a),l=1;for(s0;)s in e?e[a]=e[s]:delete e[a],a+=l,s+=l;return e}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){e(6)&&"g"!=/./g.flags&&e(7).f(RegExp.prototype,"flags",{configurable:!0,get:e(57)})},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,e){var r=e(1),i=e(4),o=e(89);t.exports=function(t,n){if(r(t),i(n)&&n.constructor===t)return n;var e=o.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){"use strict";var r=e(114),i=e(46);t.exports=e(60)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var n=r.getEntry(i(this,"Map"),t);return n&&n.v},set:function(t,n){return r.def(i(this,"Map"),0===t?0:t,n)}},r,!0)},function(t,n,e){"use strict";var r=e(7).f,i=e(37),o=e(42),u=e(18),a=e(40),s=e(41),c=e(77),f=e(109),l=e(39),h=e(6),p=e(29).fastKey,v=e(46),d=h?"_s":"size",y=function(t,n){var e,r=p(n);if("F"!==r)return t._i[r];for(e=t._f;e;e=e.n)if(e.k==n)return e};t.exports={getConstructor:function(t,n,e,c){var f=t(function(t,r){a(t,f,n,"_i"),t._t=n,t._i=i(null),t._f=void 0,t._l=void 0,t[d]=0,void 0!=r&&s(r,e,t[c],t)});return o(f.prototype,{clear:function(){for(var t=v(this,n),e=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete e[r.i];t._f=t._l=void 0,t[d]=0},delete:function(t){var e=v(this,n),r=y(e,t);if(r){var i=r.n,o=r.p;delete e._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),e._f==r&&(e._f=i),e._l==r&&(e._l=o),e[d]--}return!!r},forEach:function(t){v(this,n);for(var e,r=u(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(r(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!y(v(this,n),t)}}),h&&r(f.prototype,"size",{get:function(){return v(this,n)[d]}}),f},def:function(t,n,e){var r,i,o=y(t,n);return o?o.v=e:(t._l=o={i:i=p(n,!0),k:n,v:e,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[d]++,"F"!==i&&(t._i[i]=o)),t},getEntry:y,setStrong:function(t,n,e){c(t,n,function(t,e){this._t=v(t,n),this._k=e,this._l=void 0},function(){for(var t=this,n=t._k,e=t._l;e&&e.r;)e=e.p;return t._t&&(t._l=e=e?e.n:t._t._f)?"keys"==n?f(0,e.k):"values"==n?f(0,e.v):f(0,[e.k,e.v]):(t._t=void 0,f(1))},e?"entries":"values",!e,!0),l(n)}}},function(t,n,e){"use strict";var r=e(114),i=e(46);t.exports=e(60)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,n,e){"use strict";var r,i=e(26)(0),o=e(13),u=e(29),a=e(97),s=e(117),c=e(4),f=e(3),l=e(46),h=u.getWeak,p=Object.isExtensible,v=s.ufstore,d={},y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(t){if(c(t)){var n=h(t);return!0===n?v(l(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(t,n){return s.def(l(this,"WeakMap"),t,n)}},m=t.exports=e(60)("WeakMap",y,g,s,!0,!0);f(function(){return 7!=(new m).set((Object.freeze||Object)(d),7).get(d)})&&(r=s.getConstructor(y,"WeakMap"),a(r.prototype,g),u.NEED=!0,i(["delete","has","get","set"],function(t){var n=m.prototype,e=n[t];o(n,t,function(n,i){if(c(n)&&!p(n)){this._f||(this._f=new r);var o=this._f[t](n,i);return"set"==t?this:o}return e.call(this,n,i)})}))},function(t,n,e){"use strict";var r=e(42),i=e(29).getWeak,o=e(1),u=e(4),a=e(40),s=e(41),c=e(26),f=e(11),l=e(46),h=c(5),p=c(6),v=0,d=function(t){return t._l||(t._l=new y)},y=function(){this.a=[]},g=function(t,n){return h(t.a,function(t){return t[0]===n})};y.prototype={get:function(t){var n=g(this,t);if(n)return n[1]},has:function(t){return!!g(this,t)},set:function(t,n){var e=g(this,t);e?e[1]=n:this.a.push([t,n])},delete:function(t){var n=p(this.a,function(n){return n[0]===t});return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,o){var c=t(function(t,r){a(t,c,n,"_i"),t._t=n,t._i=v++,t._l=void 0,void 0!=r&&s(r,e,t[o],t)});return r(c.prototype,{delete:function(t){if(!u(t))return!1;var e=i(t);return!0===e?d(l(this,n)).delete(t):e&&f(e,this._i)&&delete e[this._i]},has:function(t){if(!u(t))return!1;var e=i(t);return!0===e?d(l(this,n)).has(t):e&&f(e,this._i)}}),c},def:function(t,n,e){var r=i(o(n),!0);return!0===r?d(t).set(n,e):r[t._i]=e,t},ufstore:d}},function(t,n,e){var r=e(24),i=e(8);t.exports=function(t){if(void 0===t)return 0;var n=r(t),e=i(n);if(n!==e)throw RangeError("Wrong length!");return e}},function(t,n,e){var r=e(38),i=e(53),o=e(1),u=e(2).Reflect;t.exports=u&&u.ownKeys||function(t){var n=r.f(o(t)),e=i.f;return e?n.concat(e(t)):n}},function(t,n,e){"use strict";function r(t,n,e,c,f,l,h,p){for(var v,d,y=f,g=0,m=!!h&&a(h,p,3);g0)y=r(t,n,v,u(v.length),y,l-1)-1;else{if(y>=9007199254740991)throw TypeError();t[y]=v}y++}g++}return y}var i=e(54),o=e(4),u=e(8),a=e(18),s=e(5)("isConcatSpreadable");t.exports=r},function(t,n,e){var r=e(8),i=e(73),o=e(23);t.exports=function(t,n,e,u){var a=String(o(t)),s=a.length,c=void 0===e?" ":String(e),f=r(n);if(f<=s||""==c)return a;var l=f-s,h=i.call(c,Math.ceil(l/c.length));return h.length>l&&(h=h.slice(0,l)),u?h+a:a+h}},function(t,n,e){var r=e(35),i=e(15),o=e(49).f;t.exports=function(t){return function(n){for(var e,u=i(n),a=r(u),s=a.length,c=0,f=[];s>c;)o.call(u,e=a[c++])&&f.push(t?[e,u[e]]:u[e]);return f}}},function(t,n,e){var r=e(50),i=e(124);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,n,e){var r=e(41);t.exports=function(t,n){var e=[];return r(t,!1,e.push,e,n),e}},function(t,n){t.exports=Math.scale||function(t,n,e,r,i){return 0===arguments.length||t!=t||n!=n||e!=e||r!=r||i!=i?NaN:t===1/0||t===-1/0?t:(t-n)*(i-r)/(e-n)+r}},,,function(t,n,e){e(129),t.exports=e(331)},function(t,n,e){"use strict";(function(t){function n(t,n,e){t[n]||Object[r](t,n,{writable:!0,configurable:!0,value:e})}if(e(130),e(327),e(328),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var r="defineProperty";n(String.prototype,"padLeft","".padStart),n(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&n(Array,t,Function.call.bind([][t]))})}).call(n,e(47))},function(t,n,e){e(131),e(133),e(134),e(135),e(136),e(137),e(138),e(139),e(140),e(141),e(142),e(143),e(144),e(145),e(146),e(147),e(149),e(150),e(151),e(152),e(153),e(154),e(155),e(156),e(157),e(158),e(159),e(160),e(161),e(162),e(163),e(164),e(165),e(166),e(167),e(168),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(177),e(178),e(179),e(180),e(181),e(182),e(183),e(184),e(185),e(186),e(187),e(188),e(189),e(190),e(191),e(192),e(193),e(194),e(195),e(196),e(197),e(198),e(199),e(200),e(201),e(202),e(203),e(204),e(205),e(206),e(207),e(208),e(209),e(211),e(212),e(214),e(215),e(216),e(217),e(218),e(219),e(220),e(222),e(223),e(224),e(225),e(226),e(227),e(228),e(229),e(230),e(231),e(232),e(233),e(234),e(86),e(235),e(236),e(110),e(237),e(238),e(239),e(240),e(241),e(113),e(115),e(116),e(242),e(243),e(244),e(245),e(246),e(247),e(248),e(249),e(250),e(251),e(252),e(253),e(254),e(255),e(256),e(257),e(258),e(259),e(260),e(261),e(262),e(263),e(264),e(265),e(266),e(267),e(268),e(269),e(270),e(271),e(272),e(273),e(274),e(275),e(276),e(277),e(278),e(279),e(280),e(281),e(282),e(283),e(284),e(285),e(286),e(287),e(288),e(289),e(290),e(291),e(292),e(293),e(294),e(295),e(296),e(297),e(298),e(299),e(300),e(301),e(302),e(303),e(304),e(305),e(306),e(307),e(308),e(309),e(310),e(311),e(312),e(313),e(314),e(315),e(316),e(317),e(318),e(319),e(320),e(321),e(322),e(323),e(324),e(325),e(326),t.exports=e(21)},function(t,n,e){"use strict";var r=e(2),i=e(11),o=e(6),u=e(0),a=e(13),s=e(29).KEY,c=e(3),f=e(51),l=e(43),h=e(33),p=e(5),v=e(93),d=e(66),y=e(132),g=e(54),m=e(1),b=e(4),w=e(15),x=e(22),_=e(32),S=e(37),O=e(96),E=e(16),k=e(7),P=e(35),M=E.f,j=k.f,F=O.f,T=r.Symbol,N=r.JSON,A=N&&N.stringify,I=p("_hidden"),R=p("toPrimitive"),L={}.propertyIsEnumerable,C=f("symbol-registry"),D=f("symbols"),W=f("op-symbols"),G=Object.prototype,B="function"==typeof T,V=r.QObject,U=!V||!V.prototype||!V.prototype.findChild,z=o&&c(function(){return 7!=S(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a})?function(t,n,e){var r=M(G,n);r&&delete G[n],j(t,n,e),r&&t!==G&&j(G,n,r)}:j,H=function(t){var n=D[t]=S(T.prototype);return n._k=t,n},K=B&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},J=function(t,n,e){return t===G&&J(W,n,e),m(t),n=x(n,!0),m(e),i(D,n)?(e.enumerable?(i(t,I)&&t[I][n]&&(t[I][n]=!1),e=S(e,{enumerable:_(0,!1)})):(i(t,I)||j(t,I,_(1,{})),t[I][n]=!0),z(t,n,e)):j(t,n,e)},Y=function(t,n){m(t);for(var e,r=y(n=w(n)),i=0,o=r.length;o>i;)J(t,e=r[i++],n[e]);return t},q=function(t,n){return void 0===n?S(t):Y(S(t),n)},X=function(t){var n=L.call(this,t=x(t,!0));return!(this===G&&i(D,t)&&!i(W,t))&&(!(n||!i(this,t)||!i(D,t)||i(this,I)&&this[I][t])||n)},$=function(t,n){if(t=w(t),n=x(n,!0),t!==G||!i(D,n)||i(W,n)){var e=M(t,n);return!e||!i(D,n)||i(t,I)&&t[I][n]||(e.enumerable=!0),e}},Z=function(t){for(var n,e=F(w(t)),r=[],o=0;e.length>o;)i(D,n=e[o++])||n==I||n==s||r.push(n);return r},Q=function(t){for(var n,e=t===G,r=F(e?W:w(t)),o=[],u=0;r.length>u;)!i(D,n=r[u++])||e&&!i(G,n)||o.push(D[n]);return o};B||(T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(e){this===G&&n.call(W,e),i(this,I)&&i(this[I],t)&&(this[I][t]=!1),z(this,t,_(1,e))};return o&&U&&z(G,t,{configurable:!0,set:n}),H(t)},a(T.prototype,"toString",function(){return this._k}),E.f=$,k.f=J,e(38).f=O.f=Z,e(49).f=X,e(53).f=Q,o&&!e(34)&&a(G,"propertyIsEnumerable",X,!0),v.f=function(t){return H(p(t))}),u(u.G+u.W+u.F*!B,{Symbol:T});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;tt.length>nt;)p(tt[nt++]);for(var et=P(p.store),rt=0;et.length>rt;)d(et[rt++]);u(u.S+u.F*!B,"Symbol",{for:function(t){return i(C,t+="")?C[t]:C[t]=T(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var n in C)if(C[n]===t)return n},useSetter:function(){U=!0},useSimple:function(){U=!1}}),u(u.S+u.F*!B,"Object",{create:q,defineProperty:J,defineProperties:Y,getOwnPropertyDescriptor:$,getOwnPropertyNames:Z,getOwnPropertySymbols:Q}),N&&u(u.S+u.F*(!B||c(function(){var t=T();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){for(var n,e,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(e=n=r[1],(b(n)||void 0!==t)&&!K(t))return g(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!K(n))return n}),r[1]=n,A.apply(N,r)}}),T.prototype[R]||e(12)(T.prototype,R,T.prototype.valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){var r=e(35),i=e(53),o=e(49);t.exports=function(t){var n=r(t),e=i.f;if(e)for(var u,a=e(t),s=o.f,c=0;a.length>c;)s.call(t,u=a[c++])&&n.push(u);return n}},function(t,n,e){var r=e(0);r(r.S,"Object",{create:e(37)})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(6),"Object",{defineProperty:e(7).f})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(6),"Object",{defineProperties:e(95)})},function(t,n,e){var r=e(15),i=e(16).f;e(25)("getOwnPropertyDescriptor",function(){return function(t,n){return i(r(t),n)}})},function(t,n,e){var r=e(9),i=e(17);e(25)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,n,e){var r=e(9),i=e(35);e(25)("keys",function(){return function(t){return i(r(t))}})},function(t,n,e){e(25)("getOwnPropertyNames",function(){return e(96).f})},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(25)("freeze",function(t){return function(n){return t&&r(n)?t(i(n)):n}})},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(25)("seal",function(t){return function(n){return t&&r(n)?t(i(n)):n}})},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(25)("preventExtensions",function(t){return function(n){return t&&r(n)?t(i(n)):n}})},function(t,n,e){var r=e(4);e(25)("isFrozen",function(t){return function(n){return!r(n)||!!t&&t(n)}})},function(t,n,e){var r=e(4);e(25)("isSealed",function(t){return function(n){return!r(n)||!!t&&t(n)}})},function(t,n,e){var r=e(4);e(25)("isExtensible",function(t){return function(n){return!!r(n)&&(!t||t(n))}})},function(t,n,e){var r=e(0);r(r.S+r.F,"Object",{assign:e(97)})},function(t,n,e){var r=e(0);r(r.S,"Object",{is:e(148)})},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,e){var r=e(0);r(r.S,"Object",{setPrototypeOf:e(70).set})},function(t,n,e){"use strict";var r=e(50),i={};i[e(5)("toStringTag")]="z",i+""!="[object z]"&&e(13)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,n,e){var r=e(0);r(r.P,"Function",{bind:e(98)})},function(t,n,e){var r=e(7).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||e(6)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,n,e){"use strict";var r=e(4),i=e(17),o=e(5)("hasInstance"),u=Function.prototype;o in u||e(7).f(u,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,e){var r=e(0),i=e(100);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,n,e){var r=e(0),i=e(101);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,n,e){"use strict";var r=e(2),i=e(11),o=e(19),u=e(72),a=e(22),s=e(3),c=e(38).f,f=e(16).f,l=e(7).f,h=e(44).trim,p=r.Number,v=p,d=p.prototype,y="Number"==o(e(37)(d)),g="trim"in String.prototype,m=function(t){var n=a(t,!1);if("string"==typeof n&&n.length>2){n=g?n.trim():h(n,3);var e,r,i,o=n.charCodeAt(0);if(43===o||45===o){if(88===(e=n.charCodeAt(2))||120===e)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+n}for(var u,s=n.slice(2),c=0,f=s.length;ci)return NaN;return parseInt(s,r)}}return+n};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof p&&(y?s(function(){d.valueOf.call(e)}):"Number"!=o(e))?u(new v(m(n)),e,p):m(n)};for(var b,w=e(6)?c(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)i(v,b=w[x])&&!i(p,b)&&l(p,b,f(v,b));p.prototype=d,d.constructor=p,e(13)(r,"Number",p)}},function(t,n,e){"use strict";var r=e(0),i=e(24),o=e(102),u=e(73),a=1..toFixed,s=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,n){for(var e=-1,r=n;++e<6;)r+=t*c[e],c[e]=r%1e7,r=s(r/1e7)},h=function(t){for(var n=6,e=0;--n>=0;)e+=c[n],c[n]=s(e/t),e=e%t*1e7},p=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==c[t]){var e=String(c[t]);n=""===n?e:n+u.call("0",7-e.length)+e}return n},v=function(t,n,e){return 0===n?e:n%2==1?v(t,n-1,e*t):v(t*t,n/2,e)},d=function(t){for(var n=0,e=t;e>=4096;)n+=12,e/=4096;for(;e>=2;)n+=1,e/=2;return n};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(3)(function(){a.call({})})),"Number",{toFixed:function(t){var n,e,r,a,s=o(this,f),c=i(t),y="",g="0";if(c<0||c>20)throw RangeError(f);if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return String(s);if(s<0&&(y="-",s=-s),s>1e-21)if(n=d(s*v(2,69,1))-69,e=n<0?s*v(2,-n,1):s/v(2,n,1),e*=4503599627370496,(n=52-n)>0){for(l(0,e),r=c;r>=7;)l(1e7,0),r-=7;for(l(v(10,r,1),0),r=n-1;r>=23;)h(1<<23),r-=23;h(1<0?(a=g.length,g=y+(a<=c?"0."+u.call("0",c-a)+g:g.slice(0,a-c)+"."+g.slice(a-c))):g=y+g,g}})},function(t,n,e){"use strict";var r=e(0),i=e(3),o=e(102),u=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==u.call(1,void 0)})||!i(function(){u.call({})})),"Number",{toPrecision:function(t){var n=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,e){var r=e(0),i=e(2).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{isInteger:e(103)})},function(t,n,e){var r=e(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,e){var r=e(0),i=e(103),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,n,e){var r=e(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,e){var r=e(0),i=e(101);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,n,e){var r=e(0),i=e(100);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,n,e){var r=e(0),i=e(104),o=Math.sqrt,u=Math.acosh;r(r.S+r.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,n,e){function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=e(0),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},function(t,n,e){var r=e(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,e){var r=e(0),i=e(74);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,e){var r=e(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,n,e){var r=e(0),i=e(75);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,e){var r=e(0);r(r.S,"Math",{fround:e(105)})},function(t,n,e){var r=e(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,n){for(var e,r,o=0,u=0,a=arguments.length,s=0;u0?(r=e/s,o+=r*r):o+=e;return s===1/0?1/0:s*Math.sqrt(o)}})},function(t,n,e){var r=e(0),i=Math.imul;r(r.S+r.F*e(3)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r;return 0|i*o+((65535&e>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log1p:e(104)})},function(t,n,e){var r=e(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,e){var r=e(0);r(r.S,"Math",{sign:e(74)})},function(t,n,e){var r=e(0),i=e(75),o=Math.exp;r(r.S+r.F*e(3)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,e){var r=e(0),i=e(75),o=Math.exp;r(r.S,"Math",{tanh:function(t){var n=i(t=+t),e=i(-t);return n==1/0?1:e==1/0?-1:(n-e)/(o(t)+o(-t))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,e){var r=e(0),i=e(36),o=String.fromCharCode,u=String.fromCodePoint;r(r.S+r.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,e=[],r=arguments.length,u=0;r>u;){if(n=+arguments[u++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");e.push(n<65536?o(n):o(55296+((n-=65536)>>10),n%1024+56320))}return e.join("")}})},function(t,n,e){var r=e(0),i=e(15),o=e(8);r(r.S,"String",{raw:function(t){for(var n=i(t.raw),e=o(n.length),r=arguments.length,u=[],a=0;e>a;)u.push(String(n[a++])),a=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})})},function(t,n,e){"use strict";var r=e(0),i=e(76)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,n,e){"use strict";var r=e(0),i=e(8),o=e(79),u="".endsWith;r(r.P+r.F*e(80)("endsWith"),"String",{endsWith:function(t){var n=o(this,t,"endsWith"),e=arguments.length>1?arguments[1]:void 0,r=i(n.length),a=void 0===e?r:Math.min(i(e),r),s=String(t);return u?u.call(n,s,a):n.slice(a-s.length,a)===s}})},function(t,n,e){"use strict";var r=e(0),i=e(79);r(r.P+r.F*e(80)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,e){var r=e(0);r(r.P,"String",{repeat:e(73)})},function(t,n,e){"use strict";var r=e(0),i=e(8),o=e(79),u="".startsWith;r(r.P+r.F*e(80)("startsWith"),"String",{startsWith:function(t){var n=o(this,t,"startsWith"),e=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(t);return u?u.call(n,r,e):n.slice(e,e+r.length)===r}})},function(t,n,e){"use strict";e(14)("anchor",function(t){return function(n){return t(this,"a","name",n)}})},function(t,n,e){"use strict";e(14)("big",function(t){return function(){return t(this,"big","","")}})},function(t,n,e){"use strict";e(14)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,n,e){"use strict";e(14)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,n,e){"use strict";e(14)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,n,e){"use strict";e(14)("fontcolor",function(t){return function(n){return t(this,"font","color",n)}})},function(t,n,e){"use strict";e(14)("fontsize",function(t){return function(n){return t(this,"font","size",n)}})},function(t,n,e){"use strict";e(14)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,n,e){"use strict";e(14)("link",function(t){return function(n){return t(this,"a","href",n)}})},function(t,n,e){"use strict";e(14)("small",function(t){return function(){return t(this,"small","","")}})},function(t,n,e){"use strict";e(14)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,n,e){"use strict";e(14)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,n,e){"use strict";e(14)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,n,e){var r=e(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,e){"use strict";var r=e(0),i=e(9),o=e(22);r(r.P+r.F*e(3)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var n=i(this),e=o(n);return"number"!=typeof e||isFinite(e)?n.toISOString():null}})},function(t,n,e){var r=e(0),i=e(210);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,n,e){"use strict";var r=e(3),i=Date.prototype.getTime,o=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!r(function(){o.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),e=t.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(e>99?e:"0"+u(e))+"Z"}:o},function(t,n,e){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&e(13)(r,"toString",function(){var t=o.call(this);return t===t?i.call(this):"Invalid Date"})},function(t,n,e){var r=e(5)("toPrimitive"),i=Date.prototype;r in i||e(12)(i,r,e(213))},function(t,n,e){"use strict";var r=e(1),i=e(22);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,n,e){var r=e(0);r(r.S,"Array",{isArray:e(54)})},function(t,n,e){"use strict";var r=e(18),i=e(0),o=e(9),u=e(106),a=e(81),s=e(8),c=e(82),f=e(83);i(i.S+i.F*!e(56)(function(t){Array.from(t)}),"Array",{from:function(t){var n,e,i,l,h=o(t),p="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,y=void 0!==d,g=0,m=f(h);if(y&&(d=r(d,v>2?arguments[2]:void 0,2)),void 0==m||p==Array&&a(m))for(n=s(h.length),e=new p(n);n>g;g++)c(e,g,y?d(h[g],g):h[g]);else for(l=m.call(h),e=new p;!(i=l.next()).done;g++)c(e,g,y?u(l,d,[i.value,g],!0):i.value);return e.length=g,e}})},function(t,n,e){"use strict";var r=e(0),i=e(82);r(r.S+r.F*e(3)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,n=arguments.length,e=new("function"==typeof this?this:Array)(n);n>t;)i(e,t,arguments[t++]);return e.length=n,e}})},function(t,n,e){"use strict";var r=e(0),i=e(15),o=[].join;r(r.P+r.F*(e(48)!=Object||!e(20)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,n,e){"use strict";var r=e(0),i=e(69),o=e(19),u=e(36),a=e(8),s=[].slice;r(r.P+r.F*e(3)(function(){i&&s.call(i)}),"Array",{slice:function(t,n){var e=a(this.length),r=o(this);if(n=void 0===n?e:n,"Array"==r)return s.call(this,t,n);for(var i=u(t,e),c=u(n,e),f=a(c-i),l=new Array(f),h=0;h1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in n&&n[r]===t)return r||0;return-1}})},function(t,n,e){var r=e(0);r(r.P,"Array",{copyWithin:e(108)}),e(30)("copyWithin")},function(t,n,e){var r=e(0);r(r.P,"Array",{fill:e(85)}),e(30)("fill")},function(t,n,e){"use strict";var r=e(0),i=e(26)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(30)("find")},function(t,n,e){"use strict";var r=e(0),i=e(26)(6),o="findIndex",u=!0;o in[]&&Array(1)[o](function(){u=!1}),r(r.P+r.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(30)(o)},function(t,n,e){e(39)("Array")},function(t,n,e){var r=e(2),i=e(72),o=e(7).f,u=e(38).f,a=e(55),s=e(57),c=r.RegExp,f=c,l=c.prototype,h=/a/g,p=/a/g,v=new c(h)!==h;if(e(6)&&(!v||e(3)(function(){return p[e(5)("match")]=!1,c(h)!=h||c(p)==p||"/a/i"!=c(h,"i")}))){c=function(t,n){var e=this instanceof c,r=a(t),o=void 0===n;return!e&&r&&t.constructor===c&&o?t:i(v?new f(r&&!o?t.source:t,n):f((r=t instanceof c)?t.source:t,r&&o?s.call(t):n),e?this:l,c)};for(var d=u(f),y=0;d.length>y;)!function(t){t in c||o(c,t,{configurable:!0,get:function(){return f[t]},set:function(n){f[t]=n}})}(d[y++]);l.constructor=c,c.prototype=l,e(13)(r,"RegExp",c)}e(39)("RegExp")},function(t,n,e){"use strict";e(110);var r=e(1),i=e(57),o=e(6),u=/./.toString,a=function(t){e(13)(RegExp.prototype,"toString",t,!0)};e(3)(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?a(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=u.name&&a(function(){return u.call(this)})},function(t,n,e){e(58)("match",1,function(t,n,e){return[function(e){"use strict";var r=t(this),i=void 0==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},e]})},function(t,n,e){e(58)("replace",2,function(t,n,e){return[function(r,i){"use strict";var o=t(this),u=void 0==r?void 0:r[n];return void 0!==u?u.call(r,o,i):e.call(String(o),r,i)},e]})},function(t,n,e){e(58)("search",1,function(t,n,e){return[function(e){"use strict";var r=t(this),i=void 0==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},e]})},function(t,n,e){e(58)("split",2,function(t,n,r){"use strict";var i=e(55),o=r,u=[].push,a="length";if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[a]||2!="ab".split(/(?:ab)*/)[a]||4!=".".split(/(.?)(.?)/)[a]||".".split(/()()/)[a]>1||"".split(/.?/)[a]){var s=void 0===/()??/.exec("")[1];r=function(t,n){var e=String(this);if(void 0===t&&0===n)return[];if(!i(t))return o.call(e,t,n);var r,c,f,l,h,p=[],v=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,y=void 0===n?4294967295:n>>>0,g=new RegExp(t.source,v+"g");for(s||(r=new RegExp("^"+g.source+"$(?!\\s)",v));(c=g.exec(e))&&!((f=c.index+c[0][a])>d&&(p.push(e.slice(d,c.index)),!s&&c[a]>1&&c[0].replace(r,function(){for(h=1;h1&&c.index=y));)g.lastIndex===c.index&&g.lastIndex++;return d===e[a]?!l&&g.test("")||p.push(""):p.push(e.slice(d)),p[a]>y?p.slice(0,y):p}}else"0".split(void 0,0)[a]&&(r=function(t,n){return void 0===t&&0===n?[]:o.call(this,t,n)});return[function(e,i){var o=t(this),u=void 0==e?void 0:e[n];return void 0!==u?u.call(e,o,i):r.call(String(o),e,i)},r]})},function(t,n,e){"use strict";var r,i,o,u,a=e(34),s=e(2),c=e(18),f=e(50),l=e(0),h=e(4),p=e(10),v=e(40),d=e(41),y=e(59),g=e(87).set,m=e(88)(),b=e(89),w=e(111),x=e(112),_=s.TypeError,S=s.process,O=s.Promise,E="process"==f(S),k=function(){},P=i=b.f,M=!!function(){try{var t=O.resolve(1),n=(t.constructor={})[e(5)("species")]=function(t){t(k,k)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(k)instanceof n}catch(t){}}(),j=function(t){var n;return!(!h(t)||"function"!=typeof(n=t.then))&&n},F=function(t,n){if(!t._n){t._n=!0;var e=t._c;m(function(){for(var r=t._v,i=1==t._s,o=0;e.length>o;)!function(n){var e,o,u=i?n.ok:n.fail,a=n.resolve,s=n.reject,c=n.domain;try{u?(i||(2==t._h&&A(t),t._h=1),!0===u?e=r:(c&&c.enter(),e=u(r),c&&c.exit()),e===n.promise?s(_("Promise-chain cycle")):(o=j(e))?o.call(e,a,s):a(e)):s(r)}catch(t){s(t)}}(e[o++]);t._c=[],t._n=!1,n&&!t._h&&T(t)})}},T=function(t){g.call(s,function(){var n,e,r,i=t._v,o=N(t);if(o&&(n=w(function(){E?S.emit("unhandledRejection",i,t):(e=s.onunhandledrejection)?e({promise:t,reason:i}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=E||N(t)?2:1),t._a=void 0,o&&n.e)throw n.v})},N=function(t){return 1!==t._h&&0===(t._a||t._c).length},A=function(t){g.call(s,function(){var n;E?S.emit("rejectionHandled",t):(n=s.onrejectionhandled)&&n({promise:t,reason:t._v})})},I=function(t){var n=this;n._d||(n._d=!0,n=n._w||n,n._v=t,n._s=2,n._a||(n._a=n._c.slice()),F(n,!0))},R=function(t){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===t)throw _("Promise can't be resolved itself");(n=j(t))?m(function(){var r={_w:e,_d:!1};try{n.call(t,c(R,r,1),c(I,r,1))}catch(t){I.call(r,t)}}):(e._v=t,e._s=1,F(e,!1))}catch(t){I.call({_w:e,_d:!1},t)}}};M||(O=function(t){v(this,O,"Promise","_h"),p(t),r.call(this);try{t(c(R,this,1),c(I,this,1))}catch(t){I.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=e(42)(O.prototype,{then:function(t,n){var e=P(y(this,O));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=E?S.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&F(this,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(R,t,1),this.reject=c(I,t,1)},b.f=P=function(t){return t===O||t===u?new o(t):i(t)}),l(l.G+l.W+l.F*!M,{Promise:O}),e(43)(O,"Promise"),e(39)("Promise"),u=e(21).Promise,l(l.S+l.F*!M,"Promise",{reject:function(t){var n=P(this);return(0,n.reject)(t),n.promise}}),l(l.S+l.F*(a||!M),"Promise",{resolve:function(t){return x(a&&this===u?O:this,t)}}),l(l.S+l.F*!(M&&e(56)(function(t){O.all(t).catch(k)})),"Promise",{all:function(t){var n=this,e=P(n),r=e.resolve,i=e.reject,o=w(function(){var e=[],o=0,u=1;d(t,!1,function(t){var a=o++,s=!1;e.push(void 0),u++,n.resolve(t).then(function(t){s||(s=!0,e[a]=t,--u||r(e))},i)}),--u||r(e)});return o.e&&i(o.v),e.promise},race:function(t){var n=this,e=P(n),r=e.reject,i=w(function(){d(t,!1,function(t){n.resolve(t).then(e.resolve,r)})});return i.e&&r(i.v),e.promise}})},function(t,n,e){"use strict";var r=e(117),i=e(46);e(60)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,n,e){"use strict";var r=e(0),i=e(61),o=e(90),u=e(1),a=e(36),s=e(8),c=e(4),f=e(2).ArrayBuffer,l=e(59),h=o.ArrayBuffer,p=o.DataView,v=i.ABV&&f.isView,d=h.prototype.slice,y=i.VIEW;r(r.G+r.W+r.F*(f!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return v&&v(t)||c(t)&&y in t}}),r(r.P+r.U+r.F*e(3)(function(){return!new h(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,n){if(void 0!==d&&void 0===n)return d.call(u(this),t);for(var e=u(this).byteLength,r=a(t,e),i=a(void 0===n?e:n,e),o=new(l(this,h))(s(i-r)),c=new p(this),f=new p(o),v=0;r=e.length)return{value:void 0,done:!0}}while(!((t=e[n._i++])in n._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,n,e){function r(t,n){var e,a,f=arguments.length<3?t:arguments[2];return c(t)===f?t[n]:(e=i.f(t,n))?u(e,"value")?e.value:void 0!==e.get?e.get.call(f):void 0:s(a=o(t))?r(a,n,f):void 0}var i=e(16),o=e(17),u=e(11),a=e(0),s=e(4),c=e(1);a(a.S,"Reflect",{get:r})},function(t,n,e){var r=e(16),i=e(0),o=e(1);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return r.f(o(t),n)}})},function(t,n,e){var r=e(0),i=e(17),o=e(1);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,e){var r=e(0),i=e(1),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{ownKeys:e(119)})},function(t,n,e){var r=e(0),i=e(1),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,n,e){function r(t,n,e){var s,h,p=arguments.length<4?t:arguments[3],v=o.f(f(t),n);if(!v){if(l(h=u(t)))return r(h,n,e,p);v=c(0)}return a(v,"value")?!(!1===v.writable||!l(p))&&(s=o.f(p,n)||c(0),s.value=e,i.f(p,n,s),!0):void 0!==v.set&&(v.set.call(p,e),!0)}var i=e(7),o=e(16),u=e(17),a=e(11),s=e(0),c=e(32),f=e(1),l=e(4);s(s.S,"Reflect",{set:r})},function(t,n,e){var r=e(0),i=e(70);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,n){i.check(t,n);try{return i.set(t,n),!0}catch(t){return!1}}})},function(t,n,e){"use strict";var r=e(0),i=e(52)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(30)("includes")},function(t,n,e){"use strict";var r=e(0),i=e(120),o=e(9),u=e(8),a=e(10),s=e(84);r(r.P,"Array",{flatMap:function(t){var n,e,r=o(this);return a(t),n=u(r.length),e=s(r,0),i(e,r,r,n,0,1,t,arguments[1]),e}}),e(30)("flatMap")},function(t,n,e){"use strict";var r=e(0),i=e(120),o=e(9),u=e(8),a=e(24),s=e(84);r(r.P,"Array",{flatten:function(){var t=arguments[0],n=o(this),e=u(n.length),r=s(n,0);return i(r,n,n,e,0,void 0===t?1:a(t)),r}}),e(30)("flatten")},function(t,n,e){"use strict";var r=e(0),i=e(76)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,n,e){"use strict";var r=e(0),i=e(121),o=e(91);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(o),"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,n,e){"use strict";var r=e(0),i=e(121),o=e(91);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(o),"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,n,e){"use strict";e(44)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,n,e){"use strict";e(44)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,n,e){"use strict";var r=e(0),i=e(23),o=e(8),u=e(55),a=e(57),s=RegExp.prototype,c=function(t,n){this._r=t,this._s=n};e(78)(c,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(i(this),!u(t))throw TypeError(t+" is not a regexp!");var n=String(this),e="flags"in s?String(t.flags):a.call(t),r=new RegExp(t.source,~e.indexOf("g")?e:"g"+e);return r.lastIndex=o(t.lastIndex),new c(r,n)}})},function(t,n,e){e(66)("asyncIterator")},function(t,n,e){e(66)("observable")},function(t,n,e){var r=e(0),i=e(119),o=e(15),u=e(16),a=e(82);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var n,e,r=o(t),s=u.f,c=i(r),f={},l=0;c.length>l;)void 0!==(e=s(r,n=c[l++]))&&a(f,n,e);return f}})},function(t,n,e){var r=e(0),i=e(122)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,n,e){var r=e(0),i=e(122)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,n,e){"use strict";var r=e(0),i=e(9),o=e(10),u=e(7);e(6)&&r(r.P+e(62),"Object",{__defineGetter__:function(t,n){u.f(i(this),t,{get:o(n),enumerable:!0,configurable:!0})}})},function(t,n,e){"use strict";var r=e(0),i=e(9),o=e(10),u=e(7);e(6)&&r(r.P+e(62),"Object",{__defineSetter__:function(t,n){u.f(i(this),t,{set:o(n),enumerable:!0,configurable:!0})}})},function(t,n,e){"use strict";var r=e(0),i=e(9),o=e(22),u=e(17),a=e(16).f;e(6)&&r(r.P+e(62),"Object",{__lookupGetter__:function(t){var n,e=i(this),r=o(t,!0);do{if(n=a(e,r))return n.get}while(e=u(e))}})},function(t,n,e){"use strict";var r=e(0),i=e(9),o=e(22),u=e(17),a=e(16).f;e(6)&&r(r.P+e(62),"Object",{__lookupSetter__:function(t){var n,e=i(this),r=o(t,!0);do{if(n=a(e,r))return n.set}while(e=u(e))}})},function(t,n,e){var r=e(0);r(r.P+r.R,"Map",{toJSON:e(123)("Map")})},function(t,n,e){var r=e(0);r(r.P+r.R,"Set",{toJSON:e(123)("Set")})},function(t,n,e){e(63)("Map")},function(t,n,e){e(63)("Set")},function(t,n,e){e(63)("WeakMap")},function(t,n,e){e(63)("WeakSet")},function(t,n,e){e(64)("Map")},function(t,n,e){e(64)("Set")},function(t,n,e){e(64)("WeakMap")},function(t,n,e){e(64)("WeakSet")},function(t,n,e){var r=e(0);r(r.G,{global:e(2)})},function(t,n,e){var r=e(0);r(r.S,"System",{global:e(2)})},function(t,n,e){var r=e(0),i=e(19);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{clamp:function(t,n,e){return Math.min(e,Math.max(n,t))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,n,e){var r=e(0),i=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*i}})},function(t,n,e){var r=e(0),i=e(125),o=e(105);r(r.S,"Math",{fscale:function(t,n,e,r,u){return o(i(t,n,e,r,u))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{iaddh:function(t,n,e,r){var i=t>>>0,o=n>>>0,u=e>>>0;return o+(r>>>0)+((i&u|(i|u)&~(i+u>>>0))>>>31)|0}})},function(t,n,e){var r=e(0);r(r.S,"Math",{isubh:function(t,n,e,r){var i=t>>>0,o=n>>>0,u=e>>>0;return o-(r>>>0)-((~i&u|~(i^u)&i-u>>>0)>>>31)|0}})},function(t,n,e){var r=e(0);r(r.S,"Math",{imulh:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r,u=e>>16,a=r>>16,s=(u*o>>>0)+(i*o>>>16);return u*a+(s>>16)+((i*a>>>0)+(65535&s)>>16)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,n,e){var r=e(0),i=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*i}})},function(t,n,e){var r=e(0);r(r.S,"Math",{scale:e(125)})},function(t,n,e){var r=e(0);r(r.S,"Math",{umulh:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r,u=e>>>16,a=r>>>16,s=(u*o>>>0)+(i*o>>>16);return u*a+(s>>>16)+((i*a>>>0)+(65535&s)>>>16)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,n,e){"use strict";var r=e(0),i=e(21),o=e(2),u=e(59),a=e(112);r(r.P+r.R,"Promise",{finally:function(t){var n=u(this,i.Promise||o.Promise),e="function"==typeof t;return this.then(e?function(e){return a(n,t()).then(function(){return e})}:t,e?function(e){return a(n,t()).then(function(){throw e})}:t)}})},function(t,n,e){"use strict";var r=e(0),i=e(89),o=e(111);r(r.S,"Promise",{try:function(t){var n=i.f(this),e=o(t);return(e.e?n.reject:n.resolve)(e.v),n.promise}})},function(t,n,e){var r=e(28),i=e(1),o=r.key,u=r.set;r.exp({defineMetadata:function(t,n,e,r){u(t,n,i(e),o(r))}})},function(t,n,e){var r=e(28),i=e(1),o=r.key,u=r.map,a=r.store;r.exp({deleteMetadata:function(t,n){var e=arguments.length<3?void 0:o(arguments[2]),r=u(i(n),e,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var s=a.get(n);return s.delete(e),!!s.size||a.delete(n)}})},function(t,n,e){var r=e(28),i=e(1),o=e(17),u=r.has,a=r.get,s=r.key,c=function(t,n,e){if(u(t,n,e))return a(t,n,e);var r=o(n);return null!==r?c(t,r,e):void 0};r.exp({getMetadata:function(t,n){return c(t,i(n),arguments.length<3?void 0:s(arguments[2]))}})},function(t,n,e){var r=e(115),i=e(124),o=e(28),u=e(1),a=e(17),s=o.keys,c=o.key,f=function(t,n){var e=s(t,n),o=a(t);if(null===o)return e;var u=f(o,n);return u.length?e.length?i(new r(e.concat(u))):u:e};o.exp({getMetadataKeys:function(t){return f(u(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,n,e){var r=e(28),i=e(1),o=r.get,u=r.key;r.exp({getOwnMetadata:function(t,n){return o(t,i(n),arguments.length<3?void 0:u(arguments[2]))}})},function(t,n,e){var r=e(28),i=e(1),o=r.keys,u=r.key;r.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:u(arguments[1]))}})},function(t,n,e){var r=e(28),i=e(1),o=e(17),u=r.has,a=r.key,s=function(t,n,e){if(u(t,n,e))return!0;var r=o(n);return null!==r&&s(t,r,e)};r.exp({hasMetadata:function(t,n){return s(t,i(n),arguments.length<3?void 0:a(arguments[2]))}})},function(t,n,e){var r=e(28),i=e(1),o=r.has,u=r.key;r.exp({hasOwnMetadata:function(t,n){return o(t,i(n),arguments.length<3?void 0:u(arguments[2]))}})},function(t,n,e){var r=e(28),i=e(1),o=e(10),u=r.key,a=r.set;r.exp({metadata:function(t,n){return function(e,r){a(t,n,(void 0!==r?i:o)(e),u(r))}}})},function(t,n,e){var r=e(0),i=e(88)(),o=e(2).process,u="process"==e(19)(o);r(r.G,{asap:function(t){var n=u&&o.domain;i(n?n.bind(t):t)}})},function(t,n,e){"use strict";var r=e(0),i=e(2),o=e(21),u=e(88)(),a=e(5)("observable"),s=e(10),c=e(1),f=e(40),l=e(42),h=e(12),p=e(41),v=p.RETURN,d=function(t){return null==t?void 0:s(t)},y=function(t){var n=t._c;n&&(t._c=void 0,n())},g=function(t){return void 0===t._o},m=function(t){g(t)||(t._o=void 0,y(t))},b=function(t,n){c(t),this._c=void 0,this._o=t,t=new w(this);try{var e=n(t),r=e;null!=e&&("function"==typeof e.unsubscribe?e=function(){r.unsubscribe()}:s(e),this._c=e)}catch(n){return void t.error(n)}g(this)&&y(this)};b.prototype=l({},{unsubscribe:function(){m(this)}});var w=function(t){this._s=t};w.prototype=l({},{next:function(t){var n=this._s;if(!g(n)){var e=n._o;try{var r=d(e.next);if(r)return r.call(e,t)}catch(t){try{m(n)}finally{throw t}}}},error:function(t){var n=this._s;if(g(n))throw t;var e=n._o;n._o=void 0;try{var r=d(e.error);if(!r)throw t;t=r.call(e,t)}catch(t){try{y(n)}finally{throw t}}return y(n),t},complete:function(t){var n=this._s;if(!g(n)){var e=n._o;n._o=void 0;try{var r=d(e.complete);t=r?r.call(e,t):void 0}catch(t){try{y(n)}finally{throw t}}return y(n),t}}});var x=function(t){f(this,x,"Observable","_f")._f=s(t)};l(x.prototype,{subscribe:function(t){return new b(t,this._f)},forEach:function(t){var n=this;return new(o.Promise||i.Promise)(function(e,r){s(t);var i=n.subscribe({next:function(n){try{return t(n)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e})})}}),l(x,{from:function(t){var n="function"==typeof this?this:x,e=d(c(t)[a]);if(e){var r=c(e.call(t));return r.constructor===n?r:new n(function(t){return r.subscribe(t)})}return new n(function(n){var e=!1;return u(function(){if(!e){try{if(p(t,!1,function(t){if(n.next(t),e)return v})===v)return}catch(t){if(e)throw t;return void n.error(t)}n.complete()}}),function(){e=!0}})},of:function(){for(var t=0,n=arguments.length,e=new Array(n);t2,i=!!r&&u.call(arguments,2);return t(r?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,e)}};i(i.G+i.B+i.F*a,{setTimeout:s(r.setTimeout),setInterval:s(r.setInterval)})},function(t,n,e){var r=e(0),i=e(87);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,n,e){for(var r=e(86),i=e(35),o=e(13),u=e(2),a=e(12),s=e(45),c=e(5),f=c("iterator"),l=c("toStringTag"),h=s.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=i(p),d=0;d=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=m.call(i,"catchLoc"),a=m.call(i,"finallyLoc");if(u&&a){if(this.prev=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),h(e),j}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;h(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,e){return this.delegate={iterator:v(t),resultName:n,nextLoc:e},"next"===this.method&&(this.arg=y),j}}}("object"==typeof n?n:"object"==typeof window?window:"object"==typeof self?self:this)}).call(n,e(47))},function(t,n,e){e(329),t.exports=e(21).RegExp.escape},function(t,n,e){var r=e(0),i=e(330)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return i(t)}})},function(t,n){t.exports=function(t,n){var e=n===Object(n)?function(t){return n[t]}:n;return function(n){return String(n).replace(t,e)}}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e(126),e(127);var i=e(31),o=r(i),u=e(336),a=r(u),s=e(337),c=r(s),f=e(345),l=r(f);if(window.onload=function(){var t=new o.default.Game(l.default.gameWidth,l.default.gameHeight,o.default.AUTO,"game");t.state.add("play",c.default),t.state.add("loading",a.default),t.state.start("loading")},window.cordova){({initialize:function(){document.addEventListener("deviceready",this.onDeviceReady.bind(this),!1)},onDeviceReady:function(){this.receivedEvent("deviceready"),window.game.state.start("Boot")},receivedEvent:function(t){console.log("Received Event: "+t)}}).initialize()}},,,,,function(t,n,e){"use strict";function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,n){for(var e=0;e0){n.animations.play("jump");this.hero.jump(900)&&this.sfx.spring.play()}}},{key:"onHeroVsFinish",value:function(t,n){this.sfx.finish.play(),n.animations.play("open"),t.freeze(),this.game.add.tween(t).to({x:940,alpha:0},500,null,!0).onComplete.addOnce(this.goToNextLevel,this)}},{key:"goToNextLevel",value:function(){this.camera.fade("#000000"),this.camera.onFadeComplete.addOnce(function(){this.game.state.restart(!0,!1,{level:this.level+1,score:this.score+1e3})},this)}},{key:"loadLevel",value:function(t){this.bgDecoration=this.game.add.group(),this.rings=this.game.add.group(),this.enemies=this.game.add.group(),this.enemyWalls=this.game.add.group(),this.enemyWalls.visible=!1,this.movingBlocks=this.game.add.group(),this.fireball=this.game.add.group(),this.lava=this.game.add.group(),this.spring=this.game.add.group(),this.spike=this.game.add.group(),this.platforms=this.game.add.group(),this.finish=this.game.add.group(),this.spawnCharacters({hero:t.hero,enemies:t.enemies}),t.platforms.forEach(this.spawnPlatform,this),t.movingBlocks.forEach(this.spawnMovingBlocks,this),t.lava.forEach(this.spawnLava,this),t.spring.forEach(this.spawnSpring,this),t.rings.forEach(this.spawnRings,this),this.spawnSpike({spike:t.spike}),this.spawnFireball({fireball:t.fireball}),this.spawnFinish({finish:t.finish}),t.decoration.forEach(function(t){this.bgDecoration.add(this.game.add.image(t.x,t.y,"decoration",t.frame))},this),this.game.physics.arcade.gravity.y=1200}},{key:"createHud",value:function(){this.scoreText=this.game.add.retroFont("font:letters",14,17,"SCORINGTME",10),this.timeText=this.game.add.retroFont("font:letters",14,17,"SCORINGTME",10),this.ringText=this.game.add.retroFont("font:letters",14,17,"SCORINGTME",10),this.scoreNumber=this.game.add.retroFont("font:numbers",14,17,"0123456789:",11),this.timeNumber=this.game.add.retroFont("font:numbers",14,17,"0123456789:",11),this.ringNumber=this.game.add.retroFont("font:numbers",14,17,"0123456789:",11),this.scoreText.text="SCORE",this.timeText.text="TIME",this.ringText.text="RINGS";var t=this.game.make.image(50,25,this.scoreText),n=this.game.make.image(50,25,this.timeText),e=this.game.make.image(50,25,this.ringText),r=this.game.make.image(50,25,this.scoreNumber),i=this.game.make.image(50,25,this.timeNumber),o=this.game.make.image(50,25,this.ringNumber);this.hud=this.game.add.group(),this.hud.add(t),this.hud.add(n),this.hud.add(e),this.hud.add(r),this.hud.add(i),this.hud.add(o),this.hud.position.set(10,10),this.hud.children[0].position.set(20,20),this.hud.children[1].position.set(20,50),this.hud.children[2].position.set(20,80),this.hud.children[3].position.set(140,20),this.hud.children[4].position.set(100,50),this.hud.children[5].position.set(140,80),console.log(this.hud.children[3])}}]),n}(l.default);n.default=p},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,n){for(var e=0;e0?(this.body.velocity.x=100,this.body.velocity.y=-100):(this.body.velocity.x=-100,this.body.velocity.y=-100)),this.body.velocity.x=200*t,this.body.velocity.x<0?this.scale.x=-1:this.body.velocity.x>0&&(this.scale.x=1))}},{key:"jump",value:function(t){var n=this.body.touching.down&&this.alive&&!this.isFrozen&&!this.hurt;return(n||this.isBoosting)&&(this.body.velocity.y=-t||-550,this.isBoosting=!0),n}},{key:"stopJumpBoost",value:function(){this.isBoosting=!1}},{key:"bounce",value:function(){this.body.velocity.y=-200}},{key:"injure",value:function(){var t=this;this.invincible=!0,this.hurt=!0,setTimeout(function(){t.hurt=!1},500),setTimeout(function(){t.invincible=!1},2e3)}},{key:"update",value:function(){var t=this._getAnimationName();this.animations.name!==t&&this.animations.play(t)}},{key:"freeze",value:function(){this.body.enable=!1,this.isFrozen=!0}},{key:"die",value:function(){var t=this;this.alive=!1,this.body.enable=!1,this.animations.play("die").onComplete.addOnce(function(){setTimeout(function(){t.kill()},750)})}},{key:"_getAnimationName",value:function(){var t="stop";return this.alive?this.isFrozen?t="stop":this.hurt?t="hurt":this.body.velocity.y<0||this.body.velocity.y>0?t="jump":this.body.velocity.x>0&&this.body.touching.down?t="run-right":this.body.velocity.x<0&&this.body.touching.down&&(t="run-left"):t="die",t}}]),n}(s.default.Sprite);n.default=c},function(t,n,e){"use strict";function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function i(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}function o(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function t(t,n){for(var e=0;ethis.maxHeight&&(this.body.velocity.y=-this.startVelocity,this.scale.y=1)}}]),n}(s.default.Sprite);n.default=c},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.LEVEL_COUNT=3},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={gameWidth:960,gameHeight:600}}],[128]); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Sonic the Hedgehog 7 | 8 | 9 | 10 | 11 | 12 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sonic-the-Hedgehog", 3 | "version": "1.0.0", 4 | "description": "", 5 | "author": "", 6 | "main": "index.js", 7 | "scripts": { 8 | "dev": "webpack", 9 | "deploy": "webpack --config webpack.production.config.js", 10 | "cordova": "webpack --config webpack.cordova.config.js", 11 | "test": "eslint './src/**/*.js'" 12 | }, 13 | "license": "MIT", 14 | "devDependencies": { 15 | "babel-core": "^6.26.3", 16 | "babel-eslint": "^8.2.1", 17 | "babel-loader": "^7.1.2", 18 | "babel-polyfill": "^6.26.0", 19 | "babel-preset-env": "^1.7.0", 20 | "browser-sync": "^2.26.3", 21 | "browser-sync-webpack-plugin": "^2.0.1", 22 | "clean-webpack-plugin": "^0.1.18", 23 | "copy-webpack-plugin": "^4.4.1", 24 | "cordova": "^8.1.2", 25 | "eslint": "^4.17.0", 26 | "eslint-config-standard": "^10.2.1", 27 | "eslint-plugin-import": "^2.8.0", 28 | "eslint-plugin-node": "^6.0.0", 29 | "eslint-plugin-promise": "^3.6.0", 30 | "eslint-plugin-standard": "^3.0.1", 31 | "expose-loader": "^0.7.4", 32 | "html-webpack-plugin": "^2.30.1", 33 | "webpack": "^3.11.0" 34 | }, 35 | "dependencies": { 36 | "cordova-android": "^7.1.1", 37 | "cordova-browser": "^5.0.4", 38 | "cordova-ios": "^4.5.5", 39 | "cordova-plugin-whitelist": "^1.3.3", 40 | "lodash": "^4.17.11", 41 | "phaser-ce": "^2.10.0", 42 | "webfontloader": "^1.6.28" 43 | }, 44 | "cordova": { 45 | "platforms": [ 46 | "android", 47 | "browser", 48 | "ios" 49 | ], 50 | "plugins": { 51 | "cordova-plugin-whitelist": {} 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | gameWidth: 960, 3 | gameHeight: 600 4 | } 5 | -------------------------------------------------------------------------------- /src/constants/constants.js: -------------------------------------------------------------------------------- 1 | export const LEVEL_COUNT = 3 2 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Sonic the Hedgehog 7 | 8 | 9 | 10 | 11 | 12 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import 'pixi' 2 | import 'p2' 3 | import Phaser from 'phaser' 4 | 5 | import LoadingState from './states/LoadingState' 6 | import PlayState from './states/PlayState' 7 | 8 | import config from './config' 9 | 10 | window.onload = function () { 11 | let game = new Phaser.Game(config.gameWidth, config.gameHeight, Phaser.AUTO, 'game') 12 | game.state.add('play', PlayState) 13 | game.state.add('loading', LoadingState) 14 | game.state.start('loading') 15 | } 16 | 17 | if (window.cordova) { 18 | var app = { 19 | initialize: function () { 20 | document.addEventListener( 21 | 'deviceready', 22 | this.onDeviceReady.bind(this), 23 | false 24 | ) 25 | }, 26 | 27 | // deviceready Event Handler 28 | // 29 | onDeviceReady: function () { 30 | this.receivedEvent('deviceready') 31 | 32 | // When the device is ready, start Phaser Boot state. 33 | window.game.state.start('Boot') 34 | }, 35 | 36 | receivedEvent: function (id) { 37 | console.log('Received Event: ' + id) 38 | } 39 | } 40 | 41 | app.initialize() 42 | } 43 | -------------------------------------------------------------------------------- /src/sprites/Block.js: -------------------------------------------------------------------------------- 1 | import Phaser from 'phaser' 2 | 3 | export default class Block extends Phaser.Sprite { 4 | constructor (game, x, y) { 5 | super(game, x, y, 'block') 6 | this.game.physics.enable(this) 7 | this.body.collideWorldBounds = true 8 | this.body.allowGravity = false 9 | this.body.immovable = true 10 | this.body.velocity.x = 100 11 | } 12 | update () { 13 | // check against walls and reverse direction if necessary 14 | if (this.body.touching.right || this.body.blocked.right) { 15 | this.body.velocity.x = -100 // turn left 16 | } else if (this.body.touching.left || this.body.blocked.left) { 17 | this.body.velocity.x = 100 // turn right 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/sprites/Enemy.js: -------------------------------------------------------------------------------- 1 | import Phaser from 'phaser' 2 | 3 | export default class Enemy extends Phaser.Sprite { 4 | constructor (game, x, y, image, gravity) { 5 | super(game, x, y, image) 6 | this.anchor.set(0.5) 7 | this.game.physics.enable(this) 8 | this.body.collideWorldBounds = true 9 | this.body.allowGravity = gravity 10 | this.body.velocity.x = 100 11 | // animations 12 | this.animations.add('move', [0, 1, 2], 8, true) 13 | this.animations.add('die', [3, 3], 6) 14 | this.animations.play('move') 15 | } 16 | 17 | update () { 18 | // check against walls and reverse direction if necessary 19 | if (this.body.touching.right || this.body.blocked.right) { 20 | this.body.velocity.x = -100 // turn left 21 | this.scale.x = -1 22 | } else if (this.body.touching.left || this.body.blocked.left) { 23 | this.body.velocity.x = 100 // turn right 24 | this.scale.x = 1 25 | } 26 | } 27 | 28 | die () { 29 | this.body.enable = false 30 | this.animations.play('die').onComplete.addOnce(() => this.kill()) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/sprites/Fireball.js: -------------------------------------------------------------------------------- 1 | import Phaser from 'phaser' 2 | 3 | export default class Fireball extends Phaser.Sprite { 4 | constructor (game, x, y, height, velocity) { 5 | super(game, x, y, 'fireball') 6 | this.anchor.set(0.5) 7 | this.maxHeight = y 8 | this.minHeight = y - height 9 | this.startVelocity = velocity 10 | this.game.physics.enable(this) 11 | this.body.allowGravity = false 12 | this.body.immovable = true 13 | this.body.collideWorldBounds = true 14 | this.body.velocity.y = velocity 15 | // animations 16 | this.animations.add('fire', [0]) 17 | this.animations.play('fire') 18 | } 19 | 20 | update () { 21 | if (this.y < this.minHeight) { 22 | this.body.velocity.y = Math.abs(this.startVelocity) 23 | this.scale.y = -1 24 | } else if (this.y > this.maxHeight) { 25 | this.body.velocity.y = -this.startVelocity 26 | this.scale.y = 1 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/sprites/Hero.js: -------------------------------------------------------------------------------- 1 | import Phaser from 'phaser' 2 | 3 | export default class Hero extends Phaser.Sprite { 4 | constructor (game, x, y) { 5 | super(game, x, y, 'hero') 6 | this.invincible = false 7 | this.hurt = false 8 | this.anchor.set(0.5, 0.5) 9 | // physics properties 10 | this.game.physics.enable(this) 11 | this.body.collideWorldBounds = true 12 | // animations 13 | this.animations.add('stop', [0]) 14 | this.animations.add('run-right', [1, 2], 8, true) 15 | this.animations.add('run-left', [1, 2], 8, true) 16 | this.animations.add('jump', [4, 5, 6, 7], 12, true) 17 | this.animations.add('die', [8]) 18 | this.animations.add('hurt', [9]) // 12fps no loop 19 | this.animations.play('stop') 20 | } 21 | move (direction) { 22 | // guard 23 | if (this.isFrozen) { 24 | return 25 | } 26 | if (this.hurt) { 27 | if (this.body.velocity.x > 0) { 28 | this.body.velocity.x = 100 29 | this.body.velocity.y = -100 30 | } else { 31 | this.body.velocity.x = -100 32 | this.body.velocity.y = -100 33 | } 34 | } 35 | this.body.velocity.x = direction * 200 36 | // update image flipping & animations 37 | if (this.body.velocity.x < 0) { 38 | this.scale.x = -1 39 | } else if (this.body.velocity.x > 0) { 40 | this.scale.x = 1 41 | } 42 | } 43 | 44 | jump (springSpeed) { 45 | let canJump = this.body.touching.down && this.alive && !this.isFrozen && !this.hurt 46 | const JUMP_SPEED = 550 47 | if (canJump || this.isBoosting) { 48 | this.body.velocity.y = -springSpeed || -JUMP_SPEED 49 | this.isBoosting = true 50 | } 51 | return canJump 52 | } 53 | 54 | stopJumpBoost () { 55 | this.isBoosting = false 56 | } 57 | 58 | bounce () { 59 | this.body.velocity.y = -200 60 | } 61 | 62 | injure () { 63 | this.invincible = true 64 | this.hurt = true 65 | setTimeout(() => { 66 | this.hurt = false 67 | }, 500) 68 | setTimeout(() => { 69 | this.invincible = false 70 | }, 2000) 71 | } 72 | 73 | update () { 74 | // update sprite animation, if it needs changing 75 | let animationName = this._getAnimationName() 76 | if (this.animations.name !== animationName) { 77 | this.animations.play(animationName) 78 | } 79 | } 80 | 81 | freeze () { 82 | this.body.enable = false 83 | this.isFrozen = true 84 | } 85 | 86 | die () { 87 | this.alive = false 88 | this.body.enable = false 89 | this.animations.play('die').onComplete.addOnce(() => { 90 | setTimeout(() => { 91 | this.kill() 92 | }, 750) 93 | }) 94 | } 95 | 96 | _getAnimationName () { 97 | let name = 'stop' // default animation 98 | if (!this.alive) { 99 | name = 'die' 100 | } else if (this.isFrozen) { 101 | name = 'stop' 102 | } else if (this.hurt) { 103 | name = 'hurt' 104 | } else if (this.body.velocity.y < 0 || this.body.velocity.y > 0) { 105 | name = 'jump' 106 | } else if (this.body.velocity.x > 0 && this.body.touching.down) { 107 | name = 'run-right' 108 | } else if (this.body.velocity.x < 0 && this.body.touching.down) { 109 | name = 'run-left' 110 | } 111 | return name 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /src/sprites/Spike.js: -------------------------------------------------------------------------------- 1 | import Phaser from 'phaser' 2 | 3 | export default class Spike extends Phaser.Sprite { 4 | constructor (game, x, y, image) { 5 | super(game, x, y, image) 6 | this.anchor.set(0.5) 7 | this.spikeUp = true 8 | this.game.physics.enable(this) 9 | this.body.allowGravity = false 10 | this.body.immovable = true 11 | this.game.time.events.loop(1500, this.updateSpike, this) 12 | } 13 | 14 | updateSpike () { 15 | if (this.spikeUp) { 16 | this.position.y -= 30 17 | this.spikeUp = false 18 | } else { 19 | this.position.y += 30 20 | this.spikeUp = true 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/states/LoadingState.js: -------------------------------------------------------------------------------- 1 | export default class LoadingState { 2 | init () { 3 | this.game.renderer.renderSession.roundPixels = true 4 | } 5 | 6 | preload () { 7 | // json 8 | this.game.load.json('level:0', '../../assets/data/level00.json') 9 | this.game.load.json('level:1', '../../assets/data/level01.json') 10 | this.game.load.json('level:2', '../../assets/data/level02.json') 11 | // images 12 | this.game.load.image('font:numbers', '../../assets/images/numbers.png') 13 | this.game.load.image('font:letters', '../../assets/images/letters.png') 14 | this.game.load.image('background', '../../assets/images/background.png') 15 | this.game.load.image('invisible-wall', '../../assets/images/invisible_wall.png') 16 | this.game.load.image('stone:16x1', '../../assets/images/stone16x1.png') 17 | this.game.load.image('stone:8x1', '../../assets/images/stone8x1.png') 18 | this.game.load.image('stone:4x1', '../../assets/images/stone4x1.png') 19 | this.game.load.image('stone:2x1', '../../assets/images/stone2x1.png') 20 | this.game.load.image('stone:1x1', '../../assets/images/stone1x1.png') 21 | this.game.load.image('block', '../../assets/images/block.png') 22 | this.game.load.image('finish-static', '../../assets/images/finish-static.png') 23 | this.game.load.image('spike', '../../assets/images/spike1.png') 24 | this.game.load.image('spike3', '../../assets/images/spike3.png') 25 | this.game.load.image('fireball', '../../assets/images/fireball.png', 15, 32) 26 | // animations 27 | this.game.load.spritesheet('hero', '../../assets/images/hero.png', 32, 42) 28 | this.game.load.spritesheet('bug', '../../assets/images/bug.png', 40, 30) 29 | this.game.load.spritesheet('bat', '../../assets/images/bat.png', 30, 30) 30 | this.game.load.spritesheet('ring', '../../assets/images/ring.png', 16, 16) 31 | this.game.load.spritesheet('finish', '../../assets/images/finish.png', 45, 64) 32 | this.game.load.spritesheet('spring', '../../assets/images/spring.png', 28, 16) 33 | this.game.load.spritesheet('lava', '../../assets/images/lava.png', 42, 42) 34 | 35 | // audio 36 | this.game.load.audio('sfx:jump', '../../assets/audio/jump.wav') 37 | this.game.load.audio('sfx:spring', '../../assets/audio/spring.wav') 38 | this.game.load.audio('sfx:ring', '../../assets/audio/ring.wav') 39 | this.game.load.audio('sfx:pop', '../../assets/audio/pop.wav') 40 | this.game.load.audio('sfx:finish', '../../assets/audio/finish.wav') 41 | this.game.load.audio('sfx:dead', '../../assets/audio/dead.wav') 42 | this.game.load.audio('bgm', '../../assets/audio/bck.mp3') 43 | this.game.load.audio('sfx:hurt', '../../assets/audio/hurt.wav') 44 | } 45 | 46 | create () { 47 | this.game.state.start('play', true, false, { 48 | level: 0 49 | }) 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/states/PlayState.js: -------------------------------------------------------------------------------- 1 | import Phaser from 'phaser' 2 | 3 | import SpriteState from './SpriteState' 4 | import {LEVEL_COUNT} from '../constants/constants' 5 | 6 | export default class PlayState extends SpriteState { 7 | init (data) { 8 | this.keys = this.game.input.keyboard.addKeys({ 9 | left: Phaser.KeyCode.LEFT, 10 | right: Phaser.KeyCode.RIGHT, 11 | up: Phaser.KeyCode.UP 12 | }) 13 | this.ringCount = 0 14 | this.score = 0 15 | this.level = (data.level || 0) % LEVEL_COUNT 16 | this.timeCount = 0 17 | this.bgm = this.game.add.audio('bgm') 18 | this.bgm.loopFull() 19 | } 20 | 21 | create () { 22 | // fade in (from black) 23 | this.camera.flash('#000000') 24 | // create sound entities 25 | this.sfx = { 26 | jump: this.game.add.audio('sfx:jump'), 27 | spring: this.game.add.audio('sfx:spring'), 28 | ring: this.game.add.audio('sfx:ring'), 29 | pop: this.game.add.audio('sfx:pop'), 30 | finish: this.game.add.audio('sfx:finish'), 31 | hurt: this.game.add.audio('sfx:hurt'), 32 | dead: this.game.add.audio('sfx:dead') 33 | } 34 | 35 | // create level entities and decoration 36 | this.game.add.image(0, 0, 'background') 37 | this.loadLevel(this.game.cache.getJSON(`level:${this.level}`)) 38 | // Start time 39 | this.game.time.events.loop(Phaser.Timer.SECOND, this.updateTime, this) 40 | // create UI score boards 41 | this.createHud() 42 | } 43 | 44 | updateTime () { 45 | this.timeCount++ 46 | } 47 | 48 | formatTime () { 49 | let mins = Math.floor(this.timeCount / 60) 50 | let secs = this.timeCount % 60 51 | if (secs < 10) { 52 | secs = '0' + secs 53 | } 54 | let formatted = mins + ':' + secs 55 | return formatted 56 | } 57 | 58 | update () { 59 | this.handleCollisions() 60 | this.handleInput() 61 | // update scoreboards 62 | this.scoreNumber.text = `${this.score}` 63 | this.ringNumber.text = `${this.ringCount}` 64 | this.timeNumber.text = `${this.formatTime()}` 65 | } 66 | 67 | shutdown () { 68 | this.bgm.stop() 69 | } 70 | 71 | handleCollisions () { 72 | this.game.physics.arcade.collide(this.enemies, this.platforms) 73 | this.game.physics.arcade.collide(this.enemies, this.enemyWalls) 74 | this.game.physics.arcade.collide(this.hero, this.platforms) 75 | this.game.physics.arcade.collide(this.hero, this.movingBlocks) 76 | this.game.physics.arcade.collide(this.movingBlocks, this.platforms) 77 | this.game.physics.arcade.collide(this.movingBlocks, this.movingBlocks) 78 | 79 | // collision: hero vs enemies (kill or die) 80 | this.game.physics.arcade.overlap(this.hero, this.enemies, 81 | this.onHeroVsEnemy, null, this) 82 | // collision: lava 83 | this.game.physics.arcade.collide(this.hero, this.lava, 84 | this.handleDamage, null, this) 85 | // collision: spring 86 | this.game.physics.arcade.overlap(this.hero, this.spring, 87 | this.onHeroVsSpring, null, this) 88 | // collision: fireball 89 | this.game.physics.arcade.overlap(this.hero, this.fireball, 90 | this.handleDamage, null, this) 91 | // collision: spikes 92 | this.game.physics.arcade.overlap(this.hero, this.spike, 93 | this.handleDamage, null, this) 94 | // collision: rings 95 | this.game.physics.arcade.overlap(this.hero, this.rings, this.onHeroVsRing, 96 | null, this) 97 | // collision: finish 98 | this.game.physics.arcade.overlap(this.hero, this.finish, this.onHeroVsFinish, 99 | // ignore if there is no key or the player is on air 100 | function (hero, finish) { 101 | return hero.body.touching.down 102 | }, this) 103 | } 104 | 105 | handleInput () { 106 | if (this.keys.left.isDown) { // move hero left 107 | this.hero.move(-1) 108 | } else if (this.keys.right.isDown) { // move hero right 109 | this.hero.move(1) 110 | } else { // stop 111 | this.hero.move(0) 112 | } 113 | // handle jump 114 | if (this.keys.up.downDuration(200)) { 115 | let didJump = this.hero.jump() 116 | didJump ? this.sfx.jump.play() : this.hero.stopJumpBoost() 117 | } 118 | } 119 | 120 | onHeroVsRing (hero, ring) { 121 | this.sfx.ring.play() 122 | ring.kill() 123 | this.ringCount++ 124 | } 125 | 126 | handleDamage (hero) { 127 | if (this.ringCount === 0 && !hero.invincible) { 128 | hero.die() 129 | this.sfx.dead.play() 130 | hero.events.onKilled.addOnce(() => { 131 | this.game.state.restart(true, false, { 132 | level: this.level 133 | }) 134 | }) 135 | } else if (hero.invincible) { 136 | 137 | } else { 138 | this.ringCount = 0 139 | hero.injure() 140 | this.sfx.hurt.play() 141 | } 142 | } 143 | 144 | onHeroVsEnemy (hero, enemy) { 145 | // the hero can kill enemies when is falling (after a jump, or a fall) 146 | if (hero.body.velocity.y !== 0) { 147 | enemy.die() 148 | hero.bounce() 149 | this.sfx.pop.play() 150 | this.score += 100 151 | } else { 152 | this.handleDamage(hero) 153 | // NOTE: bug in phaser in which it modifies 'touching' when 154 | // checking for overlaps. This undoes that change so enemies don't 155 | // 'bounce' agains the hero 156 | enemy.body.touching = enemy.body.wasTouching 157 | } 158 | } 159 | 160 | onHeroVsSpring (hero, spring) { 161 | if (hero.body.velocity.y > 0) { 162 | spring.animations.play('jump') 163 | let didJump = this.hero.jump(900) 164 | if (didJump) { 165 | this.sfx.spring.play() 166 | } 167 | } 168 | } 169 | 170 | onHeroVsFinish (hero, finish) { 171 | this.sfx.finish.play() 172 | finish.animations.play('open') 173 | // play animation and change to the next level when it ends 174 | hero.freeze() 175 | this.game.add.tween(hero) 176 | .to({ 177 | x: 940, 178 | alpha: 0 179 | }, 500, null, true) 180 | .onComplete.addOnce(this.goToNextLevel, this) 181 | } 182 | 183 | goToNextLevel () { 184 | this.camera.fade('#000000') 185 | this.camera.onFadeComplete.addOnce(function () { 186 | // change to next level 187 | this.game.state.restart(true, false, { 188 | level: this.level + 1, 189 | score: this.score + 1000 190 | }) 191 | }, this) 192 | } 193 | 194 | loadLevel (data) { 195 | // create all the groups/layers that we need 196 | this.bgDecoration = this.game.add.group() 197 | this.rings = this.game.add.group() 198 | this.enemies = this.game.add.group() 199 | this.enemyWalls = this.game.add.group() 200 | this.enemyWalls.visible = false 201 | this.movingBlocks = this.game.add.group() 202 | this.fireball = this.game.add.group() 203 | this.lava = this.game.add.group() 204 | this.spring = this.game.add.group() 205 | this.spike = this.game.add.group() 206 | this.platforms = this.game.add.group() 207 | this.finish = this.game.add.group() 208 | // spawn 209 | this.spawnCharacters({ 210 | hero: data.hero, 211 | enemies: data.enemies 212 | }) 213 | data.platforms.forEach(this.spawnPlatform, this) 214 | data.movingBlocks.forEach(this.spawnMovingBlocks, this) 215 | data.lava.forEach(this.spawnLava, this) 216 | data.spring.forEach(this.spawnSpring, this) 217 | data.rings.forEach(this.spawnRings, this) 218 | this.spawnSpike({ 219 | spike: data.spike 220 | }) 221 | this.spawnFireball({ 222 | fireball: data.fireball 223 | }) 224 | this.spawnFinish({ 225 | finish: data.finish 226 | }) 227 | data.decoration.forEach(function (deco) { 228 | this.bgDecoration.add( 229 | this.game.add.image(deco.x, deco.y, 'decoration', deco.frame)) 230 | }, this) 231 | 232 | // enable gravity 233 | this.game.physics.arcade.gravity.y = 1200 234 | } 235 | 236 | createHud () { 237 | const NUMBERS_STR = '0123456789:' 238 | const LETTERS_STR = 'SCORINGTME' 239 | this.scoreText = this.game.add.retroFont('font:letters', 14, 17, LETTERS_STR, 10) 240 | this.timeText = this.game.add.retroFont('font:letters', 14, 17, LETTERS_STR, 10) 241 | this.ringText = this.game.add.retroFont('font:letters', 14, 17, LETTERS_STR, 10) 242 | this.scoreNumber = this.game.add.retroFont('font:numbers', 14, 17, NUMBERS_STR, 11) 243 | this.timeNumber = this.game.add.retroFont('font:numbers', 14, 17, NUMBERS_STR, 11) 244 | this.ringNumber = this.game.add.retroFont('font:numbers', 14, 17, NUMBERS_STR, 11) 245 | 246 | this.scoreText.text = `SCORE` 247 | this.timeText.text = `TIME` 248 | this.ringText.text = `RINGS` 249 | 250 | let scoreTextImage = this.game.make.image(50, 25, this.scoreText) 251 | let timeTextImage = this.game.make.image(50, 25, this.timeText) 252 | let ringsTextImage = this.game.make.image(50, 25, this.ringText) 253 | let scoreNumberImage = this.game.make.image(50, 25, this.scoreNumber) 254 | let timeNumberImage = this.game.make.image(50, 25, this.timeNumber) 255 | let ringsNumberImage = this.game.make.image(50, 25, this.ringNumber) 256 | 257 | this.hud = this.game.add.group() 258 | this.hud.add(scoreTextImage) 259 | this.hud.add(timeTextImage) 260 | this.hud.add(ringsTextImage) 261 | this.hud.add(scoreNumberImage) 262 | this.hud.add(timeNumberImage) 263 | this.hud.add(ringsNumberImage) 264 | 265 | this.hud.position.set(10, 10) 266 | this.hud.children[0].position.set(20, 20) 267 | this.hud.children[1].position.set(20, 50) 268 | this.hud.children[2].position.set(20, 80) 269 | this.hud.children[3].position.set(140, 20) 270 | this.hud.children[4].position.set(100, 50) 271 | this.hud.children[5].position.set(140, 80) 272 | console.log(this.hud.children[3]) 273 | } 274 | } 275 | -------------------------------------------------------------------------------- /src/states/SpriteState.js: -------------------------------------------------------------------------------- 1 | import Hero from '../sprites/Hero' 2 | import Spike from '../sprites/Spike' 3 | import Enemy from '../sprites/Enemy' 4 | import Block from '../sprites/Block' 5 | import Fireball from '../sprites/Fireball' 6 | 7 | export default class SpriteState { 8 | spawnCharacters (data) { 9 | // spawn enemies 10 | data.enemies.forEach(function (enemy) { 11 | let sprite = new Enemy(this.game, enemy.x, enemy.y, enemy.image, enemy.gravity) 12 | this.enemies.add(sprite) 13 | }, this) 14 | // spawn hero 15 | this.hero = new Hero(this.game, data.hero.x, data.hero.y) 16 | this.game.add.existing(this.hero) 17 | } 18 | 19 | spawnPlatform (platform) { 20 | let sprite = this.platforms.create(platform.x, platform.y, platform.image) 21 | // physics for platform sprites 22 | this.game.physics.enable(sprite) 23 | sprite.body.allowGravity = false 24 | sprite.body.immovable = true 25 | // spawn invisible walls at each side, only detectable by enemies 26 | this.spawnEnemyWall(platform.x, platform.y, 'left') 27 | this.spawnEnemyWall(platform.x + sprite.width, platform.y, 'right') 28 | } 29 | 30 | spawnMovingBlocks (block) { 31 | let sprite = new Block(this.game, block.x, block.y) 32 | this.movingBlocks.add(sprite) 33 | } 34 | 35 | spawnLava (lava) { 36 | let sprite = this.lava.create(lava.x, lava.y, lava.image) 37 | this.game.physics.enable(sprite) 38 | sprite.body.allowGravity = false 39 | sprite.body.immovable = true 40 | // animations 41 | sprite.animations.add('flow', [0, 1, 2], 6, true) 42 | sprite.animations.play('flow') 43 | } 44 | 45 | spawnFireball (data) { 46 | data.fireball.forEach(function (ball) { 47 | let sprite = new Fireball(this.game, ball.x, ball.y, ball.height, ball.velocity) 48 | this.fireball.add(sprite) 49 | }, this) 50 | } 51 | 52 | spawnSpike (data) { 53 | data.spike.forEach(function (s) { 54 | let sprite = new Spike(this.game, s.x, s.y, s.image) 55 | this.spike.add(sprite) 56 | }, this) 57 | } 58 | 59 | spawnEnemyWall (x, y, side) { 60 | let sprite = this.enemyWalls.create(x, y, 'invisible-wall') 61 | // anchor and y displacement 62 | sprite.anchor.set(side === 'left' ? 1 : 0, 1) 63 | this.game.physics.enable(sprite) 64 | sprite.body.immovable = true 65 | sprite.body.allowGravity = false 66 | } 67 | 68 | spawnRings (ring) { 69 | let sprite = this.rings.create(ring.x, ring.y, 'ring') 70 | sprite.anchor.set(0.5, 0.5) 71 | this.game.physics.enable(sprite) 72 | sprite.body.allowGravity = false 73 | // animations 74 | sprite.animations.add('rotate', [0, 1, 2, 1], 6, true) 75 | sprite.animations.play('rotate') 76 | } 77 | 78 | spawnFinish (data) { 79 | let sprite = this.finish.create(data.finish.x, data.finish.y, 'finish') 80 | this.game.physics.enable(sprite) 81 | sprite.anchor.setTo(0.5, 1) 82 | sprite.body.allowGravity = false 83 | sprite.animations.add('open', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) 84 | } 85 | 86 | spawnSpring (spring) { 87 | let sprite = this.spring.create(spring.x, spring.y, 'spring') 88 | this.game.physics.enable(sprite) 89 | sprite.body.allowGravity = false 90 | sprite.animations.add('jump', [0, 1, 0], 12) 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | export const centerGameObjects = (objects) => { 2 | objects.forEach(function (object) { 3 | object.anchor.setTo(0.5) 4 | }) 5 | } 6 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var webpack = require('webpack') 3 | var HtmlWebpackPlugin = require('html-webpack-plugin') 4 | var BrowserSyncPlugin = require('browser-sync-webpack-plugin') 5 | 6 | // Phaser webpack config 7 | var phaserModule = path.join(__dirname, '/node_modules/phaser-ce/') 8 | var phaser = path.join(phaserModule, 'build/custom/phaser-split.js') 9 | var pixi = path.join(phaserModule, 'build/custom/pixi.js') 10 | var p2 = path.join(phaserModule, 'build/custom/p2.js') 11 | 12 | var definePlugin = new webpack.DefinePlugin({ 13 | __DEV__: JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true')) 14 | }) 15 | 16 | module.exports = { 17 | entry: { 18 | app: [ 19 | 'babel-polyfill', 20 | path.resolve(__dirname, 'src/main.js') 21 | ], 22 | vendor: ['pixi', 'p2', 'phaser', 'webfontloader'] 23 | }, 24 | devtool: 'cheap-source-map', 25 | output: { 26 | pathinfo: true, 27 | path: path.resolve(__dirname, 'dist'), 28 | publicPath: './dist/', 29 | filename: 'bundle.js' 30 | }, 31 | watch: true, 32 | plugins: [ 33 | definePlugin, 34 | new webpack.optimize.CommonsChunkPlugin({ name: 'vendor'/* chunkName= */, filename: 'vendor.bundle.js'/* filename= */}), 35 | new HtmlWebpackPlugin({ 36 | filename: '../index.html', 37 | template: './src/index.html', 38 | chunks: ['vendor', 'app'], 39 | chunksSortMode: 'manual', 40 | minify: { 41 | removeAttributeQuotes: false, 42 | collapseWhitespace: false, 43 | html5: false, 44 | minifyCSS: false, 45 | minifyJS: false, 46 | minifyURLs: false, 47 | removeComments: false, 48 | removeEmptyAttributes: false 49 | }, 50 | hash: false 51 | }), 52 | new BrowserSyncPlugin({ 53 | host: process.env.IP || 'localhost', 54 | port: process.env.PORT || 3000, 55 | server: { 56 | baseDir: ['./', './build'] 57 | } 58 | }) 59 | ], 60 | module: { 61 | rules: [ 62 | { test: /\.js$/, use: ['babel-loader'], include: path.join(__dirname, 'src') }, 63 | { test: /pixi\.js/, use: ['expose-loader?PIXI'] }, 64 | { test: /phaser-split\.js$/, use: ['expose-loader?Phaser'] }, 65 | { test: /p2\.js/, use: ['expose-loader?p2'] } 66 | ] 67 | }, 68 | node: { 69 | fs: 'empty', 70 | net: 'empty', 71 | tls: 'empty' 72 | }, 73 | resolve: { 74 | alias: { 75 | 'phaser': phaser, 76 | 'pixi': pixi, 77 | 'p2': p2 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /webpack.cordova.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var webpack = require('webpack') 3 | var CleanWebpackPlugin = require('clean-webpack-plugin') 4 | var HtmlWebpackPlugin = require('html-webpack-plugin') 5 | var CopyWebpackPlugin = require('copy-webpack-plugin') 6 | 7 | // Phaser webpack config 8 | var phaserModule = path.join(__dirname, '/node_modules/phaser-ce/') 9 | var phaser = path.join(phaserModule, 'build/custom/phaser-split.js') 10 | var pixi = path.join(phaserModule, 'build/custom/pixi.js') 11 | var p2 = path.join(phaserModule, 'build/custom/p2.js') 12 | 13 | var definePlugin = new webpack.DefinePlugin({ 14 | __DEV__: JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'false')) 15 | }) 16 | 17 | module.exports = { 18 | entry: { 19 | app: [ 20 | 'babel-polyfill', 21 | path.resolve(__dirname, 'src/main.js') 22 | ], 23 | vendor: ['pixi', 'p2', 'phaser', 'webfontloader'] 24 | 25 | }, 26 | output: { 27 | path: path.resolve(__dirname, 'www/dist'), 28 | publicPath: './dist/', 29 | filename: 'bundle.js' 30 | }, 31 | plugins: [ 32 | definePlugin, 33 | new CleanWebpackPlugin(['www']), 34 | new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), 35 | new webpack.optimize.UglifyJsPlugin({ 36 | drop_console: true, 37 | minimize: true, 38 | output: { 39 | comments: false 40 | } 41 | }), 42 | new webpack.optimize.CommonsChunkPlugin({ name: 'vendor'/* chunkName= */, filename: 'vendor.bundle.js'/* filename= */}), 43 | new CopyWebpackPlugin([ 44 | { 45 | from: path.resolve(__dirname, 'assets/**/*'), 46 | to: path.resolve(__dirname, 'www') 47 | } 48 | ]), 49 | new HtmlWebpackPlugin({ 50 | filename: path.resolve(__dirname, 'www/index.html'), 51 | template: './src/index.html', 52 | chunks: [ 53 | 'vendor', 'app' 54 | ], 55 | chunksSortMode: 'manual', 56 | minify: { 57 | removeAttributeQuotes: true, 58 | collapseWhitespace: true, 59 | html5: true, 60 | minifyCSS: true, 61 | minifyJS: true, 62 | minifyURLs: true, 63 | removeComments: true, 64 | removeEmptyAttributes: true 65 | }, 66 | hash: true 67 | }) 68 | ], 69 | module: { 70 | rules: [ 71 | { test: /\.js$/, use: ['babel-loader'], include: path.join(__dirname, 'src') }, 72 | { test: /pixi\.js/, use: ['expose-loader?PIXI'] }, 73 | { test: /phaser-split\.js$/, use: ['expose-loader?Phaser'] }, 74 | { test: /p2\.js/, use: ['expose-loader?p2'] } 75 | ] 76 | }, 77 | node: { 78 | fs: 'empty', 79 | net: 'empty', 80 | tls: 'empty' 81 | }, 82 | resolve: { 83 | alias: { 84 | 'phaser': phaser, 85 | 'pixi': pixi, 86 | 'p2': p2 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /webpack.production.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var webpack = require('webpack') 3 | var CleanWebpackPlugin = require('clean-webpack-plugin') 4 | var HtmlWebpackPlugin = require('html-webpack-plugin') 5 | var CopyWebpackPlugin = require('copy-webpack-plugin') 6 | 7 | // Phaser webpack config 8 | var phaserModule = path.join(__dirname, '/node_modules/phaser-ce/') 9 | var phaser = path.join(phaserModule, 'build/custom/phaser-split.js') 10 | var pixi = path.join(phaserModule, 'build/custom/pixi.js') 11 | var p2 = path.join(phaserModule, 'build/custom/p2.js') 12 | 13 | var definePlugin = new webpack.DefinePlugin({ 14 | __DEV__: JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'false')) 15 | }) 16 | 17 | module.exports = { 18 | entry: { 19 | app: [ 20 | 'babel-polyfill', 21 | path.resolve(__dirname, 'src/main.js') 22 | ], 23 | vendor: ['pixi', 'p2', 'phaser', 'webfontloader'] 24 | 25 | }, 26 | output: { 27 | path: path.resolve(__dirname, 'build'), 28 | publicPath: './', 29 | filename: 'js/bundle.js' 30 | }, 31 | plugins: [ 32 | definePlugin, 33 | new CleanWebpackPlugin(['build']), 34 | new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), 35 | new webpack.optimize.UglifyJsPlugin({ 36 | drop_console: true, 37 | minimize: true, 38 | output: { 39 | comments: false 40 | } 41 | }), 42 | new webpack.optimize.CommonsChunkPlugin({ name: 'vendor' /* chunkName= */ , filename: 'js/vendor.bundle.js' /* filename= */ }), 43 | new HtmlWebpackPlugin({ 44 | filename: 'index.html', // path.resolve(__dirname, 'build', 'index.html'), 45 | template: './src/index.html', 46 | chunks: ['vendor', 'app'], 47 | chunksSortMode: 'manual', 48 | minify: { 49 | removeAttributeQuotes: true, 50 | collapseWhitespace: true, 51 | html5: true, 52 | minifyCSS: true, 53 | minifyJS: true, 54 | minifyURLs: true, 55 | removeComments: true, 56 | removeEmptyAttributes: true 57 | }, 58 | hash: true 59 | }), 60 | new CopyWebpackPlugin([ 61 | { from: 'assets', to: 'assets' } 62 | ]) 63 | ], 64 | module: { 65 | rules: [ 66 | { test: /\.js$/, use: ['babel-loader'], include: path.join(__dirname, 'src') }, 67 | { test: /pixi\.js/, use: ['expose-loader?PIXI'] }, 68 | { test: /phaser-split\.js$/, use: ['expose-loader?Phaser'] }, 69 | { test: /p2\.js/, use: ['expose-loader?p2'] } 70 | ] 71 | }, 72 | node: { 73 | fs: 'empty', 74 | net: 'empty', 75 | tls: 'empty' 76 | }, 77 | resolve: { 78 | alias: { 79 | 'phaser': phaser, 80 | 'pixi': pixi, 81 | 'p2': p2 82 | } 83 | } 84 | } 85 | --------------------------------------------------------------------------------