Advertisement
Guest User

Diep.io tri flank script 2020 updated!!

a guest
Mar 15th, 2020
21,139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.72 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. // ==UserScript==
  8. // @name TriFlank Script
  9. // @description press t
  10. // @version 0.1
  11. // @author pd/kirimochi
  12. // @namespace *://diep.io/
  13. // @match *://diep.io/
  14. // @grant none
  15. // ==/UserScript==
  16. var _createClass = function() {
  17. function n(t, e) {
  18. for (var r = 0; r < e.length; r++) {
  19. var n = e[r];
  20. n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
  21. }
  22. }
  23. return function(t, e, r) {
  24. return e && n(t.prototype, e), r && n(t, r), t
  25. }
  26. }(),
  27. _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  28. return typeof t
  29. } : function(t) {
  30. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  31. };
  32.  
  33. function _classCallCheck(t, e) {
  34. if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
  35. }! function o(s, u, a) {
  36. function f(e, t) {
  37. if (!u[e]) {
  38. if (!s[e]) {
  39. var r = "function" == typeof require && require;
  40. if (!t && r) return r(e, !0);
  41. if (h) return h(e, !0);
  42. var n = new Error("Cannot find module '" + e + "'");
  43. throw n.code = "MODULE_NOT_FOUND", n
  44. }
  45. var i = u[e] = {
  46. exports: {}
  47. };
  48. s[e][0].call(i.exports, function(t) {
  49. return f(s[e][1][t] || t)
  50. }, i, i.exports, o, s, u, a)
  51. }
  52. return u[e].exports
  53. }
  54. for (var h = "function" == typeof require && require, t = 0; t < a.length; t++) f(a[t]);
  55. return f
  56. }({
  57. 1: [function(t, e, r) {
  58. "use strict";
  59. r.byteLength = function(t) {
  60. var e = c(t),
  61. r = e[0],
  62. n = e[1];
  63. return 3 * (r + n) / 4 - n
  64. }, r.toByteArray = function(t) {
  65. var e, r, n = c(t),
  66. i = n[0],
  67. o = n[1],
  68. s = new h(function(t, e, r) {
  69. return 3 * (e + r) / 4 - r
  70. }(0, i, o)),
  71. u = 0,
  72. a = 0 < o ? i - 4 : i;
  73. for (r = 0; r < a; r += 4) e = f[t.charCodeAt(r)] << 18 | f[t.charCodeAt(r + 1)] << 12 | f[t.charCodeAt(r + 2)] << 6 | f[t.charCodeAt(r + 3)], s[u++] = e >> 16 & 255, s[u++] = e >> 8 & 255, s[u++] = 255 & e;
  74. 2 === o && (e = f[t.charCodeAt(r)] << 2 | f[t.charCodeAt(r + 1)] >> 4, s[u++] = 255 & e);
  75. 1 === o && (e = f[t.charCodeAt(r)] << 10 | f[t.charCodeAt(r + 1)] << 4 | f[t.charCodeAt(r + 2)] >> 2, s[u++] = e >> 8 & 255, s[u++] = 255 & e);
  76. return s
  77. }, r.fromByteArray = function(t) {
  78. for (var e, r = t.length, n = r % 3, i = [], o = 0, s = r - n; o < s; o += 16383) i.push(a(t, o, s < o + 16383 ? s : o + 16383));
  79. 1 == n ? (e = t[r - 1], i.push(u[e >> 2] + u[e << 4 & 63] + "==")) : 2 == n && (e = (t[r - 2] << 8) + t[r - 1], i.push(u[e >> 10] + u[e >> 4 & 63] + u[e << 2 & 63] + "="));
  80. return i.join("")
  81. };
  82. for (var u = [], f = [], h = "undefined" != typeof Uint8Array ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0, o = n.length; i < o; ++i) u[i] = n[i], f[n.charCodeAt(i)] = i;
  83.  
  84. function c(t) {
  85. var e = t.length;
  86. if (0 < e % 4) throw new Error("Invalid string. Length must be a multiple of 4");
  87. var r = t.indexOf("=");
  88. return -1 === r && (r = e), [r, r === e ? 0 : 4 - r % 4]
  89. }
  90.  
  91. function a(t, e, r) {
  92. for (var n, i, o = [], s = e; s < r; s += 3) n = (t[s] << 16 & 16711680) + (t[s + 1] << 8 & 65280) + (255 & t[s + 2]), o.push(u[(i = n) >> 18 & 63] + u[i >> 12 & 63] + u[i >> 6 & 63] + u[63 & i]);
  93. return o.join("")
  94. }
  95. f["-".charCodeAt(0)] = 62, f["_".charCodeAt(0)] = 63
  96. }, {}],
  97. 2: [function(L, t, R) {
  98. (function(c) {
  99. "use strict";
  100. var n = L("base64-js"),
  101. o = L("ieee754"),
  102. t = "function" == typeof Symbol ? Symbol.for("nodejs.util.inspect.custom") : null;
  103. R.Buffer = c, R.SlowBuffer = function(t) {
  104. +t != t && (t = 0);
  105. return c.alloc(+t)
  106. }, R.INSPECT_MAX_BYTES = 50;
  107. var r = 2147483647;
  108.  
  109. function s(t) {
  110. if (r < t) throw new RangeError('The value "' + t + '" is invalid for option "size"');
  111. var e = new Uint8Array(t);
  112. return Object.setPrototypeOf(e, c.prototype), e
  113. }
  114.  
  115. function c(t, e, r) {
  116. if ("number" != typeof t) return i(t, e, r);
  117. if ("string" == typeof e) throw new TypeError('The "string" argument must be of type string. Received type number');
  118. return a(t)
  119. }
  120.  
  121. function i(t, e, r) {
  122. if ("string" == typeof t) return function(t, e) {
  123. "string" == typeof e && "" !== e || (e = "utf8");
  124. if (!c.isEncoding(e)) throw new TypeError("Unknown encoding: " + e);
  125. var r = 0 | l(t, e),
  126. n = s(r),
  127. i = n.write(t, e);
  128. i !== r && (n = n.slice(0, i));
  129. return n
  130. }(t, e);
  131. if (ArrayBuffer.isView(t)) return f(t);
  132. if (null == t) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + (void 0 === t ? "undefined" : _typeof(t)));
  133. if (x(t, ArrayBuffer) || t && x(t.buffer, ArrayBuffer)) return function(t, e, r) {
  134. if (e < 0 || t.byteLength < e) throw new RangeError('"offset" is outside of buffer bounds');
  135. if (t.byteLength < e + (r || 0)) throw new RangeError('"length" is outside of buffer bounds');
  136. var n;
  137. n = void 0 === e && void 0 === r ? new Uint8Array(t) : void 0 === r ? new Uint8Array(t, e) : new Uint8Array(t, e, r);
  138. return Object.setPrototypeOf(n, c.prototype), n
  139. }(t, e, r);
  140. if ("number" == typeof t) throw new TypeError('The "value" argument must not be of type number. Received type number');
  141. var n = t.valueOf && t.valueOf();
  142. if (null != n && n !== t) return c.from(n, e, r);
  143. var i = function(t) {
  144. if (c.isBuffer(t)) {
  145. var e = 0 | h(t.length),
  146. r = s(e);
  147. return 0 === r.length || t.copy(r, 0, 0, e), r
  148. }
  149. if (void 0 !== t.length) return "number" != typeof t.length || K(t.length) ? s(0) : f(t);
  150. if ("Buffer" === t.type && Array.isArray(t.data)) return f(t.data)
  151. }(t);
  152. if (i) return i;
  153. if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof t[Symbol.toPrimitive]) return c.from(t[Symbol.toPrimitive]("string"), e, r);
  154. throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + (void 0 === t ? "undefined" : _typeof(t)))
  155. }
  156.  
  157. function u(t) {
  158. if ("number" != typeof t) throw new TypeError('"size" argument must be of type number');
  159. if (t < 0) throw new RangeError('The value "' + t + '" is invalid for option "size"')
  160. }
  161.  
  162. function a(t) {
  163. return u(t), s(t < 0 ? 0 : 0 | h(t))
  164. }
  165.  
  166. function f(t) {
  167. for (var e = t.length < 0 ? 0 : 0 | h(t.length), r = s(e), n = 0; n < e; n += 1) r[n] = 255 & t[n];
  168. return r
  169. }
  170.  
  171. function h(t) {
  172. if (r <= t) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + r.toString(16) + " bytes");
  173. return 0 | t
  174. }
  175.  
  176. function l(t, e) {
  177. if (c.isBuffer(t)) return t.length;
  178. if (ArrayBuffer.isView(t) || x(t, ArrayBuffer)) return t.byteLength;
  179. if ("string" != typeof t) throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + (void 0 === t ? "undefined" : _typeof(t)));
  180. var r = t.length,
  181. n = 2 < arguments.length && !0 === arguments[2];
  182. if (!n && 0 === r) return 0;
  183. for (var i = !1;;) switch (e) {
  184. case "ascii":
  185. case "latin1":
  186. case "binary":
  187. return r;
  188. case "utf8":
  189. case "utf-8":
  190. return B(t).length;
  191. case "ucs2":
  192. case "ucs-2":
  193. case "utf16le":
  194. case "utf-16le":
  195. return 2 * r;
  196. case "hex":
  197. return r >>> 1;
  198. case "base64":
  199. return C(t).length;
  200. default:
  201. if (i) return n ? -1 : B(t).length;
  202. e = ("" + e).toLowerCase(), i = !0
  203. }
  204. }
  205.  
  206. function p(t, e, r) {
  207. var n = t[e];
  208. t[e] = t[r], t[r] = n
  209. }
  210.  
  211. function y(t, e, r, n, i) {
  212. if (0 === t.length) return -1;
  213. if ("string" == typeof r ? (n = r, r = 0) : 2147483647 < r ? r = 2147483647 : r < -2147483648 && (r = -2147483648), K(r = +r) && (r = i ? 0 : t.length - 1), r < 0 && (r = t.length + r), r >= t.length) {
  214. if (i) return -1;
  215. r = t.length - 1
  216. } else if (r < 0) {
  217. if (!i) return -1;
  218. r = 0
  219. }
  220. if ("string" == typeof e && (e = c.from(e, n)), c.isBuffer(e)) return 0 === e.length ? -1 : d(t, e, r, n, i);
  221. if ("number" == typeof e) return e &= 255, "function" == typeof Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(t, e, r) : Uint8Array.prototype.lastIndexOf.call(t, e, r) : d(t, [e], r, n, i);
  222. throw new TypeError("val must be string, number or Buffer")
  223. }
  224.  
  225. function d(t, e, r, n, i) {
  226. var o, s = 1,
  227. u = t.length,
  228. a = e.length;
  229. if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) {
  230. if (t.length < 2 || e.length < 2) return -1;
  231. u /= s = 2, a /= 2, r /= 2
  232. }
  233.  
  234. function f(t, e) {
  235. return 1 === s ? t[e] : t.readUInt16BE(e * s)
  236. }
  237. if (i) {
  238. var h = -1;
  239. for (o = r; o < u; o++)
  240. if (f(t, o) === f(e, -1 === h ? 0 : o - h)) {
  241. if (-1 === h && (h = o), o - h + 1 === a) return h * s
  242. } else -1 !== h && (o -= o - h), h = -1
  243. } else
  244. for (u < r + a && (r = u - a), o = r; 0 <= o; o--) {
  245. for (var c = !0, l = 0; l < a; l++)
  246. if (f(t, o + l) !== f(e, l)) {
  247. c = !1;
  248. break
  249. } if (c) return o
  250. }
  251. return -1
  252. }
  253.  
  254. function v(t, e, r, n) {
  255. r = Number(r) || 0;
  256. var i = t.length - r;
  257. n ? i < (n = Number(n)) && (n = i) : n = i;
  258. var o = e.length;
  259. o / 2 < n && (n = o / 2);
  260. for (var s = 0; s < n; ++s) {
  261. var u = parseInt(e.substr(2 * s, 2), 16);
  262. if (K(u)) return s;
  263. t[r + s] = u
  264. }
  265. return s
  266. }
  267.  
  268. function g(t, e, r, n) {
  269. return _(function(t) {
  270. for (var e = [], r = 0; r < t.length; ++r) e.push(255 & t.charCodeAt(r));
  271. return e
  272. }(e), t, r, n)
  273. }
  274.  
  275. function w(t, e, r) {
  276. return 0 === e && r === t.length ? n.fromByteArray(t) : n.fromByteArray(t.slice(e, r))
  277. }
  278.  
  279. function b(t, e, r) {
  280. r = Math.min(t.length, r);
  281. for (var n = [], i = e; i < r;) {
  282. var o, s, u, a, f = t[i],
  283. h = null,
  284. c = 239 < f ? 4 : 223 < f ? 3 : 191 < f ? 2 : 1;
  285. if (i + c <= r) switch (c) {
  286. case 1:
  287. f < 128 && (h = f);
  288. break;
  289. case 2:
  290. 128 == (192 & (o = t[i + 1])) && 127 < (a = (31 & f) << 6 | 63 & o) && (h = a);
  291. break;
  292. case 3:
  293. o = t[i + 1], s = t[i + 2], 128 == (192 & o) && 128 == (192 & s) && 2047 < (a = (15 & f) << 12 | (63 & o) << 6 | 63 & s) && (a < 55296 || 57343 < a) && (h = a);
  294. break;
  295. case 4:
  296. o = t[i + 1], s = t[i + 2], u = t[i + 3], 128 == (192 & o) && 128 == (192 & s) && 128 == (192 & u) && 65535 < (a = (15 & f) << 18 | (63 & o) << 12 | (63 & s) << 6 | 63 & u) && a < 1114112 && (h = a)
  297. }
  298. null === h ? (h = 65533, c = 1) : 65535 < h && (h -= 65536, n.push(h >>> 10 & 1023 | 55296), h = 56320 | 1023 & h), n.push(h), i += c
  299. }
  300. return function(t) {
  301. var e = t.length;
  302. if (e <= E) return String.fromCharCode.apply(String, t);
  303. var r = "",
  304. n = 0;
  305. for (; n < e;) r += String.fromCharCode.apply(String, t.slice(n, n += E));
  306. return r
  307. }(n)
  308. }
  309. R.kMaxLength = r, (c.TYPED_ARRAY_SUPPORT = function() {
  310. try {
  311. var t = new Uint8Array(1),
  312. e = {
  313. foo: function() {
  314. return 42
  315. }
  316. };
  317. return Object.setPrototypeOf(e, Uint8Array.prototype), Object.setPrototypeOf(t, e), 42 === t.foo()
  318. } catch (t) {
  319. return !1
  320. }
  321. }()) || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(c.prototype, "parent", {
  322. enumerable: !0,
  323. get: function() {
  324. if (c.isBuffer(this)) return this.buffer
  325. }
  326. }), Object.defineProperty(c.prototype, "offset", {
  327. enumerable: !0,
  328. get: function() {
  329. if (c.isBuffer(this)) return this.byteOffset
  330. }
  331. }), "undefined" != typeof Symbol && null != Symbol.species && c[Symbol.species] === c && Object.defineProperty(c, Symbol.species, {
  332. value: null,
  333. configurable: !0,
  334. enumerable: !1,
  335. writable: !1
  336. }), c.poolSize = 8192, c.from = function(t, e, r) {
  337. return i(t, e, r)
  338. }, Object.setPrototypeOf(c.prototype, Uint8Array.prototype), Object.setPrototypeOf(c, Uint8Array), c.alloc = function(t, e, r) {
  339. return function(t, e, r) {
  340. return u(t), t <= 0 ? s(t) : void 0 !== e ? "string" == typeof r ? s(t).fill(e, r) : s(t).fill(e) : s(t)
  341. }(t, e, r)
  342. }, c.allocUnsafe = function(t) {
  343. return a(t)
  344. }, c.allocUnsafeSlow = function(t) {
  345. return a(t)
  346. }, c.isBuffer = function(t) {
  347. return null != t && !0 === t._isBuffer && t !== c.prototype
  348. }, c.compare = function(t, e) {
  349. if (x(t, Uint8Array) && (t = c.from(t, t.offset, t.byteLength)), x(e, Uint8Array) && (e = c.from(e, e.offset, e.byteLength)), !c.isBuffer(t) || !c.isBuffer(e)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
  350. if (t === e) return 0;
  351. for (var r = t.length, n = e.length, i = 0, o = Math.min(r, n); i < o; ++i)
  352. if (t[i] !== e[i]) {
  353. r = t[i], n = e[i];
  354. break
  355. } return r < n ? -1 : n < r ? 1 : 0
  356. }, c.isEncoding = function(t) {
  357. switch (String(t).toLowerCase()) {
  358. case "hex":
  359. case "utf8":
  360. case "utf-8":
  361. case "ascii":
  362. case "latin1":
  363. case "binary":
  364. case "base64":
  365. case "ucs2":
  366. case "ucs-2":
  367. case "utf16le":
  368. case "utf-16le":
  369. return !0;
  370. default:
  371. return !1
  372. }
  373. }, c.concat = function(t, e) {
  374. if (!Array.isArray(t)) throw new TypeError('"list" argument must be an Array of Buffers');
  375. if (0 === t.length) return c.alloc(0);
  376. var r;
  377. if (void 0 === e)
  378. for (r = e = 0; r < t.length; ++r) e += t[r].length;
  379. var n = c.allocUnsafe(e),
  380. i = 0;
  381. for (r = 0; r < t.length; ++r) {
  382. var o = t[r];
  383. if (x(o, Uint8Array) && (o = c.from(o)), !c.isBuffer(o)) throw new TypeError('"list" argument must be an Array of Buffers');
  384. o.copy(n, i), i += o.length
  385. }
  386. return n
  387. }, c.byteLength = l, c.prototype._isBuffer = !0, c.prototype.swap16 = function() {
  388. var t = this.length;
  389. if (t % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
  390. for (var e = 0; e < t; e += 2) p(this, e, e + 1);
  391. return this
  392. }, c.prototype.swap32 = function() {
  393. var t = this.length;
  394. if (t % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
  395. for (var e = 0; e < t; e += 4) p(this, e, e + 3), p(this, e + 1, e + 2);
  396. return this
  397. }, c.prototype.swap64 = function() {
  398. var t = this.length;
  399. if (t % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
  400. for (var e = 0; e < t; e += 8) p(this, e, e + 7), p(this, e + 1, e + 6), p(this, e + 2, e + 5), p(this, e + 3, e + 4);
  401. return this
  402. }, c.prototype.toLocaleString = c.prototype.toString = function() {
  403. var t = this.length;
  404. return 0 === t ? "" : 0 === arguments.length ? b(this, 0, t) : function(t, e, r) {
  405. var n = !1;
  406. if ((void 0 === e || e < 0) && (e = 0), e > this.length) return "";
  407. if ((void 0 === r || r > this.length) && (r = this.length), r <= 0) return "";
  408. if ((r >>>= 0) <= (e >>>= 0)) return "";
  409. for (t = t || "utf8";;) switch (t) {
  410. case "hex":
  411. return A(this, e, r);
  412. case "utf8":
  413. case "utf-8":
  414. return b(this, e, r);
  415. case "ascii":
  416. return T(this, e, r);
  417. case "latin1":
  418. case "binary":
  419. return k(this, e, r);
  420. case "base64":
  421. return w(this, e, r);
  422. case "ucs2":
  423. case "ucs-2":
  424. case "utf16le":
  425. case "utf-16le":
  426. return m(this, e, r);
  427. default:
  428. if (n) throw new TypeError("Unknown encoding: " + t);
  429. t = (t + "").toLowerCase(), n = !0
  430. }
  431. }.apply(this, arguments)
  432. }, c.prototype.equals = function(t) {
  433. if (!c.isBuffer(t)) throw new TypeError("Argument must be a Buffer");
  434. return this === t || 0 === c.compare(this, t)
  435. }, c.prototype.inspect = function() {
  436. var t = "",
  437. e = R.INSPECT_MAX_BYTES;
  438. return t = this.toString("hex", 0, e).replace(/(.{2})/g, "$1 ").trim(), this.length > e && (t += " ... "), "<Buffer " + t + ">"
  439. }, t && (c.prototype[t] = c.prototype.inspect), c.prototype.compare = function(t, e, r, n, i) {
  440. if (x(t, Uint8Array) && (t = c.from(t, t.offset, t.byteLength)), !c.isBuffer(t)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + (void 0 === t ? "undefined" : _typeof(t)));
  441. if (void 0 === e && (e = 0), void 0 === r && (r = t ? t.length : 0), void 0 === n && (n = 0), void 0 === i && (i = this.length), e < 0 || r > t.length || n < 0 || i > this.length) throw new RangeError("out of range index");
  442. if (i <= n && r <= e) return 0;
  443. if (i <= n) return -1;
  444. if (r <= e) return 1;
  445. if (this === t) return 0;
  446. for (var o = (i >>>= 0) - (n >>>= 0), s = (r >>>= 0) - (e >>>= 0), u = Math.min(o, s), a = this.slice(n, i), f = t.slice(e, r), h = 0; h < u; ++h)
  447. if (a[h] !== f[h]) {
  448. o = a[h], s = f[h];
  449. break
  450. } return o < s ? -1 : s < o ? 1 : 0
  451. }, c.prototype.includes = function(t, e, r) {
  452. return -1 !== this.indexOf(t, e, r)
  453. }, c.prototype.indexOf = function(t, e, r) {
  454. return y(this, t, e, r, !0)
  455. }, c.prototype.lastIndexOf = function(t, e, r) {
  456. return y(this, t, e, r, !1)
  457. }, c.prototype.write = function(t, e, r, n) {
  458. if (void 0 === e) n = "utf8", r = this.length, e = 0;
  459. else if (void 0 === r && "string" == typeof e) n = e, r = this.length, e = 0;
  460. else {
  461. if (!isFinite(e)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
  462. e >>>= 0, isFinite(r) ? (r >>>= 0, void 0 === n && (n = "utf8")) : (n = r, r = void 0)
  463. }
  464. var i = this.length - e;
  465. if ((void 0 === r || i < r) && (r = i), 0 < t.length && (r < 0 || e < 0) || e > this.length) throw new RangeError("Attempt to write outside buffer bounds");
  466. n = n || "utf8";
  467. for (var o, s, u, a, f, h, c, l, p, y = !1;;) switch (n) {
  468. case "hex":
  469. return v(this, t, e, r);
  470. case "utf8":
  471. case "utf-8":
  472. return l = e, p = r, _(B(t, (c = this).length - l), c, l, p);
  473. case "ascii":
  474. return g(this, t, e, r);
  475. case "latin1":
  476. case "binary":
  477. return g(this, t, e, r);
  478. case "base64":
  479. return a = this, f = e, h = r, _(C(t), a, f, h);
  480. case "ucs2":
  481. case "ucs-2":
  482. case "utf16le":
  483. case "utf-16le":
  484. return s = e, u = r, _(function(t, e) {
  485. for (var r, n, i, o = [], s = 0; s < t.length && !((e -= 2) < 0); ++s) r = t.charCodeAt(s), n = r >> 8, i = r % 256, o.push(i), o.push(n);
  486. return o
  487. }(t, (o = this).length - s), o, s, u);
  488. default:
  489. if (y) throw new TypeError("Unknown encoding: " + n);
  490. n = ("" + n).toLowerCase(), y = !0
  491. }
  492. }, c.prototype.toJSON = function() {
  493. return {
  494. type: "Buffer",
  495. data: Array.prototype.slice.call(this._arr || this, 0)
  496. }
  497. };
  498. var E = 4096;
  499.  
  500. function T(t, e, r) {
  501. var n = "";
  502. r = Math.min(t.length, r);
  503. for (var i = e; i < r; ++i) n += String.fromCharCode(127 & t[i]);
  504. return n
  505. }
  506.  
  507. function k(t, e, r) {
  508. var n = "";
  509. r = Math.min(t.length, r);
  510. for (var i = e; i < r; ++i) n += String.fromCharCode(t[i]);
  511. return n
  512. }
  513.  
  514. function A(t, e, r) {
  515. var n = t.length;
  516. (!e || e < 0) && (e = 0), (!r || r < 0 || n < r) && (r = n);
  517. for (var i = "", o = e; o < r; ++o) i += N(t[o]);
  518. return i
  519. }
  520.  
  521. function m(t, e, r) {
  522. for (var n = t.slice(e, r), i = "", o = 0; o < n.length; o += 2) i += String.fromCharCode(n[o] + 256 * n[o + 1]);
  523. return i
  524. }
  525.  
  526. function U(t, e, r) {
  527. if (t % 1 != 0 || t < 0) throw new RangeError("offset is not uint");
  528. if (r < t + e) throw new RangeError("Trying to access beyond buffer length")
  529. }
  530.  
  531. function O(t, e, r, n, i, o) {
  532. if (!c.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance');
  533. if (i < e || e < o) throw new RangeError('"value" argument is out of bounds');
  534. if (r + n > t.length) throw new RangeError("Index out of range")
  535. }
  536.  
  537. function I(t, e, r, n) {
  538. if (r + n > t.length) throw new RangeError("Index out of range");
  539. if (r < 0) throw new RangeError("Index out of range")
  540. }
  541.  
  542. function P(t, e, r, n, i) {
  543. return e = +e, r >>>= 0, i || I(t, 0, r, 4), o.write(t, e, r, n, 23, 4), r + 4
  544. }
  545.  
  546. function S(t, e, r, n, i) {
  547. return e = +e, r >>>= 0, i || I(t, 0, r, 8), o.write(t, e, r, n, 52, 8), r + 8
  548. }
  549. c.prototype.slice = function(t, e) {
  550. var r = this.length;
  551. (t = ~~t) < 0 ? (t += r) < 0 && (t = 0) : r < t && (t = r), (e = void 0 === e ? r : ~~e) < 0 ? (e += r) < 0 && (e = 0) : r < e && (e = r), e < t && (e = t);
  552. var n = this.subarray(t, e);
  553. return Object.setPrototypeOf(n, c.prototype), n
  554. }, c.prototype.readUIntLE = function(t, e, r) {
  555. t >>>= 0, e >>>= 0, r || U(t, e, this.length);
  556. for (var n = this[t], i = 1, o = 0; ++o < e && (i *= 256);) n += this[t + o] * i;
  557. return n
  558. }, c.prototype.readUIntBE = function(t, e, r) {
  559. t >>>= 0, e >>>= 0, r || U(t, e, this.length);
  560. for (var n = this[t + --e], i = 1; 0 < e && (i *= 256);) n += this[t + --e] * i;
  561. return n
  562. }, c.prototype.readUInt8 = function(t, e) {
  563. return t >>>= 0, e || U(t, 1, this.length), this[t]
  564. }, c.prototype.readUInt16LE = function(t, e) {
  565. return t >>>= 0, e || U(t, 2, this.length), this[t] | this[t + 1] << 8
  566. }, c.prototype.readUInt16BE = function(t, e) {
  567. return t >>>= 0, e || U(t, 2, this.length), this[t] << 8 | this[t + 1]
  568. }, c.prototype.readUInt32LE = function(t, e) {
  569. return t >>>= 0, e || U(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + 16777216 * this[t + 3]
  570. }, c.prototype.readUInt32BE = function(t, e) {
  571. return t >>>= 0, e || U(t, 4, this.length), 16777216 * this[t] + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3])
  572. }, c.prototype.readIntLE = function(t, e, r) {
  573. t >>>= 0, e >>>= 0, r || U(t, e, this.length);
  574. for (var n = this[t], i = 1, o = 0; ++o < e && (i *= 256);) n += this[t + o] * i;
  575. return (i *= 128) <= n && (n -= Math.pow(2, 8 * e)), n
  576. }, c.prototype.readIntBE = function(t, e, r) {
  577. t >>>= 0, e >>>= 0, r || U(t, e, this.length);
  578. for (var n = e, i = 1, o = this[t + --n]; 0 < n && (i *= 256);) o += this[t + --n] * i;
  579. return (i *= 128) <= o && (o -= Math.pow(2, 8 * e)), o
  580. }, c.prototype.readInt8 = function(t, e) {
  581. return t >>>= 0, e || U(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t]
  582. }, c.prototype.readInt16LE = function(t, e) {
  583. t >>>= 0, e || U(t, 2, this.length);
  584. var r = this[t] | this[t + 1] << 8;
  585. return 32768 & r ? 4294901760 | r : r
  586. }, c.prototype.readInt16BE = function(t, e) {
  587. t >>>= 0, e || U(t, 2, this.length);
  588. var r = this[t + 1] | this[t] << 8;
  589. return 32768 & r ? 4294901760 | r : r
  590. }, c.prototype.readInt32LE = function(t, e) {
  591. return t >>>= 0, e || U(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24
  592. }, c.prototype.readInt32BE = function(t, e) {
  593. return t >>>= 0, e || U(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]
  594. }, c.prototype.readFloatLE = function(t, e) {
  595. return t >>>= 0, e || U(t, 4, this.length), o.read(this, t, !0, 23, 4)
  596. }, c.prototype.readFloatBE = function(t, e) {
  597. return t >>>= 0, e || U(t, 4, this.length), o.read(this, t, !1, 23, 4)
  598. }, c.prototype.readDoubleLE = function(t, e) {
  599. return t >>>= 0, e || U(t, 8, this.length), o.read(this, t, !0, 52, 8)
  600. }, c.prototype.readDoubleBE = function(t, e) {
  601. return t >>>= 0, e || U(t, 8, this.length), o.read(this, t, !1, 52, 8)
  602. }, c.prototype.writeUIntLE = function(t, e, r, n) {
  603. t = +t, e >>>= 0, r >>>= 0, n || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0);
  604. var i = 1,
  605. o = 0;
  606. for (this[e] = 255 & t; ++o < r && (i *= 256);) this[e + o] = t / i & 255;
  607. return e + r
  608. }, c.prototype.writeUIntBE = function(t, e, r, n) {
  609. t = +t, e >>>= 0, r >>>= 0, n || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0);
  610. var i = r - 1,
  611. o = 1;
  612. for (this[e + i] = 255 & t; 0 <= --i && (o *= 256);) this[e + i] = t / o & 255;
  613. return e + r
  614. }, c.prototype.writeUInt8 = function(t, e, r) {
  615. return t = +t, e >>>= 0, r || O(this, t, e, 1, 255, 0), this[e] = 255 & t, e + 1
  616. }, c.prototype.writeUInt16LE = function(t, e, r) {
  617. return t = +t, e >>>= 0, r || O(this, t, e, 2, 65535, 0), this[e] = 255 & t, this[e + 1] = t >>> 8, e + 2
  618. }, c.prototype.writeUInt16BE = function(t, e, r) {
  619. return t = +t, e >>>= 0, r || O(this, t, e, 2, 65535, 0), this[e] = t >>> 8, this[e + 1] = 255 & t, e + 2
  620. }, c.prototype.writeUInt32LE = function(t, e, r) {
  621. return t = +t, e >>>= 0, r || O(this, t, e, 4, 4294967295, 0), this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8, this[e] = 255 & t, e + 4
  622. }, c.prototype.writeUInt32BE = function(t, e, r) {
  623. return t = +t, e >>>= 0, r || O(this, t, e, 4, 4294967295, 0), this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t, e + 4
  624. }, c.prototype.writeIntLE = function(t, e, r, n) {
  625. if (t = +t, e >>>= 0, !n) {
  626. var i = Math.pow(2, 8 * r - 1);
  627. O(this, t, e, r, i - 1, -i)
  628. }
  629. var o = 0,
  630. s = 1,
  631. u = 0;
  632. for (this[e] = 255 & t; ++o < r && (s *= 256);) t < 0 && 0 === u && 0 !== this[e + o - 1] && (u = 1), this[e + o] = (t / s >> 0) - u & 255;
  633. return e + r
  634. }, c.prototype.writeIntBE = function(t, e, r, n) {
  635. if (t = +t, e >>>= 0, !n) {
  636. var i = Math.pow(2, 8 * r - 1);
  637. O(this, t, e, r, i - 1, -i)
  638. }
  639. var o = r - 1,
  640. s = 1,
  641. u = 0;
  642. for (this[e + o] = 255 & t; 0 <= --o && (s *= 256);) t < 0 && 0 === u && 0 !== this[e + o + 1] && (u = 1), this[e + o] = (t / s >> 0) - u & 255;
  643. return e + r
  644. }, c.prototype.writeInt8 = function(t, e, r) {
  645. return t = +t, e >>>= 0, r || O(this, t, e, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[e] = 255 & t, e + 1
  646. }, c.prototype.writeInt16LE = function(t, e, r) {
  647. return t = +t, e >>>= 0, r || O(this, t, e, 2, 32767, -32768), this[e] = 255 & t, this[e + 1] = t >>> 8, e + 2
  648. }, c.prototype.writeInt16BE = function(t, e, r) {
  649. return t = +t, e >>>= 0, r || O(this, t, e, 2, 32767, -32768), this[e] = t >>> 8, this[e + 1] = 255 & t, e + 2
  650. }, c.prototype.writeInt32LE = function(t, e, r) {
  651. return t = +t, e >>>= 0, r || O(this, t, e, 4, 2147483647, -2147483648), this[e] = 255 & t, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16, this[e + 3] = t >>> 24, e + 4
  652. }, c.prototype.writeInt32BE = function(t, e, r) {
  653. return t = +t, e >>>= 0, r || O(this, t, e, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t, e + 4
  654. }, c.prototype.writeFloatLE = function(t, e, r) {
  655. return P(this, t, e, !0, r)
  656. }, c.prototype.writeFloatBE = function(t, e, r) {
  657. return P(this, t, e, !1, r)
  658. }, c.prototype.writeDoubleLE = function(t, e, r) {
  659. return S(this, t, e, !0, r)
  660. }, c.prototype.writeDoubleBE = function(t, e, r) {
  661. return S(this, t, e, !1, r)
  662. }, c.prototype.copy = function(t, e, r, n) {
  663. if (!c.isBuffer(t)) throw new TypeError("argument should be a Buffer");
  664. if (r = r || 0, n || 0 === n || (n = this.length), e >= t.length && (e = t.length), e = e || 0, 0 < n && n < r && (n = r), n === r) return 0;
  665. if (0 === t.length || 0 === this.length) return 0;
  666. if (e < 0) throw new RangeError("targetStart out of bounds");
  667. if (r < 0 || r >= this.length) throw new RangeError("Index out of range");
  668. if (n < 0) throw new RangeError("sourceEnd out of bounds");
  669. n > this.length && (n = this.length), t.length - e < n - r && (n = t.length - e + r);
  670. var i = n - r;
  671. if (this === t && "function" == typeof Uint8Array.prototype.copyWithin) this.copyWithin(e, r, n);
  672. else if (this === t && r < e && e < n)
  673. for (var o = i - 1; 0 <= o; --o) t[o + e] = this[o + r];
  674. else Uint8Array.prototype.set.call(t, this.subarray(r, n), e);
  675. return i
  676. }, c.prototype.fill = function(t, e, r, n) {
  677. if ("string" == typeof t) {
  678. if ("string" == typeof e ? (n = e, e = 0, r = this.length) : "string" == typeof r && (n = r, r = this.length), void 0 !== n && "string" != typeof n) throw new TypeError("encoding must be a string");
  679. if ("string" == typeof n && !c.isEncoding(n)) throw new TypeError("Unknown encoding: " + n);
  680. if (1 === t.length) {
  681. var i = t.charCodeAt(0);
  682. ("utf8" === n && i < 128 || "latin1" === n) && (t = i)
  683. }
  684. } else "number" == typeof t && (t &= 255);
  685. if (e < 0 || this.length < e || this.length < r) throw new RangeError("Out of range index");
  686. if (r <= e) return this;
  687. var o;
  688. if (e >>>= 0, r = void 0 === r ? this.length : r >>> 0, "number" == typeof(t = t || 0))
  689. for (o = e; o < r; ++o) this[o] = t;
  690. else {
  691. var s = c.isBuffer(t) ? t : c.from(t, n),
  692. u = s.length;
  693. if (0 === u) throw new TypeError('The value "' + t + '" is invalid for argument "value"');
  694. for (o = 0; o < r - e; ++o) this[o + e] = s[o % u]
  695. }
  696. return this
  697. };
  698. var e = /[^+/0-9A-Za-z-_]/g;
  699.  
  700. function N(t) {
  701. return t < 16 ? "0" + t.toString(16) : t.toString(16)
  702. }
  703.  
  704. function B(t, e) {
  705. var r;
  706. e = e || 1 / 0;
  707. for (var n = t.length, i = null, o = [], s = 0; s < n; ++s) {
  708. if (55295 < (r = t.charCodeAt(s)) && r < 57344) {
  709. if (!i) {
  710. if (56319 < r) {
  711. -1 < (e -= 3) && o.push(239, 191, 189);
  712. continue
  713. }
  714. if (s + 1 === n) {
  715. -1 < (e -= 3) && o.push(239, 191, 189);
  716. continue
  717. }
  718. i = r;
  719. continue
  720. }
  721. if (r < 56320) {
  722. -1 < (e -= 3) && o.push(239, 191, 189), i = r;
  723. continue
  724. }
  725. r = 65536 + (i - 55296 << 10 | r - 56320)
  726. } else i && -1 < (e -= 3) && o.push(239, 191, 189);
  727. if (i = null, r < 128) {
  728. if ((e -= 1) < 0) break;
  729. o.push(r)
  730. } else if (r < 2048) {
  731. if ((e -= 2) < 0) break;
  732. o.push(r >> 6 | 192, 63 & r | 128)
  733. } else if (r < 65536) {
  734. if ((e -= 3) < 0) break;
  735. o.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128)
  736. } else {
  737. if (!(r < 1114112)) throw new Error("Invalid code point");
  738. if ((e -= 4) < 0) break;
  739. o.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128)
  740. }
  741. }
  742. return o
  743. }
  744.  
  745. function C(t) {
  746. return n.toByteArray(function(t) {
  747. if ((t = (t = t.split("=")[0]).trim().replace(e, "")).length < 2) return "";
  748. for (; t.length % 4 != 0;) t += "=";
  749. return t
  750. }(t))
  751. }
  752.  
  753. function _(t, e, r, n) {
  754. for (var i = 0; i < n && !(i + r >= e.length || i >= t.length); ++i) e[i + r] = t[i];
  755. return i
  756. }
  757.  
  758. function x(t, e) {
  759. return t instanceof e || null != t && null != t.constructor && null != t.constructor.name && t.constructor.name === e.name
  760. }
  761.  
  762. function K(t) {
  763. return t != t
  764. }
  765. }).call(this, L("buffer").Buffer)
  766. }, {
  767. "base64-js": 1,
  768. buffer: 2,
  769. ieee754: 3
  770. }],
  771. 3: [function(t, e, r) {
  772. r.read = function(t, e, r, n, i) {
  773. var o, s, u = 8 * i - n - 1,
  774. a = (1 << u) - 1,
  775. f = a >> 1,
  776. h = -7,
  777. c = r ? i - 1 : 0,
  778. l = r ? -1 : 1,
  779. p = t[e + c];
  780. for (c += l, o = p & (1 << -h) - 1, p >>= -h, h += u; 0 < h; o = 256 * o + t[e + c], c += l, h -= 8);
  781. for (s = o & (1 << -h) - 1, o >>= -h, h += n; 0 < h; s = 256 * s + t[e + c], c += l, h -= 8);
  782. if (0 === o) o = 1 - f;
  783. else {
  784. if (o === a) return s ? NaN : 1 / 0 * (p ? -1 : 1);
  785. s += Math.pow(2, n), o -= f
  786. }
  787. return (p ? -1 : 1) * s * Math.pow(2, o - n)
  788. }, r.write = function(t, e, r, n, i, o) {
  789. var s, u, a, f = 8 * o - i - 1,
  790. h = (1 << f) - 1,
  791. c = h >> 1,
  792. l = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
  793. p = n ? 0 : o - 1,
  794. y = n ? 1 : -1,
  795. d = e < 0 || 0 === e && 1 / e < 0 ? 1 : 0;
  796. for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (u = isNaN(e) ? 1 : 0, s = h) : (s = Math.floor(Math.log(e) / Math.LN2), e * (a = Math.pow(2, -s)) < 1 && (s--, a *= 2), 2 <= (e += 1 <= s + c ? l / a : l * Math.pow(2, 1 - c)) * a && (s++, a /= 2), h <= s + c ? (u = 0, s = h) : 1 <= s + c ? (u = (e * a - 1) * Math.pow(2, i), s += c) : (u = e * Math.pow(2, c - 1) * Math.pow(2, i), s = 0)); 8 <= i; t[r + p] = 255 & u, p += y, u /= 256, i -= 8);
  797. for (s = s << i | u, f += i; 0 < f; t[r + p] = 255 & s, p += y, s /= 256, f -= 8);
  798. t[r + p - y] |= 128 * d
  799. }
  800. }, {}],
  801. 4: [function(t, e, r) {
  802. var n = {
  803. objPosX: 3,
  804. objPosY: 1,
  805. objAngle: 2,
  806. agentPosX: 66,
  807. agentPosY: 23,
  808. agentPosX2: 18,
  809. agentPosY2: 44,
  810. fade: 64,
  811. opacity: 65,
  812. counter: 29,
  813. weirdBytes1: 19,
  814. weirdBytes2: 29,
  815. expPointsOthert: 20,
  816. maxHealth: 35,
  817. health: 37,
  818. timeAliveThis: 28,
  819. tankMass: 25,
  820. tankSpeed: 31,
  821. tankLevel: 38,
  822. expPointsThis: 39
  823. },
  824. i = {},
  825. o = !0,
  826. s = !1,
  827. u = void 0;
  828. try {
  829. for (var a, f = Object.keys(n)[Symbol.iterator](); !(o = (a = f.next()).done); o = !0) {
  830. var h = a.value;
  831. i[n[h]] = h
  832. }
  833. } catch (t) {
  834. s = !0, u = t
  835. } finally {
  836. try {
  837. !o && f.return && f.return()
  838. } finally {
  839. if (s) throw u
  840. }
  841. }
  842. var c = {
  843. LEFT_MOUSE: 1,
  844. UP: 2,
  845. LEFT: 4,
  846. DOWN: 8,
  847. RIGHT: 16,
  848. GOD_MODE: 32,
  849. SUICIDE: 64,
  850. RIGHT_MOUSE: 128,
  851. INSTANT_UPGRADE: 256,
  852. USE_GAMEPAD: 512,
  853. SWITCH_CLASS: 1024,
  854. TRUE_CONST: 2048
  855. },
  856. l = {
  857. UP: c.UP,
  858. RIGHT_UP: c.RIGHT | c.UP,
  859. RIGHT: c.RIGHT,
  860. RIGHT_DOWN: c.RIGHT | c.DOWN,
  861. DOWN: c.DOWN,
  862. LEFT_DOWN: c.LEFT | c.DOWN,
  863. LEFT: c.LEFT,
  864. LEFT_UP: c.LEFT | c.UP
  865. },
  866. p = (_createClass(y, [{
  867. key: "get",
  868. value: function(t) {
  869. return this.lookup[t]
  870. }
  871. }, {
  872. key: "find",
  873. value: function(t) {
  874. if (!this.reverse.hasOwnProperty(t)) throw t;
  875. return this.reverse[t]
  876. }
  877. }]), y);
  878.  
  879. function y() {
  880. var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : [],
  881. e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0;
  882. _classCallCheck(this, y);
  883. var r = "function" === e ? e : function(t) {
  884. return t ^ e
  885. };
  886. this.table = t, this.length = t.length, this.lookup = {}, this.reverse = {};
  887. for (var n = 0; n < t.length; n++) this.lookup[r(n)] = t[n], this.reverse[t[n]] = r(n)
  888. }
  889. var d = new p([8, 7, 6, 5, 4, 3, 2, 1], 0),
  890. v = new p(["Tank", "Twin", "Triplet", "Triple Shot", "Quad Tank", "Octo Tank", "Sniper", "Machine Gun", "Flank Guard", "Tri-Angle", "Destroyer", "Overseer", "Overlord", "Twin-Flank", "Penta Shot", "Assassin", "Arena Closer", "Necromancer", "Triple Twin", "Hunter", "Gunner", "Stalker", "Ranger", "Booster", "Fighter", "Hybrid", "Manager", "Mothership", "Predator", "Sprayer", "", "Trapper", "Gunner Trapper", "Overtrapper", "Mega Trapper", "Tri-Trapper", "Smasher", "", "Landmine", "Auto Gunner", "Auto 5", "Auto 3", "Spread Shot", "Streamliner", "Auto Trapper", "Dominator", "Dominator", "Dominator", "Battleship", "Annihilator", "Auto Smasher", "Spike", "Factory", "", "Skimmer", "Rocketeer"], 0);
  891. e.exports = {
  892. updateKinds: {
  893. CREATE: 1,
  894. UPDATE: 2
  895. },
  896. inPacketKinds: {
  897. UPDATE: 0,
  898. UPDATE_COMPRESSED: 2,
  899. IGNORE: -1
  900. },
  901. entityTypes: {
  902. UNKNOWN: "UNKNOWN",
  903. TANK: "TANK",
  904. BULLET: "BULLET",
  905. SHAPE: "SHAPE",
  906. BOT: "BOT",
  907. OWN_TANK: "OWN_TANK",
  908. LEADER_TANK: "LEADER_TANK",
  909. MASTER_TANK: "MASTER_TANK"
  910. },
  911. fieldIdToType: {
  912. 1: "vi",
  913. 2: "vi",
  914. 3: "vi",
  915. 23: "float",
  916. 66: "float",
  917. 18: "float",
  918. 44: "float",
  919. 64: "float",
  920. 65: "float",
  921. 29: "float",
  922. 19: "vu",
  923. 57: "vu",
  924. 20: "float",
  925. 35: "float",
  926. 37: "float",
  927. 28: "float",
  928. 25: "vi",
  929. 26: "float",
  930. 27: "float",
  931. 31: "float",
  932. 38: "vi",
  933. 39: "float",
  934. 59: "float",
  935. 63: "vu",
  936. 67: "vu",
  937. 53: "vu"
  938. },
  939. fieldIdToName: i,
  940. tankTable: v,
  941. statTable: d,
  942. outPacketKinds: {
  943. INIT: 0,
  944. INPUT: 1,
  945. SPAWN: 2,
  946. UPDATE_STAT: 3,
  947. UPDATE_TANK: 4,
  948. HEARTBEAT: 5,
  949. UNKNOWN: 6,
  950. EXT_FOUND: 7,
  951. CLEAR_DEATH: 8,
  952. TAKE_TANK: 9
  953. },
  954. keyInput: c,
  955. directionAccelerations: {
  956. UP: {
  957. x: 0,
  958. y: -1
  959. },
  960. RIGHT_UP: {
  961. x: .707,
  962. y: -.707
  963. },
  964. RIGHT: {
  965. x: 1,
  966. y: 0
  967. },
  968. RIGHT_DOWN: {
  969. x: .707,
  970. y: .707
  971. },
  972. DOWN: {
  973. x: 0,
  974. y: 1
  975. },
  976. LEFT_DOWN: {
  977. x: -.707,
  978. y: .707
  979. },
  980. LEFT: {
  981. x: -1,
  982. y: 0
  983. },
  984. LEFT_UP: {
  985. x: -.707,
  986. y: -.707
  987. }
  988. },
  989. directionKeys: l
  990. }
  991. }, {}],
  992. 5: [function(a, f, t) {
  993. (function(r) {
  994. var e = a("./data.js"),
  995. t = new ArrayBuffer(4),
  996. n = new Uint8Array(t),
  997. i = new Uint32Array(t),
  998. o = new Float32Array(t),
  999. s = (_createClass(u, [{
  1000. key: "i8",
  1001. value: function(t) {
  1002. return this.buffer[this.length] = t, this.length += 1, this
  1003. }
  1004. }, {
  1005. key: "i32",
  1006. value: function(t) {
  1007. return i[0] = t, this.buffer.set(n, this.length), this.length += 4, this
  1008. }
  1009. }, {
  1010. key: "float",
  1011. value: function(t) {
  1012. return o[0] = t, this.buffer.set(n, this.length), this.length += 4, this
  1013. }
  1014. }, {
  1015. key: "vu",
  1016. value: function(t) {
  1017. do {
  1018. var e = t;
  1019. (t >>>= 7) && (e |= 128), this.buffer[this.length++] = e
  1020. } while (t);
  1021. return this
  1022. }
  1023. }, {
  1024. key: "vi",
  1025. value: function(t) {
  1026. var e = (2147483648 & t) >>> 31;
  1027. e && (t = ~t);
  1028. var r = t << 1 | e;
  1029. return this.vu(r), this
  1030. }
  1031. }, {
  1032. key: "vf",
  1033. value: function(t) {
  1034. return o[0] = t, this.vi(function(t) {
  1035. return (255 & t) << 24 | (65280 & t) << 8 | t >> 8 & 65280 | t >> 24 & 255
  1036. }(i[0])), this
  1037. }
  1038. }, {
  1039. key: "string",
  1040. value: function(t) {
  1041. if (t) {
  1042. var e = new Uint8Array(r.from(t));
  1043. this.buffer.set(e, this.length), this.length += e.length
  1044. }
  1045. return this.buffer[this.length++] = 0, this
  1046. }
  1047. }, {
  1048. key: "out",
  1049. value: function() {
  1050. return this.buffer.buffer.slice(0, this.length)
  1051. }
  1052. }, {
  1053. key: "dump",
  1054. value: function() {
  1055. return Array.from(this.buffer.subarray(0, this.length)).map(function(t) {
  1056. return t.toString(16).padStart(2, 0)
  1057. }).join(" ")
  1058. }
  1059. }, {
  1060. key: "encodeOutbound",
  1061. value: function(t) {
  1062. switch (t.kind) {
  1063. case e.outPacketKinds.INIT:
  1064. return this.encodeInit(t);
  1065. case e.outPacketKinds.INPUT:
  1066. return this.encodeInput(t);
  1067. case e.outPacketKinds.SPAWN:
  1068. return this.encodeSpawn(t);
  1069. case e.outPacketKinds.UPDATE_STAT:
  1070. return this.encodeUpdateStat(t);
  1071. case e.outPacketKinds.UPDATE_TANK:
  1072. return this.encodeUpdateTank(t);
  1073. case e.outPacketKinds.EXT_FOUND:
  1074. return !1;
  1075. default:
  1076. return t.data ? t.data : this.vu(t.kind).out()
  1077. }
  1078. }
  1079. }, {
  1080. key: "encodeInput",
  1081. value: function(t) {
  1082. return this.vu(t.kind).vu(t.key).vf(t.x).vf(t.y).out()
  1083. }
  1084. }, {
  1085. key: "encodeInit",
  1086. value: function(t) {
  1087. return this.vu(t.kind).string(t.build).string(t.unk1).string(t.partyId).string(t.unk2).out()
  1088. }
  1089. }, {
  1090. key: "encodeSpawn",
  1091. value: function(t) {
  1092. return this.vu(t.kind).string(t.name).out()
  1093. }
  1094. }, {
  1095. key: "encodeUpdateStat",
  1096. value: function(t) {
  1097. return this.vu(t.kind).vu(t.statId).vu(t.upto).out()
  1098. }
  1099. }, {
  1100. key: "encodeUpdateTank",
  1101. value: function(t) {
  1102. return this.vu(t.kind).vu(t.tankId).out()
  1103. }
  1104. }]), u);
  1105.  
  1106. function u() {
  1107. _classCallCheck(this, u), this.length = 0, this.buffer = new Uint8Array(4096)
  1108. }
  1109. f.exports = {
  1110. Encoder: s
  1111. }
  1112. }).call(this, a("buffer").Buffer)
  1113. }, {
  1114. "./data.js": 4,
  1115. buffer: 2
  1116. }],
  1117. 6: [function(t, e, r) {
  1118. e.exports = {
  1119. inject: function(n, i) {
  1120. var o = new Set,
  1121. s = window.WebSocket.prototype.send;
  1122. return window.WebSocket.prototype.send = function(t) {
  1123. var e = new Uint8Array(t);
  1124. if (!o.has(this)) {
  1125. console.log("Hello: New WebSocket is being used."), o.add(this);
  1126. var r = this.onmessage;
  1127. this.onmessage = function(t) {
  1128. if (n && (t.data = n.call(this, new Uint8Array(t.data))), t.data) return r.call(this, t)
  1129. }
  1130. }
  1131. try {
  1132. i && (e = i.call(this, e))
  1133. } catch (t) {
  1134. console.log("Test Injection")
  1135. }
  1136. if (e) return s.call(this, e)
  1137. }, console.log("injection ok"), s
  1138. }
  1139. }
  1140. }, {}],
  1141. 7: [function(t, e, r) {
  1142. var n = t("./data.js"),
  1143. i = new ArrayBuffer(4),
  1144. o = new Uint8Array(i),
  1145. s = new Uint32Array(i),
  1146. u = new Float32Array(i),
  1147. a = (_createClass(f, [{
  1148. key: "i8",
  1149. value: function() {
  1150. var t = this.buffer[this.at++];
  1151. return this.assertNotOOB(), t
  1152. }
  1153. }, {
  1154. key: "endianSwap",
  1155. value: function(t) {
  1156. return (255 & t) << 24 | (65280 & t) << 8 | t >> 8 & 65280 | t >> 24 & 255
  1157. }
  1158. }, {
  1159. key: "i32",
  1160. value: function() {
  1161. return o.set(this.buffer.subarray(this.at, this.at += 4)), this.assertNotOOB(), s[0]
  1162. }
  1163. }, {
  1164. key: "float",
  1165. value: function() {
  1166. return o.set(this.buffer.subarray(this.at, this.at += 4)), this.assertNotOOB(), u[0]
  1167. }
  1168. }, {
  1169. key: "vleft",
  1170. value: function() {
  1171. this.at--;
  1172. for (var t = 1; 128 & this.buffer[this.at - 1] && t < 4;) this.at--, t++
  1173. }
  1174. }, {
  1175. key: "vu",
  1176. value: function() {
  1177. for (var t = 0, e = 0; 128 & this.buffer[this.at];) t |= (127 & this.buffer[this.at++]) << e, e += 7;
  1178. return t |= this.buffer[this.at++] << e, this.assertNotOOB(), t
  1179. }
  1180. }, {
  1181. key: "vi",
  1182. value: function() {
  1183. var t = this.vu(),
  1184. e = 1 & t;
  1185. return t >>= 1, e && (t = ~t), this.assertNotOOB(), t
  1186. }
  1187. }, {
  1188. key: "vf",
  1189. value: function() {
  1190. return s[0] = this.endianSwap(this.vi()), this.assertNotOOB(), u[0]
  1191. }
  1192. }, {
  1193. key: "string",
  1194. value: function() {
  1195. for (var t = ""; this.buffer[this.at];) t += String.fromCharCode(this.buffer[this.at]), this.at++;
  1196. return this.at++, this.assertNotOOB(), t
  1197. }
  1198. }, {
  1199. key: "getByteString",
  1200. value: function(t, e) {
  1201. for (var r = ""; t < e && t < this.buffer.length;) {
  1202. var n = this.buffer[t];
  1203. r += (n < 16 ? "0" : "") + n.toString(16) + " ", t++
  1204. }
  1205. return r
  1206. }
  1207. }, {
  1208. key: "isEOF",
  1209. value: function() {
  1210. return this.at === this.buffer.length
  1211. }
  1212. }, {
  1213. key: "raiseUnexpected",
  1214. value: function(t, e) {
  1215. var r = "Error at pos " + this.at + ": " + t;
  1216. "tolerate" !== e && console.log(" ");
  1217. var n = new Error(r);
  1218. throw n.payload = e, n
  1219. }
  1220. }, {
  1221. key: "assertEOF",
  1222. value: function() {
  1223. this.isEOF() || this.raiseUnexpected("Expected end of packet.")
  1224. }
  1225. }, {
  1226. key: "assertNotOOB",
  1227. value: function() {
  1228. this.at > this.buffer.length && this.raiseUnexpected("Unexpected end of packet.")
  1229. }
  1230. }, {
  1231. key: "assertNoIntersectingKeys",
  1232. value: function(t, e) {}
  1233. }, {
  1234. key: "parseOutbound",
  1235. value: function() {
  1236. var t = this.i8();
  1237. switch (t) {
  1238. case n.outPacketKinds.INIT:
  1239. return this.parseInit();
  1240. case n.outPacketKinds.INPUT:
  1241. return this.parseInput();
  1242. case n.outPacketKinds.SPAWN:
  1243. return this.parseSpawn();
  1244. case n.outPacketKinds.UPDATE_STAT:
  1245. return this.parseUpdateStat();
  1246. case n.outPacketKinds.UPDATE_TANK:
  1247. return this.parseUpdateTank();
  1248. default:
  1249. return {
  1250. kind: t, data: this.buffer
  1251. }
  1252. }
  1253. }
  1254. }, {
  1255. key: "parseInput",
  1256. value: function() {
  1257. var t = {
  1258. kind: n.outPacketKinds.INPUT,
  1259. key: this.vu(),
  1260. x: this.vf(),
  1261. y: this.vf()
  1262. };
  1263. return this.isEOF() || console.log("Unexpected end of output 'input' packet."), this.assertEOF(), t
  1264. }
  1265. }, {
  1266. key: "parseInit",
  1267. value: function() {
  1268. if (this.isEOF()) return {
  1269. kind: n.outPacketKinds.INIT
  1270. };
  1271. var t = {
  1272. kind: n.outPacketKinds.INIT,
  1273. build: this.string(),
  1274. unk1: this.string(),
  1275. partyId: this.string(),
  1276. unk2: this.string()
  1277. };
  1278. return this.assertEOF(), t
  1279. }
  1280. }, {
  1281. key: "parseSpawn",
  1282. value: function() {
  1283. var t = {
  1284. kind: n.outPacketKinds.SPAWN,
  1285. name: this.string()
  1286. };
  1287. return this.assertEOF(), t
  1288. }
  1289. }, {
  1290. key: "parseUpdateStat",
  1291. value: function() {
  1292. var t = {
  1293. kind: n.outPacketKinds.UPDATE_STAT,
  1294. statId: this.vu(),
  1295. upto: this.vu()
  1296. };
  1297. return this.assertEOF(), t
  1298. }
  1299. }, {
  1300. key: "parseUpdateTank",
  1301. value: function() {
  1302. var t = {
  1303. kind: n.outPacketKinds.UPDATE_TANK,
  1304. tankId: this.vu()
  1305. };
  1306. return this.assertEOF(), t
  1307. }
  1308. }, {
  1309. key: "parseInbound",
  1310. value: function() {
  1311. var t = this.i8();
  1312. return t === n.inPacketKinds.UPDATE ? this.buffer.length < 2 ? this.ignorePacket("?") : this.updatePacket() : t === n.inPacketKinds.UPDATE_COMPRESSED ? this.updateCompressedPacket() : this.ignorePacket(t)
  1313. }
  1314. }, {
  1315. key: "updatePacket",
  1316. value: function() {
  1317. var t = this.vu(),
  1318. e = {
  1319. kind: n.inPacketKinds.UPDATE,
  1320. updateId: t,
  1321. deletes: this.multiEntityDeletes(),
  1322. upcreates: this.multiEntityUpcreates()
  1323. };
  1324. return this.assertEOF(), e
  1325. }
  1326. }, {
  1327. key: "updateCompressedPacket",
  1328. value: function() {
  1329. this.raiseUnexpected("UPDATE_COMPRESSED not supported", "compressed")
  1330. }
  1331. }, {
  1332. key: "ignorePacket",
  1333. value: function(t) {
  1334. return {
  1335. kind: n.inPacketKinds.IGNORE,
  1336. ignore_reason: t
  1337. }
  1338. }
  1339. }, {
  1340. key: "entityId",
  1341. value: function() {
  1342. var t = this.vu() + "#" + this.vu();
  1343. return this.curEntityId = t
  1344. }
  1345. }, {
  1346. key: "isMatch",
  1347. value: function(t) {
  1348. if (this.at + t.length > this.buffer.length) return !1;
  1349. for (var e = 0; e < t.length; e++)
  1350. if (this.buffer[e + this.at] !== t[e]) return !1;
  1351. return !0
  1352. }
  1353. }, {
  1354. key: "moveToNextCreate",
  1355. value: function() {
  1356. for (; ++this.at < this.buffer.length;)
  1357. if (this.entityCreateTypeId() !== n.entityTypes.UNKNOWN && 0 === this.buffer[this.at - 1] && 1 === this.buffer[this.at - 2]) return this.vleft(), this.vleft(), this.vleft(), void this.vleft();
  1358. this.assertEOF()
  1359. }
  1360. }, {
  1361. key: "entityCreateTypeId",
  1362. value: function() {
  1363. return this.isMatch([2, 0, 5, 3, 0, 3]) ? n.entityTypes.TANK : this.isMatch([2, 0, 7, 0, 1]) ? n.entityTypes.BULLET : this.isMatch([2, 0, 5, 3, 0, 1]) ? n.entityTypes.SHAPE : n.entityTypes.UNKNOWN
  1364. }
  1365. }, {
  1366. key: "fieldIdSpec",
  1367. value: function() {
  1368. return 1 ^ this.vu()
  1369. }
  1370. }, {
  1371. key: "updateKind",
  1372. value: function() {
  1373. var t = this.vu(),
  1374. e = this.vu();
  1375. return 1 === t && 0 === e ? n.updateKinds.CREATE : 0 === t && 1 === e ? n.updateKinds.UPDATE : (console.log(), void this.raiseUnexpected("Unknown update type: " + t + " " + e, 9 === e ? "tolerate" : null))
  1376. }
  1377. }, {
  1378. key: "multiEntityDeletes",
  1379. value: function() {
  1380. for (var t = this.vu(), e = [], r = 0; r < t; r++) e.push(this.entityId());
  1381. return e
  1382. }
  1383. }, {
  1384. key: "multiEntityUpcreates",
  1385. value: function() {
  1386. for (var t = this.vu(), e = [], r = 0; r < t; r++) {
  1387. if (this.isEOF()) {
  1388. console.log("unexpected eof...");
  1389. break
  1390. }
  1391. e.push(this.entityUpcreate())
  1392. }
  1393. return this.assertEOF(), e
  1394. }
  1395. }, {
  1396. key: "entityUpcreate",
  1397. value: function() {
  1398. var t = this.entityId(),
  1399. e = this.updateKind(),
  1400. r = {
  1401. entityId: t,
  1402. updateKind: e
  1403. };
  1404. return e === n.updateKinds.CREATE ? Object.assign(r, this.entityCreate()) : e === n.updateKinds.UPDATE ? Object.assign(r, this.entityUpdate()) : this.raiseUnexpected("Internal error"), r
  1405. }
  1406. }, {
  1407. key: "parseField",
  1408. value: function(t) {
  1409. n.fieldIdToType.hasOwnProperty(t) || this.raiseUnexpected("Unknown property field_id: " + t + " @ " + this.curEntityId, t);
  1410. var e = n.fieldIdToType[t];
  1411. if (!(e in this)) return this.raiseUnexpected("Internal error: method to parse field_type " + field_name + " not implemented"), {};
  1412. var r = {};
  1413. return r[n.fieldIdToName.hasOwnProperty(t) ? n.fieldIdToName[t] : "unk_" + e + "_" + t] = this[e](), r
  1414. }
  1415. }, {
  1416. key: "entityUpdate",
  1417. value: function() {
  1418. for (var t = this.fieldIdSpec(), e = {};;) {
  1419. var r = this.parseField(t);
  1420. this.assertNoIntersectingKeys(e, r), Object.assign(e, r);
  1421. var n = this.fieldIdSpec();
  1422. if (0 === n) break;
  1423. t += n
  1424. }
  1425. return e
  1426. }
  1427. }, {
  1428. key: "entityCreate",
  1429. value: function() {
  1430. var t = this.entityCreateTypeId();
  1431. t === n.entityTypes.UNKNOWN && this.raiseUnexpected("Entity create: " + this.curEntityId + ", " + t + ".", "create");
  1432. var e = {
  1433. entityType: t
  1434. };
  1435. return this.moveToNextCreate(), e
  1436. }
  1437. }]), f);
  1438.  
  1439. function f(t) {
  1440. _classCallCheck(this, f), this.at = 0, this.buffer = new Uint8Array(t), this.curEntityId = ""
  1441. }
  1442.  
  1443. function h(t) {
  1444. var e = new ArrayBuffer(t.length),
  1445. r = new Uint8Array(e),
  1446. n = 0,
  1447. i = !0,
  1448. o = !1,
  1449. s = void 0;
  1450. try {
  1451. for (var u, a = t[Symbol.iterator](); !(i = (u = a.next()).done); i = !0) {
  1452. var f = u.value;
  1453. r[n++] = f
  1454. }
  1455. } catch (t) {
  1456. o = !0, s = t
  1457. } finally {
  1458. try {
  1459. !i && a.return && a.return()
  1460. } finally {
  1461. if (o) throw s
  1462. }
  1463. }
  1464. return e
  1465. }
  1466. e.exports = {
  1467. Parser: a,
  1468. byteStringToBuffer: function(t) {
  1469. var e = t.split(" "),
  1470. r = [],
  1471. n = !0,
  1472. i = !1,
  1473. o = void 0;
  1474. try {
  1475. for (var s, u = e[Symbol.iterator](); !(n = (s = u.next()).done); n = !0) {
  1476. var a = s.value;
  1477. r.push(parseInt(a, 16))
  1478. }
  1479. } catch (t) {
  1480. i = !0, o = t
  1481. } finally {
  1482. try {
  1483. !n && u.return && u.return()
  1484. } finally {
  1485. if (i) throw o
  1486. }
  1487. }
  1488. return h(r)
  1489. },
  1490. bytesToBuffer: h
  1491. }
  1492. }, {
  1493. "./data.js": 4
  1494. }],
  1495. 8: [function(t, e, r) {
  1496. var i = t("./data.js"),
  1497. o = t("./parser.js").Parser,
  1498. f = t("./encoder.js").Encoder,
  1499. n = t("./injection.js").inject;
  1500.  
  1501. function s(t, e) {
  1502. var r = !0,
  1503. n = !1,
  1504. i = void 0;
  1505. try {
  1506. for (var o, s = e[Symbol.iterator](); !(r = (o = s.next()).done); r = !0) {
  1507. var u = o.value,
  1508. a = new f;
  1509. h.call(t, a.encodeOutbound(u))
  1510. }
  1511. } catch (t) {
  1512. n = !0, i = t
  1513. } finally {
  1514. try {
  1515. !r && s.return && s.return()
  1516. } finally {
  1517. if (n) throw i
  1518. }
  1519. }
  1520. return null
  1521. }
  1522. var u = 0;
  1523. window.switchPeriod = 1.5, window.isOn = !1, window.switches = [74, -1];
  1524. var a = 0;
  1525. document.addEventListener("keydown", function(t) {
  1526. "t" !== t.key && "T" !== t.key || (window.isOn = !window.isOn, a = 0, console.log("Switch script on: " + window.isOn))
  1527. });
  1528. var h = n(null, function(t) {
  1529. var e = this;
  1530. window.sendPackets = function(t) {
  1531. return s(e, t)
  1532. };
  1533. var r = new o(t).parseOutbound();
  1534. if (r.kind === i.outPacketKinds.SPAWN && (window.isOn = !1), r.kind === i.outPacketKinds.UPDATE_TANK, r.kind !== i.outPacketKinds.INPUT) return t;
  1535. if (u++, window.isOn && u % window.switchPeriod == 0) {
  1536. a %= switches.length;
  1537. var n = window.switches[a++];
  1538. if (!(0 <= n)) return r.key |= i.keyInput.SWITCH_CLASS, s(this, [r]);
  1539. s(this, [{
  1540. kind: 4,
  1541. tankId: n
  1542. }])
  1543. }
  1544. return t
  1545. })
  1546. }, {
  1547. "./data.js": 4,
  1548. "./encoder.js": 5,
  1549. "./injection.js": 6,
  1550. "./parser.js": 7
  1551. }]
  1552. }, {}, [8]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement