· 5 years ago · Nov 22, 2020, 08:38 PM
1// ==UserScript==
2// @name StormZ is Trash
3// @namespace -
4// @version 1
5// @description -
6// @author By someone, to StormZ, if you're seeing this, fuck you, this just got leaked.
7// @match *://moomoo.io/*
8// @match *://sandbox.moomoo.io/*
9// @grant none
10// @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723
11// @require http://code.jquery.com/jquery-3.3.1.min.js
12// @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
13// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
14// ==/UserScript==
15
16/* EVERYONE, just so you know, StormZ's mom died,
17he can't afford a mouse or a computer, he macros, and that's all he does,
18thanks, and spread this SHIT around, please. */
19
20var namecolor = "#ffffff"
21var idname = " "
22var currenthat = "none"
23var HP = 6
24var HP1 = 34
25var enemyRadar = 3;
26var animalRadar = 3;
27var killerRadar = 3;
28var leaderRadar = 3;
29var clanRadar = 3;
30var animalcolor = "#0017FF"
31var killercolor = "#ff0000"
32var leadercolor = "#E0FF00"
33var clancolor = "#00FF13"
34var Healthbarcolor = "#8ecc51"
35var Healthbarcolor2 = "#cc5151"
36
37
38var EnemyTracer = "#000000"
39var KillerTracer = "#ff0000"
40var LeaderTracer = "#E0FF00"
41
42! function (e) {
43 var t = {};
44
45 function n(i) {
46 if (t[i]) return t[i].exports;
47 var r = t[i] = {
48 i: i,
49 l: !1,
50 exports: {}
51 };
52 return e[i].call(r.exports, r, r.exports, n), r.l = !0, r.exports
53 }
54 n.m = e, n.c = t, n.d = function (e, t, i) {
55 n.o(e, t) || Object.defineProperty(e, t, {
56 enumerable: !0,
57 get: i
58 })
59 }, n.r = function (e) {
60 "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
61 value: "Module"
62 }), Object.defineProperty(e, "__esModule", {
63 value: !0
64 })
65 }, n.t = function (e, t) {
66 if (1 & t && (e = n(e)), 8 & t) return e;
67 if (4 & t && "object" == typeof e && e && e.__esModule) return e;
68 var i = Object.create(null);
69 if (n.r(i), Object.defineProperty(i, "default", {
70 enumerable: !0,
71 value: e
72 }), 2 & t && "string" != typeof e)
73 for (var r in e) n.d(i, r, function (t) {
74 return e[t]
75 }.bind(null, r));
76 return i
77 }, n.n = function (e) {
78 var t = e && e.__esModule ? function () {
79 return e.default
80 } : function () {
81 return e
82 };
83 return n.d(t, "a", t), t
84 }, n.o = function (e, t) {
85 return Object.prototype.hasOwnProperty.call(e, t)
86 }, n.p = "", n(n.s = 21)
87}([function (e, t, n) {
88 var i = t.global = n(25),
89 r = t.hasBuffer = i && !!i.isBuffer,
90 s = t.hasArrayBuffer = "undefined" != typeof ArrayBuffer,
91 a = t.isArray = n(5);
92 t.isArrayBuffer = s ? function (e) {
93 return e instanceof ArrayBuffer || p(e)
94 } : m;
95 var o = t.isBuffer = r ? i.isBuffer : m,
96 c = t.isView = s ? ArrayBuffer.isView || y("ArrayBuffer", "buffer") : m;
97 t.alloc = d, t.concat = function (e, n) {
98 n || (n = 0, Array.prototype.forEach.call(e, (function (e) {
99 n += e.length
100 })));
101 var i = this !== t && this || e[0],
102 r = d.call(i, n),
103 s = 0;
104 return Array.prototype.forEach.call(e, (function (e) {
105 s += f.copy.call(e, r, s)
106 })), r
107 }, t.from = function (e) {
108 return "string" == typeof e ? function (e) {
109 var t = 3 * e.length,
110 n = d.call(this, t),
111 i = f.write.call(n, e);
112 return t !== i && (n = f.slice.call(n, 0, i)), n
113 }.call(this, e) : g(this).from(e)
114 };
115 var l = t.Array = n(28),
116 h = t.Buffer = n(29),
117 u = t.Uint8Array = n(30),
118 f = t.prototype = n(6);
119
120 function d(e) {
121 return g(this).alloc(e)
122 }
123 var p = y("ArrayBuffer");
124
125 function g(e) {
126 return o(e) ? h : c(e) ? u : a(e) ? l : r ? h : s ? u : l
127 }
128
129 function m() {
130 return !1
131 }
132
133 function y(e, t) {
134 return e = "[object " + e + "]",
135 function (n) {
136 return null != n && {}.toString.call(t ? n[t] : n) === e
137 }
138 }
139}, function (e, t, n) {
140 var i = n(5);
141 t.createCodec = o, t.install = function (e) {
142 for (var t in e) s.prototype[t] = a(s.prototype[t], e[t])
143 }, t.filter = function (e) {
144 return i(e) ? function (e) {
145 return e = e.slice(),
146 function (n) {
147 return e.reduce(t, n)
148 };
149
150 function t(e, t) {
151 return t(e)
152 }
153 }(e) : e
154 };
155 var r = n(0);
156
157 function s(e) {
158 if (!(this instanceof s)) return new s(e);
159 this.options = e, this.init()
160 }
161
162 function a(e, t) {
163 return e && t ? function () {
164 return e.apply(this, arguments), t.apply(this, arguments)
165 } : e || t
166 }
167
168 function o(e) {
169 return new s(e)
170 }
171 s.prototype.init = function () {
172 var e = this.options;
173 return e && e.uint8array && (this.bufferish = r.Uint8Array), this
174 }, t.preset = o({
175 preset: !0
176 })
177}, function (e, t, n) {
178 var i = n(3).ExtBuffer,
179 r = n(32),
180 s = n(33),
181 a = n(1);
182
183 function o() {
184 var e = this.options;
185 return this.encode = function (e) {
186 var t = s.getWriteType(e);
187 return function (e, n) {
188 var i = t[typeof n];
189 if (!i) throw new Error('Unsupported type "' + typeof n + '": ' + n);
190 i(e, n)
191 }
192 }(e), e && e.preset && r.setExtPackers(this), this
193 }
194 a.install({
195 addExtPacker: function (e, t, n) {
196 n = a.filter(n);
197 var r = t.name;
198 r && "Object" !== r ? (this.extPackers || (this.extPackers = {}))[r] = s : (this.extEncoderList || (this.extEncoderList = [])).unshift([t, s]);
199
200 function s(t) {
201 return n && (t = n(t)), new i(t, e)
202 }
203 },
204 getExtPacker: function (e) {
205 var t = this.extPackers || (this.extPackers = {}),
206 n = e.constructor,
207 i = n && n.name && t[n.name];
208 if (i) return i;
209 for (var r = this.extEncoderList || (this.extEncoderList = []), s = r.length, a = 0; a < s; a++) {
210 var o = r[a];
211 if (n === o[0]) return o[1]
212 }
213 },
214 init: o
215 }), t.preset = o.call(a.preset)
216}, function (e, t, n) {
217 t.ExtBuffer = function e(t, n) {
218 if (!(this instanceof e)) return new e(t, n);
219 this.buffer = i.from(t), this.type = n
220 };
221 var i = n(0)
222 }, function (e, t) {
223 t.read = function (e, t, n, i, r) {
224 var s, a, o = 8 * r - i - 1,
225 c = (1 << o) - 1,
226 l = c >> 1,
227 h = -7,
228 u = n ? r - 1 : 0,
229 f = n ? -1 : 1,
230 d = e[t + u];
231 for (u += f, s = d & (1 << -h) - 1, d >>= -h, h += o; h > 0; s = 256 * s + e[t + u], u += f, h -= 8);
232 for (a = s & (1 << -h) - 1, s >>= -h, h += i; h > 0; a = 256 * a + e[t + u], u += f, h -= 8);
233 if (0 === s) s = 1 - l;
234 else {
235 if (s === c) return a ? NaN : 1 / 0 * (d ? -1 : 1);
236 a += Math.pow(2, i), s -= l
237 }
238 return (d ? -1 : 1) * a * Math.pow(2, s - i)
239 }, t.write = function (e, t, n, i, r, s) {
240 var a, o, c, l = 8 * s - r - 1,
241 h = (1 << l) - 1,
242 u = h >> 1,
243 f = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
244 d = i ? 0 : s - 1,
245 p = i ? 1 : -1,
246 g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
247 for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0, a = h) : (a = Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -a)) < 1 && (a--, c *= 2), (t += a + u >= 1 ? f / c : f * Math.pow(2, 1 - u)) * c >= 2 && (a++, c /= 2), a + u >= h ? (o = 0, a = h) : a + u >= 1 ? (o = (t * c - 1) * Math.pow(2, r), a += u) : (o = t * Math.pow(2, u - 1) * Math.pow(2, r), a = 0)); r >= 8; e[n + d] = 255 & o, d += p, o /= 256, r -= 8);
248 for (a = a << r | o, l += r; l > 0; e[n + d] = 255 & a, d += p, a /= 256, l -= 8);
249 e[n + d - p] |= 128 * g
250 }
251 }, function (e, t) {
252 var n = {}.toString;
253 e.exports = Array.isArray || function (e) {
254 return "[object Array]" == n.call(e)
255 }
256 }, function (e, t, n) {
257 var i = n(31);
258 t.copy = c, t.slice = l, t.toString = function (e, t, n) {
259 return (!a && r.isBuffer(this) ? this.toString : i.toString).apply(this, arguments)
260 }, t.write = function (e) {
261 return function () {
262 return (this[e] || i[e]).apply(this, arguments)
263 }
264 }("write");
265 var r = n(0),
266 s = r.global,
267 a = r.hasBuffer && "TYPED_ARRAY_SUPPORT" in s,
268 o = a && !s.TYPED_ARRAY_SUPPORT;
269
270 function c(e, t, n, s) {
271 var a = r.isBuffer(this),
272 c = r.isBuffer(e);
273 if (a && c) return this.copy(e, t, n, s);
274 if (o || a || c || !r.isView(this) || !r.isView(e)) return i.copy.call(this, e, t, n, s);
275 var h = n || null != s ? l.call(this, n, s) : this;
276 return e.set(h, t), h.length
277 }
278
279 function l(e, t) {
280 var n = this.slice || !o && this.subarray;
281 if (n) return n.call(this, e, t);
282 var i = r.alloc.call(this, t - e);
283 return c.call(this, i, 0, e, t), i
284 }
285 }, function (e, t, n) {
286 (function (e) {
287 ! function (t) {
288 var n, i = "undefined",
289 r = i !== typeof e && e,
290 s = i !== typeof Uint8Array && Uint8Array,
291 a = i !== typeof ArrayBuffer && ArrayBuffer,
292 o = [0, 0, 0, 0, 0, 0, 0, 0],
293 c = Array.isArray || function (e) {
294 return !!e && "[object Array]" == Object.prototype.toString.call(e)
295 },
296 l = 4294967296;
297
298 function h(e, c, h) {
299 var b = c ? 0 : 4,
300 x = c ? 4 : 0,
301 S = c ? 0 : 3,
302 T = c ? 1 : 2,
303 I = c ? 2 : 1,
304 E = c ? 3 : 0,
305 M = c ? y : v,
306 A = c ? k : w,
307 P = O.prototype,
308 B = "is" + e,
309 C = "_" + B;
310 return P.buffer = void 0, P.offset = 0, P[C] = !0, P.toNumber = R, P.toString = function (e) {
311 var t = this.buffer,
312 n = this.offset,
313 i = _(t, n + b),
314 r = _(t, n + x),
315 s = "",
316 a = !h && 2147483648 & i;
317 for (a && (i = ~i, r = l - r), e = e || 10;;) {
318 var o = i % e * l + r;
319 if (i = Math.floor(i / e), r = Math.floor(o / e), s = (o % e).toString(e) + s, !i && !r) break
320 }
321 return a && (s = "-" + s), s
322 }, P.toJSON = R, P.toArray = u, r && (P.toBuffer = f), s && (P.toArrayBuffer = d), O[B] = function (e) {
323 return !(!e || !e[C])
324 }, t[e] = O, O;
325
326 function O(e, t, r, c) {
327 return this instanceof O ? function (e, t, r, c, h) {
328 if (s && a && (t instanceof a && (t = new s(t)), c instanceof a && (c = new s(c))), t || r || c || n) {
329 if (!p(t, r)) h = r, c = t, r = 0, t = new(n || Array)(8);
330 e.buffer = t, e.offset = r |= 0, i !== typeof c && ("string" == typeof c ? function (e, t, n, i) {
331 var r = 0,
332 s = n.length,
333 a = 0,
334 o = 0;
335 "-" === n[0] && r++;
336 for (var c = r; r < s;) {
337 var h = parseInt(n[r++], i);
338 if (!(h >= 0)) break;
339 o = o * i + h, a = a * i + Math.floor(o / l), o %= l
340 }
341 c && (a = ~a, o ? o = l - o : a++), j(e, t + b, a), j(e, t + x, o)
342 }(t, r, c, h || 10) : p(c, h) ? g(t, r, c, h) : "number" == typeof h ? (j(t, r + b, c), j(t, r + x, h)) : c > 0 ? M(t, r, c) : c < 0 ? A(t, r, c) : g(t, r, o, 0))
343 } else e.buffer = m(o, 0)
344 }(this, e, t, r, c) : new O(e, t, r, c)
345 }
346
347 function R() {
348 var e = this.buffer,
349 t = this.offset,
350 n = _(e, t + b),
351 i = _(e, t + x);
352 return h || (n |= 0), n ? n * l + i : i
353 }
354
355 function j(e, t, n) {
356 e[t + E] = 255 & n, n >>= 8, e[t + I] = 255 & n, n >>= 8, e[t + T] = 255 & n, n >>= 8, e[t + S] = 255 & n
357 }
358
359 function _(e, t) {
360 return 16777216 * e[t + S] + (e[t + T] << 16) + (e[t + I] << 8) + e[t + E]
361 }
362 }
363
364 function u(e) {
365 var t = this.buffer,
366 i = this.offset;
367 return n = null, !1 !== e && 0 === i && 8 === t.length && c(t) ? t : m(t, i)
368 }
369
370 function f(t) {
371 var i = this.buffer,
372 s = this.offset;
373 if (n = r, !1 !== t && 0 === s && 8 === i.length && e.isBuffer(i)) return i;
374 var a = new r(8);
375 return g(a, 0, i, s), a
376 }
377
378 function d(e) {
379 var t = this.buffer,
380 i = this.offset,
381 r = t.buffer;
382 if (n = s, !1 !== e && 0 === i && r instanceof a && 8 === r.byteLength) return r;
383 var o = new s(8);
384 return g(o, 0, t, i), o.buffer
385 }
386
387 function p(e, t) {
388 var n = e && e.length;
389 return t |= 0, n && t + 8 <= n && "string" != typeof e[t]
390 }
391
392 function g(e, t, n, i) {
393 t |= 0, i |= 0;
394 for (var r = 0; r < 8; r++) e[t++] = 255 & n[i++]
395 }
396
397 function m(e, t) {
398 return Array.prototype.slice.call(e, t, t + 8)
399 }
400
401 function y(e, t, n) {
402 for (var i = t + 8; i > t;) e[--i] = 255 & n, n /= 256
403 }
404
405 function k(e, t, n) {
406 var i = t + 8;
407 for (n++; i > t;) e[--i] = 255 & -n ^ 255, n /= 256
408 }
409
410 function v(e, t, n) {
411 for (var i = t + 8; t < i;) e[t++] = 255 & n, n /= 256
412 }
413
414 function w(e, t, n) {
415 var i = t + 8;
416 for (n++; t < i;) e[t++] = 255 & -n ^ 255, n /= 256
417 }
418 h("Uint64BE", !0, !0), h("Int64BE", !0, !1), h("Uint64LE", !1, !0), h("Int64LE", !1, !1)
419 }("string" != typeof t.nodeName ? t : this || {})
420 }).call(this, n(11).Buffer)
421 }, function (e, t, n) {
422 var i = n(3).ExtBuffer,
423 r = n(35),
424 s = n(17).readUint8,
425 a = n(36),
426 o = n(1);
427
428 function c() {
429 var e = this.options;
430 return this.decode = function (e) {
431 var t = a.getReadToken(e);
432 return function (e) {
433 var n = s(e),
434 i = t[n];
435 if (!i) throw new Error("Invalid type: " + (n ? "0x" + n.toString(16) : n));
436 return i(e)
437 }
438 }(e), e && e.preset && r.setExtUnpackers(this), this
439 }
440 o.install({
441 addExtUnpacker: function (e, t) {
442 (this.extUnpackers || (this.extUnpackers = []))[e] = o.filter(t)
443 },
444 getExtUnpacker: function (e) {
445 return (this.extUnpackers || (this.extUnpackers = []))[e] || function (t) {
446 return new i(t, e)
447 }
448 },
449 init: c
450 }), t.preset = c.call(o.preset)
451 }, function (e, t, n) {
452 t.encode = function (e, t) {
453 var n = new i(t);
454 return n.write(e), n.read()
455 };
456 var i = n(10).EncodeBuffer
457 }, function (e, t, n) {
458 t.EncodeBuffer = r;
459 var i = n(2).preset;
460
461 function r(e) {
462 if (!(this instanceof r)) return new r(e);
463 if (e && (this.options = e, e.codec)) {
464 var t = this.codec = e.codec;
465 t.bufferish && (this.bufferish = t.bufferish)
466 }
467 }
468 n(14).FlexEncoder.mixin(r.prototype), r.prototype.codec = i, r.prototype.write = function (e) {
469 this.codec.encode(this, e)
470 }
471 }, function (e, t, n) {
472 "use strict";
473 (function (e) {
474 /*!
475 * The buffer module from node.js, for the browser.
476 *
477 * @author Feross Aboukhadijeh <http://feross.org>
478 * @license MIT
479 */
480 var i = n(26),
481 r = n(4),
482 s = n(27);
483
484 function a() {
485 return c.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
486 }
487
488 function o(e, t) {
489 if (a() < t) throw new RangeError("Invalid typed array length");
490 return c.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = c.prototype : (null === e && (e = new c(t)), e.length = t), e
491 }
492
493 function c(e, t, n) {
494 if (!(c.TYPED_ARRAY_SUPPORT || this instanceof c)) return new c(e, t, n);
495 if ("number" == typeof e) {
496 if ("string" == typeof t) throw new Error("If encoding is specified then the first argument must be a string");
497 return u(this, e)
498 }
499 return l(this, e, t, n)
500 }
501
502 function l(e, t, n, i) {
503 if ("number" == typeof t) throw new TypeError('"value" argument must not be a number');
504 return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ? function (e, t, n, i) {
505 if (t.byteLength, n < 0 || t.byteLength < n) throw new RangeError("'offset' is out of bounds");
506 if (t.byteLength < n + (i || 0)) throw new RangeError("'length' is out of bounds");
507 return t = void 0 === n && void 0 === i ? new Uint8Array(t) : void 0 === i ? new Uint8Array(t, n) : new Uint8Array(t, n, i), c.TYPED_ARRAY_SUPPORT ? (e = t).__proto__ = c.prototype : e = f(e, t), e
508 }(e, t, n, i) : "string" == typeof t ? function (e, t, n) {
509 if ("string" == typeof n && "" !== n || (n = "utf8"), !c.isEncoding(n)) throw new TypeError('"encoding" must be a valid string encoding');
510 var i = 0 | p(t, n),
511 r = (e = o(e, i)).write(t, n);
512 return r !== i && (e = e.slice(0, r)), e
513 }(e, t, n) : function (e, t) {
514 if (c.isBuffer(t)) {
515 var n = 0 | d(t.length);
516 return 0 === (e = o(e, n)).length || t.copy(e, 0, 0, n), e
517 }
518 if (t) {
519 if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer || "length" in t) return "number" != typeof t.length || function (e) {
520 return e != e
521 }(t.length) ? o(e, 0) : f(e, t);
522 if ("Buffer" === t.type && s(t.data)) return f(e, t.data)
523 }
524 throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")
525 }(e, t)
526 }
527
528 function h(e) {
529 if ("number" != typeof e) throw new TypeError('"size" argument must be a number');
530 if (e < 0) throw new RangeError('"size" argument must not be negative')
531 }
532
533 function u(e, t) {
534 if (h(t), e = o(e, t < 0 ? 0 : 0 | d(t)), !c.TYPED_ARRAY_SUPPORT)
535 for (var n = 0; n < t; ++n) e[n] = 0;
536 return e
537 }
538
539 function f(e, t) {
540 var n = t.length < 0 ? 0 : 0 | d(t.length);
541 e = o(e, n);
542 for (var i = 0; i < n; i += 1) e[i] = 255 & t[i];
543 return e
544 }
545
546 function d(e) {
547 if (e >= a()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a().toString(16) + " bytes");
548 return 0 | e
549 }
550
551 function p(e, t) {
552 if (c.isBuffer(e)) return e.length;
553 if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e.byteLength;
554 "string" != typeof e && (e = "" + e);
555 var n = e.length;
556 if (0 === n) return 0;
557 for (var i = !1;;) switch (t) {
558 case "ascii":
559 case "latin1":
560 case "binary":
561 return n;
562 case "utf8":
563 case "utf-8":
564 case void 0:
565 return z(e).length;
566 case "ucs2":
567 case "ucs-2":
568 case "utf16le":
569 case "utf-16le":
570 return 2 * n;
571 case "hex":
572 return n >>> 1;
573 case "base64":
574 return H(e).length;
575 default:
576 if (i) return z(e).length;
577 t = ("" + t).toLowerCase(), i = !0
578 }
579 }
580
581 function g(e, t, n) {
582 var i = e[t];
583 e[t] = e[n], e[n] = i
584 }
585
586 function m(e, t, n, i, r) {
587 if (0 === e.length) return -1;
588 if ("string" == typeof n ? (i = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (n = r ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
589 if (r) return -1;
590 n = e.length - 1
591 } else if (n < 0) {
592 if (!r) return -1;
593 n = 0
594 }
595 if ("string" == typeof t && (t = c.from(t, i)), c.isBuffer(t)) return 0 === t.length ? -1 : y(e, t, n, i, r);
596 if ("number" == typeof t) return t &= 255, c.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : y(e, [t], n, i, r);
597 throw new TypeError("val must be string, number or Buffer")
598 }
599
600 function y(e, t, n, i, r) {
601 var s, a = 1,
602 o = e.length,
603 c = t.length;
604 if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase()) || "ucs-2" === i || "utf16le" === i || "utf-16le" === i)) {
605 if (e.length < 2 || t.length < 2) return -1;
606 a = 2, o /= 2, c /= 2, n /= 2
607 }
608
609 function l(e, t) {
610 return 1 === a ? e[t] : e.readUInt16BE(t * a)
611 }
612 if (r) {
613 var h = -1;
614 for (s = n; s < o; s++)
615 if (l(e, s) === l(t, -1 === h ? 0 : s - h)) {
616 if (-1 === h && (h = s), s - h + 1 === c) return h * a
617 } else -1 !== h && (s -= s - h), h = -1
618 } else
619 for (n + c > o && (n = o - c), s = n; s >= 0; s--) {
620 for (var u = !0, f = 0; f < c; f++)
621 if (l(e, s + f) !== l(t, f)) {
622 u = !1;
623 break
624 } if (u) return s
625 }
626 return -1
627 }
628
629 function k(e, t, n, i) {
630 n = Number(n) || 0;
631 var r = e.length - n;
632 i ? (i = Number(i)) > r && (i = r) : i = r;
633 var s = t.length;
634 if (s % 2 != 0) throw new TypeError("Invalid hex string");
635 i > s / 2 && (i = s / 2);
636 for (var a = 0; a < i; ++a) {
637 var o = parseInt(t.substr(2 * a, 2), 16);
638 if (isNaN(o)) return a;
639 e[n + a] = o
640 }
641 return a
642 }
643
644 function v(e, t, n, i) {
645 return V(z(t, e.length - n), e, n, i)
646 }
647
648 function w(e, t, n, i) {
649 return V(function (e) {
650 for (var t = [], n = 0; n < e.length; ++n) t.push(255 & e.charCodeAt(n));
651 return t
652 }(t), e, n, i)
653 }
654
655 function b(e, t, n, i) {
656 return w(e, t, n, i)
657 }
658
659 function x(e, t, n, i) {
660 return V(H(t), e, n, i)
661 }
662
663 function S(e, t, n, i) {
664 return V(function (e, t) {
665 for (var n, i, r, s = [], a = 0; a < e.length && !((t -= 2) < 0); ++a) i = (n = e.charCodeAt(a)) >> 8, r = n % 256, s.push(r), s.push(i);
666 return s
667 }(t, e.length - n), e, n, i)
668 }
669
670 function T(e, t, n) {
671 return 0 === t && n === e.length ? i.fromByteArray(e) : i.fromByteArray(e.slice(t, n))
672 }
673
674 function I(e, t, n) {
675 n = Math.min(e.length, n);
676 for (var i = [], r = t; r < n;) {
677 var s, a, o, c, l = e[r],
678 h = null,
679 u = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
680 if (r + u <= n) switch (u) {
681 case 1:
682 l < 128 && (h = l);
683 break;
684 case 2:
685 128 == (192 & (s = e[r + 1])) && (c = (31 & l) << 6 | 63 & s) > 127 && (h = c);
686 break;
687 case 3:
688 s = e[r + 1], a = e[r + 2], 128 == (192 & s) && 128 == (192 & a) && (c = (15 & l) << 12 | (63 & s) << 6 | 63 & a) > 2047 && (c < 55296 || c > 57343) && (h = c);
689 break;
690 case 4:
691 s = e[r + 1], a = e[r + 2], o = e[r + 3], 128 == (192 & s) && 128 == (192 & a) && 128 == (192 & o) && (c = (15 & l) << 18 | (63 & s) << 12 | (63 & a) << 6 | 63 & o) > 65535 && c < 1114112 && (h = c)
692 }
693 null === h ? (h = 65533, u = 1) : h > 65535 && (h -= 65536, i.push(h >>> 10 & 1023 | 55296), h = 56320 | 1023 & h), i.push(h), r += u
694 }
695 return function (e) {
696 var t = e.length;
697 if (t <= E) return String.fromCharCode.apply(String, e);
698 for (var n = "", i = 0; i < t;) n += String.fromCharCode.apply(String, e.slice(i, i += E));
699 return n
700 }(i)
701 }
702 t.Buffer = c, t.SlowBuffer = function (e) {
703 return +e != e && (e = 0), c.alloc(+e)
704 }, t.INSPECT_MAX_BYTES = 50, c.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ? e.TYPED_ARRAY_SUPPORT : function () {
705 try {
706 var e = new Uint8Array(1);
707 return e.__proto__ = {
708 __proto__: Uint8Array.prototype,
709 foo: function () {
710 return 42
711 }
712 }, 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(1, 1).byteLength
713 } catch (e) {
714 return !1
715 }
716 }(), t.kMaxLength = a(), c.poolSize = 8192, c._augment = function (e) {
717 return e.__proto__ = c.prototype, e
718 }, c.from = function (e, t, n) {
719 return l(null, e, t, n)
720 }, c.TYPED_ARRAY_SUPPORT && (c.prototype.__proto__ = Uint8Array.prototype, c.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && c[Symbol.species] === c && Object.defineProperty(c, Symbol.species, {
721 value: null,
722 configurable: !0
723 })), c.alloc = function (e, t, n) {
724 return function (e, t, n, i) {
725 return h(t), t <= 0 ? o(e, t) : void 0 !== n ? "string" == typeof i ? o(e, t).fill(n, i) : o(e, t).fill(n) : o(e, t)
726 }(null, e, t, n)
727 }, c.allocUnsafe = function (e) {
728 return u(null, e)
729 }, c.allocUnsafeSlow = function (e) {
730 return u(null, e)
731 }, c.isBuffer = function (e) {
732 return !(null == e || !e._isBuffer)
733 }, c.compare = function (e, t) {
734 if (!c.isBuffer(e) || !c.isBuffer(t)) throw new TypeError("Arguments must be Buffers");
735 if (e === t) return 0;
736 for (var n = e.length, i = t.length, r = 0, s = Math.min(n, i); r < s; ++r)
737 if (e[r] !== t[r]) {
738 n = e[r], i = t[r];
739 break
740 } return n < i ? -1 : i < n ? 1 : 0
741 }, c.isEncoding = function (e) {
742 switch (String(e).toLowerCase()) {
743 case "hex":
744 case "utf8":
745 case "utf-8":
746 case "ascii":
747 case "latin1":
748 case "binary":
749 case "base64":
750 case "ucs2":
751 case "ucs-2":
752 case "utf16le":
753 case "utf-16le":
754 return !0;
755 default:
756 return !1
757 }
758 }, c.concat = function (e, t) {
759 if (!s(e)) throw new TypeError('"list" argument must be an Array of Buffers');
760 if (0 === e.length) return c.alloc(0);
761 var n;
762 if (void 0 === t)
763 for (t = 0, n = 0; n < e.length; ++n) t += e[n].length;
764 var i = c.allocUnsafe(t),
765 r = 0;
766 for (n = 0; n < e.length; ++n) {
767 var a = e[n];
768 if (!c.isBuffer(a)) throw new TypeError('"list" argument must be an Array of Buffers');
769 a.copy(i, r), r += a.length
770 }
771 return i
772 }, c.byteLength = p, c.prototype._isBuffer = !0, c.prototype.swap16 = function () {
773 var e = this.length;
774 if (e % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
775 for (var t = 0; t < e; t += 2) g(this, t, t + 1);
776 return this
777 }, c.prototype.swap32 = function () {
778 var e = this.length;
779 if (e % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
780 for (var t = 0; t < e; t += 4) g(this, t, t + 3), g(this, t + 1, t + 2);
781 return this
782 }, c.prototype.swap64 = function () {
783 var e = this.length;
784 if (e % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
785 for (var t = 0; t < e; t += 8) g(this, t, t + 7), g(this, t + 1, t + 6), g(this, t + 2, t + 5), g(this, t + 3, t + 4);
786 return this
787 }, c.prototype.toString = function () {
788 var e = 0 | this.length;
789 return 0 === e ? "" : 0 === arguments.length ? I(this, 0, e) : function (e, t, n) {
790 var i = !1;
791 if ((void 0 === t || t < 0) && (t = 0), t > this.length) return "";
792 if ((void 0 === n || n > this.length) && (n = this.length), n <= 0) return "";
793 if ((n >>>= 0) <= (t >>>= 0)) return "";
794 for (e || (e = "utf8");;) switch (e) {
795 case "hex":
796 return P(this, t, n);
797 case "utf8":
798 case "utf-8":
799 return I(this, t, n);
800 case "ascii":
801 return M(this, t, n);
802 case "latin1":
803 case "binary":
804 return A(this, t, n);
805 case "base64":
806 return T(this, t, n);
807 case "ucs2":
808 case "ucs-2":
809 case "utf16le":
810 case "utf-16le":
811 return B(this, t, n);
812 default:
813 if (i) throw new TypeError("Unknown encoding: " + e);
814 e = (e + "").toLowerCase(), i = !0
815 }
816 }.apply(this, arguments)
817 }, c.prototype.equals = function (e) {
818 if (!c.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
819 return this === e || 0 === c.compare(this, e)
820 }, c.prototype.inspect = function () {
821 var e = "",
822 n = t.INSPECT_MAX_BYTES;
823 return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g).join(" "), this.length > n && (e += " ... ")), "<Buffer " + e + ">"
824 }, c.prototype.compare = function (e, t, n, i, r) {
825 if (!c.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
826 if (void 0 === t && (t = 0), void 0 === n && (n = e ? e.length : 0), void 0 === i && (i = 0), void 0 === r && (r = this.length), t < 0 || n > e.length || i < 0 || r > this.length) throw new RangeError("out of range index");
827 if (i >= r && t >= n) return 0;
828 if (i >= r) return -1;
829 if (t >= n) return 1;
830 if (this === e) return 0;
831 for (var s = (r >>>= 0) - (i >>>= 0), a = (n >>>= 0) - (t >>>= 0), o = Math.min(s, a), l = this.slice(i, r), h = e.slice(t, n), u = 0; u < o; ++u)
832 if (l[u] !== h[u]) {
833 s = l[u], a = h[u];
834 break
835 } return s < a ? -1 : a < s ? 1 : 0
836 }, c.prototype.includes = function (e, t, n) {
837 return -1 !== this.indexOf(e, t, n)
838 }, c.prototype.indexOf = function (e, t, n) {
839 return m(this, e, t, n, !0)
840 }, c.prototype.lastIndexOf = function (e, t, n) {
841 return m(this, e, t, n, !1)
842 }, c.prototype.write = function (e, t, n, i) {
843 if (void 0 === t) i = "utf8", n = this.length, t = 0;
844 else if (void 0 === n && "string" == typeof t) i = t, n = this.length, t = 0;
845 else {
846 if (!isFinite(t)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
847 t |= 0, isFinite(n) ? (n |= 0, void 0 === i && (i = "utf8")) : (i = n, n = void 0)
848 }
849 var r = this.length - t;
850 if ((void 0 === n || n > r) && (n = r), e.length > 0 && (n < 0 || t < 0) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds");
851 i || (i = "utf8");
852 for (var s = !1;;) switch (i) {
853 case "hex":
854 return k(this, e, t, n);
855 case "utf8":
856 case "utf-8":
857 return v(this, e, t, n);
858 case "ascii":
859 return w(this, e, t, n);
860 case "latin1":
861 case "binary":
862 return b(this, e, t, n);
863 case "base64":
864 return x(this, e, t, n);
865 case "ucs2":
866 case "ucs-2":
867 case "utf16le":
868 case "utf-16le":
869 return S(this, e, t, n);
870 default:
871 if (s) throw new TypeError("Unknown encoding: " + i);
872 i = ("" + i).toLowerCase(), s = !0
873 }
874 }, c.prototype.toJSON = function () {
875 return {
876 type: "Buffer",
877 data: Array.prototype.slice.call(this._arr || this, 0)
878 }
879 };
880 var E = 4096;
881
882 function M(e, t, n) {
883 var i = "";
884 n = Math.min(e.length, n);
885 for (var r = t; r < n; ++r) i += String.fromCharCode(127 & e[r]);
886 return i
887 }
888
889 function A(e, t, n) {
890 var i = "";
891 n = Math.min(e.length, n);
892 for (var r = t; r < n; ++r) i += String.fromCharCode(e[r]);
893 return i
894 }
895
896 function P(e, t, n) {
897 var i = e.length;
898 (!t || t < 0) && (t = 0), (!n || n < 0 || n > i) && (n = i);
899 for (var r = "", s = t; s < n; ++s) r += F(e[s]);
900 return r
901 }
902
903 function B(e, t, n) {
904 for (var i = e.slice(t, n), r = "", s = 0; s < i.length; s += 2) r += String.fromCharCode(i[s] + 256 * i[s + 1]);
905 return r
906 }
907
908 function C(e, t, n) {
909 if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint");
910 if (e + t > n) throw new RangeError("Trying to access beyond buffer length")
911 }
912
913 function O(e, t, n, i, r, s) {
914 if (!c.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');
915 if (t > r || t < s) throw new RangeError('"value" argument is out of bounds');
916 if (n + i > e.length) throw new RangeError("Index out of range")
917 }
918
919 function R(e, t, n, i) {
920 t < 0 && (t = 65535 + t + 1);
921 for (var r = 0, s = Math.min(e.length - n, 2); r < s; ++r) e[n + r] = (t & 255 << 8 * (i ? r : 1 - r)) >>> 8 * (i ? r : 1 - r)
922 }
923
924 function j(e, t, n, i) {
925 t < 0 && (t = 4294967295 + t + 1);
926 for (var r = 0, s = Math.min(e.length - n, 4); r < s; ++r) e[n + r] = t >>> 8 * (i ? r : 3 - r) & 255
927 }
928
929 function _(e, t, n, i, r, s) {
930 if (n + i > e.length) throw new RangeError("Index out of range");
931 if (n < 0) throw new RangeError("Index out of range")
932 }
933
934 function U(e, t, n, i, s) {
935 return s || _(e, 0, n, 4), r.write(e, t, n, i, 23, 4), n + 4
936 }
937
938 function D(e, t, n, i, s) {
939 return s || _(e, 0, n, 8), r.write(e, t, n, i, 52, 8), n + 8
940 }
941 c.prototype.slice = function (e, t) {
942 var n, i = this.length;
943 if ((e = ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i), (t = void 0 === t ? i : ~~t) < 0 ? (t += i) < 0 && (t = 0) : t > i && (t = i), t < e && (t = e), c.TYPED_ARRAY_SUPPORT)(n = this.subarray(e, t)).__proto__ = c.prototype;
944 else {
945 var r = t - e;
946 n = new c(r, void 0);
947 for (var s = 0; s < r; ++s) n[s] = this[s + e]
948 }
949 return n
950 }, c.prototype.readUIntLE = function (e, t, n) {
951 e |= 0, t |= 0, n || C(e, t, this.length);
952 for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256);) i += this[e + s] * r;
953 return i
954 }, c.prototype.readUIntBE = function (e, t, n) {
955 e |= 0, t |= 0, n || C(e, t, this.length);
956 for (var i = this[e + --t], r = 1; t > 0 && (r *= 256);) i += this[e + --t] * r;
957 return i
958 }, c.prototype.readUInt8 = function (e, t) {
959 return t || C(e, 1, this.length), this[e]
960 }, c.prototype.readUInt16LE = function (e, t) {
961 return t || C(e, 2, this.length), this[e] | this[e + 1] << 8
962 }, c.prototype.readUInt16BE = function (e, t) {
963 return t || C(e, 2, this.length), this[e] << 8 | this[e + 1]
964 }, c.prototype.readUInt32LE = function (e, t) {
965 return t || C(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]
966 }, c.prototype.readUInt32BE = function (e, t) {
967 return t || C(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3])
968 }, c.prototype.readIntLE = function (e, t, n) {
969 e |= 0, t |= 0, n || C(e, t, this.length);
970 for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256);) i += this[e + s] * r;
971 return i >= (r *= 128) && (i -= Math.pow(2, 8 * t)), i
972 }, c.prototype.readIntBE = function (e, t, n) {
973 e |= 0, t |= 0, n || C(e, t, this.length);
974 for (var i = t, r = 1, s = this[e + --i]; i > 0 && (r *= 256);) s += this[e + --i] * r;
975 return s >= (r *= 128) && (s -= Math.pow(2, 8 * t)), s
976 }, c.prototype.readInt8 = function (e, t) {
977 return t || C(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e]
978 }, c.prototype.readInt16LE = function (e, t) {
979 t || C(e, 2, this.length);
980 var n = this[e] | this[e + 1] << 8;
981 return 32768 & n ? 4294901760 | n : n
982 }, c.prototype.readInt16BE = function (e, t) {
983 t || C(e, 2, this.length);
984 var n = this[e + 1] | this[e] << 8;
985 return 32768 & n ? 4294901760 | n : n
986 }, c.prototype.readInt32LE = function (e, t) {
987 return t || C(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24
988 }, c.prototype.readInt32BE = function (e, t) {
989 return t || C(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]
990 }, c.prototype.readFloatLE = function (e, t) {
991 return t || C(e, 4, this.length), r.read(this, e, !0, 23, 4)
992 }, c.prototype.readFloatBE = function (e, t) {
993 return t || C(e, 4, this.length), r.read(this, e, !1, 23, 4)
994 }, c.prototype.readDoubleLE = function (e, t) {
995 return t || C(e, 8, this.length), r.read(this, e, !0, 52, 8)
996 }, c.prototype.readDoubleBE = function (e, t) {
997 return t || C(e, 8, this.length), r.read(this, e, !1, 52, 8)
998 }, c.prototype.writeUIntLE = function (e, t, n, i) {
999 e = +e, t |= 0, n |= 0, i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
1000 var r = 1,
1001 s = 0;
1002 for (this[t] = 255 & e; ++s < n && (r *= 256);) this[t + s] = e / r & 255;
1003 return t + n
1004 }, c.prototype.writeUIntBE = function (e, t, n, i) {
1005 e = +e, t |= 0, n |= 0, i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
1006 var r = n - 1,
1007 s = 1;
1008 for (this[t + r] = 255 & e; --r >= 0 && (s *= 256);) this[t + r] = e / s & 255;
1009 return t + n
1010 }, c.prototype.writeUInt8 = function (e, t, n) {
1011 return e = +e, t |= 0, n || O(this, e, t, 1, 255, 0), c.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[t] = 255 & e, t + 1
1012 }, c.prototype.writeUInt16LE = function (e, t, n) {
1013 return e = +e, t |= 0, n || O(this, e, t, 2, 65535, 0), c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
1014 }, c.prototype.writeUInt16BE = function (e, t, n) {
1015 return e = +e, t |= 0, n || O(this, e, t, 2, 65535, 0), c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
1016 }, c.prototype.writeUInt32LE = function (e, t, n) {
1017 return e = +e, t |= 0, n || O(this, e, t, 4, 4294967295, 0), c.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e) : j(this, e, t, !0), t + 4
1018 }, c.prototype.writeUInt32BE = function (e, t, n) {
1019 return e = +e, t |= 0, n || O(this, e, t, 4, 4294967295, 0), c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : j(this, e, t, !1), t + 4
1020 }, c.prototype.writeIntLE = function (e, t, n, i) {
1021 if (e = +e, t |= 0, !i) {
1022 var r = Math.pow(2, 8 * n - 1);
1023 O(this, e, t, n, r - 1, -r)
1024 }
1025 var s = 0,
1026 a = 1,
1027 o = 0;
1028 for (this[t] = 255 & e; ++s < n && (a *= 256);) e < 0 && 0 === o && 0 !== this[t + s - 1] && (o = 1), this[t + s] = (e / a >> 0) - o & 255;
1029 return t + n
1030 }, c.prototype.writeIntBE = function (e, t, n, i) {
1031 if (e = +e, t |= 0, !i) {
1032 var r = Math.pow(2, 8 * n - 1);
1033 O(this, e, t, n, r - 1, -r)
1034 }
1035 var s = n - 1,
1036 a = 1,
1037 o = 0;
1038 for (this[t + s] = 255 & e; --s >= 0 && (a *= 256);) e < 0 && 0 === o && 0 !== this[t + s + 1] && (o = 1), this[t + s] = (e / a >> 0) - o & 255;
1039 return t + n
1040 }, c.prototype.writeInt8 = function (e, t, n) {
1041 return e = +e, t |= 0, n || O(this, e, t, 1, 127, -128), c.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1
1042 }, c.prototype.writeInt16LE = function (e, t, n) {
1043 return e = +e, t |= 0, n || O(this, e, t, 2, 32767, -32768), c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
1044 }, c.prototype.writeInt16BE = function (e, t, n) {
1045 return e = +e, t |= 0, n || O(this, e, t, 2, 32767, -32768), c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
1046 }, c.prototype.writeInt32LE = function (e, t, n) {
1047 return e = +e, t |= 0, n || O(this, e, t, 4, 2147483647, -2147483648), c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24) : j(this, e, t, !0), t + 4
1048 }, c.prototype.writeInt32BE = function (e, t, n) {
1049 return e = +e, t |= 0, n || O(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : j(this, e, t, !1), t + 4
1050 }, c.prototype.writeFloatLE = function (e, t, n) {
1051 return U(this, e, t, !0, n)
1052 }, c.prototype.writeFloatBE = function (e, t, n) {
1053 return U(this, e, t, !1, n)
1054 }, c.prototype.writeDoubleLE = function (e, t, n) {
1055 return D(this, e, t, !0, n)
1056 }, c.prototype.writeDoubleBE = function (e, t, n) {
1057 return D(this, e, t, !1, n)
1058 }, c.prototype.copy = function (e, t, n, i) {
1059 if (n || (n = 0), i || 0 === i || (i = this.length), t >= e.length && (t = e.length), t || (t = 0), i > 0 && i < n && (i = n), i === n) return 0;
1060 if (0 === e.length || 0 === this.length) return 0;
1061 if (t < 0) throw new RangeError("targetStart out of bounds");
1062 if (n < 0 || n >= this.length) throw new RangeError("sourceStart out of bounds");
1063 if (i < 0) throw new RangeError("sourceEnd out of bounds");
1064 i > this.length && (i = this.length), e.length - t < i - n && (i = e.length - t + n);
1065 var r, s = i - n;
1066 if (this === e && n < t && t < i)
1067 for (r = s - 1; r >= 0; --r) e[r + t] = this[r + n];
1068 else if (s < 1e3 || !c.TYPED_ARRAY_SUPPORT)
1069 for (r = 0; r < s; ++r) e[r + t] = this[r + n];
1070 else Uint8Array.prototype.set.call(e, this.subarray(n, n + s), t);
1071 return s
1072 }, c.prototype.fill = function (e, t, n, i) {
1073 if ("string" == typeof e) {
1074 if ("string" == typeof t ? (i = t, t = 0, n = this.length) : "string" == typeof n && (i = n, n = this.length), 1 === e.length) {
1075 var r = e.charCodeAt(0);
1076 r < 256 && (e = r)
1077 }
1078 if (void 0 !== i && "string" != typeof i) throw new TypeError("encoding must be a string");
1079 if ("string" == typeof i && !c.isEncoding(i)) throw new TypeError("Unknown encoding: " + i)
1080 } else "number" == typeof e && (e &= 255);
1081 if (t < 0 || this.length < t || this.length < n) throw new RangeError("Out of range index");
1082 if (n <= t) return this;
1083 var s;
1084 if (t >>>= 0, n = void 0 === n ? this.length : n >>> 0, e || (e = 0), "number" == typeof e)
1085 for (s = t; s < n; ++s) this[s] = e;
1086 else {
1087 var a = c.isBuffer(e) ? e : z(new c(e, i).toString()),
1088 o = a.length;
1089 for (s = 0; s < n - t; ++s) this[s + t] = a[s % o]
1090 }
1091 return this
1092 };
1093 var L = /[^+\/0-9A-Za-z-_]/g;
1094
1095 function F(e) {
1096 return e < 16 ? "0" + e.toString(16) : e.toString(16)
1097 }
1098
1099 function z(e, t) {
1100 var n;
1101 t = t || 1 / 0;
1102 for (var i = e.length, r = null, s = [], a = 0; a < i; ++a) {
1103 if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
1104 if (!r) {
1105 if (n > 56319) {
1106 (t -= 3) > -1 && s.push(239, 191, 189);
1107 continue
1108 }
1109 if (a + 1 === i) {
1110 (t -= 3) > -1 && s.push(239, 191, 189);
1111 continue
1112 }
1113 r = n;
1114 continue
1115 }
1116 if (n < 56320) {
1117 (t -= 3) > -1 && s.push(239, 191, 189), r = n;
1118 continue
1119 }
1120 n = 65536 + (r - 55296 << 10 | n - 56320)
1121 } else r && (t -= 3) > -1 && s.push(239, 191, 189);
1122 if (r = null, n < 128) {
1123 if ((t -= 1) < 0) break;
1124 s.push(n)
1125 } else if (n < 2048) {
1126 if ((t -= 2) < 0) break;
1127 s.push(n >> 6 | 192, 63 & n | 128)
1128 } else if (n < 65536) {
1129 if ((t -= 3) < 0) break;
1130 s.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
1131 } else {
1132 if (!(n < 1114112)) throw new Error("Invalid code point");
1133 if ((t -= 4) < 0) break;
1134 s.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128)
1135 }
1136 }
1137 return s
1138 }
1139
1140 function H(e) {
1141 return i.toByteArray(function (e) {
1142 if ((e = function (e) {
1143 return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
1144 }(e).replace(L, "")).length < 2) return "";
1145 for (; e.length % 4 != 0;) e += "=";
1146 return e
1147 }(e))
1148 }
1149
1150 function V(e, t, n, i) {
1151 for (var r = 0; r < i && !(r + n >= t.length || r >= e.length); ++r) t[r + n] = e[r];
1152 return r
1153 }
1154 }).call(this, n(12))
1155 }, function (e, t) {
1156 var n;
1157 n = function () {
1158 return this
1159 }();
1160 try {
1161 n = n || new Function("return this")()
1162 } catch (e) {
1163 "object" == typeof window && (n = window)
1164 }
1165 e.exports = n
1166 }, function (e, t) {
1167 for (var n = t.uint8 = new Array(256), i = 0; i <= 255; i++) n[i] = r(i);
1168
1169 function r(e) {
1170 return function (t) {
1171 var n = t.reserve(1);
1172 t.buffer[n] = e
1173 }
1174 }
1175 }, function (e, t, n) {
1176 t.FlexDecoder = s, t.FlexEncoder = a;
1177 var i = n(0),
1178 r = "BUFFER_SHORTAGE";
1179
1180 function s() {
1181 if (!(this instanceof s)) return new s
1182 }
1183
1184 function a() {
1185 if (!(this instanceof a)) return new a
1186 }
1187
1188 function o() {
1189 throw new Error("method not implemented: write()")
1190 }
1191
1192 function c() {
1193 throw new Error("method not implemented: fetch()")
1194 }
1195
1196 function l() {
1197 return this.buffers && this.buffers.length ? (this.flush(), this.pull()) : this.fetch()
1198 }
1199
1200 function h(e) {
1201 (this.buffers || (this.buffers = [])).push(e)
1202 }
1203
1204 function u() {
1205 return (this.buffers || (this.buffers = [])).shift()
1206 }
1207
1208 function f(e) {
1209 return function (t) {
1210 for (var n in e) t[n] = e[n];
1211 return t
1212 }
1213 }
1214 s.mixin = f({
1215 bufferish: i,
1216 write: function (e) {
1217 var t = this.offset ? i.prototype.slice.call(this.buffer, this.offset) : this.buffer;
1218 this.buffer = t ? e ? this.bufferish.concat([t, e]) : t : e, this.offset = 0
1219 },
1220 fetch: c,
1221 flush: function () {
1222 for (; this.offset < this.buffer.length;) {
1223 var e, t = this.offset;
1224 try {
1225 e = this.fetch()
1226 } catch (e) {
1227 if (e && e.message != r) throw e;
1228 this.offset = t;
1229 break
1230 }
1231 this.push(e)
1232 }
1233 },
1234 push: h,
1235 pull: u,
1236 read: l,
1237 reserve: function (e) {
1238 var t = this.offset,
1239 n = t + e;
1240 if (n > this.buffer.length) throw new Error(r);
1241 return this.offset = n, t
1242 },
1243 offset: 0
1244 }), s.mixin(s.prototype), a.mixin = f({
1245 bufferish: i,
1246 write: o,
1247 fetch: function () {
1248 var e = this.start;
1249 if (e < this.offset) {
1250 var t = this.start = this.offset;
1251 return i.prototype.slice.call(this.buffer, e, t)
1252 }
1253 },
1254 flush: function () {
1255 for (; this.start < this.offset;) {
1256 var e = this.fetch();
1257 e && this.push(e)
1258 }
1259 },
1260 push: h,
1261 pull: function () {
1262 var e = this.buffers || (this.buffers = []),
1263 t = e.length > 1 ? this.bufferish.concat(e) : e[0];
1264 return e.length = 0, t
1265 },
1266 read: l,
1267 reserve: function (e) {
1268 var t = 0 | e;
1269 if (this.buffer) {
1270 var n = this.buffer.length,
1271 i = 0 | this.offset,
1272 r = i + t;
1273 if (r < n) return this.offset = r, i;
1274 this.flush(), e = Math.max(e, Math.min(2 * n, this.maxBufferSize))
1275 }
1276 return e = Math.max(e, this.minBufferSize), this.buffer = this.bufferish.alloc(e), this.start = 0, this.offset = t, 0
1277 },
1278 send: function (e) {
1279 var t = e.length;
1280 if (t > this.minBufferSize) this.flush(), this.push(e);
1281 else {
1282 var n = this.reserve(t);
1283 i.prototype.copy.call(e, this.buffer, n)
1284 }
1285 },
1286 maxBufferSize: 65536,
1287 minBufferSize: 2048,
1288 offset: 0,
1289 start: 0
1290 }), a.mixin(a.prototype)
1291 }, function (e, t, n) {
1292 t.decode = function (e, t) {
1293 var n = new i(t);
1294 return n.write(e), n.read()
1295 };
1296 var i = n(16).DecodeBuffer
1297 }, function (e, t, n) {
1298 t.DecodeBuffer = r;
1299 var i = n(8).preset;
1300
1301 function r(e) {
1302 if (!(this instanceof r)) return new r(e);
1303 if (e && (this.options = e, e.codec)) {
1304 var t = this.codec = e.codec;
1305 t.bufferish && (this.bufferish = t.bufferish)
1306 }
1307 }
1308 n(14).FlexDecoder.mixin(r.prototype), r.prototype.codec = i, r.prototype.fetch = function () {
1309 return this.codec.decode(this)
1310 }
1311 }, function (e, t, n) {
1312 var i = n(4),
1313 r = n(7),
1314 s = r.Uint64BE,
1315 a = r.Int64BE;
1316 t.getReadFormat = function (e) {
1317 var t = o.hasArrayBuffer && e && e.binarraybuffer,
1318 n = e && e.int64;
1319 return {
1320 map: l && e && e.usemap ? u : h,
1321 array: f,
1322 str: d,
1323 bin: t ? g : p,
1324 ext: m,
1325 uint8: y,
1326 uint16: v,
1327 uint32: b,
1328 uint64: S(8, n ? E : T),
1329 int8: k,
1330 int16: w,
1331 int32: x,
1332 int64: S(8, n ? M : I),
1333 float32: S(4, A),
1334 float64: S(8, P)
1335 }
1336 }, t.readUint8 = y;
1337 var o = n(0),
1338 c = n(6),
1339 l = "undefined" != typeof Map;
1340
1341 function h(e, t) {
1342 var n, i = {},
1343 r = new Array(t),
1344 s = new Array(t),
1345 a = e.codec.decode;
1346 for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
1347 for (n = 0; n < t; n++) i[r[n]] = s[n];
1348 return i
1349 }
1350
1351 function u(e, t) {
1352 var n, i = new Map,
1353 r = new Array(t),
1354 s = new Array(t),
1355 a = e.codec.decode;
1356 for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
1357 for (n = 0; n < t; n++) i.set(r[n], s[n]);
1358 return i
1359 }
1360
1361 function f(e, t) {
1362 for (var n = new Array(t), i = e.codec.decode, r = 0; r < t; r++) n[r] = i(e);
1363 return n
1364 }
1365
1366 function d(e, t) {
1367 var n = e.reserve(t),
1368 i = n + t;
1369 return c.toString.call(e.buffer, "utf-8", n, i)
1370 }
1371
1372 function p(e, t) {
1373 var n = e.reserve(t),
1374 i = n + t,
1375 r = c.slice.call(e.buffer, n, i);
1376 return o.from(r)
1377 }
1378
1379 function g(e, t) {
1380 var n = e.reserve(t),
1381 i = n + t,
1382 r = c.slice.call(e.buffer, n, i);
1383 return o.Uint8Array.from(r).buffer
1384 }
1385
1386 function m(e, t) {
1387 var n = e.reserve(t + 1),
1388 i = e.buffer[n++],
1389 r = n + t,
1390 s = e.codec.getExtUnpacker(i);
1391 if (!s) throw new Error("Invalid ext type: " + (i ? "0x" + i.toString(16) : i));
1392 return s(c.slice.call(e.buffer, n, r))
1393 }
1394
1395 function y(e) {
1396 var t = e.reserve(1);
1397 return e.buffer[t]
1398 }
1399
1400 function k(e) {
1401 var t = e.reserve(1),
1402 n = e.buffer[t];
1403 return 128 & n ? n - 256 : n
1404 }
1405
1406 function v(e) {
1407 var t = e.reserve(2),
1408 n = e.buffer;
1409 return n[t++] << 8 | n[t]
1410 }
1411
1412 function w(e) {
1413 var t = e.reserve(2),
1414 n = e.buffer,
1415 i = n[t++] << 8 | n[t];
1416 return 32768 & i ? i - 65536 : i
1417 }
1418
1419 function b(e) {
1420 var t = e.reserve(4),
1421 n = e.buffer;
1422 return 16777216 * n[t++] + (n[t++] << 16) + (n[t++] << 8) + n[t]
1423 }
1424
1425 function x(e) {
1426 var t = e.reserve(4),
1427 n = e.buffer;
1428 return n[t++] << 24 | n[t++] << 16 | n[t++] << 8 | n[t]
1429 }
1430
1431 function S(e, t) {
1432 return function (n) {
1433 var i = n.reserve(e);
1434 return t.call(n.buffer, i, !0)
1435 }
1436 }
1437
1438 function T(e) {
1439 return new s(this, e).toNumber()
1440 }
1441
1442 function I(e) {
1443 return new a(this, e).toNumber()
1444 }
1445
1446 function E(e) {
1447 return new s(this, e)
1448 }
1449
1450 function M(e) {
1451 return new a(this, e)
1452 }
1453
1454 function A(e) {
1455 return i.read(this, e, !1, 23, 4)
1456 }
1457
1458 function P(e) {
1459 return i.read(this, e, !1, 52, 8)
1460 }
1461 }, function (e, t, n) {
1462 ! function (t) {
1463 e.exports = t;
1464 var n = "listeners",
1465 i = {
1466 on: function (e, t) {
1467 return a(this, e).push(t), this
1468 },
1469 once: function (e, t) {
1470 var n = this;
1471 return i.originalListener = t, a(n, e).push(i), n;
1472
1473 function i() {
1474 s.call(n, e, i), t.apply(this, arguments)
1475 }
1476 },
1477 off: s,
1478 emit: function (e, t) {
1479 var n = this,
1480 i = a(n, e, !0);
1481 if (!i) return !1;
1482 var r = arguments.length;
1483 if (1 === r) i.forEach((function (e) {
1484 e.call(n)
1485 }));
1486 else if (2 === r) i.forEach((function (e) {
1487 e.call(n, t)
1488 }));
1489 else {
1490 var s = Array.prototype.slice.call(arguments, 1);
1491 i.forEach((function (e) {
1492 e.apply(n, s)
1493 }))
1494 }
1495 return !!i.length
1496 }
1497 };
1498
1499 function r(e) {
1500 for (var t in i) e[t] = i[t];
1501 return e
1502 }
1503
1504 function s(e, t) {
1505 var i;
1506 if (arguments.length) {
1507 if (t) {
1508 if (i = a(this, e, !0)) {
1509 if (!(i = i.filter((function (e) {
1510 return e !== t && e.originalListener !== t
1511 }))).length) return s.call(this, e);
1512 this[n][e] = i
1513 }
1514 } else if ((i = this[n]) && (delete i[e], !Object.keys(i).length)) return s.call(this)
1515 } else delete this[n];
1516 return this
1517 }
1518
1519 function a(e, t, i) {
1520 if (!i || e[n]) {
1521 var r = e[n] || (e[n] = {});
1522 return r[t] || (r[t] = [])
1523 }
1524 }
1525 r(t.prototype), t.mixin = r
1526 }((
1527 /**
1528 * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)
1529 *
1530 * @copyright Yusuke Kawasaki
1531 * @license MIT
1532 * @constructor
1533 * @see https://github.com/kawanet/event-lite
1534 * @see http://kawanet.github.io/event-lite/EventLite.html
1535 * @example
1536 * var EventLite = require("event-lite");
1537 *
1538 * function MyClass() {...} // your class
1539 *
1540 * EventLite.mixin(MyClass.prototype); // import event methods
1541 *
1542 * var obj = new MyClass();
1543 * obj.on("foo", function() {...}); // add event listener
1544 * obj.once("bar", function() {...}); // add one-time event listener
1545 * obj.emit("foo"); // dispatch event
1546 * obj.emit("bar"); // dispatch another event
1547 * obj.off("foo"); // remove event listener
1548 */
1549 function e() {
1550 if (!(this instanceof e)) return new e
1551 }))
1552 }, function (e, t, n) {
1553 (function (t) {
1554 e.exports.maxScreenWidth = 1920, e.exports.maxScreenHeight = 1080, e.exports.serverUpdateRate = 9, e.exports.maxPlayers = t && -1 != t.argv.indexOf("--largeserver") ? 80 : 50, e.exports.maxPlayersHard = e.exports.maxPlayers + 10, e.exports.collisionDepth = 6, e.exports.minimapRate = 3e3, e.exports.colGrid = 10, e.exports.clientSendRate = 5, e.exports.healthBarWidth = 50, e.exports.healthBarPad = 4.5, e.exports.iconPadding = 15, e.exports.iconPad = .9, e.exports.deathFadeout = 3e3, e.exports.crownIconScale = 60, e.exports.crownPad = 35, e.exports.chatCountdown = 3e3, e.exports.chatCooldown = 500, e.exports.inSandbox = t && "mm_exp" === t.env.VULTR_SCHEME, e.exports.maxAge = 100, e.exports.gatherAngle = Math.PI / 2.6, e.exports.gatherWiggle = 10, e.exports.hitReturnRatio = .25, e.exports.hitAngle = Math.PI / 2, e.exports.playerScale = 35, e.exports.playerSpeed = .0016, e.exports.playerDecel = .993, e.exports.nameY = 34, e.exports.skinColors = ["#bf8f54", "#cbb091", "#896c4b", "#fadadc", "#ececec", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3", "#8bc373"], e.exports.animalCount = 7, e.exports.aiTurnRandom = .06, e.exports.cowNames = ["Meth4", "Wealthy"], e.exports.shieldAngle = Math.PI / 3, e.exports.weaponVariants = [{
1555 id: 0,
1556 src: "",
1557 xp: 0,
1558 val: 1
1559 }, {
1560 id: 1,
1561 src: "_g",
1562 xp: 3e3,
1563 val: 1.1
1564 }, {
1565 id: 2,
1566 src: "_d",
1567 xp: 7e3,
1568 val: 1.18
1569 }, {
1570 id: 3,
1571 src: "_r",
1572 poison: !0,
1573 xp: 12e3,
1574 val: 1.18
1575 }], e.exports.fetchVariant = function (t) {
1576 for (var n = t.weaponXP[t.weaponIndex] || 0, i = e.exports.weaponVariants.length - 1; i >= 0; --i)
1577 if (n >= e.exports.weaponVariants[i].xp) return e.exports.weaponVariants[i]
1578 }, e.exports.resourceTypes = ["wood", "food", "stone", "points"], e.exports.areaCount = 7, e.exports.treesPerArea = 9, e.exports.bushesPerArea = 3, e.exports.totalRocks = 32, e.exports.goldOres = 7, e.exports.riverWidth = 724, e.exports.riverPadding = 114, e.exports.waterCurrent = .0011, e.exports.waveSpeed = 1e-4, e.exports.waveMax = 1.3, e.exports.treeScales = [150, 160, 165, 175], e.exports.bushScales = [80, 85, 95], e.exports.rockScales = [80, 85, 90], e.exports.snowBiomeTop = 2400, e.exports.snowSpeed = .75, e.exports.maxNameLength = 15, e.exports.mapScale = 14400, e.exports.mapPingScale = 40, e.exports.mapPingTime = 2200
1579 }).call(this, n(41))
1580 }, function (e, t) {
1581 var n = {
1582 utf8: {
1583 stringToBytes: function (e) {
1584 return n.bin.stringToBytes(unescape(encodeURIComponent(e)))
1585 },
1586 bytesToString: function (e) {
1587 return decodeURIComponent(escape(n.bin.bytesToString(e)))
1588 }
1589 },
1590 bin: {
1591 stringToBytes: function (e) {
1592 for (var t = [], n = 0; n < e.length; n++) t.push(255 & e.charCodeAt(n));
1593 return t
1594 },
1595 bytesToString: function (e) {
1596 for (var t = [], n = 0; n < e.length; n++) t.push(String.fromCharCode(e[n]));
1597 return t.join("")
1598 }
1599 }
1600 };
1601 e.exports = n
1602 }, function (e, t, n) {
1603 "use strict";
1604 window.loadedScript = !0;
1605 var i = "127.0.0.1" !== location.hostname && !location.hostname.startsWith("192.168.");
1606 n(22);
1607 var r = n(23),
1608 s = n(42),
1609 a = n(43),
1610 o = n(19),
1611 c = n(44),
1612 l = n(45),
1613 h = (n(46), n(47)),
1614 u = n(48),
1615 f = n(55),
1616 d = n(56),
1617 p = n(57),
1618 g = n(58).obj,
1619 m = new a.TextManager,
1620 y = new(n(59))("moomoo.io", 3e3, o.maxPlayers, 5, !1);
1621 y.debugLog = !1;
1622 var k = !1;
1623
1624 function v() {
1625 ht && ut && (k = !0, i ? window.grecaptcha.execute("6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
1626 action: "homepage"
1627 }).then((function (e) {
1628 w(e)
1629 })) : w(null))
1630 }
1631
1632 function w(e) {
1633 y.start((function (t, n, a) {
1634 var c = (i ? "wss" : "ws") + "://" + t + ":8008/?gameIndex=" + a;
1635 e && (c += "&token=" + encodeURIComponent(e)), r.connect(c, (function (e) {
1636 Bi(), setInterval(() => Bi(), 2500), e ? ft(e) : (ue.onclick = s.checkTrusted((function () {
1637 ! function () {
1638 var e = ++bt > 1,
1639 t = Date.now() - wt > vt;
1640 e && t ? (wt = Date.now(), xt()) : Tn()
1641 }()
1642 })), s.hookTouchEvents(ue), fe.onclick = s.checkTrusted((function () {
1643 Oi("https://krunker.io")
1644 })), s.hookTouchEvents(fe), pe.onclick = s.checkTrusted((function () {
1645 setTimeout((function () {
1646 ! function () {
1647 var e = xe.value,
1648 t = prompt("party key", e);
1649 t && (window.onbeforeunload = void 0, window.location.href = "/?server=" + t)
1650 }()
1651 }), 10)
1652 })), s.hookTouchEvents(pe), ge.onclick = s.checkTrusted((function () {
1653 Ae.classList.contains("showing") ? (Ae.classList.remove("showing"), me.innerText = "Settings") : (Ae.classList.add("showing"), me.innerText = "Close")
1654 })), s.hookTouchEvents(ge), ye.onclick = s.checkTrusted((function () {
1655 yn(), "block" != Ye.style.display ? Ut() : Ye.style.display = "none"
1656 })), s.hookTouchEvents(ye), ke.onclick = s.checkTrusted((function () {
1657 "block" != Qe.style.display ? (Qe.style.display = "block", Ye.style.display = "none", an(), Gt()) : Qe.style.display = "none"
1658 })), s.hookTouchEvents(ke), ve.onclick = s.checkTrusted((function () {
1659 rn()
1660 })), s.hookTouchEvents(ve), Ne.onclick = s.checkTrusted((function () {
1661 xn()
1662 })), s.hookTouchEvents(Ne), function () {
1663 for (var e = 0; e < jn.length; ++e) {
1664 var t = new Image;
1665 t.onload = function () {
1666 this.isLoaded = !0
1667 }, t.src = ".././img/icons/" + jn[e] + ".png", Rn[jn[e]] = t
1668 }
1669 }(), Pe.style.display = "none", Me.style.display = "block", Le.value = E("moo_name") || "", function () {
1670 var e = E("native_resolution");
1671 Zt(e ? "true" == e : "undefined" != typeof cordova), A = "true" == E("show_ping"), Ie.hidden = !A, E("moo_moosic"), setInterval((function () {
1672 window.cordova && (document.getElementById("downloadButtonContainer").classList.add("cordova"), document.getElementById("mobileDownloadButtonContainer").classList.add("cordova"))
1673 }), 1e3), en(), s.removeAllChildren(Ce);
1674 for (var t = 0; t < l.weapons.length + l.list.length; ++t) ! function (e) {
1675 s.generateElement({
1676 id: "actionBarItem" + e,
1677 class: "actionBarItem",
1678 style: "display:none",
1679 onmouseout: function () {
1680 Tt()
1681 },
1682 parent: Ce
1683 })
1684 }(t);
1685 for (t = 0; t < l.list.length + l.weapons.length; ++t) ! function (e) {
1686 var t = document.createElement("canvas");
1687 t.width = t.height = 66;
1688 var n = t.getContext("2d");
1689 if (n.translate(t.width / 2, t.height / 2), n.imageSmoothingEnabled = !1, n.webkitImageSmoothingEnabled = !1, n.mozImageSmoothingEnabled = !1, l.weapons[e]) {
1690 n.rotate(Math.PI / 4 + Math.PI);
1691 var i = new Image;
1692 Zn[l.weapons[e].src] = i, i.onload = function () {
1693 this.isLoaded = !0;
1694 var i = 1 / (this.height / this.width),
1695 r = l.weapons[e].iPad || 1;
1696 n.drawImage(this, -t.width * r * o.iconPad * i / 2, -t.height * r * o.iconPad / 2, t.width * r * i * o.iconPad, t.height * r * o.iconPad), n.fillStyle = "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation = "source-atop", n.fillRect(-t.width / 2, -t.height / 2, t.width, t.height), document.getElementById("actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() + ")"
1697 }, i.src = ".././img/weapons/" + l.weapons[e].src + ".png", (r = document.getElementById("actionBarItem" + e)).onmouseover = s.checkTrusted((function () {
1698 Tt(l.weapons[e], !0)
1699 })), r.onclick = s.checkTrusted((function () {
1700 Sn(e, !0)
1701 })), s.hookTouchEvents(r)
1702 } else {
1703 i = ri(l.list[e - l.weapons.length], !0);
1704 var r, a = Math.min(t.width - o.iconPadding, i.width);
1705 n.globalAlpha = 1, n.drawImage(i, -a / 2, -a / 2, a, a), n.fillStyle = "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation = "source-atop", n.fillRect(-a / 2, -a / 2, a, a), document.getElementById("actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() + ")", (r = document.getElementById("actionBarItem" + e)).onmouseover = s.checkTrusted((function () {
1706 Tt(l.list[e - l.weapons.length])
1707 })), r.onclick = s.checkTrusted((function () {
1708 Sn(e - l.weapons.length)
1709 })), s.hookTouchEvents(r)
1710 }
1711 }(t);
1712 Le.ontouchstart = s.checkTrusted((function (e) {
1713 e.preventDefault();
1714 var t = prompt("enter name", e.currentTarget.value);
1715 e.currentTarget.value = t.slice(0, 15)
1716 })), Se.checked = M, Se.onchange = s.checkTrusted((function (e) {
1717 Zt(e.target.checked)
1718 })), Te.checked = A, Te.onchange = s.checkTrusted((function (e) {
1719 A = Te.checked, Ie.hidden = !A, I("show_ping", A ? "true" : "false")
1720 }))
1721 }())
1722 }), {
1723 id: st,
1724 d: ft,
1725 1: En,
1726 2: vi,
1727 4: wi,
1728 33: Ti,
1729 5: Ln,
1730 6: li,
1731 a: gi,
1732 aa: pi,
1733 7: Wn,
1734 8: hi,
1735 sp: ui,
1736 9: xi,
1737 h: Si,
1738 11: Pn,
1739 12: Cn,
1740 13: Bn,
1741 14: bi,
1742 15: Dn,
1743 16: Un,
1744 17: $t,
1745 18: fi,
1746 19: di,
1747 20: Ci,
1748 ac: Ot,
1749 ad: _t,
1750 an: Bt,
1751 st: Rt,
1752 sa: jt,
1753 us: Nt,
1754 ch: hn,
1755 mm: Wt,
1756 t: Mn,
1757 p: Yt,
1758 pp: Pi
1759 }), pt(), setTimeout(() => gt(), 3e3)
1760 }), (function (e) {
1761 console.error("Vultr error:", e), alert("Error:\n" + e), ft("Disconnected...")
1762 }))
1763 }
1764 var b, x = new g(o, s),
1765 S = Math.PI,
1766 T = 2 * S;
1767
1768 function I(e, t) {
1769 b && localStorage.setItem(e, t)
1770 }
1771
1772 function E(e) {
1773 return b ? localStorage.getItem(e) : null
1774 }
1775 Math.lerpAngle = function (e, t, n) {
1776 Math.abs(t - e) > S && (e > t ? t += T : e += T);
1777 var i = t + (e - t) * n;
1778 return i >= 0 && i <= T ? i : i % T
1779 }, CanvasRenderingContext2D.prototype.roundRect = function (e, t, n, i, r) {
1780 return n < 2 * r && (r = n / 2), i < 2 * r && (r = i / 2), r < 0 && (r = 0), this.beginPath(), this.moveTo(e + r, t), this.arcTo(e + n, t, e + n, t + i, r), this.arcTo(e + n, t + i, e, t + i, r), this.arcTo(e, t + i, e, t, r), this.arcTo(e, t, e + n, t, r), this.closePath(), this
1781 }, "undefined" != typeof Storage && (b = !0), E("consent") || (consentBlock.style.display = "block"), window.checkTerms = function (e) {
1782 e ? (consentBlock.style.display = "none", I("consent", 1)) : $("#consentShake").effect("shake")
1783 };
1784 var M, A, P, B, C, O, R, j, _, U, D, L, F, z, H = E("moofoll"),
1785 V = 1,
1786 q = Date.now(),
1787 Y = [],
1788 W = [],
1789 X = [],
1790 N = [],
1791 G = [],
1792 J = new p(d, G, W, Y, nt, l, o, s),
1793 K = n(70),
1794 Q = n(71),
1795 Z = new K(Y, Q, W, l, null, o, s),
1796 ee = 1,
1797 te = 0,
1798 ne = 0,
1799 ie = 0,
1800 re = {
1801 id: -1,
1802 startX: 0,
1803 startY: 0,
1804 currentX: 0,
1805 currentY: 0
1806 },
1807 se = {
1808 id: -1,
1809 startX: 0,
1810 startY: 0,
1811 currentX: 0,
1812 currentY: 0
1813 },
1814 ae = 0,
1815 oe = o.maxScreenWidth,
1816 ce = o.maxScreenHeight,
1817 le = !1,
1818 he = (document.getElementById("ad-container"), document.getElementById("mainMenu")),
1819 ue = document.getElementById("enterGame"),
1820 fe = document.getElementById("promoImg"),
1821 de = document.getElementById("partyButton"),
1822 pe = document.getElementById("joinPartyButton"),
1823 ge = document.getElementById("settingsButton"),
1824 me = ge.getElementsByTagName("span")[0],
1825 ye = document.getElementById("allianceButton"),
1826 ke = document.getElementById("storeButton"),
1827 ve = document.getElementById("chatButton"),
1828 we = document.getElementById("gameCanvas"),
1829 be = we.getContext("2d"),
1830 xe = document.getElementById("serverBrowser"),
1831 Se = document.getElementById("nativeResolution"),
1832 Te = document.getElementById("showPing"),
1833 Ie = (document.getElementById("playMusic"), document.getElementById("pingDisplay")),
1834 Ee = document.getElementById("shutdownDisplay"),
1835 Me = document.getElementById("menuCardHolder"),
1836 Ae = document.getElementById("guideCard"),
1837 Pe = document.getElementById("loadingText"),
1838 Be = document.getElementById("gameUI"),
1839 Ce = document.getElementById("actionBar"),
1840 Oe = document.getElementById("scoreDisplay"),
1841 Re = document.getElementById("foodDisplay"),
1842 je = document.getElementById("woodDisplay"),
1843 _e = document.getElementById("stoneDisplay"),
1844 Ue = document.getElementById("killCounter"),
1845 De = document.getElementById("leaderboardData"),
1846 Le = document.getElementById("nameInput"),
1847 Fe = document.getElementById("itemInfoHolder"),
1848 ze = document.getElementById("ageText"),
1849 He = document.getElementById("ageBarBody"),
1850 Ve = document.getElementById("upgradeHolder"),
1851 qe = document.getElementById("upgradeCounter"),
1852 Ye = document.getElementById("allianceMenu"),
1853 We = document.getElementById("allianceHolder"),
1854 Xe = document.getElementById("allianceManager"),
1855 Ne = document.getElementById("mapDisplay"),
1856 Ge = document.getElementById("diedText"),
1857 Je = document.getElementById("skinColorHolder"),
1858 Ke = Ne.getContext("2d");
1859 Ne.width = 300, Ne.height = 300;
1860 var Qe = document.getElementById("storeMenu"),
1861 $e = document.getElementById("storeHolder"),
1862 Ze = document.getElementById("noticationDisplay"),
1863 et = f.hats,
1864 tt = f.accessories,
1865 nt = new h(c, N, s, o),
1866 it = "#525252",
1867 rt = "#3d3f42";
1868
1869 function st(e) {
1870 X = e.teams
1871 }
1872 var at = document.getElementById("featuredYoutube"),
1873 ot = [{
1874 name: "StormZ is TRASH",
1875 link: "bestgore.com"
1876 }],
1877 ct = ot[s.randInt(0, ot.length - 1)];
1878 at.innerHTML = "<a target='_blank' class='ytLink' href='" + ct.link + "'><i class='material-icons' style='vertical-align: top;'></i> " + ct.name + "</a>";
1879 var lt = !0,
1880 ht = !1,
1881 ut = !1;
1882
1883 function ft(e) {
1884 r.close(), dt(e)
1885 }
1886
1887 function dt(e) {
1888 he.style.display = "block", Be.style.display = "none", Me.style.display = "none", Ge.style.display = "none", Pe.style.display = "block", Pe.innerHTML = e + "<a href='javascript:window.location.href=window.location.href' class='ytLink'>reload</a>"
1889 }
1890 window.onblur = function () {
1891 lt = !1
1892 }, window.onfocus = function () {
1893 lt = !0, R && R.alive && yn()
1894 }, window.onload = function () {
1895 ht = !0, v(), setTimeout((function () {
1896 k || (alert("Captcha failed to load"), window.location.reload())
1897 }), 2e4)
1898 }, window.captchaCallback = function () {
1899 ut = !0, v()
1900 }, we.oncontextmenu = function () {
1901 return !1
1902 };
1903
1904 function pt() {
1905 var e, t, n = "",
1906 i = 0;
1907 for (var r in y.servers) {
1908 for (var s = y.servers[r], a = 0, c = 0; c < s.length; c++)
1909 for (var l = 0; l < s[c].games.length; l++) a += s[c].games[l].playerCount;
1910 i += a;
1911 var h = y.regionInfo[r].name;
1912 n += "<option disabled>" + h + " - " + a + " players</option>";
1913 for (var u = 0; u < s.length; u++)
1914 for (var f = s[u], d = 0; d < f.games.length; d++) {
1915 var p = f.games[d],
1916 g = 1 * f.index + d + 1,
1917 m = y.server && y.server.region === f.region && y.server.index === f.index && y.gameIndex == d,
1918 k = h + " " + g + " [" + Math.min(p.playerCount, o.maxPlayers) + "/" + Infinity + "]";
1919 let e = y.stripRegion(r) + ":" + u + ":" + d;
1920 m && (de.getElementsByTagName("span")[0].innerText = e), n += "<option value='" + e + "' " + (m ? "selected" : "") + ">" + k + "</option>"
1921 }
1922 n += "<option disabled></option>"
1923 }
1924 n += "<option disabled>All Servers - " + i + " players</option>", xe.innerHTML = n, "sandbox.moomoo.io" == location.hostname ? (e = "Back to MooMoo", t = "//moomoo.io/") : (e = "Try the sandbox", t = "//sandbox.moomoo.io/"), document.getElementById("altServer").innerHTML = "<a href='" + t + "'>" + e + "<i class='material-icons' style='font-size:10px;vertical-align:middle'>arrow_forward_ios</i></a>"
1925 }
1926
1927 function gt() {
1928 var e = new XMLHttpRequest;
1929 e.onreadystatechange = function () {
1930 4 == this.readyState && (200 == this.status ? (window.vultr = JSON.parse(this.responseText), y.processServers(vultr.servers), pt()) : console.error("Failed to load server data with status code:", this.status))
1931 }, e.open("GET", "/serverData", !0), e.send()
1932 }
1933 xe.addEventListener("change", s.checkTrusted((function () {
1934 let e = xe.value.split(":");
1935 y.switchServer(e[0], e[1], e[2])
1936 })));
1937 var mt = document.getElementById("pre-content-container"),
1938 yt = null,
1939 kt = null;
1940 window.cpmstarAPI((function (e) {
1941 e.game.setTarget(mt), kt = e
1942 }));
1943 var vt = 3e5,
1944 wt = 0,
1945 bt = 0;
1946
1947 function xt() {
1948 if (!cpmstarAPI || !kt) return console.log("Failed to load video ad API", !!cpmstarAPI, !!kt), void Tn();
1949 (yt = new kt.game.RewardedVideoView("rewardedvideo")).addEventListener("ad_closed", (function (e) {
1950 console.log("Video ad closed"), St()
1951 })), yt.addEventListener("loaded", (function (e) {
1952 console.log("Video ad loaded"), yt.show()
1953 })), yt.addEventListener("load_failed", (function (e) {
1954 console.log("Video ad load failed", e), St()
1955 })), yt.load(), mt.style.display = "block"
1956 }
1957
1958 function St() {
1959 mt.style.display = "none", Tn()
1960 }
1961
1962 function Tt(e, t, n) {
1963 if (R && e)
1964 if (s.removeAllChildren(Fe), Fe.classList.add("visible"), s.generateElement({
1965 id: "itemInfoName",
1966 text: s.capitalizeFirst(e.name),
1967 parent: Fe
1968 }), s.generateElement({
1969 id: "itemInfoDesc",
1970 text: e.desc,
1971 parent: Fe
1972 }), n);
1973 else if (t) s.generateElement({
1974 class: "itemInfoReq",
1975 text: e.type ? "secondary" : "primary",
1976 parent: Fe
1977 });
1978 else {
1979 for (var i = 0; i < e.req.length; i += 2) s.generateElement({
1980 class: "itemInfoReq",
1981 html: e.req[i] + "<span class='itemInfoReqVal'> x" + e.req[i + 1] + "</span>",
1982 parent: Fe
1983 });
1984 e.group.limit && s.generateElement({
1985 class: "itemInfoLmt",
1986 text: (R.itemCounts[e.group.id] || 0) + "/" + e.group.limit,
1987 parent: Fe
1988 })
1989 } else Fe.classList.remove("visible")
1990 }
1991 window.showPreAd = xt;
1992 var It, Et, Mt, At = [],
1993 Pt = [];
1994
1995 function Bt(e, t) {
1996 At.push({
1997 sid: e,
1998 name: t
1999 }), Ct()
2000 }
2001
2002 function Ct() {
2003 if (At[0]) {
2004 var e = At[0];
2005 s.removeAllChildren(Ze), Ze.style.display = "block", s.generateElement({
2006 class: "notificationText",
2007 text: e.name,
2008 parent: Ze
2009 }), s.generateElement({
2010 class: "notifButton",
2011 html: "<i class='material-icons' style='font-size:28px;color:#cc5151;'></i>",
2012 parent: Ze,
2013 onclick: function () {
2014 Dt(0)
2015 },
2016 hookTouch: !0
2017 }), s.generateElement({
2018 class: "notifButton",
2019 html: "<i class='material-icons' style='font-size:28px;color:#8ecc51;'></i>",
2020 parent: Ze,
2021 onclick: function () {
2022 Dt(1)
2023 },
2024 hookTouch: !0
2025 })
2026 } else Ze.style.display = "none"
2027 }
2028
2029 function Ot(e) {
2030 X.push(e), "block" == Ye.style.display && Ut()
2031 }
2032
2033 function Rt(e, t) {
2034 R && (R.team = e, R.isOwner = t, "block" == Ye.style.display && Ut())
2035 }
2036
2037 function jt(e) {
2038 Pt = e, "block" == Ye.style.display && Ut()
2039 }
2040
2041 function _t(e) {
2042 for (var t = X.length - 1; t >= 0; t--) X[t].sid == e && X.splice(t, 1);
2043 "block" == Ye.style.display && Ut()
2044 }
2045
2046 function Ut() {
2047 if (R && R.alive) {
2048 if (an(), Qe.style.display = "none", Ye.style.display = "block", s.removeAllChildren(We), R.team)
2049 for (var e = 0; e < Pt.length; e += 2) ! function (e) {
2050 var t = s.generateElement({
2051 class: "allianceItem",
2052 style: "color:" + (Pt[e] == R.sid ? "#fff" : "rgba(255,255,255,0.6)"),
2053 text: Pt[e + 1],
2054 parent: We
2055 });
2056 R.isOwner && Pt[e] != R.sid && s.generateElement({
2057 class: "joinAlBtn",
2058 text: "Kick",
2059 onclick: function () {
2060 Lt(Pt[e])
2061 },
2062 hookTouch: !0,
2063 parent: t
2064 })
2065 }(e);
2066 else if (X.length)
2067 for (e = 0; e < X.length; ++e) ! function (e) {
2068 var t = s.generateElement({
2069 class: "allianceItem",
2070 style: "color:" + (X[e].sid == R.team ? "#fff" : "rgba(255,255,255,0.6)"),
2071 text: X[e].sid,
2072 parent: We
2073 });
2074 s.generateElement({
2075 class: "joinAlBtn",
2076 text: "Join",
2077 onclick: function () {
2078 Ft(e)
2079 },
2080 hookTouch: !0,
2081 parent: t
2082 })
2083 }(e);
2084 else s.generateElement({
2085 class: "allianceItem",
2086 text: "No Tribes Yet",
2087 parent: We
2088 });
2089 s.removeAllChildren(Xe), R.team ? s.generateElement({
2090 class: "allianceButtonM",
2091 style: "width: 360px",
2092 text: R.isOwner ? "Delete Tribe" : "Leave Tribe",
2093 onclick: function () {
2094 Ht()
2095 },
2096 hookTouch: !0,
2097 parent: Xe
2098 }) : (s.generateElement({
2099 tag: "input",
2100 type: "text",
2101 id: "allianceInput",
2102 maxLength: 7,
2103 placeholder: "unique name",
2104 ontouchstart: function (e) {
2105 e.preventDefault();
2106 var t = prompt("unique name", e.currentTarget.value);
2107 e.currentTarget.value = t.slice(0, 7)
2108 },
2109 parent: Xe
2110 }), s.generateElement({
2111 tag: "div",
2112 class: "allianceButtonM",
2113 style: "width: 140px;",
2114 text: "Create",
2115 onclick: function () {
2116 zt()
2117 },
2118 hookTouch: !0,
2119 parent: Xe
2120 }))
2121 }
2122 }
2123
2124 function Dt(e) {
2125 r.send("11", At[0].sid, e), At.splice(0, 1), Ct()
2126 }
2127
2128 function Lt(e) {
2129 r.send("12", e)
2130 }
2131
2132 function Ft(e) {
2133 r.send("10", X[e].sid)
2134 }
2135
2136 function zt() {
2137 r.send("8", document.getElementById("allianceInput").value)
2138 }
2139
2140 function Ht() {
2141 At = [], Ct(), r.send("9")
2142 }
2143 var Vt, qt = [];
2144
2145 function Yt(e, t) {
2146 for (var n = 0; n < qt.length; ++n)
2147 if (!qt[n].active) {
2148 Vt = qt[n];
2149 break
2150 } Vt || (Vt = new function () {
2151 this.init = function (e, t) {
2152 this.scale = 0, this.x = e, this.y = t, this.active = !0
2153 }, this.update = function (e, t) {
2154 this.active && (this.scale += .05 * t, this.scale >= o.mapPingScale ? this.active = !1 : (e.globalAlpha = 1 - Math.max(0, this.scale / o.mapPingScale), e.beginPath(), e.arc(this.x / o.mapScale * Ne.width, this.y / o.mapScale * Ne.width, this.scale, 0, 2 * Math.PI), e.stroke()))
2155 }
2156 }, qt.push(Vt)), Vt.init(e, t)
2157 }
2158
2159 function Wt(e) {
2160 Et = e
2161 }
2162 var Xt = 0;
2163
2164 function Nt(e, t, n) {
2165 n ? e ? R.tailIndex = t : R.tails[t] = 1 : e ? R.skinIndex = t : R.skins[t] = 1, "block" == Qe.style.display && Gt()
2166 }
2167
2168 function Gt() {
2169 if (R) {
2170 s.removeAllChildren($e);
2171 for (var e = Xt, t = e ? tt : et, n = 0; n < t.length; ++n) t[n].dontSell || function (n) {
2172 var i = s.generateElement({
2173 id: "storeDisplay" + n,
2174 class: "storeItem",
2175 onmouseout: function () {
2176 Tt()
2177 },
2178 onmouseover: function () {
2179 Tt(t[n], !1, !0)
2180 },
2181 parent: $e
2182 });
2183 s.hookTouchEvents(i, !0), s.generateElement({
2184 tag: "img",
2185 class: "hatPreview",
2186 src: "../img/" + (e ? "accessories/access_" : "hats/hat_") + t[n].id + (t[n].topSprite ? "_p" : "") + ".png",
2187 parent: i
2188 }), s.generateElement({
2189 tag: "span",
2190 text: t[n].name,
2191 parent: i
2192 }), (e ? R.tails[t[n].id] : R.skins[t[n].id]) ? (e ? R.tailIndex : R.skinIndex) == t[n].id ? s.generateElement({
2193 class: "joinAlBtn",
2194 style: "margin-top: 5px",
2195 text: "Unequip",
2196 onclick: function () {
2197 Jt(0, e)
2198 },
2199 hookTouch: !0,
2200 parent: i
2201 }) : s.generateElement({
2202 class: "joinAlBtn",
2203 style: "margin-top: 5px",
2204 text: "Equip",
2205 onclick: function () {
2206 Jt(t[n].id, e)
2207 },
2208 hookTouch: !0,
2209 parent: i
2210 }) : (s.generateElement({
2211 class: "joinAlBtn",
2212 style: "margin-top: 5px",
2213 text: "Buy",
2214 onclick: function () {
2215 Kt(t[n].id, e)
2216 },
2217 hookTouch: !0,
2218 parent: i
2219 }), s.generateElement({
2220 tag: "span",
2221 class: "itemPrice",
2222 text: t[n].price,
2223 parent: i
2224 }))
2225 }(n)
2226 }
2227 }
2228
2229 function Jt(e, t) {
2230 r.send("13c", 0, e, t)
2231 }
2232
2233 function Kt(e, t) {
2234 r.send("13c", 1, e, t)
2235 }
2236
2237 function Qt() {
2238 Qe.style.display = "none", Ye.style.display = "none", an()
2239 }
2240
2241 function $t(e, t) {
2242 e && (t ? R.weapons = e : R.items = e);
2243 for (var n = 0; n < l.list.length; ++n) {
2244 var i = l.weapons.length + n;
2245 document.getElementById("actionBarItem" + i).style.display = R.items.indexOf(l.list[n].id) >= 0 ? "inline-block" : "none"
2246 }
2247 for (n = 0; n < l.weapons.length; ++n) document.getElementById("actionBarItem" + n).style.display = R.weapons[l.weapons[n].type] == l.weapons[n].id ? "inline-block" : "none"
2248 }
2249
2250 function Zt(e) {
2251 M = e, V = e && window.devicePixelRatio || 1, Se.checked = e, I("native_resolution", e.toString()), un()
2252 }
2253
2254 function en() {
2255 for (var e = "", t = 0; t < o.skinColors.length; ++t) e += t == ae ? "<div class='skinColorItem activeSkin' style='background-color:" + o.skinColors[t] + "' onclick='selectSkinColor(" + t + ")'></div>" : "<div class='skinColorItem' style='background-color:" + o.skinColors[t] + "' onclick='selectSkinColor(" + t + ")'></div>";
2256 Je.innerHTML = e
2257 }
2258 var tn = document.getElementById("chatBox"),
2259 nn = document.getElementById("chatHolder");
2260
2261 function rn() {
2262 on ? setTimeout((function () {
2263 var e = prompt("chat message");
2264 e && sn(e)
2265 }), 1) : "block" == nn.style.display ? (tn.value && sn(tn.value), an()) : (Qe.style.display = "none", Ye.style.display = "none", nn.style.display = "block", tn.focus(), yn()), tn.value = ""
2266 }
2267
2268 function sn(e) {
2269 r.send("ch", e.slice(0, 30))
2270 }
2271
2272 function an() {
2273 tn.value = "", nn.style.display = "none"
2274 }
2275 var on, cn, ln = [""];
2276
2277 function hn(e, t) {
2278 var n = Ii(e);
2279 n && (n.chatMessage = function(e) {
2280 for (var t, n = 0; n < ln.length; ++n)
2281 if (e.indexOf(ln[n]) > -1) {
2282 t = "";
2283 for (var i = 0; i < ln[n].length; ++i) t += t.length ? "" : "";
2284 var r = new RegExp(ln[n], "g");
2285 e = e.replace(r, t)
2286 } return e
2287 }(t), n.chatCountdown = o.chatCountdown)
2288 }
2289
2290 function un() {
2291 F = window.innerWidth, z = window.innerHeight;
2292 var e = Math.max(F / oe, z / ce) * V;
2293 we.width = F * V, we.height = z * V, we.style.width = F + "px", we.style.height = z + "px", be.setTransform(e, 0, 0, e, (F * V - oe * e) / 2, (z * V - ce * e) / 2)
2294 }
2295
2296 function fn(e) {
2297 (on = e) ? Ae.classList.add("touch"): Ae.classList.remove("touch")
2298 }
2299
2300 function dn(e) {
2301 e.preventDefault(), e.stopPropagation(), fn(!0);
2302 for (var t = 0; t < e.changedTouches.length; t++) {
2303 var n = e.changedTouches[t];
2304 n.identifier == re.id ? (re.id = -1, bn()) : n.identifier == se.id && (se.id = -1, R.buildIndex >= 0 && (O = 1, vn()), O = 0, vn())
2305 }
2306 }
2307
2308 function pn() {
2309 return R ? (-1 != se.id ? cn = Math.atan2(se.currentY - se.startY, se.currentX - se.startX) : R.lockDir || on || (cn = Math.atan2(ie - z / 2, ne - F / 2)), s.fixTo(cn || 0, 2)) : 0
2310 }
2311 window.addEventListener("resize", s.checkTrusted(un)), un(), fn(!1), window.setUsingTouch = fn, we.addEventListener("touchmove", s.checkTrusted((function (e) {
2312 e.preventDefault(), e.stopPropagation(), fn(!0);
2313 for (var t = 0; t < e.changedTouches.length; t++) {
2314 var n = e.changedTouches[t];
2315 n.identifier == re.id ? (re.currentX = n.pageX, re.currentY = n.pageY, bn()) : n.identifier == se.id && (se.currentX = n.pageX, se.currentY = n.pageY, O = 1)
2316 }
2317 })), !1), we.addEventListener("touchstart", s.checkTrusted((function (e) {
2318 e.preventDefault(), e.stopPropagation(), fn(!0);
2319 for (var t = 0; t < e.changedTouches.length; t++) {
2320 var n = e.changedTouches[t];
2321 n.pageX < document.body.scrollWidth / 2 && -1 == re.id ? (re.id = n.identifier, re.startX = re.currentX = n.pageX, re.startY = re.currentY = n.pageY, bn()) : n.pageX > document.body.scrollWidth / 2 && -1 == se.id && (se.id = n.identifier, se.startX = se.currentX = n.pageX, se.startY = se.currentY = n.pageY, R.buildIndex < 0 && (O = 1, vn()))
2322 }
2323 })), !1), we.addEventListener("touchend", s.checkTrusted(dn), !1), we.addEventListener("touchcancel", s.checkTrusted(dn), !1), we.addEventListener("touchleave", s.checkTrusted(dn), !1), we.addEventListener("mousemove", (function (e) {
2324 e.preventDefault(), e.stopPropagation(), fn(!1), ne = e.clientX, ie = e.clientY
2325 }), !1), we.addEventListener("mousedown", (function (e) {
2326 fn(!1), 1 != O && (O = 1, vn())
2327 }), !1), we.addEventListener("mouseup", (function (e) {
2328 fn(!1), 0 != O && (O = 0, vn())
2329 }), !1);
2330 var gn = {},
2331 mn = {
2332 87: [0, -1],
2333 38: [0, -1],
2334 83: [0, 1],
2335 40: [0, 1],
2336 65: [-1, 0],
2337 37: [-1, 0],
2338 68: [1, 0],
2339 39: [1, 0]
2340 };
2341
2342 function yn() {
2343 gn = {}, r.send("rmd")
2344 }
2345
2346 function kn() {
2347 return "block" != Ye.style.display && "block" != nn.style.display
2348 }
2349
2350 function vn() {
2351 R && R.alive && r.send("c", O, R.buildIndex >= 0 ? pn() : null)
2352 }
2353 window.addEventListener("keydown", s.checkTrusted((function (e) {
2354 var t = e.which || e.keyCode || 0;
2355 27 == t ? Qt() : R && R.alive && kn() && (gn[t] || (gn[t] = 1, 69 == t ? r.send("7", 1) : 67 == t ? (Mt || (Mt = {}), Mt.x = R.x, Mt.y = R.y) : 88 == t ? (R.lockDir = R.lockDir ? 0 : 1, r.send("7", 0)) : null != R.weapons[t - 49] ? Sn(R.weapons[t - 49], !0) : null != R.items[t - 49 - R.weapons.length] ? Sn(R.items[t - 49 - R.weapons.length]) : 81 == t ? Sn(R.items[0]) : 82 == t ? xn() : mn[t] ? bn() : 32 == t && (O = 1, vn())))
2356 }))), window.addEventListener("keyup", s.checkTrusted((function (e) {
2357 if (R && R.alive) {
2358 var t = e.which || e.keyCode || 0;
2359 13 == t ? rn() : kn() && gn[t] && (gn[t] = 0, mn[t] ? bn() : 32 == t && (O = 0, vn()))
2360 }
2361 })));
2362 var wn = void 0;
2363
2364 function bn() {
2365 var e = function () {
2366 var e = 0,
2367 t = 0;
2368 if (-1 != re.id) e += re.currentX - re.startX, t += re.currentY - re.startY;
2369 else
2370 for (var n in mn) {
2371 var i = mn[n];
2372 e += !!gn[n] * i[0], t += !!gn[n] * i[1]
2373 }
2374 return 0 == e && 0 == t ? void 0 : s.fixTo(Math.atan2(t, e), 2)
2375 }();
2376 (null == wn || null == e || Math.abs(e - wn) > .3) && (r.send("33", e), wn = e)
2377 }
2378
2379 function xn() {
2380 r.send("14", 1)
2381 }
2382
2383 function Sn(e, t) {
2384 r.send("5", e, t)
2385 }
2386
2387 function Tn() {
2388 I("moo_name", Le.value), !le && r.connected && (le = !0, x.stop("menu"), dt("Loading..."), r.send("sp", {
2389 name: Le.value,
2390 moofoll: 1,
2391 skin: ae
2392 }))
2393 }
2394 var In = !0;
2395
2396 function En(e) {
2397 Pe.style.display = "none", Me.style.display = "block", he.style.display = "none", gn = {}, j = e, O = 0, le = !0, In && (In = !1, N.length = 0)
2398 }
2399
2400 function Mn(e, t, n, i) {
2401 m.showText(e, t, 50, .18, 500, Math.abs(n), n >= 0 ? "#fff" : "#8ecc51")
2402 }
2403 var An = 99999;
2404
2405 function Pn() {
2406 le = !1;
2407 try {
2408 factorem.refreshAds([2], !0)
2409 } catch (e) {}
2410 Be.style.display = "none", Qt(), It = {
2411 x: R.x,
2412 y: R.y
2413 }, Pe.style.display = "none", Ge.style.display = "block", Ge.style.fontSize = "0px", An = 0, setTimeout((function () {
2414 Me.style.display = "block", he.style.display = "block", Ge.style.display = "none"
2415 }), o.deathFadeout), gt()
2416 }
2417
2418 function Bn(e) {
2419 R && nt.removeAllItems(e)
2420 }
2421
2422 function Cn(e) {
2423 nt.disableBySid(e)
2424 }
2425
2426 function On() {
2427 Oe.innerText = R.points, Re.innerText = R.food, je.innerText = R.wood, _e.innerText = R.stone, Ue.innerText = R.kills
2428 }
2429 var Rn = {},
2430 jn = ["crown", "skull"],
2431 _n = [];
2432
2433 function Un(e, t) {
2434 if (R.upgradePoints = e, R.upgrAge = t, e > 0) {
2435 _n.length = 0, s.removeAllChildren(Ve);
2436 for (var n = 0; n < l.weapons.length; ++n) l.weapons[n].age == t && (null == l.weapons[n].pre || R.weapons.indexOf(l.weapons[n].pre) >= 0) && (s.generateElement({
2437 id: "upgradeItem" + n,
2438 class: "actionBarItem",
2439 onmouseout: function () {
2440 Tt()
2441 },
2442 parent: Ve
2443 }).style.backgroundImage = document.getElementById("actionBarItem" + n).style.backgroundImage, _n.push(n));
2444 for (n = 0; n < l.list.length; ++n)
2445 if (l.list[n].age == t && (null == l.list[n].pre || R.items.indexOf(l.list[n].pre) >= 0)) {
2446 var i = l.weapons.length + n;
2447 s.generateElement({
2448 id: "upgradeItem" + i,
2449 class: "actionBarItem",
2450 onmouseout: function () {
2451 Tt()
2452 },
2453 parent: Ve
2454 }).style.backgroundImage = document.getElementById("actionBarItem" + i).style.backgroundImage, _n.push(i)
2455 } for (n = 0; n < _n.length; n++) ! function (e) {
2456 var t = document.getElementById("upgradeItem" + e);
2457 t.onmouseover = function () {
2458 l.weapons[e] ? Tt(l.weapons[e], !0) : Tt(l.list[e - l.weapons.length])
2459 }, t.onclick = s.checkTrusted((function () {
2460 r.send("6", e)
2461 })), s.hookTouchEvents(t)
2462 }(_n[n]);
2463 _n.length ? (Ve.style.display = "block", qe.style.display = "block", qe.innerHTML = "Items For Daddy : " + e + "") : (Ve.style.display = "none", qe.style.display = "none", Tt())
2464 } else Ve.style.display = "none", qe.style.display = "none", Tt()
2465 }
2466
2467 function Dn(e, t, n) {
2468 null != e && (R.XP = e), null != t && (R.maxXP = t), null != n && (R.age = n), n == o.maxAge ? (ze.innerHTML = "Max Age", He.style.width = "100%") : (ze.innerHTML = "Age " + R.age + " [" + R.XP + "/" + R.maxXP + "]", He.style.width = R.XP / R.maxXP * 100 + "%")
2469 }
2470
2471 function Ln(e) {
2472 s.removeAllChildren(De);
2473 for (var t = 1, n = 0; n < e.length; n += 3) ! function (n) {
2474 s.generateElement({
2475 class: "leaderHolder",
2476 parent: De,
2477 children: [s.generateElement({
2478 class: "leaderboardItem",
2479 style: "color:" + (e[n] == j ? "#fff" : "rgba(255,255,255,0.6)"),
2480 text: t + ". " + ("" != e[n + 1] ? e[n + 1] : "unknown")
2481 }), s.generateElement({
2482 class: "leaderScore",
2483 text: s.kFormat(e[n + 2]) || "0"
2484 })]
2485 })
2486 }(n), t++
2487 }
2488
2489 function Fn(e, t, n, i) {
2490 be.save(), be.setTransform(1, 0, 0, 1, 0, 0), be.scale(V, V);
2491 var r = 50;
2492 be.beginPath(), be.arc(e, t, r, 0, 2 * Math.PI, !1), be.closePath(), be.fillStyle = "rgba(255, 255, 255, 0.3)", be.fill(), r = 50;
2493 var s = n - e,
2494 a = i - t,
2495 o = Math.sqrt(Math.pow(s, 2) + Math.pow(a, 2)),
2496 c = o > r ? o / r : 1;
2497 s /= c, a /= c, be.beginPath(), be.arc(e + s, t + a, .5 * r, 0, 2 * Math.PI, !1), be.closePath(), be.fillStyle = "white", be.fill(), be.restore()
2498 }
2499
2500 function zn(e, t, n) {
2501 for (var i = 0; i < G.length; ++i)(_ = G[i]).active && _.layer == e && (_.update(P), _.active && ki(_.x - t, _.y - n, _.scale) && (be.save(), be.translate(_.x - t, _.y - n), be.rotate(_.dir), Vn(0, 0, _, be, 1), be.restore()))
2502 }
2503 var Hn = {};
2504
2505 function Vn(e, t, n, i, r) {
2506 if (n.src) {
2507 var s = l.projectiles[n.indx].src,
2508 a = Hn[s];
2509 a || ((a = new Image).onload = function () {
2510 this.isLoaded = !0
2511 }, a.src = ".././img/weapons/" + s + ".png", Hn[s] = a), a.isLoaded && i.drawImage(a, e - n.scale / 2, t - n.scale / 2, n.scale, n.scale)
2512 } else 1 == n.indx && (i.fillStyle = "#939393", si(e, t, n.scale, i))
2513 }
2514
2515 function qn(e, t, n, i) {
2516 var r = o.riverWidth + i,
2517 s = o.mapScale / 2 - t - r / 2;
2518 s < ce && s + r > 0 && n.fillRect(0, s, oe, r)
2519 }
2520
2521 function Yn(e, t, n) {
2522 for (var i, r, s, a = 0; a < N.length; ++a)(_ = N[a]).active && (r = _.x + _.xWiggle - t, s = _.y + _.yWiggle - n, 0 == e && _.update(P), _.layer == e && ki(r, s, _.scale + (_.blocker || 0)) && (be.globalAlpha = _.hideFromEnemy ? .6 : 1, _.isItem ? (i = ri(_), be.save(), be.translate(r, s), be.rotate(_.dir), be.drawImage(i, -i.width / 2, -i.height / 2), _.blocker && (be.strokeStyle = "#db6e6e", be.globalAlpha = .3, be.lineWidth = 6, si(0, 0, _.blocker, be, !1, !0)), be.restore()) : (i = ni(_), be.drawImage(i, r - i.width / 2, s - i.height / 2))))
2523 }
2524
2525 function Wn(e, t, n) {
2526 (_ = Ii(e)) && _.startAnim(t, n)
2527 }
2528
2529 function Xn(e, t, n) {
2530 be.globalAlpha = 1;
2531 for (var i = 0; i < W.length; ++i)(_ = W[i]).zIndex == n && (_.animate(P), _.visible && (_.skinRot += .002 * P, L = (_ == R ? pn() : _.dir) + _.dirPlus, be.save(), be.translate(_.x - e, _.y - t), be.rotate(L), Nn(_, be), be.restore()))
2532 }
2533
2534 function Nn(e, t) {
2535 (t = t || be).lineWidth = 5.5, t.lineJoin = "miter";
2536 var n = Math.PI / 4 * (l.weapons[e.weaponIndex].armS || 1),
2537 i = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndS || 1,
2538 r = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndD || 1;
2539 if (e.tailIndex > 0 && function (e, t, n) {
2540 if (!(Gn = Qn[e])) {
2541 var i = new Image;
2542 i.onload = function () {
2543 this.isLoaded = !0, this.onload = null
2544 }, i.src = ".././img/accessories/access_" + e + ".png", Qn[e] = i, Gn = i
2545 }
2546 var r = $n[e];
2547 if (!r) {
2548 for (var s = 0; s < tt.length; ++s)
2549 if (tt[s].id == e) {
2550 r = tt[s];
2551 break
2552 } $n[e] = r
2553 }
2554 Gn.isLoaded && (t.save(), t.translate(-20 - (r.xOff || 0), 0), r.spin && t.rotate(n.skinRot), t.drawImage(Gn, -r.scale / 2, -r.scale / 2, r.scale, r.scale), t.restore())
2555 }(e.tailIndex, t, e), e.buildIndex < 0 && !l.weapons[e.weaponIndex].aboveHand && (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale, 0, t), null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex].hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile], be)), t.fillStyle = o.skinColors[e.skinColor], si(e.scale * Math.cos(n), e.scale * Math.sin(n), 14), si(e.scale * r * Math.cos(-n * i), e.scale * r * Math.sin(-n * i), 14), e.buildIndex < 0 && l.weapons[e.weaponIndex].aboveHand && (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale, 0, t), null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex].hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile], be)), e.buildIndex >= 0) {
2556 var s = ri(l.list[e.buildIndex]);
2557 t.drawImage(s, e.scale - l.list[e.buildIndex].holdOffset, -s.width / 2)
2558 }
2559 si(0, 0, e.scale, t), e.skinIndex > 0 && (t.rotate(Math.PI / 2), function e(t, n, i, r) {
2560 if (!(Gn = Jn[t])) {
2561 var s = new Image;
2562 s.onload = function () {
2563 this.isLoaded = !0, this.onload = null
2564 }, s.src = ".././img/hats/hat_" + t + ".png", Jn[t] = s, Gn = s
2565 }
2566 var a = i || Kn[t];
2567 if (!a) {
2568 for (var o = 0; o < et.length; ++o)
2569 if (et[o].id == t) {
2570 a = et[o];
2571 break
2572 } Kn[t] = a
2573 }
2574 Gn.isLoaded && n.drawImage(Gn, -a.scale / 2, -a.scale / 2, a.scale, a.scale), !i && a.topSprite && (n.save(), n.rotate(r.skinRot), e(t + "_top", n, a, r), n.restore())
2575 }(e.skinIndex, t, null, e))
2576 }
2577 var Gn, Jn = {},
2578 Kn = {},
2579 Qn = {},
2580 $n = {},
2581 Zn = {};
2582
2583 function ei(e, t, n, i, r) {
2584 var s = e.src + (t || ""),
2585 a = Zn[s];
2586 a || ((a = new Image).onload = function () {
2587 this.isLoaded = !0
2588 }, a.src = ".././img/weapons/" + s + ".png", Zn[s] = a), a.isLoaded && r.drawImage(a, n + e.xOff - e.length / 2, i + e.yOff - e.width / 2, e.length, e.width)
2589 }
2590 var ti = {};
2591
2592 function ni(e) {
2593 var t = e.y >= o.mapScale - o.snowBiomeTop ? 2 : e.y <= o.snowBiomeTop ? 1 : 0,
2594 n = e.type + "_" + e.scale + "_" + t,
2595 i = ti[n];
2596 if (!i) {
2597 var r = document.createElement("canvas");
2598 r.width = r.height = 2.1 * e.scale + 5.5;
2599 var a = r.getContext("2d");
2600 if (a.translate(r.width / 2, r.height / 2), a.rotate(s.randFloat(0, Math.PI)), a.strokeStyle = it, a.lineWidth = 5.5, 0 == e.type)
2601 for (var c, l = 0; l < 2; ++l) ai(a, 7, c = _.scale * (l ? .5 : 1), .7 * c), a.fillStyle = t ? l ? "#fff" : "#e3f1f4" : l ? "#b4db62" : "#9ebf57", a.fill(), l || a.stroke();
2602 else if (1 == e.type)
2603 if (2 == t) a.fillStyle = "#606060", ai(a, 6, .3 * e.scale, .71 * e.scale), a.fill(), a.stroke(), a.fillStyle = "#89a54c", si(0, 0, .55 * e.scale, a), a.fillStyle = "#a5c65b", si(0, 0, .3 * e.scale, a, !0);
2604 else {
2605 var h;
2606 ! function (e, t, n, i) {
2607 var r, a = Math.PI / 2 * 3,
2608 o = Math.PI / 6;
2609 e.beginPath(), e.moveTo(0, -i);
2610 for (var c = 0; c < 6; c++) r = s.randInt(n + .9, 1.2 * n), e.quadraticCurveTo(Math.cos(a + o) * r, Math.sin(a + o) * r, Math.cos(a + 2 * o) * i, Math.sin(a + 2 * o) * i), a += 2 * o;
2611 e.lineTo(0, -i), e.closePath()
2612 }(a, 0, _.scale, .7 * _.scale), a.fillStyle = t ? "#e3f1f4" : "#89a54c", a.fill(), a.stroke(), a.fillStyle = t ? "#6a64af" : "#c15555";
2613 var u = T / 4;
2614 for (l = 0; l < 4; ++l) si((h = s.randInt(_.scale / 3.5, _.scale / 2.3)) * Math.cos(u * l), h * Math.sin(u * l), s.randInt(10, 12), a)
2615 }
2616 else 2 != e.type && 3 != e.type || (a.fillStyle = 2 == e.type ? 2 == t ? "#938d77" : "#939393" : "#e0c655", ai(a, 3, e.scale, e.scale), a.fill(), a.stroke(), a.fillStyle = 2 == e.type ? 2 == t ? "#b2ab90" : "#bcbcbc" : "#ebdca3", ai(a, 3, .55 * e.scale, .65 * e.scale), a.fill());
2617 i = r, ti[n] = i
2618 }
2619 return i
2620 }
2621 var ii = [];
2622
2623 function ri(e, t) {
2624 var n = ii[e.id];
2625 if (!n || t) {
2626 var i = document.createElement("canvas");
2627 i.width = i.height = 2.5 * e.scale + 5.5 + (l.list[e.id].spritePadding || 0);
2628 var r = i.getContext("2d");
2629 if (r.translate(i.width / 2, i.height / 2), r.rotate(t ? 0 : Math.PI / 2), r.strokeStyle = it, r.lineWidth = 5.5 * (t ? i.width / 81 : 1), "apple" == e.name) {
2630 r.fillStyle = "#c15555", si(0, 0, e.scale, r), r.fillStyle = "#89a54c";
2631 var a = -Math.PI / 2;
2632 ! function (e, t, n, i, r) {
2633 var s = e + 25 * Math.cos(i),
2634 a = t + 25 * Math.sin(i);
2635 r.moveTo(e, t), r.beginPath(), r.quadraticCurveTo((e + s) / 2 + 10 * Math.cos(i + Math.PI / 2), (t + a) / 2 + 10 * Math.sin(i + Math.PI / 2), s, a), r.quadraticCurveTo((e + s) / 2 - 10 * Math.cos(i + Math.PI / 2), (t + a) / 2 - 10 * Math.sin(i + Math.PI / 2), e, t), r.closePath(), r.fill(), r.stroke()
2636 }(e.scale * Math.cos(a), e.scale * Math.sin(a), 0, a + Math.PI / 2, r)
2637 } else if ("cookie" == e.name) {
2638 r.fillStyle = "#cca861", si(0, 0, e.scale, r), r.fillStyle = "#937c4b";
2639 for (var o = T / (h = 4), c = 0; c < h; ++c) si((u = s.randInt(e.scale / 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(4, 5), r, !0)
2640 } else if ("cheese" == e.name) {
2641 var h, u;
2642 for (r.fillStyle = "#f4f3ac", si(0, 0, e.scale, r), r.fillStyle = "#c3c28b", o = T / (h = 4), c = 0; c < h; ++c) si((u = s.randInt(e.scale / 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(4, 5), r, !0)
2643 } else if ("wood wall" == e.name || "stone wall" == e.name || "castle wall" == e.name) {
2644 r.fillStyle = "castle wall" == e.name ? "#83898e" : "wood wall" == e.name ? "#a5974c" : "#939393";
2645 var f = "castle wall" == e.name ? 4 : 3;
2646 ai(r, f, 1.1 * e.scale, 1.1 * e.scale), r.fill(), r.stroke(), r.fillStyle = "castle wall" == e.name ? "#9da4aa" : "wood wall" == e.name ? "#c9b758" : "#bcbcbc", ai(r, f, .65 * e.scale, .65 * e.scale), r.fill()
2647 } else if ("spikes" == e.name || "greater spikes" == e.name || "poison spikes" == e.name || "spinning spikes" == e.name) {
2648 r.fillStyle = "poison spikes" == e.name ? "#7b935d" : "#939393";
2649 var d = .6 * e.scale;
2650 ai(r, "spikes" == e.name ? 5 : 6, e.scale, d), r.fill(), r.stroke(), r.fillStyle = "#a5974c", si(0, 0, d, r), r.fillStyle = "#c9b758", si(0, 0, d / 2, r, !0)
2651 } else if ("windmill" == e.name || "faster windmill" == e.name || "power mill" == e.name) r.fillStyle = "#a5974c", si(0, 0, e.scale, r), r.fillStyle = "#c9b758", ci(0, 0, 1.5 * e.scale, 29, 4, r), r.fillStyle = "#a5974c", si(0, 0, .5 * e.scale, r);
2652 else if ("mine" == e.name) r.fillStyle = "#939393", ai(r, 3, e.scale, e.scale), r.fill(), r.stroke(), r.fillStyle = "#bcbcbc", ai(r, 3, .55 * e.scale, .65 * e.scale), r.fill();
2653 else if ("sapling" == e.name)
2654 for (c = 0; c < 2; ++c) ai(r, 7, d = e.scale * (c ? .5 : 1), .7 * d), r.fillStyle = c ? "#b4db62" : "#9ebf57", r.fill(), c || r.stroke();
2655 else if ("pit trap" == e.name) r.fillStyle = "#a5974c", ai(r, 3, 1.1 * e.scale, 1.1 * e.scale), r.fill(), r.stroke(), r.fillStyle = it, ai(r, 3, .65 * e.scale, .65 * e.scale), r.fill();
2656 else if ("boost pad" == e.name) r.fillStyle = "#7e7f82", oi(0, 0, 2 * e.scale, 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#dbd97d",
2657 function (e, t) {
2658 t = t || be;
2659 var n = e * (Math.sqrt(3) / 2);
2660 t.beginPath(), t.moveTo(0, -n / 2), t.lineTo(-e / 2, n / 2), t.lineTo(e / 2, n / 2), t.lineTo(0, -n / 2), t.fill(), t.closePath()
2661 }(1 * e.scale, r);
2662 else if ("turret" == e.name) r.fillStyle = "#a5974c", si(0, 0, e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#939393", oi(0, -25, .9 * e.scale, 50, r), si(0, 0, .6 * e.scale, r), r.fill(), r.stroke();
2663 else if ("platform" == e.name) {
2664 r.fillStyle = "#cebd5f";
2665 var p = 2 * e.scale,
2666 g = p / 4,
2667 m = -e.scale / 2;
2668 for (c = 0; c < 4; ++c) oi(m - g / 2, 0, g, 2 * e.scale, r), r.fill(), r.stroke(), m += p / 4
2669 } else "healing pad" == e.name ? (r.fillStyle = "#7e7f82", oi(0, 0, 2 * e.scale, 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#db6e6e", ci(0, 0, .65 * e.scale, 20, 4, r, !0)) : "spawn pad" == e.name ? (r.fillStyle = "#7e7f82", oi(0, 0, 2 * e.scale, 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#71aad6", si(0, 0, .6 * e.scale, r)) : "blocker" == e.name ? (r.fillStyle = "#7e7f82", si(0, 0, e.scale, r), r.fill(), r.stroke(), r.rotate(Math.PI / 4), r.fillStyle = "#db6e6e", ci(0, 0, .65 * e.scale, 20, 4, r, !0)) : "teleporter" == e.name && (r.fillStyle = "#7e7f82", si(0, 0, e.scale, r), r.fill(), r.stroke(), r.rotate(Math.PI / 4), r.fillStyle = "#d76edb", si(0, 0, .5 * e.scale, r, !0));
2670 n = i, t || (ii[e.id] = n)
2671 }
2672 return n
2673 }
2674
2675 function si(e, t, n, i, r, s) {
2676 (i = i || be).beginPath(), i.arc(e, t, n, 0, 2 * Math.PI), s || i.fill(), r || i.stroke()
2677 }
2678
2679 function ai(e, t, n, i) {
2680 var r, s, a = Math.PI / 2 * 3,
2681 o = Math.PI / t;
2682 e.beginPath(), e.moveTo(0, -n);
2683 for (var c = 0; c < t; c++) r = Math.cos(a) * n, s = Math.sin(a) * n, e.lineTo(r, s), a += o, r = Math.cos(a) * i, s = Math.sin(a) * i, e.lineTo(r, s), a += o;
2684 e.lineTo(0, -n), e.closePath()
2685 }
2686
2687 function oi(e, t, n, i, r, s) {
2688 r.fillRect(e - n / 2, t - i / 2, n, i), s || r.strokeRect(e - n / 2, t - i / 2, n, i)
2689 }
2690
2691 function ci(e, t, n, i, r, s, a) {
2692 s.save(), s.translate(e, t), r = Math.ceil(r / 2);
2693 for (var o = 0; o < r; o++) oi(0, 0, 2 * n, i, s, a), s.rotate(Math.PI / r);
2694 s.restore()
2695 }
2696
2697 function li(e) {
2698 for (var t = 0; t < e.length;) nt.add(e[t], e[t + 1], e[t + 2], e[t + 3], e[t + 4], e[t + 5], l.list[e[t + 6]], !0, e[t + 7] >= 0 ? {
2699 sid: e[t + 7]
2700 } : null), t += 8
2701 }
2702
2703 function hi(e, t) {
2704 (_ = Mi(t)) && (_.xWiggle += o.gatherWiggle * Math.cos(e), _.yWiggle += o.gatherWiggle * Math.sin(e))
2705 }
2706
2707 function ui(e, t) {
2708 (_ = Mi(e)) && (_.dir = t, _.xWiggle += o.gatherWiggle * Math.cos(t + Math.PI), _.yWiggle += o.gatherWiggle * Math.sin(t + Math.PI))
2709 }
2710
2711 function fi(e, t, n, i, r, s, a, o) {
2712 lt && (J.addProjectile(e, t, n, i, r, s, null, null, a).sid = o)
2713 }
2714
2715 function di(e, t) {
2716 for (var n = 0; n < G.length; ++n) G[n].sid == e && (G[n].range = t)
2717 }
2718
2719 function pi(e) {
2720 (_ = Ei(e)) && _.startAnim()
2721 }
2722
2723 function gi(e) {
2724 for (var t = 0; t < Y.length; ++t) Y[t].forcePos = !Y[t].visible, Y[t].visible = !1;
2725 if (e) {
2726 var n = Date.now();
2727 for (t = 0; t < e.length;)(_ = Ei(e[t])) ? (_.index = e[t + 1], _.t1 = void 0 === _.t2 ? n : _.t2, _.t2 = n, _.x1 = _.x, _.y1 = _.y, _.x2 = e[t + 2], _.y2 = e[t + 3], _.d1 = void 0 === _.d2 ? e[t + 4] : _.d2, _.d2 = e[t + 4], _.health = e[t + 5], _.dt = 0, _.visible = !0) : ((_ = Z.spawn(e[t + 2], e[t + 3], e[t + 4], e[t + 1])).x2 = _.x, _.y2 = _.y, _.d2 = _.dir, _.health = e[t + 5], Z.aiTypes[e[t + 1]].name || (_.name = o.cowNames[e[t + 6]]), _.forcePos = !0, _.sid = e[t], _.visible = !0), t += 7
2728 }
2729 }
2730 var mi = {};
2731
2732 function yi(e, t) {
2733 var n = e.index,
2734 i = mi[n];
2735 if (!i) {
2736 var r = new Image;
2737 r.onload = function () {
2738 this.isLoaded = !0, this.onload = null
2739 }, r.src = ".././img/animals/" + e.src + ".png", i = r, mi[n] = i
2740 }
2741 if (i.isLoaded) {
2742 var s = 1.2 * e.scale * (e.spriteMlt || 1);
2743 t.drawImage(i, -s, -s, 2 * s, 2 * s)
2744 }
2745 }
2746
2747 function ki(e, t, n) {
2748 return e + n >= 0 && e - n <= oe && t + n >= 0 && t - n <= ce
2749 }
2750
2751 function vi(e, t) {
2752 var n = function (e) {
2753 for (var t = 0; t < W.length; ++t)
2754 if (W[t].id == e) return W[t];
2755 return null
2756 }(e[0]);
2757 n || (n = new u(e[0], e[1], o, s, J, nt, W, Y, l, et, tt), W.push(n)), n.spawn(t ? H : null), n.visible = !1, n.x2 = void 0, n.y2 = void 0, n.setData(e), t && (U = (R = n).x, D = R.y, $t(), On(), Dn(), Un(0), Be.style.display = "block")
2758 }
2759
2760 function wi(e) {
2761 for (var t = 0; t < W.length; t++)
2762 if (W[t].id == e) {
2763 W.splice(t, 1);
2764 break
2765 }
2766 }
2767
2768 function bi(e, t) {
2769 R && (R.itemCounts[e] = t)
2770 }
2771
2772 function xi(e, t, n) {
2773 R && (R[e] = t, n && On())
2774 }
2775
2776 function Si(e, t) {
2777 (_ = Ii(e)) && (_.health = t)
2778 }
2779
2780 function Ti(e) {
2781 for (var t = Date.now(), n = 0; n < W.length; ++n) W[n].forcePos = !W[n].visible, W[n].visible = !1;
2782 for (n = 0; n < e.length;)(_ = Ii(e[n])) && (_.t1 = void 0 === _.t2 ? t : _.t2, _.t2 = t, _.x1 = _.x, _.y1 = _.y, _.x2 = e[n + 1], _.y2 = e[n + 2], _.d1 = void 0 === _.d2 ? e[n + 3] : _.d2, _.d2 = e[n + 3], _.dt = 0, _.buildIndex = e[n + 4], _.weaponIndex = e[n + 5], _.weaponVariant = e[n + 6], _.team = e[n + 7], _.isLeader = e[n + 8], _.skinIndex = e[n + 9], _.tailIndex = e[n + 10], _.iconIndex = e[n + 11], _.zIndex = e[n + 12], _.visible = !0), n += 13
2783 }
2784
2785 function Ii(e) {
2786 for (var t = 0; t < W.length; ++t)
2787 if (W[t].sid == e) return W[t];
2788 return null
2789 }
2790
2791 function Ei(e) {
2792 for (var t = 0; t < Y.length; ++t)
2793 if (Y[t].sid == e) return Y[t];
2794 return null
2795 }
2796
2797 function Mi(e) {
2798 for (var t = 0; t < N.length; ++t)
2799 if (N[t].sid == e) return N[t];
2800 return null
2801 }
2802 var Ai = -1;
2803
2804 function Pi() {
2805 var e = Date.now() - Ai;
2806 window.pingTime = e, Ie.innerText = "Ping: " + e + " ms"
2807 }
2808
2809 function Bi() {
2810 Ai = Date.now(), r.send("pp")
2811 }
2812
2813 function Ci(e) {
2814 if (!(e < 0)) {
2815 var t = Math.floor(e / 60),
2816 n = e % 60;
2817 n = ("0" + n).slice(-2), Ee.innerText = "Server will be crashed in " + t + ":" + n, Ee.hidden = !1
2818 }
2819 }
2820
2821 function Oi(e) {
2822 window.open(e, "_blank")
2823 }
2824 window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (e) {
2825 window.setTimeout(e, 1e3 / 60)
2826 },
2827 function () {
2828 var e = o.mapScale / 2;
2829 nt.add(0, e, e + 200, 0, o.treeScales[3], 0), nt.add(1, e, e - 480, 0, o.treeScales[3], 0), nt.add(2, e + 300, e + 450, 0, o.treeScales[3], 0), nt.add(3, e - 950, e - 130, 0, o.treeScales[2], 0), nt.add(4, e - 750, e - 400, 0, o.treeScales[3], 0), nt.add(5, e - 700, e + 400, 0, o.treeScales[2], 0), nt.add(6, e + 800, e - 200, 0, o.treeScales[3], 0), nt.add(7, e - 260, e + 340, 0, o.bushScales[3], 1), nt.add(8, e + 760, e + 310, 0, o.bushScales[3], 1), nt.add(9, e - 800, e + 100, 0, o.bushScales[3], 1), nt.add(10, e - 800, e + 300, 0, l.list[4].scale, l.list[4].id, l.list[10]), nt.add(11, e + 650, e - 390, 0, l.list[4].scale, l.list[4].id, l.list[10]), nt.add(12, e - 400, e - 450, 0, o.rockScales[2], 2)
2830 }(),
2831 function e() {
2832 B = Date.now(), P = B - q, q = B,
2833 function () {
2834 if (R && (!C || B - C >= 1e3 / o.clientSendRate) && (C = B, r.send("2", pn())), An < 120 && (An += .1 * P, Ge.style.fontSize = Math.min(Math.round(An), 120) + "px"), R) {
2835 var e = s.getDistance(U, D, R.x, R.y),
2836 t = s.getDirection(R.x, R.y, U, D),
2837 n = Math.min(.01 * e * P, e);
2838 e > .05 ? (U += n * Math.cos(t), D += n * Math.sin(t)) : (U = R.x, D = R.y)
2839 } else U = o.mapScale / 2, D = o.mapScale / 2;
2840 for (var i = B - 1e3 / o.serverUpdateRate, a = 0; a < W.length + Y.length; ++a)
2841 if ((_ = W[a] || Y[a - W.length]) && _.visible)
2842 if (_.forcePos) _.x = _.x2, _.y = _.y2, _.dir = _.d2;
2843 else {
2844 var c = _.t2 - _.t1,
2845 l = (i - _.t1) / c;
2846 _.dt += P;
2847 var h = Math.min(1.7, _.dt / 170),
2848 u = _.x2 - _.x1;
2849 _.x = _.x1 + u * h, u = _.y2 - _.y1, _.y = _.y1 + u * h, _.dir = Math.lerpAngle(_.d2, _.d1, Math.min(1.2, l))
2850 } var f = U - oe / 2,
2851 d = D - ce / 2;
2852 o.snowBiomeTop - d <= 0 && o.mapScale - o.snowBiomeTop - d >= ce ? (be.fillStyle = "#b6db66", be.fillRect(0, 0, oe, ce)) : o.mapScale - o.snowBiomeTop - d <= 0 ? (be.fillStyle = "#dbc666", be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop - d >= ce ? (be.fillStyle = "#fff", be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop - d >= 0 ? (be.fillStyle = "#fff", be.fillRect(0, 0, oe, o.snowBiomeTop - d), be.fillStyle = "#b6db66", be.fillRect(0, o.snowBiomeTop - d, oe, ce - (o.snowBiomeTop - d))) : (be.fillStyle = "#b6db66", be.fillRect(0, 0, oe, o.mapScale - o.snowBiomeTop - d), be.fillStyle = "#dbc666", be.fillRect(0, o.mapScale - o.snowBiomeTop - d, oe, ce - (o.mapScale - o.snowBiomeTop - d))), In || ((ee += te * o.waveSpeed * P) >= o.waveMax ? (ee = o.waveMax, te = -1) : ee <= 1 && (ee = te = 1), be.globalAlpha = 1, be.fillStyle = "#dbc666", qn(f, d, be, o.riverPadding), be.fillStyle = "#91b2db", qn(f, d, be, 250 * (ee - 1))), be.lineWidth = 4, be.strokeStyle = "#000", be.globalAlpha = .06, be.beginPath();
2853 for (var p = -U; p < oe; p += ce / 18) p > 0 && (be.moveTo(p, 0), be.lineTo(p, ce));
2854 for (var g = -D; g < ce; g += ce / 18) p > 0 && (be.moveTo(0, g), be.lineTo(oe, g));
2855 for (be.stroke(), be.globalAlpha = 1, be.strokeStyle = it, Yn(-1, f, d), be.globalAlpha = 1, be.lineWidth = 5.5, zn(0, f, d), Xn(f, d, 0), be.globalAlpha = 1, a = 0; a < Y.length; ++a)(_ = Y[a]).active && _.visible && (_.animate(P), be.save(), be.translate(_.x - f, _.y - d), be.rotate(_.dir + _.dirPlus - Math.PI / 2), yi(_, be), be.restore());
2856 if (Yn(0, f, d), zn(1, f, d), Yn(1, f, d), Xn(f, d, 1), Yn(2, f, d), Yn(3, f, d), be.fillStyle = "#000", be.globalAlpha = .09, f <= 0 && be.fillRect(0, 0, -f, ce), o.mapScale - f <= oe) {
2857 var y = Math.max(0, -d);
2858 be.fillRect(o.mapScale - f, y, oe - (o.mapScale - f), ce - y)
2859 }
2860 if (d <= 0 && be.fillRect(-f, 0, oe + f, -d), o.mapScale - d <= ce) {
2861 var k = Math.max(0, -f),
2862 v = 0;
2863 o.mapScale - f <= oe && (v = oe - (o.mapScale - f)), be.fillRect(k, o.mapScale - d, oe - k - v, ce - (o.mapScale - d))
2864 }
2865 for (be.globalAlpha = 1, be.fillStyle = "rgba(0, 0, 70, 0.35)", be.fillRect(0, 0, oe, ce), be.strokeStyle = rt, a = 0; a < W.length + Y.length; ++a)
2866 if ((_ = W[a] || Y[a - W.length]).visible && (10 != _.skinIndex || _ ==
2867 R || _.team && _.team == R.team)) {
2868 var w = (_.team ? "[" + _.team + "] " : "") + (_.isPlayer&&_.sid? "" : "") + (" " + _.name|| "");
2869 if ("" != w) {
2870 if (be.font = (_.nameScale || 30) + "px Hammersmith One", be.fillStyle = namecolor ,
2871 be.textBaseline = "middle", be.textAlign = "center", be.lineWidth =
2872 _.nameScale ? 10 : 7, be.lineJoin = "round", be.strokeStyle = "black", be.strokeText(w, _.x -
2873 f, _.y - d - _.scale - o.nameY), be.fillText(w, _.x - f, _.y - d -
2874 _.scale - o.nameY), _.isLeader && Rn.crown.isLoaded) {
2875 var b = o.crownIconScale;
2876 k = _.x - f - b / 2 - be.measureText(w).width / 2 - o.crownPad, be.drawImage(
2877 Rn.crown, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b)
2878 }
2879 1 == _.iconIndex && Rn.skull.isLoaded && (b = o.crownIconScale, k = _
2880 .x - f - b / 2 + be.measureText(w).width / 2 + o.crownPad, be.drawImage(
2881 Rn.skull, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b))
2882 }
2883 window.w = R.weapons;
2884 var HP1234 = ("HP: " + _.health + "/" + _.maxHealth);
2885 var r1213 = Math.floor(Math.random() * (256));
2886 var g1213 = Math.floor(Math.random() * (256));
2887 var b1213 = Math.floor(Math.random() * (256));
2888 var color = '#' + r1213.toString(16) + g1213.toString(16) + b1213.toString(16);
2889 (be.textAlign = "center",
2890 be.fillStyle = "#fff",
2891 be.font = "20px Hammersmith One",
2892 be.strokeStyle = "black",
2893 be.lineWidth = HP,
2894 be.strokeText(HP1234 ,_.x - f,_.y - d + _.scale + o.nameY+(HP1)),
2895 be.fillText(HP1234 ,_.x - f,_.y - d + _.scale + o.nameY+(HP1))
2896 )
2897 if(_.isPlayer&&_!=R&&_.team&&_.team==R.team){//tribe tracers
2898 be.lineCap = "round";
2899 be.strokeStyle = clancolor;
2900 be.lineWidth = clanRadar;
2901 be.beginPath();
2902 be.moveTo(R.x-f, R.y-d);
2903 be.lineTo(_.x-f, _.y-d);
2904 be.stroke();
2905 be.strokeStyle = nt;
2906 }
2907 if(_.isPlayer&&_!=R&&(_.team!=R.team||!_.team)){//enemy tracers
2908 be.lineCap = "round";
2909 be.strokeStyle = EnemyTracer;
2910 be.lineWidth = enemyRadar;
2911 be.beginPath();
2912 be.moveTo(R.x-f, R.y-d);
2913 be.lineTo(_.x-f, _.y-d);
2914 be.stroke();
2915 be.strokeStyle = nt;
2916 }
2917 if(!_.isPlayer){//animal tracers
2918 be.lineCap = "round";
2919 be.strokeStyle = animalcolor;
2920 be.lineWidth = animalRadar;
2921 be.beginPath();
2922 be.moveTo(R.x-f, R.y-d);
2923 be.lineTo(_.x-f, _.y-d);
2924 be.stroke();
2925 be.strokeStyle = nt;
2926 }
2927 if(_.isPlayer&&_.isLeader){//leader tracers
2928 be.lineCap = "round";
2929 be.strokeStyle = leadercolor;
2930 be.lineWidth = leaderRadar;
2931 be.beginPath();
2932 be.moveTo(R.x-f, R.y-d);
2933 be.lineTo(_.x-f, _.y-d);
2934 be.stroke();
2935 be.strokeStyle = nt;
2936 }
2937 if(_.isPlayer&&_.skull){//best killer tracers
2938 be.lineCap = "round";
2939 be.strokeStyle = killercolor;
2940 be.lineWidth = killerRadar;
2941 be.beginPath();
2942 be.moveTo(R.x-f, R.y-d);
2943 be.lineTo(_.x-f, _.y-d);
2944 be.stroke();
2945 be.strokeStyle = nt;
2946 }
2947 if(_!=R&&_.isPlayer) {
2948 be.font = (_.nameScale || 25) + "px Hammersmith One", // Name & HP on tracers
2949 be.fillStyle = "#fff",
2950 be.textBaseline = "middle",
2951 be.textAlign = "center",
2952 be.lineWidth = _.nameScale ? 11 : 8,
2953 be.lineJoin = "round",
2954 be.strokeStyle = "black"
2955 }
2956 if(!_.isPlayer) {
2957 be.font = (_.nameScale || 25) + "px Hammersmith One",
2958 be.fillStyle = "#fff",
2959 be.textBaseline = "middle",
2960 be.textAlign = "center",
2961 be.lineWidth = _.nameScale ? 11 : 8,
2962 be.lineJoin = "round",
2963 be.strokeStyle = "black"
2964 }
2965 _.health > 0 && (o.healthBarWidth, be.fillStyle = rt, be.roundRect(_.x - f - o.healthBarWidth - o.healthBarPad, _.y - d + _.scale + o.nameY, 2 * o.healthBarWidth + 2 * o.healthBarPad, 17, 8), be.fill(), be.fillStyle = _ == R || _.team && _.team == R.team ? Healthbarcolor : Healthbarcolor2, be.roundRect(_.x - f - o.healthBarWidth, _.y - d + _.scale + o.nameY + o.healthBarPad, 2 * o.healthBarWidth * (_.health / _.maxHealth), 17 - 2 * o.healthBarPad, 7), be.fill())
2966 } for (m.update(P, be, f, d), a = 0; a < W.length; ++a)
2967 if ((_ = W[a]).visible && _.chatCountdown > 0) {
2968 _.chatCountdown -= P, _.chatCountdown <= 0 && (_.chatCountdown = 0), be.font = "32px Hammersmith One";
2969 var x = be.measureText(_.chatMessage);
2970 be.textBaseline = "middle", be.textAlign = "center", k = _.x - f, y = _.y - _.scale - d - 90;
2971 var S = x.width + 17;
2972 be.fillStyle = "rgba(0,0,0,0.2)", be.roundRect(k - S / 2, y - 23.5, S, 47, 6), be.fill(), be.fillStyle = "#fff", be.fillText(_.chatMessage, k, y)
2973 }!
2974 function (e) {
2975 if (R && R.alive) {
2976 Ke.clearRect(0, 0, Ne.width, Ne.height), Ke.strokeStyle = "#fff", Ke.lineWidth = 4;
2977 for (var t = 0; t < qt.length; ++t)(Vt = qt[t]).update(Ke, e);
2978 if (Ke.globalAlpha = 1, Ke.fillStyle = "#fff", si(R.x / o.mapScale * Ne.width, R.y / o.mapScale * Ne.height, 7, Ke, !0), Ke.fillStyle = "rgba(255,255,255,0.35)", R.team && Et)
2979 for (t = 0; t < Et.length;) si(Et[t] / o.mapScale * Ne.width, Et[t + 1] / o.mapScale * Ne.height, 7, Ke, !0), t += 2;
2980 It && (Ke.fillStyle = "#fc5553", Ke.font = "34px Hammersmith One", Ke.textBaseline = "middle", Ke.textAlign = "center", Ke.fillText("x", It.x / o.mapScale * Ne.width, It.y / o.mapScale * Ne.height)), Mt && (Ke.fillStyle = "#fff", Ke.font = "34px Hammersmith One", Ke.textBaseline = "middle", Ke.textAlign = "center", Ke.fillText("x", Mt.x / o.mapScale * Ne.width, Mt.y / o.mapScale * Ne.height))
2981 }
2982 }(P), -1 !== re.id && Fn(re.startX, re.startY, re.currentX, re.currentY), -1 !== se.id && Fn(se.startX, se.startY, se.currentX, se.currentY)
2983 }(), requestAnimFrame(e)
2984 }(), window.openLink = Oi, window.aJoinReq = Dt, window.follmoo = function () {
2985 H || (H = !0, I("moofoll", 1))
2986 }, window.kickFromClan = Lt, window.sendJoin = Ft, window.leaveAlliance = Ht, window.createAlliance = zt, window.storeBuy = Kt, window.storeEquip = Jt, window.showItemInfo = Tt, window.selectSkinColor = function (e) {
2987 ae = e, en()
2988 }, window.changeStoreIndex = function (e) {
2989 Xt != e && (Xt = e, Gt())
2990 }, window.config = o
2991 }, function (e, t) {
2992 ! function (e, t, n) {
2993 function i(e, t) {
2994 return typeof e === t
2995 }
2996 var r = [],
2997 s = [],
2998 a = {
2999 _version: "3.5.0",
3000 _config: {
3001 classPrefix: "",
3002 enableClasses: !0,
3003 enableJSClass: !0,
3004 usePrefixes: !0
3005 },
3006 _q: [],
3007 on: function (e, t) {
3008 var n = this;
3009 setTimeout((function () {
3010 t(n[e])
3011 }), 0)
3012 },
3013 addTest: function (e, t, n) {
3014 s.push({
3015 name: e,
3016 fn: t,
3017 options: n
3018 })
3019 },
3020 addAsyncTest: function (e) {
3021 s.push({
3022 name: null,
3023 fn: e
3024 })
3025 }
3026 },
3027 o = function () {};
3028 o.prototype = a, o = new o;
3029 var c = t.documentElement,
3030 l = "svg" === c.nodeName.toLowerCase();
3031 o.addTest("passiveeventlisteners", (function () {
3032 var t = !1;
3033 try {
3034 var n = Object.defineProperty({}, "passive", {
3035 get: function () {
3036 t = !0
3037 }
3038 });
3039 e.addEventListener("test", null, n)
3040 } catch (e) {}
3041 return t
3042 })),
3043 function () {
3044 var e, t, n, a, c, l;
3045 for (var h in s)
3046 if (s.hasOwnProperty(h)) {
3047 if (e = [], (t = s[h]).name && (e.push(t.name.toLowerCase()), t.options && t.options.aliases && t.options.aliases.length))
3048 for (n = 0; n < t.options.aliases.length; n++) e.push(t.options.aliases[n].toLowerCase());
3049 for (a = i(t.fn, "function") ? t.fn() : t.fn, c = 0; c < e.length; c++) 1 === (l = e[c].split(".")).length ? o[l[0]] = a : (!o[l[0]] || o[l[0]] instanceof Boolean || (o[l[0]] = new Boolean(o[l[0]])), o[l[0]][l[1]] = a), r.push((a ? "" : "no-") + l.join("-"))
3050 }
3051 }(),
3052 function (e) {
3053 var t = c.className,
3054 n = o._config.classPrefix || "";
3055 if (l && (t = t.baseVal), o._config.enableJSClass) {
3056 var i = new RegExp("(^|\\s)" + n + "no-js(\\s|$)");
3057 t = t.replace(i, "$1" + n + "js$2")
3058 }
3059 o._config.enableClasses && (t += " " + n + e.join(" " + n), l ? c.className.baseVal = t : c.className = t)
3060 }(r), delete a.addTest, delete a.addAsyncTest;
3061 for (var h = 0; h < o._q.length; h++) o._q[h]();
3062 e.Modernizr = o
3063 }(window, document)
3064 }, function (e, t, n) {
3065 var i = n(24);
3066 n(19), e.exports = {
3067 socket: null,
3068 connected: !1,
3069 socketId: -1,
3070 connect: function (e, t, n) {
3071 if (!this.socket) {
3072 var r = this;
3073 try {
3074 var s = !1,
3075 a = e;
3076 this.socket = new WebSocket(a), this.socket.binaryType = "arraybuffer", this.socket.onmessage = function (e) {
3077 var t = new Uint8Array(e.data),
3078 s = i.decode(t),
3079 a = s[0];
3080 t = s[1], "io-init" == a ? r.socketId = t[0] : n[a].apply(void 0, t)
3081 }, this.socket.onopen = function () {
3082 r.connected = !0, t()
3083 }, this.socket.onclose = function (e) {
3084 r.connected = !1, 4001 == e.code ? t("Invalid Connection") : s || t("Disconnected...")
3085 }, this.socket.onerror = function (e) {
3086 this.socket && this.socket.readyState != WebSocket.OPEN && (s = !0, console.error("Socket error", arguments), t("Socket error"))
3087 }
3088 } catch (e) {
3089 console.warn("Socket connection error:", e), t(e)
3090 }
3091 }
3092 },
3093 send: function (e) {
3094 var t = Array.prototype.slice.call(arguments, 1),
3095 n = i.encode([e, t]);
3096 this.socket.send(n)
3097 },
3098 socketReady: function () {
3099 return this.socket && this.connected
3100 },
3101 close: function () {
3102 this.socket && this.socket.close()
3103 }
3104 }
3105 }, function (e, t, n) {
3106 t.encode = n(9).encode, t.decode = n(15).decode, t.Encoder = n(37).Encoder, t.Decoder = n(38).Decoder, t.createCodec = n(39).createCodec, t.codec = n(40).codec
3107 }, function (e, t, n) {
3108 (function (t) {
3109 function n(e) {
3110 return e && e.isBuffer && e
3111 }
3112 e.exports = n(void 0 !== t && t) || n(this.Buffer) || n("undefined" != typeof window && window.Buffer) || this.Buffer
3113 }).call(this, n(11).Buffer)
3114 }, function (e, t, n) {
3115 "use strict";
3116 t.byteLength = function (e) {
3117 var t = l(e),
3118 n = t[0],
3119 i = t[1];
3120 return 3 * (n + i) / 4 - i
3121 }, t.toByteArray = function (e) {
3122 var t, n, i = l(e),
3123 a = i[0],
3124 o = i[1],
3125 c = new s(function (e, t, n) {
3126 return 3 * (t + n) / 4 - n
3127 }(0, a, o)),
3128 h = 0,
3129 u = o > 0 ? a - 4 : a;
3130 for (n = 0; n < u; n += 4) t = r[e.charCodeAt(n)] << 18 | r[e.charCodeAt(n + 1)] << 12 | r[e.charCodeAt(n + 2)] << 6 | r[e.charCodeAt(n + 3)], c[h++] = t >> 16 & 255, c[h++] = t >> 8 & 255, c[h++] = 255 & t;
3131 return 2 === o && (t = r[e.charCodeAt(n)] << 2 | r[e.charCodeAt(n + 1)] >> 4, c[h++] = 255 & t), 1 === o && (t = r[e.charCodeAt(n)] << 10 | r[e.charCodeAt(n + 1)] << 4 | r[e.charCodeAt(n + 2)] >> 2, c[h++] = t >> 8 & 255, c[h++] = 255 & t), c
3132 }, t.fromByteArray = function (e) {
3133 for (var t, n = e.length, r = n % 3, s = [], a = 0, o = n - r; a < o; a += 16383) s.push(u(e, a, a + 16383 > o ? o : a + 16383));
3134 return 1 === r ? (t = e[n - 1], s.push(i[t >> 2] + i[t << 4 & 63] + "==")) : 2 === r && (t = (e[n - 2] << 8) + e[n - 1], s.push(i[t >> 10] + i[t >> 4 & 63] + i[t << 2 & 63] + "=")), s.join("")
3135 };
3136 for (var i = [], r = [], s = "undefined" != typeof Uint8Array ? Uint8Array : Array, a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0, c = a.length; o < c; ++o) i[o] = a[o], r[a.charCodeAt(o)] = o;
3137
3138 function l(e) {
3139 var t = e.length;
3140 if (t % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
3141 var n = e.indexOf("=");
3142 return -1 === n && (n = t), [n, n === t ? 0 : 4 - n % 4]
3143 }
3144
3145 function h(e) {
3146 return i[e >> 18 & 63] + i[e >> 12 & 63] + i[e >> 6 & 63] + i[63 & e]
3147 }
3148
3149 function u(e, t, n) {
3150 for (var i, r = [], s = t; s < n; s += 3) i = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (255 & e[s + 2]), r.push(h(i));
3151 return r.join("")
3152 }
3153 r["-".charCodeAt(0)] = 62, r["_".charCodeAt(0)] = 63
3154 }, function (e, t) {
3155 var n = {}.toString;
3156 e.exports = Array.isArray || function (e) {
3157 return "[object Array]" == n.call(e)
3158 }
3159 }, function (e, t, n) {
3160 var i = n(0);
3161
3162 function r(e) {
3163 return new Array(e)
3164 }(t = e.exports = r(0)).alloc = r, t.concat = i.concat, t.from = function (e) {
3165 if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
3166 else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
3167 else {
3168 if ("string" == typeof e) return i.from.call(t, e);
3169 if ("number" == typeof e) throw new TypeError('"value" argument must not be a number')
3170 }
3171 return Array.prototype.slice.call(e)
3172 }
3173 }, function (e, t, n) {
3174 var i = n(0),
3175 r = i.global;
3176
3177 function s(e) {
3178 return new r(e)
3179 }(t = e.exports = i.hasBuffer ? s(0) : []).alloc = i.hasBuffer && r.alloc || s, t.concat = i.concat, t.from = function (e) {
3180 if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
3181 else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
3182 else {
3183 if ("string" == typeof e) return i.from.call(t, e);
3184 if ("number" == typeof e) throw new TypeError('"value" argument must not be a number')
3185 }
3186 return r.from && 1 !== r.from.length ? r.from(e) : new r(e)
3187 }
3188 }, function (e, t, n) {
3189 var i = n(0);
3190
3191 function r(e) {
3192 return new Uint8Array(e)
3193 }(t = e.exports = i.hasArrayBuffer ? r(0) : []).alloc = r, t.concat = i.concat, t.from = function (e) {
3194 if (i.isView(e)) {
3195 var n = e.byteOffset,
3196 r = e.byteLength;
3197 (e = e.buffer).byteLength !== r && (e.slice ? e = e.slice(n, n + r) : (e = new Uint8Array(e)).byteLength !== r && (e = Array.prototype.slice.call(e, n, n + r)))
3198 } else {
3199 if ("string" == typeof e) return i.from.call(t, e);
3200 if ("number" == typeof e) throw new TypeError('"value" argument must not be a number')
3201 }
3202 return new Uint8Array(e)
3203 }
3204 }, function (e, t) {
3205 t.copy = function (e, t, n, i) {
3206 var r;
3207 n || (n = 0), i || 0 === i || (i = this.length), t || (t = 0);
3208 var s = i - n;
3209 if (e === this && n < t && t < i)
3210 for (r = s - 1; r >= 0; r--) e[r + t] = this[r + n];
3211 else
3212 for (r = 0; r < s; r++) e[r + t] = this[r + n];
3213 return s
3214 }, t.toString = function (e, t, n) {
3215 var i = 0 | t;
3216 n || (n = this.length);
3217 for (var r = "", s = 0; i < n;)(s = this[i++]) < 128 ? r += String.fromCharCode(s) : (192 == (224 & s) ? s = (31 & s) << 6 | 63 & this[i++] : 224 == (240 & s) ? s = (15 & s) << 12 | (63 & this[i++]) << 6 | 63 & this[i++] : 240 == (248 & s) && (s = (7 & s) << 18 | (63 & this[i++]) << 12 | (63 & this[i++]) << 6 | 63 & this[i++]), s >= 65536 ? (s -= 65536, r += String.fromCharCode(55296 + (s >>> 10), 56320 + (1023 & s))) : r += String.fromCharCode(s));
3218 return r
3219 }, t.write = function (e, t) {
3220 for (var n = t || (t |= 0), i = e.length, r = 0, s = 0; s < i;)(r = e.charCodeAt(s++)) < 128 ? this[n++] = r : r < 2048 ? (this[n++] = 192 | r >>> 6, this[n++] = 128 | 63 & r) : r < 55296 || r > 57343 ? (this[n++] = 224 | r >>> 12, this[n++] = 128 | r >>> 6 & 63, this[n++] = 128 | 63 & r) : (r = 65536 + (r - 55296 << 10 | e.charCodeAt(s++) - 56320), this[n++] = 240 | r >>> 18, this[n++] = 128 | r >>> 12 & 63, this[n++] = 128 | r >>> 6 & 63, this[n++] = 128 | 63 & r);
3221 return n - t
3222 }
3223 }, function (e, t, n) {
3224 t.setExtPackers = function (e) {
3225 e.addExtPacker(14, Error, [u, c]), e.addExtPacker(1, EvalError, [u, c]), e.addExtPacker(2, RangeError, [u, c]), e.addExtPacker(3, ReferenceError, [u, c]), e.addExtPacker(4, SyntaxError, [u, c]), e.addExtPacker(5, TypeError, [u, c]), e.addExtPacker(6, URIError, [u, c]), e.addExtPacker(10, RegExp, [h, c]), e.addExtPacker(11, Boolean, [l, c]), e.addExtPacker(12, String, [l, c]), e.addExtPacker(13, Date, [Number, c]), e.addExtPacker(15, Number, [l, c]), "undefined" != typeof Uint8Array && (e.addExtPacker(17, Int8Array, a), e.addExtPacker(18, Uint8Array, a), e.addExtPacker(19, Int16Array, a), e.addExtPacker(20, Uint16Array, a), e.addExtPacker(21, Int32Array, a), e.addExtPacker(22, Uint32Array, a), e.addExtPacker(23, Float32Array, a), "undefined" != typeof Float64Array && e.addExtPacker(24, Float64Array, a), "undefined" != typeof Uint8ClampedArray && e.addExtPacker(25, Uint8ClampedArray, a), e.addExtPacker(26, ArrayBuffer, a), e.addExtPacker(29, DataView, a)), r.hasBuffer && e.addExtPacker(27, s, r.from)
3226 };
3227 var i, r = n(0),
3228 s = r.global,
3229 a = r.Uint8Array.from,
3230 o = {
3231 name: 1,
3232 message: 1,
3233 stack: 1,
3234 columnNumber: 1,
3235 fileName: 1,
3236 lineNumber: 1
3237 };
3238
3239 function c(e) {
3240 return i || (i = n(9).encode), i(e)
3241 }
3242
3243 function l(e) {
3244 return e.valueOf()
3245 }
3246
3247 function h(e) {
3248 (e = RegExp.prototype.toString.call(e).split("/")).shift();
3249 var t = [e.pop()];
3250 return t.unshift(e.join("/")), t
3251 }
3252
3253 function u(e) {
3254 var t = {};
3255 for (var n in o) t[n] = e[n];
3256 return t
3257 }
3258 }, function (e, t, n) {
3259 var i = n(5),
3260 r = n(7),
3261 s = r.Uint64BE,
3262 a = r.Int64BE,
3263 o = n(0),
3264 c = n(6),
3265 l = n(34),
3266 h = n(13).uint8,
3267 u = n(3).ExtBuffer,
3268 f = "undefined" != typeof Uint8Array,
3269 d = "undefined" != typeof Map,
3270 p = [];
3271 p[1] = 212, p[2] = 213, p[4] = 214, p[8] = 215, p[16] = 216, t.getWriteType = function (e) {
3272 var t = l.getWriteToken(e),
3273 n = e && e.useraw,
3274 r = f && e && e.binarraybuffer,
3275 g = r ? o.isArrayBuffer : o.isBuffer,
3276 m = r ? function (e, t) {
3277 w(e, new Uint8Array(t))
3278 } : w,
3279 y = d && e && e.usemap ? function (e, n) {
3280 if (!(n instanceof Map)) return b(e, n);
3281 var i = n.size;
3282 t[i < 16 ? 128 + i : i <= 65535 ? 222 : 223](e, i);
3283 var r = e.codec.encode;
3284 n.forEach((function (t, n, i) {
3285 r(e, n), r(e, t)
3286 }))
3287 } : b;
3288 return {
3289 boolean: function (e, n) {
3290 t[n ? 195 : 194](e, n)
3291 },
3292 function: v,
3293 number: function (e, n) {
3294 var i = 0 | n;
3295 n === i ? t[-32 <= i && i <= 127 ? 255 & i : 0 <= i ? i <= 255 ? 204 : i <= 65535 ? 205 : 206 : -128 <= i ? 208 : -32768 <= i ? 209 : 210](e, i) : t[203](e, n)
3296 },
3297 object: n ? function (e, n) {
3298 if (g(n)) return function (e, n) {
3299 var i = n.length;
3300 t[i < 32 ? 160 + i : i <= 65535 ? 218 : 219](e, i), e.send(n)
3301 }(e, n);
3302 k(e, n)
3303 } : k,
3304 string: function (e) {
3305 return function (n, i) {
3306 var r = i.length,
3307 s = 5 + 3 * r;
3308 n.offset = n.reserve(s);
3309 var a = n.buffer,
3310 o = e(r),
3311 l = n.offset + o;
3312 r = c.write.call(a, i, l);
3313 var h = e(r);
3314 if (o !== h) {
3315 var u = l + h - o,
3316 f = l + r;
3317 c.copy.call(a, a, u, l, f)
3318 }
3319 t[1 === h ? 160 + r : h <= 3 ? 215 + h : 219](n, r), n.offset += r
3320 }
3321 }(n ? function (e) {
3322 return e < 32 ? 1 : e <= 65535 ? 3 : 5
3323 } : function (e) {
3324 return e < 32 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5
3325 }),
3326 symbol: v,
3327 undefined: v
3328 };
3329
3330 function k(e, n) {
3331 if (null === n) return v(e, n);
3332 if (g(n)) return m(e, n);
3333 if (i(n)) return function (e, n) {
3334 var i = n.length;
3335 t[i < 16 ? 144 + i : i <= 65535 ? 220 : 221](e, i);
3336 for (var r = e.codec.encode, s = 0; s < i; s++) r(e, n[s])
3337 }(e, n);
3338 if (s.isUint64BE(n)) return function (e, n) {
3339 t[207](e, n.toArray())
3340 }(e, n);
3341 if (a.isInt64BE(n)) return function (e, n) {
3342 t[211](e, n.toArray())
3343 }(e, n);
3344 var r = e.codec.getExtPacker(n);
3345 if (r && (n = r(n)), n instanceof u) return function (e, n) {
3346 var i = n.buffer,
3347 r = i.length,
3348 s = p[r] || (r < 255 ? 199 : r <= 65535 ? 200 : 201);
3349 t[s](e, r), h[n.type](e), e.send(i)
3350 }(e, n);
3351 y(e, n)
3352 }
3353
3354 function v(e, n) {
3355 t[192](e, n)
3356 }
3357
3358 function w(e, n) {
3359 var i = n.length;
3360 t[i < 255 ? 196 : i <= 65535 ? 197 : 198](e, i), e.send(n)
3361 }
3362
3363 function b(e, n) {
3364 var i = Object.keys(n),
3365 r = i.length;
3366 t[r < 16 ? 128 + r : r <= 65535 ? 222 : 223](e, r);
3367 var s = e.codec.encode;
3368 i.forEach((function (t) {
3369 s(e, t), s(e, n[t])
3370 }))
3371 }
3372 }
3373 }, function (e, t, n) {
3374 var i = n(4),
3375 r = n(7),
3376 s = r.Uint64BE,
3377 a = r.Int64BE,
3378 o = n(13).uint8,
3379 c = n(0),
3380 l = c.global,
3381 h = c.hasBuffer && "TYPED_ARRAY_SUPPORT" in l && !l.TYPED_ARRAY_SUPPORT,
3382 u = c.hasBuffer && l.prototype || {};
3383
3384 function f() {
3385 var e = o.slice();
3386 return e[196] = d(196), e[197] = p(197), e[198] = g(198), e[199] = d(199), e[200] = p(200), e[201] = g(201), e[202] = m(202, 4, u.writeFloatBE || v, !0), e[203] = m(203, 8, u.writeDoubleBE || w, !0), e[204] = d(204), e[205] = p(205), e[206] = g(206), e[207] = m(207, 8, y), e[208] = d(208), e[209] = p(209), e[210] = g(210), e[211] = m(211, 8, k), e[217] = d(217), e[218] = p(218), e[219] = g(219), e[220] = p(220), e[221] = g(221), e[222] = p(222), e[223] = g(223), e
3387 }
3388
3389 function d(e) {
3390 return function (t, n) {
3391 var i = t.reserve(2),
3392 r = t.buffer;
3393 r[i++] = e, r[i] = n
3394 }
3395 }
3396
3397 function p(e) {
3398 return function (t, n) {
3399 var i = t.reserve(3),
3400 r = t.buffer;
3401 r[i++] = e, r[i++] = n >>> 8, r[i] = n
3402 }
3403 }
3404
3405 function g(e) {
3406 return function (t, n) {
3407 var i = t.reserve(5),
3408 r = t.buffer;
3409 r[i++] = e, r[i++] = n >>> 24, r[i++] = n >>> 16, r[i++] = n >>> 8, r[i] = n
3410 }
3411 }
3412
3413 function m(e, t, n, i) {
3414 return function (r, s) {
3415 var a = r.reserve(t + 1);
3416 r.buffer[a++] = e, n.call(r.buffer, s, a, i)
3417 }
3418 }
3419
3420 function y(e, t) {
3421 new s(this, t, e)
3422 }
3423
3424 function k(e, t) {
3425 new a(this, t, e)
3426 }
3427
3428 function v(e, t) {
3429 i.write(this, e, t, !1, 23, 4)
3430 }
3431
3432 function w(e, t) {
3433 i.write(this, e, t, !1, 52, 8)
3434 }
3435 t.getWriteToken = function (e) {
3436 return e && e.uint8array ? function () {
3437 var e = f();
3438 return e[202] = m(202, 4, v), e[203] = m(203, 8, w), e
3439 }() : h || c.hasBuffer && e && e.safe ? function () {
3440 var e = o.slice();
3441 return e[196] = m(196, 1, l.prototype.writeUInt8), e[197] = m(197, 2, l.prototype.writeUInt16BE), e[198] = m(198, 4, l.prototype.writeUInt32BE), e[199] = m(199, 1, l.prototype.writeUInt8), e[200] = m(200, 2, l.prototype.writeUInt16BE), e[201] = m(201, 4, l.prototype.writeUInt32BE), e[202] = m(202, 4, l.prototype.writeFloatBE), e[203] = m(203, 8, l.prototype.writeDoubleBE), e[204] = m(204, 1, l.prototype.writeUInt8), e[205] = m(205, 2, l.prototype.writeUInt16BE), e[206] = m(206, 4, l.prototype.writeUInt32BE), e[207] = m(207, 8, y), e[208] = m(208, 1, l.prototype.writeInt8), e[209] = m(209, 2, l.prototype.writeInt16BE), e[210] = m(210, 4, l.prototype.writeInt32BE), e[211] = m(211, 8, k), e[217] = m(217, 1, l.prototype.writeUInt8), e[218] = m(218, 2, l.prototype.writeUInt16BE), e[219] = m(219, 4, l.prototype.writeUInt32BE), e[220] = m(220, 2, l.prototype.writeUInt16BE), e[221] = m(221, 4, l.prototype.writeUInt32BE), e[222] = m(222, 2, l.prototype.writeUInt16BE), e[223] = m(223, 4, l.prototype.writeUInt32BE), e
3442 }() : f()
3443 }
3444 }, function (e, t, n) {
3445 t.setExtUnpackers = function (e) {
3446 e.addExtUnpacker(14, [o, l(Error)]), e.addExtUnpacker(1, [o, l(EvalError)]), e.addExtUnpacker(2, [o, l(RangeError)]), e.addExtUnpacker(3, [o, l(ReferenceError)]), e.addExtUnpacker(4, [o, l(SyntaxError)]), e.addExtUnpacker(5, [o, l(TypeError)]), e.addExtUnpacker(6, [o, l(URIError)]), e.addExtUnpacker(10, [o, c]), e.addExtUnpacker(11, [o, h(Boolean)]), e.addExtUnpacker(12, [o, h(String)]), e.addExtUnpacker(13, [o, h(Date)]), e.addExtUnpacker(15, [o, h(Number)]), "undefined" != typeof Uint8Array && (e.addExtUnpacker(17, h(Int8Array)), e.addExtUnpacker(18, h(Uint8Array)), e.addExtUnpacker(19, [u, h(Int16Array)]), e.addExtUnpacker(20, [u, h(Uint16Array)]), e.addExtUnpacker(21, [u, h(Int32Array)]), e.addExtUnpacker(22, [u, h(Uint32Array)]), e.addExtUnpacker(23, [u, h(Float32Array)]), "undefined" != typeof Float64Array && e.addExtUnpacker(24, [u, h(Float64Array)]), "undefined" != typeof Uint8ClampedArray && e.addExtUnpacker(25, h(Uint8ClampedArray)), e.addExtUnpacker(26, u), e.addExtUnpacker(29, [u, h(DataView)])), r.hasBuffer && e.addExtUnpacker(27, h(s))
3447 };
3448 var i, r = n(0),
3449 s = r.global,
3450 a = {
3451 name: 1,
3452 message: 1,
3453 stack: 1,
3454 columnNumber: 1,
3455 fileName: 1,
3456 lineNumber: 1
3457 };
3458
3459 function o(e) {
3460 return i || (i = n(15).decode), i(e)
3461 }
3462
3463 function c(e) {
3464 return RegExp.apply(null, e)
3465 }
3466
3467 function l(e) {
3468 return function (t) {
3469 var n = new e;
3470 for (var i in a) n[i] = t[i];
3471 return n
3472 }
3473 }
3474
3475 function h(e) {
3476 return function (t) {
3477 return new e(t)
3478 }
3479 }
3480
3481 function u(e) {
3482 return new Uint8Array(e).buffer
3483 }
3484 }, function (e, t, n) {
3485 var i = n(17);
3486
3487 function r(e) {
3488 var t, n = new Array(256);
3489 for (t = 0; t <= 127; t++) n[t] = s(t);
3490 for (t = 128; t <= 143; t++) n[t] = o(t - 128, e.map);
3491 for (t = 144; t <= 159; t++) n[t] = o(t - 144, e.array);
3492 for (t = 160; t <= 191; t++) n[t] = o(t - 160, e.str);
3493 for (n[192] = s(null), n[193] = null, n[194] = s(!1), n[195] = s(!0), n[196] = a(e.uint8, e.bin), n[197] = a(e.uint16, e.bin), n[198] = a(e.uint32, e.bin), n[199] = a(e.uint8, e.ext), n[200] = a(e.uint16, e.ext), n[201] = a(e.uint32, e.ext), n[202] = e.float32, n[203] = e.float64, n[204] = e.uint8, n[205] = e.uint16, n[206] = e.uint32, n[207] = e.uint64, n[208] = e.int8, n[209] = e.int16, n[210] = e.int32, n[211] = e.int64, n[212] = o(1, e.ext), n[213] = o(2, e.ext), n[214] = o(4, e.ext), n[215] = o(8, e.ext), n[216] = o(16, e.ext), n[217] = a(e.uint8, e.str), n[218] = a(e.uint16, e.str), n[219] = a(e.uint32, e.str), n[220] = a(e.uint16, e.array), n[221] = a(e.uint32, e.array), n[222] = a(e.uint16, e.map), n[223] = a(e.uint32, e.map), t = 224; t <= 255; t++) n[t] = s(t - 256);
3494 return n
3495 }
3496
3497 function s(e) {
3498 return function () {
3499 return e
3500 }
3501 }
3502
3503 function a(e, t) {
3504 return function (n) {
3505 var i = e(n);
3506 return t(n, i)
3507 }
3508 }
3509
3510 function o(e, t) {
3511 return function (n) {
3512 return t(n, e)
3513 }
3514 }
3515 t.getReadToken = function (e) {
3516 var t = i.getReadFormat(e);
3517 return e && e.useraw ? function (e) {
3518 var t, n = r(e).slice();
3519 for (n[217] = n[196], n[218] = n[197], n[219] = n[198], t = 160; t <= 191; t++) n[t] = o(t - 160, e.bin);
3520 return n
3521 }(t) : r(t)
3522 }
3523 }, function (e, t, n) {
3524 t.Encoder = s;
3525 var i = n(18),
3526 r = n(10).EncodeBuffer;
3527
3528 function s(e) {
3529 if (!(this instanceof s)) return new s(e);
3530 r.call(this, e)
3531 }
3532 s.prototype = new r, i.mixin(s.prototype), s.prototype.encode = function (e) {
3533 this.write(e), this.emit("data", this.read())
3534 }, s.prototype.end = function (e) {
3535 arguments.length && this.encode(e), this.flush(), this.emit("end")
3536 }
3537 }, function (e, t, n) {
3538 t.Decoder = s;
3539 var i = n(18),
3540 r = n(16).DecodeBuffer;
3541
3542 function s(e) {
3543 if (!(this instanceof s)) return new s(e);
3544 r.call(this, e)
3545 }
3546 s.prototype = new r, i.mixin(s.prototype), s.prototype.decode = function (e) {
3547 arguments.length && this.write(e), this.flush()
3548 }, s.prototype.push = function (e) {
3549 this.emit("data", e)
3550 }, s.prototype.end = function (e) {
3551 this.decode(e), this.emit("end")
3552 }
3553 }, function (e, t, n) {
3554 n(8), n(2), t.createCodec = n(1).createCodec
3555 }, function (e, t, n) {
3556 n(8), n(2), t.codec = {
3557 preset: n(1).preset
3558 }
3559 }, function (e, t) {
3560 var n, i, r = e.exports = {};
3561
3562 function s() {
3563 throw new Error("setTimeout has not been defined")
3564 }
3565
3566 function a() {
3567 throw new Error("clearTimeout has not been defined")
3568 }
3569
3570 function o(e) {
3571 if (n === setTimeout) return setTimeout(e, 0);
3572 if ((n === s || !n) && setTimeout) return n = setTimeout, setTimeout(e, 0);
3573 try {
3574 return n(e, 0)
3575 } catch (t) {
3576 try {
3577 return n.call(null, e, 0)
3578 } catch (t) {
3579 return n.call(this, e, 0)
3580 }
3581 }
3582 }! function () {
3583 try {
3584 n = "function" == typeof setTimeout ? setTimeout : s
3585 } catch (e) {
3586 n = s
3587 }
3588 try {
3589 i = "function" == typeof clearTimeout ? clearTimeout : a
3590 } catch (e) {
3591 i = a
3592 }
3593 }();
3594 var c, l = [],
3595 h = !1,
3596 u = -1;
3597
3598 function f() {
3599 h && c && (h = !1, c.length ? l = c.concat(l) : u = -1, l.length && d())
3600 }
3601
3602 function d() {
3603 if (!h) {
3604 var e = o(f);
3605 h = !0;
3606 for (var t = l.length; t;) {
3607 for (c = l, l = []; ++u < t;) c && c[u].run();
3608 u = -1, t = l.length
3609 }
3610 c = null, h = !1,
3611 function (e) {
3612 if (i === clearTimeout) return clearTimeout(e);
3613 if ((i === a || !i) && clearTimeout) return i = clearTimeout, clearTimeout(e);
3614 try {
3615 i(e)
3616 } catch (t) {
3617 try {
3618 return i.call(null, e)
3619 } catch (t) {
3620 return i.call(this, e)
3621 }
3622 }
3623 }(e)
3624 }
3625 }
3626
3627 function p(e, t) {
3628 this.fun = e, this.array = t
3629 }
3630
3631 function g() {}
3632 r.nextTick = function (e) {
3633 var t = new Array(arguments.length - 1);
3634 if (arguments.length > 1)
3635 for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
3636 l.push(new p(e, t)), 1 !== l.length || h || o(d)
3637 }, p.prototype.run = function () {
3638 this.fun.apply(null, this.array)
3639 }, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [], r.version = "", r.versions = {}, r.on = g, r.addListener = g, r.once = g, r.off = g, r.removeListener = g, r.removeAllListeners = g, r.emit = g, r.prependListener = g, r.prependOnceListener = g, r.listeners = function (e) {
3640 return []
3641 }, r.binding = function (e) {
3642 throw new Error("process.binding is not supported")
3643 }, r.cwd = function () {
3644 return "/"
3645 }, r.chdir = function (e) {
3646 throw new Error("process.chdir is not supported")
3647 }, r.umask = function () {
3648 return 0
3649 }
3650 }, function (e, t) {
3651 var n = Math.abs,
3652 i = (Math.cos, Math.sin, Math.pow, Math.sqrt),
3653 r = (n = Math.abs, Math.atan2),
3654 s = Math.PI;
3655 e.exports.randInt = function (e, t) {
3656 return Math.floor(Math.random() * (t - e + 1)) + e
3657 }, e.exports.randFloat = function (e, t) {
3658 return Math.random() * (t - e + 1) + e
3659 }, e.exports.lerp = function (e, t, n) {
3660 return e + (t - e) * n
3661 }, e.exports.decel = function (e, t) {
3662 return e > 0 ? e = Math.max(0, e - t) : e < 0 && (e = Math.min(0, e + t)), e
3663 }, e.exports.getDistance = function (e, t, n, r) {
3664 return i((n -= e) * n + (r -= t) * r)
3665 }, e.exports.getDirection = function (e, t, n, i) {
3666 return r(t - i, e - n)
3667 }, e.exports.getAngleDist = function (e, t) {
3668 var i = n(t - e) % (2 * s);
3669 return i > s ? 2 * s - i : i
3670 }, e.exports.isNumber = function (e) {
3671 return "number" == typeof e && !isNaN(e) && isFinite(e)
3672 }, e.exports.isString = function (e) {
3673 return e && "string" == typeof e
3674 }, e.exports.kFormat = function (e) {
3675 return e > 999 ? (e / 1e3).toFixed(1) + "k" : e
3676 }, e.exports.capitalizeFirst = function (e) {
3677 return e.charAt(0).toUpperCase() + e.slice(1)
3678 }, e.exports.fixTo = function (e, t) {
3679 return parseFloat(e.toFixed(t))
3680 }, e.exports.sortByPoints = function (e, t) {
3681 return parseFloat(t.points) - parseFloat(e.points)
3682 }, e.exports.lineInRect = function (e, t, n, i, r, s, a, o) {
3683 var c = r,
3684 l = a;
3685 if (r > a && (c = a, l = r), l > n && (l = n), c < e && (c = e), c > l) return !1;
3686 var h = s,
3687 u = o,
3688 f = a - r;
3689 if (Math.abs(f) > 1e-7) {
3690 var d = (o - s) / f,
3691 p = s - d * r;
3692 h = d * c + p, u = d * l + p
3693 }
3694 if (h > u) {
3695 var g = u;
3696 u = h, h = g
3697 }
3698 return u > i && (u = i), h < t && (h = t), !(h > u)
3699 }, e.exports.containsPoint = function (e, t, n) {
3700 var i = e.getBoundingClientRect(),
3701 r = i.left + window.scrollX,
3702 s = i.top + window.scrollY,
3703 a = i.width,
3704 o = i.height;
3705 return t > r && t < r + a && n > s && n < s + o
3706 }, e.exports.mousifyTouchEvent = function (e) {
3707 var t = e.changedTouches[0];
3708 e.screenX = t.screenX, e.screenY = t.screenY, e.clientX = t.clientX, e.clientY = t.clientY, e.pageX = t.pageX, e.pageY = t.pageY
3709 }, e.exports.hookTouchEvents = function (t, n) {
3710 var i = !n,
3711 r = !1;
3712
3713 function s(n) {
3714 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(), n.stopPropagation()), r && (t.onclick && t.onclick(n), t.onmouseout && t.onmouseout(n), r = !1)
3715 }
3716 t.addEventListener("touchstart", e.exports.checkTrusted((function (n) {
3717 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(), n.stopPropagation()), t.onmouseover && t.onmouseover(n), r = !0
3718 })), !1), t.addEventListener("touchmove", e.exports.checkTrusted((function (n) {
3719 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(), n.stopPropagation()), e.exports.containsPoint(t, n.pageX, n.pageY) ? r || (t.onmouseover && t.onmouseover(n), r = !0) : r && (t.onmouseout && t.onmouseout(n), r = !1)
3720 })), !1), t.addEventListener("touchend", e.exports.checkTrusted(s), !1), t.addEventListener("touchcancel", e.exports.checkTrusted(s), !1), t.addEventListener("touchleave", e.exports.checkTrusted(s), !1)
3721 }, e.exports.removeAllChildren = function (e) {
3722 for (; e.hasChildNodes();) e.removeChild(e.lastChild)
3723 }, e.exports.generateElement = function (t) {
3724 var n = document.createElement(t.tag || "div");
3725
3726 function i(e, i) {
3727 t[e] && (n[i] = t[e])
3728 }
3729 for (var r in i("text", "textContent"), i("html", "innerHTML"), i("class", "className"), t) {
3730 switch (r) {
3731 case "tag":
3732 case "text":
3733 case "html":
3734 case "class":
3735 case "style":
3736 case "hookTouch":
3737 case "parent":
3738 case "children":
3739 continue
3740 }
3741 n[r] = t[r]
3742 }
3743 if (n.onclick && (n.onclick = e.exports.checkTrusted(n.onclick)), n.onmouseover && (n.onmouseover = e.exports.checkTrusted(n.onmouseover)), n.onmouseout && (n.onmouseout = e.exports.checkTrusted(n.onmouseout)), t.style && (n.style.cssText = t.style), t.hookTouch && e.exports.hookTouchEvents(n), t.parent && t.parent.appendChild(n), t.children)
3744 for (var s = 0; s < t.children.length; s++) n.appendChild(t.children[s]);
3745 return n
3746 }, e.exports.eventIsTrusted = function (e) {
3747 return !e || "boolean" != typeof e.isTrusted || e.isTrusted
3748 }, e.exports.checkTrusted = function (t) {
3749 return function (n) {
3750 n && n instanceof Event && e.exports.eventIsTrusted(n) && t(n)
3751 }
3752 }, e.exports.randomString = function (e) {
3753 for (var t = "", n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i < e; i++) t += n.charAt(Math.floor(Math.random() * n.length));
3754 return t
3755 }, e.exports.countInArray = function (e, t) {
3756 for (var n = 0, i = 0; i < e.length; i++) e[i] === t && n++;
3757 return n
3758 }
3759 }, function (e, t) {
3760 e.exports.AnimText = function () {
3761 this.init = function (e, t, n, i, r, s, a) {
3762 this.x = e, this.y = t, this.color = a, this.scale = n, this.startScale = this.scale, this.maxScale = 1.5 * n, this.scaleSpeed = .7, this.speed = i, this.life = r, this.text = s
3763 }, this.update = function (e) {
3764 this.life && (this.life -= e, this.y -= this.speed * e, this.scale += this.scaleSpeed * e, this.scale >= this.maxScale ? (this.scale = this.maxScale, this.scaleSpeed *= -1) : this.scale <= this.startScale && (this.scale = this.startScale, this.scaleSpeed = 0), this.life <= 0 && (this.life = 0))
3765 }, this.render = function (e, t, n) {
3766 e.fillStyle = this.color, e.font = this.scale + "px Hammersmith One", e.fillText(this.text, this.x - t, this.y - n)
3767 }
3768 }, e.exports.TextManager = function () {
3769 this.texts = [], this.update = function (e, t, n, i) {
3770 t.textBaseline = "middle", t.textAlign = "center";
3771 for (var r = 0; r < this.texts.length; ++r) this.texts[r].life && (this.texts[r].update(e), this.texts[r].render(t, n, i))
3772 }, this.showText = function (t, n, i, r, s, a, o) {
3773 for (var c, l = 0; l < this.texts.length; ++l)
3774 if (!this.texts[l].life) {
3775 c = this.texts[l];
3776 break
3777 } c || (c = new e.exports.AnimText, this.texts.push(c)), c.init(t, n, i, r, s, a, o)
3778 }
3779 }
3780 }, function (e, t) {
3781 e.exports = function (e) {
3782 this.sid = e, this.init = function (e, t, n, i, r, s, a) {
3783 s = s || {}, this.sentTo = {}, this.gridLocations = [], this.active = !0, this.doUpdate = s.doUpdate, this.x = e, this.y = t, this.dir = n, this.xWiggle = 0, this.yWiggle = 0, this.scale = i, this.type = r, this.id = s.id, this.owner = a, this.name = s.name, this.isItem = null != this.id, this.group = s.group, this.health = s.health, this.layer = 2, null != this.group ? this.layer = this.group.layer : 0 == this.type ? this.layer = 3 : 2 == this.type ? this.layer = 0 : 4 == this.type && (this.layer = -1), this.colDiv = s.colDiv || 1, this.blocker = s.blocker, this.ignoreCollision = s.ignoreCollision, this.dontGather = s.dontGather, this.hideFromEnemy = s.hideFromEnemy, this.friction = s.friction, this.projDmg = s.projDmg, this.dmg = s.dmg, this.pDmg = s.pDmg, this.pps = s.pps, this.zIndex = s.zIndex || 0, this.turnSpeed = s.turnSpeed, this.req = s.req, this.trap = s.trap, this.healCol = s.healCol, this.teleport = s.teleport, this.boostSpeed = s.boostSpeed, this.projectile = s.projectile, this.shootRange = s.shootRange, this.shootRate = s.shootRate, this.shootCount = this.shootRate, this.spawnPoint = s.spawnPoint
3784 }, this.changeHealth = function (e, t) {
3785 return this.health += e, this.health <= 0
3786 }, this.getScale = function (e, t) {
3787 return e = e || 1, this.scale * (this.isItem || 2 == this.type || 3 == this.type || 4 == this.type ? 1 : .6 * e) * (t ? 1 : this.colDiv)
3788 }, this.visibleToPlayer = function (e) {
3789 return !this.hideFromEnemy || this.owner && (this.owner == e || this.owner.team && e.team == this.owner.team)
3790 }, this.update = function (e) {
3791 this.active && (this.xWiggle && (this.xWiggle *= Math.pow(.99, e)), this.yWiggle && (this.yWiggle *= Math.pow(.99, e)), this.turnSpeed && (this.dir += this.turnSpeed * e))
3792 }
3793 }
3794 }, function (e, t) {
3795 e.exports.groups = [{
3796 id: 0,
3797 name: "food",
3798 layer: 0
3799 }, {
3800 id: 1,
3801 name: "walls",
3802 place: !0,
3803 limit: 30,
3804 layer: 0
3805 }, {
3806 id: 2,
3807 name: "spikes",
3808 place: !0,
3809 limit: 15,
3810 layer: 0
3811 }, {
3812 id: 3,
3813 name: "mill",
3814 place: !0,
3815 limit: 7,
3816 layer: 1
3817 }, {
3818 id: 4,
3819 name: "mine",
3820 place: !0,
3821 limit: 1,
3822 layer: 0
3823 }, {
3824 id: 5,
3825 name: "trap",
3826 place: !0,
3827 limit: 6,
3828 layer: -1
3829 }, {
3830 id: 6,
3831 name: "booster",
3832 place: !0,
3833 limit: 12,
3834 layer: -1
3835 }, {
3836 id: 7,
3837 name: "turret",
3838 place: !0,
3839 limit: 2,
3840 layer: 1
3841 }, {
3842 id: 8,
3843 name: "watchtower",
3844 place: !0,
3845 limit: 12,
3846 layer: 1
3847 }, {
3848 id: 9,
3849 name: "buff",
3850 place: !0,
3851 limit: 4,
3852 layer: -1
3853 }, {
3854 id: 10,
3855 name: "spawn",
3856 place: !0,
3857 limit: 1,
3858 layer: -1
3859 }, {
3860 id: 11,
3861 name: "sapling",
3862 place: !0,
3863 limit: 2,
3864 layer: 0
3865 }, {
3866 id: 12,
3867 name: "blocker",
3868 place: !0,
3869 limit: 3,
3870 layer: -1
3871 }, {
3872 id: 13,
3873 name: "teleporter",
3874 place: !0,
3875 limit: 2,
3876 layer: -1
3877 }], t.projectiles = [{
3878 indx: 0,
3879 layer: 0,
3880 src: "arrow_1",
3881 dmg: 25,
3882 speed: 1.6,
3883 scale: 103,
3884 range: 1e3
3885 }, {
3886 indx: 1,
3887 layer: 1,
3888 dmg: 25,
3889 scale: 20
3890 }, {
3891 indx: 0,
3892 layer: 0,
3893 src: "arrow_1",
3894 dmg: 35,
3895 speed: 2.5,
3896 scale: 103,
3897 range: 1200
3898 }, {
3899 indx: 0,
3900 layer: 0,
3901 src: "arrow_1",
3902 dmg: 30,
3903 speed: 2,
3904 scale: 103,
3905 range: 1200
3906 }, {
3907 indx: 1,
3908 layer: 1,
3909 dmg: 16,
3910 scale: 20
3911 }, {
3912 indx: 0,
3913 layer: 0,
3914 src: "bullet_1",
3915 dmg: 50,
3916 speed: 3.6,
3917 scale: 160,
3918 range: 1400
3919 }], t.weapons = [{
3920 id: 0,
3921 type: 0,
3922 name: "tool hammer",
3923 desc: "tool for gathering all resources",
3924 src: "hammer_1",
3925 length: 140,
3926 width: 140,
3927 xOff: -3,
3928 yOff: 18,
3929 dmg: 25,
3930 range: 65,
3931 gather: 1,
3932 speed: 300
3933 }, {
3934 id: 1,
3935 type: 0,
3936 age: 2,
3937 name: "hand axe",
3938 desc: "gathers resources at a higher rate",
3939 src: "axe_1",
3940 length: 140,
3941 width: 140,
3942 xOff: 3,
3943 yOff: 24,
3944 dmg: 30,
3945 spdMult: 1,
3946 range: 70,
3947 gather: 2,
3948 speed: 400
3949 }, {
3950 id: 2,
3951 type: 0,
3952 age: 8,
3953 name: "great axe",
3954 desc: "deal more damage and gather more resources",
3955 src: "great_axe_1",
3956 length: 140,
3957 width: 140,
3958 xOff: -8,
3959 yOff: 25,
3960 dmg: 35,
3961 spdMult: 1,
3962 range: 75,
3963 gather: 4,
3964 speed: 400
3965 }, {
3966 id: 3,
3967 type: 0,
3968 age: 2,
3969 name: "short sword",
3970 desc: "increased attack power but slower move speed",
3971 src: "sword_1",
3972 iPad: 1.3,
3973 length: 130,
3974 width: 210,
3975 xOff: -8,
3976 yOff: 46,
3977 dmg: 35,
3978 spdMult: .85,
3979 range: 110,
3980 gather: 1,
3981 speed: 300
3982 }, {
3983 id: 4,
3984 type: 0,
3985 age: 8,
3986 name: "katana",
3987 desc: "greater range and damage",
3988 src: "samurai_1",
3989 iPad: 1.3,
3990 length: 130,
3991 width: 210,
3992 xOff: -8,
3993 yOff: 59,
3994 dmg: 40,
3995 spdMult: .8,
3996 range: 118,
3997 gather: 1,
3998 speed: 300
3999 }, {
4000 id: 5,
4001 type: 0,
4002 age: 2,
4003 name: "polearm",
4004 desc: "long range melee weapon",
4005 src: "spear_1",
4006 iPad: 1.3,
4007 length: 130,
4008 width: 210,
4009 xOff: -8,
4010 yOff: 53,
4011 dmg: 45,
4012 knock: .2,
4013 spdMult: .82,
4014 range: 142,
4015 gather: 1,
4016 speed: 700
4017 }, {
4018
4019 id: 6,
4020 type: 0,
4021 age: 2,
4022 name: "bat",
4023 desc: "fast long range melee weapon",
4024 src: "bat_1",
4025 iPad: 1.3,
4026 length: 110,
4027 width: 180,
4028 xOff: -8,
4029 yOff: 53,
4030 dmg: 20,
4031 knock: .7,
4032 range: 110,
4033 gather: 1,
4034 speed: 300
4035 }, {
4036 id: 7,
4037 type: 0,
4038 age: 2,
4039 name: "daggers",
4040 desc: "really fast short range weapon",
4041 src: "dagger_1",
4042 iPad: .8,
4043 length: 110,
4044 width: 110,
4045 xOff: 18,
4046 yOff: 0,
4047 dmg: 20,
4048 knock: .1,
4049 range: 65,
4050 gather: 1,
4051 hitSlow: .1,
4052 spdMult: 1.13,
4053 speed: 100
4054 }, {
4055 id: 8,
4056 type: 0,
4057 age: 2,
4058 name: "stick",
4059 desc: "great for gathering but very weak",
4060 src: "stick_1",
4061 length: 140,
4062 width: 140,
4063 xOff: 3,
4064 yOff: 24,
4065 dmg: 1,
4066 spdMult: 1,
4067 range: 70,
4068 gather: 7,
4069 speed: 400
4070 }, {
4071 id: 9,
4072 type: 1,
4073 age: 6,
4074 name: "hunting bow",
4075 desc: "bow used for ranged combat and hunting",
4076 src: "bow_1",
4077 req: ["wood", 4],
4078 length: 120,
4079 width: 120,
4080 xOff: -6,
4081 yOff: 0,
4082 projectile: 0,
4083 spdMult: .75,
4084 speed: 600
4085 }, {
4086 id: 10,
4087 type: 1,
4088 age: 6,
4089 name: "great hammer",
4090 desc: "hammer used for destroying structures",
4091 src: "great_hammer_1",
4092 length: 140,
4093 width: 140,
4094 xOff: -9,
4095 yOff: 25,
4096 dmg: 10,
4097 spdMult: .88,
4098 range: 75,
4099 sDmg: 7.5,
4100 gather: 1,
4101 speed: 400
4102 }, {
4103 id: 11,
4104 type: 1,
4105 age: 6,
4106 name: "wooden shield",
4107 desc: "blocks projectiles and reduces melee damage",
4108 src: "shield_1",
4109 length: 120,
4110 width: 120,
4111 shield: .2,
4112 xOff: 6,
4113 yOff: 0,
4114 spdMult: .7
4115 }, {
4116 id: 12,
4117 type: 1,
4118 age: 8,
4119 name: "crossbow",
4120 desc: "deals more damage and has greater range",
4121 src: "crossbow_1",
4122 req: ["wood", 5],
4123 aboveHand: !0,
4124 armS: .75,
4125 length: 120,
4126 width: 120,
4127 xOff: -4,
4128 yOff: 0,
4129 projectile: 2,
4130 spdMult: .7,
4131 speed: 700
4132 }, {
4133 id: 13,
4134 type: 1,
4135 age: 9,
4136 name: "repeater crossbow",
4137 desc: "high firerate crossbow with reduced damage",
4138 src: "crossbow_2",
4139 req: ["wood", 10],
4140 aboveHand: !0,
4141 armS: .75,
4142 length: 120,
4143 width: 120,
4144 xOff: -4,
4145 yOff: 0,
4146 projectile: 3,
4147 spdMult: .7,
4148 speed: 230
4149 }, {
4150 id: 14,
4151 type: 1,
4152 age: 6,
4153 name: "mc grabby",
4154 desc: "steals resources from enemies",
4155 src: "grab_1",
4156 length: 130,
4157 width: 210,
4158 xOff: -8,
4159 yOff: 53,
4160 dmg: 0,
4161 steal: 250,
4162 knock: .2,
4163 spdMult: 1.05,
4164 range: 125,
4165 gather: 0,
4166 speed: 700
4167 }, {
4168 id: 15,
4169 type: 1,
4170 age: 9,
4171 name: "musket",
4172 desc: "slow firerate but high damage and range",
4173 src: "musket_1",
4174 req: ["stone", 10],
4175 aboveHand: !0,
4176 rec: .35,
4177 armS: .6,
4178 hndS: .3,
4179 hndD: 1.6,
4180 length: 295,
4181 width: 295,
4182 xOff: 25,
4183 yOff: 0,
4184 projectile: 5,
4185 hideProjectile: !0,
4186 spdMult: .6,
4187 speed: 1500
4188 }],
4189 e.exports.list = [{
4190 group: e.exports.groups[0],
4191 name: "apple",
4192 desc: "restores 20 health when consumed",
4193 req: ["food", 10],
4194 consume: function (e) {
4195 return e.changeHealth(20, e)
4196 },
4197 scale: 22,
4198 holdOffset: 15
4199 }, {
4200 age: 3,
4201 group: e.exports.groups[0],
4202 name: "cookie",
4203 desc: "restores 40 health when consumed",
4204 req: ["food", 15],
4205 consume: function (e) {
4206 return e.changeHealth(40, e)
4207 },
4208 scale: 27,
4209 holdOffset: 15
4210 }, {
4211 age: 7,
4212 group: e.exports.groups[0],
4213 name: "cheese",
4214 desc: "restores 30 health and another 50 over 5 seconds",
4215 req: ["food", 25],
4216 consume: function (e) {
4217 return !!(e.changeHealth(30, e) || e.health < 100) && (e.dmgOverTime.dmg = -10, e.dmgOverTime.doer = e, e.dmgOverTime.time = 5, !0)
4218 },
4219 scale: 27,
4220 holdOffset: 15
4221 }, {
4222 group: e.exports.groups[1],
4223 name: "wood wall",
4224 desc: "provides protection for your village",
4225 req: ["wood", 10],
4226 projDmg: !0,
4227 health: 380,
4228 scale: 50,
4229 holdOffset: 20,
4230 placeOffset: -5
4231 }, {
4232 age: 3,
4233 group: e.exports.groups[1],
4234 name: "stone wall",
4235 desc: "provides improved protection for your village",
4236 req: ["stone", 25],
4237 health: 900,
4238 scale: 50,
4239 holdOffset: 20,
4240 placeOffset: -5
4241 }, {
4242 age: 7,
4243 group: e.exports.groups[1],
4244 name: "castle wall",
4245 desc: "provides powerful protection for your village",
4246 req: ["stone", 35],
4247 health: 1500,
4248 scale: 52,
4249 holdOffset: 20,
4250 placeOffset: -5
4251 }, {
4252 group: e.exports.groups[2],
4253 name: "spikes",
4254 desc: "damages enemies when they touch them",
4255 req: ["wood", 20, "stone", 5],
4256 health: 400,
4257 dmg: 20,
4258 scale: 49,
4259 spritePadding: -23,
4260 holdOffset: 8,
4261 placeOffset: -5
4262 }, {
4263 age: 5,
4264 group: e.exports.groups[2],
4265 name: "greater spikes",
4266 desc: "damages enemies when they touch them",
4267 req: ["wood", 30, "stone", 10],
4268 health: 500,
4269 dmg: 35,
4270 scale: 52,
4271 spritePadding: -23,
4272 holdOffset: 8,
4273 placeOffset: -5
4274 }, {
4275 age: 9,
4276 group: e.exports.groups[2],
4277 name: "poison spikes",
4278 desc: "poisons enemies when they touch them",
4279 req: ["wood", 35, "stone", 15],
4280 health: 600,
4281 dmg: 30,
4282 pDmg: 5,
4283 scale: 52,
4284 spritePadding: -23,
4285 holdOffset: 8,
4286 placeOffset: -5
4287 }, {
4288 age: 9,
4289 group: e.exports.groups[2],
4290 name: "spinning spikes",
4291 desc: "damages enemies when they touch them",
4292 req: ["wood", 30, "stone", 20],
4293 health: 500,
4294 dmg: 45,
4295 turnSpeed: .003,
4296 scale: 52,
4297 spritePadding: -23,
4298 holdOffset: 8,
4299 placeOffset: -5
4300 }, {
4301 group: e.exports.groups[3],
4302 name: "windmill",
4303 desc: "generates gold over time",
4304 req: ["wood", 50, "stone", 10],
4305 health: 400,
4306 pps: 1,
4307 turnSpeed: .0016,
4308 spritePadding: 25,
4309 iconLineMult: 12,
4310 scale: 45,
4311 holdOffset: 20,
4312 placeOffset: 5
4313 }, {
4314 age: 5,
4315 group: e.exports.groups[3],
4316 name: "faster windmill",
4317 desc: "generates more gold over time",
4318 req: ["wood", 60, "stone", 20],
4319 health: 500,
4320 pps: 1.5,
4321 turnSpeed: .0025,
4322 spritePadding: 25,
4323 iconLineMult: 12,
4324 scale: 47,
4325 holdOffset: 20,
4326 placeOffset: 5
4327 }, {
4328 age: 8,
4329 group: e.exports.groups[3],
4330 name: "power mill",
4331 desc: "generates more gold over time",
4332 req: ["wood", 100, "stone", 50],
4333 health: 800,
4334 pps: 2,
4335 turnSpeed: .005,
4336 spritePadding: 25,
4337 iconLineMult: 12,
4338 scale: 47,
4339 holdOffset: 20,
4340 placeOffset: 5
4341 }, {
4342 age: 5,
4343 group: e.exports.groups[4],
4344 type: 2,
4345 name: "mine",
4346 desc: "allows you to mine stone",
4347 req: ["wood", 20, "stone", 100],
4348 iconLineMult: 12,
4349 scale: 65,
4350 holdOffset: 20,
4351 placeOffset: 0
4352 }, {
4353 age: 5,
4354 group: e.exports.groups[11],
4355 type: 0,
4356 name: "sapling",
4357 desc: "allows you to farm wood",
4358 req: ["wood", 150],
4359 iconLineMult: 12,
4360 colDiv: .5,
4361 scale: 110,
4362 holdOffset: 50,
4363 placeOffset: -15
4364 }, {
4365 age: 4,
4366 group: e.exports.groups[5],
4367 name: "pit trap",
4368 desc: "pit that traps enemies if they walk over it",
4369 req: ["wood", 30, "stone", 30],
4370 trap: !0,
4371 ignoreCollision: !0,
4372 hideFromEnemy: !0,
4373 health: 500,
4374 colDiv: .2,
4375 scale: 50,
4376 holdOffset: 20,
4377 placeOffset: -5
4378 }, {
4379 age: 4,
4380 group: e.exports.groups[6],
4381 name: "boost pad",
4382 desc: "provides boost when stepped on",
4383 req: ["stone", 20, "wood", 5],
4384 ignoreCollision: !0,
4385 boostSpeed: 1.5,
4386 health: 150,
4387 colDiv: .7,
4388 scale: 45,
4389 holdOffset: 20,
4390 placeOffset: -5
4391 }, {
4392 age: 7,
4393 group: e.exports.groups[7],
4394 doUpdate: !0,
4395 name: "turret",
4396 desc: "defensive structure that shoots at enemies",
4397 req: ["wood", 200, "stone", 150],
4398 health: 800,
4399 projectile: 1,
4400 shootRange: 700,
4401 shootRate: 2200,
4402 scale: 43,
4403 holdOffset: 20,
4404 placeOffset: -5
4405 }, {
4406 age: 7,
4407 group: e.exports.groups[8],
4408 name: "platform",
4409 desc: "platform to shoot over walls and cross over water",
4410 req: ["wood", 20],
4411 ignoreCollision: !0,
4412 zIndex: 1,
4413 health: 300,
4414 scale: 43,
4415 holdOffset: 20,
4416 placeOffset: -5
4417 }, {
4418 age: 7,
4419 group: e.exports.groups[9],
4420 name: "healing pad",
4421 desc: "standing on it will slowly heal you",
4422 req: ["wood", 30, "food", 10],
4423 ignoreCollision: !0,
4424 healCol: 15,
4425 health: 400,
4426 colDiv: .7,
4427 scale: 45,
4428 holdOffset: 20,
4429 placeOffset: -5
4430 }, {
4431 age: 9,
4432 group: e.exports.groups[10],
4433 name: "spawn pad",
4434 desc: "you will spawn here when you die but it will dissapear",
4435 req: ["wood", 100, "stone", 100],
4436 health: 400,
4437 ignoreCollision: !0,
4438 spawnPoint: !0,
4439 scale: 45,
4440 holdOffset: 20,
4441 placeOffset: -5
4442 }, {
4443 age: 7,
4444 group: e.exports.groups[12],
4445 name: "blocker",
4446 desc: "blocks building in radius",
4447 req: ["wood", 30, "stone", 25],
4448 ignoreCollision: !0,
4449 blocker: 300,
4450 health: 400,
4451 colDiv: .7,
4452 scale: 45,
4453 holdOffset: 20,
4454 placeOffset: -5
4455 }, {
4456 age: 7,
4457 group: e.exports.groups[13],
4458 name: "teleporter",
4459 desc: "teleports you to a random point on the map",
4460 req: ["wood", 60, "stone", 60],
4461 ignoreCollision: !0,
4462 teleport: !0,
4463 health: 200,
4464 colDiv: .7,
4465 scale: 45,
4466 holdOffset: 20,
4467 placeOffset: -5
4468 }];
4469 for (var n = 0; n < e.exports.list.length; ++n) e.exports.list[n].id = n, e.exports.list[n].pre && (e.exports.list[n].pre = n - e.exports.list[n].pre)
4470 }, function (e, t) {
4471 e.exports = {}
4472 }, function (e, t) {
4473 var n = Math.floor,
4474 i = Math.abs,
4475 r = Math.cos,
4476 s = Math.sin,
4477 a = (Math.pow, Math.sqrt);
4478 e.exports = function (e, t, o, c, l, h) {
4479 var u, f;
4480 this.objects = t, this.grids = {}, this.updateObjects = [];
4481 var d = c.mapScale / c.colGrid;
4482 this.setObjectGrids = function (e) {
4483 for (var t = Math.min(c.mapScale, Math.max(0, e.x)), n = Math.min(c.mapScale, Math.max(0, e.y)), i = 0; i < c.colGrid; ++i) {
4484 u = i * d;
4485 for (var r = 0; r < c.colGrid; ++r) f = r * d, t + e.scale >= u && t - e.scale <= u + d && n + e.scale >= f && n - e.scale <= f + d && (this.grids[i + "_" + r] || (this.grids[i + "_" + r] = []), this.grids[i + "_" + r].push(e), e.gridLocations.push(i + "_" + r))
4486 }
4487 }, this.removeObjGrid = function (e) {
4488 for (var t, n = 0; n < e.gridLocations.length; ++n)(t = this.grids[e.gridLocations[n]].indexOf(e)) >= 0 && this.grids[e.gridLocations[n]].splice(t, 1)
4489 }, this.disableObj = function (e) {
4490 if (e.active = !1, h) {
4491 e.owner && e.pps && (e.owner.pps -= e.pps), this.removeObjGrid(e);
4492 var t = this.updateObjects.indexOf(e);
4493 t >= 0 && this.updateObjects.splice(t, 1)
4494 }
4495 }, this.hitObj = function (e, t) {
4496 for (var n = 0; n < l.length; ++n) l[n].active && (e.sentTo[l[n].id] && (e.active ? l[n].canSee(e) && h.send(l[n].id, "8", o.fixTo(t, 1), e.sid) : h.send(l[n].id, "12", e.sid)), e.active || e.owner != l[n] || l[n].changeItemCount(e.group.id, -1))
4497 };
4498 var p, g, m = [];
4499 this.getGridArrays = function (e, t, i) {
4500 u = n(e / d), f = n(t / d), m.length = 0;
4501 try {
4502 this.grids[u + "_" + f] && m.push(this.grids[u + "_" + f]), e + i >= (u + 1) * d && ((p = this.grids[u + 1 + "_" + f]) && m.push(p), f && t - i <= f * d ? (p = this.grids[u + 1 + "_" + (f - 1)]) && m.push(p) : t + i >= (f + 1) * d && (p = this.grids[u + 1 + "_" + (f + 1)]) && m.push(p)), u && e - i <= u * d && ((p = this.grids[u - 1 + "_" + f]) && m.push(p), f && t - i <= f * d ? (p = this.grids[u - 1 + "_" + (f - 1)]) && m.push(p) : t + i >= (f + 1) * d && (p = this.grids[u - 1 + "_" + (f + 1)]) && m.push(p)), t + i >= (f + 1) * d && (p = this.grids[u + "_" + (f + 1)]) && m.push(p), f && t - i <= f * d && (p = this.grids[u + "_" + (f - 1)]) && m.push(p)
4503 } catch (e) {}
4504 return m
4505 }, this.add = function (n, i, r, s, a, o, c, l, u) {
4506 g = null;
4507 for (var f = 0; f < t.length; ++f)
4508 if (t[f].sid == n) {
4509 g = t[f];
4510 break
4511 } if (!g)
4512 for (f = 0; f < t.length; ++f)
4513 if (!t[f].active) {
4514 g = t[f];
4515 break
4516 } g || (g = new e(n), t.push(g)), l && (g.sid = n), g.init(i, r, s, a, o, c, u), h && (this.setObjectGrids(g), g.doUpdate && this.updateObjects.push(g))
4517 }, this.disableBySid = function (e) {
4518 for (var n = 0; n < t.length; ++n)
4519 if (t[n].sid == e) {
4520 this.disableObj(t[n]);
4521 break
4522 }
4523 }, this.removeAllItems = function (e, n) {
4524 for (var i = 0; i < t.length; ++i) t[i].active && t[i].owner && t[i].owner.sid == e && this.disableObj(t[i]);
4525 n && n.broadcast("13", e)
4526 }, this.fetchSpawnObj = function (e) {
4527 for (var n = null, i = 0; i < t.length; ++i)
4528 if ((g = t[i]).active && g.owner && g.owner.sid == e && g.spawnPoint) {
4529 n = [g.x, g.y], this.disableObj(g), h.broadcast("12", g.sid), g.owner && g.owner.changeItemCount(g.group.id, -1);
4530 break
4531 } return n
4532 }, this.checkItemLocation = function (e, n, i, r, s, a, l) {
4533 for (var h = 0; h < t.length; ++h) {
4534 var u = t[h].blocker ? t[h].blocker : t[h].getScale(r, t[h].isItem);
4535 if (t[h].active && o.getDistance(e, n, t[h].x, t[h].y) < i + u) return !1
4536 }
4537 return !(!a && 18 != s && n >= c.mapScale / 2 - c.riverWidth / 2 && n <= c.mapScale / 2 + c.riverWidth / 2)
4538 }, this.addProjectile = function (e, t, n, i, r) {
4539 for (var s, a = items.projectiles[r], c = 0; c < projectiles.length; ++c)
4540 if (!projectiles[c].active) {
4541 s = projectiles[c];
4542 break
4543 } s || (s = new Projectile(l, o), projectiles.push(s)), s.init(r, e, t, n, a.speed, i, a.scale)
4544 }, this.checkCollision = function (e, t, n) {
4545 n = n || 1;
4546 var l = e.x - t.x,
4547 h = e.y - t.y,
4548 u = e.scale + t.scale;
4549 if (i(l) <= u || i(h) <= u) {
4550 u = e.scale + (t.getScale ? t.getScale() : t.scale);
4551 var f = a(l * l + h * h) - u;
4552 if (f <= 0) {
4553 if (t.ignoreCollision) !t.trap || e.noTrap || t.owner == e || t.owner && t.owner.team && t.owner.team == e.team ? t.boostSpeed ? (e.xVel += n * t.boostSpeed * (t.weightM || 1) * r(t.dir), e.yVel += n * t.boostSpeed * (t.weightM || 1) * s(t.dir)) : t.healCol ? e.healCol = t.healCol : t.teleport && (e.x = o.randInt(0, c.mapScale), e.y = o.randInt(0, c.mapScale)) : (e.lockMove = !0, t.hideFromEnemy = !1);
4554 else {
4555 var d = o.getDirection(e.x, e.y, t.x, t.y);
4556 if (o.getDistance(e.x, e.y, t.x, t.y), t.isPlayer ? (f = -1 * f / 2, e.x += f * r(d), e.y += f * s(d), t.x -= f * r(d), t.y -= f * s(d)) : (e.x = t.x + u * r(d), e.y = t.y + u * s(d), e.xVel *= .75, e.yVel *= .75), t.dmg && t.owner != e && (!t.owner || !t.owner.team || t.owner.team != e.team)) {
4557 e.changeHealth(-t.dmg, t.owner, t);
4558 var p = 1.5 * (t.weightM || 1);
4559 e.xVel += p * r(d), e.yVel += p * s(d), !t.pDmg || e.skin && e.skin.poisonRes || (e.dmgOverTime.dmg = t.pDmg, e.dmgOverTime.time = 5, e.dmgOverTime.doer = t.owner), e.colDmg && t.health && (t.changeHealth(-e.colDmg) && this.disableObj(t), this.hitObj(t, o.getDirection(e.x, e.y, t.x, t.y)))
4560 }
4561 }
4562 return t.zIndex > e.zIndex && (e.zIndex = t.zIndex), !0
4563 }
4564 }
4565 return !1
4566 }
4567 }
4568 }, function (e, t, n) {
4569 var i = new(n(49));
4570 i.addWords("jew", "black", "baby", "child", "white", "porn", "pedo", "trump", "clinton", "hitler", "nazi", "gay", "pride", "sex", "pleasure", "touch", "poo", "kids", "rape", "white power", "nigga", "nig nog", "doggy", "rapist", "boner", "nigger", "nigg", "finger", "nogger", "nagger", "nig", "fag", "gai", "pole", "stripper", "penis", "vagina", "pussy", "nazi", "hitler", "stalin", "burn", "chamber", "cock", "peen", "dick", "spick", "nieger", "die", "satan", "n|ig", "nlg", "cunt", "c0ck", "fag", "lick", "condom", "anal", "shit", "phile", "little", "kids", "free KR", "tiny", "sidney", "ass", "kill", ".io", "(dot)", "[dot]", "mini", "whiore", "whore", "faggot", "github", "1337", "666", "satan", "senpa", "discord", "d1scord", "mistik", ".io", "senpa.io", "sidney", "sid", "senpaio", "vries", "asa");
4571 var r = Math.abs,
4572 s = Math.cos,
4573 a = Math.sin,
4574 o = Math.pow,
4575 c = Math.sqrt;
4576 e.exports = function (e, t, n, l, h, u, f, d, p, g, m, y, k, v) {
4577 this.id = e, this.sid = t, this.tmpScore = 0, this.team = null, this.skinIndex = 0, this.tailIndex = 0, this.hitTime = 0, this.tails = {};
4578 for (var w = 0; w < m.length; ++w) m[w].price <= 0 && (this.tails[m[w].id] = 1);
4579 for (this.skins = {}, w = 0; w < g.length; ++w) g[w].price <= 0 && (this.skins[g[w].id] = 1);
4580 this.points = 0, this.dt = 0, this.hidden = !1, this.itemCounts = {}, this.isPlayer = !0, this.pps = 0, this.moveDir = void 0, this.skinRot = 0, this.lastPing = 0, this.iconIndex = 0, this.skinColor = 0, this.spawn = function (e) {
4581 this.active = !0, this.alive = !0, this.lockMove = !1, this.lockDir = !1, this.minimapCounter = 0, this.chatCountdown = 0, this.shameCount = 0, this.shameTimer = 0, this.sentTo = {}, this.gathering = 0, this.autoGather = 0, this.animTime = 0, this.animSpeed = 0, this.mouseState = 0, this.buildIndex = -1, this.weaponIndex = 0, this.dmgOverTime = {}, this.noMovTimer = 0, this.maxXP = 300, this.XP = 0, this.age = 1, this.kills = 0, this.upgrAge = 2, this.upgradePoints = 0, this.x = 0, this.y = 0, this.zIndex = 0, this.xVel = 0, this.yVel = 0, this.slowMult = 1, this.dir = 0, this.dirPlus = 0, this.targetDir = 0, this.targetAngle = 0, this.maxHealth = 100, this.health = this.maxHealth, this.scale = n.playerScale, this.speed = n.playerSpeed, this.resetMoveDir(), this.resetResources(e), this.items = [0, 3, 6, 10], this.weapons = [0], this.shootCount = 0, this.weaponXP = [], this.reloads = {}
4582 }, this.resetMoveDir = function () {
4583 this.moveDir = void 0
4584 }, this.resetResources = function (e) {
4585 for (var t = 0; t < n.resourceTypes.length; ++t) this[n.resourceTypes[t]] = e ? 100 : 0
4586 }, this.addItem = function (e) {
4587 var t = p.list[e];
4588 if (t) {
4589 for (var n = 0; n < this.items.length; ++n)
4590 if (p.list[this.items[n]].group == t.group) return this.buildIndex == this.items[n] && (this.buildIndex = e), this.items[n] = e, !0;
4591 return this.items.push(e), !0
4592 }
4593 return !1
4594 }, this.setUserData = function (e) {
4595 if (e) {
4596 this.name = "unknown";
4597 var t = e.name + "",
4598 r = !1,
4599 s = (t = (t = (t = (t = t.slice(0, n.maxNameLength)).replace(/[^\w:\(\)\/? -]+/gim, " ")).replace(/[^\x00-\x7F]/g, " ")).trim()).toLowerCase().replace(/\s/g, "").replace(/1/g, "i").replace(/0/g, "o").replace(/5/g, "s");
4600 for (var a of i.list)
4601 if (-1 != s.indexOf(a)) {
4602 r = !0;
4603 break
4604 } t.length > 0 && !r && (this.name = t), this.skinColor = 0, n.skinColors[e.skin] && (this.skinColor = e.skin)
4605 }
4606 }, this.getData = function () {
4607 return [this.id, this.sid, this.name, l.fixTo(this.x, 2), l.fixTo(this.y, 2), l.fixTo(this.dir, 3), this.health, this.maxHealth, this.scale, this.skinColor]
4608 }, this.setData = function (e) {
4609 this.id = e[0], this.sid = e[1], this.name = e[2], this.x = e[3], this.y = e[4], this.dir = e[5], this.health = e[6], this.maxHealth = e[7], this.scale = e[8], this.skinColor = e[9]
4610 };
4611 var b = 0;
4612 this.update = function (e) {
4613 if (this.alive) {
4614 if (this.shameTimer > 0 && (this.shameTimer -= e, this.shameTimer <= 0 && (this.shameTimer = 0, this.shameCount = 0)), (b -= e) <= 0) {
4615 var t = (this.skin && this.skin.healthRegen ? this.skin.healthRegen : 0) + (this.tail && this.tail.healthRegen ? this.tail.healthRegen : 0);
4616 t && this.changeHealth(t, this), this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer), this.dmgOverTime.time -= 1, this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)), this.healCol && this.changeHealth(this.healCol, this), b = 1e3
4617 }
4618 if (this.alive) {
4619 if (this.slowMult < 1 && (this.slowMult += 8e-4 * e, this.slowMult > 1 && (this.slowMult = 1)), this.noMovTimer += e, (this.xVel || this.yVel) && (this.noMovTimer = 0), this.lockMove) this.xVel = 0, this.yVel = 0;
4620 else {
4621 var i = (this.buildIndex >= 0 ? .5 : 1) * (p.weapons[this.weaponIndex].spdMult || 1) * (this.skin && this.skin.spdMult || 1) * (this.tail && this.tail.spdMult || 1) * (this.y <= n.snowBiomeTop ? this.skin && this.skin.coldM ? 1 : n.snowSpeed : 1) * this.slowMult;
4622 !this.zIndex && this.y >= n.mapScale / 2 - n.riverWidth / 2 && this.y <= n.mapScale / 2 + n.riverWidth / 2 && (this.skin && this.skin.watrImm ? (i *= .75, this.xVel += .4 * n.waterCurrent * e) : (i *= .33, this.xVel += n.waterCurrent * e));
4623 var r = null != this.moveDir ? s(this.moveDir) : 0,
4624 d = null != this.moveDir ? a(this.moveDir) : 0,
4625 g = c(r * r + d * d);
4626 0 != g && (r /= g, d /= g), r && (this.xVel += r * this.speed * i * e), d && (this.yVel += d * this.speed * i * e)
4627 }
4628 var m;
4629 this.zIndex = 0, this.lockMove = !1, this.healCol = 0;
4630 for (var y = l.getDistance(0, 0, this.xVel * e, this.yVel * e), k = Math.min(4, Math.max(1, Math.round(y / 40))), v = 1 / k, w = 0; w < k; ++w) {
4631 this.xVel && (this.x += this.xVel * e * v), this.yVel && (this.y += this.yVel * e * v), m = u.getGridArrays(this.x, this.y, this.scale);
4632 for (var x = 0; x < m.length; ++x)
4633 for (var S = 0; S < m[x].length; ++S) m[x][S].active && u.checkCollision(this, m[x][S], v)
4634 }
4635 for (w = (I = f.indexOf(this)) + 1; w < f.length; ++w) f[w] != this && f[w].alive && u.checkCollision(this, f[w]);
4636 if (this.xVel && (this.xVel *= o(n.playerDecel, e), this.xVel <= .01 && this.xVel >= -.01 && (this.xVel = 0)), this.yVel && (this.yVel *= o(n.playerDecel, e), this.yVel <= .01 && this.yVel >= -.01 && (this.yVel = 0)), this.x - this.scale < 0 ? this.x = this.scale : this.x + this.scale > n.mapScale && (this.x = n.mapScale - this.scale), this.y - this.scale < 0 ? this.y = this.scale : this.y + this.scale > n.mapScale && (this.y = n.mapScale - this.scale), this.buildIndex < 0)
4637 if (this.reloads[this.weaponIndex] > 0) this.reloads[this.weaponIndex] -= e, this.gathering = this.mouseState;
4638 else if (this.gathering || this.autoGather) {
4639 var T = !0;
4640 if (null != p.weapons[this.weaponIndex].gather) this.gather(f);
4641 else if (null != p.weapons[this.weaponIndex].projectile && this.hasRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0)) {
4642 this.useRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0), this.noMovTimer = 0;
4643 var I = p.weapons[this.weaponIndex].projectile,
4644 E = 2 * this.scale,
4645 M = this.skin && this.skin.aMlt ? this.skin.aMlt : 1;
4646 p.weapons[this.weaponIndex].rec && (this.xVel -= p.weapons[this.weaponIndex].rec * s(this.dir), this.yVel -= p.weapons[this.weaponIndex].rec * a(this.dir)), h.addProjectile(this.x + E * s(this.dir), this.y + E * a(this.dir), this.dir, p.projectiles[I].range * M, p.projectiles[I].speed * M, I, this, null, this.zIndex)
4647 } else T = !1;
4648 this.gathering = this.mouseState, T && (this.reloads[this.weaponIndex] = p.weapons[this.weaponIndex].speed * (this.skin && this.skin.atkSpd || 1))
4649 }
4650 }
4651 }
4652 }, this.addWeaponXP = function (e) {
4653 this.weaponXP[this.weaponIndex] || (this.weaponXP[this.weaponIndex] = 0), this.weaponXP[this.weaponIndex] += e
4654 }, this.earnXP = function (e) {
4655 this.age < n.maxAge && (this.XP += e, this.XP >= this.maxXP ? (this.age < n.maxAge ? (this.age++, this.XP = 0, this.maxXP *= 1.2) : this.XP = this.maxXP, this.upgradePoints++, y.send(this.id, "16", this.upgradePoints, this.upgrAge), y.send(this.id, "15", this.XP, l.fixTo(this.maxXP, 1), this.age)) : y.send(this.id, "15", this.XP))
4656 }, this.changeHealth = function (e, t) {
4657 if (e > 0 && this.health >= this.maxHealth) return !1;
4658 e < 0 && this.skin && (e *= this.skin.dmgMult || 1), e < 0 && this.tail && (e *= this.tail.dmgMult || 1), e < 0 && (this.hitTime = Date.now()), this.health += e, this.health > this.maxHealth && (e -= this.health - this.maxHealth, this.health = this.maxHealth), this.health <= 0 && this.kill(t);
4659 for (var n = 0; n < f.length; ++n) this.sentTo[f[n].id] && y.send(f[n].id, "h", this.sid, Math.round(this.health));
4660 return !t || !t.canSee(this) || t == this && e < 0 || y.send(t.id, "t", Math.round(this.x), Math.round(this.y), Math.round(-e), 1), !0
4661 }, this.kill = function (e) {
4662 e && e.alive && (e.kills++, e.skin && e.skin.goldSteal ? k(e, Math.round(this.points / 2)) : k(e, Math.round(100 * this.age * (e.skin && e.skin.kScrM ? e.skin.kScrM : 1))), y.send(e.id, "9", "kills", e.kills, 1)), this.alive = !1, y.send(this.id, "11"), v()
4663 }, this.addResource = function (e, t, i) {
4664 !i && t > 0 && this.addWeaponXP(t), 3 == e ? k(this, t, !0) : (this[n.resourceTypes[e]] += t, y.send(this.id, "9", n.resourceTypes[e], this[n.resourceTypes[e]], 1))
4665 }, this.changeItemCount = function (e, t) {
4666 this.itemCounts[e] = this.itemCounts[e] || 0, this.itemCounts[e] += t, y.send(this.id, "14", e, this.itemCounts[e])
4667 }, this.buildItem = function (e) {
4668 var t = this.scale + e.scale + (e.placeOffset || 0),
4669 n = this.x + t * s(this.dir),
4670 i = this.y + t * a(this.dir);
4671 if (this.canBuild(e) && !(e.consume && this.skin && this.skin.noEat) && (e.consume || u.checkItemLocation(n, i, e.scale, .6, e.id, !1, this))) {
4672 var r = !1;
4673 if (e.consume) {
4674 if (this.hitTime) {
4675 var o = Date.now() - this.hitTime;
4676 this.hitTime = 0, o <= 120 ? (this.shameCount++, this.shameCount >= 8 && (this.shameTimer = 3e4, this.shameCount = 0)) : (this.shameCount -= 2, this.shameCount <= 0 && (this.shameCount = 0))
4677 }
4678 this.shameTimer <= 0 && (r = e.consume(this))
4679 } else r = !0, e.group.limit && this.changeItemCount(e.group.id, 1), e.pps && (this.pps += e.pps), u.add(u.objects.length, n, i, this.dir, e.scale, e.type, e, !1, this);
4680 r && (this.useRes(e), this.buildIndex = -1)
4681 }
4682 }, this.hasRes = function (e, t) {
4683 for (var n = 0; n < e.req.length;) {
4684 if (this[e.req[n]] < Math.round(e.req[n + 1] * (t || 1))) return !1;
4685 n += 2
4686 }
4687 return !0
4688 }, this.useRes = function (e, t) {
4689 if (!n.inSandbox)
4690 for (var i = 0; i < e.req.length;) this.addResource(n.resourceTypes.indexOf(e.req[i]), -Math.round(e.req[i + 1] * (t || 1))), i += 2
4691 }, this.canBuild = function (e) {
4692 return !!n.inSandbox || !(e.group.limit && this.itemCounts[e.group.id] >= e.group.limit) && this.hasRes(e)
4693 }, this.gather = function () {
4694 this.noMovTimer = 0, this.slowMult -= p.weapons[this.weaponIndex].hitSlow || .3, this.slowMult < 0 && (this.slowMult = 0);
4695 for (var e, t, i, r = n.fetchVariant(this), o = r.poison, c = r.val, h = {}, g = u.getGridArrays(this.x, this.y, p.weapons[this.weaponIndex].range), m = 0; m < g.length; ++m)
4696 for (var y = 0; y < g[m].length; ++y)
4697 if ((t = g[m][y]).active && !t.dontGather && !h[t.sid] && t.visibleToPlayer(this) && l.getDistance(this.x, this.y, t.x, t.y) - t.scale <= p.weapons[this.weaponIndex].range && (e = l.getDirection(t.x, t.y, this.x, this.y), l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
4698 if (h[t.sid] = 1, t.health) {
4699 if (t.changeHealth(-p.weapons[this.weaponIndex].dmg * c * (p.weapons[this.weaponIndex].sDmg || 1) * (this.skin && this.skin.bDmg ? this.skin.bDmg : 1), this)) {
4700 for (var k = 0; k < t.req.length;) this.addResource(n.resourceTypes.indexOf(t.req[k]), t.req[k + 1]), k += 2;
4701 u.disableObj(t)
4702 }
4703 } else {
4704 this.earnXP(4 * p.weapons[this.weaponIndex].gather);
4705 var v = p.weapons[this.weaponIndex].gather + (3 == t.type ? 4 : 0);
4706 this.skin && this.skin.extraGold && this.addResource(3, 1), this.addResource(t.type, v)
4707 }
4708 i = !0, u.hitObj(t, e)
4709 } for (y = 0; y < f.length + d.length; ++y)
4710 if ((t = f[y] || d[y - f.length]) != this && t.alive && (!t.team || t.team != this.team) && l.getDistance(this.x, this.y, t.x, t.y) - 1.8 * t.scale <= p.weapons[this.weaponIndex].range && (e = l.getDirection(t.x, t.y, this.x, this.y), l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
4711 var w = p.weapons[this.weaponIndex].steal;
4712 w && t.addResource && (w = Math.min(t.points || 0, w), this.addResource(3, w), t.addResource(3, -w));
4713 var b = c;
4714 null != t.weaponIndex && p.weapons[t.weaponIndex].shield && l.getAngleDist(e + Math.PI, t.dir) <= n.shieldAngle && (b = p.weapons[t.weaponIndex].shield);
4715 var x = p.weapons[this.weaponIndex].dmg * (this.skin && this.skin.dmgMultO ? this.skin.dmgMultO : 1) * (this.tail && this.tail.dmgMultO ? this.tail.dmgMultO : 1),
4716 S = .3 * (t.weightM || 1) + (p.weapons[this.weaponIndex].knock || 0);
4717 t.xVel += S * s(e), t.yVel += S * a(e), this.skin && this.skin.healD && this.changeHealth(x * b * this.skin.healD, this), this.tail && this.tail.healD && this.changeHealth(x * b * this.tail.healD, this), t.skin && t.skin.dmg && 1 == b && this.changeHealth(-x * t.skin.dmg, t), t.tail && t.tail.dmg && 1 == b && this.changeHealth(-x * t.tail.dmg, t), !(t.dmgOverTime && this.skin && this.skin.poisonDmg) || t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = this.skin.poisonDmg, t.dmgOverTime.time = this.skin.poisonTime || 1, t.dmgOverTime.doer = this), !t.dmgOverTime || !o || t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = 5, t.dmgOverTime.time = 5, t.dmgOverTime.doer = this), t.skin && t.skin.dmgK && (this.xVel -= t.skin.dmgK * s(e), this.yVel -= t.skin.dmgK * a(e)), t.changeHealth(-x * b, this, this)
4718 } this.sendAnimation(i ? 1 : 0)
4719 }, this.sendAnimation = function (e) {
4720 for (var t = 0; t < f.length; ++t) this.sentTo[f[t].id] && this.canSee(f[t]) && y.send(f[t].id, "7", this.sid, e ? 1 : 0, this.weaponIndex)
4721 };
4722 var x = 0,
4723 S = 0;
4724 this.animate = function (e) {
4725 this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime = 0, this.dirPlus = 0, x = 0, S = 0) : 0 == S ? (x += e / (this.animSpeed * n.hitReturnRatio), this.dirPlus = l.lerp(0, this.targetAngle, Math.min(1, x)), x >= 1 && (x = 1, S = 1)) : (x -= e / (this.animSpeed * (1 - n.hitReturnRatio)), this.dirPlus = l.lerp(0, this.targetAngle, Math.max(0, x))))
4726 }, this.startAnim = function (e, t) {
4727 this.animTime = this.animSpeed = p.weapons[t].speed, this.targetAngle = e ? -n.hitAngle : -Math.PI, x = 0, S = 0
4728 }, this.canSee = function (e) {
4729 if (!e) return !1;
4730 if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer) return !1;
4731 var t = r(e.x - this.x) - e.scale,
4732 i = r(e.y - this.y) - e.scale;
4733 return t <= n.maxScreenWidth / 2 * 1.3 && i <= n.maxScreenHeight / 2 * 1.3
4734 }
4735 }
4736 }, function (e, t, n) {
4737 const i = n(50).words,
4738 r = n(51).array;
4739 e.exports = class {
4740 constructor(e = {}) {
4741 Object.assign(this, {
4742 list: e.emptyList && [] || Array.prototype.concat.apply(i, [r, e.list || []]),
4743 exclude: e.exclude || [],
4744 placeHolder: e.placeHolder || "*",
4745 regex: e.regex || /[^a-zA-Z0-9|\$|\@]|\^/g,
4746 replaceRegex: e.replaceRegex || /\w/g
4747 })
4748 }
4749 isProfane(e) {
4750 return this.list.filter(t => {
4751 const n = new RegExp(`\\b${t.replace(/(\W)/g,"\\$1")}\\b`, "gi");
4752 return !this.exclude.includes(t.toLowerCase()) && n.test(e)
4753 }).length > 0 || !1
4754 }
4755 replaceWord(e) {
4756 return e.replace(this.regex, "").replace(this.replaceRegex, this.placeHolder)
4757 }
4758 clean(e) {
4759 return e.split(/\b/).map(e => this.isProfane(e) ? this.replaceWord(e) : e).join("")
4760 }
4761 addWords() {
4762 let e = Array.from(arguments);
4763 this.list.push(...e), e.map(e => e.toLowerCase()).forEach(e => {
4764 this.exclude.includes(e) && this.exclude.splice(this.exclude.indexOf(e), 1)
4765 })
4766 }
4767 removeWords() {
4768 this.exclude.push(...Array.from(arguments).map(e => e.toLowerCase()))
4769 }
4770 }
4771 }, function (e) {
4772 e.exports = {
4773 words: ["ahole", "anus", "ash0le", "ash0les", "asholes", "ass", "Ass Monkey", "Assface", "assh0le", "assh0lez", "asshole", "assholes", "assholz", "asswipe", "azzhole", "bassterds", "bastard", "bastards", "bastardz", "basterds", "basterdz", "Biatch", "bitch", "bitches", "Blow Job", "boffing", "butthole", "buttwipe", "c0ck", "c0cks", "c0k", "Carpet Muncher", "cawk", "cawks", "Clit", "cnts", "cntz", "cock", "cockhead", "cock-head", "cocks", "CockSucker", "cock-sucker", "crap", "cum", "cunt", "cunts", "cuntz", "dick", "dild0", "dild0s", "dildo", "dildos", "dilld0", "dilld0s", "dominatricks", "dominatrics", "dominatrix", "dyke", "enema", "f u c k", "f u c k e r", "fag", "fag1t", "faget", "fagg1t", "faggit", "faggot", "fagg0t", "fagit", "fags", "fagz", "faig", "faigs", "fart", "flipping the bird", "fuck", "fucker", "fuckin", "fucking", "fucks", "Fudge Packer", "fuk", "Fukah", "Fuken", "fuker", "Fukin", "Fukk", "Fukkah", "Fukken", "Fukker", "Fukkin", "g00k", "God-damned", "h00r", "h0ar", "h0re", "hells", "hoar", "hoor", "hoore", "jackoff", "jap", "japs", "jerk-off", "jisim", "jiss", "jizm", "jizz", "knob", "knobs", "knobz", "kunt", "kunts", "kuntz", "Lezzian", "Lipshits", "Lipshitz", "masochist", "masokist", "massterbait", "masstrbait", "masstrbate", "masterbaiter", "masterbate", "masterbates", "Motha Fucker", "Motha Fuker", "Motha Fukkah", "Motha Fukker", "Mother Fucker", "Mother Fukah", "Mother Fuker", "Mother Fukkah", "Mother Fukker", "mother-fucker", "Mutha Fucker", "Mutha Fukah", "Mutha Fuker", "Mutha Fukkah", "Mutha Fukker", "n1gr", "nastt", "nigger;", "nigur;", "niiger;", "niigr;", "orafis", "orgasim;", "orgasm", "orgasum", "oriface", "orifice", "orifiss", "packi", "packie", "packy", "paki", "pakie", "paky", "pecker", "peeenus", "peeenusss", "peenus", "peinus", "pen1s", "penas", "penis", "penis-breath", "penus", "penuus", "Phuc", "Phuck", "Phuk", "Phuker", "Phukker", "polac", "polack", "polak", "Poonani", "pr1c", "pr1ck", "pr1k", "pusse", "pussee", "pussy", "puuke", "puuker", "queer", "queers", "queerz", "qweers", "qweerz", "qweir", "recktum", "rectum", "retard", "sadist", "scank", "schlong", "screwing", "semen", "sex", "sexy", "Sh!t", "sh1t", "sh1ter", "sh1ts", "sh1tter", "sh1tz", "shit", "shits", "shitter", "Shitty", "Shity", "shitz", "Shyt", "Shyte", "Shytty", "Shyty", "skanck", "skank", "skankee", "skankey", "skanks", "Skanky", "slag", "slut", "sluts", "Slutty", "slutz", "son-of-a-bitch", "tit", "turd", "va1jina", "vag1na", "vagiina", "vagina", "vaj1na", "vajina", "vullva", "vulva", "w0p", "wh00r", "wh0re", "whore", "xrated", "xxx", "b!+ch", "bitch", "blowjob", "clit", "arschloch", "fuck", "shit", "ass", "asshole", "b!tch", "b17ch", "b1tch", "bastard", "bi+ch", "boiolas", "buceta", "c0ck", "cawk", "chink", "cipa", "clits", "cock", "cum", "cunt", "dildo", "dirsa", "ejakulate", "fatass", "fcuk", "fuk", "fux0r", "hoer", "hore", "jism", "kawk", "l3itch", "l3i+ch", "lesbian", "masturbate", "masterbat*", "masterbat3", "motherfucker", "s.o.b.", "mofo", "nazi", "nigga", "nigger", "nutsack", "phuck", "pimpis", "pusse", "pussy", "scrotum", "sh!t", "shemale", "shi+", "sh!+", "slut", "smut", "teets", "tits", "boobs", "b00bs", "teez", "testical", "testicle", "titt", "w00se", "jackoff", "wank", "whoar", "whore", "*damn", "*dyke", "*fuck*", "*shit*", "@$$", "amcik", "andskota", "arse*", "assrammer", "ayir", "bi7ch", "bitch*", "bollock*", "breasts", "butt-pirate", "cabron", "cazzo", "chraa", "chuj", "Cock*", "cunt*", "d4mn", "daygo", "dego", "dick*", "dike*", "dupa", "dziwka", "ejackulate", "Ekrem*", "Ekto", "enculer", "faen", "fag*", "fanculo", "fanny", "feces", "feg", "Felcher", "ficken", "fitt*", "Flikker", "foreskin", "Fotze", "Fu(*", "fuk*", "futkretzn", "gook", "guiena", "h0r", "h4x0r", "hell", "helvete", "hoer*", "honkey", "Huevon", "hui", "injun", "jizz", "kanker*", "kike", "klootzak", "kraut", "knulle", "kuk", "kuksuger", "Kurac", "kurwa", "kusi*", "kyrpa*", "lesbo", "mamhoon", "masturbat*", "merd*", "mibun", "monkleigh", "mouliewop", "muie", "mulkku", "muschi", "nazis", "nepesaurio", "nigger*", "orospu", "paska*", "perse", "picka", "pierdol*", "pillu*", "pimmel", "piss*", "pizda", "poontsee", "poop", "porn", "p0rn", "pr0n", "preteen", "pula", "pule", "puta", "puto", "qahbeh", "queef*", "rautenberg", "schaffer", "scheiss*", "schlampe", "schmuck", "screw", "sh!t*", "sharmuta", "sharmute", "shipal", "shiz", "skribz", "skurwysyn", "sphencter", "spic", "spierdalaj", "splooge", "suka", "b00b*", "testicle*", "titt*", "twat", "vittu", "wank*", "wetback*", "wichser", "wop*", "yed", "zabourah"]
4774 }
4775 }, function (e, t, n) {
4776 e.exports = {
4777 object: n(52),
4778 array: n(53),
4779 regex: n(54)
4780 }
4781 }, function (e, t) {
4782 e.exports = {
4783 "4r5e": 1,
4784 "5h1t": 1,
4785 "5hit": 1,
4786 a55: 1,
4787 anal: 1,
4788 anus: 1,
4789 ar5e: 1,
4790 arrse: 1,
4791 arse: 1,
4792 ass: 1,
4793 "ass-fucker": 1,
4794 asses: 1,
4795 assfucker: 1,
4796 assfukka: 1,
4797 asshole: 1,
4798 assholes: 1,
4799 asswhole: 1,
4800 a_s_s: 1,
4801 "b!tch": 1,
4802 b00bs: 1,
4803 b17ch: 1,
4804 b1tch: 1,
4805 ballbag: 1,
4806 balls: 1,
4807 ballsack: 1,
4808 bastard: 1,
4809 beastial: 1,
4810 beastiality: 1,
4811 bellend: 1,
4812 bestial: 1,
4813 bestiality: 1,
4814 "bi+ch": 1,
4815 biatch: 1,
4816 bitch: 1,
4817 bitcher: 1,
4818 bitchers: 1,
4819 bitches: 1,
4820 bitchin: 1,
4821 bitching: 1,
4822 bloody: 1,
4823 "blow job": 1,
4824 blowjob: 1,
4825 blowjobs: 1,
4826 boiolas: 1,
4827 bollock: 1,
4828 bollok: 1,
4829 boner: 1,
4830 boob: 1,
4831 boobs: 1,
4832 booobs: 1,
4833 boooobs: 1,
4834 booooobs: 1,
4835 booooooobs: 1,
4836 breasts: 1,
4837 buceta: 1,
4838 bugger: 1,
4839 bum: 1,
4840 "bunny fucker": 1,
4841 butt: 1,
4842 butthole: 1,
4843 buttmuch: 1,
4844 buttplug: 1,
4845 c0ck: 1,
4846 c0cksucker: 1,
4847 "carpet muncher": 1,
4848 cawk: 1,
4849 chink: 1,
4850 cipa: 1,
4851 cl1t: 1,
4852 clit: 1,
4853 clitoris: 1,
4854 clits: 1,
4855 cnut: 1,
4856 cock: 1,
4857 "cock-sucker": 1,
4858 cockface: 1,
4859 cockhead: 1,
4860 cockmunch: 1,
4861 cockmuncher: 1,
4862 cocks: 1,
4863 cocksuck: 1,
4864 cocksucked: 1,
4865 cocksucker: 1,
4866 cocksucking: 1,
4867 cocksucks: 1,
4868 cocksuka: 1,
4869 cocksukka: 1,
4870 cok: 1,
4871 cokmuncher: 1,
4872 coksucka: 1,
4873 coon: 1,
4874 cox: 1,
4875 crap: 1,
4876 cum: 1,
4877 cummer: 1,
4878 cumming: 1,
4879 cums: 1,
4880 cumshot: 1,
4881 cunilingus: 1,
4882 cunillingus: 1,
4883 cunnilingus: 1,
4884 cunt: 1,
4885 cuntlick: 1,
4886 cuntlicker: 1,
4887 cuntlicking: 1,
4888 cunts: 1,
4889 cyalis: 1,
4890 cyberfuc: 1,
4891 cyberfuck: 1,
4892 cyberfucked: 1,
4893 cyberfucker: 1,
4894 cyberfuckers: 1,
4895 cyberfucking: 1,
4896 d1ck: 1,
4897 damn: 1,
4898 dick: 1,
4899 dickhead: 1,
4900 dildo: 1,
4901 dildos: 1,
4902 dink: 1,
4903 dinks: 1,
4904 dirsa: 1,
4905 dlck: 1,
4906 "dog-fucker": 1,
4907 doggin: 1,
4908 dogging: 1,
4909 donkeyribber: 1,
4910 doosh: 1,
4911 duche: 1,
4912 dyke: 1,
4913 ejaculate: 1,
4914 ejaculated: 1,
4915 ejaculates: 1,
4916 ejaculating: 1,
4917 ejaculatings: 1,
4918 ejaculation: 1,
4919 ejakulate: 1,
4920 "f u c k": 1,
4921 "f u c k e r": 1,
4922 f4nny: 1,
4923 fag: 1,
4924 fagging: 1,
4925 faggitt: 1,
4926 faggot: 1,
4927 faggs: 1,
4928 fagot: 1,
4929 fagots: 1,
4930 fags: 1,
4931 fanny: 1,
4932 fannyflaps: 1,
4933 fannyfucker: 1,
4934 fanyy: 1,
4935 fatass: 1,
4936 fcuk: 1,
4937 fcuker: 1,
4938 fcuking: 1,
4939 feck: 1,
4940 fecker: 1,
4941 felching: 1,
4942 fellate: 1,
4943 fellatio: 1,
4944 fingerfuck: 1,
4945 fingerfucked: 1,
4946 fingerfucker: 1,
4947 fingerfuckers: 1,
4948 fingerfucking: 1,
4949 fingerfucks: 1,
4950 fistfuck: 1,
4951 fistfucked: 1,
4952 fistfucker: 1,
4953 fistfuckers: 1,
4954 fistfucking: 1,
4955 fistfuckings: 1,
4956 fistfucks: 1,
4957 flange: 1,
4958 fook: 1,
4959 fooker: 1,
4960 fuck: 1,
4961 fucka: 1,
4962 fucked: 1,
4963 fucker: 1,
4964 fuckers: 1,
4965 fuckhead: 1,
4966 fuckheads: 1,
4967 fuckin: 1,
4968 fucking: 1,
4969 fuckings: 1,
4970 fuckingshitmotherfucker: 1,
4971 fuckme: 1,
4972 fucks: 1,
4973 fuckwhit: 1,
4974 fuckwit: 1,
4975 "fudge packer": 1,
4976 fudgepacker: 1,
4977 fuk: 1,
4978 fuker: 1,
4979 fukker: 1,
4980 fukkin: 1,
4981 fuks: 1,
4982 fukwhit: 1,
4983 fukwit: 1,
4984 fux: 1,
4985 fux0r: 1,
4986 f_u_c_k: 1,
4987 gangbang: 1,
4988 gangbanged: 1,
4989 gangbangs: 1,
4990 gaylord: 1,
4991 gaysex: 1,
4992 goatse: 1,
4993 God: 1,
4994 "god-dam": 1,
4995 "god-damned": 1,
4996 goddamn: 1,
4997 goddamned: 1,
4998 hardcoresex: 1,
4999 hell: 1,
5000 heshe: 1,
5001 hoar: 1,
5002 hoare: 1,
5003 hoer: 1,
5004 homo: 1,
5005 hore: 1,
5006 horniest: 1,
5007 horny: 1,
5008 hotsex: 1,
5009 "jack-off": 1,
5010 jackoff: 1,
5011 jap: 1,
5012 "jerk-off": 1,
5013 jism: 1,
5014 jiz: 1,
5015 jizm: 1,
5016 jizz: 1,
5017 kawk: 1,
5018 knob: 1,
5019 knobead: 1,
5020 knobed: 1,
5021 knobend: 1,
5022 knobhead: 1,
5023 knobjocky: 1,
5024 knobjokey: 1,
5025 kock: 1,
5026 kondum: 1,
5027 kondums: 1,
5028 kum: 1,
5029 kummer: 1,
5030 kumming: 1,
5031 kums: 1,
5032 kunilingus: 1,
5033 "l3i+ch": 1,
5034 l3itch: 1,
5035 labia: 1,
5036 lust: 1,
5037 lusting: 1,
5038 m0f0: 1,
5039 m0fo: 1,
5040 m45terbate: 1,
5041 ma5terb8: 1,
5042 ma5terbate: 1,
5043 masochist: 1,
5044 "master-bate": 1,
5045 masterb8: 1,
5046 "masterbat*": 1,
5047 masterbat3: 1,
5048 masterbate: 1,
5049 masterbation: 1,
5050 masterbations: 1,
5051 masturbate: 1,
5052 "mo-fo": 1,
5053 mof0: 1,
5054 mofo: 1,
5055 mothafuck: 1,
5056 mothafucka: 1,
5057 mothafuckas: 1,
5058 mothafuckaz: 1,
5059 mothafucked: 1,
5060 mothafucker: 1,
5061 mothafuckers: 1,
5062 mothafuckin: 1,
5063 mothafucking: 1,
5064 mothafuckings: 1,
5065 mothafucks: 1,
5066 "mother fucker": 1,
5067 motherfuck: 1,
5068 motherfucked: 1,
5069 motherfucker: 1,
5070 motherfuckers: 1,
5071 motherfuckin: 1,
5072 motherfucking: 1,
5073 motherfuckings: 1,
5074 motherfuckka: 1,
5075 motherfucks: 1,
5076 muff: 1,
5077 mutha: 1,
5078 muthafecker: 1,
5079 muthafuckker: 1,
5080 muther: 1,
5081 mutherfucker: 1,
5082 n1gga: 1,
5083 n1gger: 1,
5084 nazi: 1,
5085 nigg3r: 1,
5086 nigg4h: 1,
5087 nigga: 1,
5088 niggah: 1,
5089 niggas: 1,
5090 niggaz: 1,
5091 nigger: 1,
5092 niggers: 1,
5093 nob: 1,
5094 "nob jokey": 1,
5095 nobhead: 1,
5096 nobjocky: 1,
5097 nobjokey: 1,
5098 numbnuts: 1,
5099 nutsack: 1,
5100 orgasim: 1,
5101 orgasims: 1,
5102 orgasm: 1,
5103 orgasms: 1,
5104 p0rn: 1,
5105 pawn: 1,
5106 pecker: 1,
5107 penis: 1,
5108 penisfucker: 1,
5109 phonesex: 1,
5110 phuck: 1,
5111 phuk: 1,
5112 phuked: 1,
5113 phuking: 1,
5114 phukked: 1,
5115 phukking: 1,
5116 phuks: 1,
5117 phuq: 1,
5118 pigfucker: 1,
5119 pimpis: 1,
5120 piss: 1,
5121 pissed: 1,
5122 pisser: 1,
5123 pissers: 1,
5124 pisses: 1,
5125 pissflaps: 1,
5126 pissin: 1,
5127 pissing: 1,
5128 pissoff: 1,
5129 poop: 1,
5130 porn: 1,
5131 porno: 1,
5132 pornography: 1,
5133 pornos: 1,
5134 prick: 1,
5135 pricks: 1,
5136 pron: 1,
5137 pube: 1,
5138 pusse: 1,
5139 pussi: 1,
5140 pussies: 1,
5141 pussy: 1,
5142 pussys: 1,
5143 rectum: 1,
5144 retard: 1,
5145 rimjaw: 1,
5146 rimming: 1,
5147 "s hit": 1,
5148 "s.o.b.": 1,
5149 sadist: 1,
5150 schlong: 1,
5151 screwing: 1,
5152 scroat: 1,
5153 scrote: 1,
5154 scrotum: 1,
5155 semen: 1,
5156 sex: 1,
5157 "sh!+": 1,
5158 "sh!t": 1,
5159 sh1t: 1,
5160 shag: 1,
5161 shagger: 1,
5162 shaggin: 1,
5163 shagging: 1,
5164 shemale: 1,
5165 "shi+": 1,
5166 shit: 1,
5167 shitdick: 1,
5168 shite: 1,
5169 shited: 1,
5170 shitey: 1,
5171 shitfuck: 1,
5172 shitfull: 1,
5173 shithead: 1,
5174 shiting: 1,
5175 shitings: 1,
5176 shits: 1,
5177 shitted: 1,
5178 shitter: 1,
5179 shitters: 1,
5180 shitting: 1,
5181 shittings: 1,
5182 shitty: 1,
5183 skank: 1,
5184 slut: 1,
5185 sluts: 1,
5186 smegma: 1,
5187 smut: 1,
5188 snatch: 1,
5189 "son-of-a-bitch": 1,
5190 spac: 1,
5191 spunk: 1,
5192 s_h_i_t: 1,
5193 t1tt1e5: 1,
5194 t1tties: 1,
5195 teets: 1,
5196 teez: 1,
5197 testical: 1,
5198 testicle: 1,
5199 tit: 1,
5200 titfuck: 1,
5201 tits: 1,
5202 titt: 1,
5203 tittie5: 1,
5204 tittiefucker: 1,
5205 titties: 1,
5206 tittyfuck: 1,
5207 tittywank: 1,
5208 titwank: 1,
5209 tosser: 1,
5210 turd: 1,
5211 tw4t: 1,
5212 twat: 1,
5213 twathead: 1,
5214 twatty: 1,
5215 twunt: 1,
5216 twunter: 1,
5217 v14gra: 1,
5218 v1gra: 1,
5219 vagina: 1,
5220 viagra: 1,
5221 vulva: 1,
5222 w00se: 1,
5223 wang: 1,
5224 wank: 1,
5225 wanker: 1,
5226 wanky: 1,
5227 whoar: 1,
5228 whore: 1,
5229 willies: 1,
5230 willy: 1,
5231 xrated: 1,
5232 xxx: 1
5233 }
5234 }, function (e, t) {
5235 e.exports = ["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"]
5236 }, function (e, t) {
5237 e.exports = /\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
5238 }, function (e, t) {
5239 e.exports.hats = [{
5240 id: 45,
5241 name: "Shame!",
5242 dontSell: !0,
5243 price: 0,
5244 scale: 120,
5245 desc: "hacks are for losers"
5246 }, {
5247 id: 51,
5248 name: "Moo Cap",
5249 price: 0,
5250 scale: 120,
5251 desc: "coolest mooer around"
5252 }, {
5253 id: 50,
5254 name: "Apple Cap",
5255 price: 0,
5256 scale: 120,
5257 desc: "apple farms remembers"
5258 }, {
5259 id: 28,
5260 name: "Moo Head",
5261 price: 0,
5262 scale: 120,
5263 desc: "no effect"
5264 }, {
5265 id: 29,
5266 name: "Pig Head",
5267 price: 0,
5268 scale: 120,
5269 desc: "no effect"
5270 }, {
5271 id: 30,
5272 name: "Fluff Head",
5273 price: 0,
5274 scale: 120,
5275 desc: "no effect"
5276 }, {
5277 id: 36,
5278 name: "Pandou Head",
5279 price: 0,
5280 scale: 120,
5281 desc: "no effect"
5282 }, {
5283 id: 37,
5284 name: "Bear Head",
5285 price: 0,
5286 scale: 120,
5287 desc: "no effect"
5288 }, {
5289 id: 38,
5290 name: "Monkey Head",
5291 price: 0,
5292 scale: 120,
5293 desc: "no effect"
5294 }, {
5295 id: 44,
5296 name: "Polar Head",
5297 price: 0,
5298 scale: 120,
5299 desc: "no effect"
5300 }, {
5301 id: 35,
5302 name: "Fez Hat",
5303 price: 0,
5304 scale: 120,
5305 desc: "no effect"
5306 }, {
5307 id: 42,
5308 name: "Enigma Hat",
5309 price: 0,
5310 scale: 120,
5311 desc: "join the enigma army"
5312 }, {
5313 id: 43,
5314 name: "Blitz Hat",
5315 price: 0,
5316 scale: 120,
5317 desc: "hey everybody i'm blitz"
5318 }, {
5319 id: 49,
5320 name: "Bob XIII Hat",
5321 price: 0,
5322 scale: 120,
5323 desc: "like and subscribe"
5324 }, {
5325 id: 57,
5326 name: "Pumpkin",
5327 price: 50,
5328 scale: 120,
5329 desc: "Spooooky"
5330 }, {
5331 id: 8,
5332 name: "Bummle Hat",
5333 price: 100,
5334 scale: 120,
5335 desc: "no effect"
5336 }, {
5337 id: 2,
5338 name: "Straw Hat",
5339 price: 500,
5340 scale: 120,
5341 desc: "no effect"
5342 }, {
5343 id: 15,
5344 name: "Winter Cap",
5345 price: 600,
5346 scale: 120,
5347 desc: "allows you to move at normal speed in snow",
5348 coldM: 1
5349 }, {
5350 id: 5,
5351 name: "Cowboy Hat",
5352 price: 1e3,
5353 scale: 120,
5354 desc: "no effect"
5355 }, {
5356 id: 4,
5357 name: "Ranger Hat",
5358 price: 2e3,
5359 scale: 120,
5360 desc: "no effect"
5361 }, {
5362 id: 18,
5363 name: "Explorer Hat",
5364 price: 2e3,
5365 scale: 120,
5366 desc: "no effect"
5367 }, {
5368 id: 31,
5369 name: "Flipper Hat",
5370 price: 2500,
5371 scale: 120,
5372 desc: "have more control while in water",
5373 watrImm: !0
5374 }, {
5375 id: 1,
5376 name: "Marksman Cap",
5377 price: 3e3,
5378 scale: 120,
5379 desc: "increases arrow speed and range",
5380 aMlt: 1.3
5381 }, {
5382 id: 10,
5383 name: "Bush Gear",
5384 price: 3e3,
5385 scale: 160,
5386 desc: "allows you to disguise yourself as a bush"
5387 }, {
5388 id: 48,
5389 name: "Halo",
5390 price: 3e3,
5391 scale: 120,
5392 desc: "no effect"
5393 }, {
5394 id: 6,
5395 name: "Soldier Helmet",
5396 price: 4e3,
5397 scale: 120,
5398 desc: "reduces damage taken but slows movement",
5399 spdMult: .94,
5400 dmgMult: .75
5401 }, {
5402 id: 23,
5403 name: "Anti Venom Gear",
5404 price: 4e3,
5405 scale: 120,
5406 desc: "makes you immune to poison",
5407 poisonRes: 1
5408 }, {
5409 id: 13,
5410 name: "Medic Gear",
5411 price: 5e3,
5412 scale: 110,
5413 desc: "slowly regenerates health over time",
5414 healthRegen: 3
5415 }, {
5416 id: 9,
5417 name: "Miners Helmet",
5418 price: 5e3,
5419 scale: 120,
5420 desc: "earn 1 extra gold per resource",
5421 extraGold: 1
5422 }, {
5423 id: 32,
5424 name: "Musketeer Hat",
5425 price: 5e3,
5426 scale: 120,
5427 desc: "reduces cost of projectiles",
5428 projCost: .5
5429 }, {
5430 id: 7,
5431 name: "Bull Helmet",
5432 price: 6e3,
5433 scale: 120,
5434 desc: "increases damage done but drains health",
5435 healthRegen: -5,
5436 dmgMultO: 1.5,
5437 spdMult: .96
5438 }, {
5439 id: 22,
5440 name: "Emp Helmet",
5441 price: 6e3,
5442 scale: 120,
5443 desc: "turrets won't attack but you move slower",
5444 antiTurret: 1,
5445 spdMult: .7
5446 }, {
5447 id: 12,
5448 name: "Booster Hat",
5449 price: 6e3,
5450 scale: 120,
5451 desc: "increases your movement speed",
5452 spdMult: 1.16
5453 }, {
5454 id: 26,
5455 name: "Barbarian Armor",
5456 price: 8e3,
5457 scale: 120,
5458 desc: "knocks back enemies that attack you",
5459 dmgK: .6
5460 }, {
5461 id: 21,
5462 name: "Plague Mask",
5463 price: 1e4,
5464 scale: 120,
5465 desc: "melee attacks deal poison damage",
5466 poisonDmg: 5,
5467 poisonTime: 6
5468 }, {
5469 id: 46,
5470 name: "Bull Mask",
5471 price: 1e4,
5472 scale: 120,
5473 desc: "bulls won't target you unless you attack them",
5474 bullRepel: 1
5475 }, {
5476 id: 14,
5477 name: "Windmill Hat",
5478 topSprite: !0,
5479 price: 1e4,
5480 scale: 120,
5481 desc: "generates points while worn",
5482 pps: 1.5
5483 }, {
5484 id: 11,
5485 name: "Spike Gear",
5486 topSprite: !0,
5487 price: 1e4,
5488 scale: 120,
5489 desc: "deal damage to players that damage you",
5490 dmg: .45
5491 }, {
5492 id: 53,
5493 name: "Turret Gear",
5494 topSprite: !0,
5495 price: 1e4,
5496 scale: 120,
5497 desc: "you become a walking turret",
5498 turret: {
5499 proj: 1,
5500 range: 700,
5501 rate: 2500
5502 },
5503 spdMult: .7
5504 }, {
5505 id: 20,
5506 name: "Samurai Armor",
5507 price: 12e3,
5508 scale: 120,
5509 desc: "increased attack speed and fire rate",
5510 atkSpd: .78
5511 }, {
5512 id: 58,
5513 name: "Dark Knight",
5514 price: 12e3,
5515 scale: 120,
5516 desc: "restores health when you deal damage",
5517 healD: .4
5518 }, {
5519 id: 27,
5520 name: "Scavenger Gear",
5521 price: 15e3,
5522 scale: 120,
5523 desc: "earn double points for each kill",
5524 kScrM: 2
5525 }, {
5526 id: 40,
5527 name: "Tank Gear",
5528 price: 15e3,
5529 scale: 120,
5530 desc: "increased damage to buildings but slower movement",
5531 spdMult: .3,
5532 bDmg: 3.3
5533 }, {
5534 id: 52,
5535 name: "Thief Gear",
5536 price: 15e3,
5537 scale: 120,
5538 desc: "steal half of a players gold when you kill them",
5539 goldSteal: .5
5540 }, {
5541 id: 55,
5542 name: "Bloodthirster",
5543 price: 2e4,
5544 scale: 120,
5545 desc: "Restore Health when dealing damage. And increased damage",
5546 healD: .25,
5547 dmgMultO: 1.2
5548 }, {
5549 id: 56,
5550 name: "Assassin Gear",
5551 price: 2e4,
5552 scale: 120,
5553 desc: "Go invisible when not moving. Can't eat. Increased speed",
5554 noEat: !0,
5555 spdMult: 1.1,
5556 invisTimer: 1e3
5557 }], e.exports.accessories = [{
5558 id: 12,
5559 name: "Snowball",
5560 price: 1e3,
5561 scale: 105,
5562 xOff: 18,
5563 desc: "no effect"
5564 }, {
5565 id: 9,
5566 name: "Tree Cape",
5567 price: 1e3,
5568 scale: 90,
5569 desc: "no effect"
5570 }, {
5571 id: 10,
5572 name: "Stone Cape",
5573 price: 1e3,
5574 scale: 90,
5575 desc: "no effect"
5576 }, {
5577 id: 3,
5578 name: "Cookie Cape",
5579 price: 1500,
5580 scale: 90,
5581 desc: "no effect"
5582 }, {
5583 id: 8,
5584 name: "Cow Cape",
5585 price: 2e3,
5586 scale: 90,
5587 desc: "no effect"
5588 }, {
5589 id: 11,
5590 name: "Monkey Tail",
5591 price: 2e3,
5592 scale: 97,
5593 xOff: 25,
5594 desc: "Super speed but reduced damage",
5595 spdMult: 1.35,
5596 dmgMultO: .2
5597 }, {
5598 id: 17,
5599 name: "Apple Basket",
5600 price: 3e3,
5601 scale: 80,
5602 xOff: 12,
5603 desc: "slowly regenerates health over time",
5604 healthRegen: 1
5605 }, {
5606 id: 6,
5607 name: "Winter Cape",
5608 price: 3e3,
5609 scale: 90,
5610 desc: "no effect"
5611 }, {
5612 id: 4,
5613 name: "Skull Cape",
5614 price: 4e3,
5615 scale: 90,
5616 desc: "no effect"
5617 }, {
5618 id: 5,
5619 name: "Dash Cape",
5620 price: 5e3,
5621 scale: 90,
5622 desc: "no effect"
5623 }, {
5624 id: 2,
5625 name: "Dragon Cape",
5626 price: 6e3,
5627 scale: 90,
5628 desc: "no effect"
5629 }, {
5630 id: 1,
5631 name: "Super Cape",
5632 price: 8e3,
5633 scale: 90,
5634 desc: "no effect"
5635 }, {
5636 id: 7,
5637 name: "Troll Cape",
5638 price: 8e3,
5639 scale: 90,
5640 desc: "no effect"
5641 }, {
5642 id: 14,
5643 name: "Thorns",
5644 price: 1e4,
5645 scale: 115,
5646 xOff: 20,
5647 desc: "no effect"
5648 }, {
5649 id: 15,
5650 name: "Blockades",
5651 price: 1e4,
5652 scale: 95,
5653 xOff: 15,
5654 desc: "no effect"
5655 }, {
5656 id: 20,
5657 name: "Devils Tail",
5658 price: 1e4,
5659 scale: 95,
5660 xOff: 20,
5661 desc: "no effect"
5662 }, {
5663 id: 16,
5664 name: "Sawblade",
5665 price: 12e3,
5666 scale: 90,
5667 spin: !0,
5668 xOff: 0,
5669 desc: "deal damage to players that damage you",
5670 dmg: .15
5671 }, {
5672 id: 13,
5673 name: "Angel Wings",
5674 price: 15e3,
5675 scale: 138,
5676 xOff: 22,
5677 desc: "slowly regenerates health over time",
5678 healthRegen: 3
5679 }, {
5680 id: 19,
5681 name: "Shadow Wings",
5682 price: 15e3,
5683 scale: 138,
5684 xOff: 22,
5685 desc: "increased movement speed",
5686 spdMult: 1.1
5687 }, {
5688 id: 18,
5689 name: "Blood Wings",
5690 price: 2e4,
5691 scale: 178,
5692 xOff: 26,
5693 desc: "restores health when you deal damage",
5694 healD: .2
5695 }, {
5696 id: 21,
5697 name: "Corrupt X Wings",
5698 price: 2e4,
5699 scale: 178,
5700 xOff: 26,
5701 desc: "deal damage to players that damage you",
5702 dmg: .25
5703 }]
5704 }, function (e, t) {
5705 e.exports = function (e, t, n, i, r, s, a) {
5706 this.init = function (e, t, n, i, r, s, o, c, l) {
5707 this.active = !0, this.indx = e, this.x = t, this.y = n, this.dir = i, this.skipMov = !0, this.speed = r, this.dmg = s, this.scale = c, this.range = o, this.owner = l, a && (this.sentTo = {})
5708 };
5709 var o, c = [];
5710 this.update = function (l) {
5711 if (this.active) {
5712 var h, u = this.speed * l;
5713 if (this.skipMov ? this.skipMov = !1 : (this.x += u * Math.cos(this.dir), this.y += u * Math.sin(this.dir), this.range -= u, this.range <= 0 && (this.x += this.range * Math.cos(this.dir), this.y += this.range * Math.sin(this.dir), u = 1, this.range = 0, this.active = !1)), a) {
5714 for (var f = 0; f < e.length; ++f) !this.sentTo[e[f].id] && e[f].canSee(this) && (this.sentTo[e[f].id] = 1, a.send(e[f].id, "18", s.fixTo(this.x, 1), s.fixTo(this.y, 1), s.fixTo(this.dir, 2), s.fixTo(this.range, 1), this.speed, this.indx, this.layer, this.sid));
5715 for (c.length = 0, f = 0; f < e.length + t.length; ++f) !(o = e[f] || t[f - e.length]).alive || o == this.owner || this.owner.team && o.team == this.owner.team || s.lineInRect(o.x - o.scale, o.y - o.scale, o.x + o.scale, o.y + o.scale, this.x, this.y, this.x + u * Math.cos(this.dir), this.y + u * Math.sin(this.dir)) && c.push(o);
5716 for (var d = n.getGridArrays(this.x, this.y, this.scale), p = 0; p < d.length; ++p)
5717 for (var g = 0; g < d[p].length; ++g) h = (o = d[p][g]).getScale(), o.active && this.ignoreObj != o.sid && this.layer <= o.layer && c.indexOf(o) < 0 && !o.ignoreCollision && s.lineInRect(o.x - h, o.y - h, o.x + h, o.y + h, this.x, this.y, this.x + u * Math.cos(this.dir), this.y + u * Math.sin(this.dir)) && c.push(o);
5718 if (c.length > 0) {
5719 var m = null,
5720 y = null,
5721 k = null;
5722 for (f = 0; f < c.length; ++f) k = s.getDistance(this.x, this.y, c[f].x, c[f].y), (null == y || k < y) && (y = k, m = c[f]);
5723 if (m.isPlayer || m.isAI) {
5724 var v = .3 * (m.weightM || 1);
5725 m.xVel += v * Math.cos(this.dir), m.yVel += v * Math.sin(this.dir), null != m.weaponIndex && i.weapons[m.weaponIndex].shield && s.getAngleDist(this.dir + Math.PI, m.dir) <= r.shieldAngle || m.changeHealth(-this.dmg, this.owner, this.owner)
5726 } else
5727 for (m.projDmg && m.health && m.changeHealth(-this.dmg) && n.disableObj(m), f = 0; f < e.length; ++f) e[f].active && (m.sentTo[e[f].id] && (m.active ? e[f].canSee(m) && a.send(e[f].id, "8", s.fixTo(this.dir, 2), m.sid) : a.send(e[f].id, "12", m.sid)), m.active || m.owner != e[f] || e[f].changeItemCount(m.group.id, -1));
5728 for (this.active = !1, f = 0; f < e.length; ++f) this.sentTo[e[f].id] && a.send(e[f].id, "19", this.sid, s.fixTo(y, 1))
5729 }
5730 }
5731 }
5732 }
5733 }
5734 }, function (e, t) {
5735 e.exports = function (e, t, n, i, r, s, a, o, c) {
5736 this.addProjectile = function (l, h, u, f, d, p, g, m, y) {
5737 for (var k, v = s.projectiles[p], w = 0; w < t.length; ++w)
5738 if (!t[w].active) {
5739 k = t[w];
5740 break
5741 } return k || ((k = new e(n, i, r, s, a, o, c)).sid = t.length, t.push(k)), k.init(p, l, h, u, d, v.dmg, f, v.scale, g), k.ignoreObj = m, k.layer = y || v.layer, k.src = v.src, k
5742 }
5743 }
5744 }, function (e, t) {
5745 e.exports.obj = function (e, t) {
5746 var n;
5747 this.sounds = [], this.active = !0, this.play = function (t, i, r) {
5748 i && this.active && ((n = this.sounds[t]) || (n = new Howl({
5749 src: ".././sound/" + t + ".mp3"
5750 }), this.sounds[t] = n), r && n.isPlaying || (n.isPlaying = !0, n.play(), n.volume((i || 1) * e.volumeMult), n.loop(r)))
5751 }, this.toggleMute = function (e, t) {
5752 (n = this.sounds[e]) && n.mute(t)
5753 }, this.stop = function (e) {
5754 (n = this.sounds[e]) && (n.stop(), n.isPlaying = !1)
5755 }
5756 }
5757 }, function (e, t, n) {
5758 var i = n(60),
5759 r = n(67);
5760
5761 function s(e, t, n, i, r) {
5762 "localhost" == location.hostname && (window.location.hostname = "127.0.0.1"), this.debugLog = !1, this.baseUrl = e, this.lobbySize = n, this.devPort = t, this.lobbySpread = i, this.rawIPs = !!r, this.server = void 0, this.gameIndex = void 0, this.callback = void 0, this.errorCallback = void 0, this.processServers(vultr.servers)
5763 }
5764 s.prototype.regionInfo = {
5765 0: {
5766 name: "Local",
5767 latitude: 0,
5768 longitude: 0
5769 },
5770 "vultr:1": {
5771 name: "New Jersey",
5772 latitude: 40.1393329,
5773 longitude: -75.8521818
5774 },
5775 "vultr:2": {
5776 name: "Chicago",
5777 latitude: 41.8339037,
5778 longitude: -87.872238
5779 },
5780 "vultr:3": {
5781 name: "Dallas",
5782 latitude: 32.8208751,
5783 longitude: -96.8714229
5784 },
5785 "vultr:4": {
5786 name: "Seattle",
5787 latitude: 47.6149942,
5788 longitude: -122.4759879
5789 },
5790 "vultr:5": {
5791 name: "Los Angeles",
5792 latitude: 34.0207504,
5793 longitude: -118.691914
5794 },
5795 "vultr:6": {
5796 name: "Atlanta",
5797 latitude: 33.7676334,
5798 longitude: -84.5610332
5799 },
5800 "vultr:7": {
5801 name: "Amsterdam",
5802 latitude: 52.3745287,
5803 longitude: 4.7581878
5804 },
5805 "vultr:8": {
5806 name: "London",
5807 latitude: 51.5283063,
5808 longitude: -.382486
5809 },
5810 "vultr:9": {
5811 name: "Frankfurt",
5812 latitude: 50.1211273,
5813 longitude: 8.496137
5814 },
5815 "vultr:12": {
5816 name: "Silicon Valley",
5817 latitude: 37.4024714,
5818 longitude: -122.3219752
5819 },
5820 "vultr:19": {
5821 name: "Sydney",
5822 latitude: -33.8479715,
5823 longitude: 150.651084
5824 },
5825 "vultr:24": {
5826 name: "Paris",
5827 latitude: 48.8588376,
5828 longitude: 2.2773454
5829 },
5830 "vultr:25": {
5831 name: "Tokyo",
5832 latitude: 35.6732615,
5833 longitude: 139.569959
5834 },
5835 "vultr:39": {
5836 name: "Miami",
5837 latitude: 25.7823071,
5838 longitude: -80.3012156
5839 },
5840 "vultr:40": {
5841 name: "Singapore",
5842 latitude: 1.3147268,
5843 longitude: 103.7065876
5844 }
5845 }, s.prototype.start = function (e, t) {
5846 this.callback = e, this.errorCallback = t;
5847 var n = this.parseServerQuery();
5848 n ? (this.log("Found server in query."), this.password = n[3], this.connect(n[0], n[1], n[2])) : (this.log("Pinging servers..."), this.pingServers())
5849 }, s.prototype.parseServerQuery = function () {
5850 var e = i.parse(location.href, !0),
5851 t = e.query.server;
5852 if ("string" == typeof t) {
5853 var n = t.split(":");
5854 if (3 == n.length) {
5855 var r = n[0],
5856 s = parseInt(n[1]),
5857 a = parseInt(n[2]);
5858 return "0" == r || r.startsWith("vultr:") || (r = "vultr:" + r), [r, s, a, e.query.password]
5859 }
5860 this.errorCallback("Invalid number of server parameters in " + t)
5861 }
5862 }, s.prototype.findServer = function (e, t) {
5863 var n = this.servers[e];
5864 if (Array.isArray(n)) {
5865 for (var i = 0; i < n.length; i++) {
5866 var r = n[i];
5867 if (r.index == t) return r
5868 }
5869 console.warn("Could not find server in region " + e + " with index " + t + ".")
5870 } else this.errorCallback("No server list for region " + e)
5871 }, s.prototype.pingServers = function () {
5872 var e = this,
5873 t = [];
5874 for (var n in this.servers)
5875 if (this.servers.hasOwnProperty(n)) {
5876 var i = this.servers[n],
5877 r = i[Math.floor(Math.random() * i.length)];
5878 null != r ? function (i, r) {
5879 var s = new XMLHttpRequest;
5880 s.onreadystatechange = function (i) {
5881 var s = i.target;
5882 if (4 == s.readyState)
5883 if (200 == s.status) {
5884 for (var a = 0; a < t.length; a++) t[a].abort();
5885 e.log("Connecting to region", r.region);
5886 var o = e.seekServer(r.region);
5887 e.connect(o[0], o[1], o[2])
5888 } else console.warn("Error pinging " + r.ip + " in region " + n)
5889 };
5890 var a = "//" + e.serverAddress(r.ip, !0) + ":" + e.serverPort(r) + "/ping";
5891 s.open("GET", a, !0), s.send(null), e.log("Pinging", a), t.push(s)
5892 }(0, r) : console.log("No target server for region " + n)
5893 }
5894 }, s.prototype.seekServer = function (e, t, n) {
5895 null == n && (n = "random"), null == t && (t = !1);
5896 const i = ["random"];
5897 var r = this.lobbySize,
5898 s = this.lobbySpread,
5899 a = this.servers[e].flatMap((function (e) {
5900 var t = 0;
5901 return e.games.map((function (n) {
5902 var i = t++;
5903 return {
5904 region: e.region,
5905 index: e.index * e.games.length + i,
5906 gameIndex: i,
5907 gameCount: e.games.length,
5908 playerCount: n.playerCount,
5909 isPrivate: n.isPrivate
5910 }
5911 }))
5912 })).filter((function (e) {
5913 return !e.isPrivate
5914 })).filter((function (e) {
5915 return !t || 0 == e.playerCount && e.gameIndex >= e.gameCount / 2
5916 })).filter((function (e) {
5917 return "random" == n || i[e.index % i.length].key == n
5918 })).sort((function (e, t) {
5919 return t.playerCount - e.playerCount
5920 })).filter((function (e) {
5921 return e.playerCount < r
5922 }));
5923 if (t && a.reverse(), 0 != a.length) {
5924 var o = Math.min(s, a.length),
5925 c = Math.floor(Math.random() * o),
5926 l = a[c = Math.min(c, a.length - 1)],
5927 h = l.region,
5928 u = (c = Math.floor(l.index / l.gameCount), l.index % l.gameCount);
5929 return this.log("Found server."), [h, c, u]
5930 }
5931 this.errorCallback("No open servers.")
5932 }, s.prototype.connect = function (e, t, n) {
5933 if (!this.connected) {
5934 var i = this.findServer(e, t);
5935 null != i ? (this.log("Connecting to server", i, "with game index", n), i.games[n].playerCount >= this.lobbySize ? this.errorCallback("Server is already full.") : (window.history.replaceState(document.title, document.title, this.generateHref(e, t, n, this.password)), this.server = i, this.gameIndex = n, this.log("Calling callback with address", this.serverAddress(i.ip), "on port", this.serverPort(i), "with game index", n), this.callback(this.serverAddress(i.ip), this.serverPort(i), n))) : this.errorCallback("Failed to find server for region " + e + " and index " + t)
5936 }
5937 }, s.prototype.switchServer = function (e, t, n, i) {
5938 this.switchingServers = !0, window.location.href = this.generateHref(e, t, n, i)
5939 }, s.prototype.generateHref = function (e, t, n, i) {
5940 var r = "/?server=" + (e = this.stripRegion(e)) + ":" + t + ":" + n;
5941 return i && (r += "&password=" + encodeURIComponent(i)), r
5942 }, s.prototype.serverAddress = function (e, t) {
5943 return "127.0.0.1" == e || "7f000001" == e || "903d62ef5d1c2fecdcaeb5e7dd485eff" == e ? window.location.hostname : this.rawIPs ? t ? "ip_" + this.hashIP(e) + "." + this.baseUrl : e : "ip_" + e + "." + this.baseUrl
5944 }, s.prototype.serverPort = function (e) {
5945 return 0 == e.region ? this.devPort : location.protocol.startsWith("https") ? 443 : 80
5946 }, s.prototype.processServers = function (e) {
5947 for (var t = {}, n = 0; n < e.length; n++) {
5948 var i = e[n],
5949 r = t[i.region];
5950 null == r && (r = [], t[i.region] = r), r.push(i)
5951 }
5952 for (var s in t) t[s] = t[s].sort((function (e, t) {
5953 return e.index - t.index
5954 }));
5955 this.servers = t
5956 }, s.prototype.ipToHex = function (e) {
5957 return e.split(".").map(e => ("00" + parseInt(e).toString(16)).substr(-2)).join("").toLowerCase()
5958 }, s.prototype.hashIP = function (e) {
5959 return r(this.ipToHex(e))
5960 }, s.prototype.log = function () {
5961 return this.debugLog ? console.log.apply(void 0, arguments) : console.verbose ? console.verbose.apply(void 0, arguments) : void 0
5962 }, s.prototype.stripRegion = function (e) {
5963 return e.startsWith("vultr:") ? e = e.slice(6) : e.startsWith("do:") && (e = e.slice(3)), e
5964 }, window.testVultrClient = function () {
5965 var e = 1;
5966
5967 function t(t, n) {
5968 (t = "" + t) == (n = "" + n) ? console.log(`Assert ${e} passed.`): console.warn(`Assert ${e} failed. Expected ${n}, got ${t}.`), e++
5969 }
5970 var n = new s("test.io", -1, 5, 1, !1);
5971 n.errorCallback = function (e) {}, n.processServers(function (e) {
5972 var t = [];
5973 for (var n in e)
5974 for (var i = e[n], r = 0; r < i.length; r++) t.push({
5975 ip: n + ":" + r,
5976 scheme: "testing",
5977 region: n,
5978 index: r,
5979 games: i[r].map(e => ({
5980 playerCount: e,
5981 isPrivate: !1
5982 }))
5983 });
5984 return t
5985 }({
5986 1: [
5987 [0, 0, 0, 0],
5988 [0, 0, 0, 0]
5989 ],
5990 2: [
5991 [5, 1, 0, 0],
5992 [0, 0, 0, 0]
5993 ],
5994 3: [
5995 [5, 0, 1, 5],
5996 [0, 0, 0, 0]
5997 ],
5998 4: [
5999 [5, 1, 1, 5],
6000 [1, 0, 0, 0]
6001 ],
6002 5: [
6003 [5, 1, 1, 5],
6004 [1, 0, 4, 0]
6005 ],
6006 6: [
6007 [5, 5, 5, 5],
6008 [2, 3, 1, 4]
6009 ],
6010 7: [
6011 [5, 5, 5, 5],
6012 [5, 5, 5, 5]
6013 ]
6014 })), t(n.seekServer(1, !1), [1, 0, 0]), t(n.seekServer(1, !0), [1, 1, 3]), t(n.seekServer(2, !1), [2, 0, 1]), t(n.seekServer(2, !0), [2, 1, 3]), t(n.seekServer(3, !1), [3, 0, 2]), t(n.seekServer(3, !0), [3, 1, 3]), t(n.seekServer(4, !1), [4, 0, 1]), t(n.seekServer(4, !0), [4, 1, 3]), t(n.seekServer(5, !1), [5, 1, 2]), t(n.seekServer(5, !0), [5, 1, 3]), t(n.seekServer(6, !1), [6, 1, 3]), t(n.seekServer(6, !0), void 0), t(n.seekServer(7, !1), void 0), t(n.seekServer(7, !0), void 0), console.log("Tests passed.")
6015 };
6016 var a = function (e, t) {
6017 return e.concat(t)
6018 };
6019 Array.prototype.flatMap = function (e) {
6020 return function (e, t) {
6021 return t.map(e).reduce(a, [])
6022 }(e, this)
6023 }, e.exports = s
6024 }, function (e, t, n) {
6025 "use strict";
6026 var i = n(61),
6027 r = n(63);
6028
6029 function s() {
6030 this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null
6031 }
6032 t.parse = v, t.resolve = function (e, t) {
6033 return v(e, !1, !0).resolve(t)
6034 }, t.resolveObject = function (e, t) {
6035 return e ? v(e, !1, !0).resolveObject(t) : t
6036 }, t.format = function (e) {
6037 return r.isString(e) && (e = v(e)), e instanceof s ? e.format() : s.prototype.format.call(e)
6038 }, t.Url = s;
6039 var a = /^([a-z0-9.+-]+:)/i,
6040 o = /:[0-9]*$/,
6041 c = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
6042 l = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"]),
6043 h = ["'"].concat(l),
6044 u = ["%", "/", "?", ";", "#"].concat(h),
6045 f = ["/", "?", "#"],
6046 d = /^[+a-z0-9A-Z_-]{0,63}$/,
6047 p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
6048 g = {
6049 javascript: !0,
6050 "javascript:": !0
6051 },
6052 m = {
6053 javascript: !0,
6054 "javascript:": !0
6055 },
6056 y = {
6057 http: !0,
6058 https: !0,
6059 ftp: !0,
6060 gopher: !0,
6061 file: !0,
6062 "http:": !0,
6063 "https:": !0,
6064 "ftp:": !0,
6065 "gopher:": !0,
6066 "file:": !0
6067 },
6068 k = n(64);
6069
6070 function v(e, t, n) {
6071 if (e && r.isObject(e) && e instanceof s) return e;
6072 var i = new s;
6073 return i.parse(e, t, n), i
6074 }
6075 s.prototype.parse = function (e, t, n) {
6076 if (!r.isString(e)) throw new TypeError("Parameter 'url' must be a string, not " + typeof e);
6077 var s = e.indexOf("?"),
6078 o = -1 !== s && s < e.indexOf("#") ? "?" : "#",
6079 l = e.split(o);
6080 l[0] = l[0].replace(/\\/g, "/");
6081 var v = e = l.join(o);
6082 if (v = v.trim(), !n && 1 === e.split("#").length) {
6083 var w = c.exec(v);
6084 if (w) return this.path = v, this.href = v, this.pathname = w[1], w[2] ? (this.search = w[2], this.query = t ? k.parse(this.search.substr(1)) : this.search.substr(1)) : t && (this.search = "", this.query = {}), this
6085 }
6086 var b = a.exec(v);
6087 if (b) {
6088 var x = (b = b[0]).toLowerCase();
6089 this.protocol = x, v = v.substr(b.length)
6090 }
6091 if (n || b || v.match(/^\/\/[^@\/]+@[^@\/]+/)) {
6092 var S = "//" === v.substr(0, 2);
6093 !S || b && m[b] || (v = v.substr(2), this.slashes = !0)
6094 }
6095 if (!m[b] && (S || b && !y[b])) {
6096 for (var T, I, E = -1, M = 0; M < f.length; M++) - 1 !== (A = v.indexOf(f[M])) && (-1 === E || A < E) && (E = A);
6097 for (-1 !== (I = -1 === E ? v.lastIndexOf("@") : v.lastIndexOf("@", E)) && (T = v.slice(0, I), v = v.slice(I + 1), this.auth = decodeURIComponent(T)), E = -1, M = 0; M < u.length; M++) {
6098 var A; - 1 !== (A = v.indexOf(u[M])) && (-1 === E || A < E) && (E = A)
6099 } - 1 === E && (E = v.length), this.host = v.slice(0, E), v = v.slice(E), this.parseHost(), this.hostname = this.hostname || "";
6100 var P = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
6101 if (!P)
6102 for (var B = this.hostname.split(/\./), C = (M = 0, B.length); M < C; M++) {
6103 var O = B[M];
6104 if (O && !O.match(d)) {
6105 for (var R = "", j = 0, _ = O.length; j < _; j++) O.charCodeAt(j) > 127 ? R += "x" : R += O[j];
6106 if (!R.match(d)) {
6107 var U = B.slice(0, M),
6108 D = B.slice(M + 1),
6109 L = O.match(p);
6110 L && (U.push(L[1]), D.unshift(L[2])), D.length && (v = "/" + D.join(".") + v), this.hostname = U.join(".");
6111 break
6112 }
6113 }
6114 }
6115 this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), P || (this.hostname = i.toASCII(this.hostname));
6116 var F = this.port ? ":" + this.port : "",
6117 z = this.hostname || "";
6118 this.host = z + F, this.href += this.host, P && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), "/" !== v[0] && (v = "/" + v))
6119 }
6120 if (!g[x])
6121 for (M = 0, C = h.length; M < C; M++) {
6122 var H = h[M];
6123 if (-1 !== v.indexOf(H)) {
6124 var V = encodeURIComponent(H);
6125 V === H && (V = escape(H)), v = v.split(H).join(V)
6126 }
6127 }
6128 var q = v.indexOf("#"); - 1 !== q && (this.hash = v.substr(q), v = v.slice(0, q));
6129 var Y = v.indexOf("?");
6130 if (-1 !== Y ? (this.search = v.substr(Y), this.query = v.substr(Y + 1), t && (this.query = k.parse(this.query)), v = v.slice(0, Y)) : t && (this.search = "", this.query = {}), v && (this.pathname = v), y[x] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
6131 F = this.pathname || "";
6132 var W = this.search || "";
6133 this.path = F + W
6134 }
6135 return this.href = this.format(), this
6136 }, s.prototype.format = function () {
6137 var e = this.auth || "";
6138 e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"), e += "@");
6139 var t = this.protocol || "",
6140 n = this.pathname || "",
6141 i = this.hash || "",
6142 s = !1,
6143 a = "";
6144 this.host ? s = e + this.host : this.hostname && (s = e + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port && (s += ":" + this.port)), this.query && r.isObject(this.query) && Object.keys(this.query).length && (a = k.stringify(this.query));
6145 var o = this.search || a && "?" + a || "";
6146 return t && ":" !== t.substr(-1) && (t += ":"), this.slashes || (!t || y[t]) && !1 !== s ? (s = "//" + (s || ""), n && "/" !== n.charAt(0) && (n = "/" + n)) : s || (s = ""), i && "#" !== i.charAt(0) && (i = "#" + i), o && "?" !== o.charAt(0) && (o = "?" + o), t + s + (n = n.replace(/[?#]/g, (function (e) {
6147 return encodeURIComponent(e)
6148 }))) + (o = o.replace("#", "%23")) + i
6149 }, s.prototype.resolve = function (e) {
6150 return this.resolveObject(v(e, !1, !0)).format()
6151 }, s.prototype.resolveObject = function (e) {
6152 if (r.isString(e)) {
6153 var t = new s;
6154 t.parse(e, !1, !0), e = t
6155 }
6156 for (var n = new s, i = Object.keys(this), a = 0; a < i.length; a++) {
6157 var o = i[a];
6158 n[o] = this[o]
6159 }
6160 if (n.hash = e.hash, "" === e.href) return n.href = n.format(), n;
6161 if (e.slashes && !e.protocol) {
6162 for (var c = Object.keys(e), l = 0; l < c.length; l++) {
6163 var h = c[l];
6164 "protocol" !== h && (n[h] = e[h])
6165 }
6166 return y[n.protocol] && n.hostname && !n.pathname && (n.path = n.pathname = "/"), n.href = n.format(), n
6167 }
6168 if (e.protocol && e.protocol !== n.protocol) {
6169 if (!y[e.protocol]) {
6170 for (var u = Object.keys(e), f = 0; f < u.length; f++) {
6171 var d = u[f];
6172 n[d] = e[d]
6173 }
6174 return n.href = n.format(), n
6175 }
6176 if (n.protocol = e.protocol, e.host || m[e.protocol]) n.pathname = e.pathname;
6177 else {
6178 for (var p = (e.pathname || "").split("/"); p.length && !(e.host = p.shift()););
6179 e.host || (e.host = ""), e.hostname || (e.hostname = ""), "" !== p[0] && p.unshift(""), p.length < 2 && p.unshift(""), n.pathname = p.join("/")
6180 }
6181 if (n.search = e.search, n.query = e.query, n.host = e.host || "", n.auth = e.auth, n.hostname = e.hostname || e.host, n.port = e.port, n.pathname || n.search) {
6182 var g = n.pathname || "",
6183 k = n.search || "";
6184 n.path = g + k
6185 }
6186 return n.slashes = n.slashes || e.slashes, n.href = n.format(), n
6187 }
6188 var v = n.pathname && "/" === n.pathname.charAt(0),
6189 w = e.host || e.pathname && "/" === e.pathname.charAt(0),
6190 b = w || v || n.host && e.pathname,
6191 x = b,
6192 S = n.pathname && n.pathname.split("/") || [],
6193 T = (p = e.pathname && e.pathname.split("/") || [], n.protocol && !y[n.protocol]);
6194 if (T && (n.hostname = "", n.port = null, n.host && ("" === S[0] ? S[0] = n.host : S.unshift(n.host)), n.host = "", e.protocol && (e.hostname = null, e.port = null, e.host && ("" === p[0] ? p[0] = e.host : p.unshift(e.host)), e.host = null), b = b && ("" === p[0] || "" === S[0])), w) n.host = e.host || "" === e.host ? e.host : n.host, n.hostname = e.hostname || "" === e.hostname ? e.hostname : n.hostname, n.search = e.search, n.query = e.query, S = p;
6195 else if (p.length) S || (S = []), S.pop(), S = S.concat(p), n.search = e.search, n.query = e.query;
6196 else if (!r.isNullOrUndefined(e.search)) return T && (n.hostname = n.host = S.shift(), (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth = P.shift(), n.host = n.hostname = P.shift())), n.search = e.search, n.query = e.query, r.isNull(n.pathname) && r.isNull(n.search) || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.href = n.format(), n;
6197 if (!S.length) return n.pathname = null, n.search ? n.path = "/" + n.search : n.path = null, n.href = n.format(), n;
6198 for (var I = S.slice(-1)[0], E = (n.host || e.host || S.length > 1) && ("." === I || ".." === I) || "" === I, M = 0, A = S.length; A >= 0; A--) "." === (I = S[A]) ? S.splice(A, 1) : ".." === I ? (S.splice(A, 1), M++) : M && (S.splice(A, 1), M--);
6199 if (!b && !x)
6200 for (; M--; M) S.unshift("..");
6201 !b || "" === S[0] || S[0] && "/" === S[0].charAt(0) || S.unshift(""), E && "/" !== S.join("/").substr(-1) && S.push("");
6202 var P, B = "" === S[0] || S[0] && "/" === S[0].charAt(0);
6203 return T && (n.hostname = n.host = B ? "" : S.length ? S.shift() : "", (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth = P.shift(), n.host = n.hostname = P.shift())), (b = b || n.host && S.length) && !B && S.unshift(""), S.length ? n.pathname = S.join("/") : (n.pathname = null, n.path = null), r.isNull(n.pathname) && r.isNull(n.search) || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.auth = e.auth || n.auth, n.slashes = n.slashes || e.slashes, n.href = n.format(), n
6204 }, s.prototype.parseHost = function () {
6205 var e = this.host,
6206 t = o.exec(e);
6207 t && (":" !== (t = t[0]) && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e)
6208 }
6209 }, function (e, t, n) {
6210 (function (e, i) {
6211 var r; /*! https://mths.be/punycode v1.4.1 by @mathias */
6212 ! function (s) {
6213 t && t.nodeType, e && e.nodeType;
6214 var a = "object" == typeof i && i;
6215 a.global !== a && a.window !== a && a.self;
6216 var o, c = 2147483647,
6217 l = 36,
6218 h = /^xn--/,
6219 u = /[^\x20-\x7E]/,
6220 f = /[\x2E\u3002\uFF0E\uFF61]/g,
6221 d = {
6222 overflow: "Overflow: input needs wider integers to process",
6223 "not-basic": "Illegal input >= 0x80 (not a basic code point)",
6224 "invalid-input": "Invalid input"
6225 },
6226 p = Math.floor,
6227 g = String.fromCharCode;
6228
6229 function m(e) {
6230 throw new RangeError(d[e])
6231 }
6232
6233 function y(e, t) {
6234 for (var n = e.length, i = []; n--;) i[n] = t(e[n]);
6235 return i
6236 }
6237
6238 function k(e, t) {
6239 var n = e.split("@"),
6240 i = "";
6241 return n.length > 1 && (i = n[0] + "@", e = n[1]), i + y((e = e.replace(f, ".")).split("."), t).join(".")
6242 }
6243
6244 function v(e) {
6245 for (var t, n, i = [], r = 0, s = e.length; r < s;)(t = e.charCodeAt(r++)) >= 55296 && t <= 56319 && r < s ? 56320 == (64512 & (n = e.charCodeAt(r++))) ? i.push(((1023 & t) << 10) + (1023 & n) + 65536) : (i.push(t), r--) : i.push(t);
6246 return i
6247 }
6248
6249 function w(e) {
6250 return y(e, (function (e) {
6251 var t = "";
6252 return e > 65535 && (t += g((e -= 65536) >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t + g(e)
6253 })).join("")
6254 }
6255
6256 function b(e) {
6257 return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e - 97 < 26 ? e - 97 : l
6258 }
6259
6260 function x(e, t) {
6261 return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
6262 }
6263
6264 function S(e, t, n) {
6265 var i = 0;
6266 for (e = n ? p(e / 700) : e >> 1, e += p(e / t); e > 455; i += l) e = p(e / 35);
6267 return p(i + 36 * e / (e + 38))
6268 }
6269
6270 function T(e) {
6271 var t, n, i, r, s, a, o, h, u, f, d = [],
6272 g = e.length,
6273 y = 0,
6274 k = 128,
6275 v = 72;
6276 for ((n = e.lastIndexOf("-")) < 0 && (n = 0), i = 0; i < n; ++i) e.charCodeAt(i) >= 128 && m("not-basic"), d.push(e.charCodeAt(i));
6277 for (r = n > 0 ? n + 1 : 0; r < g;) {
6278 for (s = y, a = 1, o = l; r >= g && m("invalid-input"), ((h = b(e.charCodeAt(r++))) >= l || h > p((c - y) / a)) && m("overflow"), y += h * a, !(h < (u = o <= v ? 1 : o >= v + 26 ? 26 : o - v)); o += l) a > p(c / (f = l - u)) && m("overflow"), a *= f;
6279 v = S(y - s, t = d.length + 1, 0 == s), p(y / t) > c - k && m("overflow"), k += p(y / t), y %= t, d.splice(y++, 0, k)
6280 }
6281 return w(d)
6282 }
6283
6284 function I(e) {
6285 var t, n, i, r, s, a, o, h, u, f, d, y, k, w, b, T = [];
6286 for (y = (e = v(e)).length, t = 128, n = 0, s = 72, a = 0; a < y; ++a)(d = e[a]) < 128 && T.push(g(d));
6287 for (i = r = T.length, r && T.push("-"); i < y;) {
6288 for (o = c, a = 0; a < y; ++a)(d = e[a]) >= t && d < o && (o = d);
6289 for (o - t > p((c - n) / (k = i + 1)) && m("overflow"), n += (o - t) * k, t = o, a = 0; a < y; ++a)
6290 if ((d = e[a]) < t && ++n > c && m("overflow"), d == t) {
6291 for (h = n, u = l; !(h < (f = u <= s ? 1 : u >= s + 26 ? 26 : u - s)); u += l) b = h - f, w = l - f, T.push(g(x(f + b % w, 0))), h = p(b / w);
6292 T.push(g(x(h, 0))), s = S(n, k, i == r), n = 0, ++i
6293 }++ n, ++t
6294 }
6295 return T.join("")
6296 }
6297 o = {
6298 version: "1.4.1",
6299 ucs2: {
6300 decode: v,
6301 encode: w
6302 },
6303 decode: T,
6304 encode: I,
6305 toASCII: function (e) {
6306 return k(e, (function (e) {
6307 return u.test(e) ? "xn--" + I(e) : e
6308 }))
6309 },
6310 toUnicode: function (e) {
6311 return k(e, (function (e) {
6312 return h.test(e) ? T(e.slice(4).toLowerCase()) : e
6313 }))
6314 }
6315 }, void 0 === (r = function () {
6316 return o
6317 }.call(t, n, t, e)) || (e.exports = r)
6318 }()
6319 }).call(this, n(62)(e), n(12))
6320 }, function (e, t) {
6321 e.exports = function (e) {
6322 return e.webpackPolyfill || (e.deprecate = function () {}, e.paths = [], e.children || (e.children = []), Object.defineProperty(e, "loaded", {
6323 enumerable: !0,
6324 get: function () {
6325 return e.l
6326 }
6327 }), Object.defineProperty(e, "id", {
6328 enumerable: !0,
6329 get: function () {
6330 return e.i
6331 }
6332 }), e.webpackPolyfill = 1), e
6333 }
6334 }, function (e, t, n) {
6335 "use strict";
6336 e.exports = {
6337 isString: function (e) {
6338 return "string" == typeof e
6339 },
6340 isObject: function (e) {
6341 return "object" == typeof e && null !== e
6342 },
6343 isNull: function (e) {
6344 return null === e
6345 },
6346 isNullOrUndefined: function (e) {
6347 return null == e
6348 }
6349 }
6350 }, function (e, t, n) {
6351 "use strict";
6352 t.decode = t.parse = n(65), t.encode = t.stringify = n(66)
6353 }, function (e, t, n) {
6354 "use strict";
6355
6356 function i(e, t) {
6357 return Object.prototype.hasOwnProperty.call(e, t)
6358 }
6359 e.exports = function (e, t, n, s) {
6360 t = t || "&", n = n || "=";
6361 var a = {};
6362 if ("string" != typeof e || 0 === e.length) return a;
6363 var o = /\+/g;
6364 e = e.split(t);
6365 var c = 1e3;
6366 s && "number" == typeof s.maxKeys && (c = s.maxKeys);
6367 var l = e.length;
6368 c > 0 && l > c && (l = c);
6369 for (var h = 0; h < l; ++h) {
6370 var u, f, d, p, g = e[h].replace(o, "%20"),
6371 m = g.indexOf(n);
6372 m >= 0 ? (u = g.substr(0, m), f = g.substr(m + 1)) : (u = g, f = ""), d = decodeURIComponent(u), p = decodeURIComponent(f), i(a, d) ? r(a[d]) ? a[d].push(p) : a[d] = [a[d], p] : a[d] = p
6373 }
6374 return a
6375 };
6376 var r = Array.isArray || function (e) {
6377 return "[object Array]" === Object.prototype.toString.call(e)
6378 }
6379 }, function (e, t, n) {
6380 "use strict";
6381 var i = function (e) {
6382 switch (typeof e) {
6383 case "string":
6384 return e;
6385 case "boolean":
6386 return e ? "true" : "false";
6387 case "number":
6388 return isFinite(e) ? e : "";
6389 default:
6390 return ""
6391 }
6392 };
6393 e.exports = function (e, t, n, o) {
6394 return t = t || "&", n = n || "=", null === e && (e = void 0), "object" == typeof e ? s(a(e), (function (a) {
6395 var o = encodeURIComponent(i(a)) + n;
6396 return r(e[a]) ? s(e[a], (function (e) {
6397 return o + encodeURIComponent(i(e))
6398 })).join(t) : o + encodeURIComponent(i(e[a]))
6399 })).join(t) : o ? encodeURIComponent(i(o)) + n + encodeURIComponent(i(e)) : ""
6400 };
6401 var r = Array.isArray || function (e) {
6402 return "[object Array]" === Object.prototype.toString.call(e)
6403 };
6404
6405 function s(e, t) {
6406 if (e.map) return e.map(t);
6407 for (var n = [], i = 0; i < e.length; i++) n.push(t(e[i], i));
6408 return n
6409 }
6410 var a = Object.keys || function (e) {
6411 var t = [];
6412 for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
6413 return t
6414 }
6415 }, function (e, t, n) {
6416 ! function () {
6417 var t = n(68),
6418 i = n(20).utf8,
6419 r = n(69),
6420 s = n(20).bin,
6421 a = function (e, n) {
6422 e.constructor == String ? e = n && "binary" === n.encoding ? s.stringToBytes(e) : i.stringToBytes(e) : r(e) ? e = Array.prototype.slice.call(e, 0) : Array.isArray(e) || (e = e.toString());
6423 for (var o = t.bytesToWords(e), c = 8 * e.length, l = 1732584193, h = -271733879, u = -1732584194, f = 271733878, d = 0; d < o.length; d++) o[d] = 16711935 & (o[d] << 8 | o[d] >>> 24) | 4278255360 & (o[d] << 24 | o[d] >>> 8);
6424 o[c >>> 5] |= 128 << c % 32, o[14 + (c + 64 >>> 9 << 4)] = c;
6425 var p = a._ff,
6426 g = a._gg,
6427 m = a._hh,
6428 y = a._ii;
6429 for (d = 0; d < o.length; d += 16) {
6430 var k = l,
6431 v = h,
6432 w = u,
6433 b = f;
6434 h = y(h = y(h = y(h = y(h = m(h = m(h = m(h = m(h = g(h = g(h = g(h = g(h = p(h = p(h = p(h = p(h, u = p(u, f = p(f, l = p(l, h, u, f, o[d + 0], 7, -680876936), h, u, o[d + 1], 12, -389564586), l, h, o[d + 2], 17, 606105819), f, l, o[d + 3], 22, -1044525330), u = p(u, f = p(f, l = p(l, h, u, f, o[d + 4], 7, -176418897), h, u, o[d + 5], 12, 1200080426), l, h, o[d + 6], 17, -1473231341), f, l, o[d + 7], 22, -45705983), u = p(u, f = p(f, l = p(l, h, u, f, o[d + 8], 7, 1770035416), h, u, o[d + 9], 12, -1958414417), l, h, o[d + 10], 17, -42063), f, l, o[d + 11], 22, -1990404162), u = p(u, f = p(f, l = p(l, h, u, f, o[d + 12], 7, 1804603682), h, u, o[d + 13], 12, -40341101), l, h, o[d + 14], 17, -1502002290), f, l, o[d + 15], 22, 1236535329), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 1], 5, -165796510), h, u, o[d + 6], 9, -1069501632), l, h, o[d + 11], 14, 643717713), f, l, o[d + 0], 20, -373897302), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 5], 5, -701558691), h, u, o[d + 10], 9, 38016083), l, h, o[d + 15], 14, -660478335), f, l, o[d + 4], 20, -405537848), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 9], 5, 568446438), h, u, o[d + 14], 9, -1019803690), l, h, o[d + 3], 14, -187363961), f, l, o[d + 8], 20, 1163531501), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 13], 5, -1444681467), h, u, o[d + 2], 9, -51403784), l, h, o[d + 7], 14, 1735328473), f, l, o[d + 12], 20, -1926607734), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 5], 4, -378558), h, u, o[d + 8], 11, -2022574463), l, h, o[d + 11], 16, 1839030562), f, l, o[d + 14], 23, -35309556), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 1], 4, -1530992060), h, u, o[d + 4], 11, 1272893353), l, h, o[d + 7], 16, -155497632), f, l, o[d + 10], 23, -1094730640), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 13], 4, 681279174), h, u, o[d + 0], 11, -358537222), l, h, o[d + 3], 16, -722521979), f, l, o[d + 6], 23, 76029189), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 9], 4, -640364487), h, u, o[d + 12], 11, -421815835), l, h, o[d + 15], 16, 530742520), f, l, o[d + 2], 23, -995338651), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 0], 6, -198630844), h, u, o[d + 7], 10, 1126891415), l, h, o[d + 14], 15, -1416354905), f, l, o[d + 5], 21, -57434055), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 12], 6, 1700485571), h, u, o[d + 3], 10, -1894986606), l, h, o[d + 10], 15, -1051523), f, l, o[d + 1], 21, -2054922799), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 8], 6, 1873313359), h, u, o[d + 15], 10, -30611744), l, h, o[d + 6], 15, -1560198380), f, l, o[d + 13], 21, 1309151649), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 4], 6, -145523070), h, u, o[d + 11], 10, -1120210379), l, h, o[d + 2], 15, 718787259), f, l, o[d + 9], 21, -343485551), l = l + k >>> 0, h = h + v >>> 0, u = u + w >>> 0, f = f + b >>> 0
6435 }
6436 return t.endian([l, h, u, f])
6437 };
6438 a._ff = function (e, t, n, i, r, s, a) {
6439 var o = e + (t & n | ~t & i) + (r >>> 0) + a;
6440 return (o << s | o >>> 32 - s) + t
6441 }, a._gg = function (e, t, n, i, r, s, a) {
6442 var o = e + (t & i | n & ~i) + (r >>> 0) + a;
6443 return (o << s | o >>> 32 - s) + t
6444 }, a._hh = function (e, t, n, i, r, s, a) {
6445 var o = e + (t ^ n ^ i) + (r >>> 0) + a;
6446 return (o << s | o >>> 32 - s) + t
6447 }, a._ii = function (e, t, n, i, r, s, a) {
6448 var o = e + (n ^ (t | ~i)) + (r >>> 0) + a;
6449 return (o << s | o >>> 32 - s) + t
6450 }, a._blocksize = 16, a._digestsize = 16, e.exports = function (e, n) {
6451 if (null == e) throw new Error("Illegal argument " + e);
6452 var i = t.wordsToBytes(a(e, n));
6453 return n && n.asBytes ? i : n && n.asString ? s.bytesToString(i) : t.bytesToHex(i)
6454 }
6455 }()
6456 }, function (e, t) {
6457 ! function () {
6458 var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
6459 n = {
6460 rotl: function (e, t) {
6461 return e << t | e >>> 32 - t
6462 },
6463 rotr: function (e, t) {
6464 return e << 32 - t | e >>> t
6465 },
6466 endian: function (e) {
6467 if (e.constructor == Number) return 16711935 & n.rotl(e, 8) | 4278255360 & n.rotl(e, 24);
6468 for (var t = 0; t < e.length; t++) e[t] = n.endian(e[t]);
6469 return e
6470 },
6471 randomBytes: function (e) {
6472 for (var t = []; e > 0; e--) t.push(Math.floor(256 * Math.random()));
6473 return t
6474 },
6475 bytesToWords: function (e) {
6476 for (var t = [], n = 0, i = 0; n < e.length; n++, i += 8) t[i >>> 5] |= e[n] << 24 - i % 32;
6477 return t
6478 },
6479 wordsToBytes: function (e) {
6480 for (var t = [], n = 0; n < 32 * e.length; n += 8) t.push(e[n >>> 5] >>> 24 - n % 32 & 255);
6481 return t
6482 },
6483 bytesToHex: function (e) {
6484 for (var t = [], n = 0; n < e.length; n++) t.push((e[n] >>> 4).toString(16)), t.push((15 & e[n]).toString(16));
6485 return t.join("")
6486 },
6487 hexToBytes: function (e) {
6488 for (var t = [], n = 0; n < e.length; n += 2) t.push(parseInt(e.substr(n, 2), 16));
6489 return t
6490 },
6491 bytesToBase64: function (e) {
6492 for (var n = [], i = 0; i < e.length; i += 3)
6493 for (var r = e[i] << 16 | e[i + 1] << 8 | e[i + 2], s = 0; s < 4; s++) 8 * i + 6 * s <= 8 * e.length ? n.push(t.charAt(r >>> 6 * (3 - s) & 63)) : n.push("=");
6494 return n.join("")
6495 },
6496 base64ToBytes: function (e) {
6497 e = e.replace(/[^A-Z0-9+\/]/gi, "");
6498 for (var n = [], i = 0, r = 0; i < e.length; r = ++i % 4) 0 != r && n.push((t.indexOf(e.charAt(i - 1)) & Math.pow(2, -2 * r + 8) - 1) << 2 * r | t.indexOf(e.charAt(i)) >>> 6 - 2 * r);
6499 return n
6500 }
6501 };
6502 e.exports = n
6503 }()
6504 }, function (e, t) {
6505 function n(e) {
6506 return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
6507 }
6508 /*!
6509 * Determine if an object is a Buffer
6510 *
6511 * @author Feross Aboukhadijeh <https://feross.org>
6512 * @license MIT
6513 */
6514 e.exports = function (e) {
6515 return null != e && (n(e) || function (e) {
6516 return "function" == typeof e.readFloatLE && "function" == typeof e.slice && n(e.slice(0, 0))
6517 }(e) || !!e._isBuffer)
6518 }
6519 }, function (e, t) {
6520 e.exports = function (e, t, n, i, r, s, a, o, c) {
6521 this.aiTypes = [{
6522 id: 0,
6523 name: "Cow",
6524 src: "cow_1",
6525 killScore: 150,
6526 health: 500,
6527 weightM: .8,
6528 speed: 95e-5,
6529 turnSpeed: .001,
6530 scale: 72,
6531 drop: ["food", 50]
6532 }, {
6533 id: 1,
6534 name: "Pig",
6535 src: "pig_1",
6536 killScore: 200,
6537 health: 800,
6538 weightM: .6,
6539 speed: 85e-5,
6540 turnSpeed: .001,
6541 scale: 72,
6542 drop: ["food", 80]
6543 }, {
6544 id: 2,
6545 name: "Bull",
6546 src: "bull_2",
6547 hostile: !0,
6548 dmg: 20,
6549 killScore: 1e3,
6550 health: 1800,
6551 weightM: .5,
6552 speed: 94e-5,
6553 turnSpeed: 74e-5,
6554 scale: 78,
6555 viewRange: 800,
6556 chargePlayer: !0,
6557 drop: ["food", 100]
6558 }, {
6559 id: 3,
6560 name: "Bully",
6561 src: "bull_1",
6562 hostile: !0,
6563 dmg: 20,
6564 killScore: 2e3,
6565 health: 2800,
6566 weightM: .45,
6567 speed: .001,
6568 turnSpeed: 8e-4,
6569 scale: 90,
6570 viewRange: 900,
6571 chargePlayer: !0,
6572 drop: ["food", 400]
6573 }, {
6574 id: 4,
6575 name: "Wolf",
6576 src: "wolf_1",
6577 hostile: !0,
6578 dmg: 8,
6579 killScore: 500,
6580 health: 300,
6581 weightM: .45,
6582 speed: .001,
6583 turnSpeed: .002,
6584 scale: 84,
6585 viewRange: 800,
6586 chargePlayer: !0,
6587 drop: ["food", 200]
6588 }, {
6589 id: 5,
6590 name: "Quack",
6591 src: "chicken_1",
6592 dmg: 8,
6593 killScore: 2e3,
6594 noTrap: !0,
6595 health: 300,
6596 weightM: .2,
6597 speed: .0018,
6598 turnSpeed: .006,
6599 scale: 70,
6600 drop: ["food", 100]
6601 }, {
6602 id: 6,
6603 name: "Moostafa",
6604 nameScale: 50,
6605 src: "enemy",
6606 hostile: !0,
6607 dontRun: !0,
6608 fixedSpawn: !0,
6609 spawnDelay: 6e4,
6610 noTrap: !0,
6611 colDmg: 100,
6612 dmg: 40,
6613 killScore: 8e3,
6614 health: 18e3,
6615 weightM: .4,
6616 speed: 7e-4,
6617 turnSpeed: .01,
6618 scale: 80,
6619 spriteMlt: 1.8,
6620 leapForce: .9,
6621 viewRange: 1e3,
6622 hitRange: 210,
6623 hitDelay: 1e3,
6624 chargePlayer: !0,
6625 drop: ["food", 100]
6626 }, {
6627 id: 7,
6628 name: "Treasure",
6629 hostile: !0,
6630 nameScale: 35,
6631 src: "crate_1",
6632 fixedSpawn: !0,
6633 spawnDelay: 12e4,
6634 colDmg: 200,
6635 killScore: 5e3,
6636 health: 2e4,
6637 weightM: .1,
6638 speed: 0,
6639 turnSpeed: 0,
6640 scale: 70,
6641 spriteMlt: 1
6642 }, {
6643 id: 8,
6644 name: "Moofie",
6645 src: "wolf_2",
6646 hostile: !0,
6647 fixedSpawn: !0,
6648 dontRun: !0,
6649 hitScare: 4,
6650 spawnDelay: 3e4,
6651 noTrap: !0,
6652 nameScale: 35,
6653 dmg: 10,
6654 colDmg: 100,
6655 killScore: 3e3,
6656 health: 7e3,
6657 weightM: .45,
6658 speed: .0015,
6659 turnSpeed: .002,
6660 scale: 90,
6661 viewRange: 800,
6662 chargePlayer: !0,
6663 drop: ["food", 1e3]
6664 }], this.spawn = function (l, h, u, f) {
6665 for (var d, p = 0; p < e.length; ++p)
6666 if (!e[p].active) {
6667 d = e[p];
6668 break
6669 } return d || (d = new t(e.length, r, n, i, a, s, o, c), e.push(d)), d.init(l, h, u, f, this.aiTypes[f]), d
6670 }
6671 }
6672 }, function (e, t) {
6673 var n = 2 * Math.PI;
6674 e.exports = function (e, t, i, r, s, a, o, c) {
6675 this.sid = e, this.isAI = !0, this.nameIndex = s.randInt(0, a.cowNames.length - 1), this.init = function (e, t, n, i, r) {
6676 this.x = e, this.y = t, this.startX = r.fixedSpawn ? e : null, this.startY = r.fixedSpawn ? t : null, this.xVel = 0, this.yVel = 0, this.zIndex = 0, this.dir = n, this.dirPlus = 0, this.index = i, this.src = r.src, r.name && (this.name = r.name), this.weightM = r.weightM, this.speed = r.speed, this.killScore = r.killScore, this.turnSpeed = r.turnSpeed, this.scale = r.scale, this.maxHealth = r.health, this.leapForce = r.leapForce, this.health = this.maxHealth, this.chargePlayer = r.chargePlayer, this.viewRange = r.viewRange, this.drop = r.drop, this.dmg = r.dmg, this.hostile = r.hostile, this.dontRun = r.dontRun, this.hitRange = r.hitRange, this.hitDelay = r.hitDelay, this.hitScare = r.hitScare, this.spriteMlt = r.spriteMlt, this.nameScale = r.nameScale, this.colDmg = r.colDmg, this.noTrap = r.noTrap, this.spawnDelay = r.spawnDelay, this.hitWait = 0, this.waitCount = 1e3, this.moveCount = 0, this.targetDir = 0, this.active = !0, this.alive = !0, this.runFrom = null, this.chargeTarget = null, this.dmgOverTime = {}
6677 };
6678 var l = 0;
6679 this.update = function (e) {
6680 if (this.active) {
6681 if (this.spawnCounter) return this.spawnCounter -= e, void(this.spawnCounter <= 0 && (this.spawnCounter = 0, this.x = this.startX || s.randInt(0, a.mapScale), this.y = this.startY || s.randInt(0, a.mapScale)));
6682 (l -= e) <= 0 && (this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer), this.dmgOverTime.time -= 1, this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)), l = 1e3);
6683 var r = !1,
6684 o = 1;
6685 if (!this.zIndex && !this.lockMove && this.y >= a.mapScale / 2 - a.riverWidth / 2 && this.y <= a.mapScale / 2 + a.riverWidth / 2 && (o = .33, this.xVel += a.waterCurrent * e), this.lockMove) this.xVel = 0, this.yVel = 0;
6686 else if (this.waitCount > 0) {
6687 if (this.waitCount -= e, this.waitCount <= 0)
6688 if (this.chargePlayer) {
6689 for (var h, u, f, d = 0; d < i.length; ++d) !i[d].alive || i[d].skin && i[d].skin.bullRepel || (f = s.getDistance(this.x, this.y, i[d].x, i[d].y)) <= this.viewRange && (!h || f < u) && (u = f, h = i[d]);
6690 h ? (this.chargeTarget = h, this.moveCount = s.randInt(8e3, 12e3)) : (this.moveCount = s.randInt(1e3, 2e3), this.targetDir = s.randFloat(-Math.PI, Math.PI))
6691 } else this.moveCount = s.randInt(4e3, 1e4), this.targetDir = s.randFloat(-Math.PI, Math.PI)
6692 } else if (this.moveCount > 0) {
6693 var p = this.speed * o;
6694 if (this.runFrom && this.runFrom.active && (!this.runFrom.isPlayer || this.runFrom.alive) ? (this.targetDir = s.getDirection(this.x, this.y, this.runFrom.x, this.runFrom.y), p *= 1.42) : this.chargeTarget && this.chargeTarget.alive && (this.targetDir = s.getDirection(this.chargeTarget.x, this.chargeTarget.y, this.x, this.y), p *= 1.75, r = !0), this.hitWait && (p *= .3), this.dir != this.targetDir) {
6695 this.dir %= n;
6696 var g = (this.dir - this.targetDir + n) % n,
6697 m = Math.min(Math.abs(g - n), g, this.turnSpeed * e),
6698 y = g - Math.PI >= 0 ? 1 : -1;
6699 this.dir += y * m + n
6700 }
6701 this.dir %= n, this.xVel += p * e * Math.cos(this.dir), this.yVel += p * e * Math.sin(this.dir), this.moveCount -= e, this.moveCount <= 0 && (this.runFrom = null, this.chargeTarget = null, this.waitCount = this.hostile ? 1500 : s.randInt(1500, 6e3))
6702 }
6703 this.zIndex = 0, this.lockMove = !1;
6704 var k = s.getDistance(0, 0, this.xVel * e, this.yVel * e),
6705 v = Math.min(4, Math.max(1, Math.round(k / 40))),
6706 w = 1 / v;
6707 for (d = 0; d < v; ++d) {
6708 this.xVel && (this.x += this.xVel * e * w), this.yVel && (this.y += this.yVel * e * w), M = t.getGridArrays(this.x, this.y, this.scale);
6709 for (var b = 0; b < M.length; ++b)
6710 for (var x = 0; x < M[b].length; ++x) M[b][x].active && t.checkCollision(this, M[b][x], w)
6711 }
6712 var S, T, I, E = !1;
6713 if (this.hitWait > 0 && (this.hitWait -= e, this.hitWait <= 0)) {
6714 E = !0, this.hitWait = 0, this.leapForce && !s.randInt(0, 2) && (this.xVel += this.leapForce * Math.cos(this.dir), this.yVel += this.leapForce * Math.sin(this.dir));
6715 for (var M = t.getGridArrays(this.x, this.y, this.hitRange), A = 0; A < M.length; ++A)
6716 for (b = 0; b < M[A].length; ++b)(S = M[A][b]).health && (T = s.getDistance(this.x, this.y, S.x, S.y)) < S.scale + this.hitRange && (S.changeHealth(5 * -this.dmg) && t.disableObj(S), t.hitObj(S, s.getDirection(this.x, this.y, S.x, S.y)));
6717 for (b = 0; b < i.length; ++b) i[b].canSee(this) && c.send(i[b].id, "aa", this.sid)
6718 }
6719 if (r || E)
6720 for (d = 0; d < i.length; ++d)(S = i[d]) && S.alive && (T = s.getDistance(this.x, this.y, S.x, S.y), this.hitRange ? !this.hitWait && T <= this.hitRange + S.scale && (E ? (I = s.getDirection(S.x, S.y, this.x, this.y), S.changeHealth(-this.dmg), S.xVel += .6 * Math.cos(I), S.yVel += .6 * Math.sin(I), this.runFrom = null, this.chargeTarget = null, this.waitCount = 3e3, this.hitWait = s.randInt(0, 2) ? 0 : 600) : this.hitWait = this.hitDelay) : T <= this.scale + S.scale && (I = s.getDirection(S.x, S.y, this.x, this.y), S.changeHealth(-this.dmg), S.xVel += .55 * Math.cos(I), S.yVel += .55 * Math.sin(I)));
6721 this.xVel && (this.xVel *= Math.pow(a.playerDecel, e)), this.yVel && (this.yVel *= Math.pow(a.playerDecel, e));
6722 var P = this.scale;
6723 this.x - P < 0 ? (this.x = P, this.xVel = 0) : this.x + P > a.mapScale && (this.x = a.mapScale - P, this.xVel = 0), this.y - P < 0 ? (this.y = P, this.yVel = 0) : this.y + P > a.mapScale && (this.y = a.mapScale - P, this.yVel = 0)
6724 }
6725 }, this.canSee = function (e) {
6726 if (!e) return !1;
6727 if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer) return !1;
6728 var t = Math.abs(e.x - this.x) - e.scale,
6729 n = Math.abs(e.y - this.y) - e.scale;
6730 return t <= a.maxScreenWidth / 2 * 1.3 && n <= a.maxScreenHeight / 2 * 1.3
6731 };
6732 var h = 0,
6733 u = 0;
6734 this.animate = function (e) {
6735 this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime = 0, this.dirPlus = 0, h = 0, u = 0) : 0 == u ? (h += e / (this.animSpeed * a.hitReturnRatio), this.dirPlus = s.lerp(0, this.targetAngle, Math.min(1, h)), h >= 1 && (h = 1, u = 1)) : (h -= e / (this.animSpeed * (1 - a.hitReturnRatio)), this.dirPlus = s.lerp(0, this.targetAngle, Math.max(0, h))))
6736 }, this.startAnim = function () {
6737 this.animTime = this.animSpeed = 600, this.targetAngle = .8 * Math.PI, h = 0, u = 0
6738 }, this.changeHealth = function (e, t, n) {
6739 if (this.active && (this.health += e, n && (this.hitScare && !s.randInt(0, this.hitScare) ? (this.runFrom = n, this.waitCount = 0, this.moveCount = 2e3) : this.hostile && this.chargePlayer && n.isPlayer ? (this.chargeTarget = n, this.waitCount = 0, this.moveCount = 8e3) : this.dontRun || (this.runFrom = n, this.waitCount = 0, this.moveCount = 2e3)), e < 0 && this.hitRange && s.randInt(0, 1) && (this.hitWait = 500), t && t.canSee(this) && e < 0 && c.send(t.id, "t", Math.round(this.x), Math.round(this.y), Math.round(-e), 1), this.health <= 0 && (this.spawnDelay ? (this.spawnCounter = this.spawnDelay, this.x = -1e6, this.y = -1e6) : (this.x = this.startX || s.randInt(0, a.mapScale), this.y = this.startY || s.randInt(0, a.mapScale)), this.health = this.maxHealth, this.runFrom = null, t && (o(t, this.killScore), this.drop))))
6740 for (var i = 0; i < this.drop.length;) t.addResource(a.resourceTypes.indexOf(this.drop[i]), this.drop[i + 1]), i += 2
6741 }
6742 }
6743 }]);
6744
6745let mouseX;
6746let mouseY;
6747
6748let width;
6749let height;
6750
6751setInterval(() => {
6752 if(autoaim == true) {
6753 doNewSend(["2", [nearestEnemyAngle]]);
6754 }
6755}, 0);
6756
6757setInterval(() => {
6758 if(hatToggle == 1) {
6759 if(oldHat != normalHat) {
6760 hat(normalHat);
6761 console.log("Tried. - Hat")
6762 }
6763 if(oldAcc != normalAcc) {
6764 acc(normalAcc);
6765 console.log("Tried. - Acc")
6766 }
6767 oldHat = normalHat;
6768 oldAcc = normalAcc
6769 }
6770}, 25);
6771
6772function normal() {
6773 hat(normalHat);
6774 acc(normalAcc);
6775}
6776
6777function aim(x, y){
6778 var cvs = document.getElementById("gameCanvas");
6779 cvs.dispatchEvent(new MouseEvent("mousemove", {
6780 clientX: x,
6781 clientY: y
6782
6783 }));
6784}
6785
6786let coreURL = new URL(window.location.href);
6787window.sessionStorage.force = coreURL.searchParams.get("fc");
6788
6789document.getElementById("moomooio_728x90_home").style.display = "none";
6790$("#moomooio_728x90_home").parent().css({display: "none"});
6791
6792var autoinsta = true;
6793var nearestEnemy;
6794var nearestEnemyAngle;
6795var isEnemyNear;
6796var isEnemyNear1;
6797var instaSpeed = 230;
6798var primary;
6799var secondary;
6800var foodType;
6801var wallType;
6802var spikeType;
6803var millType;
6804var mineType;
6805var boostType;
6806var turretType;
6807var spawnpadType;
6808var autoaim = false;
6809var tick = 1;
6810var oldHat;
6811var oldAcc;
6812var enemiesNear;
6813var normalHat;
6814var normalAcc;
6815var ws;
6816var msgpack5 = msgpack;
6817var boostDir;
6818let myPlayer = {
6819 id: null,
6820 x: null,
6821 y: null,
6822 dir: null,
6823 object: null,
6824 weapon: null,
6825 clan: null,
6826 isLeader: null,
6827 hat: null,
6828 accessory: null,
6829 isSkull: null
6830};
6831
6832let healSpeed = 125;
6833let healToggle = 1;
6834let hatToggle = 1;
6835
6836document.msgpack = msgpack;
6837function n(){
6838 this.buffer = new Uint8Array([0]);
6839 this.buffer.__proto__ = new Uint8Array;
6840 this.type = 0;
6841}
6842
6843WebSocket.prototype.oldSend = WebSocket.prototype.send;
6844WebSocket.prototype.send = function(m){
6845 if (!ws){
6846 document.ws = this;
6847
6848 ws = this;
6849 socketFound(this);
6850 }
6851 this.oldSend(m);
6852};
6853
6854
6855function socketFound(socket){
6856 socket.addEventListener('message', function(message){
6857 handleMessage(message);
6858 });
6859}
6860
6861function handleMessage(m){
6862 let temp = msgpack5.decode(new Uint8Array(m.data));
6863 let data;
6864 if(temp.length > 1) {
6865 data = [temp[0], ...temp[1]];
6866 if (data[1] instanceof Array){
6867 data = data;
6868 }
6869 } else {
6870 data = temp;
6871 }
6872 let item = data[0];
6873 if(!data) {return};
6874
6875 if(item === "io-init") {
6876 let cvs = document.getElementById("gameCanvas");
6877 width = cvs.clientWidth;
6878 height = cvs.clientHeight;
6879 $(window).resize(function() {
6880 width = cvs.clientWidth;
6881 height = cvs.clientHeight;
6882 });
6883 cvs.addEventListener("mousemove", e => {
6884 mouseX = e.clientX;
6885 mouseY = e.clientY;
6886 });
6887 }
6888
6889 if (item == "1" && myPlayer.id == null){
6890 myPlayer.id = data[1];
6891 }
6892
6893 if (item == "33") {
6894 enemiesNear = [];
6895 for(let i = 0; i < data[1].length / 13; i++) {
6896 let playerInfo = data[1].slice(13*i, 13*i+13);
6897 if(playerInfo[0] == myPlayer.id) {
6898 myPlayer.x = playerInfo[1];
6899 myPlayer.y = playerInfo[2];
6900 myPlayer.dir = playerInfo[3];
6901 myPlayer.object = playerInfo[4];
6902 myPlayer.weapon = playerInfo[5];
6903 myPlayer.clan = playerInfo[7];
6904 myPlayer.isLeader = playerInfo[8];
6905 myPlayer.hat = playerInfo[9];
6906 myPlayer.accessory = playerInfo[10];
6907 myPlayer.isSkull = playerInfo[11];
6908 } else if(playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
6909 enemiesNear.push(playerInfo);
6910 }
6911 }
6912 }
6913
6914 isEnemyNear = false;
6915 if(enemiesNear) {
6916 nearestEnemy = enemiesNear.sort((a,b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
6917 }
6918
6919 if(nearestEnemy) {
6920 nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-myPlayer.x);
6921 if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 285) {
6922 isEnemyNear = true;
6923 }
6924 }
6925
6926 isEnemyNear = false;
6927 if(enemiesNear) {
6928 nearestEnemy = enemiesNear.sort((a,b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
6929 }
6930 if(nearestEnemy) {
6931 nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-myPlayer.x);
6932 if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 250) {
6933 isEnemyNear = true;
6934 }
6935 }
6936
6937 if(isEnemyNear == false && autoaim == false) {
6938 normalAcc = 11;
6939 if (myPlayer.y < 2400){
6940 normalHat = 15;
6941 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
6942 normalHat = 31;
6943 } else {
6944 normalHat = 12;
6945 }
6946 }
6947
6948 if (!nearestEnemy) {
6949 nearestEnemyAngle = myPlayer.dir;
6950 }
6951
6952 if(item == "h" && data[1] == myPlayer.id) {
6953 if(data[2] < 80 && data[2] > 0 && healToggle == 1) {
6954 setTimeout( () => {
6955 place(foodType);
6956 place(foodType);
6957 }, 130);
6958
6959 }
6960 }
6961
6962 if(item == "h" && data[1] == myPlayer.id) {
6963 if(data[2] < 60 && data[2] > 0 && healToggle == 1) {
6964 setTimeout( () => {
6965 place(foodType);
6966 place(foodType);
6967 }, 130);
6968
6969 }
6970 }
6971 update();
6972}
6973
6974
6975function doNewSend(sender){
6976 ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
6977}
6978
6979function acc(id) {
6980 doNewSend(["13c", [0, 0, 1]]);
6981 doNewSend(["13c", [0, id, 1]]);
6982}
6983
6984function hat(id) {
6985 doNewSend(["13c", [0, id, 0]]);
6986}
6987
6988
6989function place(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
6990 doNewSend(["5", [id, null]]);
6991 doNewSend(["c", [1, angle]]);
6992 doNewSend(["c", [0, angle]]);
6993 doNewSend(["5", [myPlayer.weapon, true]]);
6994}
6995
6996var repeater = function(key, action, interval) {
6997 let _isKeyDown = false;
6998 let _intervalId = undefined;
6999
7000 return {
7001 start(keycode) {
7002 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
7003 _isKeyDown = true;
7004 if(_intervalId === undefined) {
7005 _intervalId = setInterval(() => {
7006 action();
7007 if(!_isKeyDown){
7008 clearInterval(_intervalId);
7009 _intervalId = undefined;
7010 console.log("claered");
7011 }
7012 }, interval);
7013 }
7014 }
7015 },
7016
7017 stop(keycode) {
7018 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
7019 _isKeyDown = false;
7020 }
7021 }
7022 };
7023
7024
7025}
7026
7027let crashing = false;
7028let crashIntervals = [];
7029const healer = repeater(81, () => {
7030 place(foodType)
7031 place(foodType)
7032}, 0);
7033const boostPlacer = repeater(70, () => {
7034 place(boostType)
7035 place(boostType)
7036}, 0);
7037const spikePlacer = repeater(86, () => {
7038 place(spikeType)
7039 place(spikeType)
7040}, 0);
7041const millPlacer = repeater(78, () => {
7042 place(millType)
7043 place(millType)
7044}, 0);
7045const turretPlacer = repeater(72, () => {
7046 place(turretType)
7047 place(turretType)
7048}, 0);
7049
7050document.addEventListener('keydown', (e)=>{
7051 spikePlacer.start(e.keyCode);
7052 healer.start(e.keyCode);
7053 boostPlacer.start(e.keyCode);
7054 millPlacer.start(e.keyCode);
7055 turretPlacer.start(e.keyCode);
7056
7057 if (e.keyCode == 73 && document.activeElement.id.toLowerCase() !== 'chatbox') {
7058 for (let i=0;i<4;i++){
7059 let angle = myPlayer.dir + toRad(i * 90);
7060 place(boostType, angle)
7061 }
7062 }
7063
7064 if (e.keyCode == 72 && document.activeElement.id.toLowerCase() !== 'chatbox') {
7065 place(turretType, myPlayer.dir + toRad(45));
7066 place(turretType, myPlayer.dir - toRad(45));
7067 }
7068
7069 if (e.keyCode == 16 && document.activeElement.id.toLowerCase() !== 'chatbox') {
7070 if (myPlayer.y < 2400){
7071 hat(15);
7072 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
7073 hat(31);
7074 } else {
7075 hat(12);
7076 }
7077 acc(11);
7078 }
7079
7080 if(e.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') {
7081 hat(20);
7082 autoaim = true;
7083 doNewSend(["5", [primary, true]]);
7084 doNewSend(["13c", [0, 7, 0]]);
7085 doNewSend(["13c", [0, 0, 1]]);
7086 doNewSend(["13c", [0, 18, 1]]);
7087 doNewSend(["c", [1]]);
7088 setTimeout( () => {
7089 doNewSend(["13c", [0, 53, 0]]);
7090 doNewSend(["5", [secondary, true]]);
7091 acc(13);
7092 }, 110);
7093 setTimeout( () => {
7094 doNewSend(["c", [0, null]]);
7095 doNewSend(["13c", [0, 0, 0]]);
7096 autoaim = false;
7097 }, 215);
7098 setTimeout(() => {
7099 doNewSend(["5", [secondary, true]]);
7100 doNewSend(["13c", [0, 20, 0]]);
7101 setTimeout(() => {
7102 doNewSend(["5", [primary, true]]);
7103 if (isEnemyNear == false) {
7104 if (myPlayer.y < 2400) {
7105 hat(15);
7106 } else if (myPlayer.y > 6850 && myPlayer.y < 7550) {
7107 hat(31);
7108 } else {
7109 hat(12);
7110 }
7111 acc(11);
7112 }
7113 }, 1680);
7114 }, 325);
7115 }
7116
7117 if(e.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox') {
7118 autoaim = true;
7119 doNewSend(["5", [primary, true]]);
7120 doNewSend(["13c", [0, 7, 0]]);
7121 doNewSend(["13c", [0, 0, 1]]);
7122 doNewSend(["13c", [0, 18, 1]]);
7123 place(spikeType);
7124 doNewSend(["c", [1]]);
7125 setTimeout( () => {
7126 doNewSend(["13c", [0, 53, 0]]);
7127 acc(21);
7128 }, 100);
7129 setTimeout( () => {
7130 doNewSend(["c", [0, null]]);
7131 if (isEnemyNear == false) {
7132 if (myPlayer.y < 2400) {
7133 hat(15);
7134 } else if (myPlayer.y > 6850 && myPlayer.y < 7550) {
7135 hat(31);
7136 } else {
7137 hat(12);
7138 }
7139 acc(11);
7140 }
7141 autoaim = false;
7142 }, 200);
7143 }
7144
7145 if(e.keyCode == 106 && document.activeElement.id.toLowerCase() !== 'chatbox') {
7146 healToggle = (healToggle + 1) % 2;
7147 if(healToggle == 0) {
7148 if(hatToggle == 0) {
7149 document.title = "Heal: OFF | Hat: OFF"
7150 } else {
7151 document.title = "Heal: OFF | Hat: ON"
7152 }
7153 } else {
7154 if(hatToggle == 0) {
7155 document.title = "Heal: ON | Hat: OFF"
7156 } else {
7157 document.title = "Heal: ON | Hat: ON"
7158 }
7159 }
7160 }
7161 if(e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') {
7162 autoaim = true;
7163 doNewSend(["5", [secondary, true]]);
7164 doNewSend(["c", [1]]);
7165 setTimeout( () => {
7166 doNewSend(["13c", [0, 53, 0]]);
7167 doNewSend(["6", [12]]);
7168 doNewSend(["13c", [0, 19, 1]]);
7169 }, 100);
7170 setTimeout( () => {
7171 doNewSend(["13c", [0, 32, 0]]);
7172 doNewSend(["6", [15]]);
7173 doNewSend(["13c", [0, 13, 1]]);
7174 }, 200);
7175 setTimeout( () => {
7176 doNewSend(["c", [0]]);
7177 if (isEnemyNear == false) {
7178 if (myPlayer.y < 2400) {
7179 hat(15);
7180 } else if (myPlayer.y > 6850 && myPlayer.y < 7550) {
7181 hat(31);
7182 } else {
7183 hat(12);
7184 }
7185 acc(11);
7186 }
7187 doNewSend(["5", [primary, true]]);
7188 autoaim = false;
7189 }, 300);
7190 }
7191
7192 if(e.keyCode == 111 && document.activeElement.id.toLowerCase() !== 'chatbox') {
7193 hatToggle = (hatToggle + 1) % 2;
7194 if(healToggle == 0) {
7195 if(hatToggle == 0) {
7196 document.title = "Heal: OFF | Hat: OFF"
7197 } else {
7198 document.title = "Heal: OFF | Hat: ON"
7199 }
7200 } else {
7201 if(hatToggle == 0) {
7202 document.title = "Heal: ON | Hat: OFF"
7203 } else {
7204 document.title = "Heal: ON | Hat: ON"
7205 }
7206 }
7207 }
7208})
7209
7210document.addEventListener('keyup', (e)=>{
7211 spikePlacer.stop(e.keyCode);
7212 boostPlacer.stop(e.keyCode);
7213 millPlacer.stop(e.keyCode);
7214 turretPlacer.stop(e.keyCode);
7215 healer.stop(e.keyCode);
7216})
7217
7218
7219function isElementVisible(e) {
7220 return (e.offsetParent !== null);
7221}
7222
7223
7224function toRad(angle) {
7225 return angle * 0.01745329251;
7226}
7227
7228function dist(a, b){
7229 return Math.sqrt( Math.pow((b.y-a[2]), 2) + Math.pow((b.x-a[1]), 2) );
7230}
7231
7232document.title = "MooMoo.io"
7233
7234function update() {
7235 for (let i=0;i<9;i++){
7236 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
7237 primary = i;
7238 }
7239 }
7240
7241 for (let i=9;i<16;i++){
7242 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
7243 secondary = i;
7244 }
7245 }
7246
7247 for (let i=16;i<19;i++){
7248 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
7249 foodType = i - 16;
7250 }
7251 }
7252
7253 for (let i=19;i<22;i++){
7254 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
7255 wallType = i - 16;
7256 }
7257 }
7258
7259 for (let i=22;i<26;i++){
7260 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
7261 spikeType = i - 16;
7262 }
7263 }
7264
7265 for (let i=26;i<29;i++){
7266 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
7267 millType = i - 16;
7268 }
7269 }
7270
7271 for (let i=29;i<31;i++){
7272 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
7273 mineType = i - 16;
7274 }
7275 }
7276
7277 for (let i=31;i<33;i++){
7278 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
7279 boostType = i - 16;
7280 }
7281 }
7282
7283 for (let i=33;i<39;i++){
7284 if (isElementVisible(document.getElementById("actionBarItem" + i.toString())) && i != 36){
7285 turretType = i - 16;
7286 }
7287 }
7288
7289 spawnpadType = 36;
7290}
7291
7292var ID_WinterCap = 15;
7293var ID_FlipperHat = 31;
7294var ID_MarksmanCap = 1;
7295var ID_BushGear = 10;
7296var ID_SoldierHelmet = 6;
7297var ID_AntiVenomGear = 23;
7298var ID_MusketeerHat = 32;
7299var ID_MedicGear = 13;
7300var ID_BullHelmet = 7;
7301var ID_EmpHelmet = 22;
7302var ID_BoosterHat = 12;
7303var ID_BarbarianArmor = 26;
7304var ID_BullMask = 46;
7305var ID_WindmillHat = 14;
7306var ID_SpikeGear = 11;
7307var ID_BushidoArmor = 16;
7308var ID_SamuraiArmor = 20;
7309var ID_ScavengerGear = 27;
7310var ID_TankGear = 40;
7311var ID_TurretGear = 53;
7312
7313// Keys
7314var TankGearKey = 67;
7315var BullHelmetKey = 74;
7316var SoldierHelmetKey = 71;
7317
7318document.addEventListener('keydown', function(e) {
7319 if (e.keyCode == TankGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
7320 storeEquip(ID_TankGear);
7321 acc(19)
7322 } else if (e.keyCode == SoldierHelmetKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
7323 storeEquip(ID_SoldierHelmet);
7324 acc(21)
7325 } else if (e.keyCode == BullHelmetKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
7326 storeEquip(ID_BullHelmet);
7327 acc(18)
7328 }
7329})
7330
7331$("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});// ==UserScript==
7332// @name New Userscript
7333// @namespace http://tampermonkey.net/
7334// @version 0.1
7335// @description try to take over the world!
7336// @author You
7337// @match http://*/*
7338// @grant none
7339// ==/UserScript==
7340
7341(function() {
7342 'use strict';
7343
7344 // Your code here...
7345})();