Advertisement
justync7

agar source

Jun 29th, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.81 KB | None | 0 0
  1. (function(g, m) {
  2. function Wa() {
  3. oa = !0;
  4. Aa();
  5. setInterval(Aa, 18E4);
  6. C = pa = document.getElementById("canvas");
  7. f = C.getContext("2d");
  8. C.onmousedown = function(a) {
  9. if (Ba) {
  10. var b = a.clientX - (5 + q / 5 / 2),
  11. c = a.clientY - (5 + q / 5 / 2);
  12. if (Math.sqrt(b * b + c * c) <= q / 5 / 2) {
  13. N();
  14. D(17);
  15. return
  16. }
  17. }
  18. U = a.clientX;
  19. V = a.clientY;
  20. qa();
  21. N()
  22. };
  23. C.onmousemove = function(a) {
  24. U = a.clientX;
  25. V = a.clientY;
  26. qa()
  27. };
  28. C.onmouseup = function() {};
  29. /firefox/i.test(navigator.userAgent) ? document.addEventListener("DOMMouseScroll", Ca, !1) : document.body.onmousewheel = Ca;
  30. var a = !1,
  31. b = !1,
  32. c = !1;
  33. g.onkeydown = function(d) {
  34. 32 != d.keyCode || a || (N(), D(17), a = !0);
  35. 81 != d.keyCode || b || (D(18), b = !0);
  36. 87 != d.keyCode || c || (N(), D(21), c = !0);
  37. 27 == d.keyCode && Da(!0)
  38. };
  39. g.onkeyup = function(d) {
  40. 32 == d.keyCode && (a = !1);
  41. 87 == d.keyCode && (c = !1);
  42. 81 == d.keyCode && b && (D(19), b = !1)
  43. };
  44. g.onblur = function() {
  45. D(19);
  46. c = b = a = !1
  47. };
  48. g.onresize = Ea;
  49. g.requestAnimationFrame ? g.requestAnimationFrame(Fa) : setInterval(ra, 1E3 / 60);
  50. setInterval(N, 40);
  51. w && m("#region").val(w);
  52. Ga();
  53. W(m("#region").val());
  54. null == s && w && X();
  55. m("#overlays").show();
  56. Ea()
  57. }
  58.  
  59. function Ca(a) {
  60. E *= Math.pow(.9, a.wheelDelta / -120 || a.detail || 0);
  61. 1 > E && (E = 1);
  62. E > 4 / k && (E = 4 / k)
  63. }
  64.  
  65. function Xa() {
  66. if (.4 > k) O = null;
  67. else {
  68. for (var a = Number.POSITIVE_INFINITY, b = Number.POSITIVE_INFINITY, c = Number.NEGATIVE_INFINITY, d = Number.NEGATIVE_INFINITY, e = 0, l = 0; l < v.length; l++) {
  69. var h = v[l];
  70. !h.I() || h.M || 20 >= h.size * k || (e = Math.max(h.size, e), a = Math.min(h.x, a), b = Math.min(h.y, b), c = Math.max(h.x, c), d = Math.max(h.y, d))
  71. }
  72. O = Ya.ca({
  73. X: a - (e + 100),
  74. Y: b - (e + 100),
  75. fa: c + (e + 100),
  76. ga: d + (e + 100),
  77. da: 2,
  78. ea: 4
  79. });
  80. for (l = 0; l < v.length; l++)
  81. if (h = v[l], h.I() && !(20 >= h.size * k))
  82. for (a = 0; a < h.a.length; ++a) b = h.a[a].x, c = h.a[a].y, b < t - q / 2 / k || c < u - r / 2 / k || b > t + q / 2 / k || c > u + r / 2 / k || O.i(h.a[a])
  83. }
  84. }
  85.  
  86. function qa() {
  87. Y = (U - q / 2) / k + t;
  88. Z = (V - r / 2) / k + u
  89. }
  90.  
  91. function Aa() {
  92. null == $ && ($ = {}, m("#region").children().each(function() {
  93. var a = m(this),
  94. b = a.val();
  95. b && ($[b] = a.text())
  96. }));
  97. m.get(aa + "//m.agar.io/info", function(a) {
  98. var b = {},
  99. c;
  100. for (c in a.regions) {
  101. var d = c.split(":")[0];
  102. b[d] = b[d] || 0;
  103. b[d] += a.regions[c].numPlayers
  104. }
  105. for (c in b) m('#region option[value="' + c + '"]').text($[c] + " (" + b[c] + " players)")
  106. }, "json")
  107. }
  108.  
  109. function Ha() {
  110. m("#adsBottom").hide();
  111. m("#overlays").hide();
  112. Ga()
  113. }
  114.  
  115. function W(a) {
  116. a && a != w && (m("#region").val() != a && m("#region").val(a), w = g.localStorage.location = a, m(".region-message").hide(), m(".region-message." + a).show(), m(".btn-needs-server").prop("disabled", !1), oa && X())
  117. }
  118.  
  119. function Da(a) {
  120. F = null;
  121. Za();
  122. m("#overlays").fadeIn(a ? 200 : 3E3);
  123. a || m("#adsBottom").fadeIn(3E3)
  124. }
  125.  
  126. function Ga() {
  127. m("#region").val() ? g.localStorage.location = m("#region").val() : g.localStorage.location && m("#region").val(g.localStorage.location);
  128. m("#region").val() ? m("#locationKnown").append(m("#region")) : m("#locationUnknown").append(m("#region"))
  129. }
  130.  
  131. function Za() {
  132. ba && (ba = !1, setTimeout(function() {
  133. ba = !0
  134. }, 6E4 * Ia), g.googletag && g.googletag.pubads && g.googletag.pubads().refresh([g.mainAd]))
  135. }
  136.  
  137. function Ja() {
  138. console.log("Find " + w + P);
  139. m.ajax(aa + "//m.agar.io/", {
  140. error: function() {
  141. setTimeout(Ja, 1E3)
  142. },
  143. success: function(a) {
  144. a = a.split("\n");
  145. a[2] && alert(a[2]);
  146. Ka("ws://" + a[0], a[1])
  147. },
  148. dataType: "text",
  149. method: "POST",
  150. cache: !1,
  151. crossDomain: !0,
  152. data: (w + P || "?") + "\n154669603"
  153. })
  154. }
  155.  
  156. function X() {
  157. oa && w && (m("#connecting").show(), Ja())
  158. }
  159.  
  160. function Ka(a, b) {
  161. if (s) {
  162. s.onopen = null;
  163. s.onmessage = null;
  164. s.onclose = null;
  165. try {
  166. s.close()
  167. } catch (c) {}
  168. s = null
  169. }
  170. if ($a) {
  171. var d = a.split(":");
  172. a = d[0] + "s://ip-" + d[1].replace(/\./g, "-").replace(/\//g, "") + ".tech.agar.io:" + (+d[2] + 2E3)
  173. }
  174. G = [];
  175. p = [];
  176. A = {};
  177. v = [];
  178. I = [];
  179. B = [];
  180. x = y = null;
  181. J = 0;
  182. ca = !1;
  183. console.log("Connecting to " + a);
  184. s = new WebSocket(a);
  185. s.binaryType = "arraybuffer";
  186. s.onopen = function() {
  187. var a;
  188. console.log("socket open");
  189. a = K(5);
  190. a.setUint8(0, 254);
  191. a.setUint32(1, 4, !0);
  192. L(a);
  193. a = K(5);
  194. a.setUint8(0, 255);
  195. a.setUint32(1, 154669603, !0);
  196. L(a);
  197. a = K(1 + b.length);
  198. a.setUint8(0, 80);
  199. for (var c = 0; c < b.length; ++c) a.setUint8(c + 1, b.charCodeAt(c));
  200. L(a)
  201. };
  202. s.onmessage = ab;
  203. s.onclose = bb;
  204. s.onerror = function() {
  205. console.log("socket error")
  206. }
  207. }
  208.  
  209. function K(a) {
  210. return new DataView(new ArrayBuffer(a))
  211. }
  212.  
  213. function L(a) {
  214. s.send(a.buffer)
  215. }
  216.  
  217. function bb() {
  218. ca && (da = 500);
  219. console.log("socket close");
  220. setTimeout(X, da);
  221. da *= 2
  222. }
  223.  
  224. function ab(a) {
  225. cb(new DataView(a.data))
  226. }
  227.  
  228. function cb(a) {
  229. function b() {
  230. for (var b = "";;) {
  231. var d = a.getUint16(c, !0);
  232. c += 2;
  233. if (0 == d) break;
  234. b += String.fromCharCode(d)
  235. }
  236. return b
  237. }
  238. var c = 0;
  239. 240 == a.getUint8(c) && (c += 5);
  240. switch (a.getUint8(c++)) {
  241. case 16:
  242. db(a, c);
  243. break;
  244. case 17:
  245. Q = a.getFloat32(c, !0);
  246. c += 4;
  247. R = a.getFloat32(c, !0);
  248. c += 4;
  249. S = a.getFloat32(c, !0);
  250. c += 4;
  251. break;
  252. case 20:
  253. p = [];
  254. G = [];
  255. break;
  256. case 21:
  257. sa = a.getInt16(c, !0);
  258. c += 2;
  259. ta = a.getInt16(c, !0);
  260. c += 2;
  261. ua || (ua = !0, ea = sa, fa = ta);
  262. break;
  263. case 32:
  264. G.push(a.getUint32(c, !0));
  265. c += 4;
  266. break;
  267. case 49:
  268. if (null != y) break;
  269. var d = a.getUint32(c, !0),
  270. c = c + 4;
  271. B = [];
  272. for (var e = 0; e < d; ++e) {
  273. var l = a.getUint32(c, !0),
  274. c = c + 4;
  275. B.push({
  276. id: l,
  277. name: b()
  278. })
  279. }
  280. La();
  281. break;
  282. case 50:
  283. y = [];
  284. d = a.getUint32(c, !0);
  285. c += 4;
  286. for (e = 0; e < d; ++e) y.push(a.getFloat32(c, !0)), c += 4;
  287. La();
  288. break;
  289. case 64:
  290. ga = a.getFloat64(c, !0), c += 8, ha = a.getFloat64(c, !0), c += 8, ia = a.getFloat64(c, !0), c += 8, ja = a.getFloat64(c, !0), c += 8, Q = (ia + ga) / 2, R = (ja + ha) / 2, S = 1, 0 == p.length && (t = Q, u = R, k = S)
  291. }
  292. }
  293.  
  294. function db(a, b) {
  295. H = +new Date;
  296. ca || (ca = !0, m("#connecting").hide(), Ma());
  297. var c = Math.random();
  298. va = !1;
  299. var d = a.getUint16(b, !0);
  300. b += 2;
  301. for (var e = 0; e < d; ++e) {
  302. var l = A[a.getUint32(b, !0)],
  303. h = A[a.getUint32(b + 4, !0)];
  304. b += 8;
  305. l && h && (h.S(), h.p = h.x, h.q = h.y, h.o = h.size, h.D = l.x, h.F = l.y, h.n = h.size, h.L = H)
  306. }
  307. for (e = 0;;) {
  308. d = a.getUint32(b, !0);
  309. b += 4;
  310. if (0 == d) break;
  311. ++e;
  312. var f, l = a.getInt16(b, !0);
  313. b += 2;
  314. h = a.getInt16(b, !0);
  315. b += 2;
  316. f = a.getInt16(b, !0);
  317. b += 2;
  318. for (var g = a.getUint8(b++), k = a.getUint8(b++), q = a.getUint8(b++), g = (g << 16 | k << 8 | q).toString(16); 6 > g.length;) g = "0" + g;
  319. var g = "#" + g,
  320. k = a.getUint8(b++),
  321. q = !!(k & 1),
  322. s = !!(k & 16);
  323. k & 2 && (b += 4);
  324. k & 4 && (b += 8);
  325. k & 8 && (b += 16);
  326. for (var r, n = "";;) {
  327. r = a.getUint16(b, !0);
  328. b += 2;
  329. if (0 == r) break;
  330. n += String.fromCharCode(r)
  331. }
  332. r = n;
  333. n = null;
  334. A.hasOwnProperty(d) ? (n = A[d], n.K(), n.p = n.x, n.q = n.y, n.o = n.size, n.color = g) : (n = new Na(d, l, h, f, g, r), v.push(n), A[d] = n, n.ka = l, n.la = h);
  335. n.d = q;
  336. n.j = s;
  337. n.D = l;
  338. n.F = h;
  339. n.n = f;
  340. n.ja = c;
  341. n.L = H;
  342. n.W = k;
  343. r && n.Z(r); - 1 != G.indexOf(d) && -1 == p.indexOf(n) && (document.getElementById("overlays").style.display = "none", p.push(n), 1 == p.length && (t = n.x, u = n.y))
  344. }
  345. c = a.getUint32(b, !0);
  346. b += 4;
  347. for (e = 0; e < c; e++) d = a.getUint32(b, !0), b += 4, n = A[d], null != n && n.S();
  348. va && 0 == p.length && Da(!1)
  349. }
  350.  
  351. function N() {
  352. var a;
  353. if (wa()) {
  354. a = U - q / 2;
  355. var b = V - r / 2;
  356. 64 > a * a + b * b || .01 > Math.abs(Oa - Y) && .01 > Math.abs(Pa - Z) || (Oa = Y, Pa = Z, a = K(21), a.setUint8(0, 16), a.setFloat64(1, Y, !0), a.setFloat64(9, Z, !0), a.setUint32(17, 0, !0), L(a))
  357. }
  358. }
  359.  
  360. function Ma() {
  361. if (wa() && null != F) {
  362. var a = K(1 + 2 * F.length);
  363. a.setUint8(0, 0);
  364. for (var b = 0; b < F.length; ++b) a.setUint16(1 + 2 * b, F.charCodeAt(b), !0);
  365. L(a)
  366. }
  367. }
  368.  
  369. function wa() {
  370. return null != s && s.readyState == s.OPEN
  371. }
  372.  
  373. function D(a) {
  374. if (wa()) {
  375. var b = K(1);
  376. b.setUint8(0, a);
  377. L(b)
  378. }
  379. }
  380.  
  381. function Fa() {
  382. ra();
  383. g.requestAnimationFrame(Fa)
  384. }
  385.  
  386. function Ea() {
  387. q = g.innerWidth;
  388. r = g.innerHeight;
  389. pa.width = C.width = q;
  390. pa.height = C.height = r;
  391. var a = m("#helloDialog");
  392. a.css("transform", "none");
  393. var b = a.height(),
  394. c = g.innerHeight;
  395. b > c / 1.1 ? a.css("transform", "translate(-50%, -50%) scale(" + c / b / 1.1 + ")") : a.css("transform", "translate(-50%, -50%)");
  396. ra()
  397. }
  398.  
  399. function Qa() {
  400. var a;
  401. a = 1 * Math.max(r / 1080, q / 1920);
  402. return a *= E
  403. }
  404.  
  405. function eb() {
  406. if (0 != p.length) {
  407. for (var a = 0, b = 0; b < p.length; b++) a += p[b].size;
  408. a = Math.pow(Math.min(64 / a, 1), .4) * Qa();
  409. k = (9 * k + a) / 10
  410. }
  411. }
  412.  
  413. function ra() {
  414. var a, b = Date.now();
  415. ++fb;
  416. H = b;
  417. if (0 < p.length) {
  418. eb();
  419. for (var c = a = 0, d = 0; d < p.length; d++) p[d].K(), a += p[d].x / p.length, c += p[d].y / p.length;
  420. Q = a;
  421. R = c;
  422. S = k;
  423. t = (t + a) / 2;
  424. u = (u + c) / 2
  425. } else t = (29 * t + Q) / 30, u = (29 * u + R) / 30, k = (9 * k + S * Qa()) / 10;
  426. Xa();
  427. qa();
  428. xa || f.clearRect(0, 0, q, r);
  429. xa ? (f.fillStyle = ka ? "#111111" : "#F2FBFF", f.globalAlpha = .05, f.fillRect(0, 0, q, r), f.globalAlpha = 1) : gb();
  430. v.sort(function(a, b) {
  431. return a.size == b.size ? a.id - b.id : a.size - b.size
  432. });
  433. f.save();
  434. f.translate(q / 2, r / 2);
  435. f.scale(k, k);
  436. f.translate(-t, -u);
  437. for (d = 0; d < I.length; d++) I[d].T(f);
  438. for (d = 0; d < v.length; d++) v[d].T(f);
  439. if (ua) {
  440. ea = (3 * ea + sa) / 4;
  441. fa = (3 * fa + ta) / 4;
  442. f.save();
  443. f.strokeStyle = "#FFAAAA";
  444. f.lineWidth = 10;
  445. f.lineCap = "round";
  446. f.lineJoin = "round";
  447. f.globalAlpha = .5;
  448. f.beginPath();
  449. for (d = 0; d < p.length; d++) f.moveTo(p[d].x,
  450. p[d].y), f.lineTo(ea, fa);
  451. f.stroke();
  452. f.restore()
  453. }
  454. f.restore();
  455. x && x.width && f.drawImage(x, q - x.width - 10, 10);
  456. J = Math.max(J, hb());
  457. 0 != J && (null == la && (la = new ma(24, "#FFFFFF")), la.u("Score: " + ~~(J / 100)), c = la.G(), a = c.width, f.globalAlpha = .2, f.fillStyle = "#000000", f.fillRect(10, r - 10 - 24 - 10, a + 10, 34), f.globalAlpha = 1, f.drawImage(c, 15, r - 10 - 24 - 5));
  458. ib();
  459. b = Date.now() - b;
  460. b > 1E3 / 60 ? z -= .01 : b < 1E3 / 65 && (z += .01);.4 > z && (z = .4);
  461. 1 < z && (z = 1)
  462. }
  463.  
  464. function gb() {
  465. f.fillStyle = ka ? "#111111" : "#F2FBFF";
  466. f.fillRect(0, 0, q, r);
  467. f.save();
  468. f.strokeStyle = ka ? "#AAAAAA" : "#000000";
  469. f.globalAlpha = .2;
  470. f.scale(k, k);
  471. for (var a = q / k, b = r / k, c = -.5 + (-t + a / 2) % 50; c < a; c += 50) f.beginPath(), f.moveTo(c, 0), f.lineTo(c, b), f.stroke();
  472. for (c = -.5 + (-u + b / 2) % 50; c < b; c += 50) f.beginPath(), f.moveTo(0, c), f.lineTo(a, c), f.stroke();
  473. f.restore()
  474. }
  475.  
  476. function ib() {
  477. if (Ba && ya.width) {
  478. var a = q / 5;
  479. f.drawImage(ya, 5, 5, a, a)
  480. }
  481. }
  482.  
  483. function hb() {
  484. for (var a = 0, b = 0; b < p.length; b++) a += p[b].n * p[b].n;
  485. return a
  486. }
  487.  
  488. function La() {
  489. x = null;
  490. if (null != y || 0 != B.length)
  491. if (null != y || na) {
  492. x = document.createElement("canvas");
  493. var a = x.getContext("2d"),
  494. b = 60,
  495. b = null == y ? b + 24 * B.length : b + 180,
  496. c = Math.min(200, .3 * q) / 200;
  497. x.width = 200 * c;
  498. x.height = b * c;
  499. a.scale(c, c);
  500. a.globalAlpha = .4;
  501. a.fillStyle = "#000000";
  502. a.fillRect(0, 0, 200, b);
  503. a.globalAlpha = 1;
  504. a.fillStyle = "#FFFFFF";
  505. c = null;
  506. c = "Leaderboard";
  507. a.font = "30px Ubuntu";
  508. a.fillText(c, 100 - a.measureText(c).width / 2, 40);
  509. if (null == y)
  510. for (a.font = "20px Ubuntu", b = 0; b < B.length; ++b) c = B[b].name || "An unnamed cell", na || (c = "An unnamed cell"), -1 != G.indexOf(B[b].id) ? (p[0].name && (c = p[0].name), a.fillStyle = "#FFAAAA") : a.fillStyle = "#FFFFFF", c = b + 1 +
  511. ". " + c, a.fillText(c, 100 - a.measureText(c).width / 2, 70 + 24 * b);
  512. else
  513. for (b = c = 0; b < y.length; ++b) {
  514. var d = c + y[b] * Math.PI * 2;
  515. a.fillStyle = jb[b + 1];
  516. a.beginPath();
  517. a.moveTo(100, 140);
  518. a.arc(100, 140, 80, c, d, !1);
  519. a.fill();
  520. c = d
  521. }
  522. }
  523. }
  524.  
  525. function Na(a, b, c, d, e, l) {
  526. this.id = a;
  527. this.p = this.x = b;
  528. this.q = this.y = c;
  529. this.o = this.size = d;
  530. this.color = e;
  531. this.a = [];
  532. this.l = [];
  533. this.R();
  534. this.Z(l)
  535. }
  536.  
  537. function ma(a, b, c, d) {
  538. a && (this.r = a);
  539. b && (this.N = b);
  540. this.P = !!c;
  541. d && (this.s = d)
  542. }
  543. var aa = g.location.protocol,
  544. $a = "https:" == aa;
  545. if (g.location.ancestorOrigins && g.location.ancestorOrigins.length && "https://apps.facebook.com" != g.location.ancestorOrigins[0]) g.top.location = "http://agar.io/";
  546. else {
  547. var pa, f, C, q, r, O = null,
  548. s = null,
  549. t = 0,
  550. u = 0,
  551. G = [],
  552. p = [],
  553. A = {},
  554. v = [],
  555. I = [],
  556. B = [],
  557. U = 0,
  558. V = 0,
  559. Y = -1,
  560. Z = -1,
  561. fb = 0,
  562. H = 0,
  563. F = null,
  564. ga = 0,
  565. ha = 0,
  566. ia = 1E4,
  567. ja = 1E4,
  568. k = 1,
  569. w = null,
  570. Ra = !0,
  571. na = !0,
  572. za = !1,
  573. va = !1,
  574. J = 0,
  575. ka = !1,
  576. Sa = !1,
  577. Q = t = ~~((ga + ia) / 2),
  578. R = u = ~~((ha + ja) / 2),
  579. S = 1,
  580. P = "",
  581. y = null,
  582. oa = !1,
  583. ua = !1,
  584. sa = 0,
  585. ta = 0,
  586. ea = 0,
  587. fa = 0,
  588. Ta = 0,
  589. jb = ["#333333", "#FF3333", "#33FF33", "#3333FF"],
  590. xa = !1,
  591. ca = !1,
  592. E = 1,
  593. Ba = "ontouchstart" in g && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
  594. ya = new Image;
  595. ya.src = "img/split.png";
  596. var Ua = document.createElement("canvas");
  597. if ("undefined" == typeof console || "undefined" == typeof DataView || "undefined" == typeof WebSocket || null == Ua || null == Ua.getContext || null == g.localStorage) alert("You browser does not support this game, we recommend you to use Firefox to play this");
  598. else {
  599. var $ = null;
  600. g.setNick = function(a) {
  601. Ha();
  602. F = a;
  603. Ma();
  604. J = 0
  605. };
  606. g.setRegion = W;
  607. g.setSkins = function(a) {
  608. Ra = a
  609. };
  610. g.setNames = function(a) {
  611. na = a
  612. };
  613. g.setDarkTheme = function(a) {
  614. ka = a
  615. };
  616. g.setColors = function(a) {
  617. za = a
  618. };
  619. g.setShowMass = function(a) {
  620. Sa = a
  621. };
  622. g.spectate = function() {
  623. F = null;
  624. D(1);
  625. Ha()
  626. };
  627. g.setGameMode = function(a) {
  628. a != P && (P = a, X())
  629. };
  630. g.setAcid = function(a) {
  631. xa = a
  632. };
  633. null != g.localStorage && (null == g.localStorage.AB9 && (g.localStorage.AB9 = 0 + ~~(100 * Math.random())), Ta = +g.localStorage.AB9, g.ABGroup = Ta);
  634. m.get(aa + "//gc.agar.io", function(a) {
  635. var b = a.split(" ");
  636. a = b[0];
  637. b = b[1] || ""; - 1 == ["UA"].indexOf(a) && Va.push("ussr");
  638. "PT" != a && "ES" != a || -1 == g.navigator.userAgent.indexOf("Android") || !g.confirm("We have an Android app on Google Play, would you rather be redirected there?") || (g.location = "https://play.google.com/store/apps/details?id=com.miniclip.agar.io");
  639. T.hasOwnProperty(a) && ("string" == typeof T[a] ? w || W(T[a]) : T[a].hasOwnProperty(b) && (w || W(T[a][b])))
  640. }, "text");
  641. var ba = !1,
  642. Ia = 0;
  643. setTimeout(function() {
  644. ba = !0
  645. }, Math.max(6E4 * Ia, 1E4));
  646. var T = {
  647. AF: "JP-Tokyo",
  648. AX: "EU-London",
  649. AL: "EU-London",
  650. DZ: "EU-London",
  651. AS: "SG-Singapore",
  652. AD: "EU-London",
  653. AO: "EU-London",
  654. AI: "US-Atlanta",
  655. AG: "US-Atlanta",
  656. AR: "BR-Brazil",
  657. AM: "JP-Tokyo",
  658. AW: "US-Atlanta",
  659. AU: "SG-Singapore",
  660. AT: "EU-London",
  661. AZ: "JP-Tokyo",
  662. BS: "US-Atlanta",
  663. BH: "JP-Tokyo",
  664. BD: "JP-Tokyo",
  665. BB: "US-Atlanta",
  666. BY: "EU-London",
  667. BE: "EU-London",
  668. BZ: "US-Atlanta",
  669. BJ: "EU-London",
  670. BM: "US-Atlanta",
  671. BT: "JP-Tokyo",
  672. BO: "BR-Brazil",
  673. BQ: "US-Atlanta",
  674. BA: "EU-London",
  675. BW: "EU-London",
  676. BR: "BR-Brazil",
  677. IO: "JP-Tokyo",
  678. VG: "US-Atlanta",
  679. BN: "JP-Tokyo",
  680. BG: "EU-London",
  681. BF: "EU-London",
  682. BI: "EU-London",
  683. KH: "JP-Tokyo",
  684. CM: "EU-London",
  685. CA: "US-Atlanta",
  686. CV: "EU-London",
  687. KY: "US-Atlanta",
  688. CF: "EU-London",
  689. TD: "EU-London",
  690. CL: "BR-Brazil",
  691. CN: "CN-China",
  692. CX: "JP-Tokyo",
  693. CC: "JP-Tokyo",
  694. CO: "BR-Brazil",
  695. KM: "EU-London",
  696. CD: "EU-London",
  697. CG: "EU-London",
  698. CK: "SG-Singapore",
  699. CR: "US-Atlanta",
  700. CI: "EU-London",
  701. HR: "EU-London",
  702. CU: "US-Atlanta",
  703. CW: "US-Atlanta",
  704. CY: "JP-Tokyo",
  705. CZ: "EU-London",
  706. DK: "EU-London",
  707. DJ: "EU-London",
  708. DM: "US-Atlanta",
  709. DO: "US-Atlanta",
  710. EC: "BR-Brazil",
  711. EG: "EU-London",
  712. SV: "US-Atlanta",
  713. GQ: "EU-London",
  714. ER: "EU-London",
  715. EE: "EU-London",
  716. ET: "EU-London",
  717. FO: "EU-London",
  718. FK: "BR-Brazil",
  719. FJ: "SG-Singapore",
  720. FI: "EU-London",
  721. FR: "EU-London",
  722. GF: "BR-Brazil",
  723. PF: "SG-Singapore",
  724. GA: "EU-London",
  725. GM: "EU-London",
  726. GE: "JP-Tokyo",
  727. DE: "EU-London",
  728. GH: "EU-London",
  729. GI: "EU-London",
  730. GR: "EU-London",
  731. GL: "US-Atlanta",
  732. GD: "US-Atlanta",
  733. GP: "US-Atlanta",
  734. GU: "SG-Singapore",
  735. GT: "US-Atlanta",
  736. GG: "EU-London",
  737. GN: "EU-London",
  738. GW: "EU-London",
  739. GY: "BR-Brazil",
  740. HT: "US-Atlanta",
  741. VA: "EU-London",
  742. HN: "US-Atlanta",
  743. HK: "JP-Tokyo",
  744. HU: "EU-London",
  745. IS: "EU-London",
  746. IN: "JP-Tokyo",
  747. ID: "JP-Tokyo",
  748. IR: "JP-Tokyo",
  749. IQ: "JP-Tokyo",
  750. IE: "EU-London",
  751. IM: "EU-London",
  752. IL: "JP-Tokyo",
  753. IT: "EU-London",
  754. JM: "US-Atlanta",
  755. JP: "JP-Tokyo",
  756. JE: "EU-London",
  757. JO: "JP-Tokyo",
  758. KZ: "JP-Tokyo",
  759. KE: "EU-London",
  760. KI: "SG-Singapore",
  761. KP: "JP-Tokyo",
  762. KR: "JP-Tokyo",
  763. KW: "JP-Tokyo",
  764. KG: "JP-Tokyo",
  765. LA: "JP-Tokyo",
  766. LV: "EU-London",
  767. LB: "JP-Tokyo",
  768. LS: "EU-London",
  769. LR: "EU-London",
  770. LY: "EU-London",
  771. LI: "EU-London",
  772. LT: "EU-London",
  773. LU: "EU-London",
  774. MO: "JP-Tokyo",
  775. MK: "EU-London",
  776. MG: "EU-London",
  777. MW: "EU-London",
  778. MY: "JP-Tokyo",
  779. MV: "JP-Tokyo",
  780. ML: "EU-London",
  781. MT: "EU-London",
  782. MH: "SG-Singapore",
  783. MQ: "US-Atlanta",
  784. MR: "EU-London",
  785. MU: "EU-London",
  786. YT: "EU-London",
  787. MX: "US-Atlanta",
  788. FM: "SG-Singapore",
  789. MD: "EU-London",
  790. MC: "EU-London",
  791. MN: "JP-Tokyo",
  792. ME: "EU-London",
  793. MS: "US-Atlanta",
  794. MA: "EU-London",
  795. MZ: "EU-London",
  796. MM: "JP-Tokyo",
  797. NA: "EU-London",
  798. NR: "SG-Singapore",
  799. NP: "JP-Tokyo",
  800. NL: "EU-London",
  801. NC: "SG-Singapore",
  802. NZ: "SG-Singapore",
  803. NI: "US-Atlanta",
  804. NE: "EU-London",
  805. NG: "EU-London",
  806. NU: "SG-Singapore",
  807. NF: "SG-Singapore",
  808. MP: "SG-Singapore",
  809. NO: "EU-London",
  810. OM: "JP-Tokyo",
  811. PK: "JP-Tokyo",
  812. PW: "SG-Singapore",
  813. PS: "JP-Tokyo",
  814. PA: "US-Atlanta",
  815. PG: "SG-Singapore",
  816. PY: "BR-Brazil",
  817. PE: "BR-Brazil",
  818. PH: "JP-Tokyo",
  819. PN: "SG-Singapore",
  820. PL: "EU-London",
  821. PT: "EU-London",
  822. PR: "US-Atlanta",
  823. QA: "JP-Tokyo",
  824. RE: "EU-London",
  825. RO: "EU-London",
  826. RU: "RU-Russia",
  827. RW: "EU-London",
  828. BL: "US-Atlanta",
  829. SH: "EU-London",
  830. KN: "US-Atlanta",
  831. LC: "US-Atlanta",
  832. MF: "US-Atlanta",
  833. PM: "US-Atlanta",
  834. VC: "US-Atlanta",
  835. WS: "SG-Singapore",
  836. SM: "EU-London",
  837. ST: "EU-London",
  838. SA: "EU-London",
  839. SN: "EU-London",
  840. RS: "EU-London",
  841. SC: "EU-London",
  842. SL: "EU-London",
  843. SG: "JP-Tokyo",
  844. SX: "US-Atlanta",
  845. SK: "EU-London",
  846. SI: "EU-London",
  847. SB: "SG-Singapore",
  848. SO: "EU-London",
  849. ZA: "EU-London",
  850. SS: "EU-London",
  851. ES: "EU-London",
  852. LK: "JP-Tokyo",
  853. SD: "EU-London",
  854. SR: "BR-Brazil",
  855. SJ: "EU-London",
  856. SZ: "EU-London",
  857. SE: "EU-London",
  858. CH: "EU-London",
  859. SY: "EU-London",
  860. TW: "JP-Tokyo",
  861. TJ: "JP-Tokyo",
  862. TZ: "EU-London",
  863. TH: "JP-Tokyo",
  864. TL: "JP-Tokyo",
  865. TG: "EU-London",
  866. TK: "SG-Singapore",
  867. TO: "SG-Singapore",
  868. TT: "US-Atlanta",
  869. TN: "EU-London",
  870. TR: "TK-Turkey",
  871. TM: "JP-Tokyo",
  872. TC: "US-Atlanta",
  873. TV: "SG-Singapore",
  874. UG: "EU-London",
  875. UA: "EU-London",
  876. AE: "EU-London",
  877. GB: "EU-London",
  878. US: {
  879. AL: "US-Atlanta",
  880. AK: "US-Fremont",
  881. AZ: "US-Fremont",
  882. AR: "US-Atlanta",
  883. CA: "US-Fremont",
  884. CO: "US-Fremont",
  885. CT: "US-Atlanta",
  886. DE: "US-Atlanta",
  887. FL: "US-Atlanta",
  888. GA: "US-Atlanta",
  889. HI: "US-Fremont",
  890. ID: "US-Fremont",
  891. IL: "US-Atlanta",
  892. IN: "US-Atlanta",
  893. IA: "US-Atlanta",
  894. KS: "US-Atlanta",
  895. KY: "US-Atlanta",
  896. LA: "US-Atlanta",
  897. ME: "US-Atlanta",
  898. MD: "US-Atlanta",
  899. MA: "US-Atlanta",
  900. MI: "US-Atlanta",
  901. MN: "US-Fremont",
  902. MS: "US-Atlanta",
  903. MO: "US-Atlanta",
  904. MT: "US-Fremont",
  905. NE: "US-Fremont",
  906. NV: "US-Fremont",
  907. NH: "US-Atlanta",
  908. NJ: "US-Atlanta",
  909. NM: "US-Fremont",
  910. NY: "US-Atlanta",
  911. NC: "US-Atlanta",
  912. ND: "US-Fremont",
  913. OH: "US-Atlanta",
  914. OK: "US-Atlanta",
  915. OR: "US-Fremont",
  916. PA: "US-Atlanta",
  917. RI: "US-Atlanta",
  918. SC: "US-Atlanta",
  919. SD: "US-Fremont",
  920. TN: "US-Atlanta",
  921. TX: "US-Atlanta",
  922. UT: "US-Fremont",
  923. VT: "US-Atlanta",
  924. VA: "US-Atlanta",
  925. WA: "US-Fremont",
  926. WV: "US-Atlanta",
  927. WI: "US-Atlanta",
  928. WY: "US-Fremont",
  929. DC: "US-Atlanta",
  930. AS: "US-Atlanta",
  931. GU: "US-Atlanta",
  932. MP: "US-Atlanta",
  933. PR: "US-Atlanta",
  934. UM: "US-Atlanta",
  935. VI: "US-Atlanta"
  936. },
  937. UM: "SG-Singapore",
  938. VI: "US-Atlanta",
  939. UY: "BR-Brazil",
  940. UZ: "JP-Tokyo",
  941. VU: "SG-Singapore",
  942. VE: "BR-Brazil",
  943. VN: "JP-Tokyo",
  944. WF: "SG-Singapore",
  945. EH: "EU-London",
  946. YE: "JP-Tokyo",
  947. ZM: "EU-London",
  948. ZW: "EU-London"
  949. };
  950. g.connect = Ka;
  951. var da = 500,
  952. Oa = -1,
  953. Pa = -1,
  954. x = null,
  955. z = 1,
  956. la = null,
  957. M = {},
  958. Va = "poland;usa;china;russia;canada;australia;spain;brazil;germany;ukraine;france;sweden;chaplin;north korea;south korea;japan;united kingdom;earth;greece;latvia;lithuania;estonia;finland;norway;cia;maldivas;austria;nigeria;reddit;yaranaika;confederate;9gag;indiana;4chan;italy;bulgaria;tumblr;2ch.hk;hong kong;portugal;jamaica;german empire;mexico;sanik;switzerland;croatia;chile;indonesia;bangladesh;thailand;iran;iraq;peru;moon;botswana;bosnia;netherlands;european union;taiwan;pakistan;hungary;satanist;qing dynasty;matriarchy;patriarchy;feminism;ireland;texas;facepunch;prodota;cambodia;steam;piccolo;ea;india;kc;denmark;quebec;ayy lmao;sealand;bait;tsarist russia;origin;vinesauce;stalin;belgium;luxembourg;stussy;prussia;8ch;argentina;scotland;sir;romania;belarus;wojak;doge;nasa;byzantium;imperial japan;french kingdom;somalia;turkey;mars;pokerface;8;irs;receita federal;facebook".split(";"),
  959. kb = ["8", "nasa"],
  960. lb = ["m'blob"];
  961. Na.prototype = {
  962. id: 0,
  963. a: null,
  964. l: null,
  965. name: null,
  966. k: null,
  967. J: null,
  968. x: 0,
  969. y: 0,
  970. size: 0,
  971. p: 0,
  972. q: 0,
  973. o: 0,
  974. D: 0,
  975. F: 0,
  976. n: 0,
  977. W: 0,
  978. L: 0,
  979. ja: 0,
  980. ba: 0,
  981. A: !1,
  982. d: !1,
  983. j: !1,
  984. M: !0,
  985. S: function() {
  986. var a;
  987. for (a = 0; a < v.length; a++)
  988. if (v[a] == this) {
  989. v.splice(a, 1);
  990. break
  991. }
  992. delete A[this.id];
  993. a = p.indexOf(this); - 1 != a && (va = !0, p.splice(a, 1));
  994. a = G.indexOf(this.id); - 1 != a && G.splice(a, 1);
  995. this.A = !0;
  996. I.push(this)
  997. },
  998. h: function() {
  999. return Math.max(~~(.3 * this.size), 24)
  1000. },
  1001. Z: function(a) {
  1002. if (this.name = a) null == this.k ? this.k = new ma(this.h(), "#FFFFFF", !0, "#000000") : this.k.H(this.h()), this.k.u(this.name)
  1003. },
  1004. R: function() {
  1005. for (var a = this.C(); this.a.length > a;) {
  1006. var b = ~~(Math.random() * this.a.length);
  1007. this.a.splice(b, 1);
  1008. this.l.splice(b, 1)
  1009. }
  1010. 0 == this.a.length && 0 < a && (this.a.push({
  1011. Q: this,
  1012. e: this.size,
  1013. x: this.x,
  1014. y: this.y
  1015. }), this.l.push(Math.random() - .5));
  1016. for (; this.a.length < a;) {
  1017. var b = ~~(Math.random() * this.a.length),
  1018. c = this.a[b];
  1019. this.a.splice(b, 0, {
  1020. Q: this,
  1021. e: c.e,
  1022. x: c.x,
  1023. y: c.y
  1024. });
  1025. this.l.splice(b, 0, this.l[b])
  1026. }
  1027. },
  1028. C: function() {
  1029. if (0 == this.id) return 16;
  1030. var a = 10;
  1031. 20 > this.size && (a = 0);
  1032. this.d && (a = 30);
  1033. var b = this.size;
  1034. this.d || (b *= k);
  1035. b *= z;
  1036. this.W & 32 && (b *= .25);
  1037. return ~~Math.max(b, a)
  1038. },
  1039. ha: function() {
  1040. this.R();
  1041. for (var a = this.a, b = this.l, c = a.length, d = 0; d < c; ++d) {
  1042. var e = b[(d - 1 + c) % c],
  1043. l = b[(d + 1) % c];
  1044. b[d] += (Math.random() - .5) * (this.j ? 3 : 1);
  1045. b[d] *= .7;
  1046. 10 < b[d] && (b[d] = 10); - 10 > b[d] && (b[d] = -10);
  1047. b[d] = (e + l + 8 * b[d]) / 10
  1048. }
  1049. for (var h = this, g = this.d ? 0 : (this.id / 1E3 + H / 1E4) % (2 * Math.PI), d = 0; d < c; ++d) {
  1050. var f = a[d].e,
  1051. e = a[(d - 1 + c) % c].e,
  1052. l = a[(d + 1) % c].e;
  1053. if (15 < this.size && null != O && 20 < this.size * k && 0 != this.id) {
  1054. var m = !1,
  1055. p = a[d].x,
  1056. q = a[d].y;
  1057. O.ia(p -
  1058. 5, q - 5, 10, 10,
  1059. function(a) {
  1060. a.Q != h && 25 > (p - a.x) * (p - a.x) + (q - a.y) * (q - a.y) && (m = !0)
  1061. });
  1062. !m && (a[d].x < ga || a[d].y < ha || a[d].x > ia || a[d].y > ja) && (m = !0);
  1063. m && (0 < b[d] && (b[d] = 0), b[d] -= 1)
  1064. }
  1065. f += b[d];
  1066. 0 > f && (f = 0);
  1067. f = this.j ? (19 * f + this.size) / 20 : (12 * f + this.size) / 13;
  1068. a[d].e = (e + l + 8 * f) / 10;
  1069. e = 2 * Math.PI / c;
  1070. l = this.a[d].e;
  1071. this.d && 0 == d % 2 && (l += 5);
  1072. a[d].x = this.x + Math.cos(e * d + g) * l;
  1073. a[d].y = this.y + Math.sin(e * d + g) * l
  1074. }
  1075. },
  1076. K: function() {
  1077. if (0 == this.id) return 1;
  1078. var a;
  1079. a = (H - this.L) / 120;
  1080. a = 0 > a ? 0 : 1 < a ? 1 : a;
  1081. var b = 0 > a ? 0 : 1 < a ? 1 : a;
  1082. this.h();
  1083. if (this.A && 1 <= b) {
  1084. var c = I.indexOf(this); - 1 != c && I.splice(c, 1)
  1085. }
  1086. this.x = a * (this.D - this.p) + this.p;
  1087. this.y = a * (this.F - this.q) + this.q;
  1088. this.size = b * (this.n - this.o) + this.o;
  1089. return b
  1090. },
  1091. I: function() {
  1092. return 0 == this.id ? !0 : this.x + this.size + 40 < t - q / 2 / k || this.y + this.size + 40 < u - r / 2 / k || this.x - this.size - 40 > t + q / 2 / k || this.y - this.size - 40 > u + r / 2 / k ? !1 : !0
  1093. },
  1094. T: function(a) {
  1095. if (this.I()) {
  1096. var b = 0 != this.id && !this.d && !this.j && .4 > k;
  1097. 5 > this.C() && (b = !0);
  1098. if (this.M && !b)
  1099. for (var c = 0; c < this.a.length; c++) this.a[c].e = this.size;
  1100. this.M = b;
  1101. a.save();
  1102. this.ba = H;
  1103. c = this.K();
  1104. this.A && (a.globalAlpha *= 1 - c);
  1105. a.lineWidth = 10;
  1106. a.lineCap = "round";
  1107. a.lineJoin = this.d ? "miter" : "round";
  1108. za ? (a.fillStyle = "#FFFFFF", a.strokeStyle = "#AAAAAA") : (a.fillStyle = this.color, a.strokeStyle = this.color);
  1109. if (b) a.beginPath(), a.arc(this.x, this.y, this.size + 5, 0, 2 * Math.PI, !1);
  1110. else {
  1111. this.ha();
  1112. a.beginPath();
  1113. var d = this.C();
  1114. a.moveTo(this.a[0].x, this.a[0].y);
  1115. for (c = 1; c <= d; ++c) {
  1116. var e = c % d;
  1117. a.lineTo(this.a[e].x, this.a[e].y)
  1118. }
  1119. }
  1120. a.closePath();
  1121. d = this.name.toLowerCase();
  1122. !this.j && Ra && ":teams" != P ? -1 != Va.indexOf(d) ? (M.hasOwnProperty(d) || (M[d] = new Image, M[d].src = "skins/" + d + ".png"), c = 0 != M[d].width && M[d].complete ? M[d] : null) : c = null : c = null;
  1123. c = (e = c) ? -1 != lb.indexOf(d) : !1;
  1124. b || a.stroke();
  1125. a.fill();
  1126. null == e || c || (a.save(), a.clip(), a.drawImage(e, this.x - this.size, this.y - this.size, 2 * this.size, 2 * this.size), a.restore());
  1127. (za || 15 < this.size) && !b && (a.strokeStyle = "#000000", a.globalAlpha *= .1, a.stroke());
  1128. a.globalAlpha = 1;
  1129. null != e && c && a.drawImage(e, this.x - 2 * this.size, this.y - 2 * this.size, 4 * this.size, 4 * this.size);
  1130. c = -1 != p.indexOf(this);
  1131. if (0 != this.id) {
  1132. b = ~~this.y;
  1133. if ((na || c) && this.name && this.k && (null == e || -1 == kb.indexOf(d))) {
  1134. e = this.k;
  1135. e.u(this.name);
  1136. e.H(this.h());
  1137. d = Math.ceil(10 * k) / 10;
  1138. e.$(d);
  1139. var e = e.G(),
  1140. l = ~~(e.width / d),
  1141. h = ~~(e.height / d);
  1142. a.drawImage(e, ~~this.x - ~~(l / 2), b - ~~(h / 2), l, h);
  1143. b += e.height / 2 / d + 4
  1144. }
  1145. Sa && (c || 0 == p.length && (!this.d || this.j) && 20 < this.size) && (null == this.J && (this.J = new ma(this.h() / 2, "#FFFFFF", !0, "#000000")), c = this.J, c.H(this.h() / 2), c.u(~~(this.size * this.size / 100)), d = Math.ceil(10 * k) / 10, c.$(d), e = c.G(), l = ~~(e.width / d), h = ~~(e.height / d), a.drawImage(e, ~~this.x - ~~(l / 2), b - ~~(h / 2),
  1146. l, h))
  1147. }
  1148. a.restore()
  1149. }
  1150. }
  1151. };
  1152. ma.prototype = {
  1153. w: "",
  1154. N: "#000000",
  1155. P: !1,
  1156. s: "#000000",
  1157. r: 16,
  1158. m: null,
  1159. O: null,
  1160. g: !1,
  1161. v: 1,
  1162. H: function(a) {
  1163. this.r != a && (this.r = a, this.g = !0)
  1164. },
  1165. $: function(a) {
  1166. this.v != a && (this.v = a, this.g = !0)
  1167. },
  1168. setStrokeColor: function(a) {
  1169. this.s != a && (this.s = a, this.g = !0)
  1170. },
  1171. u: function(a) {
  1172. a != this.w && (this.w = a, this.g = !0)
  1173. },
  1174. G: function() {
  1175. null == this.m && (this.m = document.createElement("canvas"), this.O = this.m.getContext("2d"));
  1176. if (this.g) {
  1177. this.g = !1;
  1178. var a = this.m,
  1179. b = this.O,
  1180. c = this.w,
  1181. d = this.v,
  1182. e = this.r,
  1183. l = e + "px Ubuntu";
  1184. b.font = l;
  1185. var h = ~~(.2 * e);
  1186. a.width = (b.measureText(c).width + 6) * d;
  1187. a.height = (e + h) * d;
  1188. b.font = l;
  1189. b.scale(d, d);
  1190. b.globalAlpha = 1;
  1191. b.lineWidth = 3;
  1192. b.strokeStyle = this.s;
  1193. b.fillStyle = this.N;
  1194. this.P && b.strokeText(c, 3, e - h / 2);
  1195. b.fillText(c, 3, e - h / 2)
  1196. }
  1197. return this.m
  1198. }
  1199. };
  1200. Date.now || (Date.now = function() {
  1201. return (new Date).getTime()
  1202. });
  1203. var Ya = {
  1204. ca: function(a) {
  1205. function b(a, b, c, d, e) {
  1206. this.x = a;
  1207. this.y = b;
  1208. this.f = c;
  1209. this.c = d;
  1210. this.depth = e;
  1211. this.items = [];
  1212. this.b = []
  1213. }
  1214. var c = a.da || 2,
  1215. d = a.ea || 4;
  1216. b.prototype = {
  1217. x: 0,
  1218. y: 0,
  1219. f: 0,
  1220. c: 0,
  1221. depth: 0,
  1222. items: null,
  1223. b: null,
  1224. B: function(a) {
  1225. for (var b = 0; b < this.items.length; ++b) {
  1226. var c = this.items[b];
  1227. if (c.x >= a.x && c.y >= a.y && c.x < a.x + a.f && c.y < a.y + a.c) return !0
  1228. }
  1229. if (0 != this.b.length) {
  1230. var d = this;
  1231. return this.V(a, function(b) {
  1232. return d.b[b].B(a)
  1233. })
  1234. }
  1235. return !1
  1236. },
  1237. t: function(a, b) {
  1238. for (var c = 0; c < this.items.length; ++c) b(this.items[c]);
  1239. if (0 != this.b.length) {
  1240. var d = this;
  1241. this.V(a, function(c) {
  1242. d.b[c].t(a, b)
  1243. })
  1244. }
  1245. },
  1246. i: function(a) {
  1247. 0 != this.b.length ? this.b[this.U(a)].i(a) : this.items.length >= c && this.depth < d ? (this.aa(), this.b[this.U(a)].i(a)) : this.items.push(a)
  1248. },
  1249. U: function(a) {
  1250. return a.x < this.x +
  1251. this.f / 2 ? a.y < this.y + this.c / 2 ? 0 : 2 : a.y < this.y + this.c / 2 ? 1 : 3
  1252. },
  1253. V: function(a, b) {
  1254. return a.x < this.x + this.f / 2 && (a.y < this.y + this.c / 2 && b(0) || a.y >= this.y + this.c / 2 && b(2)) || a.x >= this.x + this.f / 2 && (a.y < this.y + this.c / 2 && b(1) || a.y >= this.y + this.c / 2 && b(3)) ? !0 : !1
  1255. },
  1256. aa: function() {
  1257. var a = this.depth + 1,
  1258. c = this.f / 2,
  1259. d = this.c / 2;
  1260. this.b.push(new b(this.x, this.y, c, d, a));
  1261. this.b.push(new b(this.x + c, this.y, c, d, a));
  1262. this.b.push(new b(this.x, this.y + d, c, d, a));
  1263. this.b.push(new b(this.x + c, this.y + d, c, d, a));
  1264. a = this.items;
  1265. this.items = [];
  1266. for (c = 0; c < a.length; c++) this.i(a[c])
  1267. },
  1268. clear: function() {
  1269. for (var a = 0; a < this.b.length; a++) this.b[a].clear();
  1270. this.items.length = 0;
  1271. this.b.length = 0
  1272. }
  1273. };
  1274. var e = {
  1275. x: 0,
  1276. y: 0,
  1277. f: 0,
  1278. c: 0
  1279. };
  1280. return {
  1281. root: new b(a.X, a.Y, a.fa - a.X, a.ga - a.Y, 0),
  1282. i: function(a) {
  1283. this.root.i(a)
  1284. },
  1285. t: function(a, b) {
  1286. this.root.t(a, b)
  1287. },
  1288. ia: function(a, b, c, d, f) {
  1289. e.x = a;
  1290. e.y = b;
  1291. e.f = c;
  1292. e.c = d;
  1293. this.root.t(e, f)
  1294. },
  1295. B: function(a) {
  1296. return this.root.B(a)
  1297. },
  1298. clear: function() {
  1299. this.root.clear()
  1300. }
  1301. }
  1302. }
  1303. };
  1304. g.onload = Wa
  1305. }
  1306. }
  1307. })(window, window.jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement