wormate.io zoom hack - zoom on mousewheel

zoom

  1. // ==UserScript==
  2. // @name wormate.io zoom hack - zoom on mousewheel
  3. // @version 0.0.1
  4. // @namespace example@dindog.com
  5. // @include https://wormate.io*
  6. // @run-at document-start
  7. // @description zoom
  8. // ==/UserScript==
  9.  
  10.  
  11. window.addEventListener('beforescriptexecute', function(e) {
  12.  
  13. ///for external script:
  14. src = e.target.src;
  15. if (src.search(/game\.js/) != -1) {
  16. e.preventDefault();
  17. e.stopPropagation();
  18. append(NewScript1);
  19. window.removeEventListener(e.type, arguments.callee, true);
  20. };
  21.  
  22. }, true);
  23.  
  24.  
  25.  
  26. ////// append with new block function:
  27. function append(s) {
  28. document.head.appendChild(document.createElement('script'))
  29. .innerHTML = s.toString().replace(/^function.*{|}$/g, '');
  30. }
  31.  
  32. ////////////////////////////////////////////////
  33. function NewScript1(){
  34. /* insert new block here, like: */
  35. "use strict";
  36. var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
  37. return typeof t
  38. } : function(t) {
  39. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  40. },
  41. GoogleAuth;
  42. ! function() {
  43. try {
  44. console.log(function(t, e) {
  45. for (var i = 0; i < e.length; i += 2) t = t.replaceAll(e[i], e[i + 1]);
  46. return t
  47. }("N-syo.632.oyhs`2./oSo+-2:dhydMdy/32/o+`3:o/62`/o+. .+osYYyso+-.osyQSs6662NyW.63 yW:`+QQ+ -Ms-.:ymmy3+Yo``+Y:6.Qs-+WWhYs:sHhyyHys/6662NoWs63 yW:+Ss:.-+Ss:`M-3.M` .YyySYys32`QSs.2``-Hh-32sH-66 `..3 `..`3N.Wh.63yW-Ss.3`Ss+`Mh/:+hmmo2/yy++yys//Y-3 oS/`Sso`3 ohy6oH.3..6 -Hh. -+Qs/ N /W+62`Wo:Ss32Sso.MMmd+.3syy` .-` :Y+3+Ss//Q+3 +H`32sHhsyHho6-Hh`:S+--+S+N2+W` `+y+2+W.:Ss.3.Ss+/M-:ymmh.2-Y.32+Ys2+Ss+o+/Q-3oH/32Hho-://:`6 Hh`So3`SsN3oHhs-sHhsoW/ `Sso:-:Q.hM-2ymmh. /Yo`3 sYy./Q`3+Sso2`W`3`Hh.66`Hh:So3-SoN3 +Why+yWh/3-oQSso-`Mm:2/Md+/Yy+3 oYy:Q/3 `Q. -W-3`WsYys/`+oo.:Hh//So//Ss-N32-sys:3:S+.6-/+++:-3oHo3 ohdh/`+So:3 .+S/`/oo:6.+s+` `+yyo`3 +yQYs: +oo..shy. -+oSo/. NN", ["W", "hhhh", "Q", "ssss", "M", "mmm", "Y", "yyy", "H", "hh", "S", "ss", "6", " ", "3", " ", "2", " ", "N", "\n"]))
  48. } catch (t) {}
  49. }(), window.addEventListener("load", function() {
  50. function isBrowserCompatible() {
  51. return function(t, e, i) {
  52. function o(t, e) {
  53. return (void 0 === t ? "undefined" : _typeof(t)) === e
  54. }
  55.  
  56. function n() {
  57. return "function" != typeof e.createElement ? e.createElement(arguments[0]) : u ? e.createElementNS.call(e, "http://www.w3.org/2000/svg", arguments[0]) : e.createElement.apply(e, arguments)
  58. }
  59. var r = [],
  60. s = [],
  61. a = {
  62. _version: "3.3.1",
  63. _config: {
  64. classPrefix: "",
  65. enableClasses: !0,
  66. enableJSClass: !0,
  67. usePrefixes: !0
  68. },
  69. _q: [],
  70. on: function(t, e) {
  71. var i = this;
  72. setTimeout(function() {
  73. e(i[t])
  74. }, 0)
  75. },
  76. addTest: function(t, e, i) {
  77. s.push({
  78. name: t,
  79. fn: e,
  80. options: i
  81. })
  82. },
  83. addAsyncTest: function(t) {
  84. s.push({
  85. name: null,
  86. fn: t
  87. })
  88. }
  89. },
  90. h = function() {};
  91. h.prototype = a, h = new h;
  92. var l = !1;
  93. try {
  94. l = "WebSocket" in t && 2 === t.WebSocket.CLOSING
  95. } catch (t) {}
  96. h.addTest("websockets", l);
  97. var p = e.documentElement,
  98. u = "svg" === p.nodeName.toLowerCase();
  99. h.addTest("canvas", function() {
  100. var t = n("canvas");
  101. return !(!t.getContext || !t.getContext("2d"))
  102. }), h.addTest("canvastext", function() {
  103. return !1 !== h.canvas && "function" == typeof n("canvas").getContext("2d").fillText
  104. }),
  105. function() {
  106. var t, e, i, n, a, l, p;
  107. for (var u in s)
  108. if (s.hasOwnProperty(u)) {
  109. if (t = [], e = s[u], e.name && (t.push(e.name.toLowerCase()), e.options && e.options.aliases && e.options.aliases.length))
  110. for (i = 0; i < e.options.aliases.length; i++) t.push(e.options.aliases[i].toLowerCase());
  111. for (n = o(e.fn, "function") ? e.fn() : e.fn, a = 0; a < t.length; a++) l = t[a], p = l.split("."), 1 === p.length ? h[p[0]] = n : (!h[p[0]] || h[p[0]] instanceof Boolean || (h[p[0]] = new Boolean(h[p[0]])), h[p[0]][p[1]] = n), r.push((n ? "" : "no-") + p.join("-"))
  112. }
  113. }(),
  114. function(t) {
  115. var e = p.className,
  116. i = h._config.classPrefix || "";
  117. if (u && (e = e.baseVal), h._config.enableJSClass) {
  118. var o = new RegExp("(^|\\s)" + i + "no-js(\\s|$)");
  119. e = e.replace(o, "$1" + i + "js$2")
  120. }
  121. h._config.enableClasses && (e += " " + i + t.join(" " + i), u ? p.className.baseVal = e : p.className = e)
  122. }(r), delete a.addTest, delete a.addAsyncTest;
  123. for (var c = 0; c < h._q.length; c++) h._q[c]();
  124. t.Modernizr = h
  125. }(window, document), Modernizr.websockets && Modernizr.canvas && Modernizr.canvastext
  126. }
  127. if (document.getElementById("game-wrap").style.display = "block", !isBrowserCompatible()) return void(document.getElementById("error-view").style.display = "block");
  128. ! function() {
  129. function getApp() {
  130. return _anApp
  131. }
  132.  
  133. function i18n(t) {
  134. return window.I18N_MESSAGES[t]
  135. }
  136.  
  137. function i18nCustomBundle(t) {
  138. return t[LANG] ? t[LANG] : t.en ? t.en : t.x
  139. }
  140.  
  141. function timeSecsToIntervalText(t) {
  142. var e = (Math.floor(t) % 60).toString(),
  143. i = (Math.floor(t / 60) % 60).toString(),
  144. o = (Math.floor(t / 3600) % 24).toString(),
  145. n = Math.floor(t / 86400).toString(),
  146. r = i18n("util.time.days"),
  147. s = i18n("util.time.hours"),
  148. a = i18n("util.time.min"),
  149. h = i18n("util.time.sec");
  150. return n > 0 ? n + " " + r + " " + o + " " + s + " " + i + " " + a + " " + e + " " + h : o > 0 ? o + " " + s + " " + i + " " + a + " " + e + " " + h : i > 0 ? i + " " + a + " " + e + " " + h : e + " " + h
  151. }
  152.  
  153. function convertI18nStringToHTML(t) {
  154. return t.includes("href") ? t.replaceAll("href", 'target="_black" href') : t
  155. }
  156.  
  157. function loadScript(t, e, i) {
  158. var o = document.createElement("script"),
  159. n = !0;
  160. e && (o.id = e), o.async = "async", o.type = "text/javascript", o.src = t, i && (o.onload = o.onreadystatechange = function() {
  161. n = !1;
  162. try {
  163. i()
  164. } catch (t) {
  165. console.log(t)
  166. }
  167. o.onload = o.onreadystatechange = null
  168. }), (document.head || document.getElementsByTagName("head")[0]).appendChild(o)
  169. }
  170.  
  171. function extend(t, e) {
  172. var i = e;
  173. return i.prototype = Object.create(t.prototype), i.prototype.constructor = i, i.parent = t, i
  174. }
  175.  
  176. function normDir(t) {
  177. return t %= _2PI, t < 0 ? t + _2PI : t
  178. }
  179.  
  180. function minmax(t, e, i) {
  181. return clamp(i, t, e)
  182. }
  183.  
  184. function clamp(t, e, i) {
  185. return t > i ? i : t < e ? e : Number.isFinite(t) ? t : .5 * (e + i)
  186. }
  187.  
  188. function timeDeltaIncrement(t, e, i, o) {
  189. return e > t ? Math.min(e, t + i * o) : Math.max(e, t - i * o)
  190. }
  191.  
  192. function linearApproach(t, e, i, o, n) {
  193. return e + (t - e) * Math.pow(1 - o, i / n)
  194. }
  195.  
  196. function lerp(t, e, i) {
  197. return t * (1 - i) + e * i
  198. }
  199.  
  200. function arraycopy(t, e, i, o) {
  201. var n = i,
  202. r = e,
  203. s = e + o;
  204. if (null == t) throw new TypeError("this is null or not defined");
  205. var a = t.length >>> 0,
  206. h = n >> 0,
  207. l = h < 0 ? Math.max( a + h, 0) : Math.min(h, a),
  208. p = r >> 0,
  209. u = p < 0 ? Math.max( a + p, 0) : Math.min(p, a),
  210. c = void 0 === s ? a : s >> 0,
  211. f = c < 0 ? Math.max( a + c, 0) : Math.min(c, a),
  212. d = Math.min(f - u, a - l),
  213. g = 1;
  214. for (u < l && l < u + d && (g = -1, u += d - 1, l += d - 1); d > 0;) u in t ? t[l] = t[u] : delete t[l], u += g, l += g, d--;
  215. return t
  216. }
  217.  
  218. function init2DContext(t) {
  219. return t.getContext("2d")
  220. }
  221.  
  222. function pixijs_removeFromParent(t) {
  223. null != t.parent && t.parent.removeChild(t)
  224. }
  225.  
  226. function randomRange(t, e) {
  227. return t + (e - t) * Math.random()
  228. }
  229.  
  230. function any(t) {
  231. return t[parseInt(Math.random() * t.length)]
  232. }
  233.  
  234. function randStr() {
  235. return Math.random().toString(36).substring(2, 15)
  236. }
  237.  
  238. function convertHSLtoRGB(t, e, i) {
  239. var o = (1 - Math.abs(2 * i - 1)) * e,
  240. n = o * (1 - Math.abs(t / 60 % 2 - 1)),
  241. r = i - o / 2;
  242. return 0 <= t && t < 60 ? [r + o, r + n, r + 0] : 60 <= t && t < 120 ? [r + n, r + o, r + 0] : 120 <= t && t < 180 ? [r + 0, r + o, r + n] : 180 <= t && t < 240 ? [r + 0, r + n, r + o] : 240 <= t && t < 300 ? [r + n, r + 0, r + o] : [r + o, r + 0, r + n]
  243. }
  244.  
  245. function ADINPLAY_PREROLL_PLAYER() {
  246. function t() {
  247. $("#adbl-1").text(i18n("index.game.antiadblocker.msg1")), $("#adbl-2").text(i18n("index.game.antiadblocker.msg2")), $("#adbl-3").text(i18n("index.game.antiadblocker.msg3")), $("#adbl-4").text(i18n("index.game.antiadblocker.msg4").replace("{0}", 10)), $("#adbl-continue span").text(i18n("index.game.antiadblocker.continue")), $("#adbl-continue").hide(), $("#" + n).fadeIn(500);
  248. for (var t = 10, e = 0; e < 10; e++) setTimeout(function() {
  249. if (t--, $("#adbl-4").text(i18n("index.game.antiadblocker.msg4").replace("{0}", t)), 0 === t) {
  250. console.log("aipAABC");
  251. try {
  252. ga("send", "event", "antiadblocker", window.runtimeHash + "_complete")
  253. } catch (t) {}
  254. $("#adbl-continue").fadeIn(200)
  255. }
  256. }, 1e3 * (e + 1))
  257. }
  258. var e = !1,
  259. i = function() {},
  260. o = {},
  261. n = "JDHnkHtYwyXyVgG9";
  262. return $("#adbl-continue").click(function() {
  263. $("#" + n).fadeOut(500), i(!1)
  264. }), o.a = function(t) {
  265. if (i = t, !e) try {
  266. aiptag.cmd.player.push(function() {
  267. aiptag.adplayer = new aipPlayer({
  268. AD_WIDTH: 960,
  269. AD_HEIGHT: 540,
  270. AD_FULLSCREEN: !0,
  271. AD_CENTERPLAYER: !1,
  272. LOADING_TEXT: "loading advertisement",
  273. PREROLL_ELEM: function() {
  274. return document.getElementById("1eaom01c3pxu9wd3")
  275. },
  276. AIP_COMPLETE: function(t) {
  277. console.log("aipC"), i(!0), $("#1eaom01c3pxu9wd3").hide(), $("#" + n).hide();
  278. try {
  279. ga("send", "event", "preroll", window.runtimeHash + "_complete")
  280. } catch (t) {}
  281. },
  282. AIP_REMOVE: function() {}
  283. })
  284. }), e = !0
  285. } catch (t) {}
  286. }, o.b = function() {
  287. if (void 0 !== aiptag.adplayer) {
  288. console.log("aipS");
  289. try {
  290. ga("send", "event", "preroll", window.runtimeHash + "_request")
  291. } catch (t) {}
  292. $("#1eaom01c3pxu9wd3").show(), aiptag.cmd.player.push(function() {
  293. aiptag.adplayer.startPreRoll()
  294. })
  295. } else {
  296. console.log("aipAABS");
  297. try {
  298. ga("send", "event", "antiadblocker", window.runtimeHash + "_start")
  299. } catch (t) {}
  300. t()
  301. }
  302. }, o
  303. }
  304.  
  305. function ADINPLAY_BANNER(t, e) {
  306. var i = $("#" + t),
  307. o = e,
  308. n = {},
  309. r = !1;
  310. return n.a = function() {
  311. if (!r) {
  312. i.empty(), i.append("<div id='" + o + "'></div>");
  313. try {
  314. try {
  315. ga("send", "event", "banner", window.runtimeHash + "_display")
  316. } catch (t) {}
  317. aiptag.cmd.display.push(function() {
  318. aipDisplayTag.display(o)
  319. }), r = !0
  320. } catch (t) {}
  321. }
  322. }, n.c = function() {
  323. try {
  324. try {
  325. ga("send", "event", "banner", window.runtimeHash + "_refresh")
  326. } catch (t) {}
  327. aiptag.cmd.display.push(function() {
  328. aipDisplayTag.display(o)
  329. })
  330. } catch (t) {}
  331. }, n
  332. }
  333.  
  334. function Application() {
  335. function t(t) {
  336. var e = t + 37 * Math.floor(65535 * Math.random());
  337. setCookie(Cookies.d, e, 30)
  338. }
  339.  
  340. function e() {
  341. return parseInt(getCookie(Cookies.d)) % 37
  342. }
  343. return function() {
  344. var i = e();
  345. console.log("init1 pSC: " + i), i >= 0 && i < env.e || (i = Math.max( 0, env.e - 2), console.log("init2 pSC: " + i));
  346. var o = {};
  347. _anApp = o, o.f = env, o.g = !1, o.i = Date.now(), o.j = 0, o.k = 0, o.l = null, o.m = LOCALE, o.n = LANG, o.o = null, o.p = null, o.q = null, o.r = null, o.s = null, o.t = null, o.u = null;
  348. try {
  349. navigator && navigator.geolocation && navigator.geolocation.getCurrentPosition(function(t) {
  350. if (void 0 !== t.coords) {
  351. var e = t.coords;
  352. void 0 !== e.latitude && void 0 !== e.longitude && (o.l = t)
  353. }
  354. }, function(t) {})
  355. } catch (t) {}
  356. return o.v = function() {
  357. o.p = new AssetsJsonManager, o.q = new ResourceManager, o.r = new AudioManager, o.s = new ScenesManager, o.t = new PropertyManager, o.u = new UserManager, o.o = new Engine, o.o.z = new MessageProcessor(o.o), o.a()
  358. }, o.a = function() {
  359. try {
  360. ga("send", "event", "app", window.runtimeHash + "_init")
  361. } catch (t) {}
  362. o.o.A = function() {
  363. o.o.B()
  364. }, o.o.C = function() {
  365. var t = o.s.F.D();
  366. try {
  367. ga("send", "event", "game", window.runtimeHash + "_start", t)
  368. } catch (t) {}
  369. o.r.G(AudioManager.AudioState.H), o.s.I(o.s.H.J())
  370. }, o.o.B = function() {
  371. try {
  372. ga("send", "event", "game", window.runtimeHash + "_end")
  373. } catch (t) {}
  374. $("body").height() >= 430 && o.f.K.c(), o.p.L(),
  375. function() {
  376. var t = Math.floor(o.o.N.M),
  377. e = o.o.O;
  378. o.u.P() ? o.u.Q(function() {
  379. o.R(t, e)
  380. }) : o.R(t, e)
  381. }()
  382. }, o.o.S = function(t) {
  383. t(o.s.H.T(), o.s.H.U())
  384. }, o.u.V(function() {
  385. if (o.p.W && (o.r.G(AudioManager.AudioState.F), o.s.I(o.s.F)), o.u.P()) try {
  386. var t = o.u.X();
  387. ga("set", "userId", t)
  388. } catch (t) {}
  389. o.Y() && o.u.P() && !o.u.Z() ? (o.$(!1, !1), o.s.aa._(new ConsentAcceptanceToasterViewController)) : o.ba(!0)
  390. }), o.p.ca(function() {
  391. o.r.G(AudioManager.AudioState.F), o.s.I(o.s.F)
  392. }), o.q.a(function() {
  393. o.o.a(), o.r.a(), o.s.a(), o.t.a(), o.p.a(), o.u.a(), o.Y() && !o.Z() ? o.s.aa._(new ConsentAcceptanceToasterViewController) : o.ba(!0)
  394. })
  395. }, o.da = function(t) {
  396. if (o.u.P()) {
  397. var e = o.u.ea();
  398. $.get(GATEWAY_HOST + "/pub/wuid/" + e + "/consent/change?value=" + encodeURI(t), function(t) {})
  399. }
  400. }, o.fa = function(t) {
  401. var e = o.u.ea(),
  402. i = o.s.F.D(),
  403. n = o.s.F.ga(),
  404. r = o.t.ha(PropertyType.ia),
  405. s = o.t.ha(PropertyType.ja),
  406. a = o.t.ha(PropertyType.ka),
  407. h = o.t.ha(PropertyType.la),
  408. l = o.t.ha(PropertyType.ma),
  409. p = 0;
  410. if (null != o.l) {
  411. var u = o.l.coords.latitude,
  412. c = o.l.coords.longitude;
  413. p = 1 | Math.max( 0, Math.min(32767, (u + 90) / 180 * 32768)) << 1 | Math.max( 0, Math.min(65535, (c + 180) / 360 * 65536)) << 16
  414. }
  415. var f = o;
  416. $.get(GATEWAY_HOST + "/pub/wuid/" + e + "/start?gameMode=" + encodeURI(i) + "&gh=" + p + "&nickname=" + encodeURI(n) + "&skinId=" + encodeURI(r) + "&eyesId=" + encodeURI(s) + "&mouthId=" + encodeURI(a) + "&glassesId=" + encodeURI(h) + "&hatId=" + encodeURI(l), function(e) {
  417. if (1200 === e.code) {
  418. var i = e.server_url;
  419. t(i)
  420. } else if (1460 === e.code) {
  421. f.s.I(f.s.na);
  422. try {
  423. ga("send", "event", "restricted", window.runtimeHash + "_tick")
  424. } catch (t) {}
  425. } else t(void 0)
  426. })
  427. }, o.oa = function() {
  428. i++, console.log("start pSC: " + i), !o.f.pa && i >= o.f.e ? (o.s.I(o.s.qa), o.r.G(AudioManager.AudioState.ra), o.f.sa.b()) : (t(i), o.ta())
  429. }, o.ta = function() {
  430. if (o.o.ua()) {
  431. o.s.I(o.s.va), o.r.G(AudioManager.AudioState.va);
  432. var t = o.s.F.D();
  433. setCookie(Cookies.wa, t, 30), console.log("save gm: " + t);
  434. var e = o.s.ya.xa();
  435. if (setCookie(Cookies.za, e, 30), console.log("save sPN: " + e), o.u.P()) o.fa(function(t) {
  436. o.o.Aa(t, o.u.ea())
  437. });
  438. else {
  439. var i = o.s.F.ga();
  440. setCookie(Cookies.Ba, i, 30);
  441. var n = o.t.ha(PropertyType.ia);
  442. setCookie(Cookies.Ca, n, 30), o.fa(function(t) {
  443. o.o.Da(t, i, n)
  444. })
  445. }
  446. }
  447. }, o.R = function(t, e) {
  448. var i = o.s.F.ga();
  449. o.s.H.Ea(t, e, i), o.r.G(AudioManager.AudioState.Fa), o.s.I(o.s.H.Ga())
  450. }, o.Ha = function() {
  451. if (!o.Ia()) return o.t.Ja();
  452. var t = parseInt(getCookie(Cookies.Ca));
  453. return null != t && o.t.Ka(t, PropertyType.ia) ? t : o.t.Ja()
  454. }, o.La = function(t) {
  455. setCookie(Cookies.Ma, !!t, 1800)
  456. }, o.Ia = function() {
  457. return "true" === getCookie(Cookies.Ma)
  458. }, o.ba = function(e) {
  459. if (e != o.g) {
  460. o.g = e;
  461. var n = n || {};
  462. n.consented = e, n.gdprConsent = e, o.f.Na.a(), o.f.K.a(), o.f.sa.a(function(e) {
  463. e && t(i = 0), o.ta()
  464. })
  465. }
  466. }, o.$ = function(t, e) {
  467. setCookie(Cookies.Oa, t ? "true" : "false"), e && o.da(t), o.ba(t)
  468. }, o.Z = function() {
  469. switch (getCookie(Cookies.Oa)) {
  470. case "true":
  471. return !0;
  472. default:
  473. return !1
  474. }
  475. }, o.Y = function() {
  476. try {
  477. return !!window.isIPInEEA || !(null == o.l || !EEAMap.Pa(o.l.coords.latitude, o.l.coords.longitude))
  478. } catch (t) {
  479. return !0
  480. }
  481. }, o.Qa = function() {
  482. o.j = Date.now(), o.k = o.j - o.i, o.o.Ra(o.j, o.k), o.s.Ra(o.j, o.k), o.i = o.j
  483. }, o.Sa = function() {
  484. o.s.Sa()
  485. }, o
  486. }()
  487. }
  488.  
  489. function Engine() {
  490. var t = {
  491. Ta: 0,
  492. Ua: 1,
  493. Va: 2,
  494. Wa: 3
  495. },
  496. e = {};
  497. return e.Xa = 30, e.Ya = new Float32Array(100), e.Za = 0, e.$a = 0, e._a = 0, e.ab = 0, e.bb = 0, e.cb = 0, e.db = t.Ta, e.eb = null, e.fb = 300, e.C = function() {}, e.B = function() {}, e.S = function() {}, e.A = function() {}, e.gb = new GameParams, e.z = null, e.N = null, e.hb = {}, e.ib = {}, e.jb = 12.5, e.kb = 40, e.lb = 1, e.mb = -1, e.nb = 1, e.ob = 1, e.pb = -1, e.qb = -1, e.rb = 1, e.sb = 1, e.tb = -1, e.O = 500, e.ub = 500, e.gb.vb = 500, e.N = new Worm(e.gb), e.a = function() {
  498. e.N.wb(getApp().s.H.xb), setInterval(function() {
  499. e.S(function(t, i) {
  500. e.yb(t, i)
  501. })
  502. }, 100)
  503. }, e.zb = function(t, i, o, n) {
  504. e.mb = t, e.nb = i, e.ob = o, e.pb = n, e.Ab()
  505. }, e.Bb = function(t) {
  506. e.lb = t, e.Ab()
  507. }, e.Ab = function() {
  508. e.qb = e.mb - e.lb, e.rb = e.nb + e.lb, e.sb = e.ob - e.lb, e.tb = e.pb + e.lb
  509. }, e.Ra = function(i, o) {
  510. e._a += o, e.$a -= .2 * e.Za * o, e.z.Cb(), null == e.eb || e.db !== t.Va && e.db !== t.Wa || (e.Db(i, o), e.kb = 4 + e.jb * e.N.Eb);
  511. for (var n = 1e3 / Math.max( 1, o), r = 0, s = 0; s < e.Ya.length - 1; s++) r += e.Ya[s], e.Ya[s] = e.Ya[s + 1];
  512. e.Ya[e.Ya.length - 1] = n, e.Xa = (r + n) / e.Ya.length
  513. }, e.Fb = function(t, i) {
  514. return t > e.qb && t < e.rb && i > e.sb && i < e.tb
  515. }, e.Db = function(t, i) {
  516. var o = e._a + e.$a,
  517. n = (o - e.ab) / (e.bb - e.ab);
  518. e.N.Gb(t, i), e.N.Hb(t, i, n, e.Fb);
  519. var r = 0;
  520. for (var s in e.ib) {
  521. var a = e.ib[s];
  522. a.Gb(t, i), a.Hb(t, i, n, e.Fb), a.Ib && a.Eb > r && (r = a.Eb), a.Jb || !(a.Kb < .005) && a.Ib || (a.Lb(), delete e.ib[a.Nb.Mb])
  523. }
  524. e.Bb(3 * r);
  525. for (var h in e.hb) {
  526. var l = e.hb[h];
  527. l.Gb(t, i), l.Hb(t, i, e.Fb), l.Ob && (l.Kb < .005 || !e.Fb(l.Pb, l.Qb)) && (l.Lb(), delete e.hb[l.Nb.Mb])
  528. }
  529. }, e.Rb = function(i, o) {
  530. e.db === t.Ua && (e.db = t.Va, e.C());
  531. var n = getApp().j;
  532. e.cb = i, 0 === i ? (e.ab = n - 95, e.bb = n, e._a = e.ab, e.$a = 0) : (e.ab = e.bb, e.bb = e.bb + o);
  533. var r = e._a + e.$a;
  534. e.Za = (r - e.ab) / (e.bb - e.ab)
  535. }, e.Sb = function() {
  536. if (e.db === t.Ua || e.db === t.Va) {
  537. e.db = t.Wa;
  538. var i = e.eb;
  539. setTimeout(function() {
  540. e.db === t.Wa && (e.db = t.Ta), null != i && i === e.eb && (e.eb.close(), e.eb = null)
  541. }, 5e3), e.B()
  542. }
  543. }, e.ua = function() {
  544. return e.db !== t.Va && (e.db = t.Ua, e.z.Tb(), e.hb = {}, e.ib = {}, e.N.Ub(), null != e.eb && (e.eb.close(), e.eb = null), !0)
  545. }, e.Vb = function() {
  546. e.eb = null, e.z.Tb(), e.db !== t.Wa && e.A(), e.db = t.Ta
  547. }, e.Aa = function(t, i) {
  548. e.Wb(t, function() {
  549. var t = Math.min(2048, i.length),
  550. o = new ArrayBuffer(6 + 2 * t),
  551. n = new DataView(o),
  552. r = 0;
  553. n.setInt8(r, 129), r += 1, n.setInt16(r, 2800), r += 2, n.setInt8(r, 1), r += 1, n.setInt16(r, t), r += 2;
  554. for (var s = 0; s < t; s++) n.setInt16(r, i.charCodeAt(s)), r += 2;
  555. e.Xb(o)
  556. })
  557. }, e.Da = function(t, i, o) {
  558. e.Wb(t, function() {
  559. var t = Math.min(32, i.length),
  560. n = new ArrayBuffer(7 + 2 * t),
  561. r = new DataView(n),
  562. s = 0;
  563. r.setInt8(s, 129), s += 1, r.setInt16(s, 2800), s += 2, r.setInt8(s, 0), s += 1, r.setInt16(s, o), s += 2, r.setInt8(s, t), s++;
  564. for (var a = 0; a < t; a++) r.setInt16(s, i.charCodeAt(a)), s += 2;
  565. e.Xb(n)
  566. })
  567. }, e.Xb = function(t) {
  568. try {
  569. null != e.eb && e.eb.readyState === WebSocket.OPEN && e.eb.send(t)
  570. } catch (t) {
  571. console.log("Socket send error: " + t), e.Vb()
  572. }
  573. }, e.yb = function(t, i) {
  574. var o = i ? 128 : 0,
  575. n = normDir(t) / _2PI * 128 & 127,
  576. r = 255 & (o | n);
  577. if (e.fb !== r) {
  578. var s = new ArrayBuffer(1);
  579. new DataView(s).setInt8(0, r), e.Xb(s), e.fb = r
  580. }
  581. }, e.Wb = function(t, i) {
  582. var o = e.eb = new WebSocket(t);
  583. o.binaryType = "arraybuffer", o.onopen = function() {
  584. e.eb === o && (console.log("Socket opened"), i())
  585. }, o.onclose = function() {
  586. e.eb === o && (console.log("Socket closed"), e.Vb())
  587. }, o.onerror = function(t) {
  588. e.eb === o && (console.log("Socket error"), e.Vb())
  589. }, o.onmessage = function(t) {
  590. e.eb === o && e.z.Yb(t.data)
  591. }
  592. }, e
  593. }
  594. var LINE_LOGO_URL = "/images/linelogo.png",
  595. GUEST_AVATAR_URL = "/images/guest-avatar-saveukraine2022.png",
  596. isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream,
  597. GATEWAY_HOST = atob("aHR0cHM6Ly9nYXRld2F5Lndvcm1hdGUuaW8="),
  598. RESOURCES_HOST = atob("aHR0cHM6Ly9yZXNvdXJjZXMud29ybWF0ZS5pbw=="),
  599. LANG = window.I18N_LANG;
  600. LANG || (LANG = "en");
  601. var LOCALE = void 0;
  602. switch (LANG) {
  603. case "uk":
  604. LOCALE = "uk_UA";
  605. break;
  606. case "de":
  607. LOCALE = "de_DE";
  608. break;
  609. case "fr":
  610. LOCALE = "fr_FR";
  611. break;
  612. case "ru":
  613. LOCALE = "ru_RU";
  614. break;
  615. case "es":
  616. LOCALE = "es_ES";
  617. break;
  618. default:
  619. LOCALE = "en_US"
  620. }
  621. moment.locale(LOCALE);
  622. var SHOW_FPS = !1,
  623. _anApp = void 0,
  624. POGL = function() {
  625. var p = {
  626. Zb: eval(atob("UElYSQ=="))
  627. },
  628. bm = p.Zb[atob("QkxFTkRfTU9ERVM=")],
  629. wm = p.Zb[atob("V1JBUF9NT0RFUw==")];
  630. return {
  631. $b: p.Zb[atob("Q29udGFpbmVy")],
  632. _b: p.Zb[atob("QmFzZVRleHR1cmU=")],
  633. ac: p.Zb[atob("VGV4dHVyZQ==")],
  634. bc: p.Zb[atob("UmVuZGVyZXI=")],
  635. cc: p.Zb[atob("R3JhcGhpY3M=")],
  636. dc: p.Zb[atob("U2hhZGVy")],
  637. ec: p.Zb[atob("UmVjdGFuZ2xl")],
  638. fc: p.Zb[atob("U3ByaXRl")],
  639. gc: p.Zb[atob("VGV4dA==")],
  640. hc: p.Zb[atob("R2VvbWV0cnk=")],
  641. ic: p.Zb[atob("TWVzaA==")],
  642. jc: {
  643. kc: bm[atob("QURE")]
  644. },
  645. lc: {
  646. mc: wm[atob("UkVQRUFU")]
  647. }
  648. }
  649. }(),
  650. _2PI = 2 * Math.PI;
  651. ! function() {
  652. var t = "Z2V0",
  653. e = "=",
  654. i = t + "SW50",
  655. o = t + "RmxvYXQ",
  656. n = [atob(i + "OA=="), atob(i + "MTY" + e), atob(i + "MzI" + e), atob(o + "zMg=="), atob(o + "2NA==")];
  657. DataView.prototype.nc = function(t) {
  658. return this[n[0]](t)
  659. }, DataView.prototype.oc = function(t) {
  660. return this[n[1]](t)
  661. }, DataView.prototype.pc = function(t) {
  662. return this[n[2]](t)
  663. }, DataView.prototype.qc = function(t) {
  664. return this[n[3]](t)
  665. }, DataView.prototype.rc = function(t) {
  666. return this[n[4]](t)
  667. }
  668. }();
  669. var Ability = function() {
  670. function t(t) {
  671. this.sc = t, this.tc = !1, this.uc = 1
  672. }
  673. return t.VELOCITY_TYPE = 0, t.FLEXIBLE_TYPE = 1, t.MAGNETIC_TYPE = 2, t.ZOOM_TYPE = 6, t.X2_TYPE = 3, t.X5_TYPE = 4, t.X10_TYPE = 5, t
  674. }(),
  675. AssetsJsonManager = function() {
  676. function t() {
  677. this.vc = [], this.wc = {}, this.xc = null, this.yc = AssetsJsonResources.zc()
  678. }
  679.  
  680. function e(t, e) {
  681. for (var i in t) t.hasOwnProperty(i) && e(i, t[i])
  682. }
  683. return t.prototype.a = function() {
  684. this.L()
  685. }, t.prototype.W = function() {
  686. return null != this.xc
  687. }, t.prototype.Ac = function() {
  688. return null != this.xc ? this.xc.revision : -1
  689. }, t.prototype.Bc = function() {
  690. return this.xc
  691. }, t.prototype.L = function() {
  692. var t = this;
  693. $.get(RESOURCES_HOST + "/dynamic/assets/revision.json", function(e) {
  694. e > t.Ac() && t.Cc()
  695. })
  696. }, t.prototype.Cc = function() {
  697. var t = this;
  698. $.get(RESOURCES_HOST + "/dynamic/assets/registry.json", function(e) {
  699. e.revision > t.Ac() && t.Dc(e)
  700. })
  701. }, t.prototype.ca = function(t) {
  702. this.vc.push(t)
  703. }, t.prototype.Ec = function() {
  704. return this.yc
  705. }, t.prototype.Fc = function() {
  706. for (var t = 0; t < this.vc.length; t++) this.vc[t]()
  707. }, t.prototype.Gc = function(t, i) {
  708. if (!(t.revision <= this.Ac())) {
  709. var o = i;
  710. e(this.wc, function(t, e) {
  711. var i = o[t];
  712. null != i && e.Hc === i.Hc || (print("disposing prev texture: " + t + " at " + e.Hc), e.Ic.destroy())
  713. }), this.wc = o, this.xc = t, this.yc = AssetsJsonResources.Jc(this.xc, this.wc), this.Fc()
  714. }
  715. }, t.prototype.Dc = function(t) {
  716. var i = {};
  717. e(t.textureDict, function(t, e) {
  718. var o = RESOURCES_HOST + e.relativePath;
  719. i[t] = new FSTexture(o, POGL._b.from(o))
  720. }), this.Gc(t, i)
  721. }, t
  722. }(),
  723. AssetsJsonResources = function() {
  724. function t() {
  725. this.Kc = null, this.Lc = null, this.Mc = null, this.Nc = null, this.Oc = null, this.Pc = null, this.Qc = null, this.Rc = null, this.Sc = null, this.Tc = null, this.Uc = null, this.Vc = null, this.Wc = null, this.Xc = null, this.Yc = null, this.Zc = null
  726. }
  727.  
  728. function e(t, e) {
  729. for (var i in t) t.hasOwnProperty(i) && e(i, t[i])
  730. }
  731. return t.zc = function() {
  732. var t = new AssetsJsonResources;
  733. return t.Kc = {}, t.Lc = {
  734. $c: null,
  735. _c: null
  736. }, t.Mc = {}, t.Nc = {
  737. $c: null
  738. }, t.Oc = {}, t.Pc = {
  739. ad: "#FFFFFF",
  740. $c: [],
  741. _c: []
  742. }, t.Qc = {}, t.Rc = {
  743. bd: {},
  744. cd: t.Pc,
  745. dd: t.Lc
  746. }, t.Sc = {}, t.Tc = {
  747. $c: []
  748. }, t.Uc = {}, t.Vc = {
  749. $c: []
  750. }, t.Wc = {}, t.Xc = {
  751. $c: []
  752. }, t.Yc = {}, t.Zc = {
  753. $c: []
  754. }, t
  755. }, t.Jc = function(t, i) {
  756. var o = new AssetsJsonResources,
  757. n = {};
  758. e(t.colorDict, function(t, e) {
  759. n[t] = e
  760. });
  761. var r = {};
  762. e(t.regionDict, function(t, e) {
  763. r[t] = new Region(i[e.texture].Ic, e.x, e.y, e.w, e.h, e.px, e.py, e.pw, e.ph)
  764. }), o.Oc = {};
  765. for (var s = 0; s < t.skinArrayDict.length; s++) {
  766. var a = t.skinArrayDict[s];
  767. o.Oc[a.id] = new AssetsJsonResources.WormSkinData("#" + n[a.prime], a.base.map(function(t) {
  768. return r[t]
  769. }), a.glow.map(function(t) {
  770. return r[t]
  771. }))
  772. }
  773. var h = t.skinUnknown;
  774. o.Pc = new AssetsJsonResources.WormSkinData("#" + n[h.prime], h.base.map(function(t) {
  775. return r[t]
  776. }), h.glow.map(function(t) {
  777. return r[t]
  778. })), o.Sc = {}, e(t.eyesDict, function(t, e) {
  779. t = parseInt(t), o.Sc[t] = new AssetsJsonResources.WearSkinData(e.base.map(function(t) {
  780. return r[t.region]
  781. }))
  782. }), o.Tc = new AssetsJsonResources.WearSkinData(t.eyesUnknown.base.map(function(t) {
  783. return r[t.region]
  784. })), o.Uc = {}, e(t.mouthDict, function(t, e) {
  785. t = parseInt(t), o.Uc[t] = new AssetsJsonResources.WearSkinData(e.base.map(function(t) {
  786. return r[t.region]
  787. }))
  788. }), o.Vc = new AssetsJsonResources.WearSkinData(t.mouthUnknown.base.map(function(t) {
  789. return r[t.region]
  790. })), o.Wc = {}, e(t.glassesDict, function(t, e) {
  791. t = parseInt(t), o.Wc[t] = new AssetsJsonResources.WearSkinData(e.base.map(function(t) {
  792. return r[t.region]
  793. }))
  794. }), o.Xc = new AssetsJsonResources.WearSkinData(t.glassesUnknown.base.map(function(t) {
  795. return r[t.region]
  796. })), o.Yc = {}, e(t.hatDict, function(t, e) {
  797. t = parseInt(t), o.Yc[t] = new AssetsJsonResources.WearSkinData(e.base.map(function(t) {
  798. return r[t.region]
  799. }))
  800. }), o.Zc = new AssetsJsonResources.WearSkinData(t.hatUnknown.base.map(function(t) {
  801. return r[t.region]
  802. })), o.Kc = {}, e(t.portionDict, function(t, e) {
  803. t = parseInt(t), o.Kc[t] = new AssetsJsonResources.PortionSkinData(r[e.base], r[e.glow])
  804. });
  805. var l = t.portionUnknown;
  806. o.Lc = new AssetsJsonResources.PortionSkinData(r[l.base], r[l.glow]), o.Mc = {}, e(t.abilityDict, function(t, e) {
  807. t = parseInt(t), o.Mc[t] = new AssetsJsonResources.AbilitySkinData(r[e.base])
  808. });
  809. var p = t.abilityUnknown;
  810. return o.Nc = new AssetsJsonResources.AbilitySkinData(r[p.base]), o.Qc = {}, e(t.teamDict, function(t, e) {
  811. t = parseInt(t), o.Qc[t] = new AssetsJsonResources.TeamSkinData(e.name, new AssetsJsonResources.WormSkinData("#" + n[e.skin.prime], [], e.skin.glow.map(function(t) {
  812. return r[t]
  813. })), new AssetsJsonResources.PortionSkinData([], r[e.portion.glow]))
  814. }), o.Rc = new AssetsJsonResources.TeamSkinData({}, o.Pc, o.Lc), o
  815. }, t.prototype.ed = function(t) {
  816. var e = this.Oc[t];
  817. return e || this.Pc
  818. }, t.prototype.fd = function(t) {
  819. var e = this.Qc[t];
  820. return e || this.Rc
  821. }, t.prototype.gd = function(t) {
  822. var e = this.Sc[t];
  823. return e || this.Tc
  824. }, t.prototype.hd = function(t) {
  825. var e = this.Uc[t];
  826. return e || this.Vc
  827. }, t.prototype.jd = function(t) {
  828. var e = this.Wc[t];
  829. return e || this.Xc
  830. }, t.prototype.kd = function(t) {
  831. var e = this.Yc[t];
  832. return e || this.Zc
  833. }, t.prototype.ld = function(t) {
  834. var e = this.Kc[t];
  835. return e || this.Lc
  836. }, t.prototype.md = function(t) {
  837. var e = this.Mc[t];
  838. return e || this.Nc
  839. }, t.TeamSkinData = function() {
  840. function t(t, e, i) {
  841. this.bd = t, this.cd = e, this.dd = i
  842. }
  843. return t
  844. }(), t.WormSkinData = function() {
  845. function t(t, e, i) {
  846. this.ad = t, this.$c = e, this._c = i
  847. }
  848. return t
  849. }(), t.WearSkinData = function() {
  850. function t(t) {
  851. this.$c = t
  852. }
  853. return t
  854. }(), t.PortionSkinData = function() {
  855. function t(t, e) {
  856. this.$c = t, this._c = e
  857. }
  858. return t
  859. }(), t.AbilitySkinData = function() {
  860. function t(t) {
  861. this.$c = t
  862. }
  863. return t
  864. }(), t
  865. }(),
  866. AudioManager = function() {
  867. function t() {
  868. this.nd = AudioManager.AudioState.va, this.od = !1, this.pd = !1, this.qd = null, this.rd = null
  869. }
  870. t.prototype.a = function() {}, t.prototype.sd = function(t) {
  871. this.pd = t
  872. }, t.prototype.G = function(t) {
  873. this.nd = t, this.td()
  874. }, t.prototype.ud = function(t) {
  875. this.od = t, this.td()
  876. }, t.prototype.td = function() {}, t.prototype.vd = function(t, e) {
  877. if (!getApp().p.W) return null;
  878. var i = t[e];
  879. return null == i || 0 == i.length ? null : i[Math.floor(Math.random() * i.length)].cloneNode()
  880. }, t.prototype.wd = function(t, e, i) {
  881. if (this.pd && !(i <= 0)) {
  882. var o = this.vd(t, e);
  883. null != o && (o.volume = Math.min(1, i), o.play())
  884. }
  885. }, t.prototype.xd = function(t, e) {
  886. this.nd.yd && this.wd(app.q.zd, t, e)
  887. }, t.prototype.Ad = function(t, e) {
  888. this.nd.Bd && this.wd(app.q.Cd, t, e)
  889. }, t.prototype.Dd = function() {}, t.prototype.Ed = function() {}, t.prototype.Fd = function() {}, t.prototype.Gd = function() {}, t.prototype.Hd = function() {}, t.prototype.Id = function() {}, t.prototype.Jd = function(t, e, i) {}, t.prototype.Kd = function(t) {}, t.prototype.Ld = function(t) {}, t.prototype.Md = function(t) {}, t.prototype.Nd = function(t) {}, t.prototype.Od = function(t) {}, t.prototype.Pd = function(t) {}, t.prototype.Qd = function(t) {}, t.prototype.Rd = function(t) {}, t.prototype.Sd = function(t) {}, t.prototype.Td = function(t) {}, t.prototype.Ud = function(t) {}, t.prototype.Vd = function(t) {}, t.prototype.Wd = function(t) {}, t.prototype.Xd = function(t) {}, t.prototype.Yd = function(t, e) {}, t.prototype.Zd = function(t) {}, t.prototype.$d = function(t, e, i) {};
  890. var e = (function() {
  891. function t(t) {
  892. this._d = new e(t, .5), this._d.ae.loop = !0, this.be = !1
  893. }
  894. t.prototype.ce = function(t) {
  895. t ? this.b() : this.de()
  896. }, t.prototype.b = function() {
  897. this.be || (this.be = !0, this._d.ee = 0, this._d.fe(1500, 100))
  898. }, t.prototype.de = function() {
  899. this.be && (this.be = !1, this._d.ge(1500, 100))
  900. }
  901. }(), function() {
  902. function t(t) {
  903. this.he = t.map(function(t) {
  904. return new e(t, .4)
  905. }), i(this.he, 0, this.he.length), this.ie = null, this.je = 0, this.be = !1, this.ke = 1e4
  906. }
  907.  
  908. function i(t, e, i) {
  909. for (var o = i - 1; o > e; o--) {
  910. var n = e + Math.floor(Math.random() * (o - e + 1)),
  911. r = t[o];
  912. t[o] = t[n], t[n] = r
  913. }
  914. }
  915. t.prototype.ce = function(t) {
  916. t ? this.b() : this.de()
  917. }, t.prototype.b = function() {
  918. this.be || (this.be = !0, this.le(1500))
  919. }, t.prototype.de = function() {
  920. this.be && (this.be = !1, null != this.ie && this.ie.ge(800, 50))
  921. }, t.prototype.le = function(t) {
  922. if (this.be) {
  923. null == this.ie && (this.ie = this.me()), this.ie.ae.currentTime + this.ke / 1e3 > this.ie.ae.duration && (this.ie = this.me(), this.ie.ae.currentTime = 0), console.log("Current track '" + this.ie.ae.src + "', change in (ms) " + (1e3 * (this.ie.ae.duration - this.ie.ae.currentTime) - this.ke)), this.ie.ee = 0, this.ie.fe(t, 100);
  924. var e = 1e3 * (this.ie.ae.duration - this.ie.ae.currentTime) - this.ke,
  925. i = this,
  926. o = setTimeout(function() {
  927. i.be && o == i.je && (i.ie.ge(i.ke, 100), i.ie = i.me(), i.ie.ae.currentTime = 0, i.le(i.ke))
  928. }, e);
  929. this.je = o
  930. }
  931. }, t.prototype.me = function() {
  932. var t = this.he[0],
  933. e = Math.max( 1, this.he.length / 2);
  934. return i(this.he, e, this.he.length), this.he.push(this.he.shift()), t
  935. }
  936. }(), function() {
  937. function t(t, e) {
  938. this.ae = t, this.ne = e, this.ee = 0, t.volume = 0, this.oe = 0, this.pe = !1
  939. }
  940. return t.prototype.fe = function(t, e) {
  941. console.log("fade IN " + this.ae.src), this.qe(!0, t, e)
  942. }, t.prototype.ge = function(t, e) {
  943. console.log("fade OUT " + this.ae.src), this.qe(!1, t, e)
  944. }, t.prototype.qe = function(t, e, i) {
  945. this.pe && clearInterval(this.oe);
  946. var o = this,
  947. n = 1 / (e / i),
  948. r = setInterval(function() {
  949. if (o.pe && r != o.oe) return void clearInterval(r);
  950. t ? (o.ee = Math.min(1, o.ee + n), o.ae.volume = o.ee * o.ne, o.ee >= 1 && (o.pe = !1, clearInterval(r))) : (o.ee = Math.max( 0, o.ee - n), o.ae.volume = o.ee * o.ne, o.ee <= 0 && (o.ae.pause(), o.pe = !1, clearInterval(r)))
  951. }, i);
  952. this.pe = !0, this.oe = r, this.ae.play()
  953. }, t
  954. }());
  955. return t.AudioState = {
  956. va: {
  957. re: !1,
  958. se: !1,
  959. Bd: !0,
  960. yd: !1
  961. },
  962. F: {
  963. re: !1,
  964. se: !0,
  965. Bd: !0,
  966. yd: !1
  967. },
  968. H: {
  969. re: !0,
  970. se: !1,
  971. Bd: !1,
  972. yd: !0
  973. },
  974. Fa: {
  975. re: !1,
  976. se: !1,
  977. Bd: !0,
  978. yd: !1
  979. },
  980. ra: {
  981. re: !1,
  982. se: !1,
  983. Bd: !1,
  984. yd: !1
  985. }
  986. }, t
  987. }(),
  988. BackgroundView = function() {
  989. function t(t) {
  990. this.te = t, this.ue = t.get()[0], this.ve = new POGL.bc({
  991. view: this.ue,
  992. backgroundColor: e,
  993. antialias: !0
  994. }), this.we = new POGL.$b, this.we.sortableChildren = !0, this.xe = [], this.ye = [], this.ze = [], this.a()
  995. }
  996. var e = 0,
  997. i = function(t, e) {
  998. return t + Math.random(e - t)
  999. },
  1000. o = function(t) {
  1001. return t >= 0 ? Math.cos(t % _2PI) : Math.cos(t % _2PI + _2PI)
  1002. },
  1003. n = function(t) {
  1004. return t >= 0 ? Math.sin(t % _2PI) : Math.sin(t % _2PI + _2PI)
  1005. },
  1006. r = [{
  1007. Ae: i(0, _2PI),
  1008. Be: i(0, _2PI),
  1009. Ce: i(.1, .5),
  1010. De: 1,
  1011. Ee: 2,
  1012. Fe: 16765440
  1013. }, {
  1014. Ae: i(0, _2PI),
  1015. Be: i(0, _2PI),
  1016. Ce: i(.1, .5),
  1017. De: 1.5,
  1018. Ee: 1.5,
  1019. Fe: 16765440
  1020. }, {
  1021. Ae: i(0, _2PI),
  1022. Be: i(0, _2PI),
  1023. Ce: i(.1, .5),
  1024. De: 2,
  1025. Ee: 1,
  1026. Fe: 16765440
  1027. }, {
  1028. Ae: i(0, _2PI),
  1029. Be: i(0, _2PI),
  1030. Ce: i(.1, .5),
  1031. De: 3,
  1032. Ee: 2,
  1033. Fe: 16765440
  1034. }, {
  1035. Ae: i(0, _2PI),
  1036. Be: i(0, _2PI),
  1037. Ce: i(.1, .5),
  1038. De: 2.5,
  1039. Ee: 2.5,
  1040. Fe: 37119
  1041. }, {
  1042. Ae: i(0, _2PI),
  1043. Be: i(0, _2PI),
  1044. Ce: i(.1, .5),
  1045. De: 2,
  1046. Ee: 3,
  1047. Fe: 37119
  1048. }, {
  1049. Ae: i(0, _2PI),
  1050. Be: i(0, _2PI),
  1051. Ce: i(.1, .5),
  1052. De: 5,
  1053. Ee: 4,
  1054. Fe: 37119
  1055. }, {
  1056. Ae: i(0, _2PI),
  1057. Be: i(0, _2PI),
  1058. Ce: i(.1, .5),
  1059. De: 4.5,
  1060. Ee: 4.5,
  1061. Fe: 37119
  1062. }];
  1063. return t.prototype.a = function() {
  1064. var t = getApp();
  1065. this.ve.backgroundColor = e, this.xe = new Array(r.length);
  1066. for (var i = 0; i < this.xe.length; i++) this.xe[i] = new POGL.fc, this.xe[i].texture = t.q.Ge, this.xe[i].anchor.set(.5), this.xe[i].zIndex = 1, this.we.addChild(this.xe[i]);
  1067. this.ye = new Array(t.q.He.length);
  1068. for (var o = 0; o < this.ye.length; o++) this.ye[o] = new POGL.fc, this.ye[o].texture = t.q.He[o], this.ye[o].anchor.set(.5), this.ye[o].zIndex = 2, this.we.addChild(this.ye[o]);
  1069. this.ze = new Array(this.ye.length);
  1070. for (var n = 0; n < this.ze.length; n++) {
  1071. var s = n % 2 == 0 ? [1, .82, 0] : [0, .56, 1];
  1072. this.ze[n] = {
  1073. Ie: randomRange(0, _2PI),
  1074. Je: .66 * randomRange(.09, .16),
  1075. Ke: randomRange(0, 1),
  1076. Le: randomRange(0, 1),
  1077. Me: s[0],
  1078. Ne: s[1],
  1079. Oe: s[2]
  1080. }
  1081. }
  1082. this.Sa()
  1083. }, t.tc = !1, t.Pe = function(e) {
  1084. t.tc = e
  1085. }, t.prototype.Sa = function() {
  1086. var t = window.devicePixelRatio ? window.devicePixelRatio : 1,
  1087. e = this.te.width(),
  1088. i = this.te.height();
  1089. this.ve.resize(e, i), this.ve.resolution = t, this.ue.width = t * e, this.ue.height = t * i;
  1090. for (var o = .8 * Math.max( e, i), n = 0; n < this.xe.length; n++) this.xe[n].width = o, this.xe[n].height = o
  1091. }, t.prototype.Qa = function(e, i) {
  1092. if (t.tc) {
  1093. for (var s = e / 1e3, a = this.te.width(), h = this.te.height(), l = 0; l < this.xe.length; l++) {
  1094. var p = r[l % r.length],
  1095. u = this.xe[l],
  1096. c = o(p.De * (.08 * s) + p.Be),
  1097. f = n(p.Ee * (.08 * s)),
  1098. d = .2 + .2 * o(p.Be + p.Ce * s);
  1099. u.tint = p.Fe, u.alpha = d, u.position.set(a * (.2 + .5 * (c + 1) * .6), h * (.1 + .5 * (f + 1) * .8))
  1100. }
  1101. for (var g = .05 * Math.max( a, h), w = 0; w < this.ye.length; w++) {
  1102. var y = this.ze[w],
  1103. k = this.ye[w],
  1104. v = _2PI * w / this.ye.length;
  1105. y.Ke = .2 + .6 * (Math.cos(.01 * s + v) + .2 * Math.cos(.02 * s * 17 + v) + 1) / 2, y.Le = .1 + .8 * (Math.sin(.01 * s + v) + .2 * Math.sin(.02 * s * 21 + v) + 1) / 2;
  1106. var b = y.Ke,
  1107. m = y.Le,
  1108. C = clamp(Math.pow(Math.cos(1.5 * (v + .048 * s)), 6), 0, .9),
  1109. P = 1.3 * (.4 + .5 * (1 + Math.sin(v + .12 * s)) * 1.2);
  1110. k.alpha = C, k.tint = 16777215 & ((255 & parseInt(255 * y.Me)) << 16 | (255 & parseInt(255 * y.Ne)) << 8 | 255 & parseInt(255 * y.Oe)), k.position.set(a * b, h * m), k.rotation = 0;
  1111. var B = k.texture.width / k.texture.height;
  1112. k.width = P * g, k.height = P * g * B
  1113. }
  1114. this.ve.render(this.we, null, !0)
  1115. }
  1116. }, t
  1117. }(),
  1118. Cookies = function() {
  1119. function t() {}
  1120. return t.Oa = "consent_state_2", t.za = "showPlayerNames", t.Qe = "musicEnabled", t.Re = "sfxEnabled", t.Se = "account_type", t.wa = "gameMode", t.Ba = "nickname", t.Ca = "skin", t.d = "prerollCount", t.Ma = "shared", t
  1121. }(),
  1122. EEAMap = function() {
  1123. function t(t, e, i) {
  1124. for (var o = !1, n = i.length, r = 0, s = n - 1; r < n; s = r++) i[r][1] > e != i[s][1] > e && t < (i[s][0] - i[r][0]) * (e - i[r][1]) / (i[s][1] - i[r][1]) + i[r][0] && (o = !o);
  1125. return o
  1126. }
  1127. var e = [
  1128. [-28.06744, 64.95936],
  1129. [-10.59082, 72.91964],
  1130. [14.11773, 81.39558],
  1131. [36.51855, 81.51827],
  1132. [32.82715, 71.01696],
  1133. [31.64063, 69.41897],
  1134. [29.41419, 68.43628],
  1135. [30.64379, 67.47302],
  1136. [29.88281, 66.76592],
  1137. [30.73975, 65.50385],
  1138. [30.73975, 64.47279],
  1139. [31.48682, 63.49957],
  1140. [32.18994, 62.83509],
  1141. [28.47726, 60.25122],
  1142. [28.76221, 59.26588],
  1143. [28.03711, 58.60833],
  1144. [28.38867, 57.53942],
  1145. [28.83955, 56.2377],
  1146. [31.24512, 55.87531],
  1147. [31.61865, 55.34164],
  1148. [31.92627, 54.3037],
  1149. [33.50497, 53.26758],
  1150. [32.73926, 52.85586],
  1151. [32.23389, 52.4694],
  1152. [34.05762, 52.44262],
  1153. [34.98047, 51.79503],
  1154. [35.99121, 50.88917],
  1155. [36.67236, 50.38751],
  1156. [37.74902, 50.51343],
  1157. [40.78125, 49.62495],
  1158. [40.47363, 47.70976],
  1159. [38.62799, 46.92028],
  1160. [37.53193, 46.55915],
  1161. [36.72182, 44.46428],
  1162. [39.68218, 43.19733],
  1163. [40.1521, 43.74422],
  1164. [43.52783, 43.03678],
  1165. [45.30762, 42.73087],
  1166. [46.99951, 41.98399],
  1167. [47.26318, 40.73061],
  1168. [44.20009, 40.86309],
  1169. [45.35156, 39.57182],
  1170. [45.43945, 36.73888],
  1171. [35.64789, 35.26481],
  1172. [33.13477, 33.65121],
  1173. [21.47977, 33.92486],
  1174. [12.16268, 34.32477],
  1175. [11.82301, 37.34239],
  1176. [6.09112, 38.28597],
  1177. [-1.96037, 35.62069],
  1178. [-4.82156, 35.60443],
  1179. [-7.6498, 35.26589],
  1180. [-16.45237, 37.44851],
  1181. [-28.06744, 64.95936]
  1182. ];
  1183. return {
  1184. Pa: function(i, o) {
  1185. return t(o, i, e)
  1186. }
  1187. }
  1188. }(),
  1189. FloatingStringManager = function() {
  1190. function t(t) {
  1191. var e = void 0;
  1192. e = t > 0 ? "+" + Math.floor(t) : t < 0 ? "-" + Math.floor(t) : "0";
  1193. var o = Math.min(1.5, .5 + t / 600),
  1194. r = void 0;
  1195. if (t < 1) r = "0xFFFFFF";
  1196. else if (t < 30) {
  1197. var s = (t - 1) / 29;
  1198. r = i(1 * (1 - s) + .96 * s, 1 * (1 - s) + .82 * s, 1 * (1 - s) + 0 * s)
  1199. } else if (t < 300) {
  1200. var a = (t - 30) / 270;
  1201. r = i(.96 * (1 - a) + .93 * a, .82 * (1 - a) + .34 * a, 0 * (1 - a) + .25 * a)
  1202. } else if (t < 700) {
  1203. var h = (t - 300) / 400;
  1204. r = i(.93 * (1 - h) + .98 * h, .34 * (1 - h) + 0 * h, .25 * (1 - h) + .98 * h)
  1205. } else r = i(.98, 0, .98);
  1206. var l = Math.random(),
  1207. p = 1 + .5 * Math.random();
  1208. return new n(e, r, !0, .5, o, l, p)
  1209. }
  1210.  
  1211. function e(t, e) {
  1212. var o = void 0,
  1213. r = void 0;
  1214. return e ? (o = 1.3, r = i(.93, .34, .25)) : (o = 1.1, r = i(.96, .82, 0)), new n(t, r, !0, .5, o, .5, .7)
  1215. }
  1216.  
  1217. function i(t, e, i) {
  1218. return ((255 * t & 255) << 16) + ((255 * e & 255) << 8) + (255 * i & 255)
  1219. }
  1220. var o = extend(POGL.$b, function() {
  1221. POGL.$b.call(this), this.Te = [], this.Ue = 0
  1222. });
  1223. o.prototype.Ve = function(e) {
  1224. if (this.Ue += e, this.Ue >= 1) {
  1225. var i = Math.floor(this.Ue);
  1226. this.Ue -= i;
  1227. var o = t(i);
  1228. this.addChild(o), this.Te.push(o)
  1229. }
  1230. }, o.prototype.We = function(t) {
  1231. if (t) {
  1232. var i = e(i18n("index.game.floating.headshot"), !0);
  1233. this.addChild(i), this.Te.push(i)
  1234. } else {
  1235. var o = e(i18n("index.game.floating.wellDone"), !1);
  1236. this.addChild(o), this.Te.push(o)
  1237. }
  1238. }, o.prototype.Xe = function(t, e) {
  1239. for (var i = getApp().s.H.xb, o = i.ve.width / i.ve.resolution, n = i.ve.height / i.ve.resolution, r = 0; r < this.Te.length;) {
  1240. var s = this.Te[r];
  1241. s.Ye = s.Ye + e / 2e3 * s.Ze, s.$e = s.$e + e / 2e3 * s._e, s.alpha = .5 * Math.sin(Math.PI * s.$e), s.scale.set(s.Ye), s.position.x = o * (.25 + .5 * s.af), s.position.y = s.bf ? n * (1 - .5 * (1 + s.$e)) : n * (1 - .5 * (0 + s.$e)), s.$e > 1 && (pixijs_removeFromParent(s), this.Te.splice(r, 1), r--), r++
  1242. }
  1243. };
  1244. var n = function() {
  1245. return extend(POGL.gc, function(t, e, i, o, n, r, s) {
  1246. POGL.gc.call(this, t, {
  1247. fill: e,
  1248. fontFamily: "PTSans",
  1249. fontSize: 36
  1250. }), this.anchor.set(.5), this.bf = i, this.Ye = o, this.Ze = n, this.af = r, this.$e = 0, this._e = s
  1251. })
  1252. }();
  1253. return o
  1254. }(),
  1255. FSTexture = function() {
  1256. function t(t, e) {
  1257. this.Hc = t, this.Ic = e
  1258. }
  1259. return t
  1260. }(),
  1261. GameMode = {
  1262. cf: 0,
  1263. df: 16
  1264. },
  1265. GameParams = function() {
  1266. function t() {
  1267. this.ef = GameMode.cf, this.ff = 0, this.vb = 500, this.gf = 4e3, this.hf = 7e3
  1268. }
  1269. return t.TEAM_DEFAULT = 0, t.prototype.if = function() {
  1270. return 1.02 * this.vb
  1271. }, t
  1272. }(),
  1273. GameView = function() {
  1274. function t(t) {
  1275. this.te = t, this.ue = t.get()[0], this.ve = new POGL.bc({
  1276. view: this.ue,
  1277. backgroundColor: e,
  1278. antialias: !0
  1279. }), this.we = new POGL.$b, this.we.sortableChildren = !0, this.jf = Math.floor(360 * Math.random()), this.kf = 0, this.lf = 0, this.mf = 15, this.nf = .5, this.pf = 0, this.qf = new WMGameBackgroundSprite, this.rf = new POGL.cc, this.sf = new POGL.$b, this.tf = new POGL.$b, this.tf.sortableChildren = !0, this.uf = new POGL.$b, this.vf = new POGL.$b, this.vf.sortableChildren = !0, this.wf = new POGL.$b, this.xf = new i, this.yf = new o, this.zf = new n, this.Af = new FloatingStringManager, this.Bf = new POGL.fc, this.Cf = {
  1280. x: 0,
  1281. y: 0
  1282. }, this.a()
  1283. }
  1284. var e = 0;
  1285. t.prototype.a = function() {
  1286. this.ve.backgroundColor = e, this.qf.Df.zIndex = 10, this.we.addChild(this.qf.Df), this.rf.zIndex = 20, this.we.addChild(this.rf), this.sf.zIndex = 5e3, this.we.addChild(this.sf), this.tf.zIndex = 5100, this.we.addChild(this.tf), this.uf.zIndex = 1e4, this.we.addChild(this.uf), this.Bf.texture = getApp().q.Ef, this.Bf.anchor.set(.5), this.Bf.zIndex = 1, this.vf.addChild(this.Bf), this.wf.alpha = .6, this.wf.zIndex = 2, this.vf.addChild(this.wf), this.Af.zIndex = 3, this.vf.addChild(this.Af), this.xf.alpha = .8, this.xf.zIndex = 4, this.vf.addChild(this.xf), this.yf.zIndex = 5, this.vf.addChild(this.yf), this.zf.zIndex = 6, this.vf.addChild(this.zf), this.Sa()
  1287. }, t.prototype.Sa = function() {
  1288. var t = window.devicePixelRatio ? window.devicePixelRatio : 1,
  1289. e = this.te.width(),
  1290. i = this.te.height();
  1291. this.ve.resize(e, i), this.ve.resolution = t, this.ue.width = t * e, this.ue.height = t * i, this.nf = Math.min(Math.min(e, i), window.multiplier * Math.max( e, i)), this.Bf.position.x = e / 2, this.Bf.position.y = i / 2, this.Bf.width = e, this.Bf.height = i, this.xf.position.x = 60, this.xf.position.y = 60, this.yf.position.x = 110, this.yf.position.y = 10, this.zf.position.x = e - 225, this.zf.position.y = 1
  1292. window.changedNf = () => this.nf = Math.min(Math.min(e, i), window.multiplier * Math.max( e, i));
  1293. }, t.prototype.Xe = function(t, e) {
  1294. var i = getApp();
  1295. this.mf = 15, this.sf.removeChildren(), this.tf.removeChildren(), this.uf.removeChildren(), this.wf.removeChildren(), this.qf.Ff(t.ef == GameMode.cf ? i.q.Gf : i.q.Hf);
  1296. var o = this.rf;
  1297. o.clear(), o.lineStyle(.2, 16711680, .3), o.drawCircle(0, 0, t.vb), o.endFill(), this.zf.If = e, this.wf.visible = e
  1298. }, t.prototype.Qa = function(t, e) {
  1299. if (!(this.ve.width <= 5)) {
  1300. var i = getApp(),
  1301. o = i.o.N,
  1302. n = this.ve.width / this.ve.resolution,
  1303. r = this.ve.height / this.ve.resolution;
  1304. this.mf = timeDeltaIncrement(this.mf, i.o.kb, e, .002);
  1305. var s = this.nf / this.mf,
  1306. a = i.o.N.Jf[Ability.ZOOM_TYPE],
  1307. h = null != a && a.tc;
  1308. this.pf = minmax(0, 1, this.pf + e / 1e3 * (.1 * (h ? 1 : 0) - this.pf)), this.Bf.alpha = this.pf, this.jf = this.jf + .01 * e, this.jf > 360 && (this.jf = this.jf % 360), this.kf = Math.sin(t / 1200 * 2 * Math.PI);
  1309. var l = o.Kf();
  1310. this.Cf.x = linearApproach(this.Cf.x, l.x, e, .5, 33.333), this.Cf.y = linearApproach(this.Cf.y, l.y, e, .5, 33.333);
  1311. var p = n / s / 2,
  1312. u = r / s / 2;
  1313. i.o.zb(this.Cf.x - 1.3 * p, this.Cf.x + 1.3 * p, this.Cf.y - 1.3 * u, this.Cf.y + 1.3 * u), this.qf.Xe(this.Cf.x, this.Cf.y, 2 * p, 2 * u);
  1314. var c = i.o.gb.vb;
  1315. this.we.scale.x = s, this.we.scale.y = s, this.we.position.x = n / 2 - this.Cf.x * s, this.we.position.y = r / 2 - this.Cf.y * s;
  1316. var f = Math.hypot(l.x, l.y);
  1317. if (f > c - 10) {
  1318. this.lf = minmax(0, 1, 1 + (f - c) / 10);
  1319. var d = Math.cos(this.jf * _2PI / 360) * (1 - this.lf) + 1 * this.lf,
  1320. g = Math.sin(this.jf * _2PI / 360) * (1 - this.lf),
  1321. w = (Math.atan2(g, d) + _2PI) % _2PI * 360 / _2PI,
  1322. y = this.lf * (.5 + .5 * this.kf),
  1323. k = convertHSLtoRGB(Math.floor(w), 1, .75 - .25 * this.lf);
  1324. this.qf.Lf(k[0], k[1], k[2], .1 + .2 * y)
  1325. } else {
  1326. this.lf = 0;
  1327. var v = convertHSLtoRGB(Math.floor(this.jf), 1, .75);
  1328. this.qf.Lf(v[0], v[1], v[2], .1)
  1329. }
  1330. for (var b = 0; b < this.wf.children.length; b++) {
  1331. var m = this.wf.children[b];
  1332. m.position.x = n / 2 - (this.Cf.x - m.Mf.x) * s, m.position.y = r / 2 - (this.Cf.y - m.Mf.y) * s
  1333. }
  1334. this.xf.Nf.position.x = l.x / c * this.xf.Of, this.xf.Nf.position.y = l.y / c * this.xf.Of, this.yf.Ra(t), this.Af.Xe(t, e), this.ve.render(this.we, null, !0), this.ve.render(this.vf, null, !1)
  1335. }
  1336. }, t.prototype.Pf = function(t, e) {
  1337. e.Sf.Rf.Qf().zIndex = (t + 2147483648) / 4294967296 * 5e3, this.sf.addChild(e.Sf.Tf.Qf()), this.tf.addChild(e.Sf.Rf.Qf())
  1338. }, t.prototype.Uf = function(t, e, i) {
  1339. e.Vf.zIndex = getApp().o.gb.ff ? 0 : 10 + (t + 32768) / 65536 * 5e3, this.uf.addChild(e.Vf), t != getApp().o.gb.ff && this.wf.addChild(i)
  1340. };
  1341. var i = function() {
  1342. return extend(POGL.$b, function() {
  1343. POGL.$b.call(this), this.Of = 40, this.Wf = new POGL.fc, this.Wf.anchor.set(.5), this.Nf = new POGL.cc;
  1344. var t = new POGL.cc;
  1345. t.beginFill("black", .4), t.drawCircle(0, 0, this.Of), t.endFill(), t.lineStyle(2, 16225317), t.drawCircle(0, 0, this.Of), t.moveTo(0, -this.Of), t.lineTo(0, +this.Of), t.moveTo(-this.Of, 0), t.lineTo(+this.Of, 0), t.endFill(), this.Wf.alpha = .5, this.Nf.zIndex = 2, this.Nf.alpha = .9, this.Nf.beginFill(16225317), this.Nf.drawCircle(0, 0, .06 * this.Of), this.Nf.endFill(), this.Nf.lineStyle(1, "black"), this.Nf.drawCircle(0, 0, .06 * this.Of), this.Nf.endFill(), this.addChild(t), this.addChild(this.Wf), this.addChild(this.Nf)
  1346. })
  1347. }(),
  1348. o = function() {
  1349. var t = extend(POGL.$b, function() {
  1350. POGL.$b.call(this), this.Xf = {}
  1351. });
  1352. t.prototype.Ra = function(t) {
  1353. var e = .5 + .5 * Math.cos(_2PI * (t / 1e3 / 1.6));
  1354. for (var i in this.Xf) {
  1355. var o = this.Xf[i],
  1356. n = o.Yf;
  1357. o.alpha = 1 - n + n * e
  1358. }
  1359. }, t.prototype.Xe = function(t) {
  1360. for (var i in this.Xf) null != t[i] && t[i].tc || (pixijs_removeFromParent(this.Xf[i]), delete this.Xf[i]);
  1361. var o = 0;
  1362. for (var n in t) {
  1363. var r = t[n];
  1364. if (r.tc) {
  1365. var s = this.Xf[n];
  1366. if (!s) {
  1367. var a = getApp().p.Ec().md(r.sc).$c;
  1368. s = new e, s.texture = a.Ic, s.width = 40, s.height = 40, this.Xf[n] = s, this.addChild(s)
  1369. }
  1370. s.Yf = r.uc, s.position.x = o, o += 40
  1371. }
  1372. }
  1373. };
  1374. var e = function() {
  1375. return extend(POGL.fc, function() {
  1376. POGL.fc.call(this), this.Yf = 0
  1377. })
  1378. }();
  1379. return t
  1380. }(),
  1381. n = function() {
  1382. var t = extend(POGL.$b, function() {
  1383. POGL.$b.call(this), this.If = !0, this.Zf = 12, this.$f = 9, this.Te = [];
  1384. for (var t = 0; t < 14; t++) this._f()
  1385. });
  1386. t.prototype.Xe = function(t) {
  1387. var e = getApp(),
  1388. i = e.o.gb.ef == GameMode.df,
  1389. o = 0,
  1390. n = 0;
  1391. n >= this.Te.length && this._f(), this.Te[n].ag(1, "white"), this.Te[n].bg("", i18n("index.game.leader.top10"), "(" + e.o.ub + " online)"), this.Te[n].position.y = o, o += this.Zf, n += 1, t.cg.length > 0 && (o += this.$f);
  1392. for (var r = 0; r < t.cg.length; r++) {
  1393. var s = t.cg[r],
  1394. a = e.p.Ec().fd(s.dg);
  1395. n >= this.Te.length && this._f(), this.Te[n].ag(.8, a.cd.ad), this.Te[n].bg("" + (r + 1), i18nCustomBundle(a.bd), "" + Math.floor(s.M)), this.Te[n].position.y = o, o += this.Zf, n += 1
  1396. }
  1397. t.eg.length > 0 && (o += this.$f);
  1398. for (var h = 0; h < t.eg.length; h++) {
  1399. var l = t.eg[h],
  1400. p = e.o.gb.ff == l.fg,
  1401. u = void 0,
  1402. c = void 0;
  1403. if (p) u = "white", c = e.o.N.Nb.bd;
  1404. else {
  1405. var f = e.o.ib[l.fg];
  1406. null != f ? (u = i ? e.p.Ec().fd(f.Nb.gg).cd.ad : e.p.Ec().ed(f.Nb.hg).ad, c = this.If ? f.Nb.bd : "---") : (u = "gray", c = "?")
  1407. }
  1408. p && (o += this.$f), n >= this.Te.length && this._f(), this.Te[n].ag(p ? 1 : .8, u), this.Te[n].bg("" + (h + 1), c, "" + Math.floor(l.M)), this.Te[n].position.y = o, o += this.Zf, n += 1, p && (o += this.$f)
  1409. }
  1410. for (e.o.O > t.eg.length && (o += this.$f, n >= this.Te.length && this._f(), this.Te[n].ag(1, "white"), this.Te[n].bg("" + e.o.O, e.o.N.Nb.bd, "" + Math.floor(e.o.N.M)), this.Te[n].position.y = o, o += this.Zf, n += 1, o += this.$f); this.Te.length > n;) pixijs_removeFromParent(this.Te.pop())
  1411. }, t.prototype._f = function() {
  1412. var t = new e;
  1413. t.position.y = 0, this.Te.length > 0 && (t.position.y = this.Te[this.Te.length - 1].position.y + this.Zf), this.Te.push(t), this.addChild(t)
  1414. };
  1415. var e = function() {
  1416. var t = extend(POGL.$b, function() {
  1417. POGL.$b.call(this), this.ig = new POGL.gc("", {
  1418. fontFamily: "PTSans",
  1419. fontSize: 12,
  1420. fill: "white"
  1421. }), this.ig.anchor.x = 1, this.ig.position.x = 30, this.addChild(this.ig), this.jg = new POGL.gc("", {
  1422. fontFamily: "PTSans",
  1423. fontSize: 12,
  1424. fill: "white"
  1425. }), this.jg.anchor.x = 0, this.jg.position.x = 35, this.addChild(this.jg), this.kg = new POGL.gc("", {
  1426. fontFamily: "PTSans",
  1427. fontSize: 12,
  1428. fill: "white"
  1429. }), this.kg.anchor.x = 1, this.kg.position.x = 220, this.addChild(this.kg)
  1430. });
  1431. return t.prototype.bg = function(t, e, i) {
  1432. this.ig.text = t, this.kg.text = i;
  1433. var o = e;
  1434. for (this.jg.text = o; this.jg.width > 100;) o = o.substring(0, o.length - 1), this.jg.text = o + ".."
  1435. }, t.prototype.ag = function(t, e) {
  1436. this.ig.alpha = t, this.ig.style.fill = e, this.jg.alpha = t, this.jg.style.fill = e, this.kg.alpha = t, this.kg.style.fill = e
  1437. }, t
  1438. }();
  1439. return t
  1440. }();
  1441. return t
  1442. }(),
  1443. MessageProcessor = function() {
  1444. function t(t) {
  1445. this.o = t, this.lg = [], this.mg = 0
  1446. }
  1447. t.prototype.Yb = function(t) {
  1448. this.lg.push(new DataView(t))
  1449. }, t.prototype.Tb = function() {
  1450. this.lg = [], this.mg = 0
  1451. }, t.prototype.Cb = function() {
  1452. for (var t = 0; t < 10; t++) {
  1453. if (0 === this.lg.length) return;
  1454. var e = this.lg.shift();
  1455. try {
  1456. this.ng(e)
  1457. } catch (t) {
  1458. throw console.log("DataReader error: " + t), t
  1459. }
  1460. }
  1461. }, t.prototype.ng = function(t) {
  1462. switch (255 & t.nc(0)) {
  1463. case 0:
  1464. return void this.og(t, 1);
  1465. case 1:
  1466. return void this.pg(t, 1);
  1467. case 2:
  1468. return void this.qg(t, 1);
  1469. case 3:
  1470. return void this.rg(t, 1);
  1471. case 4:
  1472. return void this.sg(t, 1);
  1473. case 5:
  1474. return void this.tg(t, 1)
  1475. }
  1476. }, t.prototype.og = function(t, e) {
  1477. console.log("sgp1"), this.o.gb.ef = t.nc(e), e += 1;
  1478. var i = t.oc(e);
  1479. return e += 2, this.o.gb.ff = i, this.o.N.Nb.Mb = i, this.o.gb.vb = t.qc(e), e += 4, this.o.gb.gf = t.qc(e), e += 4, this.o.gb.hf = t.qc(e), e += 4, getApp().s.H.xb.Xe(this.o.gb, getApp().s.ya.xa()), console.log("sgp2"), e
  1480. }, t.prototype.pg = function(t, e) {
  1481. var i = this.mg++,
  1482. o = t.oc(e);
  1483. e += 2;
  1484. var n = void 0;
  1485. n = this.ug(t, e), e += this.vg(n);
  1486. for (var r = 0; r < n; r++) e = this.wg(t, e);
  1487. n = this.ug(t, e), e += this.vg(n);
  1488. for (var s = 0; s < n; s++) e = this.xg(t, e);
  1489. n = this.ug(t, e), e += this.vg(n);
  1490. for (var a = 0; a < n; a++) e = this.yg(t, e);
  1491. n = this.ug(t, e), e += this.vg(n);
  1492. for (var h = 0; h < n; h++) e = this.zg(t, e);
  1493. n = this.ug(t, e), e += this.vg(n);
  1494. for (var l = 0; l < n; l++) e = this.Ag(t, e);
  1495. n = this.ug(t, e), e += this.vg(n);
  1496. for (var p = 0; p < n; p++) e = this.Bg(t, e);
  1497. n = this.ug(t, e), e += this.vg(n);
  1498. for (var u = 0; u < n; u++) e = this.Cg(t, e);
  1499. n = this.ug(t, e), e += this.vg(n);
  1500. for (var c = 0; c < n; c++) e = this.Dg(t, e);
  1501. return i > 0 && (e = this.Eg(t, e)), this.o.Rb(i, o), e
  1502. }, t.prototype.zg = function(t, e) {
  1503. var i = new Worm.Config;
  1504. i.Mb = t.oc(e), e += 2, i.gg = this.o.gb.ef == GameMode.df ? t.nc(e++) : GameParams.TEAM_DEFAULT, i.hg = t.oc(e), e += 2, i.Fg = t.oc(e), e += 2, i.Gg = t.oc(e), e += 2, i.Hg = t.oc(e), e += 2, i.Ig = t.oc(e), e += 2;
  1505. var o = t.nc(e);
  1506. e += 1;
  1507. for (var n = "", r = 0; r < o; r++) n += String.fromCharCode(t.oc(e)), e += 2;
  1508. if (i.bd = n, this.o.gb.ff === i.Mb) this.o.N.Jg(i);
  1509. else {
  1510. var s = this.o.ib[i.Mb];
  1511. null != s && s.Lb();
  1512. var a = new Worm(this.o.gb);
  1513. a.wb(getApp().s.H.xb), this.o.ib[i.Mb] = a, a.Jg(i)
  1514. }
  1515. return e
  1516. }, t.prototype.Ag = function(t, e) {
  1517. var i = t.oc(e);
  1518. e += 2;
  1519. var o = t.nc(e);
  1520. e++;
  1521. var n = !!(1 & o),
  1522. r = !!(2 & o),
  1523. s = 0;
  1524. n && (s = t.oc(e), e += 2);
  1525. var a = this.Kg(i);
  1526. if (void 0 === a) return e;
  1527. if (a.Jb = !1, !a.Ib) return e;
  1528. var h = this.Kg(i);
  1529. if (n && void 0 !== h && h.Ib)
  1530. if (s === this.o.gb.ff) {
  1531. var l = this.o.N.Kf(),
  1532. p = a.Lg(l.x, l.y);
  1533. Math.max( 0, 1 - p.distance / (.5 * this.o.kb));
  1534. p.distance < .5 * this.o.kb && getApp().s.H.xb.Af.We(r)
  1535. } else if (i === this.o.gb.ff);
  1536. else {
  1537. var u = this.o.N.Kf(),
  1538. c = a.Lg(u.x, u.y);
  1539. Math.max( 0, 1 - c.distance / (.5 * this.o.kb))
  1540. } else if (i === this.o.gb.ff);
  1541. else {
  1542. var f = this.o.N.Kf(),
  1543. d = a.Lg(f.x, f.y);
  1544. Math.max( 0, 1 - d.distance / (.5 * this.o.kb))
  1545. }
  1546. return e
  1547. }, t.prototype.Dg = function(t, e) {
  1548. var i = t.oc(e);
  1549. e += 2;
  1550. var o = i === this.o.gb.ff ? null : this.o.ib[i],
  1551. n = t.nc(e);
  1552. e += 1;
  1553. var r = !!(1 & n);
  1554. if (!!(2 & n)) {
  1555. var s = t.qc(e);
  1556. e += 4, o && o.Mg(s)
  1557. }
  1558. var a = this.Ng(t.nc(e++), t.nc(e++), t.nc(e++)),
  1559. h = this.Ng(t.nc(e++), t.nc(e++), t.nc(e++));
  1560. if (o) {
  1561. o.Og(a, h, r);
  1562. var l = this.o.N.Kf(),
  1563. p = o.Kf(),
  1564. u = Math.max( 0, 1 - Math.hypot(l.x - p.x, l.y - p.y) / (.5 * this.o.kb));
  1565. getApp().r.$d(u, i, r)
  1566. }
  1567. var c = this.ug(t, e);
  1568. if (e += this.vg(c), o)
  1569. for (var f in o.Jf) {
  1570. var d = o.Jf[f];
  1571. d && (d.tc = !1)
  1572. }
  1573. for (var g = 0; g < c; g++) {
  1574. var w = t.nc(e);
  1575. e++;
  1576. var y = t.nc(e);
  1577. if (e++, o) {
  1578. var k = o.Jf[w];
  1579. k || (k = o.Jf[w] = new Ability(w)), k.tc = !0, k.uc = Math.min( 1, Math.max( 0, y / 100))
  1580. }
  1581. }
  1582. return e
  1583. }, t.prototype.Eg = function(t, e) {
  1584. var i = this.o.N,
  1585. o = t.nc(e);
  1586. e += 1;
  1587. var n = !!(1 & o),
  1588. r = !!(2 & o),
  1589. s = !!(4 & o);
  1590. if (r) {
  1591. var a = i.M;
  1592. i.Mg(t.qc(e)), e += 4, a = i.M - a, a > 0 && getApp().s.H.xb.Af.Ve(a)
  1593. }
  1594. s && (this.o.jb = t.qc(e), e += 4);
  1595. var h = this.Ng(t.nc(e++), t.nc(e++), t.nc(e++)),
  1596. l = this.Ng(t.nc(e++), t.nc(e++), t.nc(e++));
  1597. i.Og(h, l, n), getApp().r.$d(.5, this.o.gb.ff, n);
  1598. var p = this.ug(t, e);
  1599. e += this.vg(p);
  1600. for (var u in i.Jf) {
  1601. var c = i.Jf[u];
  1602. c && (c.tc = !1)
  1603. }
  1604. for (var f = 0; f < p; f++) {
  1605. var d = t.nc(e);
  1606. e++;
  1607. var g = t.nc(e);
  1608. e++;
  1609. var w = i.Jf[d];
  1610. w || (w = new Ability(d), i.Jf[d] = w), w.tc = !0, w.uc = Math.min(1, Math.max( 0, g / 100))
  1611. }
  1612. getApp().s.H.xb.yf.Xe(i.Jf)
  1613. }, t.prototype.Bg = function(t, e) {
  1614. var i = this,
  1615. o = t.oc(e);
  1616. e += 2;
  1617. var n = this.Kg(o),
  1618. r = t.qc(e);
  1619. e += 4;
  1620. var s = this.ug(t, e);
  1621. if (e += this.vg(s), n) {
  1622. n.Mg(r), n.Pg(function() {
  1623. return i.Ng(t.nc(e++), t.nc(e++), t.nc(e++))
  1624. }, s), n.Qg(!0);
  1625. var a = this.o.N.Kf(),
  1626. h = n.Kf(),
  1627. l = Math.max( 0, 1 - Math.hypot(a.x - h.x, a.y - h.y) / (.5 * this.o.kb));
  1628. getApp().r.Yd(l, o)
  1629. } else e += 6 * s;
  1630. return e
  1631. }, t.prototype.Cg = function(t, e) {
  1632. var i = t.oc(e);
  1633. e += 2;
  1634. var o = this.o.ib[i];
  1635. return o && o.Jb && o.Qg(!1), getApp().r.Zd(i), e
  1636. }, t.prototype.wg = function(t, e) {
  1637. var i = new Portion.Config;
  1638. i.Mb = t.pc(e), e += 4, i.gg = this.o.gb.ef === GameMode.df ? t.nc(e++) : GameParams.TEAM_DEFAULT, i.Rg = this.Ng(t.nc(e++), t.nc(e++), t.nc(e++)), i.hg = t.nc(e++);
  1639. var o = this.o.hb[i.Mb];
  1640. null != o && o.Lb();
  1641. var n = new Portion(i, getApp().s.H.xb);
  1642. return n.Sg(this.Tg(i.Mb), this.Ug(i.Mb), !0), this.o.hb[i.Mb] = n, e
  1643. }, t.prototype.xg = function(t, e) {
  1644. var i = t.pc(e);
  1645. e += 4;
  1646. var o = this.o.hb[i];
  1647. return o && (o.Vg = 0, o.Wg = 1.5 * o.Wg, o.Ob = !0), e
  1648. }, t.prototype.yg = function(t, e) {
  1649. var i = t.pc(e);
  1650. e += 4;
  1651. var o = t.oc(e);
  1652. e += 2;
  1653. var n = this.o.hb[i];
  1654. if (n) {
  1655. n.Vg = 0, n.Wg = .1 * n.Wg, n.Ob = !0;
  1656. var r = this.Kg(o);
  1657. if (r && r.Ib) {
  1658. var s = (this.o.gb.ff, r.Kf());
  1659. n.Sg(s.x, s.y, !1)
  1660. }
  1661. }
  1662. return e
  1663. };
  1664. var e = [34, 29, 26, 24, 22, 20, 18, 17, 15, 14, 13, 12, 11, 10, 9, 8, 8, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 20, 22, 24, 26, 29, 34];
  1665. return t.prototype.qg = function(t) {
  1666. for (var i = getApp().q.Yg.Xg, o = i.getImageData(0, 0, 80, 80), n = e[0], r = 80 - n, s = 0, a = 0; a < 628; a++)
  1667. for (var h = t.nc(1 + a), l = 0; l < 8; l++) {
  1668. var p = 0 != (h >> l & 1),
  1669. u = 4 * (n + 80 * s);
  1670. p ? (o.data[u] = 255, o.data[u + 1] = 255, o.data[u + 2] = 255, o.data[u + 3] = 255) : o.data[u + 3] = 0, ++n >= r && ++s < 80 && (n = e[s], r = 80 - n)
  1671. }
  1672. i.putImageData(o, 0, 0);
  1673. var c = getApp().s.H.xb.xf.Wf;
  1674. c.texture = getApp().q.Yg.Ic, c.texture.update()
  1675. }, t.prototype.sg = function(t, e) {
  1676. var i = t.pc(e);
  1677. e += 4, console.log("Wormy Error: " + i)
  1678. }, t.prototype.tg = function(t, e) {
  1679. console.log("g.o"), this.o.Sb()
  1680. }, t.prototype.rg = function(t, e) {
  1681. this.o.ub = t.oc(e), e += 2, this.o.O = t.oc(e), e += 2;
  1682. var i = new ScoreTableModel;
  1683. i.eg = [];
  1684. for (var o = t.nc(e++), n = 0; n < o; n++) {
  1685. var r = t.oc(e);
  1686. e += 2;
  1687. var s = t.qc(e);
  1688. e += 4, i.eg.push(ScoreTableModel.Zg(r, s))
  1689. }
  1690. if (i.cg = [], this.o.gb.ef === GameMode.df)
  1691. for (var a = t.nc(e++), h = 0; h < a; h++) {
  1692. var l = t.nc(e);
  1693. e += 1;
  1694. var p = t.qc(e);
  1695. e += 4, i.cg.push(ScoreTableModel.$g(l, p))
  1696. }
  1697. getApp().s.H.xb.zf.Xe(i)
  1698. }, t.prototype.Kg = function(t) {
  1699. return t === this.o.gb.ff ? this.o.N : this.o.ib[t]
  1700. }, t.prototype.Ng = function(t, e, i) {
  1701. return 1e4 * ((16777215 & (255 & i | e << 8 & 65280 | t << 16 & 16711680)) / 8388608 - 1)
  1702. }, t.prototype.Tg = function(t) {
  1703. return ((65535 & t) / 32768 - 1) * this.o.gb.if()
  1704. }, t.prototype.Ug = function(t) {
  1705. return ((t >> 16 & 65535) / 32768 - 1) * this.o.gb.if()
  1706. }, t.prototype.ug = function(t, e) {
  1707. var i = t.nc(e);
  1708. if (0 == (128 & i)) return i;
  1709. var o = t.nc(e + 1);
  1710. if (0 == (128 & o)) return o | i << 7 & 16256;
  1711. var n = t.nc(e + 2);
  1712. if (0 == (128 & n)) return n | o << 7 & 16256 | i << 14 & 2080768;
  1713. var r = t.nc(e + 3);
  1714. return 0 == (128 & r) ? r | n << 7 & 16256 | o << 14 & 2080768 | i << 21 & 266338304 : void 0
  1715. }, t.prototype.vg = function(t) {
  1716. return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : void 0
  1717. }, t
  1718. }(),
  1719. Optional = function() {
  1720. function t(t) {
  1721. this._g = t
  1722. }
  1723. return t.ah = function() {
  1724. return new Optional(null)
  1725. }, t.bh = function(t) {
  1726. return new Optional(t)
  1727. }, t.prototype.ch = function() {
  1728. return this._g
  1729. }, t.prototype.dh = function() {
  1730. return null != this._g
  1731. }, t.prototype.eh = function(t) {
  1732. null != this._g && t(this._g)
  1733. }, t
  1734. }(),
  1735. Portion = function() {
  1736. function t(t, e) {
  1737. this.Nb = t, this.fh = t.hg >= 80, this.Pb = 0, this.Qb = 0, this.gh = 0, this.hh = 0, this.Wg = this.fh ? 1 : t.Rg, this.Vg = 1, this.Ob = !1, this.ih = 0, this.jh = 0, this.Kb = 1, this.Be = 2 * Math.PI * Math.random(), this.kh = new PortionSpriteTree, this.kh.lh(getApp().o.gb.ef, this.Nb.gg === GameParams.TEAM_DEFAULT ? null : getApp().p.Ec().fd(this.Nb.gg), getApp().p.Ec().ld(this.Nb.hg)), e.Pf(t.Mb, this.kh)
  1738. }
  1739. return t.prototype.Lb = function() {
  1740. this.kh.Sf.Tf.mh(), this.kh.Sf.Rf.mh()
  1741. }, t.prototype.Sg = function(t, e, i) {
  1742. this.Pb = t, this.Qb = e, i && (this.gh = t, this.hh = e)
  1743. }, t.prototype.Gb = function(t, e) {
  1744. var i = Math.min(.5, 1 * this.Wg),
  1745. o = Math.min(2.5, 1.5 * this.Wg);
  1746. this.ih = timeDeltaIncrement(this.ih, i, e, .0025), this.jh = timeDeltaIncrement(this.jh, o, e, .0025), this.Kb = timeDeltaIncrement(this.Kb, this.Vg, e, .0025)
  1747. }, t.prototype.Hb = function(t, e, i) {
  1748. this.gh = timeDeltaIncrement(this.gh, this.Pb, e, .0025), this.hh = timeDeltaIncrement(this.hh, this.Qb, e, .0025), this.kh.Xe(this, t, e, i)
  1749. }, t.Config = function() {
  1750. function t() {
  1751. this.Mb = 0, this.gg = GameParams.TEAM_DEFAULT, this.Rg = 0, this.hg = 0
  1752. }
  1753. return t
  1754. }(), t
  1755. }(),
  1756. PortionSpriteTree = function() {
  1757. function t() {
  1758. this.Sf = new o(new WMSprite, new WMSprite), this.Sf.Tf.nh.blendMode = POGL.jc.kc, this.Sf.Tf.nh.zIndex = i, this.Sf.Rf.nh.zIndex = e
  1759. }
  1760. var e = 500,
  1761. i = 100;
  1762. t.prototype.lh = function(t, e, i) {
  1763. var o = i.$c;
  1764. null != o && this.Sf.Rf.oh(o);
  1765. var n = t == GameMode.df && null != e ? e.dd._c : i._c;
  1766. null != n && this.Sf.Tf.oh(n)
  1767. }, t.prototype.Xe = function(t, e, i, o) {
  1768. if (!o(t.gh, t.hh)) return void this.Sf.qh();
  1769. var n = t.jh * (1 + .3 * Math.cos(t.Be + e / 200));
  1770. t.fh ? this.Sf.rh(t.gh, t.hh, 2 * t.ih, 1 * t.Kb, 1.2 * n, .8 * t.Kb) : this.Sf.rh(t.gh, t.hh, 2 * t.ih, 1 * t.Kb, 2 * n, .3 * t.Kb)
  1771. };
  1772. var o = function() {
  1773. function t(t, e) {
  1774. this.Rf = t, this.Tf = e
  1775. }
  1776. return t.prototype.rh = function(t, e, i, o, n, r) {
  1777. this.Rf.Qg(!0), this.Rf.sh(t, e), this.Rf.th(i), this.Rf.uh(o), this.Tf.Qg(!0), this.Tf.sh(t, e), this.Tf.th(n), this.Tf.uh(r)
  1778. }, t.prototype.qh = function() {
  1779. this.Rf.Qg(!1), this.Tf.Qg(!1)
  1780. }, t
  1781. }();
  1782. return t
  1783. }(),
  1784. PropertyManager = function() {
  1785. function t() {
  1786. this.vh = 0, this.wh = 0, this.xh = 0, this.yh = 0, this.zh = 0, this.Ah = []
  1787. }
  1788.  
  1789. function e(t, e) {
  1790. if (!getApp().p.W()) return null;
  1791. var o = getApp().p.Bc();
  1792. if (e === PropertyType.ia) {
  1793. var n = i(o.skinArrayDict, t);
  1794. return n < 0 ? null : o.skinArrayDict[n]
  1795. }
  1796. switch (e) {
  1797. case PropertyType.ja:
  1798. return o.eyesDict[t];
  1799. case PropertyType.ka:
  1800. return o.mouthDict[t];
  1801. case PropertyType.la:
  1802. return o.glassesDict[t];
  1803. case PropertyType.ma:
  1804. return o.hatDict[t]
  1805. }
  1806. return null
  1807. }
  1808.  
  1809. function i(t, e) {
  1810. for (var i = 0; i < t.length; i++)
  1811. if (t[i].id == e) return i;
  1812. return -1
  1813. }
  1814. return t.prototype.a = function() {}, t.prototype.ha = function(t) {
  1815. switch (t) {
  1816. case PropertyType.ia:
  1817. return this.vh;
  1818. case PropertyType.ja:
  1819. return this.wh;
  1820. case PropertyType.ka:
  1821. return this.xh;
  1822. case PropertyType.la:
  1823. return this.yh;
  1824. case PropertyType.ma:
  1825. return this.zh
  1826. }
  1827. return 0
  1828. }, t.prototype.Bh = function(t) {
  1829. this.Ah.push(t), this.Ch()
  1830. }, t.prototype.Ja = function() {
  1831. if (!getApp().p.W()) return any([32, 33, 34, 35]);
  1832. for (var t = getApp().p.Bc(), e = [], i = 0; i < t.skinArrayDict.length; i++) {
  1833. var o = t.skinArrayDict[i];
  1834. this.Ka(o.id, PropertyType.ia) && e.push(o)
  1835. }
  1836. return 0 === e.length ? 0 : e[parseInt(e.length * Math.random())].id
  1837. }, t.prototype.Dh = function() {
  1838. if (getApp().p.W) {
  1839. var t = getApp().p.Bc().skinArrayDict,
  1840. e = i(t, this.vh);
  1841. if (!(e < 0)) {
  1842. for (var o = e + 1; o < t.length; o++)
  1843. if (this.Ka(t[o].id, PropertyType.ia)) return this.vh = t[o].id, void this.Ch();
  1844. for (var n = 0; n < e; n++)
  1845. if (this.Ka(t[n].id, PropertyType.ia)) return this.vh = t[n].id, void this.Ch()
  1846. }
  1847. }
  1848. }, t.prototype.Eh = function() {
  1849. if (getApp().p.W) {
  1850. var t = getApp().p.Bc().skinArrayDict,
  1851. e = i(t, this.vh);
  1852. if (!(e < 0)) {
  1853. for (var o = e - 1; o >= 0; o--)
  1854. if (this.Ka(t[o].id, PropertyType.ia)) return this.vh = t[o].id, void this.Ch();
  1855. for (var n = t.length - 1; n > e; n--)
  1856. if (this.Ka(t[n].id, PropertyType.ia)) return this.vh = t[n].id, void this.Ch()
  1857. }
  1858. }
  1859. }, t.prototype.Fh = function(t, e) {
  1860. if (!getApp().p.W() || this.Ka(t, e)) switch (e) {
  1861. case PropertyType.ia:
  1862. return void(this.vh != t && (this.vh = t, this.Ch()));
  1863. case PropertyType.ja:
  1864. return void(this.wh != t && (this.wh = t, this.Ch()));
  1865. case PropertyType.ka:
  1866. return void(this.xh != t && (this.xh = t, this.Ch()));
  1867. case PropertyType.la:
  1868. return void(this.yh != t && (this.yh = t, this.Ch()));
  1869. case PropertyType.ma:
  1870. return void(this.zh != t && (this.zh = t, this.Ch()))
  1871. }
  1872. }, t.prototype.Ka = function(t, i) {
  1873. var o = e(t, i);
  1874. return null != o && (getApp().u.P() ? 0 == o.price && !o.nonbuyable || getApp().u.Gh(t, i) : o.guest)
  1875. }, t.prototype.Ch = function() {
  1876. for (var t = 0; t < this.Ah.length; t++) this.Ah[t]()
  1877. }, t
  1878. }(),
  1879. PropertyType = function() {
  1880. function t() {}
  1881. return t.ia = "SKIN", t.ja = "EYES", t.ka = "MOUTH", t.la = "GLASSES", t.ma = "HAT", t
  1882. }(),
  1883. Region = function() {
  1884. function t(t, e, i, o, n, r, s, a, h) {
  1885. this.Ic = new POGL.ac(t, new POGL.ec(e, i, o, n)), this.Hh = e, this.Ih = i, this.Jh = o, this.Kh = n, this.Lh = r || (a || o) / 2, this.Mh = s || (h || n) / 2, this.Nh = a || o, this.Oh = h || n, this.Ph = .5 - (this.Lh - .5 * this.Nh) / this.Jh, this.Qh = .5 - (this.Mh - .5 * this.Oh) / this.Kh, this.Rh = this.Jh / this.Nh, this.Sh = this.Kh / this.Oh
  1886. }
  1887. return t
  1888. }(),
  1889. ResourceManager = function() {
  1890. function t() {
  1891. this.Ge = new POGL.ac(POGL._b.from("/images/bg-obstacle.png"));
  1892. var t = POGL._b.from("/images/confetti-saveukraine.png");
  1893. this.He = [new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256)), new POGL.ac(t, new POGL.ec(0, 0, 256, 256))], this.Gf = new POGL.ac(function() {
  1894. var t = POGL._b.from("/images/bg-pattern-ukraine2-pow2-ARENA.png");
  1895. return t.wrapMode = POGL.lc.mc, t
  1896. }()), this.Hf = new POGL.ac(function() {
  1897. var t = POGL._b.from("/images/bg-pattern-ukraine2-pow2-TEAM2.png");
  1898. return t.wrapMode = POGL.lc.mc, t
  1899. }()), this.Ef = new POGL.ac(POGL._b.from("/images/lens.png"));
  1900. var e = POGL._b.from("/images/wear-ability.png");
  1901. this.Th = new Region(e, 158, 86, 67, 124, 148, 63.5, 128, 128), this.Uh = new Region(e, 158, 4, 87, 74, 203, 63.5, 128, 128), this.Vh = new Region(e, 4, 4, 146, 146, 63.5, 63.5, 128, 128), this.Yg = function() {
  1902. var t = window.document.createElement("canvas");
  1903. return t.width = 80, t.height = 80, {
  1904. ue: t,
  1905. Xg: t.getContext("2d"),
  1906. Ic: new POGL.ac(POGL._b.from(t))
  1907. }
  1908. }(), this.Cd = {}, this.zd = {}, this.Wh = [], this.Xh = null
  1909. }
  1910. return t.prototype.a = function(t) {
  1911. function e() {
  1912. 0 == --i && t()
  1913. }
  1914. var i = 4;
  1915. this.Cd = {}, e(), this.zd = {}, e(), this.Wh = [], e(), this.Xh = null, e()
  1916. }, t
  1917. }(),
  1918. ScenesManager = function() {
  1919. function t() {
  1920. this.H = new GameViewController, this.F = new MainMenuViewController, this.Yh = new WithdrawConsentViewController, this.Zh = new DeleteAccountViewController, this.$h = new CoinsViewController, this._h = new LeadersViewController, this.ai = new ProfileViewController, this.bi = new LoginViewController, this.ya = new SettingsViewController, this.ci = new SkinsViewController, this.di = new StoreViewController, this.ei = new WearViewController, this.na = new RestrictedViewController, this.aa = new ToasterContainerViewController, this.va = new LoadingViewController, this.qa = new PrerollViewController, this.fi = [], this.gi = null
  1921. }
  1922.  
  1923. function e(t, e) {
  1924. if (0 != e) {
  1925. var i = t[e];
  1926. arraycopy(t, 0, 1, e), t[0] = i
  1927. }
  1928. }
  1929.  
  1930. function i(t, e) {
  1931. if (e != t.length + 1) {
  1932. var i = t[e];
  1933. arraycopy(t, e + 1, e, t.length - e - 1), t[t.length - 1] = i
  1934. }
  1935. }
  1936.  
  1937. function o(t, e) {
  1938. for (var i = 0; i < t.length; i++)
  1939. if (t[i] == e) return i;
  1940. return -1
  1941. }
  1942. return t.prototype.a = function() {
  1943. this.fi = [this.H, this.F, this.Yh, this.Zh, this.$h, this._h, this.ai, this.bi, this.ya, this.ci, this.di, this.ei, this.na, this.aa, this.va, this.qa];
  1944. for (var t = 0; t < this.fi.length; t++) this.fi[t].a();
  1945. this.gi = new BackgroundView(BaseViewController.hi)
  1946. }, t.prototype.Ra = function(t, e) {
  1947. for (var i = this.fi.length - 1; i >= 0; i--) this.fi[i].Qa(t, e);
  1948. this.fi[0] != this.H && this.fi[0] != this.qa && null != this.gi && this.gi.Qa(t, e)
  1949. }, t.prototype.Sa = function() {
  1950. for (var t = this.fi.length - 1; t >= 0; t--) this.fi[t].Sa();
  1951. null != this.gi && this.gi.Sa()
  1952. }, t.prototype.I = function(t) {
  1953. var i = o(this.fi, t);
  1954. if (!(i < 0)) {
  1955. this.fi[0].ii(), e(this.fi, i), this.ji()
  1956. }
  1957. }, t.prototype.ki = function() {
  1958. this.fi[0].ii();
  1959. do {
  1960. i(this.fi, 0)
  1961. } while (this.fi[0].sc != ViewControllerType.li);
  1962. this.ji()
  1963. }, t.prototype.ji = function() {
  1964. var t = this.fi[0];
  1965. t.mi(), t.ni(), this.oi()
  1966. }, t.prototype.pi = function() {
  1967. return 0 != this.fi.length && (this.fi[0].sc == ViewControllerType.li && this.aa.qi())
  1968. }, t.prototype.oi = function() {
  1969. this.pi() && this.I(this.aa)
  1970. }, t
  1971. }(),
  1972. ScoreTableModel = function() {
  1973. function t() {
  1974. this.eg = [], this.cg = []
  1975. }
  1976. return t.Zg = function(t, e) {
  1977. return {
  1978. fg: t,
  1979. M: e
  1980. }
  1981. }, t.$g = function(t, e) {
  1982. return {
  1983. dg: t,
  1984. M: e
  1985. }
  1986. }, t
  1987. }(),
  1988. UserManager = function() {
  1989. function t() {
  1990. this.ri = [], this.si = [], this.ti = [], this.vi = !1, this.wi = e, this.xi = {}, this.yi = null
  1991. }
  1992. var e = "guest";
  1993. return t.prototype.a = function() {
  1994. this.zi()
  1995. }, t.prototype.X = function() {
  1996. return this.vi ? this.xi.userId : ""
  1997. }, t.prototype.Ai = function() {
  1998. return this.vi ? this.xi.username : ""
  1999. }, t.prototype.ga = function() {
  2000. return this.vi ? this.xi.nickname : ""
  2001. }, t.prototype.Bi = function() {
  2002. return this.vi ? this.xi.avatarUrl : GUEST_AVATAR_URL
  2003. }, t.prototype.Ci = function() {
  2004. return this.vi && this.xi.isBuyer
  2005. }, t.prototype.Z = function() {
  2006. return this.vi && this.xi.isConsentGiven
  2007. }, t.prototype.Di = function() {
  2008. return this.vi ? this.xi.coins : 0
  2009. }, t.prototype.Ei = function() {
  2010. return this.vi ? this.xi.level : 1
  2011. }, t.prototype.Fi = function() {
  2012. return this.vi ? this.xi.expOnLevel : 0
  2013. }, t.prototype.Gi = function() {
  2014. return this.vi ? this.xi.expToNext : 50
  2015. }, t.prototype.Hi = function() {
  2016. return this.vi ? this.xi.skinId : 0
  2017. }, t.prototype.Ii = function() {
  2018. return this.vi ? this.xi.eyesId : 0
  2019. }, t.prototype.Ji = function() {
  2020. return this.vi ? this.xi.mouthId : 0
  2021. }, t.prototype.Ki = function() {
  2022. return this.vi ? this.xi.glassesId : 0
  2023. }, t.prototype.Li = function() {
  2024. return this.vi ? this.xi.hatId : 0
  2025. }, t.prototype.Mi = function() {
  2026. return this.vi ? this.xi.highScore : 0
  2027. }, t.prototype.Ni = function() {
  2028. return this.vi ? this.xi.bestSurvivalTimeSec : 0
  2029. }, t.prototype.Oi = function() {
  2030. return this.vi ? this.xi.kills : 0
  2031. }, t.prototype.Pi = function() {
  2032. return this.vi ? this.xi.headShots : 0
  2033. }, t.prototype.Qi = function() {
  2034. return this.vi ? this.xi.sessionsPlayed : 0
  2035. }, t.prototype.Ri = function() {
  2036. return this.vi ? this.xi.totalPlayTimeSec : 0
  2037. }, t.prototype.Si = function() {
  2038. return this.vi ? this.xi.regDate : {}
  2039. }, t.prototype.V = function(t) {
  2040. this.ri.push(t), t()
  2041. }, t.prototype.Ti = function(t) {
  2042. this.si.push(t), t()
  2043. }, t.prototype.Ui = function(t) {
  2044. this.ti.push(t)
  2045. }, t.prototype.Gh = function(t, e) {
  2046. var i = this.xi.propertyList;
  2047. if (!i) return !1;
  2048. for (var o = 0; o < i.length; o++) {
  2049. var n = i[o];
  2050. if (n.id == t && n.type === e) return !0
  2051. }
  2052. return !1
  2053. }, t.prototype.P = function() {
  2054. return this.vi
  2055. }, t.prototype.ea = function() {
  2056. return this.wi
  2057. }, t.prototype.Q = function(t) {
  2058. var e = this;
  2059. this.vi && this.Vi(function(i) {
  2060. if (i) {
  2061. var o = e.Di(),
  2062. n = e.Ei();
  2063. e.xi = i, e.Wi();
  2064. var r = e.Di(),
  2065. s = e.Ei();
  2066. s > 1 && s != n && getApp().s.aa.Xi(new LevelUpToasterViewController(s));
  2067. var a = r - o;
  2068. a >= 20 && getApp().s.aa.Xi(new CoinsToasterViewController(a))
  2069. }
  2070. t && t()
  2071. })
  2072. }, t.prototype.Vi = function(t) {
  2073. $.get(GATEWAY_HOST + "/pub/wuid/" + this.wi + "/getUserData", function(e) {
  2074. t(e.user_data)
  2075. })
  2076. }, t.prototype.Yi = function(t, e, i) {
  2077. var o = this;
  2078. $.get(GATEWAY_HOST + "/pub/wuid/" + this.wi + "/buyProperty?id=" + t + "&type=" + e, function(t) {
  2079. 1200 == t.code ? o.Q(i) : i()
  2080. }).fail(function() {
  2081. i()
  2082. })
  2083. }, t.prototype.Zi = function() {
  2084. var t = this;
  2085. if (this.$i(), "undefined" == typeof FB) return void this._i();
  2086. FB.getLoginStatus(function(e) {
  2087. if ("connected" === e.status) return void(e.authResponse && e.authResponse.accessToken ? t.aj("facebook", "fb_" + e.authResponse.accessToken) : t._i());
  2088. FB.login(function(e) {
  2089. "connected" === e.status && e.authResponse && e.authResponse.accessToken ? t.aj("facebook", "fb_" + e.authResponse.accessToken) : t._i()
  2090. })
  2091. })
  2092. }, t.prototype.bj = function() {
  2093. var t = this;
  2094. if (this.$i(), void 0 === GoogleAuth) return void this._i();
  2095. console.log("gsi:l"), GoogleAuth.then(function() {
  2096. if (console.log("gsi:then"), GoogleAuth.isSignedIn.get()) {
  2097. console.log("gsi:sil");
  2098. var e = GoogleAuth.currentUser.get();
  2099. return void t.aj("google", "gg_" + e.getAuthResponse().id_token)
  2100. }
  2101. GoogleAuth.signIn().then(function(e) {
  2102. return void 0 !== e.error ? (console.log("gsi:e: " + e.error), void t._i()) : e.isSignedIn() ? (console.log("gsi:s"), void t.aj("google", "gg_" + e.getAuthResponse().id_token)) : (console.log("gsi:c"), void t._i())
  2103. })
  2104. })
  2105. }, t.prototype.$i = function() {
  2106. console.log("iSI: " + this.vi);
  2107. var t = this.wi,
  2108. i = this.yi;
  2109. switch (this.vi = !1, this.wi = e, this.xi = {}, this.yi = null, setCookie(Cookies.Se, "", 60), i) {
  2110. case "facebook":
  2111. this.cj();
  2112. break;
  2113. case "google":
  2114. this.dj()
  2115. }
  2116. t !== this.wi ? this.ej() : this.Wi()
  2117. }, t.prototype.fj = function() {
  2118. console.log("dA"), this.vi && $.get(GATEWAY_HOST + "/pub/wuid/" + this.wi + "/deleteAccount", function(t) {
  2119. 1200 === t.code ? console.log("dA: OK") : console.log("dA: NO")
  2120. }).fail(function() {
  2121. console.log("dA: FAIL")
  2122. })
  2123. }, t.prototype.zi = function() {
  2124. console.log("rs");
  2125. var t = getCookie(Cookies.Se),
  2126. e = this;
  2127. "facebook" == t ? (console.log("rs:fb"), function t() {
  2128. "undefined" != typeof FB ? e.Zi() : setTimeout(t, 100)
  2129. }()) : "google" == t ? (console.log("rs:gg"), function t() {
  2130. void 0 !== GoogleAuth ? e.bj() : setTimeout(t, 100)
  2131. }()) : (console.log("rs:lo"), this.$i())
  2132. }, t.prototype.ej = function() {
  2133. for (var t = 0; t < this.ri.length; t++) this.ri[t]();
  2134. this.Wi()
  2135. }, t.prototype.Wi = function() {
  2136. for (var t = 0; t < this.si.length; t++) this.si[t]();
  2137. var e = this.ti;
  2138. this.ti = [];
  2139. for (var i = 0; i < e.length; i++) e[i]()
  2140. }, t.prototype.aj = function(t, e) {
  2141. var i = this;
  2142. $.get(GATEWAY_HOST + "/pub/wuid/" + e + "/login", function(o) {
  2143. if (o && o.user_data) {
  2144. var n = this.wi;
  2145. i.vi = !0, i.wi = e, i.xi = o.user_data, i.yi = t, setCookie(Cookies.Se, i.yi, 60), n !== e ? i.ej() : i.Wi()
  2146. } else i._i()
  2147. }).fail(function() {
  2148. i._i()
  2149. })
  2150. }, t.prototype._i = function() {
  2151. this.$i()
  2152. }, t.prototype.cj = function() {
  2153. console.log("lo:fb"), FB.logout(function() {})
  2154. }, t.prototype.dj = function() {
  2155. console.log("lo:gg"), GoogleAuth.signOut()
  2156. }, t
  2157. }(),
  2158. WMGameBackgroundSprite = function() {
  2159. function t() {
  2160. this.gj = {}, this.gj[r] = [1, .5, .25, .5], this.gj[s] = POGL.ac.WHITE, this.gj[a] = [0, 0], this.gj[h] = [0, 0];
  2161. var t = POGL.dc.from(u, c, this.gj);
  2162. this.Df = new POGL.ic(p, t)
  2163. }
  2164. var e = "a1_" + randStr(),
  2165. i = "a2_" + randStr(),
  2166. o = atob("dHJhbnNsYXRpb25NYXRyaXg="),
  2167. n = atob("cHJvamVjdGlvbk1hdHJpeA=="),
  2168. r = "u3_" + randStr(),
  2169. s = "u4_" + randStr(),
  2170. a = "u5_" + randStr(),
  2171. h = "u6_" + randStr(),
  2172. l = "v1_" + randStr(),
  2173. p = (new POGL.hc).addAttribute(e, [-.5, -.5, .5, -.5, .5, .5, -.5, -.5, .5, .5, -.5, .5], 2).addAttribute(i, [-.5, -.5, .5, -.5, .5, .5, -.5, -.5, .5, .5, -.5, .5], 2),
  2174. u = atob("cHJlY2lzaW9uIG1lZGl1bXAgZmxvYXQ7YXR0cmlidXRlIHZlYzIg") + e + atob("O2F0dHJpYnV0ZSB2ZWMyIA==") + i + atob("O3VuaWZvcm0gbWF0MyA=") + o + atob("O3VuaWZvcm0gbWF0MyA=") + n + atob("O3ZhcnlpbmcgdmVjMiA=") + l + atob("O3ZvaWQgbWFpbigpew==") + l + atob("PQ==") + i + atob("O2dsX1Bvc2l0aW9uPXZlYzQoKA==") + n + atob("Kg==") + o + atob("KnZlYzMo") + e + atob("LDEuMCkpLnh5LDAuMCwxLjApO30="),
  2175. c = atob("cHJlY2lzaW9uIGhpZ2hwIGZsb2F0O3ZhcnlpbmcgdmVjMiA=") + l + atob("O3VuaWZvcm0gdmVjNCA=") + r + atob("O3VuaWZvcm0gc2FtcGxlcjJEIA==") + s + atob("O3VuaWZvcm0gdmVjMiA=") + a + atob("O3VuaWZvcm0gdmVjMiA=") + h + atob("O3ZvaWQgbWFpbigpe3ZlYzIgY29vcmQ9") + l + atob("Kg==") + a + atob("Kw==") + h + atob("O3ZlYzQgdl9jb2xvcl9taXg9") + r + atob("O2dsX0ZyYWdDb2xvcj10ZXh0dXJlMkQo") + s + atob("LGNvb3JkKSowLjMrdl9jb2xvcl9taXguYSp2ZWM0KHZfY29sb3JfbWl4LnJnYiwwLjApO30=");
  2176. return t.prototype.Lf = function(t, e, i, o) {
  2177. var n = this.gj[r];
  2178. n[0] = t, n[1] = e, n[2] = i, n[3] = o
  2179. }, t.prototype.Ff = function(t) {
  2180. this.gj[s] = t
  2181. }, t.prototype.Xe = function(t, e, i, o) {
  2182. this.Df.position.x = t, this.Df.position.y = e, this.Df.scale.x = i, this.Df.scale.y = o;
  2183. var n = this.gj[a];
  2184. n[0] = .2520615384615385 * i, n[1] = .4357063736263738 * o;
  2185. var r = this.gj[h];
  2186. r[0] = .2520615384615385 * t, r[1] = .4357063736263738 * e
  2187. }, t
  2188. }(),
  2189. WMSprite = function() {
  2190. function t() {
  2191. this.nh = new POGL.fc, this.hj = 0, this.ij = 0
  2192. }
  2193. return t.prototype.oh = function(t) {
  2194. this.nh.texture = t.Ic, this.nh.anchor.set(t.Ph, t.Qh), this.hj = t.Rh, this.ij = t.Sh
  2195. }, t.prototype.th = function(t) {
  2196. this.nh.width = t * this.hj, this.nh.height = t * this.ij
  2197. }, t.prototype.jj = function(t) {
  2198. this.nh.rotation = t
  2199. }, t.prototype.sh = function(t, e) {
  2200. this.nh.position.set(t, e)
  2201. }, t.prototype.Qg = function(t) {
  2202. this.nh.visible = t
  2203. }, t.prototype.kj = function() {
  2204. return this.nh.visible
  2205. }, t.prototype.uh = function(t) {
  2206. this.nh.alpha = t
  2207. }, t.prototype.Qf = function() {
  2208. return this.nh
  2209. }, t.prototype.mh = function() {
  2210. pixijs_removeFromParent(this.nh)
  2211. }, t
  2212. }(),
  2213. Worm = function() {
  2214. function t(t) {
  2215. this.gb = t, this.Nb = new Worm.Config, this.Ib = !1, this.Jb = !0, this.lj = !1, this.Eb = 0, this.mj = 0, this.Kb = 1, this.nj = 0, this.M = 0, this.Jf = {}, this.oj = 0, this.pj = new Float32Array(2 * e), this.qj = new Float32Array(2 * e), this.rj = new Float32Array(2 * e), this.sj = null, this.tj = null, this.uj = null, this.Ub()
  2216. }
  2217. var e = 200;
  2218. return t.prototype.Lb = function() {
  2219. null != this.tj && pixijs_removeFromParent(this.tj.Vf), null != this.uj && pixijs_removeFromParent(this.uj)
  2220. }, t.prototype.Ub = function() {
  2221. this.Mg(.25), this.Nb.bd = "", this.Jb = !0, this.Jf = {}, this.Qg(!1)
  2222. }, t.prototype.Jg = function(t) {
  2223. this.Nb = t, this.vj(this.Ib)
  2224. }, t.prototype.Qg = function(t) {
  2225. var e = this.Ib;
  2226. this.Ib = t, this.vj(e)
  2227. }, t.prototype.Mg = function(t) {
  2228. this.M = 50 * t;
  2229. var i = t;
  2230. t > this.gb.gf && (i = Math.atan((t - this.gb.gf) / this.gb.hf) * this.gb.hf + this.gb.gf);
  2231. var o = Math.sqrt(4 * Math.pow(5 * i, .707106781186548) + 25),
  2232. n = Math.min( e, Math.max( 3, 5 * (o - 5) + 1)),
  2233. r = this.oj;
  2234. if (this.Eb = .025 * (5 + .9 * o), this.oj = Math.floor(n), this.mj = n - this.oj, r > 0 && r < this.oj)
  2235. for (var s = this.pj[2 * r - 2], a = this.pj[2 * r - 1], h = this.qj[2 * r - 2], l = this.qj[2 * r - 1], p = this.rj[2 * r - 2], u = this.rj[2 * r - 1], c = r; c < this.oj; c++) this.pj[2 * c] = s, this.pj[2 * c + 1] = a, this.qj[2 * c] = h, this.qj[2 * c + 1] = l, this.rj[2 * c] = p, this.rj[2 * c + 1] = u
  2236. }, t.prototype.Pg = function(t, e) {
  2237. this.oj = e;
  2238. for (var i = 0; i < this.oj; i++) this.pj[2 * i] = this.qj[2 * i] = this.rj[2 * i] = t(), this.pj[2 * i + 1] = this.qj[2 * i + 1] = this.rj[2 * i + 1] = t()
  2239. }, t.prototype.Og = function(t, e, i) {
  2240. this.lj = i;
  2241. for (var o = 0; o < this.oj; o++) this.pj[2 * o] = this.qj[2 * o], this.pj[2 * o + 1] = this.qj[2 * o + 1];
  2242. var n = t - this.qj[0],
  2243. r = e - this.qj[1];
  2244. this.wj(n, r, this.oj, this.qj)
  2245. }, t.prototype.wj = function(t, e, i, o) {
  2246. var n = Math.hypot(t, e);
  2247. if (!(n <= 0)) {
  2248. var r = o[0],
  2249. s = void 0;
  2250. o[0] += t;
  2251. var a = o[1],
  2252. h = void 0;
  2253. o[1] += e;
  2254. for (var l = this.Eb / (this.Eb + n), p = 1 - 2 * l, u = 1, c = i - 1; u < c; u++) s = o[2 * u], o[2 * u] = o[2 * u - 2] * p + (s + r) * l, r = s, h = o[2 * u + 1], o[2 * u + 1] = o[2 * u - 1] * p + (h + a) * l, a = h;
  2255. l = this.mj * this.Eb / (this.mj * this.Eb + n), p = 1 - 2 * l, o[2 * i - 2] = o[2 * i - 4] * p + (o[2 * i - 2] + r) * l, o[2 * i - 1] = o[2 * i - 3] * p + (o[2 * i - 1] + a) * l
  2256. }
  2257. }, t.prototype.Kf = function() {
  2258. return {
  2259. x: this.rj[0],
  2260. y: this.rj[1]
  2261. }
  2262. }, t.prototype.Lg = function(t, e) {
  2263. for (var i = 1e6, o = t, n = e, r = 0; r < this.oj; r++) {
  2264. var s = this.rj[2 * r],
  2265. a = this.rj[2 * r + 1],
  2266. h = Math.hypot(t - s, e - a);
  2267. h < i && (i = h, o = s, n = a)
  2268. }
  2269. return {
  2270. x: o,
  2271. y: n,
  2272. distance: i
  2273. }
  2274. }, t.prototype.wb = function(t) {
  2275. this.sj = t
  2276. }, t.prototype.Gb = function(t, e) {
  2277. this.Kb = timeDeltaIncrement(this.Kb, this.Jb ? this.lj ? .9 + .1 * Math.cos(t / 400 * Math.PI) : 1 : 0, e, 1 / 800), this.nj = timeDeltaIncrement(this.nj, this.Jb ? this.lj ? 1 : 0 : 1, e, .0025), null != this.tj && (this.tj.Vf.alpha = this.Kb), null != this.uj && (this.uj.alpha = this.Kb)
  2278. }, t.prototype.Hb = function(t, e, i, o) {
  2279. if (this.Ib && this.Jb)
  2280. for (var n = Math.pow(.11112, e / 95), r = 0; r < this.oj; r++) {
  2281. var s = lerp(this.pj[2 * r], this.qj[2 * r], i),
  2282. a = lerp(this.pj[2 * r + 1], this.qj[2 * r + 1], i);
  2283. this.rj[2 * r] = lerp(s, this.rj[2 * r], n), this.rj[2 * r + 1] = lerp(a, this.rj[2 * r + 1], n)
  2284. }
  2285. null != this.tj && this.Ib && this.tj.xj(this, t, e, o), null != this.uj && (this.uj.Mf.x = this.rj[0], this.uj.Mf.y = this.rj[1] - 3 * this.Eb)
  2286. }, t.prototype.vj = function(t) {
  2287. this.Ib ? t || this.yj() : (null != this.tj && pixijs_removeFromParent(this.tj.Vf), null != this.uj && pixijs_removeFromParent(this.uj))
  2288. }, t.prototype.yj = function() {
  2289. var t = getApp();
  2290. null == this.tj ? this.tj = new WormSpriteTree : pixijs_removeFromParent(this.tj.Vf), this.tj.lh(t.o.gb.ef, t.p.Ec().fd(this.Nb.gg), t.p.Ec().ed(this.Nb.hg), t.p.Ec().gd(this.Nb.Fg), t.p.Ec().hd(this.Nb.Gg), t.p.Ec().jd(this.Nb.Hg), t.p.Ec().kd(this.Nb.Ig)), null == this.uj ? (this.uj = new WormLabelNode(""), this.uj.style.fontFamily = "PTSans", this.uj.anchor.set(.5)) : pixijs_removeFromParent(this.uj), this.uj.style.fontSize = 14, this.uj.style.fill = t.p.Ec().ed(this.Nb.hg).ad, this.uj.text = this.Nb.bd, this.sj.Uf(this.Nb.Mb, this.tj, this.uj)
  2291. }, t.Config = function() {
  2292. function t() {
  2293. this.Mb = 0, this.gg = GameParams.TEAM_DEFAULT, this.hg = 0, this.Fg = 0, this.Gg = 0, this.Hg = 0, this.Ig = 0, this.bd = ""
  2294. }
  2295. return t
  2296. }(), t
  2297. }(),
  2298. WormLabelNode = function() {
  2299. return extend(POGL.gc, function(t, e, i) {
  2300. POGL.gc.call(this, t, e, i), this.Mf = {
  2301. x: 0,
  2302. y: 0
  2303. }
  2304. })
  2305. }(),
  2306. WormSpriteTree = function() {
  2307. function t() {
  2308. this.Vf = new POGL.$b, this.Vf.sortableChildren = !0, this.zj = new v, this.zj.zIndex = e * (2 * (i + 1) + 1 + 3), this.Aj = 0, this.Bj = new Array(i), this.Bj[0] = this.Cj(0, new WMSprite, new WMSprite);
  2309. for (var t = 1; t < i; t++) this.Bj[t] = this.Cj(t, new WMSprite, new WMSprite);
  2310. this.Dj = 0, this.Ej = 0, this.Fj = 0
  2311. }
  2312. var e = .001,
  2313. i = 797,
  2314. o = .1 * Math.PI,
  2315. n = -.06640625,
  2316. r = .84375,
  2317. s = .2578125,
  2318. a = -.03515625,
  2319. h = -.0625,
  2320. l = .5625,
  2321. p = 3 * n + r,
  2322. u = s - 3 * n,
  2323. c = n + a,
  2324. f = .375,
  2325. d = .75,
  2326. g = h + h,
  2327. w = 3 * a + s,
  2328. y = r - 3 * a,
  2329. k = a + n;
  2330. t.prototype.Cj = function(t, o, n) {
  2331. var r = new b(o, n);
  2332. return o.nh.zIndex = e * (2 * (i - t) + 1 + 3), n.nh.zIndex = e * (2 * (i - t) - 2 + 3), r
  2333. }, t.prototype.lh = function(t, e, i, o, n, r, s) {
  2334. var a = i.$c,
  2335. h = t == GameMode.df ? e.cd._c : i._c;
  2336. if (a.length > 0 && h.length > 0)
  2337. for (var l = 0; l < this.Bj.length; l++) this.Bj[l].Rf.oh(a[l % a.length]), this.Bj[l].Tf.oh(h[l % h.length]);
  2338. this.zj.lh(o, n, r, s)
  2339. };
  2340. var v = function() {
  2341. var t = extend(POGL.$b, function() {
  2342. POGL.$b.call(this), this.sortableChildren = !0, this.Gj = [], this.Hj = [], this.Ij = [], this.Jj = [], this.Kj = new POGL.$b, this.Lj = [];
  2343. for (var t = 0; t < 4; t++) {
  2344. var e = new WMSprite;
  2345. e.oh(getApp().q.Th), this.Kj.addChild(e.nh), this.Lj.push(e)
  2346. }
  2347. this.Kj.zIndex = .0011, this.addChild(this.Kj), this.Mj(), this.Nj = new WMSprite, this.Nj.oh(getApp().q.Uh), this.Nj.nh.zIndex = .001, this.addChild(this.Nj.nh), this.Oj()
  2348. });
  2349. return t.prototype.lh = function(t, e, i, o) {
  2350. this.Pj(.002, this.Gj, t.$c), this.Pj(.003, this.Hj, e.$c), this.Pj(.004, this.Jj, o.$c), this.Pj(.005, this.Ij, i.$c)
  2351. }, t.prototype.Pj = function(t, e, i) {
  2352. for (; i.length > e.length;) {
  2353. var o = new WMSprite;
  2354. e.push(o), this.addChild(o.Qf())
  2355. }
  2356. for (; i.length < e.length;) {
  2357. e.pop().mh()
  2358. }
  2359. for (var n = t, r = 0; r < i.length; r++) {
  2360. n += 1e-4;
  2361. var s = e[r];
  2362. s.oh(i[r]), s.nh.zIndex = n
  2363. }
  2364. }, t.prototype.rh = function(t, e, i, o) {
  2365. this.visible = !0, this.position.set(t, e), this.rotation = o;
  2366. for (var n = 0; n < this.Gj.length; n++) this.Gj[n].th(i);
  2367. for (var r = 0; r < this.Hj.length; r++) this.Hj[r].th(i);
  2368. for (var s = 0; s < this.Ij.length; s++) this.Ij[s].th(i);
  2369. for (var a = 0; a < this.Jj.length; a++) this.Jj[a].th(i)
  2370. }, t.prototype.qh = function() {
  2371. this.visible = !1
  2372. }, t.prototype.Qj = function(t, e, i, o) {
  2373. this.Kj.visible = !0;
  2374. for (var n = i / 1e3, r = 1 / this.Lj.length, s = 0; s < this.Lj.length; s++) {
  2375. var a = 1 - (n + r * s) % 1;
  2376. this.Lj[s].nh.alpha = 1 - a, this.Lj[s].th(e * (.5 + 4.5 * a))
  2377. }
  2378. }, t.prototype.Mj = function() {
  2379. this.Kj.visible = !1
  2380. }, t.prototype.Rj = function(t, e, i, o) {
  2381. this.Nj.nh.visible = !0, this.Nj.nh.alpha = timeDeltaIncrement(this.Nj.nh.alpha, t.lj ? .9 : .2, o, .0025), this.Nj.th(e)
  2382. }, t.prototype.Oj = function() {
  2383. this.Nj.nh.visible = !1
  2384. }, t
  2385. }();
  2386. t.prototype.Sj = function(t) {
  2387. return this.Ej + this.Fj * Math.sin(t * o - this.Dj)
  2388. }, t.prototype.xj = function(t, e, i, o) {
  2389. var v = 2 * t.Eb,
  2390. m = t.rj,
  2391. C = t.oj,
  2392. P = 4 * C - 3,
  2393. B = P;
  2394. this.Dj = e / 400 * Math.PI, this.Ej = 1.5 * v, this.Fj = .15 * v * t.nj;
  2395. var j = void 0,
  2396. V = void 0,
  2397. A = void 0,
  2398. T = void 0,
  2399. M = void 0,
  2400. x = void 0,
  2401. O = void 0,
  2402. I = void 0;
  2403. if (V = m[0], x = m[1], o(V, x)) {
  2404. A = m[2], O = m[3], T = m[4], I = m[5];
  2405. var S = Math.atan2(I + 2 * x - 3 * O, T + 2 * V - 3 * A);
  2406. this.zj.rh(V, x, v, S), this.Bj[0].rh(V, x, v, this.Sj(0), S), this.Bj[1].rh(p * V + u * A + c * T, p * x + u * O + c * I, v, this.Sj(1), b.angleBetween(this.Bj[0], this.Bj[2])), this.Bj[2].rh(f * V + d * A + g * T, f * x + d * O + g * I, v, this.Sj(2), b.angleBetween(this.Bj[1], this.Bj[3])), this.Bj[3].rh(w * V + y * A + k * T, w * x + y * O + k * I, v, this.Sj(3), b.angleBetween(this.Bj[2], this.Bj[4]))
  2407. } else this.zj.qh(), this.Bj[0].qh(), this.Bj[1].qh(), this.Bj[2].qh(), this.Bj[3].qh();
  2408. for (var L = 4, D = 2, _ = 2 * C - 4; D < _; D += 2) V = m[D], x = m[D + 1], o(V, x) ? (j = m[D - 2], M = m[D - 1], A = m[D + 2], O = m[D + 3], T = m[D + 4], I = m[D + 5], this.Bj[L].rh(V, x, v, this.Sj(L), b.angleBetween(this.Bj[L - 1], this.Bj[L + 1])), L++, this.Bj[L].rh(n * j + r * V + s * A + a * T, n * M + r * x + s * O + a * I, v, this.Sj(L), b.angleBetween(this.Bj[L - 1], this.Bj[L + 1])), L++, this.Bj[L].rh(h * j + l * V + l * A + h * T, h * M + l * x + l * O + h * I, v, this.Sj(L), b.angleBetween(this.Bj[L - 1], this.Bj[L + 1])), L++, this.Bj[L].rh(a * j + s * V + r * A + n * T, a * M + s * x + r * O + n * I, v, this.Sj(L), b.angleBetween(this.Bj[L - 1], this.Bj[L + 1])), L++) : (this.Bj[L].qh(), L++, this.Bj[L].qh(), L++, this.Bj[L].qh(), L++, this.Bj[L].qh(), L++);
  2409. for (V = m[2 * C - 4], x = m[2 * C - 3], o(V, x) ? (j = m[2 * C - 6], M = m[2 * C - 5], A = m[2 * C - 2], O = m[2 * C - 1], this.Bj[P - 5].rh(V, x, v, this.Sj(P - 5), b.angleBetween(this.Bj[P - 6], this.Bj[P - 4])), this.Bj[P - 4].rh(k * j + y * V + w * A, k * M + y * x + w * O, v, this.Sj(P - 4), b.angleBetween(this.Bj[P - 5], this.Bj[P - 3])), this.Bj[P - 3].rh(g * j + d * V + f * A, g * M + d * x + f * O, v, this.Sj(P - 3), b.angleBetween(this.Bj[P - 4], this.Bj[P - 2])), this.Bj[P - 2].rh(c * j + u * V + p * A, c * M + u * x + p * O, v, this.Sj(P - 2), b.angleBetween(this.Bj[P - 3], this.Bj[P - 1])), this.Bj[P - 1].rh(A, O, v, this.Sj(P - 1), b.angleBetween(this.Bj[P - 2], this.Bj[P - 1]))) : (this.Bj[P - 5].qh(), this.Bj[P - 4].qh(), this.Bj[P - 3].qh(), this.Bj[P - 2].qh(), this.Bj[P - 1].qh()), 0 == this.Aj && B > 0 && this.Vf.addChild(this.zj), this.Aj > 0 && 0 == B && pixijs_removeFromParent(this.zj); this.Aj < B;) this.Vf.addChild(this.Bj[this.Aj].Rf.Qf()), this.Vf.addChild(this.Bj[this.Aj].Tf.Qf()), this.Aj += 1;
  2410. for (; this.Aj > B;) this.Aj -= 1, this.Bj[this.Aj].Tf.mh(), this.Bj[this.Aj].Rf.mh();
  2411. var $ = t.Jf[Ability.MAGNETIC_TYPE];
  2412. this.Bj[0].kj() && null != $ && $.tc ? this.zj.Qj(t, v, e, i) : this.zj.Mj();
  2413. var G = t.Jf[Ability.VELOCITY_TYPE];
  2414. this.Bj[0].kj() && null != G && G.tc ? this.zj.Rj(t, e, i) : this.zj.Oj()
  2415. };
  2416. var b = function() {
  2417. function t(t, e) {
  2418. this.Rf = t, this.Rf.Qg(!1), this.Tf = e, this.Tf.Qg(!1)
  2419. }
  2420. return t.prototype.rh = function(t, e, i, o, n) {
  2421. this.Rf.Qg(!0), this.Rf.sh(t, e), this.Rf.th(i), this.Rf.jj(n), this.Tf.Qg(!0), this.Tf.sh(t, e), this.Tf.th(o), this.Tf.jj(n)
  2422. }, t.prototype.qh = function() {
  2423. this.Rf.Qg(!1), this.Tf.Qg(!1)
  2424. }, t.prototype.kj = function() {
  2425. return this.Rf.kj()
  2426. }, t.angleBetween = function(t, e) {
  2427. return Math.atan2(t.Rf.nh.position.y - e.Rf.nh.position.y, t.Rf.nh.position.x - e.Rf.nh.position.x)
  2428. }, t
  2429. }();
  2430. return t
  2431. }(),
  2432. WormView = function() {
  2433. function t(t) {
  2434. this.te = t, this.ue = t.get()[0], this.ve = new POGL.bc({
  2435. view: this.ue,
  2436. transparent: !0
  2437. }), this.tc = !1, this.Tj = new WormSpriteTree, this.Tj.Vf.addChild(this.Tj.zj), this.Uj = 0, this.Vj = 0, this.Rg = 1, this.vh = 0, this.wh = 0, this.xh = 0, this.yh = 0, this.zh = 0, this.Wj = !1, this.Xj = !1, this.Yj = !1, this.Zj = !1, this.$j = !1, this._j = !1, this.ak = !1, this.bk = !1, this.ck = !1, this.dk = !1, this.Sa(), this.Gb();
  2438. var e = this;
  2439. getApp().p.ca(function() {
  2440. getApp().p.W() && e.Gb()
  2441. })
  2442. }
  2443. return t.prototype.Gb = function() {
  2444. var t = getApp();
  2445. this.Tj.lh(GameMode.cf, null, t.p.Ec().ed(this.vh), t.p.Ec().gd(this.wh), t.p.Ec().hd(this.xh), t.p.Ec().jd(this.yh), t.p.Ec().kd(this.zh))
  2446. }, t.prototype.Pe = function(t) {
  2447. this.tc = t
  2448. }, t.prototype.ek = function(t, e, i) {
  2449. this.vh = t, this.Wj = e, this._j = i, this.Gb()
  2450. }, t.prototype.fk = function(t, e, i) {
  2451. this.wh = t, this.Xj = e, this.ak = i, this.Gb()
  2452. }, t.prototype.gk = function(t, e, i) {
  2453. this.xh = t, this.Yj = e, this.bk = i, this.Gb()
  2454. }, t.prototype.hk = function(t, e, i) {
  2455. this.yh = t, this.Zj = e, this.ck = i, this.Gb()
  2456. }, t.prototype.ik = function(t, e, i) {
  2457. this.zh = t, this.$j = e, this.dk = i, this.Gb()
  2458. }, t.prototype.Sa = function() {
  2459. var t = window.devicePixelRatio ? window.devicePixelRatio : 1;
  2460. this.Uj = this.te.width(), this.Vj = this.te.height(), this.ve.resize(this.Uj, this.Vj), this.ve.resolution = t, this.ue.width = t * this.Uj, this.ue.height = t * this.Vj, this.Rg = this.Vj / 4;
  2461. var e = minmax(1, this.Tj.Bj.length, 2 * Math.floor(this.Uj / this.Rg) - 5);
  2462. if (this.Tj.Aj != e) {
  2463. for (var i = e; i < this.Tj.Bj.length; i++) this.Tj.Bj[i].qh();
  2464. for (; this.Tj.Aj < e;) this.Tj.Vf.addChild(this.Tj.Bj[this.Tj.Aj].Rf.Qf()), this.Tj.Vf.addChild(this.Tj.Bj[this.Tj.Aj].Tf.Qf()), this.Tj.Aj += 1;
  2465. for (; this.Tj.Aj > e;) this.Tj.Aj -= 1, this.Tj.Bj[this.Tj.Aj].Tf.mh(), this.Tj.Bj[this.Tj.Aj].Rf.mh()
  2466. }
  2467. }, t.prototype.Qa = function() {
  2468. if (this.tc) {
  2469. if (getApp().p.W) {
  2470. for (var t = Date.now(), e = t / 200, i = Math.sin(e), o = this.Rg, n = 1.5 * this.Rg, r = this.Uj - .5 * (this.Uj - .5 * o * (this.Tj.Aj - 1)), s = .5 * this.Vj, a = 0, h = 0, l = -1; l < this.Tj.Aj; l++) {
  2471. var p = l,
  2472. u = Math.cos(1 * p / 12 * Math.PI - e) * (1 - Math.pow(16, -1 * p / 12));
  2473. if (l >= 0) {
  2474. var c = r + -.5 * o * p,
  2475. f = s + .5 * o * u,
  2476. d = 2 * o,
  2477. g = 2 * n,
  2478. w = Math.atan2(h - u, p - a);
  2479. 0 == l && this.Tj.zj.rh(c, f, d, w), this.Tj.Bj[l].rh(c, f, d, g, w);
  2480. var y = this.Wj ? this._j ? .4 + .2 * i : .9 + .1 * i : this._j ? .4 : 1;
  2481. this.Tj.Bj[l].Rf.uh(y), this.Tj.Bj[l].Tf.uh(y)
  2482. }
  2483. a = p, h = u
  2484. }
  2485. for (var k = 0; k < this.Tj.zj.Gj.length; k++) {
  2486. var v = this.Xj ? this.ak ? .4 + .2 * i : .9 + .1 * i : this.ak ? .4 : 1;
  2487. this.Tj.zj.Gj[k].uh(v)
  2488. }
  2489. for (var b = 0; b < this.Tj.zj.Hj.length; b++) {
  2490. var m = this.Yj ? this.bk ? .4 + .2 * i : .9 + .1 * i : this.bk ? .4 : 1;
  2491. this.Tj.zj.Hj[b].uh(m)
  2492. }
  2493. for (var C = 0; C < this.Tj.zj.Ij.length; C++) {
  2494. var P = this.Zj ? this.ck ? .4 + .2 * i : .9 + .1 * i : this.ck ? .4 : 1;
  2495. this.Tj.zj.Ij[C].uh(P)
  2496. }
  2497. for (var B = 0; B < this.Tj.zj.Jj.length; B++) {
  2498. var j = this.$j ? this.dk ? .4 + .2 * i : .9 + .1 * i : this.dk ? .4 : 1;
  2499. this.Tj.zj.Jj[B].uh(j)
  2500. }
  2501. this.ve.render(this.Tj.Vf)
  2502. }
  2503. }
  2504. }, t
  2505. }(),
  2506. BaseViewController = function() {
  2507. function t(t) {
  2508. this.sc = t
  2509. }
  2510. return t.jk = $("#game-view"), t.kk = $("#results-view"), t.lk = $("#main-menu-view"), t.mk = $("#popup-view"), t.nk = $("#toaster-view"), t.ok = $("#loading-view"), t.pk = $("#restricted-view"), t.qk = $("#stretch-box"), t.rk = $("#game-canvas"), t.hi = $("#background-canvas"), t.sk = $("#social-buttons"), t.tk = $("#markup-wrap"), t.prototype.a = function() {}, t.prototype.mi = function() {}, t.prototype.ni = function() {}, t.prototype.ii = function() {}, t.prototype.Sa = function() {}, t.prototype.Qa = function(t, e) {}, t
  2511. }(),
  2512. GameViewController = function() {
  2513. function t(t, e, i, o, n, r) {
  2514. var s = '<div><svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" viewBox="0 0 456 456" xml:space="preserve"><rect x="0" y="0" width="456" height="456" fill="#F7941D"/><path d="M242.7 456V279.7h-59.3v-71.9h59.3v-60.4c0-43.9 35.6-79.5 79.5-79.5h62v64.6h-44.4c-13.9 0-25.3 11.3-25.3 25.3v50h68.5l-9.5 71.9h-59.1V456z" fill="#fff"/></svg><span>' + t + "</span></div>",
  2515. a = $(s);
  2516. return a.click(function() {
  2517. "undefined" != typeof FB && void 0 !== FB.ui && FB.ui({
  2518. method: "feed",
  2519. display: "popup",
  2520. link: e,
  2521. name: i,
  2522. caption: o,
  2523. description: n,
  2524. picture: r
  2525. }, function() {})
  2526. }), a
  2527. }
  2528. var e = $("#final-caption"),
  2529. i = $("#final-continue"),
  2530. o = $("#congrats-bg"),
  2531. n = $("#unl6wj4czdl84o9b"),
  2532. r = ($("#congrats"), $("#final-share-fb")),
  2533. s = $("#final-message"),
  2534. a = $("#final-score"),
  2535. h = $("#final-place"),
  2536. l = $("#final-board"),
  2537. p = extend(BaseViewController, function() {
  2538. BaseViewController.call(this, ViewControllerType.uk);
  2539. var t = this,
  2540. o = getApp(),
  2541. n = BaseViewController.rk.get()[0];
  2542. console.log("sSE=" + env.vk), r.toggle(env.vk), e.text(i18n("index.game.result.title")), i.text(i18n("index.game.result.continue")), i.click(function() {
  2543. o.r.Dd(), o.f.Na.c(), o.r.G(AudioManager.AudioState.F), o.s.I(o.s.F)
  2544. }), $("html").keydown(function(e) {
  2545. 32 == e.keyCode && (t.wk = !0)
  2546. }).keyup(function(e) {
  2547. 32 == e.keyCode && (t.wk = !1)
  2548. }), n.addEventListener("touchmove", function(e) {
  2549. (e = e || window.event) && (e = e.touches[0], void 0 !== e.clientX ? t.xk = Math.atan2(e.clientY - .5 * n.offsetHeight, e.clientX - .5 * n.offsetWidth) : t.xk = Math.atan2(e.pageY - .5 * n.offsetHeight, e.pageX - .5 * n.offsetWidth))
  2550. }, !0), n.addEventListener("touchstart", function(e) {
  2551. (e = e || window.event) && (t.wk = e.touches.length >= 2), e.preventDefault()
  2552. }, !0), n.addEventListener("touchend", function(e) {
  2553. (e = e || window.event) && (t.wk = e.touches.length >= 2)
  2554. }, !0), n.addEventListener("mousemove", function(e) {
  2555. (e = e || window.event && void 0 !== e.clientX) && (t.xk = Math.atan2(e.clientY - .5 * n.offsetHeight, e.clientX - .5 * n.offsetWidth))
  2556. }, !0), n.addEventListener("mousedown", function(e) {
  2557. t.wk = !0
  2558. }, !0), n.addEventListener("mouseup", function(e) {
  2559. t.wk = !1
  2560. }, !0), this.xb = new GameView(BaseViewController.rk), this.db = u.J, this.xk = 0, this.wk = !1
  2561. });
  2562. p.prototype.a = function() {}, p.prototype.mi = function() {
  2563. this.db == u.J ? (BaseViewController.jk.stop(), BaseViewController.jk.fadeIn(500), BaseViewController.kk.stop(), BaseViewController.kk.fadeOut(1), BaseViewController.lk.stop(), BaseViewController.lk.fadeOut(50), BaseViewController.mk.stop(), BaseViewController.mk.fadeOut(50), BaseViewController.nk.stop(), BaseViewController.nk.fadeOut(50), BaseViewController.ok.stop(), BaseViewController.ok.fadeOut(50), BaseViewController.pk.stop(), BaseViewController.pk.fadeOut(50), BaseViewController.qk.stop(), BaseViewController.qk.fadeOut(1), BaseViewController.hi.stop(), BaseViewController.hi.fadeOut(50), BackgroundView.Pe(!1), BaseViewController.sk.stop(), BaseViewController.sk.fadeOut(50), BaseViewController.tk.stop(), BaseViewController.tk.fadeOut(50)) : (BaseViewController.jk.stop(), BaseViewController.jk.fadeIn(500), BaseViewController.kk.stop(), BaseViewController.kk.fadeIn(500), BaseViewController.lk.stop(), BaseViewController.lk.fadeOut(50), BaseViewController.mk.stop(), BaseViewController.mk.fadeOut(50), BaseViewController.nk.stop(), BaseViewController.nk.fadeOut(50), BaseViewController.ok.stop(), BaseViewController.ok.fadeOut(50), BaseViewController.pk.stop(), BaseViewController.pk.fadeOut(50), BaseViewController.qk.stop(), BaseViewController.qk.fadeOut(1), BaseViewController.hi.stop(), BaseViewController.hi.fadeOut(50), BackgroundView.Pe(!1), BaseViewController.sk.stop(), BaseViewController.sk.fadeOut(50), BaseViewController.tk.stop(), BaseViewController.tk.fadeOut(50))
  2564. }, p.prototype.J = function() {
  2565. return this.db = u.J, this
  2566. }, p.prototype.Ga = function() {
  2567. console.log("re");
  2568. return o.hide(), setTimeout(function() {
  2569. console.log("fi_bg"), o.fadeIn(500)
  2570. }, 3e3), n.hide(), setTimeout(function() {
  2571. console.log("fi_aw"), n.fadeIn(500)
  2572. }, 500), this.db = u.Ga, this
  2573. }, p.prototype.ni = function() {
  2574. this.wk = !1, this.xb.Sa(), this.db == u.Ga && getApp().r.Hd()
  2575. }, p.prototype.Sa = function() {
  2576. this.xb.Sa()
  2577. }, p.prototype.Qa = function(t, e) {
  2578. this.xb.Qa(t, e)
  2579. }, p.prototype.Ea = function(e, i, o) {
  2580. var n = void 0,
  2581. p = void 0,
  2582. u = void 0;
  2583. if (i >= 1 && i <= 10 ? (n = i18n("index.game.result.place.i" + i), p = i18n("index.game.result.placeInBoard"), u = i18n("index.game.social.shareResult.messGood").replace("{0}", o).replace("{1}", e).replace("{2}", n)) : (n = "", p = i18n("index.game.result.tryHit"), u = i18n("index.game.social.shareResult.messNorm").replace("{0}", o).replace("{1}", e)), s.html(i18n("index.game.result.your")), a.html(e), h.html(n), l.html(p), env.vk) {
  2584. var c = i18n("index.game.result.share");
  2585. i18n("index.game.social.shareResult.caption");
  2586. r.empty().append(t(c, "https://wormate.io", "wormate.io", u, u, "https://wormate.io/images/og-share-img-new.jpg"))
  2587. }
  2588. }, p.prototype.T = function() {
  2589. return this.xk
  2590. }, p.prototype.U = function() {
  2591. return this.wk
  2592. };
  2593. var u = {
  2594. J: 0,
  2595. Ga: 1
  2596. };
  2597. return p
  2598. }(),
  2599. LoadingViewController = function() {
  2600. var t = $("#loading-worm-a"),
  2601. e = $("#loading-worm-b"),
  2602. i = $("#loading-worm-c"),
  2603. o = ["100% 100%", "100% 200%", "200% 100%", "200% 200%"],
  2604. n = extend(BaseViewController, function() {
  2605. BaseViewController.call(this, ViewControllerType.uk)
  2606. });
  2607. return n.prototype.a = function() {}, n.prototype.mi = function() {
  2608. BaseViewController.jk.stop(), BaseViewController.jk.fadeOut(50), BaseViewController.kk.stop(), BaseViewController.kk.fadeOut(50), BaseViewController.lk.stop(), BaseViewController.lk.fadeOut(50), BaseViewController.mk.stop(), BaseViewController.mk.fadeOut(50), BaseViewController.nk.stop(), BaseViewController.nk.fadeOut(50), BaseViewController.ok.stop(), BaseViewController.ok.fadeIn(500), BaseViewController.pk.stop(), BaseViewController.pk.fadeOut(50), BaseViewController.qk.stop(), BaseViewController.qk.fadeIn(1), BaseViewController.hi.stop(), BaseViewController.hi.fadeIn(500), BackgroundView.Pe(!0), BaseViewController.sk.stop(), BaseViewController.sk.fadeOut(50), BaseViewController.tk.stop(), BaseViewController.tk.fadeOut(50)
  2609. }, n.prototype.ni = function() {
  2610. this.yk()
  2611. }, n.prototype.yk = function() {
  2612. t.css("background-position", "100% 200%");
  2613. for (var n = 0; n < o.length; n++) {
  2614. var r = Math.floor(Math.random() * o.length),
  2615. s = o[n];
  2616. o[n] = o[r], o[r] = s
  2617. }
  2618. t.css("background-position", o[0]), e.css("background-position", o[1]), i.css("background-position", o[2])
  2619. }, n
  2620. }(),
  2621. MainMenuViewController = function() {
  2622. var t = ($("#mm-event-text"), $("#mm-skin-canv")),
  2623. e = $("#mm-skin-prev"),
  2624. i = $("#mm-skin-next"),
  2625. o = $("#mm-skin-over"),
  2626. n = $("#mm-skin-over-button-list"),
  2627. r = $("#mm-params-nickname"),
  2628. s = $("#mm-params-game-mode"),
  2629. a = $("#mm-action-buttons"),
  2630. h = $("#mm-action-play"),
  2631. l = $("#mm-action-guest"),
  2632. p = $("#mm-action-login"),
  2633. u = $("#mm-player-info"),
  2634. c = $("#mm-store"),
  2635. f = $("#mm-leaders"),
  2636. d = $("#mm-settings"),
  2637. g = $("#mm-coins-box"),
  2638. w = $("#mm-player-avatar"),
  2639. y = $("#mm-player-username"),
  2640. k = $("#mm-coins-val"),
  2641. v = $("#mm-player-exp-bar"),
  2642. b = $("#mm-player-exp-val"),
  2643. m = $("#mm-player-level"),
  2644. C = extend(BaseViewController, function() {
  2645. BaseViewController.call(this, ViewControllerType.li);
  2646. var o = getApp();
  2647. this.zk = new WormView(t), s.click(function() {
  2648. o.r.Dd()
  2649. }), t.click(function() {
  2650. o.u.P() && (o.r.Dd(), o.s.I(o.s.ci))
  2651. }), e.click(function() {
  2652. o.r.Dd(), o.t.Eh()
  2653. }), i.click(function() {
  2654. o.r.Dd(), o.t.Dh()
  2655. }), r.keypress(function(t) {
  2656. 13 == t.keyCode && o.oa()
  2657. }), h.click(function() {
  2658. o.r.Dd(), o.oa()
  2659. }), l.click(function() {
  2660. o.r.Dd(), o.oa()
  2661. }), p.click(function() {
  2662. o.r.Dd(), o.s.I(o.s.bi)
  2663. }), d.click(function() {
  2664. o.r.Dd(), o.s.I(o.s.ya)
  2665. }), u.click(function() {
  2666. o.u.P() && (o.r.Dd(), o.s.I(o.s.ai))
  2667. }), f.click(function() {
  2668. o.u.P() && (o.r.Dd(), o.s.I(o.s._h))
  2669. }), c.click(function() {
  2670. o.u.P() && (o.r.Dd(), o.s.I(o.s.di))
  2671. }), g.click(function() {
  2672. o.u.P() && (o.r.Dd(), o.s.I(o.s.$h))
  2673. }), this.Ak(), this.Bk();
  2674. var n = getCookie(Cookies.wa);
  2675. "ARENA" != n && "TEAM2" != n && (n = "ARENA"), s.val(n), console.log("Load GM: " + n)
  2676. });
  2677. return C.prototype.a = function() {
  2678. var t = getApp(),
  2679. e = this;
  2680. t.u.V(function() {
  2681. t.s.F.Ck()
  2682. }), t.u.Ti(function() {
  2683. t.u.P() ? (t.t.Fh(t.u.Hi(), PropertyType.ia), t.t.Fh(t.u.Ii(), PropertyType.ja), t.t.Fh(t.u.Ji(), PropertyType.ka), t.t.Fh(t.u.Ki(), PropertyType.la), t.t.Fh(t.u.Li(), PropertyType.ma)) : (t.t.Fh(t.Ha(), PropertyType.ia), t.t.Fh(0, PropertyType.ja), t.t.Fh(0, PropertyType.ka), t.t.Fh(0, PropertyType.la), t.t.Fh(0, PropertyType.ma))
  2684. }), t.u.Ti(function() {
  2685. h.toggle(t.u.P()), p.toggle(!t.u.P()), l.toggle(!t.u.P()), f.toggle(t.u.P()), c.toggle(t.u.P()), g.toggle(t.u.P()), t.u.P() ? (o.hide(), y.html(t.u.Ai()), w.attr("src", t.u.Bi()), k.html(t.u.Di()), v.width(100 * t.u.Fi() / t.u.Gi() + "%"), b.html(t.u.Fi() + " / " + t.u.Gi()), m.html(t.u.Ei()), r.val(t.u.ga())) : (o.toggle(env.vk && !t.Ia()), y.html(y.data("guest")), w.attr("src", GUEST_AVATAR_URL), k.html("10"), v.width("0"), b.html(""), m.html(1), r.val(getCookie(Cookies.Ba)))
  2686. }), t.t.Bh(function() {
  2687. e.zk.ek(t.t.ha(PropertyType.ia), !1, !1), e.zk.fk(t.t.ha(PropertyType.ja), !1, !1), e.zk.gk(t.t.ha(PropertyType.ka), !1, !1), e.zk.hk(t.t.ha(PropertyType.la), !1, !1), e.zk.ik(t.t.ha(PropertyType.ma), !1, !1)
  2688. })
  2689. }, C.prototype.mi = function() {
  2690. BaseViewController.jk.stop(), BaseViewController.jk.fadeOut(50), BaseViewController.kk.stop(), BaseViewController.kk.fadeOut(50), BaseViewController.lk.stop(), BaseViewController.lk.fadeIn(500), BaseViewController.mk.stop(), BaseViewController.mk.fadeOut(50), BaseViewController.nk.stop(), BaseViewController.nk.fadeOut(50), BaseViewController.ok.stop(), BaseViewController.ok.fadeOut(50), BaseViewController.pk.stop(), BaseViewController.pk.fadeOut(50), BaseViewController.qk.stop(), BaseViewController.qk.fadeIn(1), BaseViewController.hi.stop(), BaseViewController.hi.fadeIn(500), BackgroundView.Pe(!0), BaseViewController.sk.stop(), BaseViewController.sk.fadeIn(500), BaseViewController.tk.stop(), BaseViewController.tk.fadeIn(500)
  2691. }, C.prototype.ni = function() {
  2692. getApp().r.Ed(), this.zk.Pe(!0)
  2693. }, C.prototype.ii = function() {
  2694. this.zk.Pe(!1)
  2695. }, C.prototype.Sa = function() {
  2696. this.zk.Sa()
  2697. }, C.prototype.Qa = function(t, e) {
  2698. this.zk.Qa()
  2699. }, C.prototype.ga = function() {
  2700. return r.val()
  2701. }, C.prototype.D = function() {
  2702. return s.val()
  2703. }, C.prototype.Ck = function() {
  2704. a.show()
  2705. }, C.prototype.Ak = function() {
  2706. var t = $("#mm-advice-cont").children(),
  2707. e = 0;
  2708. setInterval(function() {
  2709. t.eq(e).fadeOut(500, function() {
  2710. ++e >= t.length && (e = 0), t.eq(e).fadeIn(500).css("display", "inline-block")
  2711. })
  2712. }, 3e3)
  2713. }, C.prototype.Bk = function() {
  2714. function t() {
  2715. e.La(!0), setTimeout(function() {
  2716. o.hide()
  2717. }, 3e3)
  2718. }
  2719. var e = getApp();
  2720. if (env.vk && !e.Ia()) {
  2721. o.show();
  2722. var i = i18n("index.game.main.menu.unlockSkins.share"),
  2723. r = encodeURIComponent(i18n("index.game.main.menu.unlockSkins.comeAndPlay") + " https://wormate.io/ #wormate #wormateio"),
  2724. s = encodeURIComponent(i18n("index.game.main.menu.unlockSkins.comeAndPlay"));
  2725. n.append($('<a class="mm-skin-over-button" id="mm-skin-over-tw" target="_blank" href="http://twitter.com/intent/tweet?status=' + r + '"><img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjQ1NiIgaGVpZ2h0PSI0NTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Ik02MCAzMzhjMzAgMTkgNjYgMzAgMTA1IDMwIDEwOCAwIDE5Ni04OCAxOTYtMTk2IDAtMyAwLTUgMC04IDQtMyAyOC0yMyAzNC0zNSAwIDAtMjAgOC0zOSAxMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAyLTEgMjctMTggMzAtMzggMCAwLTE0IDctMzMgMTQgLTMgMS03IDItMTAgMyAtMTMtMTMtMzAtMjItNTAtMjIgLTM4IDAtNjkgMzEtNjkgNjkgMCA1IDEgMTEgMiAxNiAtNSAwLTg2LTUtMTQxLTcxIDAgMC0zMyA0NSAyMCA5MSAwIDAtMTYtMS0zMC05IDAgMC01IDU0IDU0IDY4IDAgMC0xMiA0LTMwIDEgMCAwIDEwIDQ0IDYzIDQ4IDAgMC00MiAzOC0xMDEgMjlMNjAgMzM4eiIgZmlsbD0iI0ZGRiIvPjwvc3ZnPg=="><span>' + i + "</span></a>").click(t)), n.append($('<a class="mm-skin-over-button" id="mm-skin-over-fb" target="_blank" href="https://www.facebook.com/dialog/share?app_id=861926850619051&display=popup&href=https%3A%2F%2Fwormate.io&redirect_uri=https%3A%2F%2Fwormate.io&hashtag=%23wormateio&quote=' + s + '"><img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgdmlld0JveD0iMCAwIDQ1NiA0NTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Ik0yNDQuMyA0NTZWMjc5LjdoLTU5LjN2LTcxLjloNTkuM3YtNjAuNGMwLTQzLjkgMzUuNi03OS41IDc5LjUtNzkuNWg2MnY2NC42aC00NC40Yy0xMy45IDAtMjUuMyAxMS4zLTI1LjMgMjUuM3Y1MGg2OC41bC05LjUgNzEuOWgtNTkuMVY0NTZ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+"><span>' + i + "</span></a>").click(t))
  2726. }
  2727. }, C
  2728. }(),
  2729. PrerollViewController = function() {
  2730. var t = extend(BaseViewController, function() {
  2731. BaseViewController.call(this, ViewControllerType.uk)
  2732. });
  2733. return t.prototype.a = function() {}, t.prototype.mi = function() {
  2734. BaseViewController.jk.stop(), BaseViewController.jk.fadeOut(50), BaseViewController.kk.stop(), BaseViewController.kk.fadeOut(50), BaseViewController.lk.stop(), BaseViewController.lk.fadeOut(50), BaseViewController.mk.stop(), BaseViewController.mk.fadeOut(50), BaseViewController.nk.stop(), BaseViewController.nk.fadeOut(50), BaseViewController.ok.stop(), BaseViewController.ok.fadeOut(50), BaseViewController.pk.stop(), BaseViewController.pk.fadeOut(50), BaseViewController.qk.stop(), BaseViewController.qk.fadeOut(1), BaseViewController.hi.stop(), BaseViewController.hi.fadeOut(50), BackgroundView.Pe(!1), BaseViewController.sk.stop(), BaseViewController.sk.fadeOut(50), BaseViewController.tk.stop(), BaseViewController.tk.fadeOut(50)
  2735. }, t
  2736. }(),
  2737. RestrictedViewController = function() {
  2738. var t = extend(BaseViewController, function() {
  2739. BaseViewController.call(this, ViewControllerType.uk)
  2740. });
  2741. return t.prototype.a = function() {}, t.prototype.mi = function() {
  2742. BaseViewController.jk.stop(), BaseViewController.jk.fadeOut(50), BaseViewController.kk.stop(), BaseViewController.kk.fadeOut(50), BaseViewController.lk.stop(), BaseViewController.lk.fadeOut(50), BaseViewController.mk.stop(), BaseViewController.mk.fadeOut(50), BaseViewController.nk.stop(), BaseViewController.nk.fadeOut(50), BaseViewController.ok.stop(), BaseViewController.ok.fadeOut(50), BaseViewController.pk.stop(), BaseViewController.pk.fadeIn(500), BaseViewController.qk.stop(), BaseViewController.qk.fadeIn(1), BaseViewController.hi.stop(), BaseViewController.hi.fadeIn(500), BackgroundView.Pe(!0), BaseViewController.sk.stop(), BaseViewController.sk.fadeOut(50), BaseViewController.tk.stop(), BaseViewController.tk.fadeOut(50)
  2743. }, t.prototype.ni = function() {}, t
  2744. }(),
  2745. ToasterContainerViewController = function() {
  2746. var t = $("#toaster-stack"),
  2747. e = extend(BaseViewController, function() {
  2748. BaseViewController.call(this, ViewControllerType.uk), this.Dk = [], this.Ek = null
  2749. });
  2750. return e.prototype.a = function() {}, e.prototype.mi = function() {
  2751. BaseViewController.jk.stop(), BaseViewController.jk.fadeOut(50), BaseViewController.kk.stop(), BaseViewController.kk.fadeOut(50), BaseViewController.lk.stop(), BaseViewController.lk.fadeOut(50), BaseViewController.mk.stop(), BaseViewController.mk.fadeOut(50), BaseViewController.nk.stop(), BaseViewController.nk.fadeIn(500), BaseViewController.ok.stop(), BaseViewController.ok.fadeOut(50), BaseViewController.pk.stop(), BaseViewController.pk.fadeOut(50), BaseViewController.qk.stop(), BaseViewController.qk.fadeIn(1), BaseViewController.hi.stop(), BaseViewController.hi.fadeIn(500), BackgroundView.Pe(!0), BaseViewController.sk.stop(), BaseViewController.sk.fadeOut(50), BaseViewController.tk.stop(), BaseViewController.tk.fadeIn(500)
  2752. }, e.prototype.ni = function() {
  2753. this.Fk()
  2754. }, e.prototype.qi = function() {
  2755. return null != this.Ek || this.Dk.length > 0
  2756. }, e.prototype._ = function(t) {
  2757. this.Dk.unshift(t), setTimeout(function() {
  2758. getApp().s.oi()
  2759. }, 0)
  2760. }, e.prototype.Xi = function(t) {
  2761. this.Dk.push(t), setTimeout(function() {
  2762. getApp().s.oi()
  2763. }, 0)
  2764. }, e.prototype.Fk = function() {
  2765. var e = this;
  2766. if (null == this.Ek) {
  2767. if (0 == this.Dk.length) return void getApp().s.ki();
  2768. var i = this.Dk.shift();
  2769. this.Ek = i;
  2770. var o = i.Gk();
  2771. o.hide(), o.fadeIn(300), t.append(o), i.Hk = function() {
  2772. o.fadeOut(300), setTimeout(function() {
  2773. o.remove()
  2774. }, 300), e.Ek == i && (e.Ek = null), e.Fk()
  2775. }, i.ni()
  2776. }
  2777. }, e
  2778. }(),
  2779. ViewControllerType = {
  2780. uk: 0,
  2781. li: 1
  2782. },
  2783. BasePopupViewController = function() {
  2784. var t = $("#popup-menu-label"),
  2785. e = $("#popup-menu-coins-box"),
  2786. i = $("#popup-menu-coins-val");
  2787. $("#popup-menu-back").click(function() {
  2788. var t = getApp();
  2789. t.r.Dd(), t.s.ki()
  2790. }), e.click(function() {
  2791. var t = getApp();
  2792. t.u.P() && (t.r.Dd(), t.s.I(t.s.$h))
  2793. });
  2794. var o = extend(BaseViewController, function(t, e) {
  2795. BaseViewController.call(this, ViewControllerType.li), this.bd = t, this.Ik = e
  2796. });
  2797. return o.prototype.a = function() {
  2798. if (o.parent.prototype.a.call(this), !o.Jk) {
  2799. o.Jk = !0;
  2800. var t = getApp();
  2801. t.u.Ti(function() {
  2802. t.u.P() ? i.html(t.u.Di()) : i.html("0")
  2803. })
  2804. }
  2805. }, o.Kk = $("#coins-view"), o.Lk = $("#leaders-view"), o.Mk = $("#profile-view"), o.Nk = $("#settings-view"), o.Ok = $("#login-view"), o.Pk = $("#skins-view"), o.Qk = $("#store-view"), o.Rk = $("#wear-view"), o.Sk = $("#withdraw-consent-view"), o.Tk = $("#delete-account-view"), o.Uk = $("#please-wait-view"), o.prototype.mi = function() {
  2806. BaseViewController.jk.stop(), BaseViewController.jk.fadeOut(200), BaseViewController.kk.stop(), BaseViewController.kk.fadeOut(200), BaseViewController.lk.stop(), BaseViewController.lk.fadeOut(200), BaseViewController.mk.stop(), BaseViewController.mk.fadeIn(200), BaseViewController.nk.stop(), BaseViewController.nk.fadeOut(200), BaseViewController.ok.stop(), BaseViewController.ok.fadeOut(200), BaseViewController.sk.stop(), BaseViewController.sk.fadeIn(200), BaseViewController.tk.stop(), BaseViewController.tk.fadeIn(200), t.html(this.bd), e.toggle(this.Ik), this.Vk(), this.Wk()
  2807. }, o.prototype.Wk = function() {}, o.prototype.Xk = function() {
  2808. BasePopupViewController.Uk.stop(), BasePopupViewController.Uk.fadeIn(300)
  2809. }, o.prototype.Vk = function() {
  2810. BasePopupViewController.Uk.stop(), BasePopupViewController.Uk.fadeOut(300)
  2811. }, o
  2812. }(),
  2813. CoinsViewController = function() {
  2814. var t = $("#store-buy-coins_125000"),
  2815. e = $("#store-buy-coins_50000"),
  2816. i = $("#store-buy-coins_16000"),
  2817. o = $("#store-buy-coins_7000"),
  2818. n = $("#store-buy-coins_3250"),
  2819. r = $("#store-buy-coins_1250"),
  2820. s = extend(BasePopupViewController, function() {
  2821. BasePopupViewController.call(this, i18n("index.game.popup.menu.coins.tab"), !1);
  2822. var s = getApp(),
  2823. a = this;
  2824. t.click(function() {
  2825. s.r.Dd(), a.Yk("coins_125000")
  2826. }), e.click(function() {
  2827. s.r.Dd(), a.Yk("coins_50000")
  2828. }), i.click(function() {
  2829. s.r.Dd(), a.Yk("coins_16000")
  2830. }), o.click(function() {
  2831. s.r.Dd(), a.Yk("coins_7000")
  2832. }), n.click(function() {
  2833. s.r.Dd(), a.Yk("coins_3250")
  2834. }), r.click(function() {
  2835. s.r.Dd(), a.Yk("coins_1250")
  2836. })
  2837. });
  2838. return s.prototype.a = function() {
  2839. s.parent.prototype.a.call(this)
  2840. }, s.prototype.Wk = function() {
  2841. BasePopupViewController.Kk.stop(), BasePopupViewController.Kk.fadeIn(200), BasePopupViewController.Lk.stop(), BasePopupViewController.Lk.fadeOut(50), BasePopupViewController.Mk.stop(), BasePopupViewController.Mk.fadeOut(50), BasePopupViewController.Ok.stop(), BasePopupViewController.Ok.fadeOut(50), BasePopupViewController.Nk.stop(), BasePopupViewController.Nk.fadeOut(50), BasePopupViewController.Pk.stop(), BasePopupViewController.Pk.fadeOut(50), BasePopupViewController.Qk.stop(), BasePopupViewController.Qk.fadeOut(50), BasePopupViewController.Rk.stop(), BasePopupViewController.Rk.fadeOut(50), BasePopupViewController.Sk.stop(), BasePopupViewController.Sk.fadeOut(50), BasePopupViewController.Tk.stop(), BasePopupViewController.Tk.fadeOut(50)
  2842. }, s.prototype.ni = function() {
  2843. getApp().r.Ed()
  2844. }, s.prototype.Yk = function(t) {}, s
  2845. }(),
  2846. LeadersViewController = function() {
  2847. var t = $("#highscore-table"),
  2848. e = $("#leaders-button-level"),
  2849. i = $("#leaders-button-highscore"),
  2850. o = $("#leaders-button-kills"),
  2851. n = extend(BasePopupViewController, function() {
  2852. BasePopupViewController.call(this, i18n("index.game.popup.menu.leaders.tab"), !0);
  2853. var t = getApp(),
  2854. n = this;
  2855. this.Zk = {}, this.$k = {
  2856. _k: {
  2857. al: e,
  2858. bl: "byLevel"
  2859. },
  2860. cl: {
  2861. al: i,
  2862. bl: "byHighScore"
  2863. },
  2864. dl: {
  2865. al: o,
  2866. bl: "byKillsAndHeadShots"
  2867. }
  2868. }, e.click(function() {
  2869. t.r.Dd(), n.el(n.$k._k)
  2870. }), i.click(function() {
  2871. t.r.Dd(), n.el(n.$k.cl)
  2872. }), o.click(function() {
  2873. t.r.Dd(), n.el(n.$k.dl)
  2874. })
  2875. });
  2876. return n.prototype.a = function() {
  2877. n.parent.prototype.a.call(this)
  2878. }, n.prototype.Wk = function() {
  2879. BasePopupViewController.Kk.stop(), BasePopupViewController.Kk.fadeOut(50), BasePopupViewController.Lk.stop(), BasePopupViewController.Lk.fadeIn(200), BasePopupViewController.Mk.stop(), BasePopupViewController.Mk.fadeOut(50), BasePopupViewController.Ok.stop(), BasePopupViewController.Ok.fadeOut(50), BasePopupViewController.Nk.stop(), BasePopupViewController.Nk.fadeOut(50), BasePopupViewController.Pk.stop(), BasePopupViewController.Pk.fadeOut(50), BasePopupViewController.Qk.stop(), BasePopupViewController.Qk.fadeOut(50), BasePopupViewController.Rk.stop(), BasePopupViewController.Rk.fadeOut(50), BasePopupViewController.Sk.stop(), BasePopupViewController.Sk.fadeOut(50), BasePopupViewController.Tk.stop(), BasePopupViewController.Tk.fadeOut(50)
  2880. }, n.prototype.ni = function() {
  2881. getApp().r.Ed();
  2882. var t = this;
  2883. this.Xk(), $.get(GATEWAY_HOST + "/pub/leaders", function(e) {
  2884. t.Zk = e, t.el(null != t.fl ? t.fl : t.$k._k), t.Vk()
  2885. }).done(function() {
  2886. t.Vk()
  2887. })
  2888. }, n.prototype.el = function(e) {
  2889. this.fl = e;
  2890. for (var i in this.$k)
  2891. if (this.$k.hasOwnProperty(i)) {
  2892. var o = this.$k[i];
  2893. o.al.removeClass("pressed")
  2894. } this.fl.al.addClass("pressed");
  2895. for (var n = this.Zk[this.fl.bl], r = "", s = 0; s < n.length; s++) {
  2896. var a = n[s];
  2897. r += '<div class="table-row"><span>' + (s + 1) + '</span><span><img src="' + a.avatarUrl + '"/></span><span>' + a.username + "</span><span>" + a.level + "</span><span>" + a.highScore + "</span><span>" + a.headShots + " / " + a.kills + "</span></div>"
  2898. }
  2899. t.empty(), t.append(r)
  2900. }, n
  2901. }(),
  2902. LoginViewController = function() {
  2903. var t = $("#popup-login-gg"),
  2904. e = $("#popup-login-fb"),
  2905. i = extend(BasePopupViewController, function() {
  2906. BasePopupViewController.call(this, i18n("index.game.popup.menu.login.tab"), !1);
  2907. var i = getApp(),
  2908. o = this;
  2909. t.click(function() {
  2910. i.r.Dd(), o.Xk(), i.u.Ui(function() {
  2911. o.Vk()
  2912. }), setTimeout(function() {
  2913. o.Vk()
  2914. }, 1e4), i.u.bj()
  2915. }), e.click(function() {
  2916. i.r.Dd(), o.Xk(), i.u.Ui(function() {
  2917. o.Vk()
  2918. }), setTimeout(function() {
  2919. o.Vk()
  2920. }, 1e4), i.u.Zi()
  2921. })
  2922. });
  2923. return i.prototype.a = function() {
  2924. i.parent.prototype.a.call(this)
  2925. }, i.prototype.Wk = function() {
  2926. BasePopupViewController.Kk.stop(), BasePopupViewController.Kk.fadeOut(50), BasePopupViewController.Lk.stop(), BasePopupViewController.Lk.fadeOut(50), BasePopupViewController.Mk.stop(), BasePopupViewController.Mk.fadeOut(50), BasePopupViewController.Ok.stop(), BasePopupViewController.Ok.fadeIn(200), BasePopupViewController.Nk.stop(), BasePopupViewController.Nk.fadeOut(50), BasePopupViewController.Pk.stop(), BasePopupViewController.Pk.fadeOut(50), BasePopupViewController.Qk.stop(), BasePopupViewController.Qk.fadeOut(50), BasePopupViewController.Rk.stop(), BasePopupViewController.Rk.fadeOut(50), BasePopupViewController.Sk.stop(), BasePopupViewController.Sk.fadeOut(50), BasePopupViewController.Tk.stop(), BasePopupViewController.Tk.fadeOut(50)
  2927. }, i.prototype.ni = function() {
  2928. getApp().r.Ed()
  2929. }, i
  2930. }(),
  2931. ProfileViewController = function() {
  2932. var t = $("#profile-avatar"),
  2933. e = $("#profile-username"),
  2934. i = $("#profile-experience-bar"),
  2935. o = $("#profile-experience-val"),
  2936. n = $("#profile-level"),
  2937. r = $("#profile-stat-highScore"),
  2938. s = $("#profile-stat-bestSurvivalTime"),
  2939. a = $("#profile-stat-kills"),
  2940. h = $("#profile-stat-headshots"),
  2941. l = $("#profile-stat-gamesPlayed"),
  2942. p = $("#profile-stat-totalTimeSpent"),
  2943. u = $("#profile-stat-registrationDate"),
  2944. c = extend(BasePopupViewController, function() {
  2945. BasePopupViewController.call(this, i18n("index.game.popup.menu.profile.tab"), !0)
  2946. });
  2947. return c.prototype.a = function() {
  2948. c.parent.prototype.a.call(this)
  2949. }, c.prototype.Wk = function() {
  2950. BasePopupViewController.Kk.stop(), BasePopupViewController.Kk.fadeOut(50), BasePopupViewController.Lk.stop(), BasePopupViewController.Lk.fadeOut(50), BasePopupViewController.Mk.stop(), BasePopupViewController.Mk.fadeIn(200), BasePopupViewController.Ok.stop(), BasePopupViewController.Ok.fadeOut(50), BasePopupViewController.Nk.stop(), BasePopupViewController.Nk.fadeOut(50), BasePopupViewController.Pk.stop(), BasePopupViewController.Pk.fadeOut(50), BasePopupViewController.Qk.stop(), BasePopupViewController.Qk.fadeOut(50), BasePopupViewController.Rk.stop(), BasePopupViewController.Rk.fadeOut(50), BasePopupViewController.Sk.stop(), BasePopupViewController.Sk.fadeOut(50), BasePopupViewController.Tk.stop(), BasePopupViewController.Tk.fadeOut(50)
  2951. }, c.prototype.ni = function() {
  2952. var c = getApp();
  2953. c.r.Ed();
  2954. var f = c.u.Si(),
  2955. d = moment([f.year, f.month - 1, f.day]).format("LL");
  2956. e.html(c.u.Ai()), t.attr("src", c.u.Bi()), i.width(100 * c.u.Fi() / c.u.Gi() + "%"), o.html(c.u.Fi() + " / " + c.u.Gi()), n.html(c.u.Ei()), r.html(c.u.Mi()), s.html(timeSecsToIntervalText(c.u.Ni())), a.html(c.u.Oi()), h.html(c.u.Pi()), l.html(c.u.Qi()), p.html(timeSecsToIntervalText(c.u.Ri())), u.html(d)
  2957. }, c
  2958. }(),
  2959. SettingsViewController = function() {
  2960. var t = $("#settings-music-enabled-switch"),
  2961. e = $("#settings-sfx-enabled-switch"),
  2962. i = $("#settings-show-names-switch"),
  2963. o = $("#popup-logout"),
  2964. n = $("#popup-logout-container"),
  2965. r = $("#popup-delete-account"),
  2966. s = $("#popup-delete-account-container"),
  2967. a = $("#popup-withdraw-consent"),
  2968. h = extend(BasePopupViewController, function() {
  2969. BasePopupViewController.call(this, i18n("index.game.popup.menu.settings.tab"), !1);
  2970. var n = this,
  2971. s = getApp();
  2972. t.click(function() {
  2973. var e = !!t.prop("checked");
  2974. setCookie(Cookies.Qe, e, 30), s.r.ud(e), s.r.Dd()
  2975. }), e.click(function() {
  2976. var t = !!e.prop("checked");
  2977. setCookie(Cookies.Re, t, 30), s.r.sd(t), s.r.Dd()
  2978. }), i.click(function() {
  2979. s.r.Dd()
  2980. }), o.click(function() {
  2981. s.r.Dd(), n.Xk(), setTimeout(function() {
  2982. n.Vk()
  2983. }, 2e3), s.u.$i()
  2984. }), r.click(function() {
  2985. s.u.P() ? (s.r.Dd(), s.s.I(s.s.Zh)) : s.r.Id()
  2986. }), a.click(function() {
  2987. s.Y() ? (s.r.Dd(), s.s.I(s.s.Yh)) : s.r.Id()
  2988. })
  2989. });
  2990. return h.prototype.a = function() {
  2991. h.parent.prototype.a.call(this);
  2992. var o = getApp(),
  2993. r = void 0;
  2994. switch (getCookie(Cookies.Qe)) {
  2995. case "false":
  2996. r = !1;
  2997. break;
  2998. default:
  2999. r = !0
  3000. }
  3001. t.prop("checked", r), o.r.ud(r);
  3002. var a = void 0;
  3003. switch (getCookie(Cookies.Re)) {
  3004. case "false":
  3005. a = !1;
  3006. break;
  3007. default:
  3008. a = !0
  3009. }
  3010. e.prop("checked", a), o.r.sd(a);
  3011. var l = void 0;
  3012. switch (getCookie(Cookies.za)) {
  3013. case "false":
  3014. l = !1;
  3015. break;
  3016. default:
  3017. l = !0
  3018. }
  3019. console.log("Load sPN: " + l), i.prop("checked", l), o.u.V(function() {
  3020. n.toggle(o.u.P()), s.toggle(o.u.P())
  3021. })
  3022. }, h.prototype.Wk = function() {
  3023. BasePopupViewController.Kk.stop(), BasePopupViewController.Kk.fadeOut(50), BasePopupViewController.Lk.stop(), BasePopupViewController.Lk.fadeOut(50), BasePopupViewController.Mk.stop(), BasePopupViewController.Mk.fadeOut(50), BasePopupViewController.Ok.stop(), BasePopupViewController.Ok.fadeOut(50), BasePopupViewController.Nk.stop(), BasePopupViewController.Nk.fadeIn(200), BasePopupViewController.Pk.stop(), BasePopupViewController.Pk.fadeOut(50), BasePopupViewController.Qk.stop(), BasePopupViewController.Qk.fadeOut(50), BasePopupViewController.Rk.stop(), BasePopupViewController.Rk.fadeOut(50), BasePopupViewController.Sk.stop(), BasePopupViewController.Sk.fadeOut(50), BasePopupViewController.Tk.stop(), BasePopupViewController.Tk.fadeOut(50)
  3024. }, h.prototype.ni = function() {
  3025. var t = getApp();
  3026. t.r.Ed(), t.Y() ? a.show() : a.hide()
  3027. }, h.prototype.xa = function() {
  3028. return i.prop("checked")
  3029. }, h
  3030. }(),
  3031. SkinsViewController = function() {
  3032. var t = $("#store-view-canv"),
  3033. e = $("#skin-description-text"),
  3034. i = $("#skin-group-description-text"),
  3035. o = $("#store-locked-bar"),
  3036. n = $("#store-locked-bar-text"),
  3037. r = $("#store-buy-button"),
  3038. s = $("#store-item-price"),
  3039. a = $("#store-groups"),
  3040. h = $("#store-view-prev"),
  3041. l = $("#store-view-next"),
  3042. p = extend(BasePopupViewController, function() {
  3043. BasePopupViewController.call(this, i18n("index.game.popup.menu.skins.tab"), !0);
  3044. var e = this,
  3045. i = getApp();
  3046. this.gl = null, this.hl = [], this.il = {}, this.jl = new WormView(t), r.click(function() {
  3047. i.r.Dd(), e.kl()
  3048. }), h.click(function() {
  3049. i.r.Dd(), e.gl.ll()
  3050. }), l.click(function() {
  3051. i.r.Dd(), e.gl.ml()
  3052. })
  3053. });
  3054. p.prototype.a = function() {
  3055. p.parent.prototype.a.call(this);
  3056. var t = this,
  3057. e = getApp();
  3058. e.p.ca(function() {
  3059. var i = e.p.Bc();
  3060. if (null != i) {
  3061. t.hl = [];
  3062. for (var o = 0; o < i.skinGroupArrayDict.length; o++) t.hl.push(new u(t, i.skinGroupArrayDict[o]));
  3063. t.il = {};
  3064. for (var n = 0; n < i.skinArrayDict.length; n++) {
  3065. var r = i.skinArrayDict[n];
  3066. t.il[r.id] = r
  3067. }
  3068. }
  3069. }), this.nl(!1), e.t.Bh(function() {
  3070. t.nl(!1)
  3071. })
  3072. }, p.prototype.Wk = function() {
  3073. BasePopupViewController.Kk.stop(), BasePopupViewController.Kk.fadeOut(50), BasePopupViewController.Lk.stop(), BasePopupViewController.Lk.fadeOut(50), BasePopupViewController.Mk.stop(), BasePopupViewController.Mk.fadeOut(50), BasePopupViewController.Ok.stop(), BasePopupViewController.Ok.fadeOut(50), BasePopupViewController.Nk.stop(), BasePopupViewController.Nk.fadeOut(50), BasePopupViewController.Pk.stop(), BasePopupViewController.Pk.fadeIn(200), BasePopupViewController.Qk.stop(), BasePopupViewController.Qk.fadeOut(50), BasePopupViewController.Rk.stop(), BasePopupViewController.Rk.fadeOut(50), BasePopupViewController.Sk.stop(), BasePopupViewController.Sk.fadeOut(50), BasePopupViewController.Tk.stop(), BasePopupViewController.Tk.fadeOut(50)
  3074. }, p.prototype.ni = function() {
  3075. getApp().r.Ed(), this.ol(), this.jl.Pe(!0)
  3076. }, p.prototype.ii = function() {
  3077. this.jl.Pe(!1)
  3078. }, p.prototype.Sa = function() {
  3079. this.jl.Sa()
  3080. }, p.prototype.Qa = function(t, e) {
  3081. this.jl.Qa()
  3082. }, p.prototype.ol = function() {
  3083. var t = this,
  3084. e = this,
  3085. i = getApp();
  3086. a.empty();
  3087. for (var o = 0; o < this.hl.length; o++) ! function(o) {
  3088. var n = t.hl[o],
  3089. r = document.createElement("li");
  3090. a.append(r);
  3091. var s = $(r);
  3092. s.html(n.pl()), s.click(function() {
  3093. i.r.Dd(), e.ql(n)
  3094. }), n.rl = s
  3095. }(o);
  3096. if (this.hl.length > 0) {
  3097. for (var n = i.t.ha(PropertyType.ia), o = 0; o < this.hl.length; o++)
  3098. for (var r = this.hl[o], s = r.sl.list, h = 0; h < s.length; h++)
  3099. if (s[h] == n) return r.tl = h, void this.ql(r);
  3100. this.ql(this.hl[0])
  3101. }
  3102. }, p.prototype.ql = function(t) {
  3103. if (this.gl != t) {
  3104. var e = getApp();
  3105. if (this.gl = t, a.children().removeClass("pressed"), this.gl.rl && this.gl.rl.addClass("pressed"), i.html(""), null != t.sl) {
  3106. var o = e.p.Bc().textDict[t.sl.description];
  3107. null != o && i.html(convertI18nStringToHTML(i18nCustomBundle(o)))
  3108. }
  3109. this.nl(!0)
  3110. }
  3111. }, p.prototype.ul = function() {
  3112. return null == this.gl ? Optional.ah() : this.gl.vl()
  3113. }, p.prototype.kl = function() {
  3114. var t = this;
  3115. this.ul().eh(function(e) {
  3116. t.wl(e)
  3117. })
  3118. }, p.prototype.wl = function(t) {
  3119. var e = this,
  3120. i = getApp(),
  3121. o = this.il[t].price;
  3122. if (!(i.u.Di() < o)) {
  3123. this.Xk();
  3124. var n = i.t.ha(PropertyType.ia),
  3125. r = i.t.ha(PropertyType.ja),
  3126. s = i.t.ha(PropertyType.ka),
  3127. a = i.t.ha(PropertyType.la),
  3128. h = i.t.ha(PropertyType.ma);
  3129. i.u.Yi(t, PropertyType.ia, function() {
  3130. i.t.Fh(n, PropertyType.ia), i.t.Fh(r, PropertyType.ja), i.t.Fh(s, PropertyType.ka), i.t.Fh(a, PropertyType.la), i.t.Fh(h, PropertyType.ma), i.u.Gh(t, PropertyType.ia) && i.t.Fh(t, PropertyType.ia), e.Vk()
  3131. })
  3132. }
  3133. }, p.prototype.nl = function(t) {
  3134. var i = getApp();
  3135. this.jl.fk(i.t.ha(PropertyType.ja), !1, !1), this.jl.gk(i.t.ha(PropertyType.ka), !1, !1), this.jl.hk(i.t.ha(PropertyType.la), !1, !1), this.jl.ik(i.t.ha(PropertyType.ma), !1, !1);
  3136. var a = this.ul();
  3137. if (a.dh()) {
  3138. var h = a.ch(),
  3139. l = this.il[h],
  3140. p = !1;
  3141. if (i.t.Ka(h, PropertyType.ia)) o.hide(), r.hide();
  3142. else if (null == l || 1 == l.nonbuyable) {
  3143. if (p = !0, o.show(), r.hide(), n.text(i18n("index.game.popup.menu.store.locked")), null != l && l.nonbuyable && null != l.nonbuyableCause) {
  3144. var u = i.p.Bc().textDict[l.nonbuyableCause];
  3145. null != u && n.text(i18nCustomBundle(u))
  3146. }
  3147. } else o.hide(), r.show(), s.html(l.price);
  3148. if (e.html(""), null != l && null != l.description) {
  3149. var c = i.p.Bc().textDict[l.description];
  3150. null != c && e.html(convertI18nStringToHTML(i18nCustomBundle(c)))
  3151. }
  3152. this.jl.ek(h, !0, p), t && i.t.Fh(h, PropertyType.ia)
  3153. }
  3154. };
  3155. var u = function() {
  3156. function t(t, e) {
  3157. this.xl = t, this.tl = 0, this.sl = e
  3158. }
  3159. return t.prototype.ll = function() {
  3160. --this.tl < 0 && (this.tl = this.sl.list.length - 1), this.xl.nl(!0)
  3161. }, t.prototype.ml = function() {
  3162. ++this.tl >= this.sl.list.length && (this.tl = 0), this.xl.nl(!0)
  3163. }, t.prototype.pl = function() {
  3164. return i18nCustomBundle(this.sl.name)
  3165. }, t.prototype.vl = function() {
  3166. return this.tl >= this.sl.list.length ? Optional.ah() : Optional.bh(this.sl.list[this.tl])
  3167. }, t
  3168. }();
  3169. return p
  3170. }(),
  3171. StoreViewController = function() {
  3172. var t = $("#store-go-coins-button"),
  3173. e = $("#store-go-skins-button"),
  3174. i = $("#store-go-wear-button"),
  3175. o = extend(BasePopupViewController, function() {
  3176. BasePopupViewController.call(this, i18n("index.game.popup.menu.store.tab"), !0);
  3177. var o = getApp();
  3178. t.click(function() {
  3179. o.r.Dd(), o.s.I(o.s.$h)
  3180. }), e.click(function() {
  3181. o.r.Dd(), o.s.I(o.s.ci)
  3182. }), i.click(function() {
  3183. o.r.Dd(), o.s.I(o.s.ei)
  3184. })
  3185. });
  3186. return o.prototype.a = function() {
  3187. o.parent.prototype.a.call(this)
  3188. }, o.prototype.Wk = function() {
  3189. BasePopupViewController.Kk.stop(), BasePopupViewController.Kk.fadeOut(50), BasePopupViewController.Lk.stop(), BasePopupViewController.Lk.fadeOut(50), BasePopupViewController.Mk.stop(), BasePopupViewController.Mk.fadeOut(50), BasePopupViewController.Ok.stop(), BasePopupViewController.Ok.fadeOut(50), BasePopupViewController.Nk.stop(), BasePopupViewController.Nk.fadeOut(50), BasePopupViewController.Pk.stop(), BasePopupViewController.Pk.fadeOut(50), BasePopupViewController.Qk.stop(), BasePopupViewController.Qk.fadeIn(200), BasePopupViewController.Rk.stop(), BasePopupViewController.Rk.fadeOut(50), BasePopupViewController.Sk.stop(), BasePopupViewController.Sk.fadeOut(50), BasePopupViewController.Tk.stop(), BasePopupViewController.Tk.fadeOut(50)
  3190. }, o.prototype.ni = function() {
  3191. getApp().r.Ed()
  3192. }, o
  3193. }(),
  3194. WearViewController = function() {
  3195. var t = $("#wear-view-canv"),
  3196. e = $("#wear-description-text"),
  3197. i = $("#wear-locked-bar"),
  3198. o = $("#wear-locked-bar-text"),
  3199. n = $("#wear-buy-button"),
  3200. r = $("#wear-item-price"),
  3201. s = $("#wear-eyes-button"),
  3202. a = $("#wear-mouths-button"),
  3203. h = $("#wear-glasses-button"),
  3204. l = $("#wear-hats-button"),
  3205. p = $("#wear-tint-chooser"),
  3206. u = $("#wear-view-prev"),
  3207. c = $("#wear-view-next"),
  3208. f = extend(BasePopupViewController, function() {
  3209. var e = this;
  3210. BasePopupViewController.call(this, i18n("index.game.popup.menu.wear.tab"), !0);
  3211. var i = getApp(),
  3212. o = this;
  3213. this.yl = [], this.ja = new d(this, PropertyType.ja, s), this.ka = new d(this, PropertyType.ka, a), this.la = new d(this, PropertyType.la, h), this.ma = new d(this, PropertyType.ma, l), this.zl = null, this.Al = null, this.Bl = null, this.Cl = null, this.Dl = null, this.El = null, this.Fl = new WormView(t), n.click(function() {
  3214. i.r.Dd(), o.Gl()
  3215. }), u.click(function() {
  3216. i.r.Dd(), o.zl.Hl()
  3217. }), c.click(function() {
  3218. i.r.Dd(), o.zl.Il()
  3219. }), s.click(function() {
  3220. i.r.Dd(), o.Jl(e.ja)
  3221. }), a.click(function() {
  3222. i.r.Dd(), o.Jl(e.ka)
  3223. }), h.click(function() {
  3224. i.r.Dd(), o.Jl(e.la)
  3225. }), l.click(function() {
  3226. i.r.Dd(), o.Jl(e.ma)
  3227. }), this.yl.push(this.ja), this.yl.push(this.ka), this.yl.push(this.la), this.yl.push(this.ma)
  3228. });
  3229. f.prototype.a = function() {
  3230. f.parent.prototype.a.call(this);
  3231. var t = getApp(),
  3232. e = this;
  3233. t.p.ca(function() {
  3234. var i = t.p.Bc();
  3235. null != i && (e.Al = i.eyesDict, e.Bl = i.mouthDict, e.Cl = i.glassesDict, e.Dl = i.hatDict, e.El = i.colorDict, e.ja.Kl(i.eyesVariantArray), e.ja.Ll(e.Al), e.ka.Kl(i.mouthVariantArray), e.ka.Ll(e.Bl), e.la.Kl(i.glassesVariantArray), e.la.Ll(e.Cl), e.ma.Kl(i.hatVariantArray), e.ma.Ll(e.Dl))
  3236. }), this.nl(!1), t.t.Bh(function() {
  3237. e.nl(!1)
  3238. })
  3239. }, f.prototype.Wk = function() {
  3240. BasePopupViewController.Kk.stop(), BasePopupViewController.Kk.fadeOut(50), BasePopupViewController.Lk.stop(), BasePopupViewController.Lk.fadeOut(50), BasePopupViewController.Mk.stop(), BasePopupViewController.Mk.fadeOut(50), BasePopupViewController.Ok.stop(), BasePopupViewController.Ok.fadeOut(50), BasePopupViewController.Nk.stop(), BasePopupViewController.Nk.fadeOut(50), BasePopupViewController.Pk.stop(), BasePopupViewController.Pk.fadeOut(50), BasePopupViewController.Qk.stop(), BasePopupViewController.Qk.fadeOut(50), BasePopupViewController.Rk.stop(), BasePopupViewController.Rk.fadeIn(200), BasePopupViewController.Sk.stop(), BasePopupViewController.Sk.fadeOut(50), BasePopupViewController.Tk.stop(), BasePopupViewController.Tk.fadeOut(50)
  3241. }, f.prototype.ni = function() {
  3242. getApp().r.Ed(), this.Jl(null != this.zl ? this.zl : this.ja), this.Fl.Pe(!0)
  3243. }, f.prototype.ii = function() {
  3244. this.Fl.Pe(!1)
  3245. }, f.prototype.Sa = function() {
  3246. this.Fl.Sa()
  3247. }, f.prototype.Qa = function(t, e) {
  3248. this.Fl.Qa()
  3249. }, f.prototype.Jl = function(t) {
  3250. this.zl = t;
  3251. for (var e = 0; e < this.yl.length; e++) this.yl[e].al.removeClass("pressed");
  3252. this.zl.al.addClass("pressed"), this.zl.mi()
  3253. }, f.prototype.Ml = function() {
  3254. return null == this.zl ? Optional.ah() : Optional.bh({
  3255. Mb: this.zl.vl(),
  3256. sc: this.zl.sc
  3257. })
  3258. }, f.prototype.Gl = function() {
  3259. var t = this;
  3260. this.Ml().eh(function(e) {
  3261. t.Yi(e.Mb, e.sc)
  3262. })
  3263. }, f.prototype.Yi = function(t, e) {
  3264. var i = this,
  3265. o = getApp(),
  3266. n = void 0;
  3267. switch (e) {
  3268. case PropertyType.ja:
  3269. n = this.Al[t].price;
  3270. break;
  3271. case PropertyType.ka:
  3272. n = this.Bl[t].price;
  3273. break;
  3274. case PropertyType.la:
  3275. n = this.Cl[t].price;
  3276. break;
  3277. case PropertyType.ma:
  3278. n = this.Dl[t].price;
  3279. break;
  3280. default:
  3281. return
  3282. }
  3283. if (!(o.u.Di() < n)) {
  3284. this.Xk();
  3285. var r = o.t.ha(PropertyType.ia),
  3286. s = o.t.ha(PropertyType.ja),
  3287. a = o.t.ha(PropertyType.ka),
  3288. h = o.t.ha(PropertyType.la),
  3289. l = o.t.ha(PropertyType.ma);
  3290. o.u.Yi(t, e, function() {
  3291. o.t.Fh(r, PropertyType.ia), o.t.Fh(s, PropertyType.ja), o.t.Fh(a, PropertyType.ka), o.t.Fh(h, PropertyType.la), o.t.Fh(l, PropertyType.ma), o.u.Gh(t, e) && o.t.Fh(t, e), i.Vk()
  3292. })
  3293. }
  3294. }, f.prototype.Nl = function(t, e) {
  3295. switch (e) {
  3296. case PropertyType.ja:
  3297. return this.Al[t];
  3298. case PropertyType.ka:
  3299. return this.Bl[t];
  3300. case PropertyType.la:
  3301. return this.Cl[t];
  3302. case PropertyType.ma:
  3303. return this.Dl[t]
  3304. }
  3305. return null
  3306. }, f.prototype.nl = function(t) {
  3307. var s = getApp();
  3308. this.Fl.ek(s.t.ha(PropertyType.ia), !1, !1), this.Fl.fk(s.t.ha(PropertyType.ja), !1, !1), this.Fl.gk(s.t.ha(PropertyType.ka), !1, !1), this.Fl.hk(s.t.ha(PropertyType.la), !1, !1), this.Fl.ik(s.t.ha(PropertyType.ma), !1, !1);
  3309. var a = this.Ml();
  3310. if (a.dh()) {
  3311. var h = a.ch(),
  3312. l = this.Nl(h.Mb, h.sc),
  3313. p = !1;
  3314. if (s.t.Ka(h.Mb, h.sc)) i.hide(), n.hide();
  3315. else if (null == l || 1 == l.nonbuyable) {
  3316. if (p = !0, i.show(), n.hide(), o.text(i18n("index.game.popup.menu.store.locked")), null != l && l.nonbuyable && null != l.nonbuyableCause) {
  3317. var u = s.p.Bc().textDict[l.nonbuyableCause];
  3318. null != u && o.text(i18nCustomBundle(u))
  3319. }
  3320. } else i.hide(), n.show(), r.html(l.price);
  3321. if (e.html(""), null != l && null != l.description) {
  3322. var c = s.p.Bc().textDict[l.description];
  3323. null != c && e.html(convertI18nStringToHTML(i18nCustomBundle(c)))
  3324. }
  3325. switch (h.sc) {
  3326. case PropertyType.ja:
  3327. this.Fl.fk(h.Mb, !0, p);
  3328. break;
  3329. case PropertyType.ka:
  3330. this.Fl.gk(h.Mb, !0, p);
  3331. break;
  3332. case PropertyType.la:
  3333. this.Fl.hk(h.Mb, !0, p);
  3334. break;
  3335. case PropertyType.ma:
  3336. this.Fl.ik(h.Mb, !0, p)
  3337. }
  3338. t && s.t.Fh(h.Mb, h.sc)
  3339. }
  3340. };
  3341. var d = function() {
  3342. function t(t, e, i) {
  3343. this.xl = t, this.sc = e, this.al = i, this.Ol = {}, this.Pl = [
  3344. []
  3345. ], this.Ql = -10, this.Rl = -10
  3346. }
  3347. return t.prototype.Kl = function(t) {
  3348. this.Pl = t
  3349. }, t.prototype.Ll = function(t) {
  3350. this.Ol = t
  3351. }, t.prototype.mi = function() {
  3352. for (var t = getApp(), e = t.t.ha(this.sc), i = 0; i < this.Pl.length; i++)
  3353. for (var o = 0; o < this.Pl[i].length; o++)
  3354. if (this.Pl[i][o] == e) return this.Sl(i), void this.Tl(o);
  3355. this.Sl(0), this.Tl(0)
  3356. }, t.prototype.Hl = function() {
  3357. var t = this.Ql - 1;
  3358. t < 0 && (t = this.Pl.length - 1), this.Sl(t), this.Tl(this.Rl % this.Pl[t].length)
  3359. }, t.prototype.Il = function() {
  3360. var t = this.Ql + 1;
  3361. t >= this.Pl.length && (t = 0), this.Sl(t), this.Tl(this.Rl % this.Pl[t].length)
  3362. }, t.prototype.Sl = function(t) {
  3363. var e = this;
  3364. if (!(t < 0 || t >= this.Pl.length)) {
  3365. this.Ql = t, p.empty();
  3366. var i = this.Pl[this.Ql];
  3367. if (i.length > 1)
  3368. for (var o = 0; o < i.length; o++) ! function(t) {
  3369. var o = i[t],
  3370. n = e.Ol[o],
  3371. r = "#" + e.xl.El[n.prime],
  3372. s = $('<div style="border-color:' + r + '"></div>');
  3373. s.click(function() {
  3374. getApp().r.Dd(), e.Tl(t)
  3375. }), p.append(s)
  3376. }(o)
  3377. }
  3378. }, t.prototype.Tl = function(t) {
  3379. if (!(t < 0 || t >= this.Pl[this.Ql].length)) {
  3380. this.Rl = t, p.children().css("background-color", "transparent");
  3381. var e = p.children(":nth-child(" + (1 + t) + ")");
  3382. e.css("background-color", e.css("border-color")), this.xl.nl(!0)
  3383. }
  3384. }, t.prototype.vl = function() {
  3385. return this.Pl[this.Ql][this.Rl]
  3386. }, t
  3387. }();
  3388. return f
  3389. }(),
  3390. WithdrawConsentViewController = function() {
  3391. var t = $("#withdraw-consent-yes"),
  3392. e = $("#withdraw-consent-no"),
  3393. i = extend(BasePopupViewController, function() {
  3394. BasePopupViewController.call(this, i18n("index.game.popup.menu.consent.tab"), !1);
  3395. var i = getApp();
  3396. t.click(function() {
  3397. i.r.Dd(), i.Y() ? (i.s.I(i.s.F), i.$(!1, !0), i.s.aa._(new ConsentAcceptanceToasterViewController)) : i.s.ki()
  3398. }), e.click(function() {
  3399. i.r.Dd(), i.s.ki()
  3400. })
  3401. });
  3402. return i.prototype.a = function() {
  3403. i.parent.prototype.a.call(this)
  3404. }, i.prototype.Wk = function() {
  3405. BasePopupViewController.Kk.stop(), BasePopupViewController.Kk.fadeOut(50), BasePopupViewController.Lk.stop(), BasePopupViewController.Lk.fadeOut(50), BasePopupViewController.Mk.stop(), BasePopupViewController.Mk.fadeOut(50), BasePopupViewController.Ok.stop(), BasePopupViewController.Ok.fadeOut(50), BasePopupViewController.Nk.stop(), BasePopupViewController.Nk.fadeOut(50), BasePopupViewController.Pk.stop(), BasePopupViewController.Pk.fadeOut(50), BasePopupViewController.Qk.stop(), BasePopupViewController.Qk.fadeOut(50), BasePopupViewController.Rk.stop(), BasePopupViewController.Rk.fadeOut(50), BasePopupViewController.Sk.stop(), BasePopupViewController.Sk.fadeIn(200), BasePopupViewController.Tk.stop(), BasePopupViewController.Tk.fadeOut(50)
  3406. }, i.prototype.ni = function() {
  3407. getApp().r.Ed()
  3408. }, i
  3409. }(),
  3410. DeleteAccountViewController = function() {
  3411. var t = $("#delete-account-timer"),
  3412. e = $("#delete-account-yes"),
  3413. i = $("#delete-account-no"),
  3414. o = extend(BasePopupViewController, function() {
  3415. BasePopupViewController.call(this, i18n("index.game.popup.menu.delete.tab"), !1);
  3416. var t = getApp();
  3417. e.click(function() {
  3418. t.r.Dd(), t.u.P() ? (t.u.fj(), t.u.$i()) : t.s.ki()
  3419. }), i.click(function() {
  3420. t.r.Dd(), t.s.ki()
  3421. }), this.Ul = []
  3422. });
  3423. return o.prototype.a = function() {
  3424. o.parent.prototype.a.call(this)
  3425. }, o.prototype.Wk = function() {
  3426. BasePopupViewController.Kk.stop(), BasePopupViewController.Kk.fadeOut(50), BasePopupViewController.Lk.stop(), BasePopupViewController.Lk.fadeOut(50), BasePopupViewController.Mk.stop(), BasePopupViewController.Mk.fadeOut(50), BasePopupViewController.Ok.stop(), BasePopupViewController.Ok.fadeOut(50), BasePopupViewController.Nk.stop(), BasePopupViewController.Nk.fadeOut(50), BasePopupViewController.Pk.stop(), BasePopupViewController.Pk.fadeOut(50), BasePopupViewController.Qk.stop(), BasePopupViewController.Qk.fadeOut(50), BasePopupViewController.Rk.stop(), BasePopupViewController.Rk.fadeOut(50), BasePopupViewController.Sk.stop(), BasePopupViewController.Sk.fadeOut(50), BasePopupViewController.Tk.stop(), BasePopupViewController.Tk.fadeIn(200)
  3427. }, o.prototype.ni = function() {
  3428. getApp().r.Id(), e.stop(), e.hide(), t.stop(), t.show(), t.text(".. 10 .."), this.Vl(), this.Wl(function() {
  3429. t.text(".. 9 ..")
  3430. }, 1e2), this.Wl(function() {
  3431. t.text(".. 8 ..")
  3432. }, 2e2), this.Wl(function() {
  3433. t.text(".. 7 ..")
  3434. }, 3e2), this.Wl(function() {
  3435. t.text(".. 6 ..")
  3436. }, 4e2), this.Wl(function() {
  3437. t.text(".. 5 ..")
  3438. }, 5e2), this.Wl(function() {
  3439. t.text(".. 4 ..")
  3440. }, 6e2), this.Wl(function() {
  3441. t.text(".. 3 ..")
  3442. }, 7e2), this.Wl(function() {
  3443. t.text(".. 2 ..")
  3444. }, 8e2), this.Wl(function() {
  3445. t.text(".. 1 ..")
  3446. }, 9e2), this.Wl(function() {
  3447. t.hide(), e.fadeIn(300)
  3448. }, 1e3)
  3449. }, o.prototype.Wl = function(t, e) {
  3450. var i = setTimeout(t, e);
  3451. this.Ul.push(i)
  3452. }, o.prototype.Vl = function() {
  3453. for (var t = 0; t < this.Ul.length; t++) clearTimeout(this.Ul[t]);
  3454. this.Ul = []
  3455. }, o
  3456. }(),
  3457. BaseToasterViewController = function() {
  3458. function t() {
  3459. this.Hk = function() {}
  3460. }
  3461. return t.prototype.Gk = function() {}, t.prototype.ni = function() {}, t
  3462. }(),
  3463. CoinsToasterViewController = function() {
  3464. var t = extend(BaseToasterViewController, function(t) {
  3465. BaseToasterViewController.call(this);
  3466. var e = Date.now() + "_" + Math.floor(1e3 + 8999 * Math.random());
  3467. this.Xl = $('<div id="' + e + '" class="toaster toaster-coins"> <img class="toaster-coins-img" alt="Wormate Coin" src="/images/coin_320.png" /> <div class="toaster-coins-val">+' + t + '</div> <div class="toaster-coins-close">' + i18n("index.game.toaster.continue") + "</div></div>");
  3468. var i = this;
  3469. this.Xl.find(".toaster-coins-close").click(function() {
  3470. getApp().r.Dd(), i.Hk()
  3471. })
  3472. });
  3473. return t.prototype.Gk = function() {
  3474. return this.Xl
  3475. }, t.prototype.ni = function() {
  3476. getApp().r.Gd()
  3477. }, t
  3478. }(),
  3479. LevelUpToasterViewController = function() {
  3480. var t = extend(BaseToasterViewController, function(t) {
  3481. BaseToasterViewController.call(this);
  3482. var e = Date.now() + "_" + Math.floor(1e3 + 8999 * Math.random());
  3483. this.Xl = $('<div id="' + e + '" class="toaster toaster-levelup"> <img class="toaster-levelup-img" alt="Wormate Level Up Star" src="/images/level-star.svg" /> <div class="toaster-levelup-val">' + t + '</div> <div class="toaster-levelup-text">' + i18n("index.game.toaster.levelup") + '</div> <div class="toaster-levelup-close">' + i18n("index.game.toaster.continue") + "</div></div>");
  3484. var i = this;
  3485. this.Xl.find(".toaster-levelup-close").click(function() {
  3486. getApp().r.Dd(), i.Hk()
  3487. })
  3488. });
  3489. return t.prototype.Gk = function() {
  3490. return this.Xl
  3491. }, t.prototype.ni = function() {
  3492. getApp().r.Fd()
  3493. }, t
  3494. }(),
  3495. ConsentAcceptanceToasterViewController = function() {
  3496. var t = extend(BaseToasterViewController, function() {
  3497. BaseToasterViewController.call(this);
  3498. var t = this,
  3499. e = getApp(),
  3500. i = Date.now() + "_" + Math.floor(1e3 + 8999 * Math.random());
  3501. this.Xl = $('<div id="' + i + '" class="toaster toaster-consent-accepted"> <img class="toaster-consent-accepted-logo" src="' + LINE_LOGO_URL + '" alt="Wormate.io logo"/> <div class="toaster-consent-accepted-container"> <span class="toaster-consent-accepted-text">' + i18n("index.game.toaster.consent.text").replaceAll(" ", "&nbsp;").replaceAll("\n", "<br/>") + '</span> <a class="toaster-consent-accepted-link" href="/privacy-policy">' + i18n("index.game.toaster.consent.link") + '</a> </div> <div class="toaster-consent-close">' + i18n("index.game.toaster.consent.iAccept") + "</div></div>"), this.Yl = this.Xl.find(".toaster-consent-close"), this.Yl.hide(), this.Yl.click(function() {
  3502. e.r.Dd(), e.Y() && e.$(!0, !0), t.Hk()
  3503. })
  3504. });
  3505. return t.prototype.Gk = function() {
  3506. return this.Xl
  3507. }, t.prototype.ni = function() {
  3508. var t = this,
  3509. e = getApp();
  3510. e.Y() && !e.Z() ? (e.r.Id(), setTimeout(function() {
  3511. t.Yl.fadeIn(300)
  3512. }, 2e3)) : setTimeout(function() {
  3513. t.Hk()
  3514. }, 0)
  3515. }, t
  3516. }(),
  3517. ENV_MAP = {};
  3518. ENV_MAP.main = {
  3519. Na: ADINPLAY_BANNER("aqnvgcpz05orkobh", atob("V1JNX3dvcm1hdGUtaW9fMzAweDI1MA==")),
  3520. K: ADINPLAY_BANNER("ltmolilci1iurq1i", atob("d29ybWF0ZS1pb185NzB4MjUw")),
  3521. sa: ADINPLAY_PREROLL_PLAYER(),
  3522. e: 4,
  3523. pa: !1,
  3524. vk: !0
  3525. }, ENV_MAP.miniclip = {
  3526. Na: ADINPLAY_BANNER("aqnvgcpz05orkobh", atob("V1JNX3dvcm1hdGUtaW9fMzAweDI1MA==")),
  3527. K: ADINPLAY_BANNER("ltmolilci1iurq1i", atob("d29ybWF0ZS1pb185NzB4MjUw")),
  3528. sa: ADINPLAY_PREROLL_PLAYER(),
  3529. e: 4,
  3530. pa: !1,
  3531. vk: !1
  3532. };
  3533. var env = ENV_MAP[window.ENV];
  3534. env || (env = ENV_MAP.main), $(function() {
  3535. FastClick.attach(document.body)
  3536. }), addEventListener("contextmenu", function(t) {
  3537. return t.preventDefault(), t.stopPropagation(), !1
  3538. }), loadScript("//connect.facebook.net/" + LOCALE + "/sdk.js", "facebook-jssdk", function() {
  3539. FB.init({
  3540. appId: atob("ODYxOTI2ODUwNjE5MDUx"),
  3541. cookie: !0,
  3542. xfbml: !0,
  3543. status: !0,
  3544. version: "v8.0"
  3545. })
  3546. }), loadScript("//apis.google.com/js/api:client.js", null, function() {
  3547. gapi.load("auth2", function() {
  3548. GoogleAuth = gapi.auth2.init({
  3549. client_id: atob("OTU5NDI1MTkyMTM4LXFqcTIzbDllMG9oOGxnZDJpY25ibHJiZmJsYXI0YTJmLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29t")
  3550. })
  3551. })
  3552. }), loadScript("//platform.twitter.com/widgets.js", "twitter-wjs"), loadScript("//apis.google.com/js/platform.js"), _anApp = Application(), _anApp.v();
  3553. var loopFunc = function t() {
  3554. requestAnimationFrame(t), getApp().Qa()
  3555. };
  3556. loopFunc();
  3557. var __resize = function() {
  3558. var t = j_body.width(),
  3559. e = j_body.height(),
  3560. i = j_stretchBox.outerWidth(),
  3561. o = j_stretchBox.outerHeight(),
  3562. n = j_markupHeader.outerHeight(),
  3563. r = j_markupFooter.outerHeight(),
  3564. s = Math.min(1, Math.min((e - r - n) / o, t / i)),
  3565. a = "translate(-50%, -50%) scale(" + s + ")";
  3566. j_stretchBox.css({
  3567. "-webkit-transform": a,
  3568. "-moz-transform": a,
  3569. "-ms-transform": a,
  3570. "-o-transform": a,
  3571. transform: a
  3572. }), getApp().Sa(), window.scrollTo(0, 1)
  3573. },
  3574. j_body = $("body"),
  3575. j_stretchBox = $("#stretch-box"),
  3576. j_markupHeader = $("#markup-header"),
  3577. j_markupFooter = $("#markup-footer");
  3578. __resize(), $(window).resize(__resize)
  3579. }()
  3580. });
  3581.  
  3582. window.multiplier = .1625;
  3583. window.onwheel = (event) => {
  3584. if (event.deltaY < 0) {
  3585. window.multiplier *= 1.25;
  3586. } else {
  3587. window.multiplier *= 0.75;
  3588. }
  3589. window.changedNf();
  3590. }
  3591. };