-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsrc.2797f5c9.js
90 lines (90 loc) · 54.4 KB
/
src.2797f5c9.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"G3dB":[function(require,module,exports) {
var global = arguments[3];
var t=arguments[3];function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){var o=window;return"object"!==e(o.__GameState__)&&(o.__GameState__=t||{}),o.__GameState__}Object.defineProperty(exports,"__esModule",{value:!0}),exports.State=void 0,exports.State=o;
},{}],"hIne":[function(require,module,exports) {
"use strict";function r(r,e,o){return r*(1-o)+e*o}function e(r){return new Audio(r)}function o(r){var e=new Image;return e.src=r,e}function t(r){return new Promise(function(e,o){var t=new Image;t.onload=function(){return e(t)},t.src=r})}function n(r,e){for(var o=0;o<r.length;o++){for(var t=r[o],n=o-1;n>-1&&r[n][e]>t[e];n--)r[n+1]=r[n];r[n+1]=t}return r}function a(r,e){return Math.floor(Math.random()*(e-r+1))+r}function u(r,e,o){return(r-e.min)*(o.max-o.min)/(e.max-e.min)+o.min}function s(r){for(var e,o,t=r.length;0!==t;)o=Math.floor(Math.random()*t),e=r[t-=1],r[t]=r[o],r[o]=e;return r}function i(r){return Math.floor(Math.random()*r.length)}function p(r){return r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function m(r,e){void 0===e&&(e=!0);var o=r.reduce(function(r,e){return r+e},0)/r.length;return e?Math.floor(o):o}Object.defineProperty(exports,"__esModule",{value:!0}),exports.average=exports.numberWithCommas=exports.randomFromArray=exports.shuffle=exports.convertRange=exports.randomInteger=exports.insertionSort=exports.preloadImage=exports.loadImage=exports.loadAudio=exports.lerp=void 0,exports.lerp=r,exports.loadAudio=e,exports.loadImage=o,exports.preloadImage=t,exports.insertionSort=n,exports.randomInteger=a,exports.convertRange=u,exports.shuffle=s,exports.randomFromArray=i,exports.numberWithCommas=p,exports.average=m;
},{}],"BHZy":[function(require,module,exports) {
module.exports={real_news:[{title:"Why crocodiles have changed so little!",content:"Learn why crocodiles haven't evolved for centuries.",theme:"education",fake:!1},{title:"Scientists discover new galaxy!",content:"Telescope captures new images of the new galaxy.",theme:"education",fake:!1},{title:"Scientists discover new Comet!",content:"It is very bright and fast",theme:"education",fake:!1},{title:"Hubble observes young Supernova",content:"Find out why the star exploded.",theme:"education",fake:!1},{title:"Create your own garden at home",content:"Create true BIO food.",theme:"education",fake:!1},{title:"First time black hole captured on film",content:"New discovery from scientists.",theme:"education",fake:!1},{title:"Why there are craters on moon?",content:"Find out how they are made.",theme:"education",fake:!1},{title:"New species of bats discoverd",content:"Where and who are they?",theme:"education",fake:!1},{title:"SpaceX launches humanas to the ISS",content:"How did they got there?",theme:"education",fake:!1},{title:"New mineral Kernowite discovered in UK",content:"It look super coool.",theme:"education",fake:!1},{title:"Why you should drink tea.",content:"Benefits of tea.",theme:"education",fake:!1},{title:"Why volcanos erupt?",content:"Find out here.",theme:"education",fake:!1},{title:"U.S. Elections!",content:"In a week we will know who will be the new president of the United States!",theme:"politics",fake:!1},{title:"President elected",content:"After recent president election, the winner takes position",theme:"politics",fake:!1},{title:"New President rules",content:"New Statement from president came out!",theme:"politics",fake:!1},{title:"Britain post Brexit",content:"What has been effected by it?",theme:"politics",fake:!1},{title:"Migrants stuck in Bosnia",content:"What made it happen?",theme:"politics",fake:!1},{title:"Trump impeached again",content:"1st president to get impeached twice!",theme:"politics",fake:!1},{title:"Dutch cabiner resigns",content:"Why it happened?",theme:"politics",fake:!1},{title:"Vaccine for Covid-19 have been released",content:"Will finaly covid be beaten?",theme:"politics",fake:!1},{title:"G7 Summit in UK",content:"What will they discuss?",theme:"politics",fake:!1},{title:"German farmers prostest",content:"New policy make them really mad",theme:"politics",fake:!1},{title:"Finlands prime minister got asaulted",content:"Is there any reason?",theme:"politics",fake:!1},{title:"Second assult on USA Capitol might happen",content:"Why is it happening?",theme:"politics",fake:!1},{title:"New NBA Champions!",content:"The Los Angeles Lakers defeated the Miami Heat 4-1, to become the 2020 NBA Champions ",theme:"sport",fake:!1},{title:"New SuperBowl Champions!",content:"The Kansas City Chiefs defeated the San Francisco 49ers, 31-20",theme:"sport",fake:!1},{title:"Kobe Bryant is now dead",content:"The very popular hall of fame basketball player died in a helicopter accident",theme:"sport",fake:!1},{title:"Lionel Messi won 2019 Ballon d'Or",content:"Barcelona captain earned his sixth, thus making history by surpassing Cristiano Ronaldo (5)",theme:"sport",fake:!1},{title:"Wayne Rooney Retires From Playing, Becomes Derby County's Permanent Coach",content:"All-time record scorer for England and Manchester United. A haul of 16 trophies. Wayne Rooney’s illustrious playing career is over.",theme:"sport",fake:!1},{title:"Francisco Lindor's trade to the Mets",content:"How will this affect the famous baseball player's reputation?.",theme:"sport",fake:!1},{title:"Kevin Durant to sign contract with a basketball club Brooklyn Nets",content:"The announcement was shared on the Instagram account for The Boardroom, Durant's new series for ESPN's streaming service, ESPN+.",theme:"sport",fake:!1},{title:"Two-time golf major winner Angel Cabrera arrested in Brazil",content:"Federal Police in Brazil have arrested golfer Angel Cabrera on an Interpol red notice for alleged crimes committed in Argentina.",theme:"sport",fake:!1},{title:"Michelle Wie West's retirement thoughts changed by having a baby girl",content:"Why did famous female golf player change her mind?",theme:"sport",fake:!1},{title:"Petra Vlhova crowned 'Snow Queen'",content:"Slovakia's Petra Vlhova was crowned 'Snow Queen' of Zagreb for the second straight year after claiming the World Cup slalom event",theme:"sport",fake:!1},{title:"After 30 league games without a win, Schalke stops the rot with 4-0 victory",content:"Having last won a German Bundesliga game just under a year ago, Schalke ended that dismal record in some style on Saturday",theme:"sport",fake:!1},{title:"'Avengers: Endgame' Become No. 1 Grossing Film of All Time",content:"Through Friday, Avengers: Endgame's global gross was $2.7892 billion, $500,000 behind Avatar's $2.7897 billion.",theme:"films",fake:!1},{title:"‘Black Panther’ Is Now The #3 All-Time Movie In Box Office History",content:"Black Panther finished Friday with a domestic total of $659.3 million.",theme:"films",fake:!1},{title:"Justice League Will Release As A Movie, Not A TV Show",content:"Zack Snyder's upcoming director's cut of Justice League will be a movie, not a mini-series like what was previously announced, says Snyder.",theme:"films",fake:!1},{title:"‘Frozen II’ is now the highest grossing animated movie of all time",content:"The film has garnered $1.32 billion since its release in November.",theme:"films",fake:!1},{title:"Moana Animated Series Is Coming to Disney+ in 2023",content:"A Disney+ series that will continue the adventures of Moana is now being developed.",theme:"films",fake:!1},{title:"Godzilla vs Kong Release Date Moves Up Two Months!",content:"HBO Max release on May 21",theme:"films",fake:!1},{title:"'The Boss Baby' sequel release delayed to September 2021",content:"Universal Pictures and DreamWorks Animation are delaying the release of The Boss Baby sequel.",theme:"films",fake:!1},{title:"A Tom and Jerry movie for release in theaters next year",content:"New movie scheduled for release in theaters in 2021.",theme:"films",fake:!1},{title:"Minions beats Toy Story 3 as second highest grossing animation",content:"'Minions' is officially the second-highest grossing animated movie of all time.",theme:"films",fake:!1},{title:"New ‘Star Wars’ Movie",content:"from Patty Jenkins Announced: ‘Rogue Squadron’ for Christmas 2023",theme:"films",fake:!1},{title:"'Coming 2 America' sequel to be released on Amazon in March",content:"Amazon Studios has acquired worldwide rights to the sequel to the iconic comedy 'Coming to America'.",theme:"films",fake:!1},{title:"The Incredibles 2 is coming to Netflix!",content:"The Incredibles 2 is coming to Netflix across multiple Netflix regions in 2019.",theme:"films",fake:!1},{title:"Space-Jam will premiere on HBO-MAX",content:"It's day-and-date release pushed up from May 21 to March 26.",theme:"films",fake:!1},{title:"The Netflix original series ‘Disenchantment’ returned for a third season!",content:"the Netflix animated, action-adventure comedy first premiered in 2018 ",theme:"films",fake:!1},{title:"Cyberpunk 2077 released!",content:"One of the best upcoming games has been finaly released.",theme:"gaming",fake:!1},{title:"New Spider-man game",content:"The new Spider-man game is out, but is it good?",theme:"gaming",fake:!1},{title:"Zelda Breath of the Wild 2 announced ",content:"Nintendo released a trailer of Zelda BOTW 2, and it's awesome",theme:"gaming",fake:!1},{title:"Sims 4 is getting another expansion",content:"This time it's about paranormal activity, so expect some haunted houses!",theme:"gaming",fake:!1},{title:"Star wars: Battlefront 2 servers crashed",content:"The servers crashed due to the rise in popularity of the game",theme:"gaming",fake:!1},{title:"Steam winter sale ends soon",content:"Quick grab some game on cheap price!",theme:"gaming",fake:!1},{title:"The most downlowded mobile game of 2020",content:"The most downloaded mobile game of 2020 was Among Us - surprised?",theme:"gaming",fake:!1},{title:"Pokemon GO one of the most grossing games of 2020",content:"Despite COVID-19 the game made 2 billion in revenue",theme:"gaming",fake:!1},{title:"A lot of Playstation 5 games announced",content:"Which one will you play first?",theme:"gaming",fake:!1},{title:"God of War 2 in development",content:"What changes will there be?",theme:"gaming",fake:!1},{title:"More than 2 billion tweets about gaming in 2020",content:"That's a new record for gaming - what will this bring?",theme:"gaming",fake:!1},{title:"Gaming PC sales sky high due to quarantine",content:"2020 was the best year for PC gaming, with many new users",theme:"gaming",fake:!1},{title:"EA now not the only company to make Star Wars games",content:"This might mean that new and cool Star Wars games are on the way!",theme:"gaming",fake:!1},{title:"League of Legends new character announced",content:"Viego the Ruined King will be added to League of Legends soon",theme:"gaming",fake:!1},{title:"New HALO game delayed",content:"It looked bad, so they delayed it.",theme:"gaming",fake:!1},{title:"Lil Pump has made new song!",content:"The new song is titled Adidas Gang",theme:"music",fake:!1},{title:"Grammys delayed due Covid-19",content:"Due to Covid-19 pandemic, grammy awards are delayed!",theme:"music",fake:!1},{title:"New James Bond music is top class.",content:"Song titled NO.TIME.TO.DIE brings new light into Jame bond films!.",theme:"music",fake:!1},{title:"All I want for christmas - best song of generation?",content:"Will there ever be end to it?",theme:"music",fake:!1},{title:"Dr. Dre in Hospital!",content:"What happened and should you be woried?",theme:"music",fake:!1},{title:"New Ed Sheeran album released",content:"What now he has to offer?",theme:"music",fake:!1},{title:"21 savage let's Twitch streamers use his music",content:"Despite the oppritunity to make a lot of money, he chose to let people use it",theme:"music",fake:!1},{title:"Drake declared the best artist of 2020",content:"Out of millions of musicians, Drake stands on top",theme:"music",fake:!1},{title:"Dua Lipa releases new song",content:"The new song Dancing In The Dark is getting good reviews",theme:"music",fake:!1},{title:"Spotify Wrapped 2020 is out",content:"What was your most listened to artist?",theme:"music",fake:!1},{title:"Billie Eilish new book announced",content:"It will feature never before seen Photos",theme:"music",fake:!1},{title:"Lil Nas X's old town road becomes most certified song in history",content:"The song hit platinum status 14 times, the first to do so in History",theme:"music",fake:!1},{title:"Arianna Grande engaged with Dalton Gomez",content:"The pop star announced the engagment in the sweetest way possible",theme:"music",fake:!1},{title:"The Weeknd did plastic surgery",content:"It looks so bad....",theme:"music",fake:!1},{title:"BTS new album 'BE'",content:"The new album has a song for every mood",theme:"music",fake:!1}],fake_news:[{title:"School is cancelled FOREVER",content:"The president decided that fun is more important than education",theme:"FakeNews",fake:!0},{title:"Stop drinking water",content:"Scientists have found that all the water once was in the dinosaurs!",theme:"FakeNews",fake:!0},{title:"Earn 5000 $ a day",content:"With EARN MONEY application you can become a millionaire!",theme:"FakeNews",fake:!0},{title:"The moon has disappeared",content:"The moon is no longer in the sky, find out why",theme:"FakeNews",fake:!0},{title:"The NBA has disbanded",content:"After finding a cockroach on the field, the NBA disbaneded",theme:"FakeNews",fake:!0},{title:"Humans found on saturn",content:"Some guy from Florida found on Saturn with telescope",theme:"FakeNews",fake:!0},{title:"UFO crash landed in Amsterdam",content:"Aliens? Some crazy guy from Rotterdam? Who knows!",theme:"FakeNews",fake:!0},{title:"Water to Wine transfer device",content:"Scientists made a device that makes Water into Wine",theme:"FakeNews",fake:!0},{title:"All video games now are free",content:"Every persons dream has come true?",theme:"FakeNews",fake:!0},{title:"Math banned from schools in the Netherlands",content:"Politicians figured noone needs math anyways",theme:"FakeNews",fake:!0},{title:"Cave man music won Grammy",content:"Music from ages ago won a award for being amazing",theme:"FakeNews",fake:!0},{title:"New USA president is real life Bat-Man",content:"New conspiracy theory of the President being Bat-Man",theme:"FakeNews",fake:!0},{title:"France and UK colonize Mars",content:"Is this history all over again?",theme:"FakeNews",fake:!0},{title:"History was wrong: dinosaurs still exist",content:"Secret underground society of dinosaurs have made contact with humans",theme:"FakeNews",fake:!0},{title:"New EASY cure to Covid-19",content:"Click here to find out. What is it.",theme:"FakeNews",fake:!0},{title:"New iPhone 13 revealed",content:"Apple revealed the new iPhone 13 - only 3000$!",theme:"FakeNews",fake:!0},{title:"Masks don't work",content:"Do masks work? Do they???? Maybe?!",theme:"FakeNews",fake:!0},{title:"UK becomes monarchy again!",content:"Queen take control of the country",theme:"FakeNews",fake:!0},{title:"Youtube changes name to - videos",content:"Youtube is now called Videos, weird right?",theme:"FakeNews",fake:!0},{title:"Time Travel discovered in Area 51",content:"After the Area 51 raid, someone found Time Travel",theme:"FakeNews",fake:!0},{title:"TikTok banned in the EU",content:"Following USA, the EU decided to ban TikTok",theme:"FakeNews",fake:!0},{title:"Free Wi-Fi all over the world!",content:"Get free Wi-Fi everywhere, it's just 19.99!",theme:"FakeNews",fake:!0},{title:"Cartoons are now BANNED in Germany",content:"For no reason every type of cartoon banned in Germany",theme:"FakeNews",fake:!0},{title:"Chocolate is actually healthy?",content:"Scientists say Chocolate is healthier than vegetables",theme:"FakeNews",fake:!0},{title:"This method can cure any wound!",content:"Press to find out about it.",theme:"FakeNews",fake:!0},{title:"Free way to get iphone fast",content:"Find out about it here.",theme:"FakeNews",fake:!0}]};
},{}],"n6mK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./state"),t=e.State();window.addEventListener("resize",function(){t.element.width=window.innerWidth*window.devicePixelRatio,t.element.height=window.innerHeight*window.devicePixelRatio}),t.element.addEventListener("mousemove",function(e){var n=t.element.getBoundingClientRect();t.mouseX=(e.clientX-n.left)/(n.right-n.left)*t.element.width,t.mouseY=(e.clientY-n.top)/(n.bottom-n.top)*t.element.height}),t.element.addEventListener("mousedown",function(){t.mouseDown=!0}),t.element.addEventListener("mouseup",function(){t.mouseDown=!1});
},{"./state":"G3dB"}],"tRIU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.requestTimeout=exports.requestInterval=void 0;var e=require("./state"),t=e.State();function r(e,r){void 0===r&&(r=0);var n=Date.now(),i=0,o=!1;return function u(){var a=Date.now();if(!o){if(t.paused)return n=a,void window.requestAnimationFrame(u);i+=a-n,n=a,i>=r&&(e(),i=0),window.requestAnimationFrame(u)}}(),function(e){e?r=e:o=!0}}function n(e,r){void 0===r&&(r=0);var n=Date.now(),i=0,o=!1;return function u(){var a=Date.now();if(!o){if(t.paused)return n=a,void window.requestAnimationFrame(u);i+=a-n,n=a,i>=r?e():window.requestAnimationFrame(u)}}(),function(){o=!0}}exports.requestInterval=r,exports.requestTimeout=n;
},{"./state":"G3dB"}],"gnKw":[function(require,module,exports) {
module.exports="/fish-shadow.14f346a6.png";
},{}],"Mdlr":[function(require,module,exports) {
module.exports="/music.6efa5c7b.mp3";
},{}],"Zpuc":[function(require,module,exports) {
module.exports="/pop.4c239ac7.mp3";
},{}],"flvT":[function(require,module,exports) {
module.exports="/move.96f51ce3.mp3";
},{}],"vQhj":[function(require,module,exports) {
module.exports="/paper.10b2d75b.mp3";
},{}],"Utwc":[function(require,module,exports) {
module.exports="/click.9a04ff20.mp3";
},{}],"DErg":[function(require,module,exports) {
module.exports="/click2.04f7e8ad.mp3";
},{}],"l3VZ":[function(require,module,exports) {
module.exports="/speach.f7cf0a67.mp3";
},{}],"Egya":[function(require,module,exports) {
module.exports="/siren.12ca259b.mp3";
},{}],"qIAE":[function(require,module,exports) {
module.exports="/sad.c3397cb0.mp3";
},{}],"Tr3j":[function(require,module,exports) {
module.exports="/caramelldensen.e63c1453.mp3";
},{}],"U4Cs":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.playCaramelldansen=exports.restartMusic=exports.stopMusic=exports.startMusic=exports.playSadSound=exports.playSirenSound=exports.playPaperSound=exports.playMoveSound=exports.playSpeachSound=exports.playClick2Sound=exports.playClickSound=exports.playPopSound=void 0;for(var o=require("./timers"),u=e(require("../sounds/music.mp3")),r=e(require("../sounds/pop.mp3")),p=e(require("../sounds/move.mp3")),n=e(require("../sounds/paper.mp3")),a=e(require("../sounds/click.mp3")),s=e(require("../sounds/click2.mp3")),t=e(require("../sounds/speach.mp3")),l=e(require("../sounds/siren.mp3")),i=e(require("../sounds/sad.mp3")),d=e(require("../sounds/caramelldensen.mp3")),c=new Audio(u.default),m=0,y=[],f=0;f<5;f++)y.push(new Audio(r.default));function v(){var e=y[m];o.requestTimeout(function(){e.volume=.1,e.play(),(m+=1)>=y.length&&(m=0)},20)}function x(){var e=new Audio(a.default);e.volume=.1,e.play()}function S(){var e=new Audio(s.default);e.volume=.1,e.play()}function q(){var e=new Audio(t.default);e.volume=.1,e.play()}function w(){var e=new Audio(p.default);e.volume=.6,e.play()}function A(){var e=new Audio(n.default);e.volume=.5,e.play()}function M(){var e=new Audio(l.default);e.volume=.3,e.play()}function h(){var e=new Audio(i.default);e.volume=.4,e.play()}function k(){c.volume=.5,c.loop=!0,c.play()}function C(){c.pause(),c.currentTime=0}function _(){c.pause(),c.currentTime=0,c.play()}function P(){C();var e=new Audio(d.default);e.volume=1,e.loop=!0,e.play()}exports.playPopSound=v,exports.playClickSound=x,exports.playClick2Sound=S,exports.playSpeachSound=q,exports.playMoveSound=w,exports.playPaperSound=A,exports.playSirenSound=M,exports.playSadSound=h,exports.startMusic=k,exports.stopMusic=C,exports.restartMusic=_,exports.playCaramelldansen=P;
},{"./timers":"tRIU","../sounds/music.mp3":"Mdlr","../sounds/pop.mp3":"Zpuc","../sounds/move.mp3":"flvT","../sounds/paper.mp3":"vQhj","../sounds/click.mp3":"Utwc","../sounds/click2.mp3":"DErg","../sounds/speach.mp3":"l3VZ","../sounds/siren.mp3":"Egya","../sounds/sad.mp3":"qIAE","../sounds/caramelldensen.mp3":"Tr3j"}],"N76B":[function(require,module,exports) {
"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Fish=void 0;var i=require("../state"),e=require("../timers"),h=require("../utils"),s=t(require("../../sprites/fish-shadow.png")),r=require("../audio"),a=h.loadImage(s.default),n=i.State(),d=document.getElementById("fish"),p=function(){function t(t,i){this.type="fish",this.spriteHeight=92,this.spriteWidth=92,this.spawnGravity=.5,this.spawnSpeedX=4*Math.random()-2,this.spawnSpeedY=-20,this.rot=0,this.x=t,this.y=i,this.spawnY=i,this.frame=0,this.exists=!0,this.collected=!1,this.width=this.spriteWidth/4,this.height=this.spriteHeight/4,this.x<128&&(this.x=128),this.x>n.element.width-128&&(this.x=n.element.width-128)}return t.prototype.draw=function(){var t=n.ctx;if(!1!==this.exists){var i=h.convertRange(this.spawnY,{min:0,max:n.element.height},{min:0,max:2}),e=h.convertRange(this.y,{min:0,max:n.element.height},{min:n.element.height/5,max:n.element.height});t.save(),t.translate(this.x,e),t.scale(i,i),t.rotate(this.rot),t.drawImage(a,-this.width/2,-this.height/2,this.width,this.height),t.restore()}},t.prototype.update=function(){if(!1!==this.exists){if(this.frame+=1,!this.collected){var t=h.convertRange(this.frame-100,{min:0,max:100},{min:20,max:5}),i=this.frame>100?t:60;if(this.rot=o(this.rot,-1,1,this.frame,i,.05),this.frame<60&&(this.y+=this.spawnSpeedY,this.x+=this.spawnSpeedX,this.spawnSpeedY+=this.spawnGravity,this.width=h.lerp(this.width,this.spriteWidth,.05),this.height=h.lerp(this.height,this.spriteHeight,.05)),this.frame>150)return this.width=h.lerp(this.width,0,.2),this.height=h.lerp(this.height,0,.2),void(this.width<16&&(this.exists=!1));if(!(n.mouseX<=this.x+48&&n.mouseX>=this.x-48))return;this.collected=!0,r.playPopSound()}this.y<64&&(this.width=h.lerp(this.width,0,.1),this.height=h.lerp(this.height,0,.1));var s=n.element.width/2,a=0-n.element.height/5;this.x=h.lerp(this.x,s,.1),this.y=h.lerp(this.y,a,.1),this.width<8&&(this.exists=!1,n.fish+=1,d.className="added",e.requestTimeout(function(){d.className=""},10))}},t}();function o(t,i,e,s,r,a){void 0===a&&(a=.1);var n=t,d=s%r<r/2?i:e;return h.lerp(n,d,a)}exports.Fish=p;
},{"../state":"G3dB","../timers":"tRIU","../utils":"hIne","../../sprites/fish-shadow.png":"gnKw","../audio":"U4Cs"}],"aYiE":[function(require,module,exports) {
module.exports="/penguin-left.d7613f7b.png";
},{}],"UN3O":[function(require,module,exports) {
module.exports="/penguin-right.e5afec6e.png";
},{}],"WE3S":[function(require,module,exports) {
module.exports="/penguin-left-angry.41109c0b.png";
},{}],"EXC3":[function(require,module,exports) {
module.exports="/penguin-right-angry.791d7b25.png";
},{}],"f0gu":[function(require,module,exports) {
module.exports="/penguin-left-bored.c7b9beff.png";
},{}],"YKcs":[function(require,module,exports) {
module.exports="/penguin-right-bored.ff4497b1.png";
},{}],"EjkU":[function(require,module,exports) {
module.exports="/junkie-left.21669b42.png";
},{}],"JT0e":[function(require,module,exports) {
module.exports="/junkie-right.ab5a07ef.png";
},{}],"NgjU":[function(require,module,exports) {
"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Penguin=void 0;var i=require("./fish"),e=require("../state"),h=require("../utils"),s=t(require("../../sprites/penguin-left.png")),r=t(require("../../sprites/penguin-right.png")),n=t(require("../../sprites/penguin-left-angry.png")),a=t(require("../../sprites/penguin-right-angry.png")),o=t(require("../../sprites/penguin-left-bored.png")),g=t(require("../../sprites/penguin-right-bored.png")),d=t(require("../../sprites/junkie-left.png")),m=t(require("../../sprites/junkie-right.png")),p=h.loadImage(s.default),l=h.loadImage(r.default),u=h.loadImage(n.default),f=h.loadImage(a.default),w=h.loadImage(o.default),x=h.loadImage(g.default),c=h.loadImage(d.default),v=h.loadImage(m.default),y=e.State(),I=function(){function t(t,i){this.type="penguin",this.spriteHeight=92,this.spriteWidth=92,this.x=t,this.y=i,this.mood="normal",this.state="spawning",this.frame=h.randomInteger(0,20),this.direction=h.randomInteger(0,1)?"left":"right",this.width=this.spriteWidth/2,this.height=0,this.exists=!0,this.emotionFrame=0,this.spawnFrame=h.randomInteger(0,200)}return t.prototype.setMood=function(t){this.mood=t,this.emotionFrame="angry"===t?h.randomInteger(200,400):h.randomInteger(150,300)},t.prototype.despawn=function(){this.state="leaving"},t.prototype.draw=function(){var t=y.ctx;if(this.exists){var i="left"===this.direction?p:l,e=h.convertRange(this.y,{min:0,max:y.element.height},{min:0,max:2}),s=h.convertRange(this.y,{min:0,max:y.element.height},{min:y.element.height/5,max:y.element.height});"bored"===this.mood&&(i="left"===this.direction?w:x),"angry"===this.mood&&(i="left"===this.direction?u:f),e<0||(!0===window.junkie&&(i="left"===this.direction?c:v),t.save(),t.translate(this.x,s),t.scale(e,e),t.drawImage(i,-this.width/2,18-this.height,this.width,this.height),t.restore())}},t.prototype.update=function(){var t=y.element.width,e=y.element.height;if(this.exists){if(100===this.spawnFrame&&"walking"===this.state&&"normal"===this.mood){var s=new i.Fish(this.x,this.y-1);y.entities.push(s)}"normal"!==this.mood&&(this.emotionFrame-=1,this.emotionFrame<=0&&(this.emotionFrame=0,this.mood="normal")),this.frame+=1,this.frame>20&&(this.frame=0),this.spawnFrame+=1,!0===window.rave&&(this.spawnFrame=100),this.spawnFrame>100&&(this.spawnFrame=0),"walking"===this.state&&(this.height=this.frame>=10?h.lerp(this.height,this.spriteHeight-24,.3):h.lerp(this.height,this.spriteHeight+4,.3),this.width=this.frame>=10?h.lerp(this.width,this.spriteWidth+16,.2):h.lerp(this.width,this.spriteWidth-4,.2),"left"===this.direction?(this.x-=h.convertRange(this.y,{min:0,max:e},{min:0,max:2}),this.x<=-this.width&&(this.x=t+this.width)):(this.x+=h.convertRange(this.y,{min:0,max:e},{min:0,max:2}),this.x>=t+this.width&&(this.x=-this.width))),"spawning"===this.state&&(this.width=h.lerp(this.width,this.spriteWidth,.1),this.height=h.lerp(this.height,this.spriteHeight,.1)+.1,this.height>=this.spriteHeight&&(this.state="walking",this.width=this.spriteWidth,this.height=this.spriteHeight)),"leaving"===this.state&&(this.width=h.lerp(this.width,0,.05),this.height=h.lerp(this.height,0,.1)-.05,this.height<=10&&(this.exists=!1))}},t}();exports.Penguin=I;
},{"./fish":"N76B","../state":"G3dB","../utils":"hIne","../../sprites/penguin-left.png":"aYiE","../../sprites/penguin-right.png":"UN3O","../../sprites/penguin-left-angry.png":"WE3S","../../sprites/penguin-right-angry.png":"EXC3","../../sprites/penguin-left-bored.png":"f0gu","../../sprites/penguin-right-bored.png":"YKcs","../../sprites/junkie-left.png":"EjkU","../../sprites/junkie-right.png":"JT0e"}],"tfSq":[function(require,module,exports) {
module.exports="/stone.6f84dd34.png";
},{}],"cxvF":[function(require,module,exports) {
module.exports="/penguin-anthena.497b65b3.png";
},{}],"oer8":[function(require,module,exports) {
module.exports="/penguin-loudspeaker.9124c1d0.png";
},{}],"wYN1":[function(require,module,exports) {
module.exports="/penguin-loudspeaker-speak.1117fe6f.png";
},{}],"xgdy":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Characters=void 0;var t=require("../state"),i=require("../utils"),h=e(require("../../sprites/stone.png")),s=e(require("../../sprites/penguin-anthena.png")),n=e(require("../../sprites/penguin-loudspeaker.png")),a=e(require("../../sprites/penguin-loudspeaker-speak.png")),r=e(require("../../sprites/junkie-left.png")),p=e(require("../../sprites/junkie-right.png")),g=require("../audio"),u=i.loadImage(h.default),d=i.loadImage(s.default),o=i.loadImage(n.default),l=i.loadImage(a.default),m=i.loadImage(r.default),f=i.loadImage(p.default),k=t.State(),S=function(){function e(){this.type="characters",this.stoneSpriteHeight=400,this.stoneSpriteWidth=400,this.penguinLoudspeakerSpriteHeight=98,this.penguinLoudspeakerSpriteWidth=98,this.penguinLoudspeakerOffsetX=48,this.penguinLoudspeakerOffsetY=-50,this.penguinAnthenaSpriteHeight=98,this.penguinAnthenaSpriteWidth=98,this.penguinAnthenaOffsetX=85,this.penguinAnthenaOffsetY=-232,this.x=k.element.width/2,this.y=k.element.height/1.75,this.width=this.penguinLoudspeakerSpriteWidth,this.height=this.penguinLoudspeakerSpriteHeight,this.exists=!0,this.frame=0,this.speakFrame=0,this.state="idle",this.anthenaFrame=0,this.anthenaWidth=this.penguinAnthenaSpriteWidth,this.anthenaHeight=this.penguinAnthenaSpriteHeight}return e.prototype.speak=function(){this.state="speaking",this.speakFrame=0},e.prototype.draw=function(){var e=k.ctx,t=i.convertRange(this.y,{min:0,max:k.element.height},{min:0,max:2}),h=i.convertRange(this.y,{min:0,max:k.element.height},{min:k.element.height/5,max:k.element.height}),s="speaking"===this.state?l:o;!0===window.junkie&&(s=m,d=f),e.save(),e.translate(this.x,h),e.scale(t,t),e.drawImage(u,-this.stoneSpriteWidth/2,48-this.stoneSpriteHeight,this.stoneSpriteWidth,this.stoneSpriteHeight),e.drawImage(d,-this.anthenaWidth/2+this.penguinAnthenaOffsetX,-(this.anthenaHeight+16)+this.penguinAnthenaOffsetY,this.anthenaWidth,this.anthenaHeight),e.drawImage(s,-this.width/2+this.penguinLoudspeakerOffsetX,-(this.height+16)+this.penguinLoudspeakerOffsetY,this.width,this.height),e.restore()},e.prototype.update=function(){this.x=Math.floor(k.element.width/2),this.y=Math.floor(k.element.height/1.75),this.frame+=1,this.frame>100&&(this.frame=0),this.anthenaFrame+=1,this.anthenaFrame>60&&(this.anthenaFrame=0),this.anthenaFrame>30?(this.anthenaHeight=i.lerp(this.anthenaHeight,this.penguinAnthenaSpriteHeight-16,.1),this.anthenaWidth=i.lerp(this.anthenaWidth,this.penguinAnthenaSpriteWidth+16,.1)):(this.anthenaHeight=i.lerp(this.anthenaHeight,this.penguinAnthenaSpriteHeight,.1),this.anthenaWidth=i.lerp(this.anthenaWidth,this.penguinAnthenaSpriteWidth,.1)),"idle"===this.state&&(this.frame>50?(this.height=i.lerp(this.height,this.penguinLoudspeakerSpriteHeight,.05),this.width=i.lerp(this.width,this.penguinLoudspeakerSpriteWidth,.05)):(this.height=i.lerp(this.height,this.penguinLoudspeakerSpriteHeight-16,.05),this.width=i.lerp(this.width,this.penguinLoudspeakerSpriteWidth+8,.05))),"speaking"===this.state&&(this.frame+=8,this.speakFrame+=1,this.anthenaFrame+=1,1===this.speakFrame&&g.playSpeachSound(),this.frame>50?(this.height=i.lerp(this.height,this.penguinLoudspeakerSpriteHeight+16,.1),this.width=i.lerp(this.width,this.penguinLoudspeakerSpriteWidth-8,.1)):(this.height=i.lerp(this.height,this.penguinLoudspeakerSpriteHeight-32,.1),this.width=i.lerp(this.width,this.penguinLoudspeakerSpriteWidth+16,.1))),this.speakFrame>100&&(this.speakFrame=0,this.state="idle")},e}();exports.Characters=S;
},{"../state":"G3dB","../utils":"hIne","../../sprites/stone.png":"tfSq","../../sprites/penguin-anthena.png":"cxvF","../../sprites/penguin-loudspeaker.png":"oer8","../../sprites/penguin-loudspeaker-speak.png":"wYN1","../../sprites/junkie-left.png":"EjkU","../../sprites/junkie-right.png":"JT0e","../audio":"U4Cs"}],"NrUM":[function(require,module,exports) {
"use strict";var e=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(a,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function i(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})},t=this&&this.__generator||function(e,t){var r,n,a,o,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(o){return function(i){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(a=(a=s.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){s.label=o[1];break}if(6===o[0]&&s.label<a[1]){s.label=a[1],a=o;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(o);break}a[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(i){o=[6,i],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,i])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.showLeaderboard=exports.renderLeaderboard=void 0;var r=require("./state"),n="http://45.32.186.38",a=r.State(),o=document.getElementById("end-menu"),s=document.getElementById("leaderboard-table"),i=document.getElementById("score-uploading"),c=document.getElementById("restart-button"),u=document.getElementById("leaderboard-username"),l=document.getElementById("leaderboard-submit-button");function d(){return e(this,void 0,Promise,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,fetch(n+"/ping")];case 1:return[4,t.sent().text()];case 2:return"pong"===t.sent()&&(a.serverAvailable=!0),[3,4];case 3:return e=t.sent(),console.error(e),[3,4];case 4:return[2]}})})}function h(e){s.innerHTML="";for(var t=0;t<e.length;t++){var r=e[t]?e[t]:{username:"-",score:0},n=document.createElement("div");n.className="row";var a=document.createElement("div");a.innerText=t+1+".";var o=document.createElement("div");o.innerText=r.username;var i=document.createElement("div");i.innerText=r.score+"",n.appendChild(a),n.appendChild(o),n.appendChild(i),s.appendChild(n)}}function f(){return e(this,void 0,Promise,function(){var e,r,s,c,u;return t(this,function(t){switch(t.label){case 0:if(!a.serverAvailable)return[3,5];t.label=1;case 1:return t.trys.push([1,4,,5]),e=a.fish,[4,fetch(n+"/leaderboard?score="+e)];case 2:return[4,t.sent().json()];case 3:return r=t.sent(),s=r.leaderboard,c=r.canApply,s.sort(function(e,t){return e.score-t.score}).reverse(),c?i.classList.add("visible"):i.classList.remove("visible"),h(s),o.classList.add("show-leaderboard"),[3,5];case 4:return u=t.sent(),console.error(u),[3,5];case 5:return[2]}})})}exports.renderLeaderboard=h,exports.showLeaderboard=f,u.addEventListener("input",function(){var e=u.value;l.disabled=e.length<=1||e.length>12}),l.addEventListener("click",function(){return e(void 0,void 0,void 0,function(){var e,r,o,s,c;return t(this,function(t){switch(t.label){case 0:e=a.fish,r=u.value,l.disabled=!0,i.classList.remove("visible"),t.label=1;case 1:return t.trys.push([1,4,,5]),o=JSON.stringify({username:r,score:e}),[4,fetch(n+"/leaderboard",{method:"POST",body:o,headers:{Accept:"application/json","Content-Type":"application/json"}})];case 2:return[4,t.sent().json()];case 3:return s=t.sent(),h(s.leaderboard),[3,5];case 4:return c=t.sent(),console.error(c),[3,5];case 5:return[2]}})})}),d();
},{"./state":"G3dB"}],"LVVK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.spawnPenguins=exports.gameRestart=void 0;var e=require("./state"),n=require("./entities/penguin"),t=require("./entities/characters"),r=require("./timers"),a=require("./utils"),i=require("./audio"),s=require("./gui"),o=require("./leaderboard"),l=e.State(),u=document.getElementById("news"),d=document.getElementById("end-menu"),c=document.getElementById("end-overlay"),m=document.getElementById("gathered-fish"),v=document.getElementById("post-button"),p=document.getElementById("leaderboard-submit-button"),g="true"===localStorage.getItem("played");localStorage.setItem("played","true"),r.requestInterval(function(){l.tempo+=.2},1e3),r.requestInterval(function(){l.relevance-=.001*l.tempo,l.relevance<0&&(l.relevance=0)},100),r.requestInterval(function(){if(l.relevance<.5){var e=l.penguins.length-1,n=Math.ceil(.1*l.maximumPenguins);l.relevance<.2&&(n=Math.ceil(.2*l.maximumPenguins)),n>e&&(n=e);for(var t=0;t<n;t++){var r=a.randomFromArray(l.penguins),i=l.penguins[r];"characters"!==i.type&&"walking"===i.state?i.despawn():t-=1}}},1e3),r.requestInterval(function(){l.penguins.length-1<=0&&(s.hidePostModals(),m.innerText="Gathered Fish: "+l.fish,d.classList.add("visible"),c.classList.add("visible"),o.showLeaderboard(),p.disabled=!1,l.paused=!0)},1e3);var h=r.requestInterval(function(){var e=l.newsIndex,n=l.news[e];i.playMoveSound();var t=u.querySelector(".old");t&&t.remove();var r=u.querySelector(".block.one");r&&(r.classList.remove("one"),r.classList.add("old"));var a=u.querySelector(".block.two");a&&(a.classList.add("one"),a.classList.remove("two"));var o=u.querySelector(".block.three");o&&(o.classList.add("two"),o.classList.remove("three"));var d=document.createElement("div");d.className="block new",d.setAttribute("news-index",""+e);var c=document.createElement("h3");c.innerText=n.title;var m=document.createElement("p");m.innerText=n.content,d.appendChild(c),d.appendChild(m),u.appendChild(d),window.requestAnimationFrame(function(){d.className="block three",d.onclick=function(){l.selectedNewsIndex=e,s.showPostModal(),i.playClickSound()}}),l.newsIndex+=1,l.newsIndex>=l.news.length&&(l.newsIndex=0);var v=Math.floor(5e3-100*l.tempo);h(v>500?v:500)},g?2500:7500);function w(){l.paused=!0,l.mouseX=0,l.mouseY=0,l.mouseDown=!1,l.entities=[],l.penguins=[new t.Characters],l.fish=0,l.tempo=1.1,l.relevance=1.25,l.maximumPenguins=10,f(10)}function f(e){void 0===e&&(e=1);for(var t=0;t<e;t++){var r=a.randomInteger(0,l.element.width),i=a.randomInteger(l.element.height/3,l.element.height-64),s=new n.Penguin(r,i);l.penguins.push(s)}a.insertionSort(l.penguins,"y")}v.addEventListener("click",function(){var e=l.selectedNewsIndex,n=l.news[e],t=l.penguins.length-1,r=document.querySelector("button.active");if(null!==r){var a=u.querySelector('[news-index="'+e+'"]');if(a&&a.classList.add("posted"),l.penguins.find(function(e){return"characters"===e.type}).speak(),i.playClickSound(),i.playPaperSound(),s.hidePostModals(),n.fake)return i.playSirenSound(),l.penguins.forEach(function(e){"penguin"===e.type&&"walking"===e.state&&e.setMood("angry")}),l.relevance-=.75,void(l.relevance<0&&(l.relevance=0));if(n.theme!==r.id)return i.playSadSound(),l.penguins.forEach(function(e){"penguin"===e.type&&"walking"===e.state&&e.setMood("bored")}),l.relevance-=.25,void(l.relevance<0&&(l.relevance=0));var o=Math.ceil(.3*t);if(l.relevance>1.5&&(o+=1),t<25&&(o+=1),!(t>1e3)){f(o);var d=l.penguins.length-1;l.maximumPenguins=d,d<l.maximumPenguins&&(l.maximumPenguins=d),l.relevance+=.5,l.relevance>2&&(l.relevance=2),l.relevance<=.75&&(l.relevance=1)}}}),exports.gameRestart=w,exports.spawnPenguins=f;
},{"./state":"G3dB","./entities/penguin":"NgjU","./entities/characters":"xgdy","./timers":"tRIU","./utils":"hIne","./audio":"U4Cs","./gui":"TbCJ","./leaderboard":"NrUM"}],"TbCJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hidePostModals=exports.showPostModal=void 0;var e=require("./logic"),t=require("./state"),s=require("./timers"),i=require("./utils"),a=require("./audio"),c=t.State(),n=document.getElementById("counter"),l=document.getElementById("tutorial"),d=document.getElementById("selected"),o=document.getElementById("black-screen"),r=document.getElementById("relevance-bar"),v=document.getElementById("start-menu"),u=document.getElementById("end-menu"),m=document.getElementById("end-overlay"),L=document.getElementById("help-text"),y=document.getElementById("start-button"),b=document.getElementById("next-button"),p=document.getElementById("restart-button"),E=document.getElementById("comics"),g=document.getElementById("post-modal"),k=document.getElementById("post-overlay"),f=document.getElementById("post-button"),I=document.getElementById("gaming"),B=document.getElementById("education"),C=document.getElementById("politics"),h=document.getElementById("films"),S=document.getElementById("music"),x=document.getElementById("sport");function M(){I.classList.remove("active"),B.classList.remove("active"),h.classList.remove("active"),C.classList.remove("active"),S.classList.remove("active"),x.classList.remove("active")}function w(){var e=c.selectedNewsIndex,t=c.news[e],s=document.createElement("div");s.className="block";var i=document.createElement("h3");i.innerText=t.title;var a=document.createElement("p");a.innerText=t.content,s.appendChild(i),s.appendChild(a),d.innerHTML="",d.appendChild(s),f.disabled=!0,g.classList.add("visible"),k.classList.add("visible"),c.paused=!0}function P(){c.paused=!1,f.disabled=!0,g.classList.remove("visible"),k.classList.remove("visible"),M()}o.classList.remove("visible"),y.addEventListener("click",function(){o.classList.add("visible"),y.disabled=!0,a.playClickSound(),setTimeout(function(){a.startMusic(),v.remove(),o.classList.remove("visible"),E.classList.add("visible")},1e3)}),b.addEventListener("click",function(){o.classList.add("visible"),b.disabled=!0,a.playPaperSound(),a.playClickSound(),setTimeout(function(){L.style.display="block",o.classList.remove("visible"),E.classList.remove("visible"),c.paused=!1},1e3)}),p.addEventListener("click",function(){o.classList.add("visible"),E.classList.remove("visible"),u.classList.remove("visible"),p.disabled=!0,a.playClickSound(),setTimeout(function(){o.classList.remove("visible"),m.classList.remove("visible"),E.classList.remove("visible"),p.disabled=!1,e.gameRestart(),a.restartMusic(),c.paused=!1},1e3)}),s.requestInterval(function(){n.innerText=i.numberWithCommas(c.fish);var e=Math.floor(50*c.relevance);e>100&&(e=100),r.style.width=e+"%",c.relevance<.5?r.style.backgroundColor="#f35858":c.relevance>1.5?r.style.backgroundColor="#5ef358":r.style.backgroundColor="#5893f3"},100),k.addEventListener("click",function(){a.playClick2Sound(),P()}),window.addEventListener("keydown",function(e){"Escape"===e.key&&(c.paused&&c.penguins.length>1?(c.paused=!1,l.classList.remove("visible"),P()):(c.paused=!0,a.playPaperSound(),l.classList.add("visible"),L.remove()))}),I.addEventListener("click",function(){M(),a.playClickSound(),f.disabled=!1,I.classList.contains("active")?I.classList.remove("active"):I.classList.add("active")}),B.addEventListener("click",function(){M(),a.playClickSound(),f.disabled=!1,B.classList.contains("active")?B.classList.remove("active"):B.classList.add("active")}),h.addEventListener("click",function(){M(),a.playClickSound(),f.disabled=!1,h.classList.contains("active")?h.classList.remove("active"):h.classList.add("active")}),C.addEventListener("click",function(){M(),a.playClickSound(),f.disabled=!1,C.classList.contains("active")?C.classList.remove("active"):C.classList.add("active")}),S.addEventListener("click",function(){M(),a.playClickSound(),f.disabled=!1,S.classList.contains("active")?S.classList.remove("active"):S.classList.add("active")}),x.addEventListener("click",function(){M(),a.playClickSound(),f.disabled=!1,x.classList.contains("active")?x.classList.remove("active"):x.classList.add("active")}),exports.showPostModal=w,exports.hidePostModals=P;
},{"./logic":"LVVK","./state":"G3dB","./timers":"tRIU","./utils":"hIne","./audio":"U4Cs"}],"dnrf":[function(require,module,exports) {
var define;
var e;!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof e&&e.amd?e(n):t.Stats=n()}(this,function(){var e=function(){function t(e){return i.appendChild(e.dom),e}function n(e){for(var t=0;t<i.children.length;t++)i.children[t].style.display=t===e?"block":"none";l=e}var l=0,i=document.createElement("div");i.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",i.addEventListener("click",function(e){e.preventDefault(),n(++l%i.children.length)},!1);var a=(performance||Date).now(),o=a,r=0,f=t(new e.Panel("FPS","#0ff","#002")),c=t(new e.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var d=t(new e.Panel("MB","#f08","#201"));return n(0),{REVISION:16,dom:i,addPanel:t,showPanel:n,begin:function(){a=(performance||Date).now()},end:function(){r++;var e=(performance||Date).now();if(c.update(e-a,200),e>o+1e3&&(f.update(1e3*r/(e-o),100),o=e,r=0,d)){var t=performance.memory;d.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){a=this.end()},domElement:i,setMode:n}};return e.Panel=function(e,t,n){var l=1/0,i=0,a=Math.round,o=a(window.devicePixelRatio||1),r=80*o,f=48*o,c=3*o,d=2*o,p=3*o,u=15*o,s=74*o,m=30*o,h=document.createElement("canvas");h.width=r,h.height=f,h.style.cssText="width:80px;height:48px";var v=h.getContext("2d");return v.font="bold "+9*o+"px Helvetica,Arial,sans-serif",v.textBaseline="top",v.fillStyle=n,v.fillRect(0,0,r,f),v.fillStyle=t,v.fillText(e,c,d),v.fillRect(p,u,s,m),v.fillStyle=n,v.globalAlpha=.9,v.fillRect(p,u,s,m),{dom:h,update:function(f,y){l=Math.min(l,f),i=Math.max(i,f),v.fillStyle=n,v.globalAlpha=1,v.fillRect(0,0,r,u),v.fillStyle=t,v.fillText(a(f)+" "+e+" ("+a(l)+"-"+a(i)+")",c,d),v.drawImage(h,p+o,u,s-o,m,p,u,s-o,m),v.fillRect(p+s-o,u,o,m),v.fillStyle=n,v.globalAlpha=.9,v.fillRect(p+s-o,u,o,a((1-f/y)*m))}}},e});
},{}],"Yu7U":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./logic"),n=e(require("stats.js")),i=require("./state"),r=require("./entities/characters"),s=new n.default;s.showPanel(0);var u=i.State(),a=new r.Characters;function o(){if(s.begin(),u.paused)window.requestAnimationFrame(o);else{for(var e=0;e<u.penguins.length;e++)u.penguins[e].update();for(e=0;e<u.entities.length;e++)u.entities[e].update();u.penguins=u.penguins.filter(function(e){return e.exists}),u.entities=u.entities.filter(function(e){return e.exists}),!0!==window.rave&&u.ctx.clearRect(0,0,u.element.width,u.element.height);for(e=0;e<u.penguins.length;e++)u.penguins[e].draw();for(e=0;e<u.entities.length;e++)u.entities[e].draw();s.end(),window.requestAnimationFrame(o)}}u.penguins.push(a),t.spawnPenguins(10),o();
},{"./logic":"LVVK","stats.js":"dnrf","./state":"G3dB","./entities/characters":"xgdy"}],"ablF":[function(require,module,exports) {
module.exports="/rod.a52ef026.png";
},{}],"jKY5":[function(require,module,exports) {
"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.FishingRod=void 0;var e=require("../state"),i=require("../utils"),r=t(require("../../sprites/rod.png")),o=i.loadImage(r.default),s=e.State(),a=function(){function t(){this.type="fishing-rod",this.spriteHeight=92,this.spriteWidth=92,this.x=s.element.width/2,this.y=s.element.height-500,this.exists=!0}return t.prototype.update=function(){console.log("rod update")},t.prototype.draw=function(){var t=s.ctx,e=s.element.width/2,i=s.element.height,r=s.mouseX,a=s.mouseY;h(t,r,a,r,a+120,"white"),t.save(),t.translate(e,i);var n=Math.atan((a-i)/(r-e))+(r<e?Math.PI:0),u=Math.sqrt(Math.pow(a-i,2)+Math.pow(r-e,2));t.rotate(n+.607);var d=u/1400.9;t.scale(d,d),s.ctx.drawImage(o,0,50-o.height),t.restore()},t}();function h(t,e,i,r,o,s){t.save(),t.beginPath(),t.moveTo(e,i),t.lineTo(r,o),t.strokeStyle=s,t.stroke(),t.restore()}exports.FishingRod=a;
},{"../state":"G3dB","../utils":"hIne","../../sprites/rod.png":"ablF"}],"XP28":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./state"),t=require("./audio"),n=require("./entities/fishingRod"),i=e.State(),o=window;o.junkie=function(){return o.junkie=!0,"Junkie mode activated!"},o.setTempo=function(e){return i.tempo=e,"Tempo set to "+e},o.rave=function(){return t.playCaramelldansen(),document.getElementById("stage").style.animation="party 0.32s infinite ease-in-out",document.getElementById("score-uploading").remove(),o.rave=!0,i.tempo=5,"Rave mode ON!"},o.fishing=function(){i.entities.push(new n.FishingRod)};
},{"./state":"G3dB","./audio":"U4Cs","./entities/fishingRod":"jKY5"}],"Se9h":[function(require,module,exports) {
module.exports="/fish.69c97b05.png";
},{}],"lQom":[function(require,module,exports) {
"use strict";var e=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(i,r){function o(e){try{l(a.next(e))}catch(t){r(t)}}function s(e){try{l(a.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}l((a=a.apply(e,t||[])).next())})},t=this&&this.__generator||function(e,t){var n,a,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,a=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){o.label=r[1];break}if(6===r[0]&&o.label<i[1]){o.label=i[1],i=r;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(r);break}i[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(s){r=[6,s],a=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var a,i=require("../utils"),r=n(require("../../sprites/fish.png"));function o(e,t){return Math.random()*(t-e)+e}function s(e,t,n){return i.convertRange(e,{min:0,max:1},{min:t,max:n})}!function(e){e[e.FrontSpeed=2]="FrontSpeed",e[e.BackSpeed=1]="BackSpeed",e[e.FrontScale=.8]="FrontScale",e[e.BackScale=.4]="BackScale",e[e.TopDownScaleDiff=.3]="TopDownScaleDiff",e[e.MaxRotSpeed=.01]="MaxRotSpeed",e[e.MinRotSpeed=.004]="MinRotSpeed",e[e.TotalFallers=100]="TotalFallers"}(a||(a={}));var l=function(){function n(e,t){var n=this;void 0===t&&(t=!0),this.fallers=[],this.images=[],this.loop=function(){n.finished||""!==n.ctx.canvas.id&&!document.getElementById(n.ctx.canvas.id)||(n.update(),requestAnimationFrame(n.loop))},requestAnimationFrame(this.loop),this.finished=!1,e=e,t&&(e.width=window.innerWidth*window.devicePixelRatio,e.height=window.innerHeight*window.devicePixelRatio),this.ctx=e.getContext("2d"),this.imagesToLoad=0,this.loadImages(r.default)}return n.prototype.spawnFallers=function(){for(var e=0;e<a.TotalFallers;e++){var t=this.createFaller(!1,e);this.fallers.push(t)}i.insertionSort(this.fallers,"depth"),this.fallers.reverse()},n.prototype.loadImages=function(){for(var n=this,a=[],r=0;r<arguments.length;r++)a[r]=arguments[r];this.imagesToLoad=a.length,a.forEach(function(a){return e(n,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return[4,i.preloadImage(a)];case 1:return e=t.sent(),this.imagesToLoad--,this.images.push(e),[2]}})})})},n.prototype.createFaller=function(e,t){void 0===e&&(e=!1);var n=i.randomInteger(0,this.images.length-1),r=this.images[n].width,s=this.images[n].height,l=this.ctx.canvas,h=l.width,c=-r,u=l.height-s-1,d=-s,f=Math.floor(Math.sqrt(a.TotalFallers)),p=(h-c)/f*(t%f+o(0,1))+c,g=(u-d)/f*(t/f+o(0,1))+d;g=e?d:g;var m=i.randomInteger(0,2*Math.PI);return{x:p,y:g,depth:Math.random(),imageIndex:n,rot:m,rotSpeed:o(a.MinRotSpeed,a.MaxRotSpeed),width:r,height:s}},n.prototype.update=function(){var e=this;this.imagesToLoad<=0&&0===this.fallers.length&&this.spawnFallers();var t=this.ctx;t.clearRect(0,0,t.canvas.width,t.canvas.height),this.fallers.forEach(function(n,r){var o=s(n.depth,a.FrontSpeed,a.BackSpeed),l=s(n.depth,a.FrontScale,a.BackScale)+i.convertRange(n.y,{min:0,max:t.canvas.height},{min:a.TopDownScaleDiff/2,max:-a.TopDownScaleDiff/2});n.y+=o,n.y>e.ctx.canvas.height&&(e.fallers[r]=e.createFaller(!0,r),e.fallers[r].depth=n.depth),n.rot+=n.rotSpeed,t.save(),t.translate(n.x+n.width/2,n.y+n.height/2),t.rotate(n.rot),t.scale(l,l),t.drawImage(e.images[n.imageIndex],-n.width/2,-n.height/2),t.restore()})},n.prototype.finish=function(){this.finished=!0},n}();exports.default=l,new l(document.getElementById("start-menu-canvas"));
},{"../utils":"hIne","../../sprites/fish.png":"Se9h"}],"QCba":[function(require,module,exports) {
"use strict";var e=this&&this.__spreadArrays||function(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;var i=Array(e),n=0;for(r=0;r<t;r++)for(var s=arguments[r],o=0,a=s.length;o<a;o++,n++)i[n]=s[o];return i};Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./core/state"),t=require("./core/utils"),i=require("./content.json"),n=document.getElementById("stage");n.width=window.innerWidth*window.devicePixelRatio,n.height=window.innerHeight*window.devicePixelRatio;var s=n.getContext("2d");r.State({paused:!0,element:n,ctx:s,mouseX:0,mouseY:0,mouseDown:!1,entities:[],penguins:[],fish:0,tempo:1,relevance:1.25,maximumPenguins:10,serverAvailable:!1,news:t.shuffle(e(i.real_news,i.fake_news)),selectedNewsIndex:0,newsIndex:0}),require("./core/input"),require("./core/gui"),require("./core/main"),require("./core/cheats"),require("./core/StartMenu/FallersRain");
},{"./core/state":"G3dB","./core/utils":"hIne","./content.json":"BHZy","./core/input":"n6mK","./core/gui":"TbCJ","./core/main":"Yu7U","./core/cheats":"XP28","./core/StartMenu/FallersRain":"lQom"}]},{},["QCba"], null)
//# sourceMappingURL=/src.2797f5c9.js.map