· 5 years ago · Oct 07, 2020, 05:34 AM
1// ==UserScript==
2// @name Siren Mod
3// @namespace -
4// @version 1
5// @description by ℳ? | ℬℯ??⚡#2322
6// @author By ℳ? | ℬℯ??⚡#2322
7// @match *://dev.moomoo.io/*
8// @match *://sandbox.moomoo.io/*
9// @match *://moomoo.io/*
10// @grant none
11// @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723
12// @require http://code.jquery.com/jquery-3.3.1.min.js
13// @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
14// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
15
16// ==/UserScript==
17
18$("#consentBlock").css({display: "none"});
19//$("#youtuberOf").css({display: "none"});
20$("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
21
22document.getElementById("moomooio_728x90_home").style.display = "none";
23$("#moomooio_728x90_home").parent().css({display: "none"});
24document.getElementById('gameName').innerHTML = 'Siren Mod';
25document.getElementById('loadingText').innerHTML = '. . . . . . . . .☆LoAdInG★. . . . . . . . . ';
26document.getElementById("loadingText").style.color = "red";
27document.getElementById("ageText").style.color = "red";
28document.getElementById("gameName").style.color = "black";
29document.getElementById("leaderboard").append ('☆Mod by Best★');
30document.getElementById('diedText').innerHTML = '★☆★GO KILL THEM★☆★';
31document.getElementById('diedText').style.color = "red";
32document.getElementById('nameInput').placeholder = "EnTeR nAme";
33document.getElementById("leaderboard").style.color = "green";
34document.getElementById("allianceButton").style.color = "red";
35document.getElementById("chatButton").style.color = "red";
36document.getElementById("storeButton").style.color = "red";
37document.getElementById("storeHolder").style = "height: 1500px; width: 450px;";
38window.onbeforeunload = null;
39
40document.getElementById("scoreDisplay").style.color = "#fffb90";
41document.getElementById("woodDisplay").style.color = "#fffb05";
42document.getElementById("stoneDisplay").style.color = "#fffb02";
43document.getElementById("killCounter").style.color = "#fffb91";
44document.getElementById("foodDisplay").style.color = "#fffb02";
45
46let hue = 0;
47
48let replaceInterval = setInterval(() => {
49if (CanvasRenderingContext2D.prototype.roundRect) {
50 CanvasRenderingContext2D.prototype.roundRect = ((oldFunc) => function() { if (this.fillStyle == "#8ecc51") this.fillStyle = `hsl(${hue}, 100%, 50%)`; return oldFunc.call(this, ...arguments); })(CanvasRenderingContext2D.prototype.roundRect);
51 clearInterval(replaceInterval);
52}}, 10);
53
54function changeHue() {
55 hue += Math.random() * 3;
56}
57
58setInterval(changeHue, 10);
59
60let mouseX;
61let mouseY;
62
63let width;
64let height;
65
66setInterval(() => {
67 if(clanToggle == 1) {
68 doNewSend(["9", [null]]);
69 doNewSend(["8", [animate(false, 5)]])
70 }
71 doNewSend(["testing", [6]]);
72}, 200);
73
74setInterval(() => {
75 if(messageToggle == 1) {
76 doNewSend(["ch", [animate(true, 5)]])
77 }
78}, 200);
79
80setInterval(() => {
81 if(autoaim == true) {
82 doNewSend(["2", [nearestEnemyAngle]]);
83 }
84}, 0);
85
86setInterval(() => {
87 if(hatToggle == 1) {
88 if(oldHat != normalHat) {
89 hat(normalHat);
90 console.log("Tried. - Hat")
91 }
92 if(oldAcc != normalAcc) {
93 acc(normalAcc);
94 console.log("Tried. - Acc")
95 }
96 oldHat = normalHat;
97 oldAcc = normalAcc
98 }
99}, 25);
100
101function normal() {
102 hat(normalHat);
103 acc(normalAcc);
104}
105
106function aim(x, y){
107 var cvs = document.getElementById("gameCanvas");
108 cvs.dispatchEvent(new MouseEvent("mousemove", {
109 clientX: x,
110 clientY: y
111
112 }));
113}
114
115let coreURL = new URL(window.location.href);
116window.sessionStorage.force = coreURL.searchParams.get("fc");
117
118var nearestEnemy;
119var nearestEnemyAngle;
120var isEnemyNear;
121var instaSpeed = 250;
122var primary;
123var secondary;
124var foodType;
125var wallType;
126var spikeType;
127var millType;
128var mineType;
129var boostType;
130var turretType;
131var spawnpadType;
132var autoaim = false;
133var tick = 1;
134var oldHat;
135var oldAcc;
136var enemiesNear;
137var normalHat;
138var normalAcc;
139var ws;
140var msgpack5 = msgpack;
141var boostDir;
142let myPlayer = {
143 id: null,
144 x: null,
145 y: null,
146 dir: null,
147 object: null,
148 weapon: null,
149 clan: null,
150 isLeader: null,
151 hat: null,
152 accessory: null,
153 isSkull: null
154};
155
156let healSpeed = 60;
157var messageToggle = 0;
158var clanToggle = 0;
159let healToggle = 1;
160let hatToggle = 1;
161
162document.msgpack = msgpack;
163function n(){
164 this.buffer = new Uint8Array([0]);
165 this.buffer.__proto__ = new Uint8Array;
166 this.type = 0;
167}
168
169const CanvasAPI = document.getElementById("gameCanvas")
170CanvasAPI.addEventListener("mousedown", buttonPressD, false);
171
172function buttonPressD(e) {
173 if (e.button == 2) {
174 doNewSend(["13c", [1, 40, 0]]);
175 doNewSend(["13c", [0, 40, 0]]);
176 doNewSend(["13c", [0, 0, 1]]);
177 doNewSend(["13c", [1, 21, 1]]);
178 doNewSend(["13c", [0, 21, 1]]);
179 doNewSend(["7", [1]]);
180 setTimeout( () => {
181 doNewSend(["13c", [0, 0, 0]]);
182 doNewSend(["7", [1]]);
183 doNewSend(["13c", [0, 11, 1]]);
184 if (myPlayer.y < 2400){
185 doNewSend(["13c", [0, 15, 0]]);
186 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
187 doNewSend(["13c", [0, 31, 0]]);
188 } else {
189 doNewSend(["13c", [0, 12, 0]]);
190 }
191 }, 120);
192 }
193 if (e.button == 0) {
194 doNewSend(["13c", [1, 7, 0]]);
195 doNewSend(["13c", [0, 7, 0]]);
196 doNewSend(["13c", [0, 0, 1]]);
197 doNewSend(["13c", [1, 18, 1]]);
198 doNewSend(["13c", [0, 18, 1]]);
199 doNewSend(["7", [1]]);
200 setTimeout( () => {
201 doNewSend(["13c", [0, 0, 0]]);
202 doNewSend(["13c", [0, 11, 1]]);
203 if (myPlayer.y < 2400){
204 doNewSend(["13c", [0, 15, 0]]);
205 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
206 doNewSend(["13c", [0, 31, 0]]);
207 } else {
208 doNewSend(["13c", [0, 12, 0]]);
209 }
210 doNewSend(["7", [1]]);
211 }, 120);
212 }
213}
214
215WebSocket.prototype.oldSend = WebSocket.prototype.send;
216WebSocket.prototype.send = function(m){
217 if (!ws){
218 document.ws = this;
219
220 ws = this;
221 socketFound(this);
222 }
223 this.oldSend(m);
224};
225
226
227function socketFound(socket){
228 socket.addEventListener('message', function(message){
229 handleMessage(message);
230 });
231}
232
233function handleMessage(m){
234 let temp = msgpack5.decode(new Uint8Array(m.data));
235 let data;
236 if(temp.length > 1) {
237 data = [temp[0], ...temp[1]];
238 if (data[1] instanceof Array){
239 data = data;
240 }
241 } else {
242 data = temp;
243 }
244 let item = data[0];
245 if(!data) {return};
246
247 if(item === "io-init") {
248 let cvs = document.getElementById("gameCanvas");
249 width = cvs.clientWidth;
250 height = cvs.clientHeight;
251 $(window).resize(function() {
252 width = cvs.clientWidth;
253 height = cvs.clientHeight;
254 });
255 cvs.addEventListener("mousemove", e => {
256 mouseX = e.clientX;
257 mouseY = e.clientY;
258 });
259 }
260
261 if (item == "1" && myPlayer.id == null){
262 myPlayer.id = data[1];
263 }
264
265 if (item == "33") {
266 enemiesNear = [];
267 for(let i = 0; i < data[1].length / 13; i++) {
268 let playerInfo = data[1].slice(13*i, 13*i+13);
269 if(playerInfo[0] == myPlayer.id) {
270 myPlayer.x = playerInfo[1];
271 myPlayer.y = playerInfo[2];
272 myPlayer.dir = playerInfo[3];
273 myPlayer.object = playerInfo[4];
274 myPlayer.weapon = playerInfo[5];
275 myPlayer.clan = playerInfo[7];
276 myPlayer.isLeader = playerInfo[8];
277 myPlayer.hat = playerInfo[9];
278 myPlayer.accessory = playerInfo[10];
279 myPlayer.isSkull = playerInfo[11];
280 } else if(playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
281 enemiesNear.push(playerInfo);
282 }
283 }
284 }
285
286 isEnemyNear = false;
287 if(enemiesNear) {
288 nearestEnemy = enemiesNear.sort((a,b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
289 }
290
291 if(nearestEnemy) {
292 nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-myPlayer.x);
293 if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 0) {
294 isEnemyNear = true;
295 if(autoaim == false && myPlayer.hat != 7 && myPlayer.hat != 53) {
296 normalHat = 6;
297 if(primary != 8) {
298 normalAcc = 19
299 }
300 };
301 }
302 }
303 if(isEnemyNear == false && autoaim == false) {
304 normalAcc = 11;
305 if (myPlayer.y < 2400){
306 normalHat = 15;
307 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
308 normalHat = 31;
309 } else {
310 normalHat = 12;
311 }
312 }
313 if (!nearestEnemy) {
314 nearestEnemyAngle = myPlayer.dir;
315 }
316
317 if(item == "h" && data[1] == myPlayer.id) {
318 if(data[2] < 100 && data[2] > 0 && healToggle == 1) {
319 setTimeout( () => {
320 place(foodType, null);
321 place(foodType, null);
322 place(foodType, null);
323 place(foodType, null);
324 }, healSpeed);
325
326 }
327 }
328 update();
329}
330
331
332function doNewSend(sender){
333 ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
334}
335
336function acc(id) {
337 doNewSend(["13c", [0, 0, 1]]);
338 doNewSend(["13c", [0, id, 1]]);
339}
340
341function hat(id) {
342 doNewSend(["13c", [0, id, 0]]);
343}
344
345
346function place(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
347 doNewSend(["5", [id, null]]);
348 doNewSend(["c", [1, angle]]);
349 doNewSend(["c", [0, angle]]);
350 doNewSend(["5", [myPlayer.weapon, true]]);
351}
352
353var repeater = function(key, action, interval) {
354 let _isKeyDown = false;
355 let _intervalId = undefined;
356
357 return {
358 start(keycode) {
359 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
360 _isKeyDown = true;
361 if(_intervalId === undefined) {
362 _intervalId = setInterval(() => {
363 action();
364 if(!_isKeyDown){
365 clearInterval(_intervalId);
366 _intervalId = undefined;
367 console.log("claered");
368 }
369 }, interval);
370 }
371 }
372 },
373
374 stop(keycode) {
375 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
376 _isKeyDown = false;
377 }
378 }
379 };
380
381
382}
383
384const healer = repeater(81, () => {place(foodType);
385 place(foodType);
386 place(foodType)}, 50);
387const boostPlacer = repeater(70, () => {place(boostType)}, 0);
388const spikePlacer = repeater(86, () => {place(spikeType)}, 0);
389const millPlacer = repeater(78, () => {place(millType)}, 0);
390const turretPlacer = repeater(72, () => {place(turretType)}, 0);
391
392document.addEventListener('keydown', (e)=>{
393 spikePlacer.start(e.keyCode);
394 healer.start(e.keyCode);
395 boostPlacer.start(e.keyCode);
396 millPlacer.start(e.keyCode);
397 turretPlacer.start(e.keyCode);
398
399 if (e.keyCode == 79 && document.activeElement.id.toLowerCase() !== 'chatbox') {
400 for (let i=0;i<5;i++){
401 let angle = myPlayer.dir + toRad(i * 72);
402 place(millType, angle)
403 }
404 }
405 if (e.keyCode == 70 && document.activeElement.id.toLowerCase() !== 'chatbox') {
406 for (let i=0;i<4;i++){
407 let angle = myPlayer.dir + toRad(i * 90);
408 place(boostType, angle)
409 }
410 }
411 if (e.keyCode == 72 && document.activeElement.id.toLowerCase() !== 'chatbox') {
412 place(turretType, myPlayer.dir + toRad(45));
413 place(turretType, myPlayer.dir - toRad(45));
414 }
415 if (e.keyCode == 78 && document.activeElement.id.toLowerCase() !== 'chatbox') {
416 place(millType, myPlayer.dir + toRad(72));
417 }
418 if (e.keyCode == 89 && document.activeElement.id.toLowerCase() !== 'chatbox') {
419 doNewSend(["13c", [1, 53, 0]]);
420 doNewSend(["13c", [0, 53, 0]]);
421 }
422 if (e.keyCode == 89 && document.activeElement.id.toLowerCase() !== 'chatbox') {
423 doNewSend(["ch", ["Mod:Turret gear ON"]]);
424 }
425 if (e.keyCode == 71 && document.activeElement.id.toLowerCase() !== 'chatbox') {
426 doNewSend(["13c", [1, 20, 0]]);
427 doNewSend(["13c", [0, 20, 0]]);
428 }
429 if (e.keyCode == 71 && document.activeElement.id.toLowerCase() !== 'chatbox') {
430 doNewSend(["ch", ["Mod: Faster hit ON"]]);
431 }
432 if (e.keyCode == 67 && document.activeElement.id.toLowerCase() !== 'chatbox') {
433 doNewSend(["13c", [1, 6, 0]]);
434 doNewSend(["13c", [0, 6, 0]]);
435 doNewSend(["13c", [1, 21, 1]]);
436 doNewSend(["13c", [0, 21, 1]]);
437 }
438 if (e.keyCode == 67 && document.activeElement.id.toLowerCase() !== 'chatbox') {
439 doNewSend(["ch", ["Mod: SolIder+Blood"]]);
440 }
441 if (e.keyCode == 90 && document.activeElement.id.toLowerCase() !== 'chatbox') {
442 doNewSend(["13c", [1, 40, 0]]);
443 doNewSend(["13c", [0, 40, 0]]);
444 doNewSend(["13c", [0, 0, 1]]);
445 doNewSend(["13c", [0, 19, 1]]);
446 }
447 if (e.keyCode == 90 && document.activeElement.id.toLowerCase() !== 'chatbox') {
448 doNewSend(["ch", ["Mod: TANK"]]);
449 }
450 if (e.keyCode == 9 && document.activeElement.id.toLowerCase() !== 'chatbox') {
451 doNewSend(["13c", [1, 11, 1]]);
452 doNewSend(["13c", [0, 11, 1]]);
453 doNewSend(["13c", [1, 12, 0]]);
454 doNewSend(["13c", [0, 12, 0]]);
455 doNewSend(["13c", [1, 31, 0]]);
456 doNewSend(["13c", [1, 15, 0]]);
457 doNewSend(["13c", [1, 40, 0]]);
458 }
459 if (e.keyCode == 9 && document.activeElement.id.toLowerCase() !== 'chatbox') {
460 doNewSend(["ch", ["Mod: BOOSTER"]]);
461 }
462 if (e.keyCode == 113 && document.activeElement.id.toLowerCase() !== 'chatbox') {
463 doNewSend(["ch", [".:ReLoading.:"]]);
464 doNewSend(["5", [secondary, true]]);
465 setTimeout( () => {
466 doNewSend(["ch", ["><RelOading<>"]]);
467 }, 666);
468 setTimeout( () => {
469 doNewSend(["ch", [":.ReLoading:."]]);
470 }, 1332);
471 setTimeout( () => {
472 doNewSend(["ch", ["-_RELOADED_-"]]);
473 doNewSend(["5", [primary, true]]);
474 doNewSend(["13c", [0, 12, 0]]);
475 }, 2000);
476 }
477 if (e.keyCode == 84 && document.activeElement.id.toLowerCase() !== 'chatbox') {
478 doNewSend(["13c", [1, 22, 0]]);
479 doNewSend(["13c", [0, 22, 0]]);
480 }
481 if (e.keyCode == 84 && document.activeElement.id.toLowerCase() !== 'chatbox') {
482 doNewSend(["ch", ["Mod: THESE TURRETS NOOB"]]);
483 }
484 if (e.keyCode == 191 && document.activeElement.id.toLowerCase() !== 'chatbox') {
485 doNewSend(["13c", [1, 13, 0]]);
486 doNewSend(["13c", [0, 13, 0]]);
487 doNewSend(["13c", [1, 13, 1]]);
488 doNewSend(["13c", [0, 13, 1]]);
489 }
490 if (e.keyCode == 191 && document.activeElement.id.toLowerCase() !== 'chatbox') {
491 doNewSend(["ch", ["Mod: HEALER"]]);
492 }
493 if (e.keyCode == 188 && document.activeElement.id.toLowerCase() !== 'chatbox') {
494 doNewSend(["13c", [1, 7, 0]]);
495 doNewSend(["13c", [0, 7, 0]]);
496 doNewSend(["13c", [0, 0, 1]]);
497 doNewSend(["13c", [1, 18, 1]]);
498 doNewSend(["13c", [0, 18, 1]]);
499 }
500 if (e.keyCode == 188 && document.activeElement.id.toLowerCase() !== 'chatbox') {
501 doNewSend(["ch", ["Mod: BULL"]]);
502 }
503 if (e.keyCode == 86 && document.activeElement.id.toLowerCase() !== 'chatbox') {
504 doNewSend(["13c", [1, 21, 0]]);
505 doNewSend(["13c", [0, 21, 0]]);
506 }
507 if (e.keyCode == 86 && document.activeElement.id.toLowerCase() !== 'chatbox') {
508 doNewSend(["ch", ["Mod: PLAGUE"]]);
509 }
510
511 if (e.keyCode == 67 && document.activeElement.id.toLowerCase() !== 'chatbox') {
512 doNewSend(["13c", [1, 6, 0]]);
513 doNewSend(["13c", [0, 6, 0]]);
514 doNewSend(["13c", [0, 0, 1]]);
515 doNewSend(["13c", [1, 19, 1]]);
516 doNewSend(["13c", [0, 19, 1]]);
517 }
518
519 if (e.keyCode == 49 && document.activeElement.id.toLowerCase() !== 'chatbox') {
520 autosecondary = false;
521 autoprimary = true;
522 setTimeout( () => {
523 autoprimary = false;
524 }, 330);
525 }
526 if (e.keyCode == 50 && document.activeElement.id.toLowerCase() !== 'chatbox') {
527 autoprimary = false;
528 autosecondary = true;
529 setTimeout( () => {
530 autosecondary = false;
531 }, 330);
532 }
533
534 if (e.keyCode == 190 && document.activeElement.id.toLowerCase() !== 'chatbox') {
535 doNewSend(["13c", [1, 11, 0]]);
536 doNewSend(["13c", [0, 11, 0]]);
537 doNewSend(["13c", [0, 0, 1]]);
538 doNewSend(["13c", [1, 21, 1]]);
539 doNewSend(["13c", [0, 21, 1]]);
540 }
541 if (e.keyCode == 190 && document.activeElement.id.toLowerCase() !== 'chatbox') {
542 doNewSend(["ch", ["Mod: SPIKE"]]);
543 }
544 if(e.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') {
545 autoaim = true;
546 doNewSend(["5", [primary, true]]);
547 doNewSend(["7", [1]]);
548 doNewSend(["13c", [1, 7, 0]]);
549 doNewSend(["13c", [0, 7, 0]]);
550 doNewSend(["13c", [0, 0, 1]]);
551 doNewSend(["13c", [0, 21, 1]]);
552 setTimeout( () => {
553 doNewSend(["13c", [0, 0, 0]]);
554 doNewSend(["13c", [1, 53, 0]]);
555 doNewSend(["13c", [0, 53, 0]]);
556 doNewSend(["13c", [0, 0, 1]]);
557 doNewSend(["13c", [0, 11, 1]]);
558 doNewSend(["5", [secondary, true]]);
559 }, 115);
560
561 setTimeout( () => {
562 doNewSend(["5", [primary, true]]);
563 doNewSend(["5", [secondary, true]]);
564 }, 125);
565
566 setTimeout( () => {
567 doNewSend(["5", [primary, true]]);
568 doNewSend(["5", [secondary, true]]);
569 }, 135);
570
571 setTimeout( () => {
572 doNewSend(["5", [primary, true]]);
573 doNewSend(["5", [secondary, true]]);
574 }, 145);
575
576 setTimeout( () => {
577 doNewSend(["5", [primary, true]]);
578 doNewSend(["5", [secondary, true]]);
579 }, 155);
580
581 setTimeout( () => {
582 doNewSend(["5", [primary, true]]);
583 doNewSend(["5", [secondary, true]]);
584 }, 175);
585
586 setTimeout( () => {
587 doNewSend(["5", [primary, true]]);
588 doNewSend(["5", [secondary, true]]);
589 }, 185);
590
591 setTimeout( () => {
592 doNewSend(["5", [primary, true]]);
593 doNewSend(["5", [secondary, true]]);
594 }, 195);
595
596 setTimeout( () => {
597 doNewSend(["5", [primary, true]]);
598 doNewSend(["5", [secondary, true]]);
599 }, 205);
600
601 setTimeout( () => {
602 doNewSend(["5", [primary, true]]);
603 doNewSend(["5", [secondary, true]]);
604 }, 215);
605
606 setTimeout( () => {
607 doNewSend(["5", [primary, true]]);
608 doNewSend(["5", [secondary, true]]);
609 }, 225);
610
611 setTimeout( () => {
612 doNewSend(["13c", [0, 0, 0]]);
613 doNewSend(["7", [1]]);
614 doNewSend(["5", [primary, true]]);
615 doNewSend(["13c", [0, 12, 0]]);
616 autoaim = false;
617 }, 230);
618 }
619
620 if(e.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox') {
621 autoaim = true;
622 doNewSend(["5", [primary, true]]);
623 doNewSend(["13c", [0, 7, 0]]);
624 doNewSend(["13c", [0, 0, 1]]);
625 doNewSend(["13c", [0, 21, 1]]);
626 place(spikeType, myPlayer.dir + toRad(45));
627 place(spikeType, myPlayer.dir - toRad(45));
628 doNewSend(["c", [1]]);
629 doNewSend(["c", [0, null]]);
630 setTimeout( () => {
631 doNewSend(["13c", [0, 53, 0]]);
632 }, 100);
633
634 setTimeout( () => {
635 doNewSend(["13c", [0, 0, 0]]);
636 doNewSend(["13c", [0, 12, 0]]);
637 doNewSend(["13c", [0, 11, 1]]);
638 autoaim = false;
639 }, 200);
640 }
641
642 if(e.keyCode == 106 && document.activeElement.id.toLowerCase() !== 'chatbox') {
643 healToggle = (healToggle + 1) % 2;
644 if(healToggle == 0) {
645 if(hatToggle == 0) {
646 document.title = "Heal: OFF | Hat: OFF"
647 } else {
648 document.title = "Heal: OFF | Hat: ON"
649 }
650 } else {
651 if(hatToggle == 0) {
652 document.title = "Heal: ON | Hat: OFF"
653 } else {
654 document.title = "Heal: ON | Hat: ON"
655 }
656 }
657 }
658
659 if(e.keyCode == 113 && document.activeElement.id.toLowerCase() !== 'chatbox') {
660 clickInsta = (clickInsta + 1) % 2;
661 }
662
663 if(e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') {
664 doNewSend(["5", [secondary, true]]);
665 doNewSend(["c", [1]]);
666 doNewSend(["c", [0, null]]);
667 doNewSend(["13c", [0, 53, 0]]);
668
669 setTimeout( () => {
670 doNewSend(["6", [12]]);
671 doNewSend(["c", [1]]);
672 doNewSend(["c", [0, null]]);
673
674 }, 125);
675
676 setTimeout( () => {
677 doNewSend(["6", [15]]);
678 doNewSend(["c", [1]]);
679 doNewSend(["c", [0, null]]);
680
681 }, 250);
682
683 setTimeout( () => {
684 doNewSend(["5", [primary, true]]);
685 doNewSend(["13c", [0, 12, 0]]);
686 autoaim = false;
687 }, 375);
688 }
689
690 if (e.keyCode == 67 && document.activeElement.id.toLowerCase() !== 'chatbox') {
691 doNewSend(["13c", [1, 6, 0]]);
692 doNewSend(["13c", [0, 6, 0]]);
693 doNewSend(["13c", [0, 0, 1]]);
694 doNewSend(["13c", [1, 19, 1]]);
695 doNewSend(["13c", [0, 19, 1]]);
696 }
697
698 if(e.keyCode == 106 && document.activeElement.id.toLowerCase() !== 'chatbox') {
699 healToggle = (healToggle + 1) % 2;
700 }
701
702 if(e.keyCode == 40 && document.activeElement.id.toLowerCase() !== 'chatbox') {
703 doNewSend(["6", [5]]);
704 doNewSend(["6", [17]]);
705 doNewSend(["6", [31]]);
706 doNewSend(["6", [23]]);
707 doNewSend(["6", [9]]);
708 doNewSend(["6", [38]]);
709 doNewSend(["6", [28]]);
710 doNewSend(["6", [15]]);
711 }
712
713 if(e.keyCode == 35 && document.activeElement.id.toLowerCase() !== 'chatbox') {
714 doNewSend(["6", [7]]);
715 doNewSend(["6", [17]]);
716 doNewSend(["6", [31]]);
717 doNewSend(["6", [27]]);
718 doNewSend(["6", [10]]);
719 doNewSend(["6", [38]]);
720 doNewSend(["6", [4]]);
721 doNewSend(["6", [15]]);
722 }
723
724 if (e.keyCode == 9 && document.activeElement.id.toLowerCase() !== 'chatbox') {
725 if (myPlayer.y < 2400){
726 doNewSend(["13c", [0, 15, 0]]);
727 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
728 doNewSend(["13c", [0, 31, 0]]);
729 } else {
730 doNewSend(["13c", [0, 12, 0]]);
731 }
732 doNewSend(["13c", [0, 11, 1]]);
733 }
734
735
736 if(e.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') {
737 autoaim = true;
738 doNewSend(["ch", ["@_=-Insta@_=-"]]);
739 doNewSend(["5", [primary, true]]);
740 doNewSend(["13c", [0, 7, 0]]);
741 doNewSend(["13c", [0, 21, 1]]);
742 doNewSend(["c", [1]]);
743 setTimeout( () => {
744 doNewSend(["13c", [0, 53, 0]]);
745 doNewSend(["13c", [0, 18, 1]]);
746 doNewSend(["5", [secondary, true]]);
747 }, instaSpeed - 160);
748
749 setTimeout( () => {
750 doNewSend(["5", [primary, true]]);
751 doNewSend(["c", [0, null]]);
752 doNewSend(["13c", [0, 12, 0]]);
753 doNewSend(["13c", [0, 11, 1]]);
754 autoaim = false;
755 }, instaSpeed);
756 }
757
758 if (e.keyCode == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') {
759 doNewSend(["ch", ["Mod:1age INSTA"]]);
760 }
761 if (e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') {
762 doNewSend(["ch", ["Died?"]]);
763 }
764 if (e.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox') {
765 doNewSend(["ch", ["=-\_/-="]]);
766 }
767 if (e.keyCode == 40 && document.activeElement.id.toLowerCase() !== 'chatbox') {
768 doNewSend(["9", [null]]);
769 }
770 if (e.keyCode == 9 && document.activeElement.id.toLowerCase() !== 'chatbox') {
771 if (myPlayer.y < 2400){
772 doNewSend(["13c", [0, 15, 0]]);
773 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
774 doNewSend(["13c", [0, 31, 0]]);
775 } else {
776 doNewSend(["13c", [0, 12, 0]]);
777 }
778 doNewSend(["13c", [0, 11, 1]]);
779 }
780 if(e.keyCode == 111 && document.activeElement.id.toLowerCase() !== 'chatbox') {
781 hatToggle = (hatToggle + 1) % 2;
782 if(healToggle == 0) {
783 if(hatToggle == 0) {
784 document.title = "Heal: OFF | Hat: OFF"
785 } else {
786 document.title = "Heal: OFF | Hat: ON"
787 }
788 } else {
789 if(hatToggle == 0) {
790 document.title = "Heal: ON | Hat: OFF"
791 } else {
792 document.title = "Heal: ON | Hat: ON"
793 }
794 }
795 }
796})
797
798document.addEventListener('keyup', (e)=>{
799 spikePlacer.stop(e.keyCode);
800 boostPlacer.stop(e.keyCode);
801 millPlacer.stop(e.keyCode);
802 turretPlacer.stop(e.keyCode);
803 healer.stop(e.keyCode);
804 if(e.keyCode == 71 && document.activeElement.id.toLowerCase() !== 'chatbox') {
805 setTimeout( () => {
806 doNewSend(["33", [null]]);
807 boostDir = null;
808 }, 10);
809 }
810})
811
812
813function isElementVisible(e) {
814 return (e.offsetParent !== null);
815}
816
817
818function toRad(angle) {
819 return angle * 0.01745329251;
820}
821
822function dist(a, b){
823 return Math.sqrt( Math.pow((b.y-a[2]), 2) + Math.pow((b.x-a[1]), 2) );
824}
825
826document.title = "Mod by Best."
827
828function crash(space, chance) {
829 let result = '';
830 let characters;
831 if(space) {
832 characters = '!!RIP all mod!!';
833 } else {
834 characters = 'Crash?';
835 }
836 if(space) {
837 characters = characters.padStart((70 - characters.length) / 6 + characters.length)
838 characters = characters.padEnd(30);
839 }
840 let count = 0;
841 for (let i = 0; i < characters.length; i++ ) {
842 if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 6 && characters.charAt(i) != " ") {
843 result += "";
844 count++
845 } else {
846 result += characters.charAt(i);
847 }
848 }
849 return result;
850}
851
852function update() {
853 for (let i=0;i<9;i++){
854 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
855 primary = i;
856 }
857 }
858
859 for (let i=9;i<16;i++){
860 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
861 secondary = i;
862 }
863 }
864
865 for (let i=16;i<19;i++){
866 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
867 foodType = i - 16;
868 }
869 }
870
871 for (let i=19;i<22;i++){
872 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
873 wallType = i - 16;
874 }
875 }
876
877 for (let i=22;i<26;i++){
878 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
879 spikeType = i - 16;
880 }
881 }
882
883 for (let i=26;i<29;i++){
884 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
885 millType = i - 16;
886 }
887 }
888
889 for (let i=29;i<31;i++){
890 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
891 mineType = i - 16;
892 }
893 }
894
895 for (let i=31;i<33;i++){
896 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
897 boostType = i - 16;
898 }
899 }
900
901 for (let i=33;i<39;i++){
902 if (isElementVisible(document.getElementById("actionBarItem" + i.toString())) && i != 36){
903 turretType = i - 16;
904 }
905 }
906
907 spawnpadType = 36;
908}
909var _msgs = ["Sub to Anime boy", "subs 50 for Mod v2!", "Mod giveaway at 100 subs", "Mod op insta"];
910var msgs = _msgs;
911var msgCycleSwitch = false;
912var shift = false;
913var minus = false;
914var home = false;
915var chat;
916var msgNum = 0;
917
918var socket = null;
919
920var scriptSetup = false;
921
922WebSocket = class extends WebSocket {
923 constructor(...arg) {
924 super(...arg);
925 if (!scriptSetup){
926 scriptSetup = true;
927 styleInit();
928 ren_overlay();
929 window.onbeforeunload = function (){
930 return 'Are you sure you want to leave?';
931 };
932 }
933 socket = this;
934 }
935};
936
937if (storageAvailable('localStorage')){
938 if (!localStorage.getItem("msgs")){
939 localStorage.setItem("msgs", JSON.stringify(msgs));
940 }else{
941 let temp;
942 try{
943 temp = JSON.parse(localStorage.getItem("msgs"));
944 }
945 catch (e){
946 alert("Invalid Array! Setting default...");
947 saveData();
948 temp = "";
949 }
950 if (temp !== ""){
951 msgs = temp;
952 }
953 }
954}
955
956const overlay = {};
957overlay.keyCode = 36;
958overlay.toggle = false;
959overlay.inputString = msgs.join("\n");
960overlay.tempMsgs = _msgs;
961
962function styleInit() {
963 addGlobalStyle(`#chatCyclerUI{padding: 0.2em; margin:0.2em; position: absolute;top: 0;left: 0;width: 30%;
964 background-color: RGB(255, 4, 4);display:none;}`);
965 addGlobalStyle(".table{ display: table; text-align: center; width: 100%; height: 80%;}");
966 addGlobalStyle(".row{ display: table-row; }");
967 addGlobalStyle(`.cell{ display: table-cell; padding: 0px 0.3em;border: 1px solid black;}`);
968 addGlobalStyle(`.backRed{background-color:#FFFF00}`);
969 function addGlobalStyle(css) {
970 var head, style;
971 head = document.getElementsByTagName('head')[0];
972 if (!head) {
973 return;
974 }
975 style = document.createElement('style');
976 style.type = 'text/css';
977 style.innerHTML = css;
978 head.appendChild(style);
979 }
980}
981
982function toggleOverlay(tf){
983 if (tf){
984 document.querySelector('#chatCyclerUI').style.display = "block";
985 }else{
986 document.querySelector('#chatCyclerUI').style.display = "none";
987 }
988};
989
990function ren_overlay(){
991 const title = `<div style="font-size:32px;color:rgba(0, 0, 0, 0.75)">Menu</div>`;
992 const descr = `<div>Press HOME to repeat this menu.</div>`;
993 const body = `
994 <div class="table">
995 <div class="row">Message Settings
996 </div>
997 <div class="row">
998 <div class="cell" style="vertical-align:middle">Messages</div>
999 <div class="cell" style="vertical-align:middle"><textarea name="overlay_messages" rows=4 cols=32 style="background-color:rgba(255, 255, 255, 0.35);resize:none; rgba(255, 255, 255, 0.75) padding-left: 0px;border-left-width: 0px;border-top-width: 0px;padding-top: 0px;padding-right: 0px;border-right-width: 0px;padding-bottom: 0px;border-bottom-width: 0px;"></textarea></div>
1000 </div>
1001 <div class="row">
1002 <div class="cell" style="vertical-align:middle">Save Message </div>
1003 <div class="cell" style="vertical-align:middle"><input type="button" name="overlay_update_cycle" value="Save" style="border-right-width: 0px;border-left-width: 0px;border-top-width: 0px;padding-left: 6px;border-bottom-width: 0px;"></div>
1004 </div>
1005 <br>
1006 <div class="row">Message Repeat
1007 </div>
1008 <div class="row">
1009 <div class="cell" style="vertical-align:middle">Repeat<br><span class="overlay_cycle_toggle_value"><span style="font-size:24px;color:rgba(0, 0, 0, 0.75)";>Off</span></span></div>
1010 <div class="cell" style="vertical-align:middle"><input type="button" name="overlay_cycle_toggle" value="Repeat"></div>
1011 </div>
1012 </div>`;
1013 const footer = `<div style="font-size:24px;color:rgba(0, 0, 0, 0.75)">AutoChat</div>`;
1014 const temp = `${title} ${body} ${descr} ${footer}`;
1015 const d = document.createElement("div")
1016 d.id = "chatCyclerUI";
1017 d.innerHTML = temp;
1018 d.style.zIndex = 999999;
1019 document.body.appendChild(d);
1020 const val = document.querySelector('textarea[name="overlay_messages"]');
1021 val.value = overlay.inputString;
1022 val.addEventListener('input', function(e) {
1023 overlay.inputString = e.target.value;
1024 });
1025 document.querySelector('input[name="overlay_update_cycle"]').addEventListener('click', function() {
1026 if (!overlay.inputString){
1027 overlay.tempMsgs = _msgs;
1028 }else{
1029 overlay.tempMsgs = overlay.inputString.split(/\r?\n/);
1030 }
1031 msgNum = 99;
1032 msgs = overlay.tempMsgs;
1033 saveData();
1034 });
1035 document.querySelector('input[name="overlay_cycle_toggle"]').addEventListener('click', function(e) {
1036 msgCycleSwitch = !msgCycleSwitch;
1037 if (msgCycleSwitch){
1038 chat = setInterval(autoChat, 1);
1039 document.querySelector('.overlay_cycle_toggle_value').innerHTML = `<span style="font-size:24px;color:rgba(0, 0, 0, 0.75)";>On</span>`;
1040 }else{
1041 document.querySelector('.overlay_cycle_toggle_value').innerHTML = `<span style="font-size:24px;color:rgba(0, 0, 0, 0.75)";>Off</span>`;
1042 clearInterval(chat);
1043 msgNum = 0;
1044 }
1045 });
1046}
1047
1048function concatBuffers(buffer1, buffer2){
1049 var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength);
1050 tmp.set(new Uint8Array(buffer1), 0);
1051 tmp.set(new Uint8Array(buffer2), buffer1.byteLength);
1052 return tmp.buffer;
1053}
1054
1055const four = Uint8Array.from([4]).buffer;
1056
1057function autoChat(){
1058 socket && socket.send(msgpack.encode(["ch", [msgs[msgNum]]]));
1059 msgNum++;
1060 if (msgNum >= msgs.length) msgNum = 0;
1061}
1062
1063function storageAvailable(type){
1064 try{
1065 var storage = window[type],
1066 x = '__storage_test__';
1067 storage.setItem(x, x);
1068 storage.removeItem(x);
1069 return true;
1070 }
1071 catch(e){
1072 return false;
1073 }
1074}
1075
1076function saveData(){
1077 if (storageAvailable('localStorage')){
1078 localStorage.setItem("msgs", JSON.stringify(msgs));
1079 }
1080}
1081
1082window.addEventListener('keydown', function (event){
1083 if (overlay.toggle) event.stopImmediatePropagation();
1084 if (!minus && event.keyCode === 19){ //L
1085 msgCycleSwitch = !msgCycleSwitch;
1086 if (msgCycleSwitch){
1087 chat = setInterval(autoChat, 0);
1088 }else{
1089 clearInterval(chat);
1090 msgNum =0;
1091 }
1092 minus = true;
1093 }
1094 if (!home && event.keyCode === overlay.keyCode){ //HOME
1095 overlay.toggle = !overlay.toggle;
1096 toggleOverlay(overlay.toggle);
1097 home = true;
1098 }
1099});
1100
1101window.addEventListener('keypress', function (event){
1102 if (overlay.toggle) event.stopImmediatePropagation();
1103});
1104
1105window.addEventListener('keyup', function (event){
1106 if (overlay.toggle) event.stopImmediatePropagation();
1107 if (event.keyCode == 19){
1108 minus = false;
1109 }else if (event.keyCode == 36){
1110 home = false;
1111 }
1112});
1113
1114! function(e) {
1115 var t = {};
1116
1117 function n(i) {
1118 if (t[i]) return t[i].exports;
1119 var r = t[i] = {
1120 i: i,
1121 l: !1,
1122 exports: {}
1123 };
1124 return e[i].call(r.exports, r, r.exports, n), r.l = !0, r.exports
1125 }
1126 n.m = e, n.c = t, n.d = function(e, t, i) {
1127 n.o(e, t) || Object.defineProperty(e, t, {
1128 enumerable: !0,
1129 get: i
1130 })
1131 }, n.r = function(e) {
1132 "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(
1133 e, Symbol.toStringTag, {
1134 value: "Module"
1135 }), Object.defineProperty(e, "__esModule", {
1136 value: !0
1137 })
1138 }, n.t = function(e, t) {
1139 if (1 & t && (e = n(e)), 8 & t) return e;
1140 if (4 & t && "object" == typeof e && e && e.__esModule) return e;
1141 var i = Object.create(null);
1142 if (n.r(i), Object.defineProperty(i, "default", {
1143 enumerable: !0,
1144 value: e
1145 }), 2 & t && "string" != typeof e)
1146 for (var r in e) n.d(i, r, function(t) {
1147 return e[t]
1148 }.bind(null, r));
1149 return i
1150 }, n.n = function(e) {
1151 var t = e && e.__esModule ? function() {
1152 return e.default
1153 } : function() {
1154 return e
1155 };
1156 return n.d(t, "a", t), t
1157 }, n.o = function(e, t) {
1158 return Object.prototype.hasOwnProperty.call(e, t)
1159 }, n.p = "", n(n.s = 21)
1160}([function(e, t, n) {
1161 var i = t.global = n(25),
1162 r = t.hasBuffer = i && !!i.isBuffer,
1163 s = t.hasArrayBuffer = "undefined" != typeof ArrayBuffer,
1164 a = t.isArray = n(5);
1165 t.isArrayBuffer = s ? function(e) {
1166 return e instanceof ArrayBuffer || p(e)
1167 } : m;
1168 var o = t.isBuffer = r ? i.isBuffer : m,
1169 c = t.isView = s ? ArrayBuffer.isView || y("ArrayBuffer", "buffer") : m;
1170 t.alloc = d, t.concat = function(e, n) {
1171 n || (n = 0, Array.prototype.forEach.call(e, (function(e) {
1172 n += e.length
1173 })));
1174 var i = this !== t && this || e[0],
1175 r = d.call(i, n),
1176 s = 0;
1177 return Array.prototype.forEach.call(e, (function(e) {
1178 s += f.copy.call(e, r, s)
1179 })), r
1180 }, t.from = function(e) {
1181 return "string" == typeof e ? function(e) {
1182 var t = 3 * e.length,
1183 n = d.call(this, t),
1184 i = f.write.call(n, e);
1185 return t !== i && (n = f.slice.call(n, 0, i)), n
1186 }.call(this, e) : g(this).from(e)
1187 };
1188 var l = t.Array = n(28),
1189 h = t.Buffer = n(29),
1190 u = t.Uint8Array = n(30),
1191 f = t.prototype = n(6);
1192
1193 function d(e) {
1194 return g(this).alloc(e)
1195 }
1196 var p = y("ArrayBuffer");
1197
1198 function g(e) {
1199 return o(e) ? h : c(e) ? u : a(e) ? l : r ? h : s ? u : l
1200 }
1201
1202 function m() {
1203 return !1
1204 }
1205
1206 function y(e, t) {
1207 return e = "[object " + e + "]",
1208 function(n) {
1209 return null != n && {}.toString.call(t ? n[t] : n) === e
1210 }
1211 }
1212}, function(e, t, n) {
1213 var i = n(5);
1214 t.createCodec = o, t.install = function(e) {
1215 for (var t in e) s.prototype[t] = a(s.prototype[t], e[t])
1216 }, t.filter = function(e) {
1217 return i(e) ? function(e) {
1218 return e = e.slice(),
1219 function(n) {
1220 return e.reduce(t, n)
1221 };
1222
1223 function t(e, t) {
1224 return t(e)
1225 }
1226 }(e) : e
1227 };
1228 var r = n(0);
1229
1230 function s(e) {
1231 if (!(this instanceof s)) return new s(e);
1232 this.options = e, this.init()
1233 }
1234
1235 function a(e, t) {
1236 return e && t ? function() {
1237 return e.apply(this, arguments), t.apply(this, arguments)
1238 } : e || t
1239 }
1240
1241 function o(e) {
1242 return new s(e)
1243 }
1244 s.prototype.init = function() {
1245 var e = this.options;
1246 return e && e.uint8array && (this.bufferish = r.Uint8Array), this
1247 }, t.preset = o({
1248 preset: !0
1249 })
1250}, function(e, t, n) {
1251 var i = n(3).ExtBuffer,
1252 r = n(32),
1253 s = n(33),
1254 a = n(1);
1255
1256 function o() {
1257 var e = this.options;
1258 return this.encode = function(e) {
1259 var t = s.getWriteType(e);
1260 return function(e, n) {
1261 var i = t[typeof n];
1262 if (!i) throw new Error('Unsupported type "' + typeof n + '": ' + n);
1263 i(e, n)
1264 }
1265 }(e), e && e.preset && r.setExtPackers(this), this
1266 }
1267 a.install({
1268 addExtPacker: function(e, t, n) {
1269 n = a.filter(n);
1270 var r = t.name;
1271 r && "Object" !== r ? (this.extPackers || (this.extPackers = {}))[r] =
1272 s : (this.extEncoderList || (this.extEncoderList = [])).unshift([t, s]);
1273
1274 function s(t) {
1275 return n && (t = n(t)), new i(t, e)
1276 }
1277 },
1278 getExtPacker: function(e) {
1279 var t = this.extPackers || (this.extPackers = {}),
1280 n = e.constructor,
1281 i = n && n.name && t[n.name];
1282 if (i) return i;
1283 for (var r = this.extEncoderList || (this.extEncoderList = []), s = r.length,
1284 a = 0; a < s; a++) {
1285 var o = r[a];
1286 if (n === o[0]) return o[1]
1287 }
1288 },
1289 init: o
1290 }), t.preset = o.call(a.preset)
1291}, function(e, t, n) {
1292 t.ExtBuffer = function e(t, n) {
1293 if (!(this instanceof e)) return new e(t, n);
1294 this.buffer = i.from(t), this.type = n
1295 };
1296 var i = n(0)
1297}, function(e, t) {
1298 t.read = function(e, t, n, i, r) {
1299 var s, a, o = 8 * r - i - 1,
1300 c = (1 << o) - 1,
1301 l = c >> 1,
1302 h = -7,
1303 u = n ? r - 1 : 0,
1304 f = n ? -1 : 1,
1305 d = e[t + u];
1306 for (u += f, s = d & (1 << -h) - 1, d >>= -h, h += o; h > 0; s = 256 * s +
1307 e[t + u], u += f, h -= 8);
1308 for (a = s & (1 << -h) - 1, s >>= -h, h += i; h > 0; a = 256 * a + e[t + u],
1309 u += f, h -= 8);
1310 if (0 === s) s = 1 - l;
1311 else {
1312 if (s === c) return a ? NaN : 1 / 0 * (d ? -1 : 1);
1313 a += Math.pow(2, i), s -= l
1314 }
1315 return (d ? -1 : 1) * a * Math.pow(2, s - i)
1316 }, t.write = function(e, t, n, i, r, s) {
1317 var a, o, c, l = 8 * s - r - 1,
1318 h = (1 << l) - 1,
1319 u = h >> 1,
1320 f = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
1321 d = i ? 0 : s - 1,
1322 p = i ? 1 : -1,
1323 g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
1324 for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0, a =
1325 h) : (a = Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -a)) <
1326 1 && (a--, c *= 2), (t += a + u >= 1 ? f / c : f * Math.pow(2, 1 - u)) *
1327 c >= 2 && (a++, c /= 2), a + u >= h ? (o = 0, a = h) : a + u >= 1 ? (o =
1328 (t * c - 1) * Math.pow(2, r), a += u) : (o = t * Math.pow(2, u - 1) *
1329 Math.pow(2, r), a = 0)); r >= 8; e[n + d] = 255 & o, d += p, o /= 256,
1330 r -= 8);
1331 for (a = a << r | o, l += r; l > 0; e[n + d] = 255 & a, d += p, a /= 256,
1332 l -= 8);
1333 e[n + d - p] |= 128 * g
1334 }
1335}, function(e, t) {
1336 var n = {}.toString;
1337 e.exports = Array.isArray || function(e) {
1338 return "[object Array]" == n.call(e)
1339 }
1340}, function(e, t, n) {
1341 var i = n(31);
1342 t.copy = c, t.slice = l, t.toString = function(e, t, n) {
1343 return (!a && r.isBuffer(this) ? this.toString : i.toString).apply(this,
1344 arguments)
1345 }, t.write = function(e) {
1346 return function() {
1347 return (this[e] || i[e]).apply(this, arguments)
1348 }
1349 }("write");
1350 var r = n(0),
1351 s = r.global,
1352 a = r.hasBuffer && "TYPED_ARRAY_SUPPORT" in s,
1353 o = a && !s.TYPED_ARRAY_SUPPORT;
1354
1355 function c(e, t, n, s) {
1356 var a = r.isBuffer(this),
1357 c = r.isBuffer(e);
1358 if (a && c) return this.copy(e, t, n, s);
1359 if (o || a || c || !r.isView(this) || !r.isView(e)) return i.copy.call(this,
1360 e, t, n, s);
1361 var h = n || null != s ? l.call(this, n, s) : this;
1362 return e.set(h, t), h.length
1363 }
1364
1365 function l(e, t) {
1366 var n = this.slice || !o && this.subarray;
1367 if (n) return n.call(this, e, t);
1368 var i = r.alloc.call(this, t - e);
1369 return c.call(this, i, 0, e, t), i
1370 }
1371}, function(e, t, n) {
1372 (function(e) {
1373 ! function(t) {
1374 var n, i = "undefined",
1375 r = i !== typeof e && e,
1376 s = i !== typeof Uint8Array && Uint8Array,
1377 a = i !== typeof ArrayBuffer && ArrayBuffer,
1378 o = [0, 0, 0, 0, 0, 0, 0, 0],
1379 c = Array.isArray || function(e) {
1380 return !!e && "[object Array]" == Object.prototype.toString.call(e)
1381 },
1382 l = 4294967296;
1383
1384 function h(e, c, h) {
1385 var b = c ? 0 : 4,
1386 x = c ? 4 : 0,
1387 S = c ? 0 : 3,
1388 T = c ? 1 : 2,
1389 I = c ? 2 : 1,
1390 E = c ? 3 : 0,
1391 M = c ? y : v,
1392 A = c ? k : w,
1393 P = O.prototype,
1394 B = "is" + e,
1395 C = "_" + B;
1396 return P.buffer = void 0, P.offset = 0, P[C] = !0, P.toNumber = R, P.toString =
1397 function(e) {
1398 var t = this.buffer,
1399 n = this.offset,
1400 i = _(t, n + b),
1401 r = _(t, n + x),
1402 s = "",
1403 a = !h && 2147483648 & i;
1404 for (a && (i = ~i, r = l - r), e = e || 10;;) {
1405 var o = i % e * l + r;
1406 if (i = Math.floor(i / e), r = Math.floor(o / e), s = (o % e).toString(
1407 e) + s, !i && !r) break
1408 }
1409 return a && (s = "-" + s), s
1410 }, P.toJSON = R, P.toArray = u, r && (P.toBuffer = f), s && (P.toArrayBuffer =
1411 d), O[B] = function(e) {
1412 return !(!e || !e[C])
1413 }, t[e] = O, O;
1414
1415 function O(e, t, r, c) {
1416 return this instanceof O ? function(e, t, r, c, h) {
1417 if (s && a && (t instanceof a && (t = new s(t)), c instanceof a && (c =
1418 new s(c))), t || r || c || n) {
1419 if (!p(t, r)) h = r, c = t, r = 0, t = new(n || Array)(8);
1420 e.buffer = t, e.offset = r |= 0, i !== typeof c && ("string" ==
1421 typeof c ? function(e, t, n, i) {
1422 var r = 0,
1423 s = n.length,
1424 a = 0,
1425 o = 0;
1426 "-" === n[0] && r++;
1427 for (var c = r; r < s;) {
1428 var h = parseInt(n[r++], i);
1429 if (!(h >= 0)) break;
1430 o = o * i + h, a = a * i + Math.floor(o / l), o %= l
1431 }
1432 c && (a = ~a, o ? o = l - o : a++), j(e, t + b, a), j(e, t + x, o)
1433 }(t, r, c, h || 10) : p(c, h) ? g(t, r, c, h) : "number" == typeof h ?
1434 (j(t, r + b, c), j(t, r + x, h)) : c > 0 ? M(t, r, c) : c < 0 ? A(
1435 t, r, c) : g(t, r, o, 0))
1436 } else e.buffer = m(o, 0)
1437 }(this, e, t, r, c) : new O(e, t, r, c)
1438 }
1439
1440 function R() {
1441 var e = this.buffer,
1442 t = this.offset,
1443 n = _(e, t + b),
1444 i = _(e, t + x);
1445 return h || (n |= 0), n ? n * l + i : i
1446 }
1447
1448 function j(e, t, n) {
1449 e[t + E] = 255 & n, n >>= 8, e[t + I] = 255 & n, n >>= 8, e[t + T] =
1450 255 & n, n >>= 8, e[t + S] = 255 & n
1451 }
1452
1453 function _(e, t) {
1454 return 16777216 * e[t + S] + (e[t + T] << 16) + (e[t + I] << 8) + e[t +
1455 E]
1456 }
1457 }
1458
1459 function u(e) {
1460 var t = this.buffer,
1461 i = this.offset;
1462 return n = null, !1 !== e && 0 === i && 8 === t.length && c(t) ? t : m(t,
1463 i)
1464 }
1465
1466 function f(t) {
1467 var i = this.buffer,
1468 s = this.offset;
1469 if (n = r, !1 !== t && 0 === s && 8 === i.length && e.isBuffer(i)) return i;
1470 var a = new r(8);
1471 return g(a, 0, i, s), a
1472 }
1473
1474 function d(e) {
1475 var t = this.buffer,
1476 i = this.offset,
1477 r = t.buffer;
1478 if (n = s, !1 !== e && 0 === i && r instanceof a && 8 === r.byteLength)
1479 return r;
1480 var o = new s(8);
1481 return g(o, 0, t, i), o.buffer
1482 }
1483
1484 function p(e, t) {
1485 var n = e && e.length;
1486 return t |= 0, n && t + 8 <= n && "string" != typeof e[t]
1487 }
1488
1489 function g(e, t, n, i) {
1490 t |= 0, i |= 0;
1491 for (var r = 0; r < 8; r++) e[t++] = 255 & n[i++]
1492 }
1493
1494 function m(e, t) {
1495 return Array.prototype.slice.call(e, t, t + 8)
1496 }
1497
1498 function y(e, t, n) {
1499 for (var i = t + 8; i > t;) e[--i] = 255 & n, n /= 256
1500 }
1501
1502 function k(e, t, n) {
1503 var i = t + 8;
1504 for (n++; i > t;) e[--i] = 255 & -n ^ 255, n /= 256
1505 }
1506
1507 function v(e, t, n) {
1508 for (var i = t + 8; t < i;) e[t++] = 255 & n, n /= 256
1509 }
1510
1511 function w(e, t, n) {
1512 var i = t + 8;
1513 for (n++; t < i;) e[t++] = 255 & -n ^ 255, n /= 256
1514 }
1515 h("Uint64BE", !0, !0), h("Int64BE", !0, !1), h("Uint64LE", !1, !0), h(
1516 "Int64LE", !1, !1)
1517 }("string" != typeof t.nodeName ? t : this || {})
1518 }).call(this, n(11).Buffer)
1519}, function(e, t, n) {
1520 var i = n(3).ExtBuffer,
1521 r = n(35),
1522 s = n(17).readUint8,
1523 a = n(36),
1524 o = n(1);
1525
1526 function c() {
1527 var e = this.options;
1528 return this.decode = function(e) {
1529 var t = a.getReadToken(e);
1530 return function(e) {
1531 var n = s(e),
1532 i = t[n];
1533 if (!i) throw new Error("Invalid type: " + (n ? "0x" + n.toString(16) :
1534 n));
1535 return i(e)
1536 }
1537 }(e), e && e.preset && r.setExtUnpackers(this), this
1538 }
1539 o.install({
1540 addExtUnpacker: function(e, t) {
1541 (this.extUnpackers || (this.extUnpackers = []))[e] = o.filter(t)
1542 },
1543 getExtUnpacker: function(e) {
1544 return (this.extUnpackers || (this.extUnpackers = []))[e] || function(t) {
1545 return new i(t, e)
1546 }
1547 },
1548 init: c
1549 }), t.preset = c.call(o.preset)
1550}, function(e, t, n) {
1551 t.encode = function(e, t) {
1552 var n = new i(t);
1553 return n.write(e), n.read()
1554 };
1555 var i = n(10).EncodeBuffer
1556}, function(e, t, n) {
1557 t.EncodeBuffer = r;
1558 var i = n(2).preset;
1559
1560 function r(e) {
1561 if (!(this instanceof r)) return new r(e);
1562 if (e && (this.options = e, e.codec)) {
1563 var t = this.codec = e.codec;
1564 t.bufferish && (this.bufferish = t.bufferish)
1565 }
1566 }
1567 n(14).FlexEncoder.mixin(r.prototype), r.prototype.codec = i, r.prototype.write =
1568 function(e) {
1569 this.codec.encode(this, e)
1570 }
1571}, function(e, t, n) {
1572 "use strict";
1573 (function(e) {
1574 /*!
1575 * The buffer module from node.js, for the browser.
1576 *
1577 * @author Feross Aboukhadijeh <http://feross.org>
1578 * @license MIT
1579 */
1580 var i = n(26),
1581 r = n(4),
1582 s = n(27);
1583
1584 function a() {
1585 return c.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
1586 }
1587
1588 function o(e, t) {
1589 if (a() < t) throw new RangeError("Invalid typed array length");
1590 return c.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = c.prototype :
1591 (null === e && (e = new c(t)), e.length = t), e
1592 }
1593
1594 function c(e, t, n) {
1595 if (!(c.TYPED_ARRAY_SUPPORT || this instanceof c)) return new c(e, t, n);
1596 if ("number" == typeof e) {
1597 if ("string" == typeof t) throw new Error(
1598 "If encoding is specified then the first argument must be a string");
1599 return u(this, e)
1600 }
1601 return l(this, e, t, n)
1602 }
1603
1604 function l(e, t, n, i) {
1605 if ("number" == typeof t) throw new TypeError(
1606 '"value" argument must not be a number');
1607 return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ?
1608 function(e, t, n, i) {
1609 if (t.byteLength, n < 0 || t.byteLength < n) throw new RangeError(
1610 "'offset' is out of bounds");
1611 if (t.byteLength < n + (i || 0)) throw new RangeError(
1612 "'length' is out of bounds");
1613 return t = void 0 === n && void 0 === i ? new Uint8Array(t) : void 0 ===
1614 i ? new Uint8Array(t, n) : new Uint8Array(t, n, i), c.TYPED_ARRAY_SUPPORT ?
1615 (e = t).__proto__ = c.prototype : e = f(e, t), e
1616 }(e, t, n, i) : "string" == typeof t ? function(e, t, n) {
1617 if ("string" == typeof n && "" !== n || (n = "utf8"), !c.isEncoding(n))
1618 throw new TypeError('"encoding" must be a valid string encoding');
1619 var i = 0 | p(t, n),
1620 r = (e = o(e, i)).write(t, n);
1621 return r !== i && (e = e.slice(0, r)), e
1622 }(e, t, n) : function(e, t) {
1623 if (c.isBuffer(t)) {
1624 var n = 0 | d(t.length);
1625 return 0 === (e = o(e, n)).length || t.copy(e, 0, 0, n), e
1626 }
1627 if (t) {
1628 if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer ||
1629 "length" in t) return "number" != typeof t.length || function(e) {
1630 return e != e
1631 }(t.length) ? o(e, 0) : f(e, t);
1632 if ("Buffer" === t.type && s(t.data)) return f(e, t.data)
1633 }
1634 throw new TypeError(
1635 "First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object."
1636 )
1637 }(e, t)
1638 }
1639
1640 function h(e) {
1641 if ("number" != typeof e) throw new TypeError(
1642 '"size" argument must be a number');
1643 if (e < 0) throw new RangeError('"size" argument must not be negative')
1644 }
1645
1646 function u(e, t) {
1647 if (h(t), e = o(e, t < 0 ? 0 : 0 | d(t)), !c.TYPED_ARRAY_SUPPORT)
1648 for (var n = 0; n < t; ++n) e[n] = 0;
1649 return e
1650 }
1651
1652 function f(e, t) {
1653 var n = t.length < 0 ? 0 : 0 | d(t.length);
1654 e = o(e, n);
1655 for (var i = 0; i < n; i += 1) e[i] = 255 & t[i];
1656 return e
1657 }
1658
1659 function d(e) {
1660 if (e >= a()) throw new RangeError(
1661 "Attempt to allocate Buffer larger than maximum size: 0x" + a().toString(
1662 16) + " bytes");
1663 return 0 | e
1664 }
1665
1666 function p(e, t) {
1667 if (c.isBuffer(e)) return e.length;
1668 if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer
1669 .isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e
1670 .byteLength;
1671 "string" != typeof e && (e = "" + e);
1672 var n = e.length;
1673 if (0 === n) return 0;
1674 for (var i = !1;;) switch (t) {
1675 case "ascii":
1676 case "latin1":
1677 case "binary":
1678 return n;
1679 case "utf8":
1680 case "utf-8":
1681 case void 0:
1682 return z(e).length;
1683 case "ucs2":
1684 case "ucs-2":
1685 case "utf16le":
1686 case "utf-16le":
1687 return 2 * n;
1688 case "hex":
1689 return n >>> 1;
1690 case "base64":
1691 return H(e).length;
1692 default:
1693 if (i) return z(e).length;
1694 t = ("" + t).toLowerCase(), i = !0
1695 }
1696 }
1697
1698 function g(e, t, n) {
1699 var i = e[t];
1700 e[t] = e[n], e[n] = i
1701 }
1702
1703 function m(e, t, n, i, r) {
1704 if (0 === e.length) return -1;
1705 if ("string" == typeof n ? (i = n, n = 0) : n > 2147483647 ? n =
1706 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (
1707 n = r ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
1708 if (r) return -1;
1709 n = e.length - 1
1710 } else if (n < 0) {
1711 if (!r) return -1;
1712 n = 0
1713 }
1714 if ("string" == typeof t && (t = c.from(t, i)), c.isBuffer(t)) return 0 ===
1715 t.length ? -1 : y(e, t, n, i, r);
1716 if ("number" == typeof t) return t &= 255, c.TYPED_ARRAY_SUPPORT &&
1717 "function" == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype
1718 .indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) :
1719 y(e, [t], n, i, r);
1720 throw new TypeError("val must be string, number or Buffer")
1721 }
1722
1723 function y(e, t, n, i, r) {
1724 var s, a = 1,
1725 o = e.length,
1726 c = t.length;
1727 if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase()) || "ucs-2" ===
1728 i || "utf16le" === i || "utf-16le" === i)) {
1729 if (e.length < 2 || t.length < 2) return -1;
1730 a = 2, o /= 2, c /= 2, n /= 2
1731 }
1732
1733 function l(e, t) {
1734 return 1 === a ? e[t] : e.readUInt16BE(t * a)
1735 }
1736 if (r) {
1737 var h = -1;
1738 for (s = n; s < o; s++)
1739 if (l(e, s) === l(t, -1 === h ? 0 : s - h)) {
1740 if (-1 === h && (h = s), s - h + 1 === c) return h * a
1741 } else -1 !== h && (s -= s - h), h = -1
1742 } else
1743 for (n + c > o && (n = o - c), s = n; s >= 0; s--) {
1744 for (var u = !0, f = 0; f < c; f++)
1745 if (l(e, s + f) !== l(t, f)) {
1746 u = !1;
1747 break
1748 }
1749 if (u) return s
1750 }
1751 return -1
1752 }
1753
1754 function k(e, t, n, i) {
1755 n = Number(n) || 0;
1756 var r = e.length - n;
1757 i ? (i = Number(i)) > r && (i = r) : i = r;
1758 var s = t.length;
1759 if (s % 2 != 0) throw new TypeError("Invalid hex string");
1760 i > s / 2 && (i = s / 2);
1761 for (var a = 0; a < i; ++a) {
1762 var o = parseInt(t.substr(2 * a, 2), 16);
1763 if (isNaN(o)) return a;
1764 e[n + a] = o
1765 }
1766 return a
1767 }
1768
1769 function v(e, t, n, i) {
1770 return V(z(t, e.length - n), e, n, i)
1771 }
1772
1773 function w(e, t, n, i) {
1774 return V(function(e) {
1775 for (var t = [], n = 0; n < e.length; ++n) t.push(255 & e.charCodeAt(n));
1776 return t
1777 }(t), e, n, i)
1778 }
1779
1780 function b(e, t, n, i) {
1781 return w(e, t, n, i)
1782 }
1783
1784 function x(e, t, n, i) {
1785 return V(H(t), e, n, i)
1786 }
1787
1788 function S(e, t, n, i) {
1789 return V(function(e, t) {
1790 for (var n, i, r, s = [], a = 0; a < e.length && !((t -= 2) < 0); ++a)
1791 i = (n = e.charCodeAt(a)) >> 8, r = n % 256, s.push(r), s.push(i);
1792 return s
1793 }(t, e.length - n), e, n, i)
1794 }
1795
1796 function T(e, t, n) {
1797 return 0 === t && n === e.length ? i.fromByteArray(e) : i.fromByteArray(e
1798 .slice(t, n))
1799 }
1800
1801 function I(e, t, n) {
1802 n = Math.min(e.length, n);
1803 for (var i = [], r = t; r < n;) {
1804 var s, a, o, c, l = e[r],
1805 h = null,
1806 u = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
1807 if (r + u <= n) switch (u) {
1808 case 1:
1809 l < 128 && (h = l);
1810 break;
1811 case 2:
1812 128 == (192 & (s = e[r + 1])) && (c = (31 & l) << 6 | 63 & s) > 127 &&
1813 (h = c);
1814 break;
1815 case 3:
1816 s = e[r + 1], a = e[r + 2], 128 == (192 & s) && 128 == (192 & a) && (
1817 c = (15 & l) << 12 | (63 & s) << 6 | 63 & a) > 2047 && (c < 55296 ||
1818 c > 57343) && (h = c);
1819 break;
1820 case 4:
1821 s = e[r + 1], a = e[r + 2], o = e[r + 3], 128 == (192 & s) && 128 ==
1822 (192 & a) && 128 == (192 & o) && (c = (15 & l) << 18 | (63 & s) <<
1823 12 | (63 & a) << 6 | 63 & o) > 65535 && c < 1114112 && (h = c)
1824 }
1825 null === h ? (h = 65533, u = 1) : h > 65535 && (h -= 65536, i.push(h >>>
1826 10 & 1023 | 55296), h = 56320 | 1023 & h), i.push(h), r += u
1827 }
1828 return function(e) {
1829 var t = e.length;
1830 if (t <= E) return String.fromCharCode.apply(String, e);
1831 for (var n = "", i = 0; i < t;) n += String.fromCharCode.apply(String,
1832 e.slice(i, i += E));
1833 return n
1834 }(i)
1835 }
1836 t.Buffer = c, t.SlowBuffer = function(e) {
1837 return +e != e && (e = 0), c.alloc(+e)
1838 }, t.INSPECT_MAX_BYTES = 50, c.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ?
1839 e.TYPED_ARRAY_SUPPORT : function() {
1840 try {
1841 var e = new Uint8Array(1);
1842 return e.__proto__ = {
1843 __proto__: Uint8Array.prototype,
1844 foo: function() {
1845 return 42
1846 }
1847 }, 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(
1848 1, 1).byteLength
1849 } catch (e) {
1850 return !1
1851 }
1852 }(), t.kMaxLength = a(), c.poolSize = 8192, c._augment = function(e) {
1853 return e.__proto__ = c.prototype, e
1854 }, c.from = function(e, t, n) {
1855 return l(null, e, t, n)
1856 }, c.TYPED_ARRAY_SUPPORT && (c.prototype.__proto__ = Uint8Array.prototype,
1857 c.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species &&
1858 c[Symbol.species] === c && Object.defineProperty(c, Symbol.species, {
1859 value: null,
1860 configurable: !0
1861 })), c.alloc = function(e, t, n) {
1862 return function(e, t, n, i) {
1863 return h(t), t <= 0 ? o(e, t) : void 0 !== n ? "string" == typeof i ?
1864 o(e, t).fill(n, i) : o(e, t).fill(n) : o(e, t)
1865 }(null, e, t, n)
1866 }, c.allocUnsafe = function(e) {
1867 return u(null, e)
1868 }, c.allocUnsafeSlow = function(e) {
1869 return u(null, e)
1870 }, c.isBuffer = function(e) {
1871 return !(null == e || !e._isBuffer)
1872 }, c.compare = function(e, t) {
1873 if (!c.isBuffer(e) || !c.isBuffer(t)) throw new TypeError(
1874 "Arguments must be Buffers");
1875 if (e === t) return 0;
1876 for (var n = e.length, i = t.length, r = 0, s = Math.min(n, i); r < s; ++
1877 r)
1878 if (e[r] !== t[r]) {
1879 n = e[r], i = t[r];
1880 break
1881 }
1882 return n < i ? -1 : i < n ? 1 : 0
1883 }, c.isEncoding = function(e) {
1884 switch (String(e).toLowerCase()) {
1885 case "hex":
1886 case "utf8":
1887 case "utf-8":
1888 case "ascii":
1889 case "latin1":
1890 case "binary":
1891 case "base64":
1892 case "ucs2":
1893 case "ucs-2":
1894 case "utf16le":
1895 case "utf-16le":
1896 return !0;
1897 default:
1898 return !1
1899 }
1900 }, c.concat = function(e, t) {
1901 if (!s(e)) throw new TypeError(
1902 '"list" argument must be an Array of Buffers');
1903 if (0 === e.length) return c.alloc(0);
1904 var n;
1905 if (void 0 === t)
1906 for (t = 0, n = 0; n < e.length; ++n) t += e[n].length;
1907 var i = c.allocUnsafe(t),
1908 r = 0;
1909 for (n = 0; n < e.length; ++n) {
1910 var a = e[n];
1911 if (!c.isBuffer(a)) throw new TypeError(
1912 '"list" argument must be an Array of Buffers');
1913 a.copy(i, r), r += a.length
1914 }
1915 return i
1916 }, c.byteLength = p, c.prototype._isBuffer = !0, c.prototype.swap16 =
1917 function() {
1918 var e = this.length;
1919 if (e % 2 != 0) throw new RangeError(
1920 "Buffer size must be a multiple of 16-bits");
1921 for (var t = 0; t < e; t += 2) g(this, t, t + 1);
1922 return this
1923 }, c.prototype.swap32 = function() {
1924 var e = this.length;
1925 if (e % 4 != 0) throw new RangeError(
1926 "Buffer size must be a multiple of 32-bits");
1927 for (var t = 0; t < e; t += 4) g(this, t, t + 3), g(this, t + 1, t + 2);
1928 return this
1929 }, c.prototype.swap64 = function() {
1930 var e = this.length;
1931 if (e % 8 != 0) throw new RangeError(
1932 "Buffer size must be a multiple of 64-bits");
1933 for (var t = 0; t < e; t += 8) g(this, t, t + 7), g(this, t + 1, t + 6),
1934 g(this, t + 2, t + 5), g(this, t + 3, t + 4);
1935 return this
1936 }, c.prototype.toString = function() {
1937 var e = 0 | this.length;
1938 return 0 === e ? "" : 0 === arguments.length ? I(this, 0, e) : function(
1939 e, t, n) {
1940 var i = !1;
1941 if ((void 0 === t || t < 0) && (t = 0), t > this.length) return "";
1942 if ((void 0 === n || n > this.length) && (n = this.length), n <= 0)
1943 return "";
1944 if ((n >>>= 0) <= (t >>>= 0)) return "";
1945 for (e || (e = "utf8");;) switch (e) {
1946 case "hex":
1947 return P(this, t, n);
1948 case "utf8":
1949 case "utf-8":
1950 return I(this, t, n);
1951 case "ascii":
1952 return M(this, t, n);
1953 case "latin1":
1954 case "binary":
1955 return A(this, t, n);
1956 case "base64":
1957 return T(this, t, n);
1958 case "ucs2":
1959 case "ucs-2":
1960 case "utf16le":
1961 case "utf-16le":
1962 return B(this, t, n);
1963 default:
1964 if (i) throw new TypeError("Unknown encoding: " + e);
1965 e = (e + "").toLowerCase(), i = !0
1966 }
1967 }.apply(this, arguments)
1968 }, c.prototype.equals = function(e) {
1969 if (!c.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
1970 return this === e || 0 === c.compare(this, e)
1971 }, c.prototype.inspect = function() {
1972 var e = "",
1973 n = t.INSPECT_MAX_BYTES;
1974 return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g)
1975 .join(" "), this.length > n && (e += " ... ")), "<Buffer " + e + ">"
1976 }, c.prototype.compare = function(e, t, n, i, r) {
1977 if (!c.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
1978 if (void 0 === t && (t = 0), void 0 === n && (n = e ? e.length : 0),
1979 void 0 === i && (i = 0), void 0 === r && (r = this.length), t < 0 || n >
1980 e.length || i < 0 || r > this.length) throw new RangeError(
1981 "out of range index");
1982 if (i >= r && t >= n) return 0;
1983 if (i >= r) return -1;
1984 if (t >= n) return 1;
1985 if (this === e) return 0;
1986 for (var s = (r >>>= 0) - (i >>>= 0), a = (n >>>= 0) - (t >>>= 0), o =
1987 Math.min(s, a), l = this.slice(i, r), h = e.slice(t, n), u = 0; u < o; ++
1988 u)
1989 if (l[u] !== h[u]) {
1990 s = l[u], a = h[u];
1991 break
1992 }
1993 return s < a ? -1 : a < s ? 1 : 0
1994 }, c.prototype.includes = function(e, t, n) {
1995 return -1 !== this.indexOf(e, t, n)
1996 }, c.prototype.indexOf = function(e, t, n) {
1997 return m(this, e, t, n, !0)
1998 }, c.prototype.lastIndexOf = function(e, t, n) {
1999 return m(this, e, t, n, !1)
2000 }, c.prototype.write = function(e, t, n, i) {
2001 if (void 0 === t) i = "utf8", n = this.length, t = 0;
2002 else if (void 0 === n && "string" == typeof t) i = t, n = this.length, t =
2003 0;
2004 else {
2005 if (!isFinite(t)) throw new Error(
2006 "Buffer.write(string, encoding, offset[, length]) is no longer supported"
2007 );
2008 t |= 0, isFinite(n) ? (n |= 0, void 0 === i && (i = "utf8")) : (i = n,
2009 n = void 0)
2010 }
2011 var r = this.length - t;
2012 if ((void 0 === n || n > r) && (n = r), e.length > 0 && (n < 0 || t < 0) ||
2013 t > this.length) throw new RangeError(
2014 "Attempt to write outside buffer bounds");
2015 i || (i = "utf8");
2016 for (var s = !1;;) switch (i) {
2017 case "hex":
2018 return k(this, e, t, n);
2019 case "utf8":
2020 case "utf-8":
2021 return v(this, e, t, n);
2022 case "ascii":
2023 return w(this, e, t, n);
2024 case "latin1":
2025 case "binary":
2026 return b(this, e, t, n);
2027 case "base64":
2028 return x(this, e, t, n);
2029 case "ucs2":
2030 case "ucs-2":
2031 case "utf16le":
2032 case "utf-16le":
2033 return S(this, e, t, n);
2034 default:
2035 if (s) throw new TypeError("Unknown encoding: " + i);
2036 i = ("" + i).toLowerCase(), s = !0
2037 }
2038 }, c.prototype.toJSON = function() {
2039 return {
2040 type: "Buffer",
2041 data: Array.prototype.slice.call(this._arr || this, 0)
2042 }
2043 };
2044 var E = 4096;
2045
2046 function M(e, t, n) {
2047 var i = "";
2048 n = Math.min(e.length, n);
2049 for (var r = t; r < n; ++r) i += String.fromCharCode(127 & e[r]);
2050 return i
2051 }
2052
2053 function A(e, t, n) {
2054 var i = "";
2055 n = Math.min(e.length, n);
2056 for (var r = t; r < n; ++r) i += String.fromCharCode(e[r]);
2057 return i
2058 }
2059
2060 function P(e, t, n) {
2061 var i = e.length;
2062 (!t || t < 0) && (t = 0), (!n || n < 0 || n > i) && (n = i);
2063 for (var r = "", s = t; s < n; ++s) r += F(e[s]);
2064 return r
2065 }
2066
2067 function B(e, t, n) {
2068 for (var i = e.slice(t, n), r = "", s = 0; s < i.length; s += 2) r +=
2069 String.fromCharCode(i[s] + 256 * i[s + 1]);
2070 return r
2071 }
2072
2073 function C(e, t, n) {
2074 if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint");
2075 if (e + t > n) throw new RangeError(
2076 "Trying to access beyond buffer length")
2077 }
2078
2079 function O(e, t, n, i, r, s) {
2080 if (!c.isBuffer(e)) throw new TypeError(
2081 '"buffer" argument must be a Buffer instance');
2082 if (t > r || t < s) throw new RangeError(
2083 '"value" argument is out of bounds');
2084 if (n + i > e.length) throw new RangeError("Index out of range")
2085 }
2086
2087 function R(e, t, n, i) {
2088 t < 0 && (t = 65535 + t + 1);
2089 for (var r = 0, s = Math.min(e.length - n, 2); r < s; ++r) e[n + r] = (t &
2090 255 << 8 * (i ? r : 1 - r)) >>> 8 * (i ? r : 1 - r)
2091 }
2092
2093 function j(e, t, n, i) {
2094 t < 0 && (t = 4294967295 + t + 1);
2095 for (var r = 0, s = Math.min(e.length - n, 4); r < s; ++r) e[n + r] = t >>>
2096 8 * (i ? r : 3 - r) & 255
2097 }
2098
2099 function _(e, t, n, i, r, s) {
2100 if (n + i > e.length) throw new RangeError("Index out of range");
2101 if (n < 0) throw new RangeError("Index out of range")
2102 }
2103
2104 function U(e, t, n, i, s) {
2105 return s || _(e, 0, n, 4), r.write(e, t, n, i, 23, 4), n + 4
2106 }
2107
2108 function D(e, t, n, i, s) {
2109 return s || _(e, 0, n, 8), r.write(e, t, n, i, 52, 8), n + 8
2110 }
2111 c.prototype.slice = function(e, t) {
2112 var n, i = this.length;
2113 if ((e = ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i), (t =
2114 void 0 === t ? i : ~~t) < 0 ? (t += i) < 0 && (t = 0) : t > i && (t =
2115 i), t < e && (t = e), c.TYPED_ARRAY_SUPPORT)(n = this.subarray(e, t)).__proto__ =
2116 c.prototype;
2117 else {
2118 var r = t - e;
2119 n = new c(r, void 0);
2120 for (var s = 0; s < r; ++s) n[s] = this[s + e]
2121 }
2122 return n
2123 }, c.prototype.readUIntLE = function(e, t, n) {
2124 e |= 0, t |= 0, n || C(e, t, this.length);
2125 for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256);) i += this[e +
2126 s] * r;
2127 return i
2128 }, c.prototype.readUIntBE = function(e, t, n) {
2129 e |= 0, t |= 0, n || C(e, t, this.length);
2130 for (var i = this[e + --t], r = 1; t > 0 && (r *= 256);) i += this[e +
2131 --t] * r;
2132 return i
2133 }, c.prototype.readUInt8 = function(e, t) {
2134 return t || C(e, 1, this.length), this[e]
2135 }, c.prototype.readUInt16LE = function(e, t) {
2136 return t || C(e, 2, this.length), this[e] | this[e + 1] << 8
2137 }, c.prototype.readUInt16BE = function(e, t) {
2138 return t || C(e, 2, this.length), this[e] << 8 | this[e + 1]
2139 }, c.prototype.readUInt32LE = function(e, t) {
2140 return t || C(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e +
2141 2] << 16) + 16777216 * this[e + 3]
2142 }, c.prototype.readUInt32BE = function(e, t) {
2143 return t || C(e, 4, this.length), 16777216 * this[e] + (this[e + 1] <<
2144 16 | this[e + 2] << 8 | this[e + 3])
2145 }, c.prototype.readIntLE = function(e, t, n) {
2146 e |= 0, t |= 0, n || C(e, t, this.length);
2147 for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256);) i += this[e +
2148 s] * r;
2149 return i >= (r *= 128) && (i -= Math.pow(2, 8 * t)), i
2150 }, c.prototype.readIntBE = function(e, t, n) {
2151 e |= 0, t |= 0, n || C(e, t, this.length);
2152 for (var i = t, r = 1, s = this[e + --i]; i > 0 && (r *= 256);) s +=
2153 this[e + --i] * r;
2154 return s >= (r *= 128) && (s -= Math.pow(2, 8 * t)), s
2155 }, c.prototype.readInt8 = function(e, t) {
2156 return t || C(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] +
2157 1) : this[e]
2158 }, c.prototype.readInt16LE = function(e, t) {
2159 t || C(e, 2, this.length);
2160 var n = this[e] | this[e + 1] << 8;
2161 return 32768 & n ? 4294901760 | n : n
2162 }, c.prototype.readInt16BE = function(e, t) {
2163 t || C(e, 2, this.length);
2164 var n = this[e + 1] | this[e] << 8;
2165 return 32768 & n ? 4294901760 | n : n
2166 }, c.prototype.readInt32LE = function(e, t) {
2167 return t || C(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e +
2168 2] << 16 | this[e + 3] << 24
2169 }, c.prototype.readInt32BE = function(e, t) {
2170 return t || C(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 |
2171 this[e + 2] << 8 | this[e + 3]
2172 }, c.prototype.readFloatLE = function(e, t) {
2173 return t || C(e, 4, this.length), r.read(this, e, !0, 23, 4)
2174 }, c.prototype.readFloatBE = function(e, t) {
2175 return t || C(e, 4, this.length), r.read(this, e, !1, 23, 4)
2176 }, c.prototype.readDoubleLE = function(e, t) {
2177 return t || C(e, 8, this.length), r.read(this, e, !0, 52, 8)
2178 }, c.prototype.readDoubleBE = function(e, t) {
2179 return t || C(e, 8, this.length), r.read(this, e, !1, 52, 8)
2180 }, c.prototype.writeUIntLE = function(e, t, n, i) {
2181 e = +e, t |= 0, n |= 0, i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
2182 var r = 1,
2183 s = 0;
2184 for (this[t] = 255 & e; ++s < n && (r *= 256);) this[t + s] = e / r &
2185 255;
2186 return t + n
2187 }, c.prototype.writeUIntBE = function(e, t, n, i) {
2188 e = +e, t |= 0, n |= 0, i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
2189 var r = n - 1,
2190 s = 1;
2191 for (this[t + r] = 255 & e; --r >= 0 && (s *= 256);) this[t + r] = e / s &
2192 255;
2193 return t + n
2194 }, c.prototype.writeUInt8 = function(e, t, n) {
2195 return e = +e, t |= 0, n || O(this, e, t, 1, 255, 0), c.TYPED_ARRAY_SUPPORT ||
2196 (e = Math.floor(e)), this[t] = 255 & e, t + 1
2197 }, c.prototype.writeUInt16LE = function(e, t, n) {
2198 return e = +e, t |= 0, n || O(this, e, t, 2, 65535, 0), c.TYPED_ARRAY_SUPPORT ?
2199 (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
2200 }, c.prototype.writeUInt16BE = function(e, t, n) {
2201 return e = +e, t |= 0, n || O(this, e, t, 2, 65535, 0), c.TYPED_ARRAY_SUPPORT ?
2202 (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
2203 }, c.prototype.writeUInt32LE = function(e, t, n) {
2204 return e = +e, t |= 0, n || O(this, e, t, 4, 4294967295, 0), c.TYPED_ARRAY_SUPPORT ?
2205 (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8,
2206 this[t] = 255 & e) : j(this, e, t, !0), t + 4
2207 }, c.prototype.writeUInt32BE = function(e, t, n) {
2208 return e = +e, t |= 0, n || O(this, e, t, 4, 4294967295, 0), c.TYPED_ARRAY_SUPPORT ?
2209 (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8,
2210 this[t + 3] = 255 & e) : j(this, e, t, !1), t + 4
2211 }, c.prototype.writeIntLE = function(e, t, n, i) {
2212 if (e = +e, t |= 0, !i) {
2213 var r = Math.pow(2, 8 * n - 1);
2214 O(this, e, t, n, r - 1, -r)
2215 }
2216 var s = 0,
2217 a = 1,
2218 o = 0;
2219 for (this[t] = 255 & e; ++s < n && (a *= 256);) e < 0 && 0 === o && 0 !==
2220 this[t + s - 1] && (o = 1), this[t + s] = (e / a >> 0) - o & 255;
2221 return t + n
2222 }, c.prototype.writeIntBE = function(e, t, n, i) {
2223 if (e = +e, t |= 0, !i) {
2224 var r = Math.pow(2, 8 * n - 1);
2225 O(this, e, t, n, r - 1, -r)
2226 }
2227 var s = n - 1,
2228 a = 1,
2229 o = 0;
2230 for (this[t + s] = 255 & e; --s >= 0 && (a *= 256);) e < 0 && 0 === o &&
2231 0 !== this[t + s + 1] && (o = 1), this[t + s] = (e / a >> 0) - o & 255;
2232 return t + n
2233 }, c.prototype.writeInt8 = function(e, t, n) {
2234 return e = +e, t |= 0, n || O(this, e, t, 1, 127, -128), c.TYPED_ARRAY_SUPPORT ||
2235 (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t +
2236 1
2237 }, c.prototype.writeInt16LE = function(e, t, n) {
2238 return e = +e, t |= 0, n || O(this, e, t, 2, 32767, -32768), c.TYPED_ARRAY_SUPPORT ?
2239 (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
2240 }, c.prototype.writeInt16BE = function(e, t, n) {
2241 return e = +e, t |= 0, n || O(this, e, t, 2, 32767, -32768), c.TYPED_ARRAY_SUPPORT ?
2242 (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
2243 }, c.prototype.writeInt32LE = function(e, t, n) {
2244 return e = +e, t |= 0, n || O(this, e, t, 4, 2147483647, -2147483648), c
2245 .TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8, this[
2246 t + 2] = e >>> 16, this[t + 3] = e >>> 24) : j(this, e, t, !0), t + 4
2247 }, c.prototype.writeInt32BE = function(e, t, n) {
2248 return e = +e, t |= 0, n || O(this, e, t, 4, 2147483647, -2147483648), e <
2249 0 && (e = 4294967295 + e + 1), c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>>
2250 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 &
2251 e) : j(this, e, t, !1), t + 4
2252 }, c.prototype.writeFloatLE = function(e, t, n) {
2253 return U(this, e, t, !0, n)
2254 }, c.prototype.writeFloatBE = function(e, t, n) {
2255 return U(this, e, t, !1, n)
2256 }, c.prototype.writeDoubleLE = function(e, t, n) {
2257 return D(this, e, t, !0, n)
2258 }, c.prototype.writeDoubleBE = function(e, t, n) {
2259 return D(this, e, t, !1, n)
2260 }, c.prototype.copy = function(e, t, n, i) {
2261 if (n || (n = 0), i || 0 === i || (i = this.length), t >= e.length && (t =
2262 e.length), t || (t = 0), i > 0 && i < n && (i = n), i === n) return 0;
2263 if (0 === e.length || 0 === this.length) return 0;
2264 if (t < 0) throw new RangeError("targetStart out of bounds");
2265 if (n < 0 || n >= this.length) throw new RangeError(
2266 "sourceStart out of bounds");
2267 if (i < 0) throw new RangeError("sourceEnd out of bounds");
2268 i > this.length && (i = this.length), e.length - t < i - n && (i = e.length -
2269 t + n);
2270 var r, s = i - n;
2271 if (this === e && n < t && t < i)
2272 for (r = s - 1; r >= 0; --r) e[r + t] = this[r + n];
2273 else if (s < 1e3 || !c.TYPED_ARRAY_SUPPORT)
2274 for (r = 0; r < s; ++r) e[r + t] = this[r + n];
2275 else Uint8Array.prototype.set.call(e, this.subarray(n, n + s), t);
2276 return s
2277 }, c.prototype.fill = function(e, t, n, i) {
2278 if ("string" == typeof e) {
2279 if ("string" == typeof t ? (i = t, t = 0, n = this.length) : "string" ==
2280 typeof n && (i = n, n = this.length), 1 === e.length) {
2281 var r = e.charCodeAt(0);
2282 r < 256 && (e = r)
2283 }
2284 if (void 0 !== i && "string" != typeof i) throw new TypeError(
2285 "encoding must be a string");
2286 if ("string" == typeof i && !c.isEncoding(i)) throw new TypeError(
2287 "Unknown encoding: " + i)
2288 } else "number" == typeof e && (e &= 255);
2289 if (t < 0 || this.length < t || this.length < n) throw new RangeError(
2290 "Out of range index");
2291 if (n <= t) return this;
2292 var s;
2293 if (t >>>= 0, n = void 0 === n ? this.length : n >>> 0, e || (e = 0),
2294 "number" == typeof e)
2295 for (s = t; s < n; ++s) this[s] = e;
2296 else {
2297 var a = c.isBuffer(e) ? e : z(new c(e, i).toString()),
2298 o = a.length;
2299 for (s = 0; s < n - t; ++s) this[s + t] = a[s % o]
2300 }
2301 return this
2302 };
2303 var L = /[^+\/0-9A-Za-z-_]/g;
2304
2305 function F(e) {
2306 return e < 16 ? "0" + e.toString(16) : e.toString(16)
2307 }
2308
2309 function z(e, t) {
2310 var n;
2311 t = t || 1 / 0;
2312 for (var i = e.length, r = null, s = [], a = 0; a < i; ++a) {
2313 if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
2314 if (!r) {
2315 if (n > 56319) {
2316 (t -= 3) > -1 && s.push(239, 191, 189);
2317 continue
2318 }
2319 if (a + 1 === i) {
2320 (t -= 3) > -1 && s.push(239, 191, 189);
2321 continue
2322 }
2323 r = n;
2324 continue
2325 }
2326 if (n < 56320) {
2327 (t -= 3) > -1 && s.push(239, 191, 189), r = n;
2328 continue
2329 }
2330 n = 65536 + (r - 55296 << 10 | n - 56320)
2331 } else r && (t -= 3) > -1 && s.push(239, 191, 189);
2332 if (r = null, n < 128) {
2333 if ((t -= 1) < 0) break;
2334 s.push(n)
2335 } else if (n < 2048) {
2336 if ((t -= 2) < 0) break;
2337 s.push(n >> 6 | 192, 63 & n | 128)
2338 } else if (n < 65536) {
2339 if ((t -= 3) < 0) break;
2340 s.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
2341 } else {
2342 if (!(n < 1114112)) throw new Error("Invalid code point");
2343 if ((t -= 4) < 0) break;
2344 s.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n |
2345 128)
2346 }
2347 }
2348 return s
2349 }
2350
2351 function H(e) {
2352 return i.toByteArray(function(e) {
2353 if ((e = function(e) {
2354 return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
2355 }(e).replace(L, "")).length < 2) return "";
2356 for (; e.length % 4 != 0;) e += "=";
2357 return e
2358 }(e))
2359 }
2360
2361 function V(e, t, n, i) {
2362 for (var r = 0; r < i && !(r + n >= t.length || r >= e.length); ++r) t[r +
2363 n] = e[r];
2364 return r
2365 }
2366 }).call(this, n(12))
2367}, function(e, t) {
2368 var n;
2369 n = function() {
2370 return this
2371 }();
2372 try {
2373 n = n || new Function("return this")()
2374 } catch (e) {
2375 "object" == typeof window && (n = window)
2376 }
2377 e.exports = n
2378}, function(e, t) {
2379 for (var n = t.uint8 = new Array(256), i = 0; i <= 255; i++) n[i] = r(i);
2380
2381 function r(e) {
2382 return function(t) {
2383 var n = t.reserve(1);
2384 t.buffer[n] = e
2385 }
2386 }
2387}, function(e, t, n) {
2388 t.FlexDecoder = s, t.FlexEncoder = a;
2389 var i = n(0),
2390 r = "BUFFER_SHORTAGE";
2391
2392 function s() {
2393 if (!(this instanceof s)) return new s
2394 }
2395
2396 function a() {
2397 if (!(this instanceof a)) return new a
2398 }
2399
2400 function o() {
2401 throw new Error("method not implemented: write()")
2402 }
2403
2404 function c() {
2405 throw new Error("method not implemented: fetch()")
2406 }
2407
2408 function l() {
2409 return this.buffers && this.buffers.length ? (this.flush(), this.pull()) :
2410 this.fetch()
2411 }
2412
2413 function h(e) {
2414 (this.buffers || (this.buffers = [])).push(e)
2415 }
2416
2417 function u() {
2418 return (this.buffers || (this.buffers = [])).shift()
2419 }
2420
2421 function f(e) {
2422 return function(t) {
2423 for (var n in e) t[n] = e[n];
2424 return t
2425 }
2426 }
2427 s.mixin = f({
2428 bufferish: i,
2429 write: function(e) {
2430 var t = this.offset ? i.prototype.slice.call(this.buffer, this.offset) :
2431 this.buffer;
2432 this.buffer = t ? e ? this.bufferish.concat([t, e]) : t : e, this.offset =
2433 0
2434 },
2435 fetch: c,
2436 flush: function() {
2437 for (; this.offset < this.buffer.length;) {
2438 var e, t = this.offset;
2439 try {
2440 e = this.fetch()
2441 } catch (e) {
2442 if (e && e.message != r) throw e;
2443 this.offset = t;
2444 break
2445 }
2446 this.push(e)
2447 }
2448 },
2449 push: h,
2450 pull: u,
2451 read: l,
2452 reserve: function(e) {
2453 var t = this.offset,
2454 n = t + e;
2455 if (n > this.buffer.length) throw new Error(r);
2456 return this.offset = n, t
2457 },
2458 offset: 0
2459 }), s.mixin(s.prototype), a.mixin = f({
2460 bufferish: i,
2461 write: o,
2462 fetch: function() {
2463 var e = this.start;
2464 if (e < this.offset) {
2465 var t = this.start = this.offset;
2466 return i.prototype.slice.call(this.buffer, e, t)
2467 }
2468 },
2469 flush: function() {
2470 for (; this.start < this.offset;) {
2471 var e = this.fetch();
2472 e && this.push(e)
2473 }
2474 },
2475 push: h,
2476 pull: function() {
2477 var e = this.buffers || (this.buffers = []),
2478 t = e.length > 1 ? this.bufferish.concat(e) : e[0];
2479 return e.length = 0, t
2480 },
2481 read: l,
2482 reserve: function(e) {
2483 var t = 0 | e;
2484 if (this.buffer) {
2485 var n = this.buffer.length,
2486 i = 0 | this.offset,
2487 r = i + t;
2488 if (r < n) return this.offset = r, i;
2489 this.flush(), e = Math.max(e, Math.min(2 * n, this.maxBufferSize))
2490 }
2491 return e = Math.max(e, this.minBufferSize), this.buffer = this.bufferish
2492 .alloc(e), this.start = 0, this.offset = t, 0
2493 },
2494 send: function(e) {
2495 var t = e.length;
2496 if (t > this.minBufferSize) this.flush(), this.push(e);
2497 else {
2498 var n = this.reserve(t);
2499 i.prototype.copy.call(e, this.buffer, n)
2500 }
2501 },
2502 maxBufferSize: 65536,
2503 minBufferSize: 2048,
2504 offset: 0,
2505 start: 0
2506 }), a.mixin(a.prototype)
2507}, function(e, t, n) {
2508 t.decode = function(e, t) {
2509 var n = new i(t);
2510 return n.write(e), n.read()
2511 };
2512 var i = n(16).DecodeBuffer
2513}, function(e, t, n) {
2514 t.DecodeBuffer = r;
2515 var i = n(8).preset;
2516
2517 function r(e) {
2518 if (!(this instanceof r)) return new r(e);
2519 if (e && (this.options = e, e.codec)) {
2520 var t = this.codec = e.codec;
2521 t.bufferish && (this.bufferish = t.bufferish)
2522 }
2523 }
2524 n(14).FlexDecoder.mixin(r.prototype), r.prototype.codec = i, r.prototype.fetch =
2525 function() {
2526 return this.codec.decode(this)
2527 }
2528}, function(e, t, n) {
2529 var i = n(4),
2530 r = n(7),
2531 s = r.Uint64BE,
2532 a = r.Int64BE;
2533 t.getReadFormat = function(e) {
2534 var t = o.hasArrayBuffer && e && e.binarraybuffer,
2535 n = e && e.int64;
2536 return {
2537 map: l && e && e.usemap ? u : h,
2538 array: f,
2539 str: d,
2540 bin: t ? g : p,
2541 ext: m,
2542 uint8: y,
2543 uint16: v,
2544 uint32: b,
2545 uint64: S(8, n ? E : T),
2546 int8: k,
2547 int16: w,
2548 int32: x,
2549 int64: S(8, n ? M : I),
2550 float32: S(4, A),
2551 float64: S(8, P)
2552 }
2553 }, t.readUint8 = y;
2554 var o = n(0),
2555 c = n(6),
2556 l = "undefined" != typeof Map;
2557
2558 function h(e, t) {
2559 var n, i = {},
2560 r = new Array(t),
2561 s = new Array(t),
2562 a = e.codec.decode;
2563 for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
2564 for (n = 0; n < t; n++) i[r[n]] = s[n];
2565 return i
2566 }
2567
2568 function u(e, t) {
2569 var n, i = new Map,
2570 r = new Array(t),
2571 s = new Array(t),
2572 a = e.codec.decode;
2573 for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
2574 for (n = 0; n < t; n++) i.set(r[n], s[n]);
2575 return i
2576 }
2577
2578 function f(e, t) {
2579 for (var n = new Array(t), i = e.codec.decode, r = 0; r < t; r++) n[r] = i(
2580 e);
2581 return n
2582 }
2583
2584 function d(e, t) {
2585 var n = e.reserve(t),
2586 i = n + t;
2587 return c.toString.call(e.buffer, "utf-8", n, i)
2588 }
2589
2590 function p(e, t) {
2591 var n = e.reserve(t),
2592 i = n + t,
2593 r = c.slice.call(e.buffer, n, i);
2594 return o.from(r)
2595 }
2596
2597 function g(e, t) {
2598 var n = e.reserve(t),
2599 i = n + t,
2600 r = c.slice.call(e.buffer, n, i);
2601 return o.Uint8Array.from(r).buffer
2602 }
2603
2604 function m(e, t) {
2605 var n = e.reserve(t + 1),
2606 i = e.buffer[n++],
2607 r = n + t,
2608 s = e.codec.getExtUnpacker(i);
2609 if (!s) throw new Error("Invalid ext type: " + (i ? "0x" + i.toString(16) :
2610 i));
2611 return s(c.slice.call(e.buffer, n, r))
2612 }
2613
2614 function y(e) {
2615 var t = e.reserve(1);
2616 return e.buffer[t]
2617 }
2618
2619 function k(e) {
2620 var t = e.reserve(1),
2621 n = e.buffer[t];
2622 return 128 & n ? n - 256 : n
2623 }
2624
2625 function v(e) {
2626 var t = e.reserve(2),
2627 n = e.buffer;
2628 return n[t++] << 8 | n[t]
2629 }
2630
2631 function w(e) {
2632 var t = e.reserve(2),
2633 n = e.buffer,
2634 i = n[t++] << 8 | n[t];
2635 return 32768 & i ? i - 65536 : i
2636 }
2637
2638 function b(e) {
2639 var t = e.reserve(4),
2640 n = e.buffer;
2641 return 16777216 * n[t++] + (n[t++] << 16) + (n[t++] << 8) + n[t]
2642 }
2643
2644 function x(e) {
2645 var t = e.reserve(4),
2646 n = e.buffer;
2647 return n[t++] << 24 | n[t++] << 16 | n[t++] << 8 | n[t]
2648 }
2649
2650 function S(e, t) {
2651 return function(n) {
2652 var i = n.reserve(e);
2653 return t.call(n.buffer, i, !0)
2654 }
2655 }
2656
2657 function T(e) {
2658 return new s(this, e).toNumber()
2659 }
2660
2661 function I(e) {
2662 return new a(this, e).toNumber()
2663 }
2664
2665 function E(e) {
2666 return new s(this, e)
2667 }
2668
2669 function M(e) {
2670 return new a(this, e)
2671 }
2672
2673 function A(e) {
2674 return i.read(this, e, !1, 23, 4)
2675 }
2676
2677 function P(e) {
2678 return i.read(this, e, !1, 52, 8)
2679 }
2680}, function(e, t, n) {
2681 ! function(t) {
2682 e.exports = t;
2683 var n = "listeners",
2684 i = {
2685 on: function(e, t) {
2686 return a(this, e).push(t), this
2687 },
2688 once: function(e, t) {
2689 var n = this;
2690 return i.originalListener = t, a(n, e).push(i), n;
2691
2692 function i() {
2693 s.call(n, e, i), t.apply(this, arguments)
2694 }
2695 },
2696 off: s,
2697 emit: function(e, t) {
2698 var n = this,
2699 i = a(n, e, !0);
2700 if (!i) return !1;
2701 var r = arguments.length;
2702 if (1 === r) i.forEach((function(e) {
2703 e.call(n)
2704 }));
2705 else if (2 === r) i.forEach((function(e) {
2706 e.call(n, t)
2707 }));
2708 else {
2709 var s = Array.prototype.slice.call(arguments, 1);
2710 i.forEach((function(e) {
2711 e.apply(n, s)
2712 }))
2713 }
2714 return !!i.length
2715 }
2716 };
2717
2718 function r(e) {
2719 for (var t in i) e[t] = i[t];
2720 return e
2721 }
2722
2723 function s(e, t) {
2724 var i;
2725 if (arguments.length) {
2726 if (t) {
2727 if (i = a(this, e, !0)) {
2728 if (!(i = i.filter((function(e) {
2729 return e !== t && e.originalListener !== t
2730 }))).length) return s.call(this, e);
2731 this[n][e] = i
2732 }
2733 } else if ((i = this[n]) && (delete i[e], !Object.keys(i).length)) return s
2734 .call(this)
2735 } else delete this[n];
2736 return this
2737 }
2738
2739 function a(e, t, i) {
2740 if (!i || e[n]) {
2741 var r = e[n] || (e[n] = {});
2742 return r[t] || (r[t] = [])
2743 }
2744 }
2745 r(t.prototype), t.mixin = r
2746 }((
2747 /**
2748 * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)
2749 *
2750 * @copyright Yusuke Kawasaki
2751 * @license MIT
2752 * @constructor
2753 * @see https://github.com/kawanet/event-lite
2754 * @see http://kawanet.github.io/event-lite/EventLite.html
2755 * @example
2756 * var EventLite = require("event-lite");
2757 *
2758 * function MyClass() {...} // your class
2759 *
2760 * EventLite.mixin(MyClass.prototype); // import event methods
2761 *
2762 * var obj = new MyClass();
2763 * obj.on("foo", function() {...}); // add event listener
2764 * obj.once("bar", function() {...}); // add one-time event listener
2765 * obj.emit("foo"); // dispatch event
2766 * obj.emit("bar"); // dispatch another event
2767 * obj.off("foo"); // remove event listener
2768 */
2769 function e() {
2770 if (!(this instanceof e)) return new e
2771 }))
2772}, function(e, t, n) {
2773 (function(t) {
2774 e.exports.maxScreenWidth = 1920, e.exports.maxScreenHeight = 1080, e.exports
2775 .serverUpdateRate = 9, e.exports.maxPlayers = 999999, e.exports.maxPlayersHard = 999999, e.exports.collisionDepth = 6, e.exports.minimapRate = 3e3, e.exports.colGrid =
2776 10, e.exports.clientSendRate = 5, e.exports.healthBarWidth = 50, e.exports
2777 .healthBarPad = 4.5, e.exports.iconPadding = 15, e.exports.iconPad = .9,
2778 e.exports.deathFadeout = 1, e.exports.crownIconScale = 60, e.exports.crownPad =
2779 35, e.exports.chatCountdown = 3000, e.exports.chatCooldown = 0, e.exports
2780 .inSandbox = t && "mm_exp" === t.env.VULTR_SCHEME, e.exports.maxAge = 100,
2781 e.exports.gatherAngle = Math.PI / 2.6, e.exports.gatherWiggle = 10, e.exports
2782 .hitReturnRatio = .25, e.exports.hitAngle = Math.PI / 2, e.exports.playerScale =
2783 35, e.exports.playerSpeed = .0016, e.exports.playerDecel = .993, e.exports
2784 .nameY = 34, e.exports.skinColors = ["#FFF700", "#FF0000", "#0000", "#2A1F3", "#000000", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3", "#9100ff"
2785 ], e.exports.animalCount = 7, e.exports.aiTurnRandom = .06, e.exports.cowNames = [
2786 "Anime Boy", "Anime Boy", "MT | BEST", "Anime Boy", "MT | BEST", " MT | BEST", "Anime Boy",
2787 "WaspHype", "XyZ", "ExtinctioN", "GayBoooN", "Ashura", "Arsen", "ArenaSlayer",
2788 "DeAtHKiller", "DeAtHWans", "GodSpeed", "Sn1ph3r", "Kikioo", "Kiko", "Yamato", "Sn1ph3r",
2789 "Afterneath", "MrSpikes", "PandaClaus", "KingKiller", "Accident", "FiShY", "BiRdY",
2790 "Tolerate", "DerpyDerp", "Nanityato", "DeStiny", "aQuiVeR", "Slayer69", "PlankTonV",
2791 "SoulBreaker", "Pet", "Baki", "UnStoppable", "UnCrushh", "ShellShock", "COLOR", "GodMode",
2792 "AndManyMore"
2793 ], e.exports.shieldAngle = Math.PI / 3, e.exports.weaponVariants = [{
2794 id: 0,
2795 src: "",
2796 xp: 0,
2797 val: 1
2798 }, {
2799 id: 1,
2800 src: "_g",
2801 xp: 3e3,
2802 val: 1.1
2803 }, {
2804 id: 2,
2805 src: "_d",
2806 xp: 7e3,
2807 val: 1.18
2808 }, {
2809 id: 3,
2810 src: "_r",
2811 poison: !0,
2812 xp: 12e3,
2813 val: 1.18
2814 }], e.exports.fetchVariant = function(t) {
2815 for (var n = t.weaponXP[t.weaponIndex] || 0, i = e.exports.weaponVariants
2816 .length - 1; i >= 0; --i)
2817 if (n >= e.exports.weaponVariants[i].xp) return e.exports.weaponVariants[
2818 i]
2819 }, e.exports.resourceTypes = ["wood", "food", "stone", "points"], e.exports
2820 .areaCount = 7, e.exports.treesPerArea = 9, e.exports.bushesPerArea = 3,
2821 e.exports.totalRocks = 32, e.exports.goldOres = 7, e.exports.riverWidth =
2822 724, e.exports.riverPadding = 114, e.exports.waterCurrent = .0011, e.exports
2823 .waveSpeed = 1e-4, e.exports.waveMax = 1.3, e.exports.treeScales = [150,
2824 160, 165, 175
2825 ], e.exports.bushScales = [80, 85, 95], e.exports.rockScales = [80, 85,
2826 90
2827 ], e.exports.snowBiomeTop = 2400, e.exports.snowSpeed = .75, e.exports.maxNameLength =
2828 199999999, e.exports.mapScale = 14400, e.exports.mapPingScale = 40, e.exports.mapPingTime =
2829 2200
2830 }).call(this, n(41))
2831}, function(e, t) {
2832 var n = {
2833 utf8: {
2834 stringToBytes: function(e) {
2835 return n.bin.stringToBytes(unescape(encodeURIComponent(e)))
2836 },
2837 bytesToString: function(e) {
2838 return decodeURIComponent(escape(n.bin.bytesToString(e)))
2839 }
2840 },
2841 bin: {
2842 stringToBytes: function(e) {
2843 for (var t = [], n = 0; n < e.length; n++) t.push(255 & e.charCodeAt(n));
2844 return t
2845 },
2846 bytesToString: function(e) {
2847 for (var t = [], n = 0; n < e.length; n++) t.push(String.fromCharCode(e[
2848 n]));
2849 return t.join("")
2850 }
2851 }
2852 };
2853 e.exports = n
2854}, function(e, t, n) {
2855 "use strict";
2856 window.loadedScript = !0;
2857 var i = "127.0.0.1" !== location.hostname && !location.hostname.startsWith(
2858 "192.168.");
2859 n(22);
2860 var r = n(23),
2861 s = n(42),
2862 a = n(43),
2863 o = n(19),
2864 c = n(44),
2865 l = n(45),
2866 h = (n(46), n(47)),
2867 u = n(48),
2868 f = n(55),
2869 d = n(56),
2870 p = n(57),
2871 g = n(58).obj,
2872 m = new a.TextManager,
2873 y = new(n(59))("moomoo.io", 3e3, o.maxPlayers, 5, !1);
2874 y.debugLog = !1;
2875 var k = !1;
2876
2877 function v() {
2878 ht && ut && (k = !0, i ? window.grecaptcha.execute(
2879 "6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
2880 action: "homepage"
2881 }).then((function(e) {
2882 w(e)
2883 })) : w(null))
2884 }
2885
2886 function w(e) {
2887 y.start((function(t, n, a) {
2888 var c = (i ? "wss" : "ws") + "://" + t + ":8008/?gameIndex=" + a;
2889 e && (c += "&token=" + encodeURIComponent(e)), r.connect(c, (function(e) {
2890 Bi(), setInterval(() => Bi(), 2500), e ? ft(e) : (ue.onclick = s.checkTrusted(
2891 (function() {
2892 ! function() {
2893 var e = ++bt > 1,
2894 t = Date.now() - wt > vt;
2895 e && t ? (wt = Date.now(), xt()) : Tn()
2896 }()
2897 })), s.hookTouchEvents(ue), fe.onclick = s.checkTrusted((
2898 function() {
2899 Oi("https://krunker.io")
2900 })), s.hookTouchEvents(fe), pe.onclick = s.checkTrusted((
2901 function() {
2902 setTimeout((function() {
2903 ! function() {
2904 var e = xe.value,
2905 t = prompt("party key", e);
2906 t && (window.onbeforeunload = void 0, window.location.href =
2907 "/?server=" + t)
2908 }()
2909 }), 10)
2910 })), s.hookTouchEvents(pe), ge.onclick = s.checkTrusted((
2911 function() {
2912 Ae.classList.contains("showing") ? (Ae.classList.remove(
2913 "showing"), me.innerText = "Settings") : (Ae.classList.add(
2914 "showing"), me.innerText = "Close")
2915 })), s.hookTouchEvents(ge), ye.onclick = s.checkTrusted((
2916 function() {
2917 yn(), "block" != Ye.style.display ? Ut() : Ye.style.display =
2918 "none"
2919 })), s.hookTouchEvents(ye), ke.onclick = s.checkTrusted((
2920 function() {
2921 "block" != Qe.style.display ? (Qe.style.display = "block", Ye.style
2922 .display = "none", an(), Gt()) : Qe.style.display = "none"
2923 })), s.hookTouchEvents(ke), ve.onclick = s.checkTrusted((
2924 function() {
2925 rn()
2926 })), s.hookTouchEvents(ve), Ne.onclick = s.checkTrusted((
2927 function() {
2928 xn()
2929 })), s.hookTouchEvents(Ne), function() {
2930 for (var e = 0; e < jn.length; ++e) {
2931 var t = new Image;
2932 t.onload = function() {
2933 this.isLoaded = !0
2934 }, t.src = ".././img/icons/" + jn[e] + ".png", Rn[jn[e]] = t
2935 }
2936 }(), Pe.style.display = "none", Me.style.display = "block", Le.value =
2937 E("moo_name") || "",
2938 function() {
2939 var e = E("native_resolution");
2940 Zt(e ? "true" == e : "undefined" != typeof cordova), A = "true" ==
2941 E("show_ping"), Ie.hidden = !A, E("moo_moosic"), setInterval((
2942 function() {
2943 window.cordova && (document.getElementById(
2944 "downloadButtonContainer").classList.add("cordova"),
2945 document.getElementById("mobileDownloadButtonContainer").classList
2946 .add("cordova"))
2947 }), 1e3), en(), s.removeAllChildren(Ce);
2948 for (var t = 0; t < l.weapons.length + l.list.length; ++t) !
2949 function(e) {
2950 s.generateElement({
2951 id: "actionBarItem" + e,
2952 class: "actionBarItem",
2953 style: "display:none",
2954 onmouseout: function() {
2955 Tt()
2956 },
2957 parent: Ce
2958 })
2959 }(t);
2960 for (t = 0; t < l.list.length + l.weapons.length; ++t) ! function(
2961 e) {
2962 var t = document.createElement("canvas");
2963 t.width = t.height = 66;
2964 var n = t.getContext("2d");
2965 if (n.translate(t.width / 2, t.height / 2), n.imageSmoothingEnabled = !
2966 1, n.webkitImageSmoothingEnabled = !1, n.mozImageSmoothingEnabled = !
2967 1, l.weapons[e]) {
2968 n.rotate(Math.PI / 4 + Math.PI);
2969 var i = new Image;
2970 Zn[l.weapons[e].src] = i, i.onload = function() {
2971 this.isLoaded = !0;
2972 var i = 1 / (this.height / this.width),
2973 r = l.weapons[e].iPad || 1;
2974 n.drawImage(this, -t.width * r * o.iconPad * i / 2, -t.height *
2975 r * o.iconPad / 2, t.width * r * i * o.iconPad, t.height *
2976 r * o.iconPad), n.fillStyle = "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation =
2977 "source-atop", n.fillRect(-t.width / 2, -t.height / 2, t.width,
2978 t.height), document.getElementById("actionBarItem" + e).style
2979 .backgroundImage = "url(" + t.toDataURL() + ")"
2980 }, i.src = ".././img/weapons/" + l.weapons[e].src + ".png",
2981 (r = document.getElementById("actionBarItem" + e)).onmouseover =
2982 s.checkTrusted((function() {
2983 Tt(l.weapons[e], !0)
2984 })), r.onclick = s.checkTrusted((function() {
2985 Sn(e, !0)
2986 })), s.hookTouchEvents(r)
2987 } else {
2988 i = ri(l.list[e - l.weapons.length], !0);
2989 var r, a = Math.min(t.width - o.iconPadding, i.width);
2990 n.globalAlpha = 1, n.drawImage(i, -a / 2, -a / 2, a, a), n.fillStyle =
2991 "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation =
2992 "source-atop", n.fillRect(-a / 2, -a / 2, a, a), document.getElementById(
2993 "actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() +
2994 ")", (r = document.getElementById("actionBarItem" + e)).onmouseover =
2995 s.checkTrusted((function() {
2996 Tt(l.list[e - l.weapons.length])
2997 })), r.onclick = s.checkTrusted((function() {
2998 Sn(e - l.weapons.length)
2999 })), s.hookTouchEvents(r)
3000 }
3001 }(t);
3002 Le.ontouchstart = s.checkTrusted((function(e) {
3003 e.preventDefault();
3004 var t = prompt("enter name", e.currentTarget.value);
3005 e.currentTarget.value = t.slice(0, 15)
3006 })), Se.checked = M, Se.onchange = s.checkTrusted((function(e) {
3007 Zt(e.target.checked)
3008 })), Te.checked = A, Te.onchange = s.checkTrusted((function(e) {
3009 A = Te.checked, Ie.hidden = !A, I("show_ping", A ? "true" :
3010 "false")
3011 }))
3012 }())
3013 }), {
3014 id: st,
3015 d: ft,
3016 1: En,
3017 2: vi,
3018 4: wi,
3019 33: Ti,
3020 5: Ln,
3021 6: li,
3022 a: gi,
3023 aa: pi,
3024 7: Wn,
3025 8: hi,
3026 sp: ui,
3027 9: xi,
3028 h: Si,
3029 11: Pn,
3030 12: Cn,
3031 13: Bn,
3032 14: bi,
3033 15: Dn,
3034 16: Un,
3035 17: $t,
3036 18: fi,
3037 19: di,
3038 20: Ci,
3039 ac: Ot,
3040 ad: _t,
3041 an: Bt,
3042 st: Rt,
3043 sa: jt,
3044 us: Nt,
3045 ch: hn,
3046 mm: Wt,
3047 t: Mn,
3048 p: Yt,
3049 pp: Pi
3050 }), pt(), setTimeout(() => gt(), 3e3)
3051 }), (function(e) {
3052 console.error("Vultr error:", e), alert("Error:\n" + e), ft(
3053 "disconnected")
3054 }))
3055 }
3056 var b, x = new g(o, s),
3057 S = Math.PI,
3058 T = 2 * S;
3059
3060 function I(e, t) {
3061 b && localStorage.setItem(e, t)
3062 }
3063
3064 function E(e) {
3065 return b ? localStorage.getItem(e) : null
3066 }
3067 Math.lerpAngle = function(e, t, n) {
3068 Math.abs(t - e) > S && (e > t ? t += T : e += T);
3069 var i = t + (e - t) * n;
3070 return i >= 0 && i <= T ? i : i % T
3071 }, CanvasRenderingContext2D.prototype.roundRect = function(e, t, n, i, r) {
3072 return n < 2 * r && (r = n / 2), i < 2 * r && (r = i / 2), r < 0 && (r = 0),
3073 this.beginPath(), this.moveTo(e + r, t), this.arcTo(e + n, t, e + n, t +
3074 i, r), this.arcTo(e + n, t + i, e, t + i, r), this.arcTo(e, t + i, e, t,
3075 r), this.arcTo(e, t, e + n, t, r), this.closePath(), this
3076 }, "undefined" != typeof Storage && (b = !0), E("consent") || (consentBlock
3077 .style.display = "block"), window.checkTerms = function(e) {
3078 e ? (consentBlock.style.display = "none", I("consent", 1)) : $(
3079 "#consentShake").effect("shake")
3080 };
3081 var M, A, P, B, C, O, R, j, _, U, D, L, F, z, H = E("moofoll"),
3082 V = 1,
3083 q = Date.now(),
3084 Y = [],
3085 W = [],
3086 X = [],
3087 N = [],
3088 G = [],
3089 J = new p(d, G, W, Y, nt, l, o, s),
3090 K = n(70),
3091 Q = n(71),
3092 Z = new K(Y, Q, W, l, null, o, s),
3093 ee = 1,
3094 te = 0,
3095 ne = 0,
3096 ie = 0,
3097 re = {
3098 id: -1,
3099 startX: 0,
3100 startY: 0,
3101 currentX: 0,
3102 currentY: 0
3103 },
3104 se = {
3105 id: -1,
3106 startX: 0,
3107 startY: 0,
3108 currentX: 0,
3109 currentY: 0
3110 },
3111 ae = 0,
3112 oe = o.maxScreenWidth,
3113 ce = o.maxScreenHeight,
3114 le = !1,
3115 he = (document.getElementById("ad-container"), document.getElementById(
3116 "mainMenu")),
3117 ue = document.getElementById("enterGame"),
3118 fe = document.getElementById("promoImg"),
3119 de = document.getElementById("partyButton"),
3120 pe = document.getElementById("joinPartyButton"),
3121 ge = document.getElementById("settingsButton"),
3122 me = ge.getElementsByTagName("span")[0],
3123 ye = document.getElementById("allianceButton"),
3124 ke = document.getElementById("storeButton"),
3125 ve = document.getElementById("chatButton"),
3126 we = document.getElementById("gameCanvas"),
3127 be = we.getContext("2d"),
3128 xe = document.getElementById("serverBrowser"),
3129 Se = document.getElementById("nativeResolution"),
3130 Te = document.getElementById("showPing"),
3131 Ie = (document.getElementById("playMusic"), document.getElementById(
3132 "pingDisplay")),
3133 Ee = document.getElementById("shutdownDisplay"),
3134 Me = document.getElementById("menuCardHolder"),
3135 Ae = document.getElementById("guideCard"),
3136 Pe = document.getElementById("loadingText"),
3137 Be = document.getElementById("gameUI"),
3138 Ce = document.getElementById("actionBar"),
3139 Oe = document.getElementById("scoreDisplay"),
3140 Re = document.getElementById("foodDisplay"),
3141 je = document.getElementById("woodDisplay"),
3142 _e = document.getElementById("stoneDisplay"),
3143 Ue = document.getElementById("killCounter"),
3144 De = document.getElementById("leaderboardData"),
3145 Le = document.getElementById("nameInput"),
3146 Fe = document.getElementById("itemInfoHolder"),
3147 ze = document.getElementById("ageText"),
3148 He = document.getElementById("ageBarBody"),
3149 Ve = document.getElementById("upgradeHolder"),
3150 qe = document.getElementById("upgradeCounter"),
3151 Ye = document.getElementById("allianceMenu"),
3152 We = document.getElementById("allianceHolder"),
3153 Xe = document.getElementById("allianceManager"),
3154 Ne = document.getElementById("mapDisplay"),
3155 Ge = document.getElementById("diedText"),
3156 Je = document.getElementById("skinColorHolder"),
3157 Ke = Ne.getContext("2d");
3158 Ne.width = 300, Ne.height = 300;
3159 var Qe = document.getElementById("storeMenu"),
3160 $e = document.getElementById("storeHolder"),
3161 Ze = document.getElementById("noticationDisplay"),
3162 et = f.hats,
3163 tt = f.accessories,
3164 nt = new h(c, N, s, o),
3165 it = "#525252",
3166 rt = "#3d3f42";
3167
3168 function st(e) {
3169 X = e.teams
3170 }
3171 var at = document.getElementById("featuredYoutube"),
3172 ot = [{
3173 name: "",
3174 link: ""
3175 }, {
3176 name: "",
3177 link: ""
3178 }, {
3179 name: "",
3180 link: ""
3181 }, {
3182 name: "",
3183 link: ""
3184 }, {
3185 name: "",
3186 link: ""
3187 }, {
3188 name: "",
3189 link: ""
3190 }, {
3191 name: "",
3192 link: ""
3193 }, {
3194 name: "",
3195 link: ""
3196 }, {
3197 name: "",
3198 link: ""
3199 }, {
3200 name: "",
3201 link: ""
3202 }, {
3203 name: "",
3204 link: ""
3205 }, {
3206 name: "",
3207 link: ""
3208 }, {
3209 name: "",
3210 link: ""
3211 }, {
3212 name: "",
3213 link: ""
3214 }, {
3215 name: "AnimeBoy | MT Best | ?Anonymous?#8462 | MT Angry",
3216 link: ""
3217 }, {
3218 name: "",
3219 link: ""
3220 }, {
3221 name: "",
3222 link: ""
3223 }],
3224 ct = ot[s.randInt(0, ot.length - 1)];
3225 at.innerHTML = "<a target='_blank' class='ytLink' href='" + ct.link +
3226 "'><i class='material-icons' style='vertical-align: top;'></i> " +
3227 ct.name + "</a>";
3228 var lt = !0,
3229 ht = !1,
3230 ut = !1;
3231
3232 function ft(e) {
3233 r.close(), dt(e)
3234 }
3235
3236 function dt(e) {
3237 he.style.display = "block", Be.style.display = "none", Me.style.display =
3238 "none", Ge.style.display = "none", Pe.style.display = "block", Pe.innerHTML =
3239 e +
3240 "<a href='javascript:window.location.href=window.location.href' class='ytLink'>reload</a>"
3241 }
3242 window.onblur = function() {
3243 lt = !1
3244 }, window.onfocus = function() {
3245 lt = !0, R && R.alive && yn()
3246 }, window.onload = function() {
3247 ht = !0, v(), setTimeout((function() {
3248 k || (alert("Captcha failed to load"), window.location.reload())
3249 }), 2e4)
3250 }, window.captchaCallback = function() {
3251 ut = !0, v()
3252 }, we.oncontextmenu = function() {
3253 return !1
3254 };
3255
3256 function pt() {
3257 var e, t, n = "",
3258 i = 0;
3259 for (var r in y.servers) {
3260 for (var s = y.servers[r], a = 0, c = 0; c < s.length; c++)
3261 for (var l = 0; l < s[c].games.length; l++) a += s[c].games[l].playerCount;
3262 i += a;
3263 var h = y.regionInfo[r].name;
3264 n += "<option disabled>" + h + " - " + a + " players</option>";
3265 for (var u = 0; u < s.length; u++)
3266 for (var f = s[u], d = 0; d < f.games.length; d++) {
3267 var p = f.games[d],
3268 g = 1 * f.index + d + 1,
3269 m = y.server && y.server.region === f.region && y.server.index === f.index &&
3270 y.gameIndex == d,
3271 k = h + " " + g + " [" + Math.min(p.playerCount, o.maxPlayers) + "/" +
3272 o.maxPlayers + "]";
3273 let e = y.stripRegion(r) + ":" + u + ":" + d;
3274 m && (de.getElementsByTagName("span")[0].innerText = e), n +=
3275 "<option value='" + e + "' " + (m ? "selected" : "") + ">" + k +
3276 "</option>"
3277 }
3278 n += "<option disabled></option>"
3279 }
3280 n += "<option disabled>All Servers - " + i + " players</option>", xe.innerHTML =
3281 n, "sandbox.moomoo.io" == location.hostname ? (e = "Back to MooMoo", t =
3282 "//moomoo.io/") : (e = "Try the sandbox", t = "//sandbox.moomoo.io/"),
3283 document.getElementById("altServer").innerHTML = "<a href='" + t + "'>" +
3284 e +
3285 "<i class='material-icons' style='font-size:10px;vertical-align:middle'>arrow_forward_ios</i></a>"
3286 }
3287
3288 function gt() {
3289 var e = new XMLHttpRequest;
3290 e.onreadystatechange = function() {
3291 4 == this.readyState && (200 == this.status ? (window.vultr = JSON.parse(
3292 this.responseText), y.processServers(vultr.servers), pt()) : console.error(
3293 "Failed to load server data with status code:", this.status))
3294 }, e.open("GET", "/serverData", !0), e.send()
3295 }
3296 xe.addEventListener("change", s.checkTrusted((function() {
3297 let e = xe.value.split(":");
3298 y.switchServer(e[0], e[1], e[2])
3299 })));
3300 var mt = document.getElementById("pre-content-container"),
3301 yt = null,
3302 kt = null;
3303 window.cpmstarAPI((function(e) {
3304 e.game.setTarget(mt), kt = e
3305 }));
3306 var vt = 3e5,
3307 wt = 0,
3308 bt = 0;
3309
3310 function xt() {
3311 if (!cpmstarAPI || !kt) return console.log("Failed to load video ad API", !
3312 !cpmstarAPI, !!kt), void Tn();
3313 (yt = new kt.game.RewardedVideoView("rewardedvideo")).addEventListener(
3314 "ad_closed", (function(e) {
3315 console.log("Video ad closed"), St()
3316 })), yt.addEventListener("loaded", (function(e) {
3317 console.log("Video ad loaded"), yt.show()
3318 })), yt.addEventListener("load_failed", (function(e) {
3319 console.log("Video ad load failed", e), St()
3320 })), yt.load(), mt.style.display = "block"
3321 }
3322
3323 function St() {
3324 mt.style.display = "none", Tn()
3325 }
3326
3327 function Tt(e, t, n) {
3328 if (R && e)
3329 if (s.removeAllChildren(Fe), Fe.classList.add("visible"), s.generateElement({
3330 id: "itemInfoName",
3331 text: s.capitalizeFirst(e.name),
3332 parent: Fe
3333 }), s.generateElement({
3334 id: "itemInfoDesc",
3335 text: e.desc,
3336 parent: Fe
3337 }), n);
3338 else if (t) s.generateElement({
3339 class: "itemInfoReq",
3340 text: e.type ? "secondary" : "primary",
3341 parent: Fe
3342 });
3343 else {
3344 for (var i = 0; i < e.req.length; i += 2) s.generateElement({
3345 class: "itemInfoReq",
3346 html: e.req[i] + "<span class='itemInfoReqVal'> x" + e.req[i + 1] +
3347 "</span>",
3348 parent: Fe
3349 });
3350 e.group.limit && s.generateElement({
3351 class: "itemInfoLmt",
3352 text: (R.itemCounts[e.group.id] || 0) + "/" + e.group.limit,
3353 parent: Fe
3354 })
3355 } else Fe.classList.remove("visible")
3356 }
3357 window.showPreAd = xt;
3358 var It, Et, Mt, At = [],
3359 Pt = [];
3360
3361 function Bt(e, t) {
3362 At.push({
3363 sid: e,
3364 name: t
3365 }), Ct()
3366 }
3367
3368 function Ct() {
3369 if (At[0]) {
3370 var e = At[0];
3371 s.removeAllChildren(Ze), Ze.style.display = "block", s.generateElement({
3372 class: "notificationText",
3373 text: e.name,
3374 parent: Ze
3375 }), s.generateElement({
3376 class: "notifButton",
3377 html: "<i class='material-icons' style='font-size:28px;color:#cc5151;'></i>",
3378 parent: Ze,
3379 onclick: function() {
3380 Dt(0)
3381 },
3382 hookTouch: !0
3383 }), s.generateElement({
3384 class: "notifButton",
3385 html: "<i class='material-icons' style='font-size:28px;color:#FF0000;'></i>",
3386 parent: Ze,
3387 onclick: function() {
3388 Dt(1)
3389 },
3390 hookTouch: !0
3391 })
3392 } else Ze.style.display = "none"
3393 }
3394
3395 function Ot(e) {
3396 X.push(e), "block" == Ye.style.display && Ut()
3397 }
3398
3399 function Rt(e, t) {
3400 R && (R.team = e, R.isOwner = t, "block" == Ye.style.display && Ut())
3401 }
3402
3403 function jt(e) {
3404 Pt = e, "block" == Ye.style.display && Ut()
3405 }
3406
3407 function _t(e) {
3408 for (var t = X.length - 1; t >= 0; t--) X[t].sid == e && X.splice(t, 1);
3409 "block" == Ye.style.display && Ut()
3410 }
3411
3412 function Ut() {
3413 if (R && R.alive) {
3414 if (an(), Qe.style.display = "none", Ye.style.display = "block", s.removeAllChildren(
3415 We), R.team)
3416 for (var e = 0; e < Pt.length; e += 2) ! function(e) {
3417 var t = s.generateElement({
3418 class: "allianceItem",
3419 style: "color:" + (Pt[e] == R.sid ? "#fff" : "rgba(255,255,255,0.6)"),
3420 text: Pt[e + 1],
3421 parent: We
3422 });
3423 R.isOwner && Pt[e] != R.sid && s.generateElement({
3424 class: "joinAlBtn",
3425 text: "Kick",
3426 onclick: function() {
3427 Lt(Pt[e])
3428 },
3429 hookTouch: !0,
3430 parent: t
3431 })
3432 }(e);
3433 else if (X.length)
3434 for (e = 0; e < X.length; ++e) ! function(e) {
3435 var t = s.generateElement({
3436 class: "allianceItem",
3437 style: "color:" + (X[e].sid == R.team ? "#fff" :
3438 "rgba(255,255,255,0.6)"),
3439 text: X[e].sid,
3440 parent: We
3441 });
3442 s.generateElement({
3443 class: "joinAlBtn",
3444 text: "Join",
3445 onclick: function() {
3446 Ft(e)
3447 },
3448 hookTouch: !0,
3449 parent: t
3450 })
3451 }(e);
3452 else s.generateElement({
3453 class: "allianceItem",
3454 text: "No Tribes Yet",
3455 parent: We
3456 });
3457 s.removeAllChildren(Xe), R.team ? s.generateElement({
3458 class: "allianceButtonM",
3459 style: "width: 360px",
3460 text: R.isOwner ? "Delete Tribe" : "Leave Tribe",
3461 onclick: function() {
3462 Ht()
3463 },
3464 hookTouch: !0,
3465 parent: Xe
3466 }) : (s.generateElement({
3467 tag: "input",
3468 type: "text",
3469 id: "allianceInput",
3470 maxLength: 7,
3471 placeholder: "unique name",
3472 ontouchstart: function(e) {
3473 e.preventDefault();
3474 var t = prompt("unique name", e.currentTarget.value);
3475 e.currentTarget.value = t.slice(0, 7)
3476 },
3477 parent: Xe
3478 }), s.generateElement({
3479 tag: "div",
3480 class: "allianceButtonM",
3481 style: "width: 140px;",
3482 text: "Create",
3483 onclick: function() {
3484 zt()
3485 },
3486 hookTouch: !0,
3487 parent: Xe
3488 }))
3489 }
3490 }
3491
3492 function Dt(e) {
3493 r.send("11", At[0].sid, e), At.splice(0, 1), Ct();
3494 }
3495
3496 document.onkeydown = function(e) {
3497 if (e.keyCode == 220) {
3498 alert('The key for enabling auto acceptance into the clan is pressed (enabled by default)');
3499 Toggle12134 = (Toggle12134 + 1) % 2;
3500 }
3501 }
3502 let Toggle12134 = 1;
3503
3504 setInterval(() => {
3505 if(Toggle12134 == 1) {
3506 Dt(1)
3507 }
3508 },100);
3509
3510 document.onkeydown = function(e) {// Ñпам едой. ÐЕУБЕРÐЙТЕ ЗÐДЕРЖКУ!! Ðу еÑли вообще кто то Ñто видит то Ñто по тому что еÑли вы уберете ее то в конце от Ñамого клиета будет нажата q тобишь еда ))
3511 if (e.keyCode == 101) {
3512 Sn(R.items[0])
3513 r.send("c", 1)
3514 r.send("c", 0)
3515 Sn(R.items[0])
3516 r.send("c", 1)
3517 r.send("c", 0)
3518 Sn(R.items[0])
3519 r.send("c", 1)
3520 r.send("c", 0)
3521 Sn(R.items[0])
3522 r.send("c", 1)
3523 r.send("c", 0)
3524 setTimeout( () => {
3525 r.send("5")
3526 },1)
3527
3528 }
3529 }
3530 //r.send("5") = прошлое "главное" оружие
3531 //Sn(R.items[0]) = еда
3532 //Sn(R.items[1]) = Ñтена
3533 //Sn(R.items[2]) = Ñпайк или же шип
3534 //Sn(R.items[3]) = мельница
3535 //Sn(R.items[4]) = трапка или же буÑÑ‚(еÑли Ñтого предмета нету то ты береш примари или Ñекондари оружие
3536 //Sn(R.items[5]) = тут мои Ð¿Ð¾Ð»Ð½Ð¾Ð¼Ð¾Ñ‡Ð¸Ñ ÑƒÐ¶Ðµ вÑе, окончены
3537 var repeater = function(key, action, interval) {
3538 let _isKeyDown = false;
3539 let _intervalId = undefined;
3540
3541 return {
3542 start(keycode) {
3543 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
3544 _isKeyDown = true;
3545 if(_intervalId === undefined) {
3546 _intervalId = setInterval(() => {
3547 action();
3548 if(!_isKeyDown){
3549 clearInterval(_intervalId);
3550 _intervalId = undefined;
3551 console.log("claered");
3552 }
3553 }, interval);
3554 }
3555 }
3556 },
3557
3558 stop(keycode) {
3559 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
3560 _isKeyDown = false;
3561 }
3562 }
3563 };
3564
3565
3566 }
3567
3568 function Lt(e) {
3569 r.send("12", e)
3570 }
3571
3572 function Ft(e) {
3573 r.send("10", X[e].sid)
3574 }
3575 function zt() {
3576 r.send("8", document.getElementById("allianceInput").value)
3577 }
3578
3579 function Ht() {
3580 At = [], Ct(), r.send("9")
3581 }
3582 var Vt, qt = [];
3583
3584 function Yt(e, t) {
3585 for (var n = 0; n < qt.length; ++n)
3586 if (!qt[n].active) {
3587 Vt = qt[n];
3588 break
3589 }
3590 Vt || (Vt = new function() {
3591 this.init = function(e, t) {
3592 this.scale = 0, this.x = e, this.y = t, this.active = !0
3593 }, this.update = function(e, t) {
3594 this.active && (this.scale += .05 * t, this.scale >= o.mapPingScale ?
3595 this.active = !1 : (e.globalAlpha = 1 - Math.max(0, this.scale / o.mapPingScale),
3596 e.beginPath(), e.arc(this.x / o.mapScale * Ne.width, this.y / o.mapScale *
3597 Ne.width, this.scale, 0, 2 * Math.PI), e.stroke()))
3598 }
3599 }, qt.push(Vt)), Vt.init(e, t)
3600 }
3601
3602 function Wt(e) {
3603 Et = e
3604 }
3605 var Xt = 0;
3606
3607 function Nt(e, t, n) {
3608 n ? e ? R.tailIndex = t : R.tails[t] = 1 : e ? R.skinIndex = t : R.skins[t] =
3609 1, "block" == Qe.style.display && Gt()
3610 }
3611
3612 function Gt() {
3613 if (R) {
3614 s.removeAllChildren($e);
3615 for (var e = Xt, t = e ? tt : et, n = 0; n < t.length; ++n) t[n].dontSell ||
3616 function(n) {
3617 var i = s.generateElement({
3618 id: "storeDisplay" + n,
3619 class: "storeItem",
3620 onmouseout: function() {
3621 Tt()
3622 },
3623 onmouseover: function() {
3624 Tt(t[n], !1, !0)
3625 },
3626 parent: $e
3627 });
3628 s.hookTouchEvents(i, !0), s.generateElement({
3629 tag: "img",
3630 class: "hatPreview",
3631 src: "../img/" + (e ? "accessories/access_" : "hats/hat_") + t[n].id +
3632 (t[n].topSprite ? "_p" : "") + ".png",
3633 parent: i
3634 }), s.generateElement({
3635 tag: "span",
3636 text: t[n].name,
3637 parent: i
3638 }), (e ? R.tails[t[n].id] : R.skins[t[n].id]) ? (e ? R.tailIndex : R.skinIndex) ==
3639 t[n].id ? s.generateElement({
3640 class: "joinAlBtn",
3641 style: "margin-top: 5px",
3642 text: "Unequip",
3643 onclick: function() {
3644 Jt(0, e)
3645 },
3646 hookTouch: !0,
3647 parent: i
3648 }) : s.generateElement({
3649 class: "joinAlBtn",
3650 style: "margin-top: 5px",
3651 text: "Equip",
3652 onclick: function() {
3653 Jt(t[n].id, e)
3654 },
3655 hookTouch: !0,
3656 parent: i
3657 }) : (s.generateElement({
3658 class: "joinAlBtn",
3659 style: "margin-top: 5px",
3660 text: "Buy",
3661 onclick: function() {
3662 Kt(t[n].id, e)
3663 },
3664 hookTouch: !0,
3665 parent: i
3666 }), s.generateElement({
3667 tag: "span",
3668 class: "itemPrice",
3669 text: t[n].price,
3670 parent: i
3671 }))
3672 }(n)
3673 }
3674 }
3675
3676 function Jt(e, t) {
3677 r.send("13c", 0, e, t)
3678 }
3679
3680 function Kt(e, t) {
3681 r.send("13c", 1, e, t)
3682 }
3683
3684 function Qt() {
3685 Qe.style.display = "none", Ye.style.display = "none", an()
3686 }
3687
3688 function $t(e, t) {
3689 e && (t ? R.weapons = e : R.items = e);
3690 for (var n = 0; n < l.list.length; ++n) {
3691 var i = l.weapons.length + n;
3692 document.getElementById("actionBarItem" + i).style.display = R.items.indexOf(
3693 l.list[n].id) >= 0 ? "inline-block" : "none"
3694 }
3695 for (n = 0; n < l.weapons.length; ++n) document.getElementById(
3696 "actionBarItem" + n).style.display = R.weapons[l.weapons[n].type] == l.weapons[
3697 n].id ? "inline-block" : "none"
3698 }
3699
3700 function Zt(e) {
3701 M = e, V = e && window.devicePixelRatio || 1, Se.checked = e, I(
3702 "native_resolution", e.toString()), un()
3703 }
3704
3705 function en() {
3706 for (var e = "", t = 0; t < o.skinColors.length; ++t) e += t == ae ?
3707 "<div class='skinColorItem activeSkin' style='background-color:" + o.skinColors[
3708 t] + "' onclick='selectSkinColor(" + t + ")'></div>" :
3709 "<div class='skinColorItem' style='background-color:" + o.skinColors[t] +
3710 "' onclick='selectSkinColor(" + t + ")'></div>";
3711 Je.innerHTML = e
3712 }
3713 var tn = document.getElementById("chatBox"),
3714 nn = document.getElementById("chatHolder");
3715
3716 function rn() {
3717 on ? setTimeout((function() {
3718 var e = prompt("chat message");
3719 e && sn(e)
3720 }), 1) : "block" == nn.style.display ? (tn.value && sn(tn.value), an()) :
3721 (Qe.style.display = "none", Ye.style.display = "none", nn.style.display =
3722 "block", tn.focus(), yn()), tn.value = ""
3723 }
3724
3725 function sn(e) {
3726 r.send("ch", e.slice(0, 30))
3727 }
3728
3729 function an() {
3730 tn.value = "", nn.style.display = "none"
3731 }
3732 var on, cn, ln = ["motherfucking"
3733 ];
3734
3735 function hn(e, t) {
3736 var n = Ii(e);
3737 n && (n.chatMessage = function(e) {
3738 for (var t, n = 0; n < ln.length; ++n)
3739 if (e.indexOf(ln[n]) > -1) {
3740 t = "";
3741 for (var i = 0; i < ln[n].length; ++i) t += t.length ? "o" : "M";
3742 var r = new RegExp(ln[n], "g");
3743 e = e.replace(r, t)
3744 }
3745 return e
3746 }(t), n.chatCountdown = o.chatCountdown)
3747 }
3748
3749 function un() {
3750 F = window.innerWidth, z = window.innerHeight;
3751 var e = Math.max(F / oe, z / ce) * V;
3752 we.width = F * V, we.height = z * V, we.style.width = F + "px", we.style.height =
3753 z + "px", be.setTransform(e, 0, 0, e, (F * V - oe * e) / 2, (z * V - ce *
3754 e) / 2)
3755 }
3756
3757 function fn(e) {
3758 (on = e) ? Ae.classList.add("touch"): Ae.classList.remove("touch")
3759 }
3760
3761 function dn(e) {
3762 e.preventDefault(), e.stopPropagation(), fn(!0);
3763 for (var t = 0; t < e.changedTouches.length; t++) {
3764 var n = e.changedTouches[t];
3765 n.identifier == re.id ? (re.id = -1, bn()) : n.identifier == se.id && (se.id = -
3766 1, R.buildIndex >= 0 && (O = 1, vn()), O = 0, vn())
3767 }
3768 }
3769
3770 function pn() {
3771 return R ? (-1 != se.id ? cn = Math.atan2(se.currentY - se.startY, se.currentX -
3772 se.startX) : R.lockDir || on || (cn = Math.atan2(ie - z / 2, ne - F / 2)),
3773 s.fixTo(cn || 0, 2)) : 0
3774 }
3775 window.addEventListener("resize", s.checkTrusted(un)), un(), fn(!1), window.setUsingTouch =
3776 fn, we.addEventListener("touchmove", s.checkTrusted((function(e) {
3777 e.preventDefault(), e.stopPropagation(), fn(!0);
3778 for (var t = 0; t < e.changedTouches.length; t++) {
3779 var n = e.changedTouches[t];
3780 n.identifier == re.id ? (re.currentX = n.pageX, re.currentY = n.pageY,
3781 bn()) : n.identifier == se.id && (se.currentX = n.pageX, se.currentY =
3782 n.pageY, O = 1)
3783 }
3784 })), !1), we.addEventListener("touchstart", s.checkTrusted((function(e) {
3785 e.preventDefault(), e.stopPropagation(), fn(!0);
3786 for (var t = 0; t < e.changedTouches.length; t++) {
3787 var n = e.changedTouches[t];
3788 n.pageX < document.body.scrollWidth / 2 && -1 == re.id ? (re.id = n.identifier,
3789 re.startX = re.currentX = n.pageX, re.startY = re.currentY = n.pageY,
3790 bn()) : n.pageX > document.body.scrollWidth / 2 && -1 == se.id && (
3791 se.id = n.identifier, se.startX = se.currentX = n.pageX, se.startY =
3792 se.currentY = n.pageY, R.buildIndex < 0 && (O = 1, vn()))
3793 }
3794 })), !1), we.addEventListener("touchend", s.checkTrusted(dn), !1), we.addEventListener(
3795 "touchcancel", s.checkTrusted(dn), !1), we.addEventListener("touchleave",
3796 s.checkTrusted(dn), !1), we.addEventListener("mousemove", (function(e) {
3797 e.preventDefault(), e.stopPropagation(), fn(!1), ne = e.clientX, ie = e.clientY
3798 }), !1), we.addEventListener("mousedown", (function(e) {
3799 fn(!1), 1 != O && (O = 1, vn())
3800 }), !1), we.addEventListener("mouseup", (function(e) {
3801 fn(!1), 0 != O && (O = 0, vn())
3802 }), !1);
3803 var gn = {},
3804 mn = {
3805 87: [0, -1],
3806 38: [0, -1],
3807 83: [0, 1],
3808 40: [0, 1],
3809 65: [-1, 0],
3810 37: [-1, 0],
3811 68: [1, 0],
3812 39: [1, 0]
3813 };
3814
3815 function yn() {
3816 gn = {}, r.send("rmd")
3817 }
3818
3819 function kn() {
3820 return "block" != Ye.style.display && "block" != nn.style.display
3821 }
3822
3823 function vn() {
3824 R && R.alive && r.send("c", O, R.buildIndex >= 0 ? pn() : null)
3825 }
3826 window.addEventListener("keydown", s.checkTrusted((function(e) {
3827 var t = e.which || e.keyCode || 0;
3828 27 == t ? Qt() : R && R.alive && kn() && (gn[t] || (gn[t] = 1, 69 == t ?
3829 r.send("7", 1) : 67 == t ? (Mt || (Mt = {}), Mt.x = R.x, Mt.y = R.y) :
3830 88 == t ? (R.lockDir = R.lockDir ? 0 : 1, r.send("7", 0)) : null !=
3831 R.weapons[t - 49] ? Sn(R.weapons[t - 49], !0) : null != R.items[t -
3832 49 - R.weapons.length] ? Sn(R.items[t - 49 - R.weapons.length]) :
3833 81 == t ? Sn(R.items[0]) : 82 == t ? xn() : mn[t] ? bn() : 32 == t &&
3834 (O = 1, vn())))
3835 }))), window.addEventListener("keyup", s.checkTrusted((function(e) {
3836 if (R && R.alive) {
3837 var t = e.which || e.keyCode || 0;
3838 13 == t ? rn() : kn() && gn[t] && (gn[t] = 0, mn[t] ? bn() : 32 == t &&
3839 (O = 0, vn()))
3840 }
3841 })));
3842 var wn = void 0;
3843
3844 function bn() {
3845 var e = function() {
3846 var e = 0,
3847 t = 0;
3848 if (-1 != re.id) e += re.currentX - re.startX, t += re.currentY - re.startY;
3849 else
3850 for (var n in mn) {
3851 var i = mn[n];
3852 e += !!gn[n] * i[0], t += !!gn[n] * i[1]
3853 }
3854 return 0 == e && 0 == t ? void 0 : s.fixTo(Math.atan2(t, e), 2)
3855 }();
3856 (null == wn || null == e || Math.abs(e - wn) > .3) && (r.send("33", e), wn =
3857 e)
3858 }
3859
3860 function xn() {
3861 r.send("14", 1)
3862 }
3863
3864 function Sn(e, t) {
3865 r.send("5", e, t)
3866 }
3867
3868 function Tn() {
3869 I("moo_name", Le.value), !le && r.connected && (le = !0, x.stop("menu"), dt(
3870 "Loading..."), r.send("sp", {
3871 name: Le.value,
3872 moofoll: H,
3873 skin: ae
3874 }))
3875 }
3876 var In = !0;
3877
3878 function En(e) {
3879 Pe.style.display = "none", Me.style.display = "block", he.style.display =
3880 "none", gn = {}, j = e, O = 0, le = !0, In && (In = !1, N.length = 0)
3881 }
3882
3883 function Mn(e, t, n, i) {
3884 m.showText(e, t, 50, .18, 500, Math.abs(n), n >= 0 ? "#fff" : "#8ecc51")
3885 }
3886 var An = 99999;
3887
3888 function Pn() {
3889 le = !1;
3890 try {
3891 factorem.refreshAds([2], !0)
3892 } catch (e) {}
3893 Be.style.display = "none", Qt(), It = {
3894 x: R.x,
3895 y: R.y
3896 }, Pe.style.display = "none", Ge.style.display = "block", Ge.style.fontSize =
3897 "0px", An = 0, setTimeout((function() {
3898 Me.style.display = "block", he.style.display = "block", Ge.style.display =
3899 "none"
3900 }), o.deathFadeout), gt()
3901 }
3902
3903 function Bn(e) {
3904 R && nt.removeAllItems(e)
3905 }
3906
3907 function Cn(e) {
3908 nt.disableBySid(e)
3909 }
3910
3911 function On() {
3912 Oe.innerText = R.points, Re.innerText = R.food, je.innerText = R.wood, _e.innerText =
3913 R.stone, Ue.innerText = R.kills
3914 }
3915 var Rn = {},
3916 jn = ["crown", "skull"],
3917 _n = [];
3918
3919 function Un(e, t) {
3920 if (R.upgradePoints = e, R.upgrAge = t, e > 0) {
3921 _n.length = 0, s.removeAllChildren(Ve);
3922 for (var n = 0; n < l.weapons.length; ++n) l.weapons[n].age == t && (null ==
3923 l.weapons[n].pre || R.weapons.indexOf(l.weapons[n].pre) >= 0) && (s.generateElement({
3924 id: "upgradeItem" + n,
3925 class: "actionBarItem",
3926 onmouseout: function() {
3927 Tt()
3928 },
3929 parent: Ve
3930 }).style.backgroundImage = document.getElementById("actionBarItem" + n).style
3931 .backgroundImage, _n.push(n));
3932 for (n = 0; n < l.list.length; ++n)
3933 if (l.list[n].age == t && (null == l.list[n].pre || R.items.indexOf(l.list[
3934 n].pre) >= 0)) {
3935 var i = l.weapons.length + n;
3936 s.generateElement({
3937 id: "upgradeItem" + i,
3938 class: "actionBarItem",
3939 onmouseout: function() {
3940 Tt()
3941 },
3942 parent: Ve
3943 }).style.backgroundImage = document.getElementById("actionBarItem" + i)
3944 .style.backgroundImage, _n.push(i)
3945 }
3946 for (n = 0; n < _n.length; n++) ! function(e) {
3947 var t = document.getElementById("upgradeItem" + e);
3948 t.onmouseover = function() {
3949 l.weapons[e] ? Tt(l.weapons[e], !0) : Tt(l.list[e - l.weapons.length])
3950 }, t.onclick = s.checkTrusted((function() {
3951 r.send("6", e)
3952 })), s.hookTouchEvents(t)
3953 }(_n[n]);
3954 _n.length ? (Ve.style.display = "block", qe.style.display = "block", qe.innerHTML =
3955 "SELECT ITEMS (" + e + ")") : (Ve.style.display = "none", qe.style.display =
3956 "none", Tt())
3957 } else Ve.style.display = "none", qe.style.display = "none", Tt()
3958 }
3959
3960 function Dn(e, t, n) {
3961 null != e && (R.XP = e), null != t && (R.maxXP = t), null != n && (R.age =
3962 n), n == o.maxAge ? (ze.innerHTML = "MAX AGE", He.style.width = "100%") :
3963 (ze.innerHTML = "AGE " + R.age, He.style.width = R.XP / R.maxXP * 100 +
3964 "%")
3965 }
3966
3967 function Ln(e) {
3968 s.removeAllChildren(De);
3969 for (var t = 1, n = 0; n < e.length; n += 3) ! function(n) {
3970 s.generateElement({
3971 class: "leaderHolder",
3972 parent: De,
3973 children: [s.generateElement({
3974 class: "leaderboardItem",
3975 style: "color:" + (e[n] == j ? "#fff" : "rgba(255,255,255,0.6)"),
3976 text: t + ". " + ("" != e[n + 1] ? e[n + 1] : "unknown")
3977 }), s.generateElement({
3978 class: "leaderScore",
3979 text: s.kFormat(e[n + 2]) || "0"
3980 })]
3981 })
3982 }(n), t++
3983 }
3984
3985 function Fn(e, t, n, i) {
3986 be.save(), be.setTransform(1, 0, 0, 1, 0, 0), be.scale(V, V);
3987 var r = 50;
3988 be.beginPath(), be.arc(e, t, r, 0, 2 * Math.PI, !1), be.closePath(), be.fillStyle =
3989 "rgba(255, 255, 255, 0.3)", be.fill(), r = 50;
3990 var s = n - e,
3991 a = i - t,
3992 o = Math.sqrt(Math.pow(s, 2) + Math.pow(a, 2)),
3993 c = o > r ? o / r : 1;
3994 s /= c, a /= c, be.beginPath(), be.arc(e + s, t + a, .5 * r, 0, 2 * Math.PI, !
3995 1), be.closePath(), be.fillStyle = "white", be.fill(), be.restore()
3996 }
3997
3998 function zn(e, t, n) {
3999 for (var i = 0; i < G.length; ++i)(_ = G[i]).active && _.layer == e && (_.update(
4000 P), _.active && ki(_.x - t, _.y - n, _.scale) && (be.save(), be.translate(
4001 _.x - t, _.y - n), be.rotate(_.dir), Vn(0, 0, _, be, 1), be.restore()))
4002 }
4003 var Hn = {};
4004
4005 function Vn(e, t, n, i, r) {
4006 if (n.src) {
4007 var s = l.projectiles[n.indx].src,
4008 a = Hn[s];
4009 a || ((a = new Image).onload = function() {
4010 this.isLoaded = !0
4011 }, a.src = ".././img/weapons/" + s + ".png", Hn[s] = a), a.isLoaded && i.drawImage(
4012 a, e - n.scale / 2, t - n.scale / 2, n.scale, n.scale)
4013 } else 1 == n.indx && (i.fillStyle = "#939393", si(e, t, n.scale, i))
4014 }
4015
4016 function qn(e, t, n, i) {
4017 var r = o.riverWidth + i,
4018 s = o.mapScale / 2 - t - r / 2;
4019 s < ce && s + r > 0 && n.fillRect(0, s, oe, r)
4020 }
4021
4022 function Yn(e, t, n) {
4023 for (var i, r, s, a = 0; a < N.length; ++a)(_ = N[a]).active && (r = _.x +
4024 _.xWiggle - t, s = _.y + _.yWiggle - n, 0 == e && _.update(P), _.layer ==
4025 e && ki(r, s, _.scale + (_.blocker || 0)) && (be.globalAlpha = _.hideFromEnemy ?
4026 .6 : 1, _.isItem ? (i = ri(_), be.save(), be.translate(r, s), be.rotate(
4027 _.dir), be.drawImage(i, -i.width / 2, -i.height / 2), _.blocker && (be
4028 .strokeStyle = "#db6e6e", be.globalAlpha = .3, be.lineWidth = 6, si(0,
4029 0, _.blocker, be, !1, !0)), be.restore()) : (i = ni(_), be.drawImage(i,
4030 r - i.width / 2, s - i.height / 2))))
4031 }
4032
4033 function Wn(e, t, n) {
4034 (_ = Ii(e)) && _.startAnim(t, n)
4035 }
4036
4037 function Xn(e, t, n) {
4038 be.globalAlpha = 1;
4039 for (var i = 0; i < W.length; ++i)(_ = W[i]).zIndex == n && (_.animate(P),
4040 _.visible && (_.skinRot += .002 * P, L = (_ == R ? pn() : _.dir) + _.dirPlus,
4041 be.save(), be.translate(_.x - e, _.y - t), be.rotate(L), Nn(_, be), be.restore()
4042 ))
4043 }
4044
4045 function Nn(e, t) {
4046 (t = t || be).lineWidth = 5.5, t.lineJoin = "miter";
4047 var n = Math.PI / 4 * (l.weapons[e.weaponIndex].armS || 1),
4048 i = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndS || 1,
4049 r = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndD || 1;
4050 if (e.tailIndex > 0 && function(e, t, n) {
4051 if (!(Gn = Qn[e])) {
4052 var i = new Image;
4053 i.onload = function() {
4054 this.isLoaded = !0, this.onload = null
4055 }, i.src = ".././img/accessories/access_" + e + ".png", Qn[e] = i, Gn =
4056 i
4057 }
4058 var r = $n[e];
4059 if (!r) {
4060 for (var s = 0; s < tt.length; ++s)
4061 if (tt[s].id == e) {
4062 r = tt[s];
4063 break
4064 }
4065 $n[e] = r
4066 }
4067 Gn.isLoaded && (t.save(), t.translate(-20 - (r.xOff || 0), 0), r.spin &&
4068 t.rotate(n.skinRot), t.drawImage(Gn, -r.scale / 2, -r.scale / 2, r.scale,
4069 r.scale), t.restore())
4070 }(e.tailIndex, t, e), e.buildIndex < 0 && !l.weapons[e.weaponIndex].aboveHand &&
4071 (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale,
4072 0, t), null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex]
4073 .hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile],
4074 be)), t.fillStyle = o.skinColors[e.skinColor], si(e.scale * Math.cos(n),
4075 e.scale * Math.sin(n), 14), si(e.scale * r * Math.cos(-n * i), e.scale *
4076 r * Math.sin(-n * i), 14), e.buildIndex < 0 && l.weapons[e.weaponIndex].aboveHand &&
4077 (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale,
4078 0, t), null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex]
4079 .hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile],
4080 be)), e.buildIndex >= 0) {
4081 var s = ri(l.list[e.buildIndex]);
4082 t.drawImage(s, e.scale - l.list[e.buildIndex].holdOffset, -s.width / 2)
4083 }
4084 si(0, 0, e.scale, t), e.skinIndex > 0 && (t.rotate(Math.PI / 2), function e(
4085 t, n, i, r) {
4086 if (!(Gn = Jn[t])) {
4087 var s = new Image;
4088 s.onload = function() {
4089 this.isLoaded = !0, this.onload = null
4090 }, s.src = ".././img/hats/hat_" + t + ".png", Jn[t] = s, Gn = s
4091 }
4092 var a = i || Kn[t];
4093 if (!a) {
4094 for (var o = 0; o < et.length; ++o)
4095 if (et[o].id == t) {
4096 a = et[o];
4097 break
4098 }
4099 Kn[t] = a
4100 }
4101 Gn.isLoaded && n.drawImage(Gn, -a.scale / 2, -a.scale / 2, a.scale, a.scale), !
4102 i && a.topSprite && (n.save(), n.rotate(r.skinRot), e(t + "_top", n, a,
4103 r), n.restore())
4104 }(e.skinIndex, t, null, e))
4105 }
4106 var Gn, Jn = {},
4107 Kn = {},
4108 Qn = {},
4109 $n = {},
4110 Zn = {};
4111
4112 function ei(e, t, n, i, r) {
4113 var s = e.src + (t || ""),
4114 a = Zn[s];
4115 a || ((a = new Image).onload = function() {
4116 this.isLoaded = !0
4117 }, a.src = ".././img/weapons/" + s + ".png", Zn[s] = a), a.isLoaded && r.drawImage(
4118 a, n + e.xOff - e.length / 2, i + e.yOff - e.width / 2, e.length, e.width
4119 )
4120 }
4121 var ti = {};
4122
4123 function ni(e) {
4124 var t = e.y >= o.mapScale - o.snowBiomeTop ? 2 : e.y <= o.snowBiomeTop ? 1 :
4125 0,
4126 n = e.type + "_" + e.scale + "_" + t,
4127 i = ti[n];
4128 if (!i) {
4129 var r = document.createElement("canvas");
4130 r.width = r.height = 2.1 * e.scale + 5.5;
4131 var a = r.getContext("2d");
4132 if (a.translate(r.width / 2, r.height / 2), a.rotate(s.randFloat(0, Math.PI)),
4133 a.strokeStyle = it, a.lineWidth = 5.5, 0 == e.type)
4134 for (var c, l = 0; l < 2; ++l) ai(a, 7, c = _.scale * (l ? .5 : 1), .7 *
4135 c), a.fillStyle = t ? l ? "#fff" : "#FF7F50" : l ? "#D2691E" :
4136 "#DC143C", a.fill(), l || a.stroke();
4137 else if (1 == e.type)
4138 if (2 == t) a.fillStyle = "#606060", ai(a, 6, .3 * e.scale, .71 * e.scale),
4139 a.fill(), a.stroke(), a.fillStyle = "#FF7F50", si(0, 0, .55 * e.scale, a),
4140 a.fillStyle = "#FF6347", si(0, 0, .3 * e.scale, a, !0);
4141 else {
4142 var h;
4143 ! function(e, t, n, i) {
4144 var r, a = Math.PI / 2 * 3,
4145 o = Math.PI / 6;
4146 e.beginPath(), e.moveTo(0, -i);
4147 for (var c = 0; c < 6; c++) r = s.randInt(n + .9, 1.2 * n), e.quadraticCurveTo(
4148 Math.cos(a + o) * r, Math.sin(a + o) * r, Math.cos(a + 2 * o) * i,
4149 Math.sin(a + 2 * o) * i), a += 2 * o;
4150 e.lineTo(0, -i), e.closePath()
4151 }(a, 0, _.scale, .7 * _.scale), a.fillStyle = t ? "#800000" : "#FF7F50",
4152 a.fill(), a.stroke(), a.fillStyle = t ? "#6a64af" : "#4B0082";
4153 var u = T / 4;
4154 for (l = 0; l < 4; ++l) si((h = s.randInt(_.scale / 3.5, _.scale / 2.3)) *
4155 Math.cos(u * l), h * Math.sin(u * l), s.randInt(10, 12), a)
4156 }
4157 else 2 != e.type && 3 != e.type || (a.fillStyle = 2 == e.type ? 2 == t ?
4158 "#6A5ACD" : "#6A5ACD" : "#FF4500", ai(a, 3, e.scale, e.scale), a.fill(),
4159 a.stroke(), a.fillStyle = 2 == e.type ? 2 == t ? "#b2ab90" : "#6A5ACD" :
4160 "#9400D3", ai(a, 3, .55 * e.scale, .65 * e.scale), a.fill());
4161 i = r, ti[n] = i
4162 }
4163 return i
4164 }
4165 var ii = [];
4166
4167 function ri(e, t) {
4168 var n = ii[e.id];
4169 if (!n || t) {
4170 var i = document.createElement("canvas");
4171 i.width = i.height = 2.5 * e.scale + 5.5 + (l.list[e.id].spritePadding ||
4172 0);
4173 var r = i.getContext("2d");
4174 if (r.translate(i.width / 2, i.height / 2), r.rotate(t ? 0 : Math.PI / 2),
4175 r.strokeStyle = it, r.lineWidth = 5.5 * (t ? i.width / 81 : 1), "apple" ==
4176 e.name) {
4177 r.fillStyle = "#fffb00", si(0, 0, e.scale, r), r.fillStyle = "#89a54c";
4178 var a = -Math.PI / 2;
4179 ! function(e, t, n, i, r) {
4180 var s = e + 25 * Math.cos(i),
4181 a = t + 25 * Math.sin(i);
4182 r.moveTo(e, t), r.beginPath(), r.quadraticCurveTo((e + s) / 2 + 10 *
4183 Math.cos(i + Math.PI / 2), (t + a) / 2 + 10 * Math.sin(i + Math.PI / 2),
4184 s, a), r.quadraticCurveTo((e + s) / 2 - 10 * Math.cos(i + Math.PI / 2),
4185 (t + a) / 2 - 10 * Math.sin(i + Math.PI / 2), e, t), r.closePath(), r.fill(),
4186 r.stroke()
4187 }(e.scale * Math.cos(a), e.scale * Math.sin(a), 0, a + Math.PI / 2, r)
4188 } else if ("cookie" == e.name) {
4189 r.fillStyle = "#fffb00", si(0, 0, e.scale, r), r.fillStyle = "#937c4b";
4190 for (var o = T / (h = 4), c = 0; c < h; ++c) si((u = s.randInt(e.scale /
4191 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(
4192 4, 5), r, !0)
4193 } else if ("cheese" == e.name) {
4194 var h, u;
4195 for (r.fillStyle = "#fffb00", si(0, 0, e.scale, r), r.fillStyle =
4196 "#c3c28b", o = T / (h = 4), c = 0; c < h; ++c) si((u = s.randInt(e.scale /
4197 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(
4198 4, 5), r, !0)
4199 } else if ("wood wall" == e.name || "stone wall" == e.name ||
4200 "castle wall" == e.name) {
4201 r.fillStyle = "castle wall" == e.name ? "#83898e" : "wood wall" == e.name ?
4202 "#a5974c" : "#939393";
4203 var f = "castle wall" == e.name ? 4 : 3;
4204 ai(r, f, 1.1 * e.scale, 1.1 * e.scale), r.fill(), r.stroke(), r.fillStyle =
4205 "castle wall" == e.name ? "#9da4aa" : "wood wall" == e.name ? "#c9b758" :
4206 "#bcbcbc", ai(r, f, .65 * e.scale, .65 * e.scale), r.fill()
4207 } else if ("spikes" == e.name || "greater spikes" == e.name ||
4208 "poison spikes" == e.name || "spinning spikes" == e.name) {
4209 r.fillStyle = "poison spikes" == e.name ? "#fffb00" : "#939393";
4210 var d = .6 * e.scale;
4211 ai(r, "spikes" == e.name ? 5 : 6, e.scale, d), r.fill(), r.stroke(), r.fillStyle =
4212 "#fffb00", si(0, 0, d, r), r.fillStyle = "#c9b758", si(0, 0, d / 2, r, !
4213 0)
4214 } else if ("windmill" == e.name || "faster windmill" == e.name ||
4215 "power mill" == e.name) r.fillStyle = "#fffb00", si(0, 0, e.scale, r), r.fillStyle =
4216 "#c9b758", ci(0, 0, 1.5 * e.scale, 29, 4, r), r.fillStyle = "#fffb00", si(
4217 0, 0, .5 * e.scale, r);
4218 else if ("mine" == e.name) r.fillStyle = "#939393", ai(r, 3, e.scale, e.scale),
4219 r.fill(), r.stroke(), r.fillStyle = "#fffb00", ai(r, 3, .55 * e.scale,
4220 .65 * e.scale), r.fill();
4221 else if ("sapling" == e.name)
4222 for (c = 0; c < 2; ++c) ai(r, 7, d = e.scale * (c ? .5 : 1), .7 * d), r.fillStyle =
4223 c ? "#fffb00" : "#fffb00", r.fill(), c || r.stroke();
4224 else if ("pit trap" == e.name) r.fillStyle = "#fffb00", ai(r, 3, 1.1 * e.scale,
4225 1.1 * e.scale), r.fill(), r.stroke(), r.fillStyle = it, ai(r, 3, .65 * e
4226 .scale, .65 * e.scale), r.fill();
4227 else if ("boost pad" == e.name) r.fillStyle = "#fffb00", oi(0, 0, 2 * e.scale,
4228 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#dbd97d",
4229 function(e, t) {
4230 t = t || be;
4231 var n = e * (Math.sqrt(3) / 2);
4232 t.beginPath(), t.moveTo(0, -n / 2), t.lineTo(-e / 2, n / 2), t.lineTo(e /
4233 2, n / 2), t.lineTo(0, -n / 2), t.fill(), t.closePath()
4234 }(1 * e.scale, r);
4235 else if ("turret" == e.name) r.fillStyle = "#fffb00", si(0, 0, e.scale, r),
4236 r.fill(), r.stroke(), r.fillStyle = "#939393", oi(0, -25, .9 * e.scale,
4237 50, r), si(0, 0, .6 * e.scale, r), r.fill(), r.stroke();
4238 else if ("platform" == e.name) {
4239 r.fillStyle = "#fffb00";
4240 var p = 2 * e.scale,
4241 g = p / 4,
4242 m = -e.scale / 2;
4243 for (c = 0; c < 4; ++c) oi(m - g / 2, 0, g, 2 * e.scale, r), r.fill(), r.stroke(),
4244 m += p / 4
4245 } else "healing pad" == e.name ? (r.fillStyle = "#7e7f82", oi(0, 0, 2 * e.scale,
4246 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#fffb00", ci(0, 0,
4247 .65 * e.scale, 20, 4, r, !0)) : "spawn pad" == e.name ? (r.fillStyle =
4248 "#7e7f82", oi(0, 0, 2 * e.scale, 2 * e.scale, r), r.fill(), r.stroke(),
4249 r.fillStyle = "#fffb00", si(0, 0, .6 * e.scale, r)) : "blocker" == e.name ?
4250 (r.fillStyle = "#7e7f82", si(0, 0, e.scale, r), r.fill(), r.stroke(), r.rotate(
4251 Math.PI / 4), r.fillStyle = "#fffb00", ci(0, 0, .65 * e.scale, 20, 4, r, !
4252 0)) : "teleporter" == e.name && (r.fillStyle = "#7e7f82", si(0, 0, e.scale,
4253 r), r.fill(), r.stroke(), r.rotate(Math.PI / 4), r.fillStyle =
4254 "#fffb00", si(0, 0, .5 * e.scale, r, !0));
4255 n = i, t || (ii[e.id] = n)
4256 }
4257 return n
4258 }
4259
4260 function si(e, t, n, i, r, s) {
4261 (i = i || be).beginPath(), i.arc(e, t, n, 0, 2 * Math.PI), s || i.fill(), r ||
4262 i.stroke()
4263 }
4264
4265 function ai(e, t, n, i) {
4266 var r, s, a = Math.PI / 2 * 3,
4267 o = Math.PI / t;
4268 e.beginPath(), e.moveTo(0, -n);
4269 for (var c = 0; c < t; c++) r = Math.cos(a) * n, s = Math.sin(a) * n, e.lineTo(
4270 r, s), a += o, r = Math.cos(a) * i, s = Math.sin(a) * i, e.lineTo(r, s),
4271 a += o;
4272 e.lineTo(0, -n), e.closePath()
4273 }
4274
4275 function oi(e, t, n, i, r, s) {
4276 r.fillRect(e - n / 2, t - i / 2, n, i), s || r.strokeRect(e - n / 2, t - i /
4277 2, n, i)
4278 }
4279
4280 function ci(e, t, n, i, r, s, a) {
4281 s.save(), s.translate(e, t), r = Math.ceil(r / 2);
4282 for (var o = 0; o < r; o++) oi(0, 0, 2 * n, i, s, a), s.rotate(Math.PI / r);
4283 s.restore()
4284 }
4285
4286 function li(e) {
4287 for (var t = 0; t < e.length;) nt.add(e[t], e[t + 1], e[t + 2], e[t + 3], e[
4288 t + 4], e[t + 5], l.list[e[t + 6]], !0, e[t + 7] >= 0 ? {
4289 sid: e[t + 7]
4290 } : null), t += 8
4291 }
4292
4293 function hi(e, t) {
4294 (_ = Mi(t)) && (_.xWiggle += o.gatherWiggle * Math.cos(e), _.yWiggle += o.gatherWiggle *
4295 Math.sin(e))
4296 }
4297
4298 function ui(e, t) {
4299 (_ = Mi(e)) && (_.dir = t, _.xWiggle += o.gatherWiggle * Math.cos(t + Math.PI),
4300 _.yWiggle += o.gatherWiggle * Math.sin(t + Math.PI))
4301 }
4302
4303 function fi(e, t, n, i, r, s, a, o) {
4304 lt && (J.addProjectile(e, t, n, i, r, s, null, null, a).sid = o)
4305 }
4306
4307 function di(e, t) {
4308 for (var n = 0; n < G.length; ++n) G[n].sid == e && (G[n].range = t)
4309 }
4310
4311 function pi(e) {
4312 (_ = Ei(e)) && _.startAnim()
4313 }
4314
4315 function gi(e) {
4316 for (var t = 0; t < Y.length; ++t) Y[t].forcePos = !Y[t].visible, Y[t].visible = !
4317 1;
4318 if (e) {
4319 var n = Date.now();
4320 for (t = 0; t < e.length;)(_ = Ei(e[t])) ? (_.index = e[t + 1], _.t1 =
4321 void 0 === _.t2 ? n : _.t2, _.t2 = n, _.x1 = _.x, _.y1 = _.y, _.x2 = e[t +
4322 2], _.y2 = e[t + 3], _.d1 = void 0 === _.d2 ? e[t + 4] : _.d2, _.d2 = e[
4323 t + 4], _.health = e[t + 5], _.dt = 0, _.visible = !0) : ((_ = Z.spawn(
4324 e[t + 2], e[t + 3], e[t + 4], e[t + 1])).x2 = _.x, _.y2 = _.y, _.d2 = _
4325 .dir, _.health = e[t + 5], Z.aiTypes[e[t + 1]].name || (_.name = o.cowNames[
4326 e[t + 6]]), _.forcePos = !0, _.sid = e[t], _.visible = !0), t += 7
4327 }
4328 }
4329 var mi = {};
4330
4331 function yi(e, t) {
4332 var n = e.index,
4333 i = mi[n];
4334 if (!i) {
4335 var r = new Image;
4336 r.onload = function() {
4337 this.isLoaded = !0, this.onload = null
4338 }, r.src = ".././img/animals/" + e.src + ".png", i = r, mi[n] = i
4339 }
4340 if (i.isLoaded) {
4341 var s = 1.2 * e.scale * (e.spriteMlt || 1);
4342 t.drawImage(i, -s, -s, 2 * s, 2 * s)
4343 }
4344 }
4345
4346 function ki(e, t, n) {
4347 return e + n >= 0 && e - n <= oe && t + n >= 0 && t - n <= ce
4348 }
4349
4350 function vi(e, t) {
4351 var n = function(e) {
4352 for (var t = 0; t < W.length; ++t)
4353 if (W[t].id == e) return W[t];
4354 return null
4355 }(e[0]);
4356 n || (n = new u(e[0], e[1], o, s, J, nt, W, Y, l, et, tt), W.push(n)), n.spawn(
4357 t ? H : null), n.visible = !1, n.x2 = void 0, n.y2 = void 0, n.setData(e),
4358 t && (U = (R = n).x, D = R.y, $t(), On(), Dn(), Un(0), Be.style.display =
4359 "block")
4360 }
4361
4362 function wi(e) {
4363 for (var t = 0; t < W.length; t++)
4364 if (W[t].id == e) {
4365 W.splice(t, 1);
4366 break
4367 }
4368 }
4369
4370 function bi(e, t) {
4371 R && (R.itemCounts[e] = t)
4372 }
4373
4374 function xi(e, t, n) {
4375 R && (R[e] = t, n && On())
4376 }
4377
4378 function Si(e, t) {
4379 (_ = Ii(e)) && (_.health = t)
4380 }
4381
4382 function Ti(e) {
4383 for (var t = Date.now(), n = 0; n < W.length; ++n) W[n].forcePos = !W[n].visible,
4384 W[n].visible = !1;
4385 for (n = 0; n < e.length;)(_ = Ii(e[n])) && (_.t1 = void 0 === _.t2 ? t : _
4386 .t2, _.t2 = t, _.x1 = _.x, _.y1 = _.y, _.x2 = e[n + 1], _.y2 = e[n + 2],
4387 _.d1 = void 0 === _.d2 ? e[n + 3] : _.d2, _.d2 = e[n + 3], _.dt = 0, _.buildIndex =
4388 e[n + 4], _.weaponIndex = e[n + 5], _.weaponVariant = e[n + 6], _.team =
4389 e[n + 7], _.isLeader = e[n + 8], _.skinIndex = e[n + 9], _.tailIndex = e[
4390 n + 10], _.iconIndex = e[n + 11], _.zIndex = e[n + 12], _.visible = !0),
4391 n += 13
4392 }
4393
4394 function Ii(e) {
4395 for (var t = 0; t < W.length; ++t)
4396 if (W[t].sid == e) return W[t];
4397 return null
4398 }
4399
4400 function Ei(e) {
4401 for (var t = 0; t < Y.length; ++t)
4402 if (Y[t].sid == e) return Y[t];
4403 return null
4404 }
4405
4406 function Mi(e) {
4407 for (var t = 0; t < N.length; ++t)
4408 if (N[t].sid == e) return N[t];
4409 return null
4410 }
4411 var Ai = -1;
4412
4413 function Pi() {
4414 var e = Date.now() - Ai;
4415 window.pingTime = e, Ie.innerText = "Ping: " + e + " ms"
4416 }
4417
4418 function Bi() {
4419 Ai = Date.now(), r.send("pp")
4420 }
4421
4422 function Ci(e) {
4423 if (!(e < 0)) {
4424 var t = Math.floor(e / 60),
4425 n = e % 60;
4426 n = ("0" + n).slice(-2), Ee.innerText = "Server restarting in " + t + ":" +
4427 n, Ee.hidden = !1
4428 }
4429 }
4430
4431 function Oi(e) {
4432 window.open(e, "_blank")
4433 }
4434 window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame ||
4435 window.mozRequestAnimationFrame || function(e) {
4436 window.setTimeout(e, 1e3 / 60)
4437 },
4438 function() {
4439 var e = o.mapScale / 2;
4440 nt.add(0, e, e + 200, 0, o.treeScales[3], 0), nt.add(1, e, e - 480, 0, o.treeScales[
4441 3], 0), nt.add(2, e + 300, e + 450, 0, o.treeScales[3], 0), nt.add(3, e -
4442 950, e - 130, 0, o.treeScales[2], 0), nt.add(4, e - 750, e - 400, 0, o.treeScales[
4443 3], 0), nt.add(5, e - 700, e + 400, 0, o.treeScales[2], 0), nt.add(6, e +
4444 800, e - 200, 0, o.treeScales[3], 0), nt.add(7, e - 260, e + 340, 0, o.bushScales[
4445 3], 1), nt.add(8, e + 760, e + 310, 0, o.bushScales[3], 1), nt.add(9, e -
4446 800, e + 100, 0, o.bushScales[3], 1), nt.add(10, e - 800, e + 300, 0, l.list[
4447 4].scale, l.list[4].id, l.list[10]), nt.add(11, e + 650, e - 390, 0, l.list[
4448 4].scale, l.list[4].id, l.list[10]), nt.add(12, e - 400, e - 450, 0, o.rockScales[
4449 2], 2)
4450 }(),
4451 function e() {
4452 B = Date.now(), P = B - q, q = B,
4453 function() {
4454 if (R && (!C || B - C >= 1e3 / o.clientSendRate) && (C = B, r.send("2",
4455 pn())), An < 120 && (An += .1 * P, Ge.style.fontSize = Math.min(Math.round(
4456 An), 120) + "px"), R) {
4457 var e = s.getDistance(U, D, R.x, R.y),
4458 t = s.getDirection(R.x, R.y, U, D),
4459 n = Math.min(.01 * e * P, e);
4460 e > .05 ? (U += n * Math.cos(t), D += n * Math.sin(t)) : (U = R.x, D =
4461 R.y)
4462 } else U = o.mapScale / 2, D = o.mapScale / 2;
4463 for (var i = B - 1e3 / o.serverUpdateRate, a = 0; a < W.length + Y.length; ++
4464 a)
4465 if ((_ = W[a] || Y[a - W.length]) && _.visible)
4466 if (_.forcePos) _.x = _.x2, _.y = _.y2, _.dir = _.d2;
4467 else {
4468 var c = _.t2 - _.t1,
4469 l = (i - _.t1) / c;
4470 _.dt += P;
4471 var h = Math.min(1.7, _.dt / 170),
4472 u = _.x2 - _.x1;
4473 _.x = _.x1 + u * h, u = _.y2 - _.y1, _.y = _.y1 + u * h, _.dir = Math
4474 .lerpAngle(_.d2, _.d1, Math.min(1.2, l))
4475 }
4476 var f = U - oe / 2,
4477 d = D - ce / 2;
4478 o.snowBiomeTop - d <= 0 && o.mapScale - o.snowBiomeTop - d >= ce ? (be.fillStyle =
4479 " #DAA520", be.fillRect(0, 0, oe, ce)) : o.mapScale - o.snowBiomeTop -
4480 d <= 0 ? (be.fillStyle = "#FF4500", be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop -
4481 d >= ce ? (be.fillStyle = "#d6c60f", be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop -
4482 d >= 0 ? (be.fillStyle = "#d6c60f", be.fillRect(0, 0, oe, o.snowBiomeTop -
4483 d), be.fillStyle = "#DAA520", be.fillRect(0, o.snowBiomeTop - d, oe,
4484 ce - (o.snowBiomeTop - d))) : (be.fillStyle = "#DAA520", be.fillRect(0,
4485 0, oe, o.mapScale - o.snowBiomeTop - d), be.fillStyle = "#FF4500", be
4486 .fillRect(0, o.mapScale - o.snowBiomeTop - d, oe, ce - (o.mapScale - o
4487 .snowBiomeTop - d))), In || ((ee += te * o.waveSpeed * P) >= o.waveMax ?
4488 (ee = o.waveMax, te = -1) : ee <= 1 && (ee = te = 1), be.globalAlpha =
4489 1, be.fillStyle = "#FF4500", qn(f, d, be, o.riverPadding), be.fillStyle =
4490 "#00FFFF", qn(f, d, be, 250 * (ee - 1))), be.lineWidth = 4, be.strokeStyle =
4491 "#000", be.globalAlpha = .06, be.beginPath();
4492 for (var p = -U; p < oe; p += ce / 18) p > 0 && (be.moveTo(p, 0), be.lineTo(
4493 p, ce));
4494 for (var g = -D; g < ce; g += ce / 18) p > 0 && (be.moveTo(0, g), be.lineTo(
4495 oe, g));
4496 for (be.stroke(), be.globalAlpha = 1, be.strokeStyle = it, Yn(-1, f, d),
4497 be.globalAlpha = 1, be.lineWidth = 5.5, zn(0, f, d), Xn(f, d, 0), be.globalAlpha =
4498 1, a = 0; a < Y.length; ++a)(_ = Y[a]).active && _.visible && (_.animate(
4499 P), be.save(), be.translate(_.x - f, _.y - d), be.rotate(_.dir + _.dirPlus -
4500 Math.PI / 2), yi(_, be), be.restore());
4501 if (Yn(0, f, d), zn(1, f, d), Yn(1, f, d), Xn(f, d, 1), Yn(2, f, d), Yn(
4502 3, f, d), be.fillStyle = "#000", be.globalAlpha = .09, f <= 0 && be.fillRect(
4503 0, 0, -f, ce), o.mapScale - f <= oe) {
4504 var y = Math.max(0, -d);
4505 be.fillRect(o.mapScale - f, y, oe - (o.mapScale - f), ce - y)
4506 }
4507 if (d <= 0 && be.fillRect(-f, 0, oe + f, -d), o.mapScale - d <= ce) {
4508 var k = Math.max(0, -f),
4509 v = 0;
4510 o.mapScale - f <= oe && (v = oe - (o.mapScale - f)), be.fillRect(k, o.mapScale -
4511 d, oe - k - v, ce - (o.mapScale - d))
4512 }
4513 for (be.globalAlpha = 1, be.fillStyle = "rgba(0, 0, 70, 0.35)", be.fillRect(
4514 0, 0, oe, ce), be.strokeStyle = rt, a = 0; a < W.length + Y.length; ++
4515 a)
4516 if ((_ = W[a] || Y[a - W.length]).visible && (10 != _.skinIndex || _ ==
4517 R || _.team && _.team == R.team)) {
4518 var w = (_.team?"["+_.team+"] ":"")+(_.name||"")
4519 if ("" != w) {
4520 if (be.font = (_.nameScale || 30) + "px Hammersmith One", be.fillStyle =
4521 "#fff", be.textBaseline = "middle", be.textAlign = "center", be.lineWidth =
4522 _.nameScale ? 11 : 8, be.lineJoin = "round", be.strokeText(w, _.x -
4523 f, _.y - d - _.scale - o.nameY), be.fillText(w, _.x - f, _.y - d -
4524 _.scale - o.nameY), _.isLeader && Rn.crown.isLoaded) {
4525 var b = o.crownIconScale;
4526 k = _.x - f - b / 2 - be.measureText(w).width / 2 - o.crownPad, be.drawImage(
4527 Rn.crown, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b)
4528 }
4529 1 == _.iconIndex && Rn.skull.isLoaded && (b = o.crownIconScale, k = _
4530 .x - f - b / 2 + be.measureText(w).width / 2 + o.crownPad, be.drawImage(
4531 Rn.skull, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b))
4532 }
4533 window.items = R.items;
4534 window.w = R.weapons;
4535 (be.textAlign = "center",//hp number
4536 be.fillStyle = "#fff",
4537 be.lineJoin = "round",
4538 be.font = "20px Hammersmith One",
4539 be.lineWidth = 6,
4540 be.strokeText(`\nHP:${_.health}/${_.maxHealth}`,_.x - f,_.y - d + _.scale + o.nameY+(34)),
4541 be.fillText(`\nHP:${_.health}/${_.maxHealth}`,_.x - f,_.y - d + _.scale + o.nameY+(34))
4542 )
4543 if(_.isPlayer&&_!=R&&_.team&&_.team==R.team){//tribe tracers
4544 be.lineCap = "round";
4545 be.strokeStyle = "#00ff00";
4546 be.lineWidth = 3;
4547 be.beginPath();
4548 be.moveTo(R.x-f, R.y-d);
4549 be.lineTo(_.x-f, _.y-d);
4550 be.stroke();
4551 be.strokeStyle = nt;
4552 }
4553 if(_.isPlayer&&_!=R&&(_.team!=R.team||!_.team)){//enemy tracers
4554 be.lineCap = "round";
4555 be.strokeStyle = "#ff0000";
4556 be.lineWidth = 3;
4557 be.beginPath();
4558 be.moveTo(R.x-f, R.y-d);
4559 be.lineTo(_.x-f, _.y-d);
4560 be.stroke();
4561 be.strokeStyle = nt;
4562 }
4563 if(!_.isPlayer){//animal tracers
4564 be.lineCap = "round";
4565 be.strokeStyle = "#2A1BF3";
4566 be.lineWidth = 3;
4567 be.beginPath();
4568 be.moveTo(R.x-f, R.y-d);
4569 be.lineTo(_.x-f, _.y-d);
4570 be.stroke();
4571 be.strokeStyle = nt;
4572
4573 }
4574 _.health > 0 && (o.healthBarWidth, be.fillStyle = rt, be.roundRect(_.x -
4575 f - o.healthBarWidth - o.healthBarPad, _.y - d + _.scale + o.nameY,
4576 2 * o.healthBarWidth + 2 * o.healthBarPad, 17, 8), be.fill(), be.fillStyle =
4577 _ == R || _.team && _.team == R.team ? "#8ecc51" : "#cc5151", be.roundRect(
4578 _.x - f - o.healthBarWidth, _.y - d + _.scale + o.nameY + o.healthBarPad,
4579 2 * o.healthBarWidth * (_.health / _.maxHealth), 17 - 2 * o.healthBarPad,
4580 7), be.fill())
4581 }
4582 for (m.update(P, be, f, d), a = 0; a < W.length; ++a)
4583 if ((_ = W[a]).visible && _.chatCountdown > 0) {
4584 _.chatCountdown -= P, _.chatCountdown <= 0 && (_.chatCountdown = 0),
4585 be.font = "32px Hammersmith One";
4586 var x = be.measureText(_.chatMessage);
4587 be.textBaseline = "middle", be.textAlign = "center", k = _.x - f, y =
4588 _.y - _.scale - d - 90;
4589 var S = x.width + 17;
4590 be.fillStyle = "rgba(0,0,0,0.2)", be.roundRect(k - S / 2, y - 23.5, S,
4591 47, 6), be.fill(), be.fillStyle = "#fff", be.fillText(_.chatMessage,
4592 k, y)
4593 }! function(e) {
4594 if (R && R.alive) {
4595 Ke.clearRect(0, 0, Ne.width, Ne.height), Ke.strokeStyle = "#fff", Ke.lineWidth =
4596 4;
4597 for (var t = 0; t < qt.length; ++t)(Vt = qt[t]).update(Ke, e);
4598 if (Ke.globalAlpha = 1, Ke.fillStyle = "#fff", si(R.x / o.mapScale *
4599 Ne.width, R.y / o.mapScale * Ne.height, 7, Ke, !0), Ke.fillStyle =
4600 "rgba(255,255,255,0.35)", R.team && Et)
4601 for (t = 0; t < Et.length;) si(Et[t] / o.mapScale * Ne.width, Et[t +
4602 1] / o.mapScale * Ne.height, 7, Ke, !0), t += 2;
4603 It && (Ke.fillStyle = "#0a0a0a", Ke.font = "34px Hammersmith One", Ke.textBaseline =
4604 "middle", Ke.textAlign = "center", Ke.fillText("x", It.x / o.mapScale *
4605 Ne.width, It.y / o.mapScale * Ne.height)), Mt && (Ke.fillStyle =
4606 "#fff", Ke.font = "34px Hammersmith One", Ke.textBaseline = "middle",
4607 Ke.textAlign = "center", Ke.fillText("x", Mt.x / o.mapScale * Ne.width,
4608 Mt.y / o.mapScale * Ne.height))
4609 }
4610 }(P), -1 !== re.id && Fn(re.startX, re.startY, re.currentX, re.currentY), -
4611 1 !== se.id && Fn(se.startX, se.startY, se.currentX, se.currentY)
4612 }(), requestAnimFrame(e)
4613 }(), window.openLink = Oi, window.aJoinReq = Dt, window.follmoo = function() {
4614 H || (H = !0, I("moofoll", 1))
4615 }, window.kickFromClan = Lt, window.sendJoin = Ft, window.leaveAlliance =
4616 Ht, window.createAlliance = zt, window.storeBuy = Kt, window.storeEquip =
4617 Jt, window.showItemInfo = Tt, window.selectSkinColor = function(e) {
4618 ae = e, en()
4619 }, window.changeStoreIndex = function(e) {
4620 Xt != e && (Xt = e, Gt())
4621 }, window.config = o
4622}, function(e, t) {
4623 ! function(e, t, n) {
4624 function i(e, t) {
4625 return typeof e === t
4626 }
4627 var r = [],
4628 s = [],
4629 a = {
4630 _version: "3.5.0",
4631 _config: {
4632 classPrefix: "",
4633 enableClasses: !0,
4634 enableJSClass: !0,
4635 usePrefixes: !0
4636 },
4637 _q: [],
4638 on: function(e, t) {
4639 var n = this;
4640 setTimeout((function() {
4641 t(n[e])
4642 }), 0)
4643 },
4644 addTest: function(e, t, n) {
4645 s.push({
4646 name: e,
4647 fn: t,
4648 options: n
4649 })
4650 },
4651 addAsyncTest: function(e) {
4652 s.push({
4653 name: null,
4654 fn: e
4655 })
4656 }
4657 },
4658 o = function() {};
4659 o.prototype = a, o = new o;
4660 var c = t.documentElement,
4661 l = "svg" === c.nodeName.toLowerCase();
4662 o.addTest("passiveeventlisteners", (function() {
4663 var t = !1;
4664 try {
4665 var n = Object.defineProperty({}, "passive", {
4666 get: function() {
4667 t = !0
4668 }
4669 });
4670 e.addEventListener("test", null, n)
4671 } catch (e) {}
4672 return t
4673 })),
4674 function() {
4675 var e, t, n, a, c, l;
4676 for (var h in s)
4677 if (s.hasOwnProperty(h)) {
4678 if (e = [], (t = s[h]).name && (e.push(t.name.toLowerCase()), t.options &&
4679 t.options.aliases && t.options.aliases.length))
4680 for (n = 0; n < t.options.aliases.length; n++) e.push(t.options.aliases[
4681 n].toLowerCase());
4682 for (a = i(t.fn, "function") ? t.fn() : t.fn, c = 0; c < e.length; c++)
4683 1 === (l = e[c].split(".")).length ? o[l[0]] = a : (!o[l[0]] || o[l[0]] instanceof Boolean ||
4684 (o[l[0]] = new Boolean(o[l[0]])), o[l[0]][l[1]] = a), r.push((a ? "" :
4685 "no-") + l.join("-"))
4686 }
4687 }(),
4688 function(e) {
4689 var t = c.className,
4690 n = o._config.classPrefix || "";
4691 if (l && (t = t.baseVal), o._config.enableJSClass) {
4692 var i = new RegExp("(^|\\s)" + n + "no-js(\\s|$)");
4693 t = t.replace(i, "$1" + n + "js$2")
4694 }
4695 o._config.enableClasses && (t += " " + n + e.join(" " + n), l ? c.className
4696 .baseVal = t : c.className = t)
4697 }(r), delete a.addTest, delete a.addAsyncTest;
4698 for (var h = 0; h < o._q.length; h++) o._q[h]();
4699 e.Modernizr = o
4700 }(window, document)
4701}, function(e, t, n) {
4702 var i = n(24);
4703 n(19), e.exports = {
4704 socket: null,
4705 connected: !1,
4706 socketId: -1,
4707 connect: function(e, t, n) {
4708 if (!this.socket) {
4709 var r = this;
4710 try {
4711 var s = !1,
4712 a = e;
4713 this.socket = new WebSocket(a), this.socket.binaryType = "arraybuffer",
4714 this.socket.onmessage = function(e) {
4715 var t = new Uint8Array(e.data),
4716 s = i.decode(t),
4717 a = s[0];
4718 t = s[1], "io-init" == a ? r.socketId = t[0] : n[a].apply(void 0, t)
4719 }, this.socket.onopen = function() {
4720 r.connected = !0, t()
4721 }, this.socket.onclose = function(e) {
4722 r.connected = !1, 4001 == e.code ? t("Invalid Connection") : s || t(
4723 "disconnected")
4724 }, this.socket.onerror = function(e) {
4725 this.socket && this.socket.readyState != WebSocket.OPEN && (s = !0,
4726 console.error("Socket error", arguments), t("Socket error"))
4727 }
4728 } catch (e) {
4729 console.warn("Socket connection error:", e), t(e)
4730 }
4731 }
4732 },
4733 send: function(e) {
4734 var t = Array.prototype.slice.call(arguments, 1),
4735 n = i.encode([e, t]);
4736 this.socket.send(n)
4737 },
4738 socketReady: function() {
4739 return this.socket && this.connected
4740 },
4741 close: function() {
4742 this.socket && this.socket.close()
4743 }
4744 }
4745}, function(e, t, n) {
4746 t.encode = n(9).encode, t.decode = n(15).decode, t.Encoder = n(37).Encoder,
4747 t.Decoder = n(38).Decoder, t.createCodec = n(39).createCodec, t.codec = n(
4748 40).codec
4749}, function(e, t, n) {
4750 (function(t) {
4751 function n(e) {
4752 return e && e.isBuffer && e
4753 }
4754 e.exports = n(void 0 !== t && t) || n(this.Buffer) || n("undefined" !=
4755 typeof window && window.Buffer) || this.Buffer
4756 }).call(this, n(11).Buffer)
4757}, function(e, t, n) {
4758 "use strict";
4759 t.byteLength = function(e) {
4760 var t = l(e),
4761 n = t[0],
4762 i = t[1];
4763 return 3 * (n + i) / 4 - i
4764 }, t.toByteArray = function(e) {
4765 var t, n, i = l(e),
4766 a = i[0],
4767 o = i[1],
4768 c = new s(function(e, t, n) {
4769 return 3 * (t + n) / 4 - n
4770 }(0, a, o)),
4771 h = 0,
4772 u = o > 0 ? a - 4 : a;
4773 for (n = 0; n < u; n += 4) t = r[e.charCodeAt(n)] << 18 | r[e.charCodeAt(n +
4774 1)] << 12 | r[e.charCodeAt(n + 2)] << 6 | r[e.charCodeAt(n + 3)], c[h++] =
4775 t >> 16 & 255, c[h++] = t >> 8 & 255, c[h++] = 255 & t;
4776 return 2 === o && (t = r[e.charCodeAt(n)] << 2 | r[e.charCodeAt(n + 1)] >>
4777 4, c[h++] = 255 & t), 1 === o && (t = r[e.charCodeAt(n)] << 10 | r[e.charCodeAt(
4778 n + 1)] << 4 | r[e.charCodeAt(n + 2)] >> 2, c[h++] = t >> 8 & 255, c[h++] =
4779 255 & t), c
4780 }, t.fromByteArray = function(e) {
4781 for (var t, n = e.length, r = n % 3, s = [], a = 0, o = n - r; a < o; a +=
4782 16383) s.push(u(e, a, a + 16383 > o ? o : a + 16383));
4783 return 1 === r ? (t = e[n - 1], s.push(i[t >> 2] + i[t << 4 & 63] + "==")) :
4784 2 === r && (t = (e[n - 2] << 8) + e[n - 1], s.push(i[t >> 10] + i[t >> 4 &
4785 63] + i[t << 2 & 63] + "=")), s.join("")
4786 };
4787 for (var i = [], r = [], s = "undefined" != typeof Uint8Array ? Uint8Array :
4788 Array, a =
4789 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0,
4790 c = a.length; o < c; ++o) i[o] = a[o], r[a.charCodeAt(o)] = o;
4791
4792 function l(e) {
4793 var t = e.length;
4794 if (t % 4 > 0) throw new Error(
4795 "Invalid string. Length must be a multiple of 4");
4796 var n = e.indexOf("=");
4797 return -1 === n && (n = t), [n, n === t ? 0 : 4 - n % 4]
4798 }
4799
4800 function h(e) {
4801 return i[e >> 18 & 63] + i[e >> 12 & 63] + i[e >> 6 & 63] + i[63 & e]
4802 }
4803
4804 function u(e, t, n) {
4805 for (var i, r = [], s = t; s < n; s += 3) i = (e[s] << 16 & 16711680) + (e[
4806 s + 1] << 8 & 65280) + (255 & e[s + 2]), r.push(h(i));
4807 return r.join("")
4808 }
4809 r["-".charCodeAt(0)] = 62, r["_".charCodeAt(0)] = 63
4810}, function(e, t) {
4811 var n = {}.toString;
4812 e.exports = Array.isArray || function(e) {
4813 return "[object Array]" == n.call(e)
4814 }
4815}, function(e, t, n) {
4816 var i = n(0);
4817
4818 function r(e) {
4819 return new Array(e)
4820 }(t = e.exports = r(0)).alloc = r, t.concat = i.concat, t.from = function(e) {
4821 if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
4822 else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
4823 else {
4824 if ("string" == typeof e) return i.from.call(t, e);
4825 if ("number" == typeof e) throw new TypeError(
4826 '"value" argument must not be a number')
4827 }
4828 return Array.prototype.slice.call(e)
4829 }
4830}, function(e, t, n) {
4831 var i = n(0),
4832 r = i.global;
4833
4834 function s(e) {
4835 return new r(e)
4836 }(t = e.exports = i.hasBuffer ? s(0) : []).alloc = i.hasBuffer && r.alloc ||
4837 s, t.concat = i.concat, t.from = function(e) {
4838 if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
4839 else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
4840 else {
4841 if ("string" == typeof e) return i.from.call(t, e);
4842 if ("number" == typeof e) throw new TypeError(
4843 '"value" argument must not be a number')
4844 }
4845 return r.from && 1 !== r.from.length ? r.from(e) : new r(e)
4846 }
4847}, function(e, t, n) {
4848 var i = n(0);
4849
4850 function r(e) {
4851 return new Uint8Array(e)
4852 }(t = e.exports = i.hasArrayBuffer ? r(0) : []).alloc = r, t.concat = i.concat,
4853 t.from = function(e) {
4854 if (i.isView(e)) {
4855 var n = e.byteOffset,
4856 r = e.byteLength;
4857 (e = e.buffer).byteLength !== r && (e.slice ? e = e.slice(n, n + r) : (e =
4858 new Uint8Array(e)).byteLength !== r && (e = Array.prototype.slice.call(
4859 e, n, n + r)))
4860 } else {
4861 if ("string" == typeof e) return i.from.call(t, e);
4862 if ("number" == typeof e) throw new TypeError(
4863 '"value" argument must not be a number')
4864 }
4865 return new Uint8Array(e)
4866 }
4867}, function(e, t) {
4868 t.copy = function(e, t, n, i) {
4869 var r;
4870 n || (n = 0), i || 0 === i || (i = this.length), t || (t = 0);
4871 var s = i - n;
4872 if (e === this && n < t && t < i)
4873 for (r = s - 1; r >= 0; r--) e[r + t] = this[r + n];
4874 else
4875 for (r = 0; r < s; r++) e[r + t] = this[r + n];
4876 return s
4877 }, t.toString = function(e, t, n) {
4878 var i = 0 | t;
4879 n || (n = this.length);
4880 for (var r = "", s = 0; i < n;)(s = this[i++]) < 128 ? r += String.fromCharCode(
4881 s) : (192 == (224 & s) ? s = (31 & s) << 6 | 63 & this[i++] : 224 == (
4882 240 & s) ? s = (15 & s) << 12 | (63 & this[i++]) << 6 | 63 & this[i++] :
4883 240 == (248 & s) && (s = (7 & s) << 18 | (63 & this[i++]) << 12 | (63 &
4884 this[i++]) << 6 | 63 & this[i++]), s >= 65536 ? (s -= 65536, r +=
4885 String.fromCharCode(55296 + (s >>> 10), 56320 + (1023 & s))) : r +=
4886 String.fromCharCode(s));
4887 return r
4888 }, t.write = function(e, t) {
4889 for (var n = t || (t |= 0), i = e.length, r = 0, s = 0; s < i;)(r = e.charCodeAt(
4890 s++)) < 128 ? this[n++] = r : r < 2048 ? (this[n++] = 192 | r >>> 6,
4891 this[n++] = 128 | 63 & r) : r < 55296 || r > 57343 ? (this[n++] = 224 |
4892 r >>> 12, this[n++] = 128 | r >>> 6 & 63, this[n++] = 128 | 63 & r) : (r =
4893 65536 + (r - 55296 << 10 | e.charCodeAt(s++) - 56320), this[n++] = 240 |
4894 r >>> 18, this[n++] = 128 | r >>> 12 & 63, this[n++] = 128 | r >>> 6 &
4895 63, this[n++] = 128 | 63 & r);
4896 return n - t
4897 }
4898}, function(e, t, n) {
4899 t.setExtPackers = function(e) {
4900 e.addExtPacker(14, Error, [u, c]), e.addExtPacker(1, EvalError, [u, c]), e
4901 .addExtPacker(2, RangeError, [u, c]), e.addExtPacker(3, ReferenceError, [
4902 u, c
4903 ]), e.addExtPacker(4, SyntaxError, [u, c]), e.addExtPacker(5, TypeError, [
4904 u, c
4905 ]), e.addExtPacker(6, URIError, [u, c]), e.addExtPacker(10, RegExp, [h, c]),
4906 e.addExtPacker(11, Boolean, [l, c]), e.addExtPacker(12, String, [l, c]),
4907 e.addExtPacker(13, Date, [Number, c]), e.addExtPacker(15, Number, [l, c]),
4908 "undefined" != typeof Uint8Array && (e.addExtPacker(17, Int8Array, a), e.addExtPacker(
4909 18, Uint8Array, a), e.addExtPacker(19, Int16Array, a), e.addExtPacker(
4910 20, Uint16Array, a), e.addExtPacker(21, Int32Array, a), e.addExtPacker(
4911 22, Uint32Array, a), e.addExtPacker(23, Float32Array, a), "undefined" !=
4912 typeof Float64Array && e.addExtPacker(24, Float64Array, a), "undefined" !=
4913 typeof Uint8ClampedArray && e.addExtPacker(25, Uint8ClampedArray, a), e.addExtPacker(
4914 26, ArrayBuffer, a), e.addExtPacker(29, DataView, a)), r.hasBuffer && e
4915 .addExtPacker(27, s, r.from)
4916 };
4917 var i, r = n(0),
4918 s = r.global,
4919 a = r.Uint8Array.from,
4920 o = {
4921 name: 1,
4922 message: 1,
4923 stack: 1,
4924 columnNumber: 1,
4925 fileName: 1,
4926 lineNumber: 1
4927 };
4928
4929 function c(e) {
4930 return i || (i = n(9).encode), i(e)
4931 }
4932
4933 function l(e) {
4934 return e.valueOf()
4935 }
4936
4937 function h(e) {
4938 (e = RegExp.prototype.toString.call(e).split("/")).shift();
4939 var t = [e.pop()];
4940 return t.unshift(e.join("/")), t
4941 }
4942
4943 function u(e) {
4944 var t = {};
4945 for (var n in o) t[n] = e[n];
4946 return t
4947 }
4948}, function(e, t, n) {
4949 var i = n(5),
4950 r = n(7),
4951 s = r.Uint64BE,
4952 a = r.Int64BE,
4953 o = n(0),
4954 c = n(6),
4955 l = n(34),
4956 h = n(13).uint8,
4957 u = n(3).ExtBuffer,
4958 f = "undefined" != typeof Uint8Array,
4959 d = "undefined" != typeof Map,
4960 p = [];
4961 p[1] = 212, p[2] = 213, p[4] = 214, p[8] = 215, p[16] = 216, t.getWriteType =
4962 function(e) {
4963 var t = l.getWriteToken(e),
4964 n = e && e.useraw,
4965 r = f && e && e.binarraybuffer,
4966 g = r ? o.isArrayBuffer : o.isBuffer,
4967 m = r ? function(e, t) {
4968 w(e, new Uint8Array(t))
4969 } : w,
4970 y = d && e && e.usemap ? function(e, n) {
4971 if (!(n instanceof Map)) return b(e, n);
4972 var i = n.size;
4973 t[i < 16 ? 128 + i : i <= 65535 ? 222 : 223](e, i);
4974 var r = e.codec.encode;
4975 n.forEach((function(t, n, i) {
4976 r(e, n), r(e, t)
4977 }))
4978 } : b;
4979 return {
4980 boolean: function(e, n) {
4981 t[n ? 195 : 194](e, n)
4982 },
4983 function: v,
4984 number: function(e, n) {
4985 var i = 0 | n;
4986 n === i ? t[-32 <= i && i <= 127 ? 255 & i : 0 <= i ? i <= 255 ? 204 :
4987 i <= 65535 ? 205 : 206 : -128 <= i ? 208 : -32768 <= i ? 209 : 210](e,
4988 i) : t[203](e, n)
4989 },
4990 object: n ? function(e, n) {
4991 if (g(n)) return function(e, n) {
4992 var i = n.length;
4993 t[i < 32 ? 160 + i : i <= 65535 ? 218 : 219](e, i), e.send(n)
4994 }(e, n);
4995 k(e, n)
4996 } : k,
4997 string: function(e) {
4998 return function(n, i) {
4999 var r = i.length,
5000 s = 5 + 3 * r;
5001 n.offset = n.reserve(s);
5002 var a = n.buffer,
5003 o = e(r),
5004 l = n.offset + o;
5005 r = c.write.call(a, i, l);
5006 var h = e(r);
5007 if (o !== h) {
5008 var u = l + h - o,
5009 f = l + r;
5010 c.copy.call(a, a, u, l, f)
5011 }
5012 t[1 === h ? 160 + r : h <= 3 ? 215 + h : 219](n, r), n.offset += r
5013 }
5014 }(n ? function(e) {
5015 return e < 32 ? 1 : e <= 65535 ? 3 : 5
5016 } : function(e) {
5017 return e < 32 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5
5018 }),
5019 symbol: v,
5020 undefined: v
5021 };
5022
5023 function k(e, n) {
5024 if (null === n) return v(e, n);
5025 if (g(n)) return m(e, n);
5026 if (i(n)) return function(e, n) {
5027 var i = n.length;
5028 t[i < 16 ? 144 + i : i <= 65535 ? 220 : 221](e, i);
5029 for (var r = e.codec.encode, s = 0; s < i; s++) r(e, n[s])
5030 }(e, n);
5031 if (s.isUint64BE(n)) return function(e, n) {
5032 t[207](e, n.toArray())
5033 }(e, n);
5034 if (a.isInt64BE(n)) return function(e, n) {
5035 t[211](e, n.toArray())
5036 }(e, n);
5037 var r = e.codec.getExtPacker(n);
5038 if (r && (n = r(n)), n instanceof u) return function(e, n) {
5039 var i = n.buffer,
5040 r = i.length,
5041 s = p[r] || (r < 255 ? 199 : r <= 65535 ? 200 : 201);
5042 t[s](e, r), h[n.type](e), e.send(i)
5043 }(e, n);
5044 y(e, n)
5045 }
5046
5047 function v(e, n) {
5048 t[192](e, n)
5049 }
5050
5051 function w(e, n) {
5052 var i = n.length;
5053 t[i < 255 ? 196 : i <= 65535 ? 197 : 198](e, i), e.send(n)
5054 }
5055
5056 function b(e, n) {
5057 var i = Object.keys(n),
5058 r = i.length;
5059 t[r < 16 ? 128 + r : r <= 65535 ? 222 : 223](e, r);
5060 var s = e.codec.encode;
5061 i.forEach((function(t) {
5062 s(e, t), s(e, n[t])
5063 }))
5064 }
5065 }
5066}, function(e, t, n) {
5067 var i = n(4),
5068 r = n(7),
5069 s = r.Uint64BE,
5070 a = r.Int64BE,
5071 o = n(13).uint8,
5072 c = n(0),
5073 l = c.global,
5074 h = c.hasBuffer && "TYPED_ARRAY_SUPPORT" in l && !l.TYPED_ARRAY_SUPPORT,
5075 u = c.hasBuffer && l.prototype || {};
5076
5077 function f() {
5078 var e = o.slice();
5079 return e[196] = d(196), e[197] = p(197), e[198] = g(198), e[199] = d(199),
5080 e[200] = p(200), e[201] = g(201), e[202] = m(202, 4, u.writeFloatBE || v, !
5081 0), e[203] = m(203, 8, u.writeDoubleBE || w, !0), e[204] = d(204), e[205] =
5082 p(205), e[206] = g(206), e[207] = m(207, 8, y), e[208] = d(208), e[209] =
5083 p(209), e[210] = g(210), e[211] = m(211, 8, k), e[217] = d(217), e[218] =
5084 p(218), e[219] = g(219), e[220] = p(220), e[221] = g(221), e[222] = p(222),
5085 e[223] = g(223), e
5086 }
5087
5088 function d(e) {
5089 return function(t, n) {
5090 var i = t.reserve(2),
5091 r = t.buffer;
5092 r[i++] = e, r[i] = n
5093 }
5094 }
5095
5096 function p(e) {
5097 return function(t, n) {
5098 var i = t.reserve(3),
5099 r = t.buffer;
5100 r[i++] = e, r[i++] = n >>> 8, r[i] = n
5101 }
5102 }
5103
5104 function g(e) {
5105 return function(t, n) {
5106 var i = t.reserve(5),
5107 r = t.buffer;
5108 r[i++] = e, r[i++] = n >>> 24, r[i++] = n >>> 16, r[i++] = n >>> 8, r[i] =
5109 n
5110 }
5111 }
5112
5113 function m(e, t, n, i) {
5114 return function(r, s) {
5115 var a = r.reserve(t + 1);
5116 r.buffer[a++] = e, n.call(r.buffer, s, a, i)
5117 }
5118 }
5119
5120 function y(e, t) {
5121 new s(this, t, e)
5122 }
5123
5124 function k(e, t) {
5125 new a(this, t, e)
5126 }
5127
5128 function v(e, t) {
5129 i.write(this, e, t, !1, 23, 4)
5130 }
5131
5132 function w(e, t) {
5133 i.write(this, e, t, !1, 52, 8)
5134 }
5135 t.getWriteToken = function(e) {
5136 return e && e.uint8array ? function() {
5137 var e = f();
5138 return e[202] = m(202, 4, v), e[203] = m(203, 8, w), e
5139 }() : h || c.hasBuffer && e && e.safe ? function() {
5140 var e = o.slice();
5141 return e[196] = m(196, 1, l.prototype.writeUInt8), e[197] = m(197, 2, l.prototype
5142 .writeUInt16BE), e[198] = m(198, 4, l.prototype.writeUInt32BE), e[199] =
5143 m(199, 1, l.prototype.writeUInt8), e[200] = m(200, 2, l.prototype.writeUInt16BE),
5144 e[201] = m(201, 4, l.prototype.writeUInt32BE), e[202] = m(202, 4, l.prototype
5145 .writeFloatBE), e[203] = m(203, 8, l.prototype.writeDoubleBE), e[204] =
5146 m(204, 1, l.prototype.writeUInt8), e[205] = m(205, 2, l.prototype.writeUInt16BE),
5147 e[206] = m(206, 4, l.prototype.writeUInt32BE), e[207] = m(207, 8, y), e[
5148 208] = m(208, 1, l.prototype.writeInt8), e[209] = m(209, 2, l.prototype
5149 .writeInt16BE), e[210] = m(210, 4, l.prototype.writeInt32BE), e[211] =
5150 m(211, 8, k), e[217] = m(217, 1, l.prototype.writeUInt8), e[218] = m(
5151 218, 2, l.prototype.writeUInt16BE), e[219] = m(219, 4, l.prototype.writeUInt32BE),
5152 e[220] = m(220, 2, l.prototype.writeUInt16BE), e[221] = m(221, 4, l.prototype
5153 .writeUInt32BE), e[222] = m(222, 2, l.prototype.writeUInt16BE), e[223] =
5154 m(223, 4, l.prototype.writeUInt32BE), e
5155 }() : f()
5156 }
5157}, function(e, t, n) {
5158 t.setExtUnpackers = function(e) {
5159 e.addExtUnpacker(14, [o, l(Error)]), e.addExtUnpacker(1, [o, l(EvalError)]),
5160 e.addExtUnpacker(2, [o, l(RangeError)]), e.addExtUnpacker(3, [o, l(
5161 ReferenceError)]), e.addExtUnpacker(4, [o, l(SyntaxError)]), e.addExtUnpacker(
5162 5, [o, l(TypeError)]), e.addExtUnpacker(6, [o, l(URIError)]), e.addExtUnpacker(
5163 10, [o, c]), e.addExtUnpacker(11, [o, h(Boolean)]), e.addExtUnpacker(12, [
5164 o, h(String)
5165 ]), e.addExtUnpacker(13, [o, h(Date)]), e.addExtUnpacker(15, [o, h(Number)]),
5166 "undefined" != typeof Uint8Array && (e.addExtUnpacker(17, h(Int8Array)),
5167 e.addExtUnpacker(18, h(Uint8Array)), e.addExtUnpacker(19, [u, h(
5168 Int16Array)]), e.addExtUnpacker(20, [u, h(Uint16Array)]), e.addExtUnpacker(
5169 21, [u, h(Int32Array)]), e.addExtUnpacker(22, [u, h(Uint32Array)]), e.addExtUnpacker(
5170 23, [u, h(Float32Array)]), "undefined" != typeof Float64Array && e.addExtUnpacker(
5171 24, [u, h(Float64Array)]), "undefined" != typeof Uint8ClampedArray && e
5172 .addExtUnpacker(25, h(Uint8ClampedArray)), e.addExtUnpacker(26, u), e.addExtUnpacker(
5173 29, [u, h(DataView)])), r.hasBuffer && e.addExtUnpacker(27, h(s))
5174 };
5175 var i, r = n(0),
5176 s = r.global,
5177 a = {
5178 name: 1,
5179 message: 1,
5180 stack: 1,
5181 columnNumber: 1,
5182 fileName: 1,
5183 lineNumber: 1
5184 };
5185
5186 function o(e) {
5187 return i || (i = n(15).decode), i(e)
5188 }
5189
5190 function c(e) {
5191 return RegExp.apply(null, e)
5192 }
5193
5194 function l(e) {
5195 return function(t) {
5196 var n = new e;
5197 for (var i in a) n[i] = t[i];
5198 return n
5199 }
5200 }
5201
5202 function h(e) {
5203 return function(t) {
5204 return new e(t)
5205 }
5206 }
5207
5208 function u(e) {
5209 return new Uint8Array(e).buffer
5210 }
5211}, function(e, t, n) {
5212 var i = n(17);
5213
5214 function r(e) {
5215 var t, n = new Array(256);
5216 for (t = 0; t <= 127; t++) n[t] = s(t);
5217 for (t = 128; t <= 143; t++) n[t] = o(t - 128, e.map);
5218 for (t = 144; t <= 159; t++) n[t] = o(t - 144, e.array);
5219 for (t = 160; t <= 191; t++) n[t] = o(t - 160, e.str);
5220 for (n[192] = s(null), n[193] = null, n[194] = s(!1), n[195] = s(!0), n[196] =
5221 a(e.uint8, e.bin), n[197] = a(e.uint16, e.bin), n[198] = a(e.uint32, e.bin),
5222 n[199] = a(e.uint8, e.ext), n[200] = a(e.uint16, e.ext), n[201] = a(e.uint32,
5223 e.ext), n[202] = e.float32, n[203] = e.float64, n[204] = e.uint8, n[205] =
5224 e.uint16, n[206] = e.uint32, n[207] = e.uint64, n[208] = e.int8, n[209] =
5225 e.int16, n[210] = e.int32, n[211] = e.int64, n[212] = o(1, e.ext), n[213] =
5226 o(2, e.ext), n[214] = o(4, e.ext), n[215] = o(8, e.ext), n[216] = o(16, e.ext),
5227 n[217] = a(e.uint8, e.str), n[218] = a(e.uint16, e.str), n[219] = a(e.uint32,
5228 e.str), n[220] = a(e.uint16, e.array), n[221] = a(e.uint32, e.array), n[
5229 222] = a(e.uint16, e.map), n[223] = a(e.uint32, e.map), t = 224; t <= 255; t++
5230 ) n[t] = s(t - 256);
5231 return n
5232 }
5233
5234 function s(e) {
5235 return function() {
5236 return e
5237 }
5238 }
5239
5240 function a(e, t) {
5241 return function(n) {
5242 var i = e(n);
5243 return t(n, i)
5244 }
5245 }
5246
5247 function o(e, t) {
5248 return function(n) {
5249 return t(n, e)
5250 }
5251 }
5252 t.getReadToken = function(e) {
5253 var t = i.getReadFormat(e);
5254 return e && e.useraw ? function(e) {
5255 var t, n = r(e).slice();
5256 for (n[217] = n[196], n[218] = n[197], n[219] = n[198], t = 160; t <=
5257 191; t++) n[t] = o(t - 160, e.bin);
5258 return n
5259 }(t) : r(t)
5260 }
5261}, function(e, t, n) {
5262 t.Encoder = s;
5263 var i = n(18),
5264 r = n(10).EncodeBuffer;
5265
5266 function s(e) {
5267 if (!(this instanceof s)) return new s(e);
5268 r.call(this, e)
5269 }
5270 s.prototype = new r, i.mixin(s.prototype), s.prototype.encode = function(e) {
5271 this.write(e), this.emit("data", this.read())
5272 }, s.prototype.end = function(e) {
5273 arguments.length && this.encode(e), this.flush(), this.emit("end")
5274 }
5275}, function(e, t, n) {
5276 t.Decoder = s;
5277 var i = n(18),
5278 r = n(16).DecodeBuffer;
5279
5280 function s(e) {
5281 if (!(this instanceof s)) return new s(e);
5282 r.call(this, e)
5283 }
5284 s.prototype = new r, i.mixin(s.prototype), s.prototype.decode = function(e) {
5285 arguments.length && this.write(e), this.flush()
5286 }, s.prototype.push = function(e) {
5287 this.emit("data", e)
5288 }, s.prototype.end = function(e) {
5289 this.decode(e), this.emit("end")
5290 }
5291}, function(e, t, n) {
5292 n(8), n(2), t.createCodec = n(1).createCodec
5293}, function(e, t, n) {
5294 n(8), n(2), t.codec = {
5295 preset: n(1).preset
5296 }
5297}, function(e, t) {
5298 var n, i, r = e.exports = {};
5299
5300 function s() {
5301 throw new Error("setTimeout has not been defined")
5302 }
5303
5304 function a() {
5305 throw new Error("clearTimeout has not been defined")
5306 }
5307
5308 function o(e) {
5309 if (n === setTimeout) return setTimeout(e, 0);
5310 if ((n === s || !n) && setTimeout) return n = setTimeout, setTimeout(e, 0);
5311 try {
5312 return n(e, 0)
5313 } catch (t) {
5314 try {
5315 return n.call(null, e, 0)
5316 } catch (t) {
5317 return n.call(this, e, 0)
5318 }
5319 }
5320 }! function() {
5321 try {
5322 n = "function" == typeof setTimeout ? setTimeout : s
5323 } catch (e) {
5324 n = s
5325 }
5326 try {
5327 i = "function" == typeof clearTimeout ? clearTimeout : a
5328 } catch (e) {
5329 i = a
5330 }
5331 }();
5332 var c, l = [],
5333 h = !1,
5334 u = -1;
5335
5336 function f() {
5337 h && c && (h = !1, c.length ? l = c.concat(l) : u = -1, l.length && d())
5338 }
5339
5340 function d() {
5341 if (!h) {
5342 var e = o(f);
5343 h = !0;
5344 for (var t = l.length; t;) {
5345 for (c = l, l = []; ++u < t;) c && c[u].run();
5346 u = -1, t = l.length
5347 }
5348 c = null, h = !1,
5349 function(e) {
5350 if (i === clearTimeout) return clearTimeout(e);
5351 if ((i === a || !i) && clearTimeout) return i = clearTimeout,
5352 clearTimeout(e);
5353 try {
5354 i(e)
5355 } catch (t) {
5356 try {
5357 return i.call(null, e)
5358 } catch (t) {
5359 return i.call(this, e)
5360 }
5361 }
5362 }(e)
5363 }
5364 }
5365
5366 function p(e, t) {
5367 this.fun = e, this.array = t
5368 }
5369
5370 function g() {}
5371 r.nextTick = function(e) {
5372 var t = new Array(arguments.length - 1);
5373 if (arguments.length > 1)
5374 for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
5375 l.push(new p(e, t)), 1 !== l.length || h || o(d)
5376 }, p.prototype.run = function() {
5377 this.fun.apply(null, this.array)
5378 }, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [], r.version =
5379 "", r.versions = {}, r.on = g, r.addListener = g, r.once = g, r.off = g, r.removeListener =
5380 g, r.removeAllListeners = g, r.emit = g, r.prependListener = g, r.prependOnceListener =
5381 g, r.listeners = function(e) {
5382 return []
5383 }, r.binding = function(e) {
5384 throw new Error("process.binding is not supported")
5385 }, r.cwd = function() {
5386 return "/"
5387 }, r.chdir = function(e) {
5388 throw new Error("process.chdir is not supported")
5389 }, r.umask = function() {
5390 return 0
5391 }
5392}, function(e, t) {
5393 var n = Math.abs,
5394 i = (Math.cos, Math.sin, Math.pow, Math.sqrt),
5395 r = (n = Math.abs, Math.atan2),
5396 s = Math.PI;
5397 e.exports.randInt = function(e, t) {
5398 return Math.floor(Math.random() * (t - e + 1)) + e
5399 }, e.exports.randFloat = function(e, t) {
5400 return Math.random() * (t - e + 1) + e
5401 }, e.exports.lerp = function(e, t, n) {
5402 return e + (t - e) * n
5403 }, e.exports.decel = function(e, t) {
5404 return e > 0 ? e = Math.max(0, e - t) : e < 0 && (e = Math.min(0, e + t)),
5405 e
5406 }, e.exports.getDistance = function(e, t, n, r) {
5407 return i((n -= e) * n + (r -= t) * r)
5408 }, e.exports.getDirection = function(e, t, n, i) {
5409 return r(t - i, e - n)
5410 }, e.exports.getAngleDist = function(e, t) {
5411 var i = n(t - e) % (2 * s);
5412 return i > s ? 2 * s - i : i
5413 }, e.exports.isNumber = function(e) {
5414 return "number" == typeof e && !isNaN(e) && isFinite(e)
5415 }, e.exports.isString = function(e) {
5416 return e && "string" == typeof e
5417 }, e.exports.kFormat = function(e) {
5418 return e > 999 ? (e / 1e3).toFixed(1) + "k" : e
5419 }, e.exports.capitalizeFirst = function(e) {
5420 return e.charAt(0).toUpperCase() + e.slice(1)
5421 }, e.exports.fixTo = function(e, t) {
5422 return parseFloat(e.toFixed(t))
5423 }, e.exports.sortByPoints = function(e, t) {
5424 return parseFloat(t.points) - parseFloat(e.points)
5425 }, e.exports.lineInRect = function(e, t, n, i, r, s, a, o) {
5426 var c = r,
5427 l = a;
5428 if (r > a && (c = a, l = r), l > n && (l = n), c < e && (c = e), c > l)
5429 return !1;
5430 var h = s,
5431 u = o,
5432 f = a - r;
5433 if (Math.abs(f) > 1e-7) {
5434 var d = (o - s) / f,
5435 p = s - d * r;
5436 h = d * c + p, u = d * l + p
5437 }
5438 if (h > u) {
5439 var g = u;
5440 u = h, h = g
5441 }
5442 return u > i && (u = i), h < t && (h = t), !(h > u)
5443 }, e.exports.containsPoint = function(e, t, n) {
5444 var i = e.getBoundingClientRect(),
5445 r = i.left + window.scrollX,
5446 s = i.top + window.scrollY,
5447 a = i.width,
5448 o = i.height;
5449 return t > r && t < r + a && n > s && n < s + o
5450 }, e.exports.mousifyTouchEvent = function(e) {
5451 var t = e.changedTouches[0];
5452 e.screenX = t.screenX, e.screenY = t.screenY, e.clientX = t.clientX, e.clientY =
5453 t.clientY, e.pageX = t.pageX, e.pageY = t.pageY
5454 }, e.exports.hookTouchEvents = function(t, n) {
5455 var i = !n,
5456 r = !1;
5457
5458 function s(n) {
5459 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
5460 n.stopPropagation()), r && (t.onclick && t.onclick(n), t.onmouseout &&
5461 t.onmouseout(n), r = !1)
5462 }
5463 t.addEventListener("touchstart", e.exports.checkTrusted((function(n) {
5464 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
5465 n.stopPropagation()), t.onmouseover && t.onmouseover(n), r = !0
5466 })), !1), t.addEventListener("touchmove", e.exports.checkTrusted((
5467 function(n) {
5468 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
5469 n.stopPropagation()), e.exports.containsPoint(t, n.pageX, n.pageY) ?
5470 r || (t.onmouseover && t.onmouseover(n), r = !0) : r && (t.onmouseout &&
5471 t.onmouseout(n), r = !1)
5472 })), !1), t.addEventListener("touchend", e.exports.checkTrusted(s), !1),
5473 t.addEventListener("touchcancel", e.exports.checkTrusted(s), !1), t.addEventListener(
5474 "touchleave", e.exports.checkTrusted(s), !1)
5475 }, e.exports.removeAllChildren = function(e) {
5476 for (; e.hasChildNodes();) e.removeChild(e.lastChild)
5477 }, e.exports.generateElement = function(t) {
5478 var n = document.createElement(t.tag || "div");
5479
5480 function i(e, i) {
5481 t[e] && (n[i] = t[e])
5482 }
5483 for (var r in i("text", "textContent"), i("html", "innerHTML"), i("class",
5484 "className"), t) {
5485 switch (r) {
5486 case "tag":
5487 case "text":
5488 case "html":
5489 case "class":
5490 case "style":
5491 case "hookTouch":
5492 case "parent":
5493 case "children":
5494 continue
5495 }
5496 n[r] = t[r]
5497 }
5498 if (n.onclick && (n.onclick = e.exports.checkTrusted(n.onclick)), n.onmouseover &&
5499 (n.onmouseover = e.exports.checkTrusted(n.onmouseover)), n.onmouseout &&
5500 (n.onmouseout = e.exports.checkTrusted(n.onmouseout)), t.style && (n.style
5501 .cssText = t.style), t.hookTouch && e.exports.hookTouchEvents(n), t.parent &&
5502 t.parent.appendChild(n), t.children)
5503 for (var s = 0; s < t.children.length; s++) n.appendChild(t.children[s]);
5504 return n
5505 }, e.exports.eventIsTrusted = function(e) {
5506 return !e || "boolean" != typeof e.isTrusted || e.isTrusted
5507 }, e.exports.checkTrusted = function(t) {
5508 return function(n) {
5509 n && n instanceof Event && e.exports.eventIsTrusted(n) && t(n)
5510 }
5511 }, e.exports.randomString = function(e) {
5512 for (var t = "", n =
5513 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i <
5514 e; i++) t += n.charAt(Math.floor(Math.random() * n.length));
5515 return t
5516 }, e.exports.countInArray = function(e, t) {
5517 for (var n = 0, i = 0; i < e.length; i++) e[i] === t && n++;
5518 return n
5519 }
5520}, function(e, t) {
5521 e.exports.AnimText = function() {
5522 this.init = function(e, t, n, i, r, s, a) {
5523 this.x = e, this.y = t, this.color = a, this.scale = n, this.startScale =
5524 this.scale, this.maxScale = 1.5 * n, this.scaleSpeed = .7, this.speed =
5525 i, this.life = r, this.text = s
5526 }, this.update = function(e) {
5527 this.life && (this.life -= e, this.y -= this.speed * e, this.scale +=
5528 this.scaleSpeed * e, this.scale >= this.maxScale ? (this.scale = this.maxScale,
5529 this.scaleSpeed *= -1) : this.scale <= this.startScale && (this.scale =
5530 this.startScale, this.scaleSpeed = 0), this.life <= 0 && (this.life =
5531 0))
5532 }, this.render = function(e, t, n) {
5533 e.fillStyle = this.color, e.font = this.scale + "px Hammersmith One", e.fillText(
5534 this.text, this.x - t, this.y - n)
5535 }
5536 }, e.exports.TextManager = function() {
5537 this.texts = [], this.update = function(e, t, n, i) {
5538 t.textBaseline = "middle", t.textAlign = "center";
5539 for (var r = 0; r < this.texts.length; ++r) this.texts[r].life && (this.texts[
5540 r].update(e), this.texts[r].render(t, n, i))
5541 }, this.showText = function(t, n, i, r, s, a, o) {
5542 for (var c, l = 0; l < this.texts.length; ++l)
5543 if (!this.texts[l].life) {
5544 c = this.texts[l];
5545 break
5546 }
5547 c || (c = new e.exports.AnimText, this.texts.push(c)), c.init(t, n, i, r,
5548 s, a, o)
5549 }
5550 }
5551}, function(e, t) {
5552 e.exports = function(e) {
5553 this.sid = e, this.init = function(e, t, n, i, r, s, a) {
5554 s = s || {}, this.sentTo = {}, this.gridLocations = [], this.active = !0,
5555 this.doUpdate = s.doUpdate, this.x = e, this.y = t, this.dir = n, this.xWiggle =
5556 0, this.yWiggle = 0, this.scale = i, this.type = r, this.id = s.id,
5557 this.owner = a, this.name = s.name, this.isItem = null != this.id, this
5558 .group = s.group, this.health = s.health, this.layer = 2, null != this.group ?
5559 this.layer = this.group.layer : 0 == this.type ? this.layer = 3 : 2 ==
5560 this.type ? this.layer = 0 : 4 == this.type && (this.layer = -1), this.colDiv =
5561 s.colDiv || 1, this.blocker = s.blocker, this.ignoreCollision = s.ignoreCollision,
5562 this.dontGather = s.dontGather, this.hideFromEnemy = s.hideFromEnemy,
5563 this.friction = s.friction, this.projDmg = s.projDmg, this.dmg = s.dmg,
5564 this.pDmg = s.pDmg, this.pps = s.pps, this.zIndex = s.zIndex || 0, this
5565 .turnSpeed = s.turnSpeed, this.req = s.req, this.trap = s.trap, this.healCol =
5566 s.healCol, this.teleport = s.teleport, this.boostSpeed = s.boostSpeed,
5567 this.projectile = s.projectile, this.shootRange = s.shootRange, this.shootRate =
5568 s.shootRate, this.shootCount = this.shootRate, this.spawnPoint = s.spawnPoint
5569 }, this.changeHealth = function(e, t) {
5570 return this.health += e, this.health <= 0
5571 }, this.getScale = function(e, t) {
5572 return e = e || 1, this.scale * (this.isItem || 2 == this.type || 3 ==
5573 this.type || 4 == this.type ? 1 : .6 * e) * (t ? 1 : this.colDiv)
5574 }, this.visibleToPlayer = function(e) {
5575 return !this.hideFromEnemy || this.owner && (this.owner == e || this.owner
5576 .team && e.team == this.owner.team)
5577 }, this.update = function(e) {
5578 this.active && (this.xWiggle && (this.xWiggle *= Math.pow(.99, e)), this
5579 .yWiggle && (this.yWiggle *= Math.pow(.99, e)), this.turnSpeed && (
5580 this.dir += this.turnSpeed * e))
5581 }
5582 }
5583}, function(e, t) {
5584 e.exports.groups = [{
5585 id: 0,
5586 name: "food",
5587 layer: 0
5588 }, {
5589 id: 1,
5590 name: "walls",
5591 place: !0,
5592 limit: 30,
5593 layer: 0
5594 }, {
5595 id: 2,
5596 name: "spikes",
5597 place: !0,
5598 limit: 15,
5599 layer: 0
5600 }, {
5601 id: 3,
5602 name: "mill",
5603 place: !0,
5604 limit: 7,
5605 layer: 1
5606 }, {
5607 id: 4,
5608 name: "mine",
5609 place: !0,
5610 limit: 1,
5611 layer: 0
5612 }, {
5613 id: 5,
5614 name: "trap",
5615 place: !0,
5616 limit: 6,
5617 layer: -1
5618 }, {
5619 id: 6,
5620 name: "booster",
5621 place: !0,
5622 limit: 12,
5623 layer: -1
5624 }, {
5625 id: 7,
5626 name: "turret",
5627 place: !0,
5628 limit: 2,
5629 layer: 1
5630 }, {
5631 id: 8,
5632 name: "watchtower",
5633 place: !0,
5634 limit: 12,
5635 layer: 1
5636 }, {
5637 id: 9,
5638 name: "buff",
5639 place: !0,
5640 limit: 4,
5641 layer: -1
5642 }, {
5643 id: 10,
5644 name: "spawn",
5645 place: !0,
5646 limit: 1,
5647 layer: -1
5648 }, {
5649 id: 11,
5650 name: "sapling",
5651 place: !0,
5652 limit: 2,
5653 layer: 0
5654 }, {
5655 id: 12,
5656 name: "blocker",
5657 place: !0,
5658 limit: 3,
5659 layer: -1
5660 }, {
5661 id: 13,
5662 name: "teleporter",
5663 place: !0,
5664 limit: 2,
5665 layer: -1
5666 }], t.projectiles = [{
5667 indx: 0,
5668 layer: 0,
5669 src: "arrow_1",
5670 dmg: 25,
5671 speed: 1.6,
5672 scale: 103,
5673 range: 1e3
5674 }, {
5675 indx: 1,
5676 layer: 1,
5677 dmg: 25,
5678 scale: 20
5679 }, {
5680 indx: 0,
5681 layer: 0,
5682 src: "arrow_1",
5683 dmg: 35,
5684 speed: 2.5,
5685 scale: 103,
5686 range: 1200
5687 }, {
5688 indx: 0,
5689 layer: 0,
5690 src: "arrow_1",
5691 dmg: 30,
5692 speed: 2,
5693 scale: 103,
5694 range: 1200
5695 }, {
5696 indx: 1,
5697 layer: 1,
5698 dmg: 16,
5699 scale: 20
5700 }, {
5701 indx: 0,
5702 layer: 0,
5703 src: "bullet_1",
5704 dmg: 50,
5705 speed: 3.6,
5706 scale: 160,
5707 range: 1400
5708 }], t.weapons = [{
5709 id: 0,
5710 type: 0,
5711 name: "tool hammer",
5712 desc: "tool for gathering all resources",
5713 src: "hammer_1",
5714 length: 140,
5715 width: 140,
5716 xOff: -3,
5717 yOff: 18,
5718 dmg: 25,
5719 range: 65,
5720 gather: 1,
5721 speed: 300
5722 }, {
5723 id: 1,
5724 type: 0,
5725 age: 2,
5726 name: "hand axe",
5727 desc: "gathers resources at a higher rate",
5728 src: "axe_1",
5729 length: 140,
5730 width: 140,
5731 xOff: 3,
5732 yOff: 24,
5733 dmg: 30,
5734 spdMult: 1,
5735 range: 70,
5736 gather: 2,
5737 speed: 400
5738 }, {
5739 id: 2,
5740 type: 0,
5741 age: 8,
5742 name: "great axe",
5743 desc: "deal more damage and gather more resources",
5744 src: "great_axe_1",
5745 length: 140,
5746 width: 140,
5747 xOff: -8,
5748 yOff: 25,
5749 dmg: 35,
5750 spdMult: 1,
5751 range: 75,
5752 gather: 4,
5753 speed: 400
5754 }, {
5755 id: 3,
5756 type: 0,
5757 age: 2,
5758 name: "short sword",
5759 desc: "increased attack power but slower move speed",
5760 src: "sword_1",
5761 iPad: 1.3,
5762 length: 130,
5763 width: 210,
5764 xOff: -8,
5765 yOff: 46,
5766 dmg: 35,
5767 spdMult: .85,
5768 range: 110,
5769 gather: 1,
5770 speed: 300
5771 }, {
5772 id: 4,
5773 type: 0,
5774 age: 8,
5775 name: "katana",
5776 desc: "greater range and damage",
5777 src: "samurai_1",
5778 iPad: 1.3,
5779 length: 130,
5780 width: 210,
5781 xOff: -8,
5782 yOff: 59,
5783 dmg: 40,
5784 spdMult: .8,
5785 range: 118,
5786 gather: 1,
5787 speed: 300
5788 }, {
5789 id: 5,
5790 type: 0,
5791 age: 2,
5792 name: "polearm",
5793 desc: "long range melee weapon",
5794 src: "spear_1",
5795 iPad: 1.3,
5796 length: 130,
5797 width: 210,
5798 xOff: -8,
5799 yOff: 53,
5800 dmg: 45,
5801 knock: .2,
5802 spdMult: .82,
5803 range: 142,
5804 gather: 1,
5805 speed: 700
5806 }, {
5807 id: 6,
5808 type: 0,
5809 age: 2,
5810 name: "bat",
5811 desc: "fast long range melee weapon",
5812 src: "bat_1",
5813 iPad: 1.3,
5814 length: 110,
5815 width: 180,
5816 xOff: -8,
5817 yOff: 53,
5818 dmg: 20,
5819 knock: .7,
5820 range: 110,
5821 gather: 1,
5822 speed: 300
5823 }, {
5824 id: 7,
5825 type: 0,
5826 age: 2,
5827 name: "daggers",
5828 desc: "really fast short range weapon",
5829 src: "dagger_1",
5830 iPad: .8,
5831 length: 110,
5832 width: 110,
5833 xOff: 18,
5834 yOff: 0,
5835 dmg: 20,
5836 knock: .1,
5837 range: 65,
5838 gather: 1,
5839 hitSlow: .1,
5840 spdMult: 1.13,
5841 speed: 100
5842 }, {
5843 id: 8,
5844 type: 0,
5845 age: 2,
5846 name: "stick",
5847 desc: "great for gathering but very weak",
5848 src: "stick_1",
5849 length: 140,
5850 width: 140,
5851 xOff: 3,
5852 yOff: 24,
5853 dmg: 1,
5854 spdMult: 1,
5855 range: 70,
5856 gather: 7,
5857 speed: 400
5858 }, {
5859 id: 9,
5860 type: 1,
5861 age: 6,
5862 name: "hunting bow",
5863 desc: "bow used for ranged combat and hunting",
5864 src: "bow_1",
5865 req: ["wood", 0],
5866 length: 120,
5867 width: 120,
5868 xOff: -6,
5869 yOff: 0,
5870 projectile: 0,
5871 spdMult: .75,
5872 speed: 600
5873 }, {
5874 id: 10,
5875 type: 1,
5876 age: 6,
5877 name: "great hammer",
5878 desc: "hammer used for destroying structures",
5879 src: "great_hammer_1",
5880 length: 140,
5881 width: 140,
5882 xOff: -9,
5883 yOff: 25,
5884 dmg: 10,
5885 spdMult: .88,
5886 range: 75,
5887 sDmg: 7.5,
5888 gather: 1,
5889 speed: 400
5890 }, {
5891 id: 11,
5892 type: 1,
5893 age: 6,
5894 name: "wooden shield",
5895 desc: "blocks projectiles and reduces melee damage",
5896 src: "shield_1",
5897 length: 120,
5898 width: 120,
5899 shield: .2,
5900 xOff: 6,
5901 yOff: 0,
5902 spdMult: .7
5903 }, {
5904 id: 12,
5905 type: 1,
5906 age: 8,
5907 name: "crossbow",
5908 desc: "deals more damage and has greater range",
5909 src: "crossbow_1",
5910 req: ["wood", 0],
5911 aboveHand: !0,
5912 armS: .75,
5913 length: 120,
5914 width: 120,
5915 xOff: -4,
5916 yOff: 0,
5917 projectile: 2,
5918 spdMult: .7,
5919 speed: 700
5920 }, {
5921 id: 13,
5922 type: 1,
5923 age: 9,
5924 name: "repeater crossbow",
5925 desc: "high firerate crossbow with reduced damage",
5926 src: "crossbow_2",
5927 req: ["wood", 0],
5928 aboveHand: !0,
5929 armS: .75,
5930 length: 120,
5931 width: 120,
5932 xOff: -4,
5933 yOff: 0,
5934 projectile: 3,
5935 spdMult: .7,
5936 speed: 230
5937 }, {
5938 id: 14,
5939 type: 1,
5940 age: 6,
5941 name: "mc grabby",
5942 desc: "steals resources from enemies",
5943 src: "grab_1",
5944 length: 130,
5945 width: 210,
5946 xOff: -8,
5947 yOff: 53,
5948 dmg: 0,
5949 steal: 250,
5950 knock: .2,
5951 spdMult: 1.05,
5952 range: 125,
5953 gather: 0,
5954 speed: 700
5955 }, {
5956 id: 15,
5957 type: 1,
5958 age: 9,
5959 name: "musket",
5960 desc: "slow firerate but high damage and range",
5961 src: "musket_1",
5962 req: ["stone", 0],
5963 aboveHand: !0,
5964 rec: .35,
5965 armS: .6,
5966 hndS: .3,
5967 hndD: 1.6,
5968 length: 205,
5969 width: 205,
5970 xOff: 25,
5971 yOff: 0,
5972 projectile: 5,
5973 hideProjectile: !0,
5974 spdMult: .6,
5975 speed: 1500
5976 }], e.exports.list = [{
5977 group: e.exports.groups[0],
5978 name: "apple",
5979 desc: "restores 20 health when consumed",
5980 req: ["food", 10],
5981 consume: function(e) {
5982 return e.changeHealth(20, e)
5983 },
5984 scale: 22,
5985 holdOffset: 15
5986 }, {
5987 age: 3,
5988 group: e.exports.groups[0],
5989 name: "cookie",
5990 desc: "restores 40 health when consumed",
5991 req: ["food", 15],
5992 consume: function(e) {
5993 return e.changeHealth(40, e)
5994 },
5995 scale: 27,
5996 holdOffset: 15
5997 }, {
5998 age: 7,
5999 group: e.exports.groups[0],
6000 name: "cheese",
6001 desc: "restores 30 health and another 50 over 5 seconds",
6002 req: ["food", 0],
6003 consume: function(e) {
6004 return !!(e.changeHealth(30, e) || e.health < 100) && (e.dmgOverTime.dmg = -10, e.dmgOverTime.doer = e, e.dmgOverTime.time = 5, !0)
6005 },
6006 scale: 27,
6007 holdOffset: 15
6008 }, {
6009 group: e.exports.groups[1],
6010 name: "wood wall",
6011 desc: "provides protection for your village",
6012 req: ["wood", 0],
6013 projDmg: !0,
6014 health: 500,
6015 scale: 50,
6016 holdOffset: 20,
6017 placeOffset: -5
6018 }, {
6019 age: 3,
6020 group: e.exports.groups[1],
6021 name: "stone wall",
6022 desc: "provides improved protection for your village",
6023 req: ["stone", 0],
6024 health: 1000,
6025 scale: 50,
6026 holdOffset: 20,
6027 placeOffset: -5
6028 }, {
6029 age: 7,
6030 group: e.exports.groups[1],
6031 name: "castle wall",
6032 desc: "provides powerful protection for your village",
6033 req: ["stone", 0],
6034 health: 1600,
6035 scale: 52,
6036 holdOffset: 20,
6037 placeOffset: -5
6038 }, {
6039 group: e.exports.groups[2],
6040 name: "spikes",
6041 desc: "damages enemies when they touch them",
6042 req: ["wood", 0, "stone", 0],
6043 health: 400,
6044 dmg: 100000,
6045 scale: 49,
6046 spritePadding: -23,
6047 holdOffset: 8,
6048 placeOffset: -5
6049 }, {
6050 age: 5,
6051 group: e.exports.groups[2],
6052 name: "greater spikes",
6053 desc: "damages enemies when they touch them",
6054 req: ["wood", 0, "stone", 0],
6055 health: 550,
6056 dmg: 35,
6057 scale: 52,
6058 spritePadding: -23,
6059 holdOffset: 8,
6060 placeOffset: -5
6061 }, {
6062 age: 9,
6063 group: e.exports.groups[2],
6064 name: "poison spikes",
6065 desc: "poisons enemies when they touch them",
6066 req: ["wood", 0, "stone", 0],
6067 health: 600,
6068 dmg: 30,
6069 pDmg: 5,
6070 scale: 52,
6071 spritePadding: -23,
6072 holdOffset: 8,
6073 placeOffset: -5
6074 }, {
6075 age: 9,
6076 group: e.exports.groups[2],
6077 name: "spinning spikes",
6078 desc: "damages enemies when they touch them",
6079 req: ["wood", 30, "stone", 20],
6080 health: 500,
6081 dmg: 45,
6082 turnSpeed: .003,
6083 scale: 52,
6084 spritePadding: -23,
6085 holdOffset: 8,
6086 placeOffset: -5
6087 }, {
6088 group: e.exports.groups[3],
6089 name: "windmill",
6090 desc: "generates gold over time",
6091 req: ["wood", 0, "stone", 0],
6092 health: 400,
6093 pps: 1,
6094 turnSpeed: .0016,
6095 spritePadding: 25,
6096 iconLineMult: 12,
6097 scale: 45,
6098 holdOffset: 20,
6099 placeOffset: 5
6100 }, {
6101 age: 5,
6102 group: e.exports.groups[3],
6103 name: "faster windmill",
6104 desc: "generates more gold over time",
6105 req: ["wood", 0, "stone", 0],
6106 health: 500,
6107 pps: 1.5,
6108 turnSpeed: .0025,
6109 spritePadding: 25,
6110 iconLineMult: 12,
6111 scale: 47,
6112 holdOffset: 20,
6113 placeOffset: 5
6114 }, {
6115 age: 8,
6116 group: e.exports.groups[3],
6117 name: "power mill",
6118 desc: "generates more gold over time",
6119 req: ["wood", 0, "stone", 0],
6120 health: 800,
6121 pps: 2,
6122 turnSpeed: .005,
6123 spritePadding: 25,
6124 iconLineMult: 12,
6125 scale: 47,
6126 holdOffset: 20,
6127 placeOffset: 5
6128 }, {
6129 age: 5,
6130 group: e.exports.groups[4],
6131 type: 2,
6132 name: "mine",
6133 desc: "allows you to mine stone",
6134 req: ["wood", 0, "stone", 0],
6135 iconLineMult: 12,
6136 scale: 65,
6137 holdOffset: 20,
6138 placeOffset: 0
6139 }, {
6140 age: 5,
6141 group: e.exports.groups[11],
6142 type: 0,
6143 name: "sapling",
6144 desc: "allows you to farm wood",
6145 req: ["wood", 0],
6146 iconLineMult: 12,
6147 colDiv: .5,
6148 scale: 110,
6149 holdOffset: 50,
6150 placeOffset: -15
6151 }, {
6152 age: 4,
6153 group: e.exports.groups[5],
6154 name: "pit trap",
6155 desc: "pit that traps enemies if they walk over it",
6156 req: ["wood", 0, "stone", 0],
6157 trap: !0,
6158 ignoreCollision: !0,
6159 hideFromEnemy: !0,
6160 health: 500,
6161 colDiv: .2,
6162 scale: 50,
6163 holdOffset: 20,
6164 placeOffset: -5
6165 }, {
6166 age: 4,
6167 group: e.exports.groups[6],
6168 name: "boost pad",
6169 desc: "provides boost when stepped on",
6170 req: ["stone", 0, "wood", 0],
6171 ignoreCollision: !0,
6172 boostSpeed: 2.0,
6173 health: 150,
6174 colDiv: .7,
6175 scale: 45,
6176 holdOffset: 20,
6177 placeOffset: -5
6178 }, {
6179 age: 7,
6180 group: e.exports.groups[7],
6181 doUpdate: !0,
6182 name: "turret",
6183 desc: "defensive structure that shoots at enemies",
6184 req: ["wood", 0, "stone", 0],
6185 health: 800,
6186 projectile: 1,
6187 shootRange: 700,
6188 shootRate: 2200,
6189 scale: 43,
6190 holdOffset: 20,
6191 placeOffset: -5
6192 }, {
6193 age: 7,
6194 group: e.exports.groups[8],
6195 name: "platform",
6196 desc: "platform to shoot over walls and cross over water",
6197 req: ["wood", 0],
6198 ignoreCollision: !0,
6199 zIndex: 1,
6200 health: 300,
6201 scale: 43,
6202 holdOffset: 20,
6203 placeOffset: -5
6204 }, {
6205 age: 7,
6206 group: e.exports.groups[9],
6207 name: "healing pad",
6208 desc: "standing on it will slowly heal you",
6209 req: ["wood", 0, "food", 0],
6210 ignoreCollision: !0,
6211 healCol: 15,
6212 health: 400,
6213 colDiv: .7,
6214 scale: 45,
6215 holdOffset: 20,
6216 placeOffset: -5
6217 }, {
6218 age: 9,
6219 group: e.exports.groups[10],
6220 name: "spawn pad",
6221 desc: "you will spawn here when you die but it will dissapear",
6222 req: ["wood", 0, "stone", 0],
6223 health: 400,
6224 ignoreCollision: !0,
6225 spawnPoint: !0,
6226 scale: 45,
6227 holdOffset: 20,
6228 placeOffset: -5
6229 }, {
6230 age: 7,
6231 group: e.exports.groups[12],
6232 name: "blocker",
6233 desc: "blocks building in radius",
6234 req: ["wood", 0, "stone", 0],
6235 ignoreCollision: !0,
6236 blocker: 300,
6237 health: 400,
6238 colDiv: .7,
6239 scale: 45,
6240 holdOffset: 20,
6241 placeOffset: -5
6242 }, {
6243 age: 7,
6244 group: e.exports.groups[13],
6245 name: "teleporter",
6246 desc: "teleports you to a random point on the map",
6247 req: ["wood", 0, "stone", 0],
6248 ignoreCollision: !0,
6249 teleport: !0,
6250 health: 200,
6251 colDiv: .7,
6252 scale: 45,
6253 holdOffset: 20,
6254 placeOffset: -5
6255 }];
6256 for (var n = 0; n < e.exports.list.length; ++n) e.exports.list[n].id = n, e.exports
6257 .list[n].pre && (e.exports.list[n].pre = n - e.exports.list[n].pre)
6258}, function(e, t) {
6259 e.exports = {}
6260}, function(e, t) {
6261 var n = Math.floor,
6262 i = Math.abs,
6263 r = Math.cos,
6264 s = Math.sin,
6265 a = (Math.pow, Math.sqrt);
6266 e.exports = function(e, t, o, c, l, h) {
6267 var u, f;
6268 this.objects = t, this.grids = {}, this.updateObjects = [];
6269 var d = c.mapScale / c.colGrid;
6270 this.setObjectGrids = function(e) {
6271 for (var t = Math.min(c.mapScale, Math.max(0, e.x)), n = Math.min(c.mapScale,
6272 Math.max(0, e.y)), i = 0; i < c.colGrid; ++i) {
6273 u = i * d;
6274 for (var r = 0; r < c.colGrid; ++r) f = r * d, t + e.scale >= u && t -
6275 e.scale <= u + d && n + e.scale >= f && n - e.scale <= f + d && (this.grids[
6276 i + "_" + r] || (this.grids[i + "_" + r] = []), this.grids[i + "_" +
6277 r].push(e), e.gridLocations.push(i + "_" + r))
6278 }
6279 }, this.removeObjGrid = function(e) {
6280 for (var t, n = 0; n < e.gridLocations.length; ++n)(t = this.grids[e.gridLocations[
6281 n]].indexOf(e)) >= 0 && this.grids[e.gridLocations[n]].splice(t, 1)
6282 }, this.disableObj = function(e) {
6283 if (e.active = !1, h) {
6284 e.owner && e.pps && (e.owner.pps -= e.pps), this.removeObjGrid(e);
6285 var t = this.updateObjects.indexOf(e);
6286 t >= 0 && this.updateObjects.splice(t, 1)
6287 }
6288 }, this.hitObj = function(e, t) {
6289 for (var n = 0; n < l.length; ++n) l[n].active && (e.sentTo[l[n].id] &&
6290 (e.active ? l[n].canSee(e) && h.send(l[n].id, "8", o.fixTo(t, 1), e.sid) :
6291 h.send(l[n].id, "12", e.sid)), e.active || e.owner != l[n] || l[n].changeItemCount(
6292 e.group.id, -1))
6293 };
6294 var p, g, m = [];
6295 this.getGridArrays = function(e, t, i) {
6296 u = n(e / d), f = n(t / d), m.length = 0;
6297 try {
6298 this.grids[u + "_" + f] && m.push(this.grids[u + "_" + f]), e + i >= (u +
6299 1) * d && ((p = this.grids[u + 1 + "_" + f]) && m.push(p), f && t - i <=
6300 f * d ? (p = this.grids[u + 1 + "_" + (f - 1)]) && m.push(p) : t + i >=
6301 (f + 1) * d && (p = this.grids[u + 1 + "_" + (f + 1)]) && m.push(p)),
6302 u && e - i <= u * d && ((p = this.grids[u - 1 + "_" + f]) && m.push(p),
6303 f && t - i <= f * d ? (p = this.grids[u - 1 + "_" + (f - 1)]) && m.push(
6304 p) : t + i >= (f + 1) * d && (p = this.grids[u - 1 + "_" + (f + 1)]) &&
6305 m.push(p)), t + i >= (f + 1) * d && (p = this.grids[u + "_" + (f + 1)]) &&
6306 m.push(p), f && t - i <= f * d && (p = this.grids[u + "_" + (f - 1)]) &&
6307 m.push(p)
6308 } catch (e) {}
6309 return m
6310 }, this.add = function(n, i, r, s, a, o, c, l, u) {
6311 g = null;
6312 for (var f = 0; f < t.length; ++f)
6313 if (t[f].sid == n) {
6314 g = t[f];
6315 break
6316 }
6317 if (!g)
6318 for (f = 0; f < t.length; ++f)
6319 if (!t[f].active) {
6320 g = t[f];
6321 break
6322 }
6323 g || (g = new e(n), t.push(g)), l && (g.sid = n), g.init(i, r, s, a, o,
6324 c, u), h && (this.setObjectGrids(g), g.doUpdate && this.updateObjects.push(
6325 g))
6326 }, this.disableBySid = function(e) {
6327 for (var n = 0; n < t.length; ++n)
6328 if (t[n].sid == e) {
6329 this.disableObj(t[n]);
6330 break
6331 }
6332 }, this.removeAllItems = function(e, n) {
6333 for (var i = 0; i < t.length; ++i) t[i].active && t[i].owner && t[i].owner
6334 .sid == e && this.disableObj(t[i]);
6335 n && n.broadcast("13", e)
6336 }, this.fetchSpawnObj = function(e) {
6337 for (var n = null, i = 0; i < t.length; ++i)
6338 if ((g = t[i]).active && g.owner && g.owner.sid == e && g.spawnPoint) {
6339 n = [g.x, g.y], this.disableObj(g), h.broadcast("12", g.sid), g.owner &&
6340 g.owner.changeItemCount(g.group.id, -1);
6341 break
6342 }
6343 return n
6344 }, this.checkItemLocation = function(e, n, i, r, s, a, l) {
6345 for (var h = 0; h < t.length; ++h) {
6346 var u = t[h].blocker ? t[h].blocker : t[h].getScale(r, t[h].isItem);
6347 if (t[h].active && o.getDistance(e, n, t[h].x, t[h].y) < i + u) return !
6348 1
6349 }
6350 return !(!a && 18 != s && n >= c.mapScale / 2 - c.riverWidth / 2 && n <=
6351 c.mapScale / 2 + c.riverWidth / 2)
6352 }, this.addProjectile = function(e, t, n, i, r) {
6353 for (var s, a = items.projectiles[r], c = 0; c < projectiles.length; ++c)
6354 if (!projectiles[c].active) {
6355 s = projectiles[c];
6356 break
6357 }
6358 s || (s = new Projectile(l, o), projectiles.push(s)), s.init(r, e, t, n,
6359 a.speed, i, a.scale)
6360 }, this.checkCollision = function(e, t, n) {
6361 n = n || 1;
6362 var l = e.x - t.x,
6363 h = e.y - t.y,
6364 u = e.scale + t.scale;
6365 if (i(l) <= u || i(h) <= u) {
6366 u = e.scale + (t.getScale ? t.getScale() : t.scale);
6367 var f = a(l * l + h * h) - u;
6368 if (f <= 0) {
6369 if (t.ignoreCollision) !t.trap || e.noTrap || t.owner == e || t.owner &&
6370 t.owner.team && t.owner.team == e.team ? t.boostSpeed ? (e.xVel += n *
6371 t.boostSpeed * (t.weightM || 1) * r(t.dir), e.yVel += n * t.boostSpeed *
6372 (t.weightM || 1) * s(t.dir)) : t.healCol ? e.healCol = t.healCol : t
6373 .teleport && (e.x = o.randInt(0, c.mapScale), e.y = o.randInt(0, c.mapScale)) :
6374 (e.lockMove = !0, t.hideFromEnemy = !1);
6375 else {
6376 var d = o.getDirection(e.x, e.y, t.x, t.y);
6377 if (o.getDistance(e.x, e.y, t.x, t.y), t.isPlayer ? (f = -1 * f / 2,
6378 e.x += f * r(d), e.y += f * s(d), t.x -= f * r(d), t.y -= f * s(d)) :
6379 (e.x = t.x + u * r(d), e.y = t.y + u * s(d), e.xVel *= .75, e.yVel *=
6380 .75), t.dmg && t.owner != e && (!t.owner || !t.owner.team || t.owner
6381 .team != e.team)) {
6382 e.changeHealth(-t.dmg, t.owner, t);
6383 var p = 1.5 * (t.weightM || 1);
6384 e.xVel += p * r(d), e.yVel += p * s(d), !t.pDmg || e.skin && e.skin.poisonRes ||
6385 (e.dmgOverTime.dmg = t.pDmg, e.dmgOverTime.time = 5, e.dmgOverTime.doer =
6386 t.owner), e.colDmg && t.health && (t.changeHealth(-e.colDmg) &&
6387 this.disableObj(t), this.hitObj(t, o.getDirection(e.x, e.y, t.x, t
6388 .y)))
6389 }
6390 }
6391 return t.zIndex > e.zIndex && (e.zIndex = t.zIndex), !0
6392 }
6393 }
6394 return !1
6395 }
6396 }
6397}, function(e, t, n) {
6398 var i = new(n(49));
6399 i.addWords("jew", "black", "baby", "child", "white", "porn", "pedo", "trump",
6400 "clinton", "hitler", "nazi", "gay", "pride", "sex", "pleasure", "touch",
6401 "poo", "kids", "rape", "white power", "nigga", "nig nog", "doggy",
6402 "rapist", "boner", "nigger", "nigg", "finger", "nogger", "nagger", "nig",
6403 "fag", "gai", "pole", "stripper", "penis", "vagina", "pussy", "nazi",
6404 "hitler", "stalin", "burn", "chamber", "cock", "peen", "dick", "spick",
6405 "nieger", "die", "satan", "n|ig", "nlg", "cunt", "c0ck", "fag", "lick",
6406 "condom", "anal", "shit", "phile", "little", "kids", "free KR", "tiny",
6407 "sidney", "ass", "kill", ".io", "(dot)", "[dot]", "mini", "whiore",
6408 "whore", "faggot", "github", "1337", "666", "satan", "senpa", "discord",
6409 "d1scord", "mistik", ".io", "senpa.io", "sidney", "sid", "senpaio",
6410 "vries", "asa");
6411 var r = Math.abs,
6412 s = Math.cos,
6413 a = Math.sin,
6414 o = Math.pow,
6415 c = Math.sqrt;
6416 e.exports = function(e, t, n, l, h, u, f, d, p, g, m, y, k, v) {
6417 this.id = e, this.sid = t, this.tmpScore = 0, this.team = null, this.skinIndex =
6418 0, this.tailIndex = 0, this.hitTime = 0, this.tails = {};
6419 for (var w = 0; w < m.length; ++w) m[w].price <= 0 && (this.tails[m[w].id] =
6420 1);
6421 for (this.skins = {}, w = 0; w < g.length; ++w) g[w].price <= 0 && (this.skins[
6422 g[w].id] = 1);
6423 this.points = 0, this.dt = 0, this.hidden = !1, this.itemCounts = {}, this
6424 .isPlayer = !0, this.pps = 0, this.moveDir = void 0, this.skinRot = 0,
6425 this.lastPing = 0, this.iconIndex = 0, this.skinColor = 0, this.spawn =
6426 function(e) {
6427 this.active = !0, this.alive = !0, this.lockMove = !1, this.lockDir = !1,
6428 this.minimapCounter = 0, this.chatCountdown = 0, this.shameCount = 0,
6429 this.shameTimer = 0, this.sentTo = {}, this.gathering = 0, this.autoGather =
6430 0, this.animTime = 0, this.animSpeed = 0, this.mouseState = 0, this.buildIndex = -
6431 1, this.weaponIndex = 0, this.dmgOverTime = {}, this.noMovTimer = 0,
6432 this.maxXP = 300, this.XP = 0, this.age = 1, this.kills = 0, this.upgrAge =
6433 2, this.upgradePoints = 0, this.x = 0, this.y = 0, this.zIndex = 0,
6434 this.xVel = 0, this.yVel = 0, this.slowMult = 1, this.dir = 0, this.dirPlus =
6435 0, this.targetDir = 0, this.targetAngle = 0, this.maxHealth = 100, this
6436 .health = this.maxHealth, this.scale = n.playerScale, this.speed = n.playerSpeed,
6437 this.resetMoveDir(), this.resetResources(e), this.items = [0, 3, 6, 10],
6438 this.weapons = [0], this.shootCount = 0, this.weaponXP = [], this.reloads = {}
6439 }, this.resetMoveDir = function() {
6440 this.moveDir = void 0
6441 }, this.resetResources = function(e) {
6442 for (var t = 0; t < n.resourceTypes.length; ++t) this[n.resourceTypes[t]] =
6443 e ? 100 : 0
6444 }, this.addItem = function(e) {
6445 var t = p.list[e];
6446 if (t) {
6447 for (var n = 0; n < this.items.length; ++n)
6448 if (p.list[this.items[n]].group == t.group) return this.buildIndex ==
6449 this.items[n] && (this.buildIndex = e), this.items[n] = e, !0;
6450 return this.items.push(e), !0
6451 }
6452 return !1
6453 }, this.setUserData = function(e) {
6454 if (e) {
6455 this.name = "unknown";
6456 var t = e.name + "",
6457 r = !1,
6458 s = (t = (t = (t = (t = t.slice(0, n.maxNameLength)).replace(
6459 /[^\w:\(\)\/? -]+/gim, " ")).replace(/[^\x00-\x7F]/g, " ")).trim()).toLowerCase()
6460 .replace(/\s/g, "").replace(/1/g, "i").replace(/0/g, "o").replace(/5/g,
6461 "s");
6462 for (var a of i.list)
6463 if (-1 != s.indexOf(a)) {
6464 r = !0;
6465 break
6466 }
6467 t.length > 0 && !r && (this.name = t), this.skinColor = 0, n.skinColors[
6468 e.skin] && (this.skinColor = e.skin)
6469 }
6470 }, this.getData = function() {
6471 return [this.id, this.sid, this.name, l.fixTo(this.x, 2), l.fixTo(this.y,
6472 2), l.fixTo(this.dir, 3), this.health, this.maxHealth, this.scale,
6473 this.skinColor
6474 ]
6475 }, this.setData = function(e) {
6476 this.id = e[0], this.sid = e[1], this.name = e[2], this.x = e[3], this.y =
6477 e[4], this.dir = e[5], this.health = e[6], this.maxHealth = e[7], this.scale =
6478 e[8], this.skinColor = e[9]
6479 };
6480 var b = 0;
6481 this.update = function(e) {
6482 if (this.alive) {
6483 if (this.shameTimer > 0 && (this.shameTimer -= e, this.shameTimer <= 0 &&
6484 (this.shameTimer = 0, this.shameCount = 0)), (b -= e) <= 0) {
6485 var t = (this.skin && this.skin.healthRegen ? this.skin.healthRegen :
6486 0) + (this.tail && this.tail.healthRegen ? this.tail.healthRegen : 0);
6487 t && this.changeHealth(t, this), this.dmgOverTime.dmg && (this.changeHealth(-
6488 this.dmgOverTime.dmg, this.dmgOverTime.doer), this.dmgOverTime.time -=
6489 1, this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)), this.healCol &&
6490 this.changeHealth(this.healCol, this), b = 1e3
6491 }
6492 if (this.alive) {
6493 if (this.slowMult < 1 && (this.slowMult += 8e-4 * e, this.slowMult > 1 &&
6494 (this.slowMult = 1)), this.noMovTimer += e, (this.xVel || this.yVel) &&
6495 (this.noMovTimer = 0), this.lockMove) this.xVel = 0, this.yVel = 0;
6496 else {
6497 var i = (this.buildIndex >= 0 ? .5 : 1) * (p.weapons[this.weaponIndex]
6498 .spdMult || 1) * (this.skin && this.skin.spdMult || 1) * (this.tail &&
6499 this.tail.spdMult || 1) * (this.y <= n.snowBiomeTop ? this.skin &&
6500 this.skin.coldM ? 1 : n.snowSpeed : 1) * this.slowMult;
6501 !this.zIndex && this.y >= n.mapScale / 2 - n.riverWidth / 2 && this.y <=
6502 n.mapScale / 2 + n.riverWidth / 2 && (this.skin && this.skin.watrImm ?
6503 (i *= .75, this.xVel += .4 * n.waterCurrent * e) : (i *= .33, this.xVel +=
6504 n.waterCurrent * e));
6505 var r = null != this.moveDir ? s(this.moveDir) : 0,
6506 d = null != this.moveDir ? a(this.moveDir) : 0,
6507 g = c(r * r + d * d);
6508 0 != g && (r /= g, d /= g), r && (this.xVel += r * this.speed * i * e),
6509 d && (this.yVel += d * this.speed * i * e)
6510 }
6511 var m;
6512 this.zIndex = 0, this.lockMove = !1, this.healCol = 0;
6513 for (var y = l.getDistance(0, 0, this.xVel * e, this.yVel * e), k =
6514 Math.min(4, Math.max(1, Math.round(y / 40))), v = 1 / k, w = 0; w <
6515 k; ++w) {
6516 this.xVel && (this.x += this.xVel * e * v), this.yVel && (this.y +=
6517 this.yVel * e * v), m = u.getGridArrays(this.x, this.y, this.scale);
6518 for (var x = 0; x < m.length; ++x)
6519 for (var S = 0; S < m[x].length; ++S) m[x][S].active && u.checkCollision(
6520 this, m[x][S], v)
6521 }
6522 for (w = (I = f.indexOf(this)) + 1; w < f.length; ++w) f[w] != this &&
6523 f[w].alive && u.checkCollision(this, f[w]);
6524 if (this.xVel && (this.xVel *= o(n.playerDecel, e), this.xVel <= .01 &&
6525 this.xVel >= -.01 && (this.xVel = 0)), this.yVel && (this.yVel *= o(
6526 n.playerDecel, e), this.yVel <= .01 && this.yVel >= -.01 && (this.yVel =
6527 0)), this.x - this.scale < 0 ? this.x = this.scale : this.x + this.scale >
6528 n.mapScale && (this.x = n.mapScale - this.scale), this.y - this.scale <
6529 0 ? this.y = this.scale : this.y + this.scale > n.mapScale && (this.y =
6530 n.mapScale - this.scale), this.buildIndex < 0)
6531 if (this.reloads[this.weaponIndex] > 0) this.reloads[this.weaponIndex] -=
6532 e, this.gathering = this.mouseState;
6533 else if (this.gathering || this.autoGather) {
6534 var T = !0;
6535 if (null != p.weapons[this.weaponIndex].gather) this.gather(f);
6536 else if (null != p.weapons[this.weaponIndex].projectile && this.hasRes(
6537 p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0)) {
6538 this.useRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost :
6539 0), this.noMovTimer = 0;
6540 var I = p.weapons[this.weaponIndex].projectile,
6541 E = 2 * this.scale,
6542 M = this.skin && this.skin.aMlt ? this.skin.aMlt : 1;
6543 p.weapons[this.weaponIndex].rec && (this.xVel -= p.weapons[this.weaponIndex]
6544 .rec * s(this.dir), this.yVel -= p.weapons[this.weaponIndex].rec *
6545 a(this.dir)), h.addProjectile(this.x + E * s(this.dir), this.y + E *
6546 a(this.dir), this.dir, p.projectiles[I].range * M, p.projectiles[I]
6547 .speed * M, I, this, null, this.zIndex)
6548 } else T = !1;
6549 this.gathering = this.mouseState, T && (this.reloads[this.weaponIndex] =
6550 p.weapons[this.weaponIndex].speed * (this.skin && this.skin.atkSpd ||
6551 1))
6552 }
6553 }
6554 }
6555 }, this.addWeaponXP = function(e) {
6556 this.weaponXP[this.weaponIndex] || (this.weaponXP[this.weaponIndex] = 0),
6557 this.weaponXP[this.weaponIndex] += e
6558 }, this.earnXP = function(e) {
6559 this.age < n.maxAge && (this.XP += e, this.XP >= this.maxXP ? (this.age <
6560 n.maxAge ? (this.age++, this.XP = 0, this.maxXP *= 1.2) : this.XP =
6561 this.maxXP, this.upgradePoints++, y.send(this.id, "16", this.upgradePoints,
6562 this.upgrAge), y.send(this.id, "15", this.XP, l.fixTo(this.maxXP, 1),
6563 this.age)) : y.send(this.id, "15", this.XP))
6564 }, this.changeHealth = function(e, t) {
6565 if (e > 0 && this.health >= this.maxHealth) return !1;
6566 e < 0 && this.skin && (e *= this.skin.dmgMult || 1), e < 0 && this.tail &&
6567 (e *= this.tail.dmgMult || 1), e < 0 && (this.hitTime = Date.now()),
6568 this.health += e, this.health > this.maxHealth && (e -= this.health -
6569 this.maxHealth, this.health = this.maxHealth), this.health <= 0 &&
6570 this.kill(t);
6571 for (var n = 0; n < f.length; ++n) this.sentTo[f[n].id] && y.send(f[n].id,
6572 "h", this.sid, Math.round(this.health));
6573 return !t || !t.canSee(this) || t == this && e < 0 || y.send(t.id, "t",
6574 Math.round(this.x), Math.round(this.y), Math.round(-e), 1), !0
6575 }, this.kill = function(e) {
6576 e && e.alive && (e.kills++, e.skin && e.skin.goldSteal ? k(e, Math.round(
6577 this.points / 2)) : k(e, Math.round(100 * this.age * (e.skin && e.skin
6578 .kScrM ? e.skin.kScrM : 1))), y.send(e.id, "9", "kills", e.kills, 1)),
6579 this.alive = !1, y.send(this.id, "11"), v()
6580 }, this.addResource = function(e, t, i) {
6581 !i && t > 0 && this.addWeaponXP(t), 3 == e ? k(this, t, !0) : (this[n.resourceTypes[
6582 e]] += t, y.send(this.id, "9", n.resourceTypes[e], this[n.resourceTypes[
6583 e]], 1))
6584 }, this.changeItemCount = function(e, t) {
6585 this.itemCounts[e] = this.itemCounts[e] || 0, this.itemCounts[e] += t, y
6586 .send(this.id, "14", e, this.itemCounts[e])
6587 }, this.buildItem = function(e) {
6588 var t = this.scale + e.scale + (e.placeOffset || 0),
6589 n = this.x + t * s(this.dir),
6590 i = this.y + t * a(this.dir);
6591 if (this.canBuild(e) && !(e.consume && this.skin && this.skin.noEat) &&
6592 (e.consume || u.checkItemLocation(n, i, e.scale, .6, e.id, !1, this))) {
6593 var r = !1;
6594 if (e.consume) {
6595 if (this.hitTime) {
6596 var o = Date.now() - this.hitTime;
6597 this.hitTime = 0, o <= 120 ? (this.shameCount++, this.shameCount >= 8 &&
6598 (this.shameTimer = 3e4, this.shameCount = 0)) : (this.shameCount -=
6599 2, this.shameCount <= 0 && (this.shameCount = 0))
6600 }
6601 this.shameTimer <= 0 && (r = e.consume(this))
6602 } else r = !0, e.group.limit && this.changeItemCount(e.group.id, 1), e.pps &&
6603 (this.pps += e.pps), u.add(u.objects.length, n, i, this.dir, e.scale,
6604 e.type, e, !1, this);
6605 r && (this.useRes(e), this.buildIndex = -1)
6606 }
6607 }, this.hasRes = function(e, t) {
6608 for (var n = 0; n < e.req.length;) {
6609 if (this[e.req[n]] < Math.round(e.req[n + 1] * (t || 1))) return !1;
6610 n += 2
6611 }
6612 return !0
6613 }, this.useRes = function(e, t) {
6614 if (!n.inSandbox)
6615 for (var i = 0; i < e.req.length;) this.addResource(n.resourceTypes.indexOf(
6616 e.req[i]), -Math.round(e.req[i + 1] * (t || 1))), i += 2
6617 }, this.canBuild = function(e) {
6618 return !!n.inSandbox || !(e.group.limit && this.itemCounts[e.group.id] >=
6619 e.group.limit) && this.hasRes(e)
6620 }, this.gather = function() {
6621 this.noMovTimer = 0, this.slowMult -= p.weapons[this.weaponIndex].hitSlow ||
6622 .3, this.slowMult < 0 && (this.slowMult = 0);
6623 for (var e, t, i, r = n.fetchVariant(this), o = r.poison, c = r.val, h = {},
6624 g = u.getGridArrays(this.x, this.y, p.weapons[this.weaponIndex].range),
6625 m = 0; m < g.length; ++m)
6626 for (var y = 0; y < g[m].length; ++y)
6627 if ((t = g[m][y]).active && !t.dontGather && !h[t.sid] && t.visibleToPlayer(
6628 this) && l.getDistance(this.x, this.y, t.x, t.y) - t.scale <= p.weapons[
6629 this.weaponIndex].range && (e = l.getDirection(t.x, t.y, this.x,
6630 this.y), l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
6631 if (h[t.sid] = 1, t.health) {
6632 if (t.changeHealth(-p.weapons[this.weaponIndex].dmg * c * (p.weapons[
6633 this.weaponIndex].sDmg || 1) * (this.skin && this.skin.bDmg ?
6634 this.skin.bDmg : 1), this)) {
6635 for (var k = 0; k < t.req.length;) this.addResource(n.resourceTypes
6636 .indexOf(t.req[k]), t.req[k + 1]), k += 2;
6637 u.disableObj(t)
6638 }
6639 } else {
6640 this.earnXP(4 * p.weapons[this.weaponIndex].gather);
6641 var v = p.weapons[this.weaponIndex].gather + (3 == t.type ? 4 : 0);
6642 this.skin && this.skin.extraGold && this.addResource(3, 1), this.addResource(
6643 t.type, v)
6644 }
6645 i = !0, u.hitObj(t, e)
6646 }
6647 for (y = 0; y < f.length + d.length; ++y)
6648 if ((t = f[y] || d[y - f.length]) != this && t.alive && (!t.team || t.team !=
6649 this.team) && l.getDistance(this.x, this.y, t.x, t.y) - 1.8 * t.scale <=
6650 p.weapons[this.weaponIndex].range && (e = l.getDirection(t.x, t.y,
6651 this.x, this.y), l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
6652 var w = p.weapons[this.weaponIndex].steal;
6653 w && t.addResource && (w = Math.min(t.points || 0, w), this.addResource(
6654 3, w), t.addResource(3, -w));
6655 var b = c;
6656 null != t.weaponIndex && p.weapons[t.weaponIndex].shield && l.getAngleDist(
6657 e + Math.PI, t.dir) <= n.shieldAngle && (b = p.weapons[t.weaponIndex]
6658 .shield);
6659 var x = p.weapons[this.weaponIndex].dmg * (this.skin && this.skin.dmgMultO ?
6660 this.skin.dmgMultO : 1) * (this.tail && this.tail.dmgMultO ? this.tail
6661 .dmgMultO : 1),
6662 S = .3 * (t.weightM || 1) + (p.weapons[this.weaponIndex].knock || 0);
6663 t.xVel += S * s(e), t.yVel += S * a(e), this.skin && this.skin.healD &&
6664 this.changeHealth(x * b * this.skin.healD, this), this.tail && this.tail
6665 .healD && this.changeHealth(x * b * this.tail.healD, this), t.skin &&
6666 t.skin.dmg && 1 == b && this.changeHealth(-x * t.skin.dmg, t), t.tail &&
6667 t.tail.dmg && 1 == b && this.changeHealth(-x * t.tail.dmg, t), !(t.dmgOverTime &&
6668 this.skin && this.skin.poisonDmg) || t.skin && t.skin.poisonRes || (
6669 t.dmgOverTime.dmg = this.skin.poisonDmg, t.dmgOverTime.time = this.skin
6670 .poisonTime || 1, t.dmgOverTime.doer = this), !t.dmgOverTime || !o ||
6671 t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = 5, t.dmgOverTime.time =
6672 5, t.dmgOverTime.doer = this), t.skin && t.skin.dmgK && (this.xVel -=
6673 t.skin.dmgK * s(e), this.yVel -= t.skin.dmgK * a(e)), t.changeHealth(-
6674 x * b, this, this)
6675 }
6676 this.sendAnimation(i ? 1 : 0)
6677 }, this.sendAnimation = function(e) {
6678 for (var t = 0; t < f.length; ++t) this.sentTo[f[t].id] && this.canSee(f[
6679 t]) && y.send(f[t].id, "7", this.sid, e ? 1 : 0, this.weaponIndex)
6680 };
6681 var x = 0,
6682 S = 0;
6683 this.animate = function(e) {
6684 this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime =
6685 0, this.dirPlus = 0, x = 0, S = 0) : 0 == S ? (x += e / (this.animSpeed *
6686 n.hitReturnRatio), this.dirPlus = l.lerp(0, this.targetAngle, Math.min(
6687 1, x)), x >= 1 && (x = 1, S = 1)) : (x -= e / (this.animSpeed * (1 -
6688 n.hitReturnRatio)), this.dirPlus = l.lerp(0, this.targetAngle, Math.max(
6689 0, x))))
6690 }, this.startAnim = function(e, t) {
6691 this.animTime = this.animSpeed = p.weapons[t].speed, this.targetAngle =
6692 e ? -n.hitAngle : -Math.PI, x = 0, S = 0
6693 }, this.canSee = function(e) {
6694 if (!e) return !1;
6695 if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
6696 return !1;
6697 var t = r(e.x - this.x) - e.scale,
6698 i = r(e.y - this.y) - e.scale;
6699 return t <= n.maxScreenWidth / 2 * 1.3 && i <= n.maxScreenHeight / 2 *
6700 1.3
6701 }
6702 }
6703}, function(e, t, n) {
6704 const i = n(50).words,
6705 r = n(51).array;
6706 e.exports = class {
6707 constructor(e = {}) {
6708 Object.assign(this, {
6709 list: e.emptyList && [] || Array.prototype.concat.apply(i, [r, e.list || []]),
6710 exclude: e.exclude || [],
6711 placeHolder: e.placeHolder || "*",
6712 regex: e.regex || /[^a-zA-Z0-9|\$|\@]|\^/g,
6713 replaceRegex: e.replaceRegex || /\w/g
6714 })
6715 }
6716 isProfane(e) {
6717 return this.list.filter(t => {
6718 const n = new RegExp(`\\b${t.replace(/(\W)/g,"\\$1")}\\b`, "gi");
6719 return !this.exclude.includes(t.toLowerCase()) && n.test(e)
6720 }).length > 0 || !1
6721 }
6722 replaceWord(e) {
6723 return e.replace(this.regex, "").replace(this.replaceRegex, this.placeHolder)
6724 }
6725 clean(e) {
6726 return e.split(/\b/).map(e => this.isProfane(e) ? this.replaceWord(e) :
6727 e).join("")
6728 }
6729 addWords() {
6730 let e = Array.from(arguments);
6731 this.list.push(...e), e.map(e => e.toLowerCase()).forEach(e => {
6732 this.exclude.includes(e) && this.exclude.splice(this.exclude.indexOf(
6733 e), 1)
6734 })
6735 }
6736 removeWords() {
6737 this.exclude.push(...Array.from(arguments).map(e => e.toLowerCase()))
6738 }
6739 }
6740}, function(e) {
6741 e.exports = {
6742 words: ["ahole", "anus", "ash0le", "ash0les", "asholes", "ass",
6743 "Ass Monkey", "Assface", "assh0le", "assh0lez", "asshole", "assholes",
6744 "assholz", "asswipe", "azzhole", "bassterds", "bastard", "bastards",
6745 "bastardz", "basterds", "basterdz", "Biatch", "bitch", "bitches",
6746 "Blow Job", "boffing", "butthole", "buttwipe", "c0ck", "c0cks", "c0k",
6747 "Carpet Muncher", "cawk", "cawks", "Clit", "cnts", "cntz", "cock",
6748 "cockhead", "cock-head", "cocks", "CockSucker", "cock-sucker", "crap",
6749 "cum", "cunt", "cunts", "cuntz", "dick", "dild0", "dild0s", "dildo",
6750 "dildos", "dilld0", "dilld0s", "dominatricks", "dominatrics",
6751 "dominatrix", "dyke", "enema", "f u c k", "f u c k e r", "fag", "fag1t",
6752 "faget", "fagg1t", "faggit", "faggot", "fagg0t", "fagit", "fags", "fagz",
6753 "faig", "faigs", "fart", "flipping the bird", "fuck", "fucker", "fuckin",
6754 "fucking", "fucks", "Fudge Packer", "fuk", "Fukah", "Fuken", "fuker",
6755 "Fukin", "Fukk", "Fukkah", "Fukken", "Fukker", "Fukkin", "g00k",
6756 "God-damned", "h00r", "h0ar", "h0re", "hells", "hoar", "hoor", "hoore",
6757 "jackoff", "jap", "japs", "jerk-off", "jisim", "jiss", "jizm", "jizz",
6758 "knob", "knobs", "knobz", "kunt", "kunts", "kuntz", "Lezzian",
6759 "Lipshits", "Lipshitz", "masochist", "masokist", "massterbait",
6760 "masstrbait", "masstrbate", "masterbaiter", "masterbate", "masterbates",
6761 "Motha Fucker", "Motha Fuker", "Motha Fukkah", "Motha Fukker",
6762 "Mother Fucker", "Mother Fukah", "Mother Fuker", "Mother Fukkah",
6763 "Mother Fukker", "mother-fucker", "Mutha Fucker", "Mutha Fukah",
6764 "Mutha Fuker", "Mutha Fukkah", "Mutha Fukker", "n1gr", "nastt",
6765 "nigger;", "nigur;", "niiger;", "niigr;", "orafis", "orgasim;", "orgasm",
6766 "orgasum", "oriface", "orifice", "orifiss", "packi", "packie", "packy",
6767 "paki", "pakie", "paky", "pecker", "peeenus", "peeenusss", "peenus",
6768 "peinus", "pen1s", "penas", "penis", "penis-breath", "penus", "penuus",
6769 "Phuc", "Phuck", "Phuk", "Phuker", "Phukker", "polac", "polack", "polak",
6770 "Poonani", "pr1c", "pr1ck", "pr1k", "pusse", "pussee", "pussy", "puuke",
6771 "puuker", "queer", "queers", "queerz", "qweers", "qweerz", "qweir",
6772 "recktum", "rectum", "retard", "sadist", "scank", "schlong", "screwing",
6773 "semen", "sex", "sexy", "Sh!t", "sh1t", "sh1ter", "sh1ts", "sh1tter",
6774 "sh1tz", "shit", "shits", "shitter", "Shitty", "Shity", "shitz", "Shyt",
6775 "Shyte", "Shytty", "Shyty", "skanck", "skank", "skankee", "skankey",
6776 "skanks", "Skanky", "slag", "slut", "sluts", "Slutty", "slutz",
6777 "son-of-a-bitch", "tit", "turd", "va1jina", "vag1na", "vagiina",
6778 "vagina", "vaj1na", "vajina", "vullva", "vulva", "w0p", "wh00r", "wh0re",
6779 "whore", "xrated", "xxx", "b!+ch", "bitch", "blowjob", "clit",
6780 "arschloch", "fuck", "shit", "ass", "asshole", "b!tch", "b17ch", "b1tch",
6781 "bastard", "bi+ch", "boiolas", "buceta", "c0ck", "cawk", "chink", "cipa",
6782 "clits", "cock", "cum", "cunt", "dildo", "dirsa", "ejakulate", "fatass",
6783 "fcuk", "fuk", "fux0r", "hoer", "hore", "jism", "kawk", "l3itch",
6784 "l3i+ch", "lesbian", "masturbate", "masterbat*", "masterbat3",
6785 "motherfucker", "s.o.b.", "mofo", "nazi", "nigga", "nigger", "nutsack",
6786 "phuck", "pimpis", "pusse", "pussy", "scrotum", "sh!t", "shemale",
6787 "shi+", "sh!+", "slut", "smut", "teets", "tits", "boobs", "b00bs",
6788 "teez", "testical", "testicle", "titt", "w00se", "jackoff", "wank",
6789 "whoar", "whore", "*damn", "*dyke", "*fuck*", "*shit*", "@$$", "amcik",
6790 "andskota", "arse*", "assrammer", "ayir", "bi7ch", "bitch*", "bollock*",
6791 "breasts", "butt-pirate", "cabron", "cazzo", "chraa", "chuj", "Cock*",
6792 "cunt*", "d4mn", "daygo", "dego", "dick*", "dike*", "dupa", "dziwka",
6793 "ejackulate", "Ekrem*", "Ekto", "enculer", "faen", "fag*", "fanculo",
6794 "fanny", "feces", "feg", "Felcher", "ficken", "fitt*", "Flikker",
6795 "foreskin", "Fotze", "Fu(*", "fuk*", "futkretzn", "gook", "guiena",
6796 "h0r", "h4x0r", "hell", "helvete", "hoer*", "honkey", "Huevon", "hui",
6797 "injun", "jizz", "kanker*", "kike", "klootzak", "kraut", "knulle", "kuk",
6798 "kuksuger", "Kurac", "kurwa", "kusi*", "kyrpa*", "lesbo", "mamhoon",
6799 "masturbat*", "merd*", "mibun", "monkleigh", "mouliewop", "muie",
6800 "mulkku", "muschi", "nazis", "nepesaurio", "nigger*", "orospu", "paska*",
6801 "perse", "picka", "pierdol*", "pillu*", "pimmel", "piss*", "pizda",
6802 "poontsee", "poop", "porn", "p0rn", "pr0n", "preteen", "pula", "pule",
6803 "puta", "puto", "qahbeh", "queef*", "rautenberg", "schaffer", "scheiss*",
6804 "schlampe", "schmuck", "screw", "sh!t*", "sharmuta", "sharmute",
6805 "shipal", "shiz", "skribz", "skurwysyn", "sphencter", "spic",
6806 "spierdalaj", "splooge", "suka", "b00b*", "testicle*", "titt*", "twat",
6807 "vittu", "wank*", "wetback*", "wichser", "wop*", "yed", "zabourah"
6808 ]
6809 }
6810}, function(e, t, n) {
6811 e.exports = {
6812 object: n(52),
6813 array: n(53),
6814 regex: n(54)
6815 }
6816}, function(e, t) {
6817 e.exports = {
6818 "4r5e": 1,
6819 "5h1t": 1,
6820 "5hit": 1,
6821 a55: 1,
6822 anal: 1,
6823 anus: 1,
6824 ar5e: 1,
6825 arrse: 1,
6826 arse: 1,
6827 ass: 1,
6828 "ass-fucker": 1,
6829 asses: 1,
6830 assfucker: 1,
6831 assfukka: 1,
6832 asshole: 1,
6833 assholes: 1,
6834 asswhole: 1,
6835 a_s_s: 1,
6836 "b!tch": 1,
6837 b00bs: 1,
6838 b17ch: 1,
6839 b1tch: 1,
6840 ballbag: 1,
6841 balls: 1,
6842 ballsack: 1,
6843 bastard: 1,
6844 beastial: 1,
6845 beastiality: 1,
6846 bellend: 1,
6847 bestial: 1,
6848 bestiality: 1,
6849 "bi+ch": 1,
6850 biatch: 1,
6851 bitch: 1,
6852 bitcher: 1,
6853 bitchers: 1,
6854 bitches: 1,
6855 bitchin: 1,
6856 bitching: 1,
6857 bloody: 1,
6858 "blow job": 1,
6859 blowjob: 1,
6860 blowjobs: 1,
6861 boiolas: 1,
6862 bollock: 1,
6863 bollok: 1,
6864 boner: 1,
6865 boob: 1,
6866 boobs: 1,
6867 booobs: 1,
6868 boooobs: 1,
6869 booooobs: 1,
6870 booooooobs: 1,
6871 breasts: 1,
6872 buceta: 1,
6873 bugger: 1,
6874 bum: 1,
6875 "bunny fucker": 1,
6876 butt: 1,
6877 butthole: 1,
6878 buttmuch: 1,
6879 buttplug: 1,
6880 c0ck: 1,
6881 c0cksucker: 1,
6882 "carpet muncher": 1,
6883 cawk: 1,
6884 chink: 1,
6885 cipa: 1,
6886 cl1t: 1,
6887 clit: 1,
6888 clitoris: 1,
6889 clits: 1,
6890 cnut: 1,
6891 cock: 1,
6892 "cock-sucker": 1,
6893 cockface: 1,
6894 cockhead: 1,
6895 cockmunch: 1,
6896 cockmuncher: 1,
6897 cocks: 1,
6898 cocksuck: 1,
6899 cocksucked: 1,
6900 cocksucker: 1,
6901 cocksucking: 1,
6902 cocksucks: 1,
6903 cocksuka: 1,
6904 cocksukka: 1,
6905 cok: 1,
6906 cokmuncher: 1,
6907 coksucka: 1,
6908 coon: 1,
6909 cox: 1,
6910 crap: 1,
6911 cum: 1,
6912 cummer: 1,
6913 cumming: 1,
6914 cums: 1,
6915 cumshot: 1,
6916 cunilingus: 1,
6917 cunillingus: 1,
6918 cunnilingus: 1,
6919 cunt: 1,
6920 cuntlick: 1,
6921 cuntlicker: 1,
6922 cuntlicking: 1,
6923 cunts: 1,
6924 cyalis: 1,
6925 cyberfuc: 1,
6926 cyberfuck: 1,
6927 cyberfucked: 1,
6928 cyberfucker: 1,
6929 cyberfuckers: 1,
6930 cyberfucking: 1,
6931 d1ck: 1,
6932 damn: 1,
6933 dick: 1,
6934 dickhead: 1,
6935 dildo: 1,
6936 dildos: 1,
6937 dink: 1,
6938 dinks: 1,
6939 dirsa: 1,
6940 dlck: 1,
6941 "dog-fucker": 1,
6942 doggin: 1,
6943 dogging: 1,
6944 donkeyribber: 1,
6945 doosh: 1,
6946 duche: 1,
6947 dyke: 1,
6948 ejaculate: 1,
6949 ejaculated: 1,
6950 ejaculates: 1,
6951 ejaculating: 1,
6952 ejaculatings: 1,
6953 ejaculation: 1,
6954 ejakulate: 1,
6955 "f u c k": 1,
6956 "f u c k e r": 1,
6957 f4nny: 1,
6958 fag: 1,
6959 fagging: 1,
6960 faggitt: 1,
6961 faggot: 1,
6962 faggs: 1,
6963 fagot: 1,
6964 fagots: 1,
6965 fags: 1,
6966 fanny: 1,
6967 fannyflaps: 1,
6968 fannyfucker: 1,
6969 fanyy: 1,
6970 fatass: 1,
6971 fcuk: 1,
6972 fcuker: 1,
6973 fcuking: 1,
6974 feck: 1,
6975 fecker: 1,
6976 felching: 1,
6977 fellate: 1,
6978 fellatio: 1,
6979 fingerfuck: 1,
6980 fingerfucked: 1,
6981 fingerfucker: 1,
6982 fingerfuckers: 1,
6983 fingerfucking: 1,
6984 fingerfucks: 1,
6985 fistfuck: 1,
6986 fistfucked: 1,
6987 fistfucker: 1,
6988 fistfuckers: 1,
6989 fistfucking: 1,
6990 fistfuckings: 1,
6991 fistfucks: 1,
6992 flange: 1,
6993 fook: 1,
6994 fooker: 1,
6995 fuck: 1,
6996 fucka: 1,
6997 fucked: 1,
6998 fucker: 1,
6999 fuckers: 1,
7000 fuckhead: 1,
7001 fuckheads: 1,
7002 fuckin: 1,
7003 fucking: 1,
7004 fuckings: 1,
7005 fuckingshitmotherfucker: 1,
7006 fuckme: 1,
7007 fucks: 1,
7008 fuckwhit: 1,
7009 fuckwit: 1,
7010 "fudge packer": 1,
7011 fudgepacker: 1,
7012 fuk: 1,
7013 fuker: 1,
7014 fukker: 1,
7015 fukkin: 1,
7016 fuks: 1,
7017 fukwhit: 1,
7018 fukwit: 1,
7019 fux: 1,
7020 fux0r: 1,
7021 f_u_c_k: 1,
7022 gangbang: 1,
7023 gangbanged: 1,
7024 gangbangs: 1,
7025 gaylord: 1,
7026 gaysex: 1,
7027 goatse: 1,
7028 God: 1,
7029 "god-dam": 1,
7030 "god-damned": 1,
7031 goddamn: 1,
7032 goddamned: 1,
7033 hardcoresex: 1,
7034 hell: 1,
7035 heshe: 1,
7036 hoar: 1,
7037 hoare: 1,
7038 hoer: 1,
7039 homo: 1,
7040 hore: 1,
7041 horniest: 1,
7042 horny: 1,
7043 hotsex: 1,
7044 "jack-off": 1,
7045 jackoff: 1,
7046 jap: 1,
7047 "jerk-off": 1,
7048 jism: 1,
7049 jiz: 1,
7050 jizm: 1,
7051 jizz: 1,
7052 kawk: 1,
7053 knob: 1,
7054 knobead: 1,
7055 knobed: 1,
7056 knobend: 1,
7057 knobhead: 1,
7058 knobjocky: 1,
7059 knobjokey: 1,
7060 kock: 1,
7061 kondum: 1,
7062 kondums: 1,
7063 kum: 1,
7064 kummer: 1,
7065 kumming: 1,
7066 kums: 1,
7067 kunilingus: 1,
7068 "l3i+ch": 1,
7069 l3itch: 1,
7070 labia: 1,
7071 lust: 1,
7072 lusting: 1,
7073 m0f0: 1,
7074 m0fo: 1,
7075 m45terbate: 1,
7076 ma5terb8: 1,
7077 ma5terbate: 1,
7078 masochist: 1,
7079 "master-bate": 1,
7080 masterb8: 1,
7081 "masterbat*": 1,
7082 masterbat3: 1,
7083 masterbate: 1,
7084 masterbation: 1,
7085 masterbations: 1,
7086 masturbate: 1,
7087 "mo-fo": 1,
7088 mof0: 1,
7089 mofo: 1,
7090 mothafuck: 1,
7091 mothafucka: 1,
7092 mothafuckas: 1,
7093 mothafuckaz: 1,
7094 mothafucked: 1,
7095 mothafucker: 1,
7096 mothafuckers: 1,
7097 mothafuckin: 1,
7098 mothafucking: 1,
7099 mothafuckings: 1,
7100 mothafucks: 1,
7101 "mother fucker": 1,
7102 motherfuck: 1,
7103 motherfucked: 1,
7104 motherfucker: 1,
7105 motherfuckers: 1,
7106 motherfuckin: 1,
7107 motherfucking: 1,
7108 motherfuckings: 1,
7109 motherfuckka: 1,
7110 motherfucks: 1,
7111 muff: 1,
7112 mutha: 1,
7113 muthafecker: 1,
7114 muthafuckker: 1,
7115 muther: 1,
7116 mutherfucker: 1,
7117 n1gga: 1,
7118 n1gger: 1,
7119 nazi: 1,
7120 nigg3r: 1,
7121 nigg4h: 1,
7122 nigga: 1,
7123 niggah: 1,
7124 niggas: 1,
7125 niggaz: 1,
7126 nigger: 1,
7127 niggers: 1,
7128 nob: 1,
7129 "nob jokey": 1,
7130 nobhead: 1,
7131 nobjocky: 1,
7132 nobjokey: 1,
7133 numbnuts: 1,
7134 nutsack: 1,
7135 orgasim: 1,
7136 orgasims: 1,
7137 orgasm: 1,
7138 orgasms: 1,
7139 p0rn: 1,
7140 pawn: 1,
7141 pecker: 1,
7142 penis: 1,
7143 penisfucker: 1,
7144 phonesex: 1,
7145 phuck: 1,
7146 phuk: 1,
7147 phuked: 1,
7148 phuking: 1,
7149 phukked: 1,
7150 phukking: 1,
7151 phuks: 1,
7152 phuq: 1,
7153 pigfucker: 1,
7154 pimpis: 1,
7155 piss: 1,
7156 pissed: 1,
7157 pisser: 1,
7158 pissers: 1,
7159 pisses: 1,
7160 pissflaps: 1,
7161 pissin: 1,
7162 pissing: 1,
7163 pissoff: 1,
7164 poop: 1,
7165 porn: 1,
7166 porno: 1,
7167 pornography: 1,
7168 pornos: 1,
7169 prick: 1,
7170 pricks: 1,
7171 pron: 1,
7172 pube: 1,
7173 pusse: 1,
7174 pussi: 1,
7175 pussies: 1,
7176 pussy: 1,
7177 pussys: 1,
7178 rectum: 1,
7179 retard: 1,
7180 rimjaw: 1,
7181 rimming: 1,
7182 "s hit": 1,
7183 "s.o.b.": 1,
7184 sadist: 1,
7185 schlong: 1,
7186 screwing: 1,
7187 scroat: 1,
7188 scrote: 1,
7189 scrotum: 1,
7190 semen: 1,
7191 sex: 1,
7192 "sh!+": 1,
7193 "sh!t": 1,
7194 sh1t: 1,
7195 shag: 1,
7196 shagger: 1,
7197 shaggin: 1,
7198 shagging: 1,
7199 shemale: 1,
7200 "shi+": 1,
7201 shit: 1,
7202 shitdick: 1,
7203 shite: 1,
7204 shited: 1,
7205 shitey: 1,
7206 shitfuck: 1,
7207 shitfull: 1,
7208 shithead: 1,
7209 shiting: 1,
7210 shitings: 1,
7211 shits: 1,
7212 shitted: 1,
7213 shitter: 1,
7214 shitters: 1,
7215 shitting: 1,
7216 shittings: 1,
7217 shitty: 1,
7218 skank: 1,
7219 slut: 1,
7220 sluts: 1,
7221 smegma: 1,
7222 smut: 1,
7223 snatch: 1,
7224 "son-of-a-bitch": 1,
7225 spac: 1,
7226 spunk: 1,
7227 s_h_i_t: 1,
7228 t1tt1e5: 1,
7229 t1tties: 1,
7230 teets: 1,
7231 teez: 1,
7232 testical: 1,
7233 testicle: 1,
7234 tit: 1,
7235 titfuck: 1,
7236 tits: 1,
7237 titt: 1,
7238 tittie5: 1,
7239 tittiefucker: 1,
7240 titties: 1,
7241 tittyfuck: 1,
7242 tittywank: 1,
7243 titwank: 1,
7244 tosser: 1,
7245 turd: 1,
7246 tw4t: 1,
7247 twat: 1,
7248 twathead: 1,
7249 twatty: 1,
7250 twunt: 1,
7251 twunter: 1,
7252 v14gra: 1,
7253 v1gra: 1,
7254 vagina: 1,
7255 viagra: 1,
7256 vulva: 1,
7257 w00se: 1,
7258 wang: 1,
7259 wank: 1,
7260 wanker: 1,
7261 wanky: 1,
7262 whoar: 1,
7263 whore: 1,
7264 willies: 1,
7265 willy: 1,
7266 xrated: 1,
7267 xxx: 1
7268 }
7269}, function(e, t) {
7270 e.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus", "ar5e", "arrse",
7271 "arse", "ass", "ass-fucker", "asses", "assfucker", "assfukka", "asshole",
7272 "assholes", "asswhole", "a_s_s", "b!tch", "b00bs", "b17ch", "b1tch",
7273 "ballbag", "balls", "ballsack", "bastard", "beastial", "beastiality",
7274 "bellend", "bestial", "bestiality", "bi+ch", "biatch", "bitch", "bitcher",
7275 "bitchers", "bitches", "bitchin", "bitching", "bloody", "blow job",
7276 "blowjob", "blowjobs", "boiolas", "bollock", "bollok", "boner", "boob",
7277 "boobs", "booobs", "boooobs", "booooobs", "booooooobs", "breasts",
7278 "buceta", "bugger", "bum", "bunny fucker", "butt", "butthole", "buttmuch",
7279 "buttplug", "c0ck", "c0cksucker", "carpet muncher", "cawk", "chink",
7280 "cipa", "cl1t", "clit", "clitoris", "clits", "cnut", "cock", "cock-sucker",
7281 "cockface", "cockhead", "cockmunch", "cockmuncher", "cocks", "cocksuck",
7282 "cocksucked", "cocksucker", "cocksucking", "cocksucks", "cocksuka",
7283 "cocksukka", "cok", "cokmuncher", "coksucka", "coon", "cox", "crap", "cum",
7284 "cummer", "cumming", "cums", "cumshot", "cunilingus", "cunillingus",
7285 "cunnilingus", "cunt", "cuntlick", "cuntlicker", "cuntlicking", "cunts",
7286 "cyalis", "cyberfuc", "cyberfuck", "cyberfucked", "cyberfucker",
7287 "cyberfuckers", "cyberfucking", "d1ck", "damn", "dick", "dickhead",
7288 "dildo", "dildos", "dink", "dinks", "dirsa", "dlck", "dog-fucker",
7289 "doggin", "dogging", "donkeyribber", "doosh", "duche", "dyke", "ejaculate",
7290 "ejaculated", "ejaculates", "ejaculating", "ejaculatings", "ejaculation",
7291 "ejakulate", "f u c k", "f u c k e r", "f4nny", "fag", "fagging",
7292 "faggitt", "faggot", "faggs", "fagot", "fagots", "fags", "fanny",
7293 "fannyflaps", "fannyfucker", "fanyy", "fatass", "fcuk", "fcuker",
7294 "fcuking", "feck", "fecker", "felching", "fellate", "fellatio",
7295 "fingerfuck", "fingerfucked", "fingerfucker", "fingerfuckers",
7296 "fingerfucking", "fingerfucks", "fistfuck", "fistfucked", "fistfucker",
7297 "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange",
7298 "fook", "fooker", "fuck", "fucka", "fucked", "fucker", "fuckers",
7299 "fuckhead", "fuckheads", "fuckin", "fucking", "fuckings",
7300 "fuckingshitmotherfucker", "fuckme", "fucks", "fuckwhit", "fuckwit",
7301 "fudge packer", "fudgepacker", "fuk", "fuker", "fukker", "fukkin", "fuks",
7302 "fukwhit", "fukwit", "fux", "fux0r", "f_u_c_k", "gangbang", "gangbanged",
7303 "gangbangs", "gaylord", "gaysex", "goatse", "God", "god-dam", "god-damned",
7304 "goddamn", "goddamned", "hardcoresex", "hell", "heshe", "hoar", "hoare",
7305 "hoer", "homo", "hore", "horniest", "horny", "hotsex", "jack-off",
7306 "jackoff", "jap", "jerk-off", "jism", "jiz", "jizm", "jizz", "kawk",
7307 "knob", "knobead", "knobed", "knobend", "knobhead", "knobjocky",
7308 "knobjokey", "kock", "kondum", "kondums", "kum", "kummer", "kumming",
7309 "kums", "kunilingus", "l3i+ch", "l3itch", "labia", "lust", "lusting",
7310 "m0f0", "m0fo", "m45terbate", "ma5terb8", "ma5terbate", "masochist",
7311 "master-bate", "masterb8", "masterbat*", "masterbat3", "masterbate",
7312 "masterbation", "masterbations", "masturbate", "mo-fo", "mof0", "mofo",
7313 "mothafuck", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked",
7314 "mothafucker", "mothafuckers", "mothafuckin", "mothafucking",
7315 "mothafuckings", "mothafucks", "mother fucker", "motherfuck",
7316 "motherfucked", "motherfucker", "motherfuckers", "motherfuckin",
7317 "motherfucking", "motherfuckings", "motherfuckka", "motherfucks", "muff",
7318 "mutha", "muthafecker", "muthafuckker", "muther", "mutherfucker", "n1gga",
7319 "n1gger", "nazi", "nigg3r", "nigg4h", "nigga", "niggah", "niggas",
7320 "niggaz", "nigger", "niggers", "nob", "nob jokey", "nobhead", "nobjocky",
7321 "nobjokey", "numbnuts", "nutsack", "orgasim", "orgasims", "orgasm",
7322 "orgasms", "p0rn", "pawn", "pecker", "penis", "penisfucker", "phonesex",
7323 "phuck", "phuk", "phuked", "phuking", "phukked", "phukking", "phuks",
7324 "phuq", "pigfucker", "pimpis", "piss", "pissed", "pisser", "pissers",
7325 "pisses", "pissflaps", "pissin", "pissing", "pissoff", "poop", "porn",
7326 "porno", "pornography", "pornos", "prick", "pricks", "pron", "pube",
7327 "pusse", "pussi", "pussies", "pussy", "pussys", "rectum", "retard",
7328 "rimjaw", "rimming", "s hit", "s.o.b.", "sadist", "schlong", "screwing",
7329 "scroat", "scrote", "scrotum", "semen", "sex", "sh!+", "sh!t", "sh1t",
7330 "shag", "shagger", "shaggin", "shagging", "shemale", "shi+", "shit",
7331 "shitdick", "shite", "shited", "shitey", "shitfuck", "shitfull",
7332 "shithead", "shiting", "shitings", "shits", "shitted", "shitter",
7333 "shitters", "shitting", "shittings", "shitty", "skank", "slut", "sluts",
7334 "smegma", "smut", "snatch", "son-of-a-bitch", "spac", "spunk", "s_h_i_t",
7335 "t1tt1e5", "t1tties", "teets", "teez", "testical", "testicle", "tit",
7336 "titfuck", "tits", "titt", "tittie5", "tittiefucker", "titties",
7337 "tittyfuck", "tittywank", "titwank", "tosser", "turd", "tw4t", "twat",
7338 "twathead", "twatty", "twunt", "twunter", "v14gra", "v1gra", "vagina",
7339 "viagra", "vulva", "w00se", "wang", "wank", "wanker", "wanky", "whoar",
7340 "whore", "willies", "willy", "xrated", "xxx"
7341 ]
7342}, function(e, t) {
7343 e.exports =
7344 /\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi
7345}, function(e, t) {
7346 e.exports.hats = [{
7347 id: 45,
7348 name: "Shame!",
7349 dontSell: !0,
7350 price: 0,
7351 scale: 120,
7352 desc: "hacks are for losers"
7353 }, {
7354 id: 51,
7355 name: "Moo Cap",
7356 price: 0,
7357 scale: 120,
7358 desc: "coolest mooer around"
7359 }, {
7360 id: 50,
7361 name: "Apple Cap",
7362 price: 0,
7363 scale: 120,
7364 desc: "apple farms remembers"
7365 }, {
7366 id: 28,
7367 name: "Moo Head",
7368 price: 0,
7369 scale: 120,
7370 desc: "no effect"
7371 }, {
7372 id: 29,
7373 name: "Pig Head",
7374 price: 0,
7375 scale: 120,
7376 desc: "no effect"
7377 }, {
7378 id: 30,
7379 name: "Fluff Head",
7380 price: 0,
7381 scale: 120,
7382 desc: "no effect"
7383 }, {
7384 id: 36,
7385 name: "Pandou Head",
7386 price: 0,
7387 scale: 120,
7388 desc: "no effect"
7389 }, {
7390 id: 37,
7391 name: "Bear Head",
7392 price: 0,
7393 scale: 120,
7394 desc: "no effect"
7395 }, {
7396 id: 38,
7397 name: "Monkey Head",
7398 price: 0,
7399 scale: 120,
7400 desc: "no effect"
7401 }, {
7402 id: 44,
7403 name: "Polar Head",
7404 price: 0,
7405 scale: 120,
7406 desc: "no effect"
7407 }, {
7408 id: 35,
7409 name: "Fez Hat",
7410 price: 0,
7411 scale: 120,
7412 desc: "no effect"
7413 }, {
7414 id: 42,
7415 name: "Enigma Hat",
7416 price: 0,
7417 scale: 120,
7418 desc: "join the enigma army"
7419 }, {
7420 id: 43,
7421 name: "Blitz Hat",
7422 price: 0,
7423 scale: 120,
7424 desc: "hey everybody i'm blitz"
7425 }, {
7426 id: 49,
7427 name: "Bob XIII Hat",
7428 price: 0,
7429 scale: 120,
7430 desc: "like and subscribe"
7431 }, {
7432 id: 57,
7433 name: "Pumpkin",
7434 price: 0,
7435 scale: 120,
7436 desc: "Spooooky"
7437 }, {
7438 id: 8,
7439 name: "Bummle Hat",
7440 price: 0,
7441 scale: 120,
7442 desc: "no effect"
7443 }, {
7444 id: 2,
7445 name: "Straw Hat",
7446 price: 0,
7447 scale: 120,
7448 desc: "no effect"
7449 }, {
7450 id: 15,
7451 name: "Winter Cap",
7452 price: 0,
7453 scale: 120,
7454 desc: "allows you to move at normal speed in snow",
7455 coldM: 1
7456 }, {
7457 id: 5,
7458 name: "Cowboy Hat",
7459 price: 1e3,
7460 scale: 120,
7461 desc: "no effect"
7462 }, {
7463 id: 4,
7464 name: "Ranger Hat",
7465 price: 2e3,
7466 scale: 120,
7467 desc: "no effect"
7468 }, {
7469 id: 18,
7470 name: "Explorer Hat",
7471 price: 2e3,
7472 scale: 120,
7473 desc: "no effect"
7474 }, {
7475 id: 31,
7476 name: "Flipper Hat",
7477 price: 2500,
7478 scale: 120,
7479 desc: "have more control while in water",
7480 watrImm: !0
7481 }, {
7482 id: 1,
7483 name: "Marksman Cap",
7484 price: 3e3,
7485 scale: 120,
7486 desc: "increases arrow speed and range",
7487 aMlt: 1.3
7488 }, {
7489 id: 10,
7490 name: "Bush Gear",
7491 price: 3e3,
7492 scale: 160,
7493 desc: "allows you to disguise yourself as a bush"
7494 }, {
7495 id: 48,
7496 name: "Halo",
7497 price: 3e3,
7498 scale: 120,
7499 desc: "no effect"
7500 }, {
7501 id: 6,
7502 name: "Soldier Helmet",
7503 price: 4e3,
7504 scale: 120,
7505 desc: "reduces damage taken but slows movement",
7506 spdMult: .94,
7507 dmgMult: .75
7508 }, {
7509 id: 23,
7510 name: "Anti Venom Gear",
7511 price: 4e3,
7512 scale: 120,
7513 desc: "makes you immune to poison",
7514 poisonRes: 1
7515 }, {
7516 id: 13,
7517 name: "Medic Gear",
7518 price: 5e3,
7519 scale: 110,
7520 desc: "slowly regenerates health over time",
7521 healthRegen: 3
7522 }, {
7523 id: 9,
7524 name: "Miners Helmet",
7525 price: 5e3,
7526 scale: 120,
7527 desc: "earn 1 extra gold per resource",
7528 extraGold: 1
7529 }, {
7530 id: 32,
7531 name: "Musketeer Hat",
7532 price: 5e3,
7533 scale: 120,
7534 desc: "reduces cost of projectiles",
7535 projCost: .5
7536 }, {
7537 id: 7,
7538 name: "Bull Helmet",
7539 price: 6e3,
7540 scale: 120,
7541 desc: "increases damage done but drains health",
7542 healthRegen: -5,
7543 dmgMultO: 1.5,
7544 spdMult: .96
7545 }, {
7546 id: 22,
7547 name: "Emp Helmet",
7548 price: 6e3,
7549 scale: 120,
7550 desc: "turrets won't attack but you move slower",
7551 antiTurret: 1,
7552 spdMult: .7
7553 }, {
7554 id: 12,
7555 name: "Booster Hat",
7556 price: 0,
7557 scale: 120,
7558 desc: "increases your movement speed",
7559 spdMult: 1.16
7560 }, {
7561 id: 26,
7562 name: "Barbarian Armor",
7563 price: 8e3,
7564 scale: 120,
7565 desc: "knocks back enemies that attack you",
7566 dmgK: .6
7567 }, {
7568 id: 21,
7569 name: "Plague Mask",
7570 price: 1e4,
7571 scale: 120,
7572 desc: "melee attacks deal poison damage",
7573 poisonDmg: 5,
7574 poisonTime: 6
7575 }, {
7576 id: 46,
7577 name: "Bull Mask",
7578 price: 0,
7579 scale: 120,
7580 desc: "bulls won't target you unless you attack them",
7581 bullRepel: 1
7582 }, {
7583 id: 14,
7584 name: "Windmill Hat",
7585 topSprite: !0,
7586 price: 1e4,
7587 scale: 120,
7588 desc: "generates points while worn",
7589 pps: 1.5
7590 }, {
7591 id: 11,
7592 name: "Spike Gear",
7593 topSprite: !0,
7594 price: 1e4,
7595 scale: 120,
7596 desc: "deal damage to players that damage you",
7597 dmg: .45
7598 }, {
7599 id: 53,
7600 name: "Turret Gear",
7601 topSprite: !0,
7602 price: 0,
7603 scale: 120,
7604 desc: "you become a walking turret",
7605 turret: {
7606 proj: 1,
7607 range: 700,
7608 rate: 2500
7609 },
7610 spdMult: .7
7611 }, {
7612 id: 20,
7613 name: "Samurai Armor",
7614 price: 12e3,
7615 scale: 120,
7616 desc: "increased attack speed and fire rate",
7617 atkSpd: .78
7618 }, {
7619 id: 58,
7620 name: "Dark Knight",
7621 price: 12e3,
7622 scale: 120,
7623 desc: "restores health when you deal damage",
7624 healD: .4
7625 }, {
7626 id: 27,
7627 name: "Scavenger Gear",
7628 price: 15e3,
7629 scale: 120,
7630 desc: "earn double points for each kill",
7631 kScrM: 2
7632 }, {
7633 id: 40,
7634 name: "Tank Gear",
7635 price: 0,
7636 scale: 120,
7637 desc: "increased damage to buildings but slower movement",
7638 spdMult: .3,
7639 bDmg: 3.3
7640 }, {
7641 id: 52,
7642 name: "Thief Gear",
7643 price: 15e3,
7644 scale: 120,
7645 desc: "steal half of a players gold when you kill them",
7646 goldSteal: .5
7647 }, {
7648 id: 55,
7649 name: "Bloodthirster",
7650 price: 2e4,
7651 scale: 120,
7652 desc: "Restore Health when dealing damage. And increased damage",
7653 healD: .25,
7654 dmgMultO: 1.2
7655 }, {
7656 id: 56,
7657 name: "Assassin Gear",
7658 price: 2e4,
7659 scale: 120,
7660 desc: "Go invisible when not moving. Can't eat. Increased speed",
7661 noEat: !0,
7662 spdMult: 1.1,
7663 invisTimer: 1e3
7664 }], e.exports.accessories = [{
7665 id: 12,
7666 name: "Snowball",
7667 price: 1e3,
7668 scale: 105,
7669 xOff: 18,
7670 desc: "no effect"
7671 }, {
7672 id: 9,
7673 name: "Tree Cape",
7674 price: 1e3,
7675 scale: 90,
7676 desc: "no effect"
7677 }, {
7678 id: 10,
7679 name: "Stone Cape",
7680 price: 1e3,
7681 scale: 90,
7682 desc: "no effect"
7683 }, {
7684 id: 3,
7685 name: "Cookie Cape",
7686 price: 1500,
7687 scale: 90,
7688 desc: "no effect"
7689 }, {
7690 id: 8,
7691 name: "Cow Cape",
7692 price: 2e3,
7693 scale: 90,
7694 desc: "no effect"
7695 }, {
7696 id: 11,
7697 name: "Monkey Tail",
7698 price: 2e3,
7699 scale: 97,
7700 xOff: 25,
7701 desc: "Super speed but reduced damage",
7702 spdMult: 1.35,
7703 dmgMultO: .2
7704 }, {
7705 id: 17,
7706 name: "Apple Basket",
7707 price: 3e3,
7708 scale: 80,
7709 xOff: 12,
7710 desc: "slowly regenerates health over time",
7711 healthRegen: 1
7712 }, {
7713 id: 6,
7714 name: "Winter Cape",
7715 price: 3e3,
7716 scale: 90,
7717 desc: "no effect"
7718 }, {
7719 id: 4,
7720 name: "Skull Cape",
7721 price: 4e3,
7722 scale: 90,
7723 desc: "no effect"
7724 }, {
7725 id: 5,
7726 name: "Dash Cape",
7727 price: 5e3,
7728 scale: 90,
7729 desc: "no effect"
7730 }, {
7731 id: 2,
7732 name: "Dragon Cape",
7733 price: 6e3,
7734 scale: 90,
7735 desc: "no effect"
7736 }, {
7737 id: 1,
7738 name: "Super Cape",
7739 price: 8e3,
7740 scale: 90,
7741 desc: "no effect"
7742 }, {
7743 id: 7,
7744 name: "Troll Cape",
7745 price: 8e3,
7746 scale: 90,
7747 desc: "no effect"
7748 }, {
7749 id: 14,
7750 name: "Thorns",
7751 price: 1e4,
7752 scale: 115,
7753 xOff: 20,
7754 desc: "no effect"
7755 }, {
7756 id: 15,
7757 name: "Blockades",
7758 price: 1e4,
7759 scale: 95,
7760 xOff: 15,
7761 desc: "no effect"
7762 }, {
7763 id: 20,
7764 name: "Devils Tail",
7765 price: 1e4,
7766 scale: 95,
7767 xOff: 20,
7768 desc: "no effect"
7769 }, {
7770 id: 16,
7771 name: "Sawblade",
7772 price: 12e3,
7773 scale: 90,
7774 spin: !0,
7775 xOff: 0,
7776 desc: "deal damage to players that damage you",
7777 dmg: .15
7778 }, {
7779 id: 13,
7780 name: "Angel Wings",
7781 price: 15e3,
7782 scale: 138,
7783 xOff: 22,
7784 desc: "slowly regenerates health over time",
7785 healthRegen: 3
7786 }, {
7787 id: 19,
7788 name: "Shadow Wings",
7789 price: 15e3,
7790 scale: 138,
7791 xOff: 22,
7792 desc: "increased movement speed",
7793 spdMult: 1.1
7794 }, {
7795 id: 18,
7796 name: "Blood Wings",
7797 price: 2e4,
7798 scale: 178,
7799 xOff: 26,
7800 desc: "restores health when you deal damage",
7801 healD: .2
7802 }, {
7803 id: 21,
7804 name: "Corrupt X Wings",
7805 price: 2e4,
7806 scale: 178,
7807 xOff: 26,
7808 desc: "deal damage to players that damage you",
7809 dmg: .25
7810 }]
7811}, function(e, t) {
7812 e.exports = function(e, t, n, i, r, s, a) {
7813 this.init = function(e, t, n, i, r, s, o, c, l) {
7814 this.active = !0, this.indx = e, this.x = t, this.y = n, this.dir = i,
7815 this.skipMov = !0, this.speed = r, this.dmg = s, this.scale = c, this.range =
7816 o, this.owner = l, a && (this.sentTo = {})
7817 };
7818 var o, c = [];
7819 this.update = function(l) {
7820 if (this.active) {
7821 var h, u = this.speed * l;
7822 if (this.skipMov ? this.skipMov = !1 : (this.x += u * Math.cos(this.dir),
7823 this.y += u * Math.sin(this.dir), this.range -= u, this.range <= 0 &&
7824 (this.x += this.range * Math.cos(this.dir), this.y += this.range *
7825 Math.sin(this.dir), u = 1, this.range = 0, this.active = !1)), a) {
7826 for (var f = 0; f < e.length; ++f) !this.sentTo[e[f].id] && e[f].canSee(
7827 this) && (this.sentTo[e[f].id] = 1, a.send(e[f].id, "18", s.fixTo(
7828 this.x, 1), s.fixTo(this.y, 1), s.fixTo(this.dir, 2), s.fixTo(this
7829 .range, 1), this.speed, this.indx, this.layer, this.sid));
7830 for (c.length = 0, f = 0; f < e.length + t.length; ++f) !(o = e[f] ||
7831 t[f - e.length]).alive || o == this.owner || this.owner.team && o.team ==
7832 this.owner.team || s.lineInRect(o.x - o.scale, o.y - o.scale, o.x + o
7833 .scale, o.y + o.scale, this.x, this.y, this.x + u * Math.cos(this.dir),
7834 this.y + u * Math.sin(this.dir)) && c.push(o);
7835 for (var d = n.getGridArrays(this.x, this.y, this.scale), p = 0; p < d
7836 .length; ++p)
7837 for (var g = 0; g < d[p].length; ++g) h = (o = d[p][g]).getScale(), o
7838 .active && this.ignoreObj != o.sid && this.layer <= o.layer && c.indexOf(
7839 o) < 0 && !o.ignoreCollision && s.lineInRect(o.x - h, o.y - h, o.x +
7840 h, o.y + h, this.x, this.y, this.x + u * Math.cos(this.dir), this.y +
7841 u * Math.sin(this.dir)) && c.push(o);
7842 if (c.length > 0) {
7843 var m = null,
7844 y = null,
7845 k = null;
7846 for (f = 0; f < c.length; ++f) k = s.getDistance(this.x, this.y, c[f]
7847 .x, c[f].y), (null == y || k < y) && (y = k, m = c[f]);
7848 if (m.isPlayer || m.isAI) {
7849 var v = .3 * (m.weightM || 1);
7850 m.xVel += v * Math.cos(this.dir), m.yVel += v * Math.sin(this.dir),
7851 null != m.weaponIndex && i.weapons[m.weaponIndex].shield && s.getAngleDist(
7852 this.dir + Math.PI, m.dir) <= r.shieldAngle || m.changeHealth(-
7853 this.dmg, this.owner, this.owner)
7854 } else
7855 for (m.projDmg && m.health && m.changeHealth(-this.dmg) && n.disableObj(
7856 m), f = 0; f < e.length; ++f) e[f].active && (m.sentTo[e[f].id] &&
7857 (m.active ? e[f].canSee(m) && a.send(e[f].id, "8", s.fixTo(this.dir,
7858 2), m.sid) : a.send(e[f].id, "12", m.sid)), m.active || m.owner !=
7859 e[f] || e[f].changeItemCount(m.group.id, -1));
7860 for (this.active = !1, f = 0; f < e.length; ++f) this.sentTo[e[f].id] &&
7861 a.send(e[f].id, "19", this.sid, s.fixTo(y, 1))
7862 }
7863 }
7864 }
7865 }
7866 }
7867}, function(e, t) {
7868 e.exports = function(e, t, n, i, r, s, a, o, c) {
7869 this.addProjectile = function(l, h, u, f, d, p, g, m, y) {
7870 for (var k, v = s.projectiles[p], w = 0; w < t.length; ++w)
7871 if (!t[w].active) {
7872 k = t[w];
7873 break
7874 }
7875 return k || ((k = new e(n, i, r, s, a, o, c)).sid = t.length, t.push(k)),
7876 k.init(p, l, h, u, d, v.dmg, f, v.scale, g), k.ignoreObj = m, k.layer =
7877 y || v.layer, k.src = v.src, k
7878 }
7879 }
7880}, function(e, t) {
7881 e.exports.obj = function(e, t) {
7882 var n;
7883 this.sounds = [], this.active = !0, this.play = function(t, i, r) {
7884 i && this.active && ((n = this.sounds[t]) || (n = new Howl({
7885 src: ".././sound/" + t + ".mp3"
7886 }), this.sounds[t] = n), r && n.isPlaying || (n.isPlaying = !0, n.play(),
7887 n.volume((i || 1) * e.volumeMult), n.loop(r)))
7888 }, this.toggleMute = function(e, t) {
7889 (n = this.sounds[e]) && n.mute(t)
7890 }, this.stop = function(e) {
7891 (n = this.sounds[e]) && (n.stop(), n.isPlaying = !1)
7892 }
7893 }
7894}, function(e, t, n) {
7895 var i = n(60),
7896 r = n(67);
7897
7898 function s(e, t, n, i, r) {
7899 "localhost" == location.hostname && (window.location.hostname = "127.0.0.1"),
7900 this.debugLog = !1, this.baseUrl = e, this.lobbySize = n, this.devPort = t,
7901 this.lobbySpread = i, this.rawIPs = !!r, this.server = void 0, this.gameIndex =
7902 void 0, this.callback = void 0, this.errorCallback = void 0, this.processServers(
7903 vultr.servers)
7904 }
7905 s.prototype.regionInfo = {
7906 0: {
7907 name: "Local",
7908 latitude: 0,
7909 longitude: 0
7910 },
7911 "vultr:1": {
7912 name: "New Jersey",
7913 latitude: 40.1393329,
7914 longitude: -75.8521818
7915 },
7916 "vultr:2": {
7917 name: "Chicago",
7918 latitude: 41.8339037,
7919 longitude: -87.872238
7920 },
7921 "vultr:3": {
7922 name: "Dallas",
7923 latitude: 32.8208751,
7924 longitude: -96.8714229
7925 },
7926 "vultr:4": {
7927 name: "Seattle",
7928 latitude: 47.6149942,
7929 longitude: -122.4759879
7930 },
7931 "vultr:5": {
7932 name: "Los Angeles",
7933 latitude: 34.0207504,
7934 longitude: -118.691914
7935 },
7936 "vultr:6": {
7937 name: "Atlanta",
7938 latitude: 33.7676334,
7939 longitude: -84.5610332
7940 },
7941 "vultr:7": {
7942 name: "Amsterdam",
7943 latitude: 52.3745287,
7944 longitude: 4.7581878
7945 },
7946 "vultr:8": {
7947 name: "London",
7948 latitude: 51.5283063,
7949 longitude: -.382486
7950 },
7951 "vultr:9": {
7952 name: "Frankfurt",
7953 latitude: 50.1211273,
7954 longitude: 8.496137
7955 },
7956 "vultr:12": {
7957 name: "Silicon Valley",
7958 latitude: 37.4024714,
7959 longitude: -122.3219752
7960 },
7961 "vultr:19": {
7962 name: "Sydney",
7963 latitude: -33.8479715,
7964 longitude: 150.651084
7965 },
7966 "vultr:24": {
7967 name: "Paris",
7968 latitude: 48.8588376,
7969 longitude: 2.2773454
7970 },
7971 "vultr:25": {
7972 name: "Tokyo",
7973 latitude: 35.6732615,
7974 longitude: 139.569959
7975 },
7976 "vultr:39": {
7977 name: "Miami",
7978 latitude: 25.7823071,
7979 longitude: -80.3012156
7980 },
7981 "vultr:40": {
7982 name: "Singapore",
7983 latitude: 1.3147268,
7984 longitude: 103.7065876
7985 }
7986 }, s.prototype.start = function(e, t) {
7987 this.callback = e, this.errorCallback = t;
7988 var n = this.parseServerQuery();
7989 n ? (this.log("Found server in query."), this.password = n[3], this.connect(
7990 n[0], n[1], n[2])) : (this.log("Pinging servers..."), this.pingServers())
7991 }, s.prototype.parseServerQuery = function() {
7992 var e = i.parse(location.href, !0),
7993 t = e.query.server;
7994 if ("string" == typeof t) {
7995 var n = t.split(":");
7996 if (3 == n.length) {
7997 var r = n[0],
7998 s = parseInt(n[1]),
7999 a = parseInt(n[2]);
8000 return "0" == r || r.startsWith("vultr:") || (r = "vultr:" + r), [r, s,
8001 a, e.query.password
8002 ]
8003 }
8004 this.errorCallback("Invalid number of server parameters in " + t)
8005 }
8006 }, s.prototype.findServer = function(e, t) {
8007 var n = this.servers[e];
8008 if (Array.isArray(n)) {
8009 for (var i = 0; i < n.length; i++) {
8010 var r = n[i];
8011 if (r.index == t) return r
8012 }
8013 console.warn("Could not find server in region " + e + " with index " + t +
8014 ".")
8015 } else this.errorCallback("No server list for region " + e)
8016 }, s.prototype.pingServers = function() {
8017 var e = this,
8018 t = [];
8019 for (var n in this.servers)
8020 if (this.servers.hasOwnProperty(n)) {
8021 var i = this.servers[n],
8022 r = i[Math.floor(Math.random() * i.length)];
8023 null != r ? function(i, r) {
8024 var s = new XMLHttpRequest;
8025 s.onreadystatechange = function(i) {
8026 var s = i.target;
8027 if (4 == s.readyState)
8028 if (200 == s.status) {
8029 for (var a = 0; a < t.length; a++) t[a].abort();
8030 e.log("Connecting to region", r.region);
8031 var o = e.seekServer(r.region);
8032 e.connect(o[0], o[1], o[2])
8033 } else console.warn("Error pinging " + r.ip + " in region " + n)
8034 };
8035 var a = "//" + e.serverAddress(r.ip, !0) + ":" + e.serverPort(r) +
8036 "/ping";
8037 s.open("GET", a, !0), s.send(null), e.log("Pinging", a), t.push(s)
8038 }(0, r) : console.log("No target server for region " + n)
8039 }
8040 }, s.prototype.seekServer = function(e, t, n) {
8041 null == n && (n = "random"), null == t && (t = !1);
8042 const i = ["random"];
8043 var r = this.lobbySize,
8044 s = this.lobbySpread,
8045 a = this.servers[e].flatMap((function(e) {
8046 var t = 0;
8047 return e.games.map((function(n) {
8048 var i = t++;
8049 return {
8050 region: e.region,
8051 index: e.index * e.games.length + i,
8052 gameIndex: i,
8053 gameCount: e.games.length,
8054 playerCount: n.playerCount,
8055 isPrivate: n.isPrivate
8056 }
8057 }))
8058 })).filter((function(e) {
8059 return !e.isPrivate
8060 })).filter((function(e) {
8061 return !t || 0 == e.playerCount && e.gameIndex >= e.gameCount / 2
8062 })).filter((function(e) {
8063 return "random" == n || i[e.index % i.length].key == n
8064 })).sort((function(e, t) {
8065 return t.playerCount - e.playerCount
8066 })).filter((function(e) {
8067 return e.playerCount < r
8068 }));
8069 if (t && a.reverse(), 0 != a.length) {
8070 var o = Math.min(s, a.length),
8071 c = Math.floor(Math.random() * o),
8072 l = a[c = Math.min(c, a.length - 1)],
8073 h = l.region,
8074 u = (c = Math.floor(l.index / l.gameCount), l.index % l.gameCount);
8075 return this.log("Found server."), [h, c, u]
8076 }
8077 this.errorCallback("No open servers.")
8078 }, s.prototype.connect = function(e, t, n) {
8079 if (!this.connected) {
8080 var i = this.findServer(e, t);
8081 null != i ? (this.log("Connecting to server", i, "with game index", n), i
8082 .games[n].playerCount >= this.lobbySize ? this.errorCallback(
8083 "Server is already full.") : (window.history.replaceState(document.title,
8084 document.title, this.generateHref(e, t, n, this.password)), this.server =
8085 i, this.gameIndex = n, this.log("Calling callback with address", this.serverAddress(
8086 i.ip), "on port", this.serverPort(i), "with game index", n), this.callback(
8087 this.serverAddress(i.ip), this.serverPort(i), n))) : this.errorCallback(
8088 "Failed to find server for region " + e + " and index " + t)
8089 }
8090 }, s.prototype.switchServer = function(e, t, n, i) {
8091 this.switchingServers = !0, window.location.href = this.generateHref(e, t,
8092 n, i)
8093 }, s.prototype.generateHref = function(e, t, n, i) {
8094 var r = "/?server=" + (e = this.stripRegion(e)) + ":" + t + ":" + n;
8095 return i && (r += "&password=" + encodeURIComponent(i)), r
8096 }, s.prototype.serverAddress = function(e, t) {
8097 return "127.0.0.1" == e || "7f000001" == e ||
8098 "903d62ef5d1c2fecdcaeb5e7dd485eff" == e ? window.location.hostname : this
8099 .rawIPs ? t ? "ip_" + this.hashIP(e) + "." + this.baseUrl : e : "ip_" + e +
8100 "." + this.baseUrl
8101 }, s.prototype.serverPort = function(e) {
8102 return 0 == e.region ? this.devPort : location.protocol.startsWith("https") ?
8103 443 : 80
8104 }, s.prototype.processServers = function(e) {
8105 for (var t = {}, n = 0; n < e.length; n++) {
8106 var i = e[n],
8107 r = t[i.region];
8108 null == r && (r = [], t[i.region] = r), r.push(i)
8109 }
8110 for (var s in t) t[s] = t[s].sort((function(e, t) {
8111 return e.index - t.index
8112 }));
8113 this.servers = t
8114 }, s.prototype.ipToHex = function(e) {
8115 return e.split(".").map(e => ("00" + parseInt(e).toString(16)).substr(-2))
8116 .join("").toLowerCase()
8117 }, s.prototype.hashIP = function(e) {
8118 return r(this.ipToHex(e))
8119 }, s.prototype.log = function() {
8120 return this.debugLog ? console.log.apply(void 0, arguments) : console.verbose ?
8121 console.verbose.apply(void 0, arguments) : void 0
8122 }, s.prototype.stripRegion = function(e) {
8123 return e.startsWith("vultr:") ? e = e.slice(6) : e.startsWith("do:") && (e =
8124 e.slice(3)), e
8125 }, window.testVultrClient = function() {
8126 var e = 1;
8127
8128 function t(t, n) {
8129 (t = "" + t) == (n = "" + n) ? console.log(`Assert ${e} passed.`):
8130 console.warn(`Assert ${e} failed. Expected ${n}, got ${t}.`), e++
8131 }
8132 var n = new s("test.io", -1, 5, 1, !1);
8133 n.errorCallback = function(e) {}, n.processServers(function(e) {
8134 var t = [];
8135 for (var n in e)
8136 for (var i = e[n], r = 0; r < i.length; r++) t.push({
8137 ip: n + ":" + r,
8138 scheme: "testing",
8139 region: n,
8140 index: r,
8141 games: i[r].map(e => ({
8142 playerCount: e,
8143 isPrivate: !1
8144 }))
8145 });
8146 return t
8147 }({
8148 1: [
8149 [0, 0, 0, 0],
8150 [0, 0, 0, 0]
8151 ],
8152 2: [
8153 [5, 1, 0, 0],
8154 [0, 0, 0, 0]
8155 ],
8156 3: [
8157 [5, 0, 1, 5],
8158 [0, 0, 0, 0]
8159 ],
8160 4: [
8161 [5, 1, 1, 5],
8162 [1, 0, 0, 0]
8163 ],
8164 5: [
8165 [5, 1, 1, 5],
8166 [1, 0, 4, 0]
8167 ],
8168 6: [
8169 [5, 5, 5, 5],
8170 [2, 3, 1, 4]
8171 ],
8172 7: [
8173 [5, 5, 5, 5],
8174 [5, 5, 5, 5]
8175 ]
8176 })), t(n.seekServer(1, !1), [1, 0, 0]), t(n.seekServer(1, !0), [1, 1, 3]),
8177 t(n.seekServer(2, !1), [2, 0, 1]), t(n.seekServer(2, !0), [2, 1, 3]), t(n
8178 .seekServer(3, !1), [3, 0, 2]), t(n.seekServer(3, !0), [3, 1, 3]), t(n.seekServer(
8179 4, !1), [4, 0, 1]), t(n.seekServer(4, !0), [4, 1, 3]), t(n.seekServer(5, !
8180 1), [5, 1, 2]), t(n.seekServer(5, !0), [5, 1, 3]), t(n.seekServer(6, !1), [
8181 6, 1, 3
8182 ]), t(n.seekServer(6, !0), void 0), t(n.seekServer(7, !1), void 0), t(n.seekServer(
8183 7, !0), void 0), console.log("Tests passed.")
8184 };
8185 var a = function(e, t) {
8186 return e.concat(t)
8187 };
8188 Array.prototype.flatMap = function(e) {
8189 return function(e, t) {
8190 return t.map(e).reduce(a, [])
8191 }(e, this)
8192 }, e.exports = s
8193}, function(e, t, n) {
8194 "use strict";
8195 var i = n(61),
8196 r = n(63);
8197
8198 function s() {
8199 this.protocol = null, this.slashes = null, this.auth = null, this.host =
8200 null, this.port = null, this.hostname = null, this.hash = null, this.search =
8201 null, this.query = null, this.pathname = null, this.path = null, this.href =
8202 null
8203 }
8204 t.parse = v, t.resolve = function(e, t) {
8205 return v(e, !1, !0).resolve(t)
8206 }, t.resolveObject = function(e, t) {
8207 return e ? v(e, !1, !0).resolveObject(t) : t
8208 }, t.format = function(e) {
8209 return r.isString(e) && (e = v(e)), e instanceof s ? e.format() : s.prototype
8210 .format.call(e)
8211 }, t.Url = s;
8212 var a = /^([a-z0-9.+-]+:)/i,
8213 o = /:[0-9]*$/,
8214 c = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
8215 l = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r",
8216 "\n", "\t"
8217 ]),
8218 h = ["'"].concat(l),
8219 u = ["%", "/", "?", ";", "#"].concat(h),
8220 f = ["/", "?", "#"],
8221 d = /^[+a-z0-9A-Z_-]{0,63}$/,
8222 p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
8223 g = {
8224 javascript: !0,
8225 "javascript:": !0
8226 },
8227 m = {
8228 javascript: !0,
8229 "javascript:": !0
8230 },
8231 y = {
8232 http: !0,
8233 https: !0,
8234 ftp: !0,
8235 gopher: !0,
8236 file: !0,
8237 "http:": !0,
8238 "https:": !0,
8239 "ftp:": !0,
8240 "gopher:": !0,
8241 "file:": !0
8242 },
8243 k = n(64);
8244
8245 function v(e, t, n) {
8246 if (e && r.isObject(e) && e instanceof s) return e;
8247 var i = new s;
8248 return i.parse(e, t, n), i
8249 }
8250 s.prototype.parse = function(e, t, n) {
8251 if (!r.isString(e)) throw new TypeError(
8252 "Parameter 'url' must be a string, not " + typeof e);
8253 var s = e.indexOf("?"),
8254 o = -1 !== s && s < e.indexOf("#") ? "?" : "#",
8255 l = e.split(o);
8256 l[0] = l[0].replace(/\\/g, "/");
8257 var v = e = l.join(o);
8258 if (v = v.trim(), !n && 1 === e.split("#").length) {
8259 var w = c.exec(v);
8260 if (w) return this.path = v, this.href = v, this.pathname = w[1], w[2] ?
8261 (this.search = w[2], this.query = t ? k.parse(this.search.substr(1)) :
8262 this.search.substr(1)) : t && (this.search = "", this.query = {}),
8263 this
8264 }
8265 var b = a.exec(v);
8266 if (b) {
8267 var x = (b = b[0]).toLowerCase();
8268 this.protocol = x, v = v.substr(b.length)
8269 }
8270 if (n || b || v.match(/^\/\/[^@\/]+@[^@\/]+/)) {
8271 var S = "//" === v.substr(0, 2);
8272 !S || b && m[b] || (v = v.substr(2), this.slashes = !0)
8273 }
8274 if (!m[b] && (S || b && !y[b])) {
8275 for (var T, I, E = -1, M = 0; M < f.length; M++) - 1 !== (A = v.indexOf(f[
8276 M])) && (-1 === E || A < E) && (E = A);
8277 for (-1 !== (I = -1 === E ? v.lastIndexOf("@") : v.lastIndexOf("@", E)) &&
8278 (T = v.slice(0, I), v = v.slice(I + 1), this.auth = decodeURIComponent(T)),
8279 E = -1, M = 0; M < u.length; M++) {
8280 var A; - 1 !== (A = v.indexOf(u[M])) && (-1 === E || A < E) && (E = A)
8281 } - 1 === E && (E = v.length), this.host = v.slice(0, E), v = v.slice(E),
8282 this.parseHost(), this.hostname = this.hostname || "";
8283 var P = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length -
8284 1];
8285 if (!P)
8286 for (var B = this.hostname.split(/\./), C = (M = 0, B.length); M < C; M++) {
8287 var O = B[M];
8288 if (O && !O.match(d)) {
8289 for (var R = "", j = 0, _ = O.length; j < _; j++) O.charCodeAt(j) >
8290 127 ? R += "x" : R += O[j];
8291 if (!R.match(d)) {
8292 var U = B.slice(0, M),
8293 D = B.slice(M + 1),
8294 L = O.match(p);
8295 L && (U.push(L[1]), D.unshift(L[2])), D.length && (v = "/" + D.join(
8296 ".") + v), this.hostname = U.join(".");
8297 break
8298 }
8299 }
8300 }
8301 this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname
8302 .toLowerCase(), P || (this.hostname = i.toASCII(this.hostname));
8303 var F = this.port ? ":" + this.port : "",
8304 z = this.hostname || "";
8305 this.host = z + F, this.href += this.host, P && (this.hostname = this.hostname
8306 .substr(1, this.hostname.length - 2), "/" !== v[0] && (v = "/" + v))
8307 }
8308 if (!g[x])
8309 for (M = 0, C = h.length; M < C; M++) {
8310 var H = h[M];
8311 if (-1 !== v.indexOf(H)) {
8312 var V = encodeURIComponent(H);
8313 V === H && (V = escape(H)), v = v.split(H).join(V)
8314 }
8315 }
8316 var q = v.indexOf("#"); - 1 !== q && (this.hash = v.substr(q), v = v.slice(
8317 0, q));
8318 var Y = v.indexOf("?");
8319 if (-1 !== Y ? (this.search = v.substr(Y), this.query = v.substr(Y + 1), t &&
8320 (this.query = k.parse(this.query)), v = v.slice(0, Y)) : t && (this.search =
8321 "", this.query = {}), v && (this.pathname = v), y[x] && this.hostname &&
8322 !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
8323 F = this.pathname || "";
8324 var W = this.search || "";
8325 this.path = F + W
8326 }
8327 return this.href = this.format(), this
8328 }, s.prototype.format = function() {
8329 var e = this.auth || "";
8330 e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"), e += "@");
8331 var t = this.protocol || "",
8332 n = this.pathname || "",
8333 i = this.hash || "",
8334 s = !1,
8335 a = "";
8336 this.host ? s = e + this.host : this.hostname && (s = e + (-1 === this.hostname
8337 .indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port &&
8338 (s += ":" + this.port)), this.query && r.isObject(this.query) && Object.keys(
8339 this.query).length && (a = k.stringify(this.query));
8340 var o = this.search || a && "?" + a || "";
8341 return t && ":" !== t.substr(-1) && (t += ":"), this.slashes || (!t || y[t]) &&
8342 !1 !== s ? (s = "//" + (s || ""), n && "/" !== n.charAt(0) && (n = "/" +
8343 n)) : s || (s = ""), i && "#" !== i.charAt(0) && (i = "#" + i), o && "?" !==
8344 o.charAt(0) && (o = "?" + o), t + s + (n = n.replace(/[?#]/g, (function(e) {
8345 return encodeURIComponent(e)
8346 }))) + (o = o.replace("#", "%23")) + i
8347 }, s.prototype.resolve = function(e) {
8348 return this.resolveObject(v(e, !1, !0)).format()
8349 }, s.prototype.resolveObject = function(e) {
8350 if (r.isString(e)) {
8351 var t = new s;
8352 t.parse(e, !1, !0), e = t
8353 }
8354 for (var n = new s, i = Object.keys(this), a = 0; a < i.length; a++) {
8355 var o = i[a];
8356 n[o] = this[o]
8357 }
8358 if (n.hash = e.hash, "" === e.href) return n.href = n.format(), n;
8359 if (e.slashes && !e.protocol) {
8360 for (var c = Object.keys(e), l = 0; l < c.length; l++) {
8361 var h = c[l];
8362 "protocol" !== h && (n[h] = e[h])
8363 }
8364 return y[n.protocol] && n.hostname && !n.pathname && (n.path = n.pathname =
8365 "/"), n.href = n.format(), n
8366 }
8367 if (e.protocol && e.protocol !== n.protocol) {
8368 if (!y[e.protocol]) {
8369 for (var u = Object.keys(e), f = 0; f < u.length; f++) {
8370 var d = u[f];
8371 n[d] = e[d]
8372 }
8373 return n.href = n.format(), n
8374 }
8375 if (n.protocol = e.protocol, e.host || m[e.protocol]) n.pathname = e.pathname;
8376 else {
8377 for (var p = (e.pathname || "").split("/"); p.length && !(e.host = p.shift());)
8378 ;
8379 e.host || (e.host = ""), e.hostname || (e.hostname = ""), "" !== p[0] &&
8380 p.unshift(""), p.length < 2 && p.unshift(""), n.pathname = p.join("/")
8381 }
8382 if (n.search = e.search, n.query = e.query, n.host = e.host || "", n.auth =
8383 e.auth, n.hostname = e.hostname || e.host, n.port = e.port, n.pathname ||
8384 n.search) {
8385 var g = n.pathname || "",
8386 k = n.search || "";
8387 n.path = g + k
8388 }
8389 return n.slashes = n.slashes || e.slashes, n.href = n.format(), n
8390 }
8391 var v = n.pathname && "/" === n.pathname.charAt(0),
8392 w = e.host || e.pathname && "/" === e.pathname.charAt(0),
8393 b = w || v || n.host && e.pathname,
8394 x = b,
8395 S = n.pathname && n.pathname.split("/") || [],
8396 T = (p = e.pathname && e.pathname.split("/") || [], n.protocol && !y[n.protocol]);
8397 if (T && (n.hostname = "", n.port = null, n.host && ("" === S[0] ? S[0] =
8398 n.host : S.unshift(n.host)), n.host = "", e.protocol && (e.hostname =
8399 null, e.port = null, e.host && ("" === p[0] ? p[0] = e.host : p.unshift(
8400 e.host)), e.host = null), b = b && ("" === p[0] || "" === S[0])), w) n.host =
8401 e.host || "" === e.host ? e.host : n.host, n.hostname = e.hostname || "" ===
8402 e.hostname ? e.hostname : n.hostname, n.search = e.search, n.query = e.query,
8403 S = p;
8404 else if (p.length) S || (S = []), S.pop(), S = S.concat(p), n.search = e.search,
8405 n.query = e.query;
8406 else if (!r.isNullOrUndefined(e.search)) return T && (n.hostname = n.host =
8407 S.shift(), (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split(
8408 "@")) && (n.auth = P.shift(), n.host = n.hostname = P.shift())), n.search =
8409 e.search, n.query = e.query, r.isNull(n.pathname) && r.isNull(n.search) ||
8410 (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")),
8411 n.href = n.format(), n;
8412 if (!S.length) return n.pathname = null, n.search ? n.path = "/" + n.search :
8413 n.path = null, n.href = n.format(), n;
8414 for (var I = S.slice(-1)[0], E = (n.host || e.host || S.length > 1) && (
8415 "." === I || ".." === I) || "" === I, M = 0, A = S.length; A >= 0; A--)
8416 "." === (I = S[A]) ? S.splice(A, 1) : ".." === I ? (S.splice(A, 1), M++) :
8417 M && (S.splice(A, 1), M--);
8418 if (!b && !x)
8419 for (; M--; M) S.unshift("..");
8420 !b || "" === S[0] || S[0] && "/" === S[0].charAt(0) || S.unshift(""), E &&
8421 "/" !== S.join("/").substr(-1) && S.push("");
8422 var P, B = "" === S[0] || S[0] && "/" === S[0].charAt(0);
8423 return T && (n.hostname = n.host = B ? "" : S.length ? S.shift() : "", (P = !
8424 !(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth =
8425 P.shift(), n.host = n.hostname = P.shift())), (b = b || n.host && S.length) &&
8426 !B && S.unshift(""), S.length ? n.pathname = S.join("/") : (n.pathname =
8427 null, n.path = null), r.isNull(n.pathname) && r.isNull(n.search) || (n.path =
8428 (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.auth = e
8429 .auth || n.auth, n.slashes = n.slashes || e.slashes, n.href = n.format(),
8430 n
8431 }, s.prototype.parseHost = function() {
8432 var e = this.host,
8433 t = o.exec(e);
8434 t && (":" !== (t = t[0]) && (this.port = t.substr(1)), e = e.substr(0, e.length -
8435 t.length)), e && (this.hostname = e)
8436 }
8437}, function(e, t, n) {
8438 (function(e, i) {
8439 var r; /*! https://mths.be/punycode v1.4.1 by @mathias */
8440 ! function(s) {
8441 t && t.nodeType, e && e.nodeType;
8442 var a = "object" == typeof i && i;
8443 a.global !== a && a.window !== a && a.self;
8444 var o, c = 2147483647,
8445 l = 36,
8446 h = /^xn--/,
8447 u = /[^\x20-\x7E]/,
8448 f = /[\x2E\u3002\uFF0E\uFF61]/g,
8449 d = {
8450 overflow: "Overflow: input needs wider integers to process",
8451 "not-basic": "Illegal input >= 0x80 (not a basic code point)",
8452 "invalid-input": "Invalid input"
8453 },
8454 p = Math.floor,
8455 g = String.fromCharCode;
8456
8457 function m(e) {
8458 throw new RangeError(d[e])
8459 }
8460
8461 function y(e, t) {
8462 for (var n = e.length, i = []; n--;) i[n] = t(e[n]);
8463 return i
8464 }
8465
8466 function k(e, t) {
8467 var n = e.split("@"),
8468 i = "";
8469 return n.length > 1 && (i = n[0] + "@", e = n[1]), i + y((e = e.replace(
8470 f, ".")).split("."), t).join(".")
8471 }
8472
8473 function v(e) {
8474 for (var t, n, i = [], r = 0, s = e.length; r < s;)(t = e.charCodeAt(r++)) >=
8475 55296 && t <= 56319 && r < s ? 56320 == (64512 & (n = e.charCodeAt(r++))) ?
8476 i.push(((1023 & t) << 10) + (1023 & n) + 65536) : (i.push(t), r--) : i.push(
8477 t);
8478 return i
8479 }
8480
8481 function w(e) {
8482 return y(e, (function(e) {
8483 var t = "";
8484 return e > 65535 && (t += g((e -= 65536) >>> 10 & 1023 | 55296), e =
8485 56320 | 1023 & e), t + g(e)
8486 })).join("")
8487 }
8488
8489 function b(e) {
8490 return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e - 97 < 26 ? e -
8491 97 : l
8492 }
8493
8494 function x(e, t) {
8495 return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
8496 }
8497
8498 function S(e, t, n) {
8499 var i = 0;
8500 for (e = n ? p(e / 700) : e >> 1, e += p(e / t); e > 455; i += l) e = p(
8501 e / 35);
8502 return p(i + 36 * e / (e + 38))
8503 }
8504
8505 function T(e) {
8506 var t, n, i, r, s, a, o, h, u, f, d = [],
8507 g = e.length,
8508 y = 0,
8509 k = 128,
8510 v = 72;
8511 for ((n = e.lastIndexOf("-")) < 0 && (n = 0), i = 0; i < n; ++i) e.charCodeAt(
8512 i) >= 128 && m("not-basic"), d.push(e.charCodeAt(i));
8513 for (r = n > 0 ? n + 1 : 0; r < g;) {
8514 for (s = y, a = 1, o = l; r >= g && m("invalid-input"), ((h = b(e.charCodeAt(
8515 r++))) >= l || h > p((c - y) / a)) && m("overflow"), y += h * a, !(h <
8516 (u = o <= v ? 1 : o >= v + 26 ? 26 : o - v)); o += l) a > p(c / (f =
8517 l - u)) && m("overflow"), a *= f;
8518 v = S(y - s, t = d.length + 1, 0 == s), p(y / t) > c - k && m(
8519 "overflow"), k += p(y / t), y %= t, d.splice(y++, 0, k)
8520 }
8521 return w(d)
8522 }
8523
8524 function I(e) {
8525 var t, n, i, r, s, a, o, h, u, f, d, y, k, w, b, T = [];
8526 for (y = (e = v(e)).length, t = 128, n = 0, s = 72, a = 0; a < y; ++a)(d =
8527 e[a]) < 128 && T.push(g(d));
8528 for (i = r = T.length, r && T.push("-"); i < y;) {
8529 for (o = c, a = 0; a < y; ++a)(d = e[a]) >= t && d < o && (o = d);
8530 for (o - t > p((c - n) / (k = i + 1)) && m("overflow"), n += (o - t) *
8531 k, t = o, a = 0; a < y; ++a)
8532 if ((d = e[a]) < t && ++n > c && m("overflow"), d == t) {
8533 for (h = n, u = l; !(h < (f = u <= s ? 1 : u >= s + 26 ? 26 : u - s)); u +=
8534 l) b = h - f, w = l - f, T.push(g(x(f + b % w, 0))), h = p(b / w);
8535 T.push(g(x(h, 0))), s = S(n, k, i == r), n = 0, ++i
8536 }++n, ++t
8537 }
8538 return T.join("")
8539 }
8540 o = {
8541 version: "1.4.1",
8542 ucs2: {
8543 decode: v,
8544 encode: w
8545 },
8546 decode: T,
8547 encode: I,
8548 toASCII: function(e) {
8549 return k(e, (function(e) {
8550 return u.test(e) ? "xn--" + I(e) : e
8551 }))
8552 },
8553 toUnicode: function(e) {
8554 return k(e, (function(e) {
8555 return h.test(e) ? T(e.slice(4).toLowerCase()) : e
8556 }))
8557 }
8558 }, void 0 === (r = function() {
8559 return o
8560 }.call(t, n, t, e)) || (e.exports = r)
8561 }()
8562 }).call(this, n(62)(e), n(12))
8563}, function(e, t) {
8564 e.exports = function(e) {
8565 return e.webpackPolyfill || (e.deprecate = function() {}, e.paths = [], e.children ||
8566 (e.children = []), Object.defineProperty(e, "loaded", {
8567 enumerable: !0,
8568 get: function() {
8569 return e.l
8570 }
8571 }), Object.defineProperty(e, "id", {
8572 enumerable: !0,
8573 get: function() {
8574 return e.i
8575 }
8576 }), e.webpackPolyfill = 1), e
8577 }
8578}, function(e, t, n) {
8579 "use strict";
8580 e.exports = {
8581 isString: function(e) {
8582 return "string" == typeof e
8583 },
8584 isObject: function(e) {
8585 return "object" == typeof e && null !== e
8586 },
8587 isNull: function(e) {
8588 return null === e
8589 },
8590 isNullOrUndefined: function(e) {
8591 return null == e
8592 }
8593 }
8594}, function(e, t, n) {
8595 "use strict";
8596 t.decode = t.parse = n(65), t.encode = t.stringify = n(66)
8597}, function(e, t, n) {
8598 "use strict";
8599
8600 function i(e, t) {
8601 return Object.prototype.hasOwnProperty.call(e, t)
8602 }
8603 e.exports = function(e, t, n, s) {
8604 t = t || "&", n = n || "=";
8605 var a = {};
8606 if ("string" != typeof e || 0 === e.length) return a;
8607 var o = /\+/g;
8608 e = e.split(t);
8609 var c = 1e3;
8610 s && "number" == typeof s.maxKeys && (c = s.maxKeys);
8611 var l = e.length;
8612 c > 0 && l > c && (l = c);
8613 for (var h = 0; h < l; ++h) {
8614 var u, f, d, p, g = e[h].replace(o, "%20"),
8615 m = g.indexOf(n);
8616 m >= 0 ? (u = g.substr(0, m), f = g.substr(m + 1)) : (u = g, f = ""), d =
8617 decodeURIComponent(u), p = decodeURIComponent(f), i(a, d) ? r(a[d]) ? a[
8618 d].push(p) : a[d] = [a[d], p] : a[d] = p
8619 }
8620 return a
8621 };
8622 var r = Array.isArray || function(e) {
8623 return "[object Array]" === Object.prototype.toString.call(e)
8624 }
8625}, function(e, t, n) {
8626 "use strict";
8627 var i = function(e) {
8628 switch (typeof e) {
8629 case "string":
8630 return e;
8631 case "boolean":
8632 return e ? "true" : "false";
8633 case "number":
8634 return isFinite(e) ? e : "";
8635 default:
8636 return ""
8637 }
8638 };
8639 e.exports = function(e, t, n, o) {
8640 return t = t || "&", n = n || "=", null === e && (e = void 0), "object" ==
8641 typeof e ? s(a(e), (function(a) {
8642 var o = encodeURIComponent(i(a)) + n;
8643 return r(e[a]) ? s(e[a], (function(e) {
8644 return o + encodeURIComponent(i(e))
8645 })).join(t) : o + encodeURIComponent(i(e[a]))
8646 })).join(t) : o ? encodeURIComponent(i(o)) + n + encodeURIComponent(i(e)) :
8647 ""
8648 };
8649 var r = Array.isArray || function(e) {
8650 return "[object Array]" === Object.prototype.toString.call(e)
8651 };
8652
8653 function s(e, t) {
8654 if (e.map) return e.map(t);
8655 for (var n = [], i = 0; i < e.length; i++) n.push(t(e[i], i));
8656 return n
8657 }
8658 var a = Object.keys || function(e) {
8659 var t = [];
8660 for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
8661 return t
8662 }
8663}, function(e, t, n) {
8664 ! function() {
8665 var t = n(68),
8666 i = n(20).utf8,
8667 r = n(69),
8668 s = n(20).bin,
8669 a = function(e, n) {
8670 e.constructor == String ? e = n && "binary" === n.encoding ? s.stringToBytes(
8671 e) : i.stringToBytes(e) : r(e) ? e = Array.prototype.slice.call(e, 0) :
8672 Array.isArray(e) || (e = e.toString());
8673 for (var o = t.bytesToWords(e), c = 8 * e.length, l = 1732584193, h = -
8674 271733879, u = -1732584194, f = 271733878, d = 0; d < o.length; d++) o[
8675 d] = 16711935 & (o[d] << 8 | o[d] >>> 24) | 4278255360 & (o[d] << 24 |
8676 o[d] >>> 8);
8677 o[c >>> 5] |= 128 << c % 32, o[14 + (c + 64 >>> 9 << 4)] = c;
8678 var p = a._ff,
8679 g = a._gg,
8680 m = a._hh,
8681 y = a._ii;
8682 for (d = 0; d < o.length; d += 16) {
8683 var k = l,
8684 v = h,
8685 w = u,
8686 b = f;
8687 h = y(h = y(h = y(h = y(h = m(h = m(h = m(h = m(h = g(h = g(h = g(h = g(
8688 h = p(h = p(h = p(h = p(h, u = p(u, f = p(f, l = p(l, h, u,
8689 f, o[d + 0], 7, -680876936), h, u, o[d + 1], 12, -
8690 389564586), l, h, o[d + 2], 17, 606105819), f, l, o[d +
8691 3], 22, -1044525330), u = p(u, f = p(f, l = p(l, h, u,
8692 f, o[d + 4], 7, -176418897), h, u, o[d + 5], 12,
8693 1200080426), l, h, o[d + 6], 17, -1473231341), f, l, o[
8694 d + 7], 22, -45705983), u = p(u, f = p(f, l = p(l, h, u,
8695 f, o[d + 8], 7, 1770035416), h, u, o[d + 9], 12, -
8696 1958414417), l, h, o[d + 10], 17, -42063), f, l, o[d +
8697 11], 22, -1990404162), u = p(u, f = p(f, l = p(l, h, u, f,
8698 o[d + 12], 7, 1804603682), h, u, o[d + 13], 12, -
8699 40341101), l, h, o[d + 14], 17, -1502002290), f, l, o[d +
8700 15], 22, 1236535329), u = g(u, f = g(f, l = g(l, h, u, f,
8701 o[d + 1], 5, -165796510), h, u, o[d + 6], 9, -1069501632),
8702 l, h, o[d + 11], 14, 643717713), f, l, o[d + 0], 20, -
8703 373897302), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 5], 5, -
8704 701558691), h, u, o[d + 10], 9, 38016083), l, h, o[d + 15],
8705 14, -660478335), f, l, o[d + 4], 20, -405537848), u = g(u, f =
8706 g(f, l = g(l, h, u, f, o[d + 9], 5, 568446438), h, u, o[d +
8707 14], 9, -1019803690), l, h, o[d + 3], 14, -187363961), f, l,
8708 o[d + 8], 20, 1163531501), u = g(u, f = g(f, l = g(l, h, u, f,
8709 o[d + 13], 5, -1444681467), h, u, o[d + 2], 9, -51403784), l,
8710 h, o[d + 7], 14, 1735328473), f, l, o[d + 12], 20, -
8711 1926607734), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 5], 4, -
8712 378558), h, u, o[d + 8], 11, -2022574463), l, h, o[d + 11],
8713 16, 1839030562), f, l, o[d + 14], 23, -35309556), u = m(u, f =
8714 m(f, l = m(l, h, u, f, o[d + 1], 4, -1530992060), h, u, o[d + 4],
8715 11, 1272893353), l, h, o[d + 7], 16, -155497632), f, l, o[d +
8716 10], 23, -1094730640), u = m(u, f = m(f, l = m(l, h, u, f, o[d +
8717 13], 4, 681279174), h, u, o[d + 0], 11, -358537222), l, h, o[d +
8718 3], 16, -722521979), f, l, o[d + 6], 23, 76029189), u = m(u, f =
8719 m(f, l = m(l, h, u, f, o[d + 9], 4, -640364487), h, u, o[d + 12],
8720 11, -421815835), l, h, o[d + 15], 16, 530742520), f, l, o[d + 2],
8721 23, -995338651), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 0], 6, -
8722 198630844), h, u, o[d + 7], 10, 1126891415), l, h, o[d + 14], 15, -
8723 1416354905), f, l, o[d + 5], 21, -57434055), u = y(u, f = y(f, l =
8724 y(l, h, u, f, o[d + 12], 6, 1700485571), h, u, o[d + 3], 10, -
8725 1894986606), l, h, o[d + 10], 15, -1051523), f, l, o[d + 1], 21, -
8726 2054922799), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 8], 6,
8727 1873313359), h, u, o[d + 15], 10, -30611744), l, h, o[d + 6], 15, -
8728 1560198380), f, l, o[d + 13], 21, 1309151649), u = y(u, f = y(f, l =
8729 y(l, h, u, f, o[d + 4], 6, -145523070), h, u, o[d + 11], 10, -
8730 1120210379), l, h, o[d + 2], 15, 718787259), f, l, o[d + 9], 21, -
8731 343485551), l = l + k >>> 0, h = h + v >>> 0, u = u + w >>> 0, f = f +
8732 b >>> 0
8733 }
8734 return t.endian([l, h, u, f])
8735 };
8736 a._ff = function(e, t, n, i, r, s, a) {
8737 var o = e + (t & n | ~t & i) + (r >>> 0) + a;
8738 return (o << s | o >>> 32 - s) + t
8739 }, a._gg = function(e, t, n, i, r, s, a) {
8740 var o = e + (t & i | n & ~i) + (r >>> 0) + a;
8741 return (o << s | o >>> 32 - s) + t
8742 }, a._hh = function(e, t, n, i, r, s, a) {
8743 var o = e + (t ^ n ^ i) + (r >>> 0) + a;
8744 return (o << s | o >>> 32 - s) + t
8745 }, a._ii = function(e, t, n, i, r, s, a) {
8746 var o = e + (n ^ (t | ~i)) + (r >>> 0) + a;
8747 return (o << s | o >>> 32 - s) + t
8748 }, a._blocksize = 16, a._digestsize = 16, e.exports = function(e, n) {
8749 if (null == e) throw new Error("Illegal argument " + e);
8750 var i = t.wordsToBytes(a(e, n));
8751 return n && n.asBytes ? i : n && n.asString ? s.bytesToString(i) : t.bytesToHex(
8752 i)
8753 }
8754 }()
8755}, function(e, t) {
8756 ! function() {
8757 var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
8758 n = {
8759 rotl: function(e, t) {
8760 return e << t | e >>> 32 - t
8761 },
8762 rotr: function(e, t) {
8763 return e << 32 - t | e >>> t
8764 },
8765 endian: function(e) {
8766 if (e.constructor == Number) return 16711935 & n.rotl(e, 8) |
8767 4278255360 & n.rotl(e, 24);
8768 for (var t = 0; t < e.length; t++) e[t] = n.endian(e[t]);
8769 return e
8770 },
8771 randomBytes: function(e) {
8772 for (var t = []; e > 0; e--) t.push(Math.floor(256 * Math.random()));
8773 return t
8774 },
8775 bytesToWords: function(e) {
8776 for (var t = [], n = 0, i = 0; n < e.length; n++, i += 8) t[i >>> 5] |=
8777 e[n] << 24 - i % 32;
8778 return t
8779 },
8780 wordsToBytes: function(e) {
8781 for (var t = [], n = 0; n < 32 * e.length; n += 8) t.push(e[n >>> 5] >>>
8782 24 - n % 32 & 255);
8783 return t
8784 },
8785 bytesToHex: function(e) {
8786 for (var t = [], n = 0; n < e.length; n++) t.push((e[n] >>> 4).toString(
8787 16)), t.push((15 & e[n]).toString(16));
8788 return t.join("")
8789 },
8790 hexToBytes: function(e) {
8791 for (var t = [], n = 0; n < e.length; n += 2) t.push(parseInt(e.substr(
8792 n, 2), 16));
8793 return t
8794 },
8795 bytesToBase64: function(e) {
8796 for (var n = [], i = 0; i < e.length; i += 3)
8797 for (var r = e[i] << 16 | e[i + 1] << 8 | e[i + 2], s = 0; s < 4; s++)
8798 8 * i + 6 * s <= 8 * e.length ? n.push(t.charAt(r >>> 6 * (3 - s) &
8799 63)) : n.push("=");
8800 return n.join("")
8801 },
8802 base64ToBytes: function(e) {
8803 e = e.replace(/[^A-Z0-9+\/]/gi, "");
8804 for (var n = [], i = 0, r = 0; i < e.length; r = ++i % 4) 0 != r && n.push(
8805 (t.indexOf(e.charAt(i - 1)) & Math.pow(2, -2 * r + 8) - 1) << 2 * r |
8806 t.indexOf(e.charAt(i)) >>> 6 - 2 * r);
8807 return n
8808 }
8809 };
8810 e.exports = n
8811 }()
8812}, function(e, t) {
8813 function n(e) {
8814 return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor
8815 .isBuffer(e)
8816 }
8817 /*!
8818 * Determine if an object is a Buffer
8819 *
8820 * @author Feross Aboukhadijeh <https://feross.org>
8821 * @license MIT
8822 */
8823 e.exports = function(e) {
8824 return null != e && (n(e) || function(e) {
8825 return "function" == typeof e.readFloatLE && "function" == typeof e.slice &&
8826 n(e.slice(0, 0))
8827 }(e) || !!e._isBuffer)
8828 }
8829}, function(e, t) {
8830 e.exports = function(e, t, n, i, r, s, a, o, c) {
8831 this.aiTypes = [{
8832 id: 0,
8833 src: "cow_1",
8834 killScore: 150,
8835 health: 500,
8836 weightM: .8,
8837 speed: 95e-5,
8838 turnSpeed: .001,
8839 scale: 72,
8840 drop: ["food", 50]
8841 }, {
8842 id: 1,
8843 src: "pig_1",
8844 killScore: 200,
8845 health: 800,
8846 weightM: .6,
8847 speed: 85e-5,
8848 turnSpeed: .001,
8849 scale: 72,
8850 drop: ["food", 80]
8851 }, {
8852 id: 2,
8853 name: "⛔Bull⛔",
8854 src: "bull_2",
8855 hostile: !0,
8856 dmg: 20,
8857 killScore: 1e3,
8858 health: 1800,
8859 weightM: .5,
8860 speed: 94e-5,
8861 turnSpeed: 74e-5,
8862 scale: 78,
8863 viewRange: 800,
8864 chargePlayer: !0,
8865 drop: ["food", 100]
8866 }, {
8867 id: 3,
8868 name: "⛔BigBull⛔",
8869 src: "bull_1",
8870 hostile: !0,
8871 dmg: 20,
8872 killScore: 2e3,
8873 health: 2800,
8874 weightM: .45,
8875 speed: .001,
8876 turnSpeed: 8e-4,
8877 scale: 90,
8878 viewRange: 900,
8879 chargePlayer: !0,
8880 drop: ["food", 400]
8881 }, {
8882 id: 4,
8883 name: "⛔WOLF⛔",
8884 src: "wolf_1",
8885 hostile: !0,
8886 dmg: 8,
8887 killScore: 500,
8888 health: 300,
8889 weightM: .45,
8890 speed: .001,
8891 turnSpeed: .002,
8892 scale: 84,
8893 viewRange: 800,
8894 chargePlayer: !0,
8895 drop: ["food", 200]
8896 }, {
8897 id: 5,
8898 name: "⛔???⛔",
8899 src: "chicken_1",
8900 dmg: 8,
8901 killScore: 2e3,
8902 noTrap: !0,
8903 health: 300,
8904 weightM: .2,
8905 speed: .0018,
8906 turnSpeed: .006,
8907 scale: 70,
8908 drop: ["food", 100]
8909 }, {
8910 id: 6,
8911 name: "⛔MOOSTAFA⛔",
8912 nameScale: 50,
8913 src: "enemy",
8914 hostile: !0,
8915 dontRun: !0,
8916 fixedSpawn: !0,
8917 spawnDelay: 6e4,
8918 noTrap: !0,
8919 colDmg: 100,
8920 dmg: 40,
8921 killScore: 8e3,
8922 health: 18e3,
8923 weightM: .4,
8924 speed: 7e-4,
8925 turnSpeed: .01,
8926 scale: 80,
8927 spriteMlt: 1.8,
8928 leapForce: .9,
8929 viewRange: 1e3,
8930 hitRange: 210,
8931 hitDelay: 1e3,
8932 chargePlayer: !0,
8933 drop: ["food", 100]
8934 }, {
8935 id: 7,
8936 name: "⛔Chest⛔",
8937 hostile: !0,
8938 nameScale: 35,
8939 src: "crate_1",
8940 fixedSpawn: !0,
8941 spawnDelay: 12e4,
8942 colDmg: 200,
8943 killScore: 5e3,
8944 health: 2e4,
8945 weightM: .1,
8946 speed: 0,
8947 turnSpeed: 0,
8948 scale: 70,
8949 spriteMlt: 1
8950 }, {
8951 id: 8,
8952 name: "⛔Mad Wolf⛔",
8953 src: "wolf_2",
8954 hostile: !0,
8955 fixedSpawn: !0,
8956 dontRun: !0,
8957 hitScare: 4,
8958 spawnDelay: 3e4,
8959 noTrap: !0,
8960 nameScale: 35,
8961 dmg: 10,
8962 colDmg: 100,
8963 killScore: 3e3,
8964 health: 7e3,
8965 weightM: .45,
8966 speed: .0015,
8967 turnSpeed: .002,
8968 scale: 90,
8969 viewRange: 800,
8970 chargePlayer: !0,
8971 drop: ["food", 1e3]
8972 }], this.spawn = function(l, h, u, f) {
8973 for (var d, p = 0; p < e.length; ++p)
8974 if (!e[p].active) {
8975 d = e[p];
8976 break
8977 }
8978 return d || (d = new t(e.length, r, n, i, a, s, o, c), e.push(d)), d.init(
8979 l, h, u, f, this.aiTypes[f]), d
8980 }
8981 }
8982}, function(e, t) {
8983 var n = 2 * Math.PI;
8984 e.exports = function(e, t, i, r, s, a, o, c) {
8985 this.sid = e, this.isAI = !0, this.nameIndex = s.randInt(0, a.cowNames.length -
8986 1), this.init = function(e, t, n, i, r) {
8987 this.x = e, this.y = t, this.startX = r.fixedSpawn ? e : null, this.startY =
8988 r.fixedSpawn ? t : null, this.xVel = 0, this.yVel = 0, this.zIndex = 0,
8989 this.dir = n, this.dirPlus = 0, this.index = i, this.src = r.src, r.name &&
8990 (this.name = r.name), this.weightM = r.weightM, this.speed = r.speed,
8991 this.killScore = r.killScore, this.turnSpeed = r.turnSpeed, this.scale =
8992 r.scale, this.maxHealth = r.health, this.leapForce = r.leapForce, this.health =
8993 this.maxHealth, this.chargePlayer = r.chargePlayer, this.viewRange = r.viewRange,
8994 this.drop = r.drop, this.dmg = r.dmg, this.hostile = r.hostile, this.dontRun =
8995 r.dontRun, this.hitRange = r.hitRange, this.hitDelay = r.hitDelay, this
8996 .hitScare = r.hitScare, this.spriteMlt = r.spriteMlt, this.nameScale =
8997 r.nameScale, this.colDmg = r.colDmg, this.noTrap = r.noTrap, this.spawnDelay =
8998 r.spawnDelay, this.hitWait = 0, this.waitCount = 1e3, this.moveCount =
8999 0, this.targetDir = 0, this.active = !0, this.alive = !0, this.runFrom =
9000 null, this.chargeTarget = null, this.dmgOverTime = {}
9001 };
9002 var l = 0;
9003 this.update = function(e) {
9004 if (this.active) {
9005 if (this.spawnCounter) return this.spawnCounter -= e, void(this.spawnCounter <=
9006 0 && (this.spawnCounter = 0, this.x = this.startX || s.randInt(0, a.mapScale),
9007 this.y = this.startY || s.randInt(0, a.mapScale)));
9008 (l -= e) <= 0 && (this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime
9009 .dmg, this.dmgOverTime.doer), this.dmgOverTime.time -= 1, this.dmgOverTime
9010 .time <= 0 && (this.dmgOverTime.dmg = 0)), l = 1e3);
9011 var r = !1,
9012 o = 1;
9013 if (!this.zIndex && !this.lockMove && this.y >= a.mapScale / 2 - a.riverWidth /
9014 2 && this.y <= a.mapScale / 2 + a.riverWidth / 2 && (o = .33, this.xVel +=
9015 a.waterCurrent * e), this.lockMove) this.xVel = 0, this.yVel = 0;
9016 else if (this.waitCount > 0) {
9017 if (this.waitCount -= e, this.waitCount <= 0)
9018 if (this.chargePlayer) {
9019 for (var h, u, f, d = 0; d < i.length; ++d) !i[d].alive || i[d].skin &&
9020 i[d].skin.bullRepel || (f = s.getDistance(this.x, this.y, i[d].x, i[
9021 d].y)) <= this.viewRange && (!h || f < u) && (u = f, h = i[d]);
9022 h ? (this.chargeTarget = h, this.moveCount = s.randInt(8e3, 12e3)) :
9023 (this.moveCount = s.randInt(1e3, 2e3), this.targetDir = s.randFloat(-
9024 Math.PI, Math.PI))
9025 } else this.moveCount = s.randInt(4e3, 1e4), this.targetDir = s.randFloat(-
9026 Math.PI, Math.PI)
9027 } else if (this.moveCount > 0) {
9028 var p = this.speed * o;
9029 if (this.runFrom && this.runFrom.active && (!this.runFrom.isPlayer ||
9030 this.runFrom.alive) ? (this.targetDir = s.getDirection(this.x, this.y,
9031 this.runFrom.x, this.runFrom.y), p *= 1.42) : this.chargeTarget &&
9032 this.chargeTarget.alive && (this.targetDir = s.getDirection(this.chargeTarget
9033 .x, this.chargeTarget.y, this.x, this.y), p *= 1.75, r = !0), this.hitWait &&
9034 (p *= .3), this.dir != this.targetDir) {
9035 this.dir %= n;
9036 var g = (this.dir - this.targetDir + n) % n,
9037 m = Math.min(Math.abs(g - n), g, this.turnSpeed * e),
9038 y = g - Math.PI >= 0 ? 1 : -1;
9039 this.dir += y * m + n
9040 }
9041 this.dir %= n, this.xVel += p * e * Math.cos(this.dir), this.yVel += p *
9042 e * Math.sin(this.dir), this.moveCount -= e, this.moveCount <= 0 && (
9043 this.runFrom = null, this.chargeTarget = null, this.waitCount = this
9044 .hostile ? 1500 : s.randInt(1500, 6e3))
9045 }
9046 this.zIndex = 0, this.lockMove = !1;
9047 var k = s.getDistance(0, 0, this.xVel * e, this.yVel * e),
9048 v = Math.min(4, Math.max(1, Math.round(k / 40))),
9049 w = 1 / v;
9050 for (d = 0; d < v; ++d) {
9051 this.xVel && (this.x += this.xVel * e * w), this.yVel && (this.y +=
9052 this.yVel * e * w), M = t.getGridArrays(this.x, this.y, this.scale);
9053 for (var b = 0; b < M.length; ++b)
9054 for (var x = 0; x < M[b].length; ++x) M[b][x].active && t.checkCollision(
9055 this, M[b][x], w)
9056 }
9057 var S, T, I, E = !1;
9058 if (this.hitWait > 0 && (this.hitWait -= e, this.hitWait <= 0)) {
9059 E = !0, this.hitWait = 0, this.leapForce && !s.randInt(0, 2) && (this.xVel +=
9060 this.leapForce * Math.cos(this.dir), this.yVel += this.leapForce *
9061 Math.sin(this.dir));
9062 for (var M = t.getGridArrays(this.x, this.y, this.hitRange), A = 0; A <
9063 M.length; ++A)
9064 for (b = 0; b < M[A].length; ++b)(S = M[A][b]).health && (T = s.getDistance(
9065 this.x, this.y, S.x, S.y)) < S.scale + this.hitRange && (S.changeHealth(
9066 5 * -this.dmg) && t.disableObj(S), t.hitObj(S, s.getDirection(this
9067 .x, this.y, S.x, S.y)));
9068 for (b = 0; b < i.length; ++b) i[b].canSee(this) && c.send(i[b].id,
9069 "aa", this.sid)
9070 }
9071 if (r || E)
9072 for (d = 0; d < i.length; ++d)(S = i[d]) && S.alive && (T = s.getDistance(
9073 this.x, this.y, S.x, S.y), this.hitRange ? !this.hitWait && T <=
9074 this.hitRange + S.scale && (E ? (I = s.getDirection(S.x, S.y, this.x,
9075 this.y), S.changeHealth(-this.dmg), S.xVel += .6 * Math.cos(I), S
9076 .yVel += .6 * Math.sin(I), this.runFrom = null, this.chargeTarget =
9077 null, this.waitCount = 3e3, this.hitWait = s.randInt(0, 2) ? 0 :
9078 600) : this.hitWait = this.hitDelay) : T <= this.scale + S.scale &&
9079 (I = s.getDirection(S.x, S.y, this.x, this.y), S.changeHealth(-this.dmg),
9080 S.xVel += .55 * Math.cos(I), S.yVel += .55 * Math.sin(I)));
9081 this.xVel && (this.xVel *= Math.pow(a.playerDecel, e)), this.yVel && (
9082 this.yVel *= Math.pow(a.playerDecel, e));
9083 var P = this.scale;
9084 this.x - P < 0 ? (this.x = P, this.xVel = 0) : this.x + P > a.mapScale &&
9085 (this.x = a.mapScale - P, this.xVel = 0), this.y - P < 0 ? (this.y = P,
9086 this.yVel = 0) : this.y + P > a.mapScale && (this.y = a.mapScale - P,
9087 this.yVel = 0)
9088 }
9089 }, this.canSee = function(e) {
9090 if (!e) return !1;
9091 if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
9092 return !1;
9093 var t = Math.abs(e.x - this.x) - e.scale,
9094 n = Math.abs(e.y - this.y) - e.scale;
9095 return t <= a.maxScreenWidth / 2 * 1.3 && n <= a.maxScreenHeight / 2 *
9096 1.3
9097 };
9098 var h = 0,
9099 u = 0;
9100 this.animate = function(e) {
9101 this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime =
9102 0, this.dirPlus = 0, h = 0, u = 0) : 0 == u ? (h += e / (this.animSpeed *
9103 a.hitReturnRatio), this.dirPlus = s.lerp(0, this.targetAngle, Math.min(
9104 1, h)), h >= 1 && (h = 1, u = 1)) : (h -= e / (this.animSpeed * (1 -
9105 a.hitReturnRatio)), this.dirPlus = s.lerp(0, this.targetAngle, Math.max(
9106 0, h))))
9107 }, this.startAnim = function() {
9108 this.animTime = this.animSpeed = 600, this.targetAngle = .8 * Math.PI, h =
9109 0, u = 0
9110 }, this.changeHealth = function(e, t, n) {
9111 if (this.active && (this.health += e, n && (this.hitScare && !s.randInt(
9112 0, this.hitScare) ? (this.runFrom = n, this.waitCount = 0, this.moveCount =
9113 2e3) : this.hostile && this.chargePlayer && n.isPlayer ? (this.chargeTarget =
9114 n, this.waitCount = 0, this.moveCount = 8e3) : this.dontRun || (this
9115 .runFrom = n, this.waitCount = 0, this.moveCount = 2e3)), e < 0 &&
9116 this.hitRange && s.randInt(0, 1) && (this.hitWait = 500), t && t.canSee(
9117 this) && e < 0 && c.send(t.id, "t", Math.round(this.x), Math.round(
9118 this.y), Math.round(-e), 1), this.health <= 0 && (this.spawnDelay ? (
9119 this.spawnCounter = this.spawnDelay, this.x = -1e6, this.y = -1e6) :
9120 (this.x = this.startX || s.randInt(0, a.mapScale), this.y = this.startY ||
9121 s.randInt(0, a.mapScale)), this.health = this.maxHealth, this.runFrom =
9122 null, t && (o(t, this.killScore), this.drop))))
9123 for (var i = 0; i < this.drop.length;) t.addResource(a.resourceTypes.indexOf(
9124 this.drop[i]), this.drop[i + 1]), i += 2
9125 }
9126 }
9127}]);
9128//# sourceMappingURL=bundle.js.map
9129Parse();
9130
9131///⣿⣿⣿⣿⣿⣿⣟⣷⣿⣿⣿⡀⠹⣟⣾⣟⣆⠹⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢠⡘⣿⣿⡄⠉⢿⣿⣽⡷⣿⣻⣿⣿⣿⣿â¡â£·â£¯â¢¿â£¿
9132///⣿⣿⣿⣿⣿⣿⣯⢿⣾⢿⣿⡄⢄⠘⢿⣞⡿⣧⡈⢷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣧⠘⣿⣷⠈⣦⠙⢿⣽⣷⣻⣽⣿⣿⣿⣿⣌⢿⣯⢿
9133///⣿⣿⣿⣿⣿⣿⣟⣯⣿⢿⣿⡆⢸⡷⡈⢻⡽⣷⡷⡄⠻⣽⣿⣿⡿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿â£â¢°â£¯â¢·â ˆâ£¿â¡†â¢¹â¢·â¡Œâ »â¡¾â¢‹â£±â£¯â£¿â£¿â£¿â£¿â¡†â¢»â¡¿
9134///⣿⣿⣿⣿⣿⣿⡎⣿⢾⡿⣿⡆⢸⣽⢻⣄⠹⣷⣟⣿⣄⠹⣟⣿⣿⣟⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⡇⢸⣯⣟⣧⠘⣷⠈⡯⠛⢀â¡â¢¾â£Ÿâ£·â£»â£¿â£¿â£¿â¡¿â¡Œâ¢¿
9135///⣿⣿⣿⣿⣿⣿⣧⢸⡿⣟⣿⡇⢸⣯⣟⣮⢧⡈⢿⣞⡿⣦⠘â s⣹⣿⣽⢿⣿⣿⣿⣿⣯⣿⣿⣿⡇⢸⣿⣿⣾⡆⠹⢀⣠⣾⣟⣷⡈⢿⣞⣯⢿⣿⣿⣿⢷⠘
9136///⣿⣿⣿⣿⣿⣿⣿⡈⣿⢿⣽⡇⠘⠛⠛⠛⠓⠓⠈⠛⠛⠟⠇⢀⢿⣻⣿⣯⢿⣿⣿⣿⣷⢿⣿⣿â ⣾⣿⣿⣿⣧⡄⠇⣹⣿⣾⣯⣿⡄⠻⣽⣯⢿⣻⣿⣿⡇
9137///⣿⣿⣿⣿⣿⣿⣿⡇⢹⣿⡽⡇⢸⣿⣿⣿⣿⣿⣞⣆⠰⣶⣶⡄⢀⢻⡿⣯⣿⡽⣿⣿⣿⢯⣟⡿⢀⣿⣿⣿⣿⣿⣧â ⣸⣿⣿⣷⣿⣿⣆⠹⣯⣿⣻⣿⣿⣿
9138///⣿⣿⣿⣿⣿⣿⣿⣿⠘⣯⡿⡇⢸⣿⣿⣿⣿⣿⣿⣿⣧⡈⢿⣳⠘⡄⠻⣿⢾⣽⣟⡿⣿⢯⣿⡇⢸⣿⣿⣿⣿⣿⣿⡀⢾⣿⣿⣿⣿⣿⣿⣆⠹⣾⣷⣻⣿⡿
9139///⣿⣿⣿⣿⣿⣿⣿⣿⡇⢹⣿⠇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠻⡇⢹⣆⠹⣟⣾⣽⣻⣟⣿⣽â ⣾⣿⣿⣿⣿⣿⣿⣇⣿⣿⠿⠛⠛⠉⠙⠋⢀â ⢘⣯⣿⣿
9140///⣿⣿⣿⣿⣿⣿⣿⣿⣿⡈⣿⡃⢼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡙⠌⣿⣆⠘⣿⣞⡿⣞⡿⡞⢠⣿⣿⣿⣿⣿⡿⠛⠉â ⢀⣀⣠⣤⣤⣶⣶⣶⡆⢻⣽⣞⡿
9141///⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠘â ⠉⠉⠉⠉⠉⠉⠉⠉⠉⠙⠛⠛⢿⣄⢻⣿⣧⠘⢯⣟⡿⣽â ⣾⣿⣿⣿⣿⣿⡃⢀⢀⠘⠛⠿⢿⣻⣟⣯⣽⣻⣵⡀⢿⣯⣟
9142///⣿⣿⣿⣟⣿⣿⣿⣿⣶⣶⡆⢀⣿⣾⣿⣾⣷⣿⣶⠿⠚⠉⢀⢀⣤⣿⣷⣿⣿⣷⡈⢿⣻⢃⣼⣿⣿⣿⣿⣻⣿⣿⣿⡶⣦⣤⣄⣀⡀⠉⠛⠛⠷⣯⣳⠈⣾⡽
9143///⣿⢿⣿⣿⣻⣿⣿⣿⣿⣿⡿â ⣿⣿⣿⣿⠿⠋â ⢀⢀⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣌⣥⣾⡿⣿⣿⣷⣿⣿⢿⣷⣿⣿⣟⣾⣽⣳⢯⣟⣶⣦⣤⡾⣟⣦⠘⣿
9144///⣿⣻⣿⣿⡷⣿⣿⣿⣿⣿⡗⣦⠸⡿⠋â ⢀⢀⣠⣴⢿⣿⣽⣻⢽⣾⣟⣷⣿⣟⣿⣿⣿⣳⠿⣵⣧⣼⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⣿⣽⣳⣯⣿⣿⣿⣽⢀⢷
9145///⣿⢷⣻⣿⣿⣷⣻⣿⣿⣿⡷⠛â£â¢€â£€â£¤â£¶â£¿â£›â¡¿â£¿â£®â£½â¡»â£¿â£®â£½â£»â¢¯â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¯â¢€â¢¸
9146///⠸⣟⣯⣿⣿⣷⢿⣽⣿⣿⣷⣿⣷⣆⠹⣿⣶⣯⠿⣿⣶⣟⣻⢿⣷⣽⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢀⣯
9147///⣇⠹⣟⣾⣻⣿⣿⢾⡽⣿⣿⣿⣿⣿⣆⢹⣶⣿⣻⣷⣯⣟⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢀⡿
9148///⣿⣆⠹⣷⡻⣽⣿⣯⢿⣽⣻⣿⣿⣿⣿⣆⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⢸⣿
9149///⡙⠾⣆⠹⣿⣦⠛⣿⢯⣷⢿⡽⣿⣿⣿⣿⣆⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠎⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿â ⢀⣿⣾
9150///⣿⣷⡌⢦⠙⣿⣿⣌⠻⣽⢯⣿⣽⣻⣿⣿⣿⣧⠩⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿â¡â¢°â¢£â ˜â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â£¿â¡¿â ƒâ¢€â¢€â¢¿â£ž
9151///⣿⣽⣆⠹⣧⠘⣿⣿⡷⣌⠙⢷⣯⡷⣟⣿⣿⣿⣷⡀⡹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣈⠃⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⢀⣴⡧⢀⠸⣿
9152///⢻⣽⣿⡄⢻⣷⡈⢿⣿⣿⢧⢀⠙⢿⣻⡾⣽⣻⣿⣿⣄⠌⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛â¢â£°â£¾â£Ÿâ¡¿â¢€â¡„⢿
9153///⡄⢿⣿⣷⢀⠹⣟⣆⠻⣿⣿⣆⢀⣀⠉⠻⣿⡽⣯⣿⣿⣷⣈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⢀⣠⠘⣯⣷⣿⡟⢀⢆⠸
9154///⣷⡈⢿⣿⣇⢱⡘⢿⣷⣬⣙⠿⣧⠘⣆⢀⠈⠻⣷⣟⣾⢿⣿⣆⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⣠⡞⢡⣿⢀⣿⣿⣿⠇⡄⢸⡄
9155///⣿⣷⡈⢿⣿⡆⢣⡀⠙⢾⣟⣿⣿⣷⡈⠂⠘⣦⡈⠿⣯⣿⢾⣿⣆⠙⠻⠿⠿⠿⠿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢋⣠⣾⡟⢠⣿⣿⢀⣿⣿⡟⢠⣿⢈⣧
9156///⣿⣿⣿⣄⠻⣿⡄⢳⡄⢆⡙⠾⣽⣿⣿⣆⡀⢹⡷⣄⠙⢿⣿⡾⣿⣆⢀⡀⢀⢀⢀⢀⢀⢀⢀⢀⢀⢀⢀⢀⣀⣠⣴⡿⣯â ⣠⣿⣿â¡â¢¸â£¿â¡¿â¢â£¿â£¿â¢€â£¿
9157///⣿⣿⣿⣿⣦⡙⣿⣆⢻⡌⢿⣶⢤⣉⣙⣿⣷⡀⠙⠽⠷⠄⠹⣿⣟⣿⣆⢙⣋⣤⣤⣤⣄⣀⢀⢀⢀⢀⣾⣿⣟⡷⣯⡿⢃⣼⣿⣿⣿⠇⣼⡟⣡⣿⣿⣿⢀⡿
9158///⣿⣿⣿⣿⣿⣷⣮⣿⣿⣿⡌â ⢤⣤⣤⣤⣬â£â£´â£¶â£¶â£¶â£†â ˆâ¢»â£¿â£¿â£†â¢»â£¿â£¿â£¿â£¿â£¿â£¿â£·â£¶â£¤â£Œâ£‰â¡˜â ›â »â ¶â£¿â£¿â£¿â£¿â¡Ÿâ£°â£«â£´â£¿â£¿â£¿â£¿â „⣷
9159