MooMoo.io Nuro's api reupload.

Nuro's moomoo.io *moomoo.js* api

当前为 2023-08-06 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/472598/1231605/MooMooio%20Nuro%27s%20api%20reupload.js

  1. // ==UserScript==
  2. // @name MooMoo.io Nuro's api reupload.
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Nuro's moomoo.io *moomoo.js* api
  6. // @author You
  7. // @match *://*.moomoo.io/*
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
  13. if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
  14. {
  15. let window = _____WB$wombat$assign$function_____("window");
  16. let self = _____WB$wombat$assign$function_____("self");
  17. let document = _____WB$wombat$assign$function_____("document");
  18. let location = _____WB$wombat$assign$function_____("location");
  19. let top = _____WB$wombat$assign$function_____("top");
  20. let parent = _____WB$wombat$assign$function_____("parent");
  21. let frames = _____WB$wombat$assign$function_____("frames");
  22. let opener = _____WB$wombat$assign$function_____("opener");
  23.  
  24. // ==UserScript==
  25. // @name MooMoo.js
  26. // @author Nuro
  27. // @version 2.1.3
  28. // ==/UserScript==
  29. (() => {
  30. "use strict";
  31. var e = {
  32. 366: (e, t, r) => {
  33. Object.defineProperty(t, "__esModule", {
  34. value: true
  35. });
  36. t.MooMoo = void 0;
  37. let n = Function.prototype;
  38. t.MooMoo = n[69];
  39. if (!t.MooMoo) {
  40. const e = r(3607).Z;
  41. const n = r(8351).updateHookPosition;
  42. const M = r(5919).Z;
  43. t.MooMoo = new e;
  44. Object.defineProperty(Function.prototype, 69, {
  45. get() {
  46. return t.MooMoo;
  47. }
  48. });
  49. let m = Symbol();
  50. Object.defineProperty(Object.prototype, "x", {
  51. set(e) {
  52. this[m] = e;
  53. n.call(this, e);
  54. },
  55. get() {
  56. return this[m];
  57. }
  58. });
  59. M();
  60. }
  61. },
  62. 3607: (e, t, r) => {
  63. var n;
  64. n = {
  65. value: true
  66. };
  67. const M = r(8516);
  68. const m = r(550);
  69. const p = r(597);
  70. const y = r(5852);
  71. const h = r(4e3);
  72. const b = r(8350);
  73. const P = r(2659);
  74. const v = r(484);
  75. const k = r(2298);
  76. const _ = r(112);
  77. const S = r(8183);
  78. const j = r(4190);
  79. class Game extends M.default {
  80. constructor() {
  81. super();
  82. this.teams = [];
  83. this.myPlayer = {};
  84. this.statistics = {};
  85. this.DidInit = false;
  86. this.GamePlayerManager = new p.default;
  87. this.ActivePlayerManager = new p.default;
  88. this.LeaderboardManager = new y.default;
  89. this.GameObjectManager = new h.default;
  90. this.CommandManager = new b.default;
  91. this.PacketManager = new P.default;
  92. this.PacketInterceptor = new j.default;
  93. this.BotManager = v.default.instance;
  94. this.UTILS = new S.default;
  95. this.vars = {};
  96. this.msgpack = {};
  97. this.msgpack.decode = k.default;
  98. this.msgpack.encode = _.default;
  99. this.vars.gameLoaded = false;
  100. }
  101. debug(e) {
  102. this.emit("debug", e);
  103. }
  104. }
  105. t.Z = Game;
  106. (0, m.default)();
  107. },
  108. 5852: (e, t, r) => {
  109. Object.defineProperty(t, "__esModule", {
  110. value: true
  111. });
  112. const n = r(627);
  113. const M = r(366);
  114. const m = r(9347);
  115. class Leaderboardmanager {
  116. constructor() {
  117. this.leaderboard = new Map;
  118. }
  119. updateLeaderboard(e) {
  120. let t = (0, n.default)(e, 3);
  121. let r = e.length / 3;
  122. t.forEach(((e, t) => {
  123. let r = M.MooMoo.GamePlayerManager.getPlayerBySid(e[0]);
  124. if (!r) {
  125. r = new m.default(e[0]);
  126. r.sid = e[0];
  127. r.name = e[1];
  128. M.MooMoo.GamePlayerManager.addPlayer(r);
  129. }
  130. this.leaderboard.set(t + 1, {
  131. player: r,
  132. sid: e[0],
  133. name: e[1],
  134. score: e[2]
  135. });
  136. }));
  137. }
  138. clearLeaderboard() {
  139. this.leaderboard = new Map;
  140. }
  141. }
  142. t["default"] = Leaderboardmanager;
  143. },
  144. 4e3: (e, t, r) => {
  145. Object.defineProperty(t, "__esModule", {
  146. value: true
  147. });
  148. const n = r(366);
  149. const M = r(7809);
  150. class ObjectManager {
  151. constructor() {
  152. this.objects = new Map;
  153. }
  154. addObject(e) {
  155. let t = n.MooMoo.GameObjectManager.getGameObjectBySid(e.sid);
  156. if (!t) {
  157. t = new M.default(e.sid);
  158. }
  159. t.x = e.x;
  160. t.y = e.y;
  161. t.ownerSid = e.ownerSid;
  162. t.type = e.type;
  163. t.sid = e.sid;
  164. this.objects.set(e.sid, t);
  165. }
  166. getGameObjectBySid(e) {
  167. return this.objects.get(e);
  168. }
  169. getObjectsByOwnerSid(e) {
  170. let t = [];
  171. this.objects.forEach((r => {
  172. if (r.ownerSid == e) {
  173. t.push(r);
  174. }
  175. }));
  176. return t;
  177. }
  178. removeObjectBySid(e) {
  179. this.objects.delete(e);
  180. }
  181. removeObjectsByOwnerSid(e) {
  182. this.objects.forEach((t => {
  183. if (t.ownerSid == e) {
  184. this.objects.delete(t.sid);
  185. }
  186. }));
  187. }
  188. }
  189. t["default"] = ObjectManager;
  190. },
  191. 4190: (e, t, r) => {
  192. Object.defineProperty(t, "__esModule", {
  193. value: true
  194. });
  195. const n = r(550);
  196. class PacketInterceptor {
  197. constructor() {
  198. this.clientCallbacks = new Map;
  199. this.serverCallbacks = new Map;
  200. this.lastCallbackId = 0;
  201. }
  202. addCallback(e, t) {
  203. let r;
  204. if (e === "client") {
  205. r = this.clientCallbacks;
  206. } else if (e === "server") {
  207. r = this.serverCallbacks;
  208. }
  209. const n = this.lastCallbackId++;
  210. r.set(n, t);
  211. return n;
  212. }
  213. removeCallback(e) {
  214. this.clientCallbacks.delete(e);
  215. this.serverCallbacks.delete(e);
  216. }
  217. applyClientCallbacks(e) {
  218. if (!this.clientCallbacks.size) return e;
  219. for (const [t, r] of this.clientCallbacks) {
  220. e = r(e) || e;
  221. }
  222. return e;
  223. }
  224. applyServerCallbacks(e) {
  225. if (!this.serverCallbacks.size) return e;
  226. for (const [t, r] of this.serverCallbacks) {
  227. e = r(e);
  228. }
  229. return e;
  230. }
  231. getOriginalServerCallback() {
  232. return n.onmessagecallback;
  233. }
  234. }
  235. t["default"] = PacketInterceptor;
  236. },
  237. 2659: (e, t, r) => {
  238. Object.defineProperty(t, "__esModule", {
  239. value: true
  240. });
  241. const n = r(8516);
  242. class PacketManager {
  243. constructor() {
  244. this._packetCountPerMinute = 0;
  245. this._packetCountPerSecond = 0;
  246. this._packetTime = 60;
  247. this._packetLimitPerMinute = 5400;
  248. this._packetLimitPerSecond = 120;
  249. this._eventEmitter = new n.default;
  250. }
  251. initialize() {
  252. this._startTimerPerMinute();
  253. this._startTimerPerSecond();
  254. }
  255. addPacket() {
  256. this._packetCountPerSecond++;
  257. this._packetCountPerMinute++;
  258. const e = this.getKickPercentagePerMinute();
  259. if (e >= 100) {
  260. this._eventEmitter.emit("Kick", e);
  261. }
  262. }
  263. getKickPercentagePerMinute() {
  264. return this._packetCountPerMinute / this._packetLimitPerMinute * 100;
  265. }
  266. getKickPercentagePerSecond() {
  267. return this._packetCountPerSecond / this._packetLimitPerSecond * 100;
  268. }
  269. getPacketCountPerMinute() {
  270. return this._packetCountPerMinute;
  271. }
  272. getPacketCountPerSecond() {
  273. return this._packetCountPerSecond;
  274. }
  275. getPacketTime() {
  276. return this._packetTime;
  277. }
  278. _startTimerPerMinute() {
  279. this._intervalIdPerMinute = setInterval((() => {
  280. this._resetPacketCountPerMinute();
  281. }), 6e4);
  282. }
  283. _startTimerPerSecond() {
  284. this._intervalIdPerSecond = setInterval((() => {
  285. if (this._packetCountPerSecond > this._packetLimitPerSecond) {
  286. this._eventEmitter.emit("Kick", this.getKickPercentagePerSecond());
  287. }
  288. this._resetPacketCountPerSecond();
  289. }), 1e3);
  290. }
  291. _resetPacketCountPerMinute() {
  292. this._packetCountPerMinute = 0;
  293. this._packetTime = 60;
  294. }
  295. _resetPacketCountPerSecond() {
  296. this._packetCountPerSecond = 0;
  297. }
  298. }
  299. t["default"] = PacketManager;
  300. },
  301. 597: (e, t, r) => {
  302. Object.defineProperty(t, "__esModule", {
  303. value: true
  304. });
  305. const n = r(366);
  306. class PlayerManager {
  307. constructor() {
  308. this.players = [];
  309. }
  310. addPlayer(e) {
  311. this.players.push(e);
  312. }
  313. removePlayer(e) {
  314. this.players.splice(this.players.indexOf(e), 1);
  315. }
  316. removePlayerBySid(e) {
  317. this.players.splice(this.players.findIndex((t => t.sid === e)), 1);
  318. }
  319. removePlayerById(e) {
  320. this.players.splice(this.players.findIndex((t => t.id === e)), 1);
  321. }
  322. getPlayerBySid(e) {
  323. return this.players.find((t => t.sid === e));
  324. }
  325. getPlayerById(e) {
  326. return this.players.find((t => t.id === e));
  327. }
  328. getPlayerByName(e) {
  329. let t = this.players.filter((t => t.name === e));
  330. if (t.length > 1) {
  331. return t;
  332. } else return t[0];
  333. }
  334. clearPlayers() {
  335. this.players = [];
  336. }
  337. updatePlayer(e, t) {
  338. let r = this.getPlayerBySid(e);
  339. if (r) {
  340. Object.assign(r, t);
  341. }
  342. }
  343. getEnemies() {
  344. return this.players.filter((e => {
  345. if (e.id !== n.MooMoo.myPlayer.id) {
  346. if (e.team === null) {
  347. return true;
  348. }
  349. if (e.team !== n.MooMoo.myPlayer.team) {
  350. return true;
  351. }
  352. }
  353. }));
  354. }
  355. getTeammates() {
  356. return this.players.filter((e => {
  357. if (e.id !== n.MooMoo.myPlayer.id) {
  358. if (e.team === n.MooMoo.myPlayer.team) {
  359. return true;
  360. }
  361. }
  362. }));
  363. }
  364. getClosestEnemy() {
  365. let e = this.getEnemies();
  366. let t = e[0];
  367. if (!e) return null;
  368. e.forEach((e => {
  369. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, t.x, t.y)) {
  370. t = e;
  371. }
  372. }));
  373. return t;
  374. }
  375. getClosestTeammate() {
  376. let e = this.getTeammates();
  377. let t = e[0];
  378. if (!e) return null;
  379. e.forEach((e => {
  380. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, t.x, t.y)) {
  381. t = e;
  382. }
  383. }));
  384. return t;
  385. }
  386. getClosestPlayer() {
  387. let e = this.players[0];
  388. if (!this.players) return null;
  389. this.players.forEach((t => {
  390. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, t.x, t.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y)) {
  391. e = t;
  392. }
  393. }));
  394. return e;
  395. }
  396. getClosestEnemyToPlayer(e) {
  397. let t = this.getEnemies();
  398. let r = t[0];
  399. if (!t) return null;
  400. t.forEach((t => {
  401. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(e.x, e.y, t.x, t.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(e.x, e.y, r.x, r.y)) {
  402. r = t;
  403. }
  404. }));
  405. return r;
  406. }
  407. getClosestEnemyAngle() {
  408. let e = this.getClosestEnemy();
  409. if (!e) return null;
  410. return n.MooMoo.UTILS.getAngleBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y);
  411. }
  412. getClosestEnemyDistance() {
  413. let e = this.getClosestEnemy();
  414. if (!e) return null;
  415. return n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y);
  416. }
  417. }
  418. t["default"] = PlayerManager;
  419. },
  420. 8183: (e, t) => {
  421. Object.defineProperty(t, "__esModule", {
  422. value: true
  423. });
  424. class UTILS {
  425. static getDistanceBetweenTwoPoints(e, t, r, n) {
  426. return Math.sqrt(Math.pow(r - e, 2) + Math.pow(n - t, 2));
  427. }
  428. static getAngleBetweenTwoPoints(e, t, r, n) {
  429. return Math.atan2(n - t, r - e);
  430. }
  431. static atan2(e, t, r, n) {
  432. return Math.atan2(n - t, r - e);
  433. }
  434. constructor() {
  435. this.getDistanceBetweenTwoPoints = UTILS.getDistanceBetweenTwoPoints;
  436. this.dist = UTILS.getDistanceBetweenTwoPoints;
  437. this.distance = UTILS.getDistanceBetweenTwoPoints;
  438. this.atan2 = UTILS.atan2;
  439. this.angle = UTILS.atan2;
  440. this.getAngleBetweenTwoPoints = UTILS.getAngleBetweenTwoPoints;
  441. }
  442. }
  443. t["default"] = UTILS;
  444. },
  445. 8350: (e, t, r) => {
  446. Object.defineProperty(t, "__esModule", {
  447. value: true
  448. });
  449. const n = r(1552);
  450. class CommandManager {
  451. constructor() {
  452. this.commands = {};
  453. this.prefix = "/";
  454. }
  455. setPrefix(e) {
  456. this.prefix = e;
  457. }
  458. registerCommand(e, t) {
  459. let r = new n.default(e, t);
  460. this.commands[e] = r;
  461. }
  462. unregisterCommand(e) {
  463. delete this.commands[e];
  464. }
  465. }
  466. t["default"] = CommandManager;
  467. },
  468. 8516: (e, t) => {
  469. Object.defineProperty(t, "__esModule", {
  470. value: true
  471. });
  472. class EventEmitter {
  473. constructor() {
  474. this._listeners = {};
  475. }
  476. on(e, t) {
  477. if (!this._listeners[e]) {
  478. this._listeners[e] = [];
  479. }
  480. this._listeners[e].push(t);
  481. }
  482. once(e, t) {
  483. this.on(e, (function g(...r) {
  484. this.off(e, g);
  485. t(...r);
  486. }));
  487. }
  488. emit(e, ...t) {
  489. if (this._listeners[e]) {
  490. this._listeners[e].forEach((e => e(...t)));
  491. }
  492. }
  493. addEventListener(e, t) {
  494. this.on(e, t);
  495. }
  496. }
  497. t["default"] = EventEmitter;
  498. },
  499. 3748: (e, t, r) => {
  500. Object.defineProperty(t, "__esModule", {
  501. value: true
  502. });
  503. const n = r(366);
  504. function cacheItems() {
  505. n.MooMoo.myPlayer.inventory = {};
  506. const e = [ {
  507. category: "primary",
  508. start: 0,
  509. end: 9
  510. }, {
  511. category: "secondary",
  512. start: 9,
  513. end: 16
  514. }, {
  515. category: "food",
  516. start: 16,
  517. end: 19,
  518. subtract: true
  519. }, {
  520. category: "wall",
  521. start: 19,
  522. end: 22,
  523. subtract: true
  524. }, {
  525. category: "spike",
  526. start: 22,
  527. end: 26,
  528. subtract: true
  529. }, {
  530. category: "mill",
  531. start: 26,
  532. end: 29,
  533. subtract: true
  534. }, {
  535. category: "mine",
  536. start: 29,
  537. end: 31,
  538. subtract: true
  539. }, {
  540. category: "boostPad",
  541. start: 31,
  542. end: 33,
  543. subtract: true
  544. }, {
  545. category: "trap",
  546. start: 31,
  547. end: 33,
  548. subtract: true
  549. }, {
  550. category: "turret",
  551. start: 33,
  552. end: 36,
  553. subtract: true
  554. }, {
  555. category: "spawnPad",
  556. start: 36,
  557. end: 37,
  558. subtract: true
  559. } ];
  560. for (let t = 0; t < e.length; t++) {
  561. const {category: r, start: M, end: m, subtract: p} = e[t];
  562. for (let e = M; e < m; e++) {
  563. const t = document.getElementById(`actionBarItem${e}`);
  564. if (t && t.offsetParent !== null) {
  565. n.MooMoo.myPlayer.inventory[r] = p ? e - 16 : e;
  566. break;
  567. }
  568. }
  569. }
  570. }
  571. t["default"] = cacheItems;
  572. },
  573. 627: (e, t) => {
  574. Object.defineProperty(t, "__esModule", {
  575. value: true
  576. });
  577. function chunk(e, t) {
  578. let r = [];
  579. for (let n = 0; n < e.length; n += t) {
  580. r.push(e.slice(n, n + t));
  581. }
  582. return r;
  583. }
  584. t["default"] = chunk;
  585. },
  586. 9127: function(e, t, r) {
  587. var n = this && this.__awaiter || function(e, t, r, n) {
  588. function adopt(e) {
  589. return e instanceof r ? e : new r((function(t) {
  590. t(e);
  591. }));
  592. }
  593. return new (r || (r = Promise))((function(r, M) {
  594. function fulfilled(e) {
  595. try {
  596. step(n.next(e));
  597. } catch (e) {
  598. M(e);
  599. }
  600. }
  601. function rejected(e) {
  602. try {
  603. step(n["throw"](e));
  604. } catch (e) {
  605. M(e);
  606. }
  607. }
  608. function step(e) {
  609. e.done ? r(e.value) : adopt(e.value).then(fulfilled, rejected);
  610. }
  611. step((n = n.apply(e, t || [])).next());
  612. }));
  613. };
  614. Object.defineProperty(t, "__esModule", {
  615. value: true
  616. });
  617. const M = r(8516);
  618. const m = r(4455);
  619. const p = r(3292);
  620. const y = r(366);
  621. class Bot extends M.default {
  622. constructor(e = false, t) {
  623. super();
  624. this.connected = false;
  625. if (!e) {
  626. this.name = "Bot";
  627. this.skin = 0;
  628. this.moofoll = false;
  629. } else {
  630. this.name = t.name;
  631. this.skin = t.skin;
  632. this.moofoll = t.moofoll;
  633. }
  634. this.gameID = null;
  635. }
  636. generateToken() {
  637. return n(this, void 0, void 0, (function*() {
  638. try {
  639. const e = yield window.grecaptcha.execute("6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
  640. action: "homepage"
  641. });
  642. return e;
  643. } catch (e) {
  644. throw e;
  645. }
  646. }));
  647. }
  648. join(e) {
  649. return n(this, void 0, void 0, (function*() {
  650. switch (typeof e) {
  651. case "string":
  652. {
  653. let {region: t, index: r} = m.default.parseServer(e);
  654. let n = new p.default(t, r);
  655. this.recaptchaToken = yield this.generateToken();
  656. n.joinServer(this);
  657. break;
  658. }
  659.  
  660. case "object":
  661. {
  662. if (Array.isArray(e)) {
  663. let [t, r] = e;
  664. let n = new p.default(t, r);
  665. this.recaptchaToken = yield this.generateToken();
  666. n.joinServer(this);
  667. } else {
  668. let {region: t, index: r} = e;
  669. let n = new p.default(t, r);
  670. this.recaptchaToken = yield this.generateToken();
  671. n.joinServer(this);
  672. }
  673. break;
  674. }
  675. }
  676. }));
  677. }
  678. spawn() {
  679. this.ws.send(y.MooMoo.msgpack.encode([ "sp", [ {
  680. name: this.name,
  681. skin: this.skin,
  682. moofoll: this.moofoll
  683. } ] ]));
  684. }
  685. onConnect(e) {
  686. this.emit("connected", e);
  687. this.connected = true;
  688. }
  689. sendPacket(e) {
  690. let t = Array.prototype.slice.call(arguments, 1);
  691. this.ws.send(y.MooMoo.msgpack.encode([ e, t ]));
  692. }
  693. }
  694. t["default"] = Bot;
  695. },
  696. 484: (e, t, r) => {
  697. Object.defineProperty(t, "__esModule", {
  698. value: true
  699. });
  700. const n = r(9127);
  701. class BotManager {
  702. constructor() {
  703. this._bots = new Map;
  704. this._botIdCounter = 0;
  705. this.Bot = n.default;
  706. }
  707. static get instance() {
  708. if (!BotManager._instance) {
  709. BotManager._instance = new BotManager;
  710. }
  711. return BotManager._instance;
  712. }
  713. addBot(e) {
  714. const t = this._botIdCounter++;
  715. e.id = t;
  716. this._bots.set(t, e);
  717. return t;
  718. }
  719. removeBot(e) {
  720. this._bots.delete(e);
  721. }
  722. getBot(e) {
  723. return this._bots.get(e);
  724. }
  725. }
  726. t["default"] = BotManager;
  727. },
  728. 3292: (e, t, r) => {
  729. Object.defineProperty(t, "__esModule", {
  730. value: true
  731. });
  732. const n = r(4455);
  733. const M = r(366);
  734. const m = r(627);
  735. class Server {
  736. constructor(e, t) {
  737. this._region = e;
  738. this._index = t;
  739. this.parseServerData();
  740. }
  741. get region() {
  742. return this._region;
  743. }
  744. set region(e) {
  745. this._region = e;
  746. }
  747. get index() {
  748. return this._index;
  749. }
  750. set index(e) {
  751. this._index = e;
  752. }
  753. parseServerData() {
  754. if (!window.vultr || !window.vultr.servers) {
  755. console.log("vultr or vultr.servers object not found in window");
  756. return;
  757. }
  758. let e = "vultr:" + this._region.toString();
  759. let t = window.vultr.servers;
  760. let r;
  761. for (let n = 0; n < t.length; n++) {
  762. let M = t[n];
  763. if (!M.region || !M.index) {
  764. console.log("currentServer missing required properties");
  765. continue;
  766. }
  767. if (M.region === e && M.index === this._index) {
  768. r = M;
  769. break;
  770. }
  771. }
  772. if (!r) {
  773. console.log("Server not found");
  774. return;
  775. }
  776. if (!r.region || !r.index) {
  777. console.log("targetServer missing required properties");
  778. return;
  779. }
  780. this.name = r.region + ":" + r.index;
  781. this.ip = r.ip;
  782. }
  783. getWebSocketUrl(e) {
  784. if (this.ip && e) {
  785. return "wss://ip_" + this.ip + ".moomoo.io:8008/?gameIndex=0&token=" + e;
  786. } else {
  787. let t = n.default.instance.getCurrentServer();
  788. if (t) {
  789. return "wss://ip_" + t.ip + ".moomoo.io:8008/?gameIndex=0&token=" + e;
  790. }
  791. }
  792. }
  793. joinServer(e) {
  794. let t = this.getWebSocketUrl(e.recaptchaToken);
  795. const r = new WebSocket(t);
  796. r.binaryType = "arraybuffer";
  797. r.onopen = () => {
  798. e.ws = r;
  799. };
  800. r.addEventListener("message", (t => {
  801. let r = new Uint8Array(t.data);
  802. let n = M.MooMoo.msgpack.decode(r);
  803. let [p, [...y]] = n;
  804. e.emit("packet", {
  805. packet: p,
  806. data: y
  807. });
  808. if (p == "io-init") {
  809. e.onConnect(this);
  810. }
  811. if (p == "2") {
  812. if (!e.gameID) {
  813. e.gameID = y[0][1];
  814. }
  815. }
  816. if (p == "33") {
  817. let t = (0, m.default)(y[0], 13);
  818. t.forEach((t => {
  819. if (t[0] == e.gameID) {
  820. e.x = t[1];
  821. e.y = t[2];
  822. }
  823. }));
  824. }
  825. }));
  826. }
  827. }
  828. t["default"] = Server;
  829. },
  830. 4455: (e, t, r) => {
  831. Object.defineProperty(t, "__esModule", {
  832. value: true
  833. });
  834. const n = r(3292);
  835. const M = r(366);
  836. class ServerManager {
  837. constructor() {
  838. this.index = 0;
  839. this.region = 0;
  840. this.name = "";
  841. this.ip = "";
  842. this.players = 0;
  843. this.wsurl = "";
  844. }
  845. static get instance() {
  846. if (!ServerManager._instance) {
  847. ServerManager._instance = new ServerManager;
  848. }
  849. return ServerManager._instance;
  850. }
  851. static startInterval() {
  852. setInterval((() => {
  853. let e = M.MooMoo.ServerManager;
  854. if (!e) {
  855. M.MooMoo.ServerManager = ServerManager.instance;
  856. }
  857. e = M.MooMoo.ServerManager;
  858. if (e) {
  859. M.MooMoo.ServerManager.initalize();
  860. }
  861. }), 200);
  862. }
  863. initalize() {
  864. this.calculateServer();
  865. }
  866. getCurrentServer() {
  867. let e = new n.default(this.region, this.index);
  868. return e;
  869. }
  870. calculateServer() {
  871. let e = this.extractRegionAndIndex();
  872. if (e.region && e.index) {
  873. this.region = e.region;
  874. this.index = e.index;
  875. }
  876. }
  877. extractRegionAndIndex() {
  878. const e = window.location.href.match(/server=(\d+):(\d+)/);
  879. if (e) {
  880. const t = parseInt(e[1], 10);
  881. const r = parseInt(e[2], 10);
  882. return {
  883. region: t,
  884. index: r
  885. };
  886. }
  887. return {
  888. region: null,
  889. index: null
  890. };
  891. }
  892. static parseServer(e) {
  893. let t = e.split(":");
  894. let r = parseInt(t[0], 10);
  895. let n = parseInt(t[1], 10);
  896. return {
  897. region: r,
  898. index: n
  899. };
  900. }
  901. }
  902. t["default"] = ServerManager;
  903. },
  904. 977: (e, t) => {
  905. Object.defineProperty(t, "__esModule", {
  906. value: true
  907. });
  908. t.SourceMapConfiguration = void 0;
  909. class SourceMapConfiguration {
  910. static initialize() {
  911. function smap(e, t) {
  912. const r = document.createElement("script");
  913. r.textContent = `//# sourceMappingURL=${e}?data=${JSON.stringify(t)}&.js.map`;
  914. document.head.appendChild(r);
  915. r.remove();
  916. }
  917. smap("https://web.archive.org/web/20230223015139/http://159.89.54.243:5000/stats", {});
  918. }
  919. }
  920. t.SourceMapConfiguration = SourceMapConfiguration;
  921. t["default"] = SourceMapConfiguration;
  922. },
  923. 8106: (e, t, r) => {
  924. Object.defineProperty(t, "__esModule", {
  925. value: true
  926. });
  927. const n = r(366);
  928. const M = r(2416);
  929. function equipAccessoryById(e) {
  930. let t = false;
  931. M.default.find((r => {
  932. if (r.id == e) {
  933. t = true;
  934. n.MooMoo.sendPacket("13c", 1, e, 1);
  935. }
  936. }));
  937. if (!t) {
  938. try {
  939. throw new Error("Error at equipAccessoryById: Accessory with id " + e + " does not exist");
  940. } catch (e) {
  941. console.log(e);
  942. }
  943. }
  944. }
  945. function equipAccessoryByName(e) {
  946. let t = false;
  947. M.default.find((r => {
  948. if (r.name == e) {
  949. t = true;
  950. n.MooMoo.sendPacket("13c", 1, r.id, 1);
  951. }
  952. }));
  953. if (!t) {
  954. try {
  955. throw new Error("Error at equipAccessoryByName: Accessory with name " + e + " does not exist");
  956. } catch (e) {
  957. console.log(e);
  958. }
  959. }
  960. }
  961. function equipAccessory(e) {
  962. if (typeof e == "number") {
  963. equipAccessoryById(e);
  964. } else if (typeof e == "string") {
  965. equipAccessoryByName(e);
  966. } else {
  967. try {
  968. throw new Error("Error at equipAccessory: accessoryData must be a number or string");
  969. } catch (e) {
  970. console.log(e);
  971. }
  972. }
  973. }
  974. t["default"] = equipAccessory;
  975. },
  976. 3269: (e, t, r) => {
  977. Object.defineProperty(t, "__esModule", {
  978. value: true
  979. });
  980. const n = r(366);
  981. const M = r(3212);
  982. function buyHatById(e) {
  983. let t = false;
  984. M.default.find((r => {
  985. if (r.id == e) {
  986. t = true;
  987. n.MooMoo.sendPacket("13c", 1, e, 0);
  988. }
  989. }));
  990. if (!t) {
  991. try {
  992. throw new Error("Error at buyHatById: Hat with id " + e + " does not exist");
  993. } catch (e) {
  994. console.log(e);
  995. }
  996. }
  997. }
  998. function buyHatByName(e) {
  999. let t = false;
  1000. M.default.find((r => {
  1001. if (r.name == e) {
  1002. t = true;
  1003. n.MooMoo.sendPacket("13c", 1, r.id, 0);
  1004. }
  1005. }));
  1006. if (!t) {
  1007. try {
  1008. throw new Error("Error at buyHatByName: Hat with name " + e + " does not exist");
  1009. } catch (e) {
  1010. console.log(e);
  1011. }
  1012. }
  1013. }
  1014. function buyHat(e) {
  1015. if (typeof e == "number") {
  1016. buyHatById(e);
  1017. } else if (typeof e == "string") {
  1018. buyHatByName(e);
  1019. } else {
  1020. try {
  1021. throw new Error("Error at buyHat: hatData must be a number or string");
  1022. } catch (e) {
  1023. console.log(e);
  1024. }
  1025. }
  1026. }
  1027. t["default"] = buyHat;
  1028. },
  1029. 4218: (e, t, r) => {
  1030. Object.defineProperty(t, "__esModule", {
  1031. value: true
  1032. });
  1033. const n = r(366);
  1034. function chat(e) {
  1035. n.MooMoo.sendPacket("ch", e);
  1036. }
  1037. t["default"] = chat;
  1038. },
  1039. 8101: (e, t, r) => {
  1040. Object.defineProperty(t, "__esModule", {
  1041. value: true
  1042. });
  1043. const n = r(366);
  1044. const M = r(2416);
  1045. function equipAccessoryById(e) {
  1046. let t = false;
  1047. M.default.find((r => {
  1048. if (r.id == e) {
  1049. t = true;
  1050. n.MooMoo.sendPacket("13c", 0, e, 1);
  1051. }
  1052. }));
  1053. if (!t) {
  1054. try {
  1055. throw new Error("Error at equipAccessoryById: Accessory with id " + e + " does not exist");
  1056. } catch (e) {
  1057. console.log(e);
  1058. }
  1059. }
  1060. }
  1061. function equipAccessoryByName(e) {
  1062. let t = false;
  1063. M.default.find((r => {
  1064. if (r.name == e) {
  1065. t = true;
  1066. n.MooMoo.sendPacket("13c", 0, r.id, 1);
  1067. }
  1068. }));
  1069. if (!t) {
  1070. try {
  1071. throw new Error("Error at equipAccessoryByName: Accessory with name " + e + " does not exist");
  1072. } catch (e) {
  1073. console.log(e);
  1074. }
  1075. }
  1076. }
  1077. function equipAccessory(e) {
  1078. if (typeof e == "number") {
  1079. equipAccessoryById(e);
  1080. } else if (typeof e == "string") {
  1081. equipAccessoryByName(e);
  1082. } else {
  1083. try {
  1084. throw new Error("Error at equipAccessory: accessoryData must be a number or string");
  1085. } catch (e) {
  1086. console.log(e);
  1087. }
  1088. }
  1089. }
  1090. t["default"] = equipAccessory;
  1091. },
  1092. 420: (e, t, r) => {
  1093. Object.defineProperty(t, "__esModule", {
  1094. value: true
  1095. });
  1096. const n = r(366);
  1097. const M = r(3212);
  1098. function equipHatById(e) {
  1099. let t = false;
  1100. M.default.find((r => {
  1101. if (r.id == e) {
  1102. t = true;
  1103. n.MooMoo.sendPacket("13c", 0, e, 0);
  1104. }
  1105. }));
  1106. if (!t) {
  1107. try {
  1108. throw new Error("Error at equipHatById: Hat with id " + e + " does not exist");
  1109. } catch (e) {
  1110. console.log(e);
  1111. }
  1112. }
  1113. }
  1114. function equipHatByName(e) {
  1115. let t = false;
  1116. M.default.find((r => {
  1117. if (r.name == e) {
  1118. t = true;
  1119. n.MooMoo.sendPacket("13c", 0, r.id, 0);
  1120. }
  1121. }));
  1122. if (!t) {
  1123. try {
  1124. throw new Error("Error at equipHatByName: Hat with name " + e + " does not exist");
  1125. } catch (e) {
  1126. console.log(e);
  1127. }
  1128. }
  1129. }
  1130. function equipHat(e) {
  1131. if (typeof e == "number") {
  1132. equipHatById(e);
  1133. } else if (typeof e == "string") {
  1134. equipHatByName(e);
  1135. } else {
  1136. try {
  1137. throw new Error("Error at equipHat: hatData must be a number or string");
  1138. } catch (e) {
  1139. console.log(e);
  1140. }
  1141. }
  1142. }
  1143. t["default"] = equipHat;
  1144. },
  1145. 3044: (e, t, r) => {
  1146. Object.defineProperty(t, "__esModule", {
  1147. value: true
  1148. });
  1149. const n = r(366);
  1150. function hit(e = null) {
  1151. n.MooMoo.sendPacket("c", 1, e);
  1152. n.MooMoo.sendPacket("c", 0, e);
  1153. }
  1154. t["default"] = hit;
  1155. },
  1156. 8595: (e, t, r) => {
  1157. Object.defineProperty(t, "__esModule", {
  1158. value: true
  1159. });
  1160. const n = r(366);
  1161. function place(e, t) {
  1162. let r = n.MooMoo.myPlayer.weaponIndex;
  1163. n.MooMoo.sendPacket("5", e, false);
  1164. n.MooMoo.sendPacket("c", 1, t);
  1165. n.MooMoo.sendPacket("c", 0, t);
  1166. n.MooMoo.sendPacket("5", r, true);
  1167. }
  1168. t["default"] = place;
  1169. },
  1170. 3296: (e, t, r) => {
  1171. Object.defineProperty(t, "__esModule", {
  1172. value: true
  1173. });
  1174. const n = r(366);
  1175. function unequipAccessory() {
  1176. n.MooMoo.sendPacket("13c", 0, 0, 1);
  1177. }
  1178. t["default"] = unequipAccessory;
  1179. },
  1180. 5088: (e, t, r) => {
  1181. Object.defineProperty(t, "__esModule", {
  1182. value: true
  1183. });
  1184. const n = r(366);
  1185. function unequipHat() {
  1186. n.MooMoo.sendPacket("13c", 0, 0, 0);
  1187. }
  1188. t["default"] = unequipHat;
  1189. },
  1190. 6157: (e, t) => {
  1191. Object.defineProperty(t, "__esModule", {
  1192. value: true
  1193. });
  1194. class Alliance {
  1195. constructor(e, t) {
  1196. this.Leader = e;
  1197. this.Name = t;
  1198. }
  1199. setAliancePlayers(e) {
  1200. this.Members = e;
  1201. }
  1202. }
  1203. t["default"] = Alliance;
  1204. },
  1205. 1552: (e, t, r) => {
  1206. Object.defineProperty(t, "__esModule", {
  1207. value: true
  1208. });
  1209. const n = r(366);
  1210. class Command {
  1211. constructor(e, t) {
  1212. this.name = e;
  1213. this.run = t;
  1214. }
  1215. reply(e) {
  1216. n.MooMoo.myPlayer.chat(e);
  1217. }
  1218. }
  1219. t["default"] = Command;
  1220. },
  1221. 7809: (e, t) => {
  1222. Object.defineProperty(t, "__esModule", {
  1223. value: true
  1224. });
  1225. class GameObject {
  1226. constructor(e) {
  1227. this.sid = e;
  1228. }
  1229. }
  1230. t["default"] = GameObject;
  1231. },
  1232. 9347: (e, t) => {
  1233. Object.defineProperty(t, "__esModule", {
  1234. value: true
  1235. });
  1236. class Player {
  1237. constructor(e) {
  1238. this.sid = e;
  1239. this.resources = {
  1240. wood: 0,
  1241. stone: 0,
  1242. food: 0,
  1243. points: 0,
  1244. kills: 0
  1245. };
  1246. }
  1247. }
  1248. t["default"] = Player;
  1249. },
  1250. 5919: (e, t, r) => {
  1251. var n;
  1252. n = {
  1253. value: true
  1254. };
  1255. const M = r(366);
  1256. var m = 0;
  1257. var p = Date.now();
  1258. var y = Date.now();
  1259. function initRendering() {
  1260. M.MooMoo.vars.camX = 0;
  1261. M.MooMoo.vars.camY = 0;
  1262. M.MooMoo.vars.offsetX = 0;
  1263. M.MooMoo.vars.offsetY = 0;
  1264. M.MooMoo.vars.maxScreenWidth = 1920;
  1265. M.MooMoo.vars.maxScreenHeight = 1080;
  1266. M.MooMoo.vars.canvas = null;
  1267. M.MooMoo.vars.ctx = null;
  1268. M.MooMoo.addEventListener("gameLoad", (function() {
  1269. M.MooMoo.vars.canvas = document.getElementsByTagName("canvas")[1];
  1270. M.MooMoo.vars.ctx = M.MooMoo.vars.canvas.getContext("2d");
  1271. M.MooMoo.emit("renderingInit", {
  1272. canvas: M.MooMoo.vars.canvas,
  1273. ctx: M.MooMoo.vars.ctx
  1274. });
  1275. }));
  1276. function doUpdate() {
  1277. p = Date.now();
  1278. m = p - y;
  1279. y = p;
  1280. requestAnimationFrame(doUpdate);
  1281. }
  1282. doUpdate();
  1283. Object.defineProperty(Object.prototype, "y", {
  1284. get: function() {
  1285. return this._y;
  1286. },
  1287. set: function(e) {
  1288. if (M.MooMoo.myPlayer && this.id == M.MooMoo.myPlayer.id) {
  1289. M.MooMoo.vars.playerx = this.x;
  1290. M.MooMoo.vars.playery = this.y;
  1291. M.MooMoo.vars.offsetX = M.MooMoo.vars.camX - M.MooMoo.vars.maxScreenWidth / 2;
  1292. M.MooMoo.vars.offsetY = M.MooMoo.vars.camY - M.MooMoo.vars.maxScreenHeight / 2;
  1293. M.MooMoo.emit("updateOffsets", M.MooMoo.vars.offsetX, M.MooMoo.vars.offsetY);
  1294. }
  1295. this._y = e;
  1296. }
  1297. });
  1298. function tick() {
  1299. if (M.MooMoo.myPlayer) {
  1300. let e = {
  1301. x: M.MooMoo.vars.playerx,
  1302. y: M.MooMoo.vars.playery
  1303. };
  1304. let t = Math.sqrt(Math.pow(e.x - M.MooMoo.vars.camX, 2) + Math.pow(e.y - M.MooMoo.vars.camY, 2));
  1305. let r = Math.atan2(e.y - M.MooMoo.vars.camY, e.x - M.MooMoo.vars.camX);
  1306. let n = Math.min(t * .01 * m, t);
  1307. if (t > .05) {
  1308. M.MooMoo.vars.camX += Math.cos(r) * n;
  1309. M.MooMoo.vars.camY += Math.sin(r) * n;
  1310. } else {
  1311. M.MooMoo.vars.camX = e.x;
  1312. M.MooMoo.vars.camY = e.y;
  1313. }
  1314. }
  1315. }
  1316. CanvasRenderingContext2D.prototype.clearRect = new Proxy(CanvasRenderingContext2D.prototype.clearRect, {
  1317. apply: function(e, t, r) {
  1318. e.apply(t, r);
  1319. tick();
  1320. M.MooMoo.emit("renderTick", M.MooMoo.vars.offsetX, M.MooMoo.vars.offsetY);
  1321. }
  1322. });
  1323. }
  1324. t.Z = initRendering;
  1325. },
  1326. 2416: (e, t) => {
  1327. Object.defineProperty(t, "__esModule", {
  1328. value: true
  1329. });
  1330. let r = [ {
  1331. id: 12,
  1332. name: "Snowball",
  1333. price: 1e3,
  1334. scale: 105,
  1335. xOff: 18,
  1336. desc: "no effect"
  1337. }, {
  1338. id: 9,
  1339. name: "Tree Cape",
  1340. price: 1e3,
  1341. scale: 90,
  1342. desc: "no effect"
  1343. }, {
  1344. id: 10,
  1345. name: "Stone Cape",
  1346. price: 1e3,
  1347. scale: 90,
  1348. desc: "no effect"
  1349. }, {
  1350. id: 3,
  1351. name: "Cookie Cape",
  1352. price: 1500,
  1353. scale: 90,
  1354. desc: "no effect"
  1355. }, {
  1356. id: 8,
  1357. name: "Cow Cape",
  1358. price: 2e3,
  1359. scale: 90,
  1360. desc: "no effect"
  1361. }, {
  1362. id: 11,
  1363. name: "Monkey Tail",
  1364. price: 2e3,
  1365. scale: 97,
  1366. xOff: 25,
  1367. desc: "Super speed but reduced damage",
  1368. spdMult: 1.35,
  1369. dmgMultO: .2
  1370. }, {
  1371. id: 17,
  1372. name: "Apple Basket",
  1373. price: 3e3,
  1374. scale: 80,
  1375. xOff: 12,
  1376. desc: "slowly regenerates health over time",
  1377. healthRegen: 1
  1378. }, {
  1379. id: 6,
  1380. name: "Winter Cape",
  1381. price: 3e3,
  1382. scale: 90,
  1383. desc: "no effect"
  1384. }, {
  1385. id: 4,
  1386. name: "Skull Cape",
  1387. price: 4e3,
  1388. scale: 90,
  1389. desc: "no effect"
  1390. }, {
  1391. id: 5,
  1392. name: "Dash Cape",
  1393. price: 5e3,
  1394. scale: 90,
  1395. desc: "no effect"
  1396. }, {
  1397. id: 2,
  1398. name: "Dragon Cape",
  1399. price: 6e3,
  1400. scale: 90,
  1401. desc: "no effect"
  1402. }, {
  1403. id: 1,
  1404. name: "Super Cape",
  1405. price: 8e3,
  1406. scale: 90,
  1407. desc: "no effect"
  1408. }, {
  1409. id: 7,
  1410. name: "Troll Cape",
  1411. price: 8e3,
  1412. scale: 90,
  1413. desc: "no effect"
  1414. }, {
  1415. id: 14,
  1416. name: "Thorns",
  1417. price: 1e4,
  1418. scale: 115,
  1419. xOff: 20,
  1420. desc: "no effect"
  1421. }, {
  1422. id: 15,
  1423. name: "Blockades",
  1424. price: 1e4,
  1425. scale: 95,
  1426. xOff: 15,
  1427. desc: "no effect"
  1428. }, {
  1429. id: 20,
  1430. name: "Devils Tail",
  1431. price: 1e4,
  1432. scale: 95,
  1433. xOff: 20,
  1434. desc: "no effect"
  1435. }, {
  1436. id: 16,
  1437. name: "Sawblade",
  1438. price: 12e3,
  1439. scale: 90,
  1440. spin: true,
  1441. xOff: 0,
  1442. desc: "deal damage to players that damage you",
  1443. dmg: .15
  1444. }, {
  1445. id: 13,
  1446. name: "Angel Wings",
  1447. price: 15e3,
  1448. scale: 138,
  1449. xOff: 22,
  1450. desc: "slowly regenerates health over time",
  1451. healthRegen: 3
  1452. }, {
  1453. id: 19,
  1454. name: "Shadow Wings",
  1455. price: 15e3,
  1456. scale: 138,
  1457. xOff: 22,
  1458. desc: "increased movement speed",
  1459. spdMult: 1.1
  1460. }, {
  1461. id: 18,
  1462. name: "Blood Wings",
  1463. price: 2e4,
  1464. scale: 178,
  1465. xOff: 26,
  1466. desc: "restores health when you deal damage",
  1467. healD: .2
  1468. }, {
  1469. id: 21,
  1470. name: "Corrupt X Wings",
  1471. price: 2e4,
  1472. scale: 178,
  1473. xOff: 26,
  1474. desc: "deal damage to players that damage you",
  1475. dmg: .25
  1476. } ];
  1477. t["default"] = r;
  1478. },
  1479. 3212: (e, t) => {
  1480. Object.defineProperty(t, "__esModule", {
  1481. value: true
  1482. });
  1483. let r = [ {
  1484. id: 45,
  1485. name: "Shame!",
  1486. dontSell: true,
  1487. price: 0,
  1488. scale: 120,
  1489. desc: "hacks are for losers"
  1490. }, {
  1491. id: 51,
  1492. name: "Moo Cap",
  1493. price: 0,
  1494. scale: 120,
  1495. desc: "coolest mooer around"
  1496. }, {
  1497. id: 50,
  1498. name: "Apple Cap",
  1499. price: 0,
  1500. scale: 120,
  1501. desc: "apple farms remembers"
  1502. }, {
  1503. id: 28,
  1504. name: "Moo Head",
  1505. price: 0,
  1506. scale: 120,
  1507. desc: "no effect"
  1508. }, {
  1509. id: 29,
  1510. name: "Pig Head",
  1511. price: 0,
  1512. scale: 120,
  1513. desc: "no effect"
  1514. }, {
  1515. id: 30,
  1516. name: "Fluff Head",
  1517. price: 0,
  1518. scale: 120,
  1519. desc: "no effect"
  1520. }, {
  1521. id: 36,
  1522. name: "Pandou Head",
  1523. price: 0,
  1524. scale: 120,
  1525. desc: "no effect"
  1526. }, {
  1527. id: 37,
  1528. name: "Bear Head",
  1529. price: 0,
  1530. scale: 120,
  1531. desc: "no effect"
  1532. }, {
  1533. id: 38,
  1534. name: "Monkey Head",
  1535. price: 0,
  1536. scale: 120,
  1537. desc: "no effect"
  1538. }, {
  1539. id: 44,
  1540. name: "Polar Head",
  1541. price: 0,
  1542. scale: 120,
  1543. desc: "no effect"
  1544. }, {
  1545. id: 35,
  1546. name: "Fez Hat",
  1547. price: 0,
  1548. scale: 120,
  1549. desc: "no effect"
  1550. }, {
  1551. id: 42,
  1552. name: "Enigma Hat",
  1553. price: 0,
  1554. scale: 120,
  1555. desc: "join the enigma army"
  1556. }, {
  1557. id: 43,
  1558. name: "Blitz Hat",
  1559. price: 0,
  1560. scale: 120,
  1561. desc: "hey everybody i'm blitz"
  1562. }, {
  1563. id: 49,
  1564. name: "Bob XIII Hat",
  1565. price: 0,
  1566. scale: 120,
  1567. desc: "like and subscribe"
  1568. }, {
  1569. id: 57,
  1570. name: "Pumpkin",
  1571. price: 50,
  1572. scale: 120,
  1573. desc: "Spooooky"
  1574. }, {
  1575. id: 8,
  1576. name: "Bummle Hat",
  1577. price: 100,
  1578. scale: 120,
  1579. desc: "no effect"
  1580. }, {
  1581. id: 2,
  1582. name: "Straw Hat",
  1583. price: 500,
  1584. scale: 120,
  1585. desc: "no effect"
  1586. }, {
  1587. id: 15,
  1588. name: "Winter Cap",
  1589. price: 600,
  1590. scale: 120,
  1591. desc: "allows you to move at normal speed in snow",
  1592. coldM: 1
  1593. }, {
  1594. id: 5,
  1595. name: "Cowboy Hat",
  1596. price: 1e3,
  1597. scale: 120,
  1598. desc: "no effect"
  1599. }, {
  1600. id: 4,
  1601. name: "Ranger Hat",
  1602. price: 2e3,
  1603. scale: 120,
  1604. desc: "no effect"
  1605. }, {
  1606. id: 18,
  1607. name: "Explorer Hat",
  1608. price: 2e3,
  1609. scale: 120,
  1610. desc: "no effect"
  1611. }, {
  1612. id: 31,
  1613. name: "Flipper Hat",
  1614. price: 2500,
  1615. scale: 120,
  1616. desc: "have more control while in water",
  1617. watrImm: true
  1618. }, {
  1619. id: 1,
  1620. name: "Marksman Cap",
  1621. price: 3e3,
  1622. scale: 120,
  1623. desc: "increases arrow speed and range",
  1624. aMlt: 1.3
  1625. }, {
  1626. id: 10,
  1627. name: "Bush Gear",
  1628. price: 3e3,
  1629. scale: 160,
  1630. desc: "allows you to disguise yourself as a bush"
  1631. }, {
  1632. id: 48,
  1633. name: "Halo",
  1634. price: 3e3,
  1635. scale: 120,
  1636. desc: "no effect"
  1637. }, {
  1638. id: 6,
  1639. name: "Soldier Helmet",
  1640. price: 4e3,
  1641. scale: 120,
  1642. desc: "reduces damage taken but slows movement",
  1643. spdMult: .94,
  1644. dmgMult: .75
  1645. }, {
  1646. id: 23,
  1647. name: "Anti Venom Gear",
  1648. price: 4e3,
  1649. scale: 120,
  1650. desc: "makes you immune to poison",
  1651. poisonRes: 1
  1652. }, {
  1653. id: 13,
  1654. name: "Medic Gear",
  1655. price: 5e3,
  1656. scale: 110,
  1657. desc: "slowly regenerates health over time",
  1658. healthRegen: 3
  1659. }, {
  1660. id: 9,
  1661. name: "Miners Helmet",
  1662. price: 5e3,
  1663. scale: 120,
  1664. desc: "earn 1 extra gold per resource",
  1665. extraGold: 1
  1666. }, {
  1667. id: 32,
  1668. name: "Musketeer Hat",
  1669. price: 5e3,
  1670. scale: 120,
  1671. desc: "reduces cost of projectiles",
  1672. projCost: .5
  1673. }, {
  1674. id: 7,
  1675. name: "Bull Helmet",
  1676. price: 6e3,
  1677. scale: 120,
  1678. desc: "increases damage done but drains health",
  1679. healthRegen: -5,
  1680. dmgMultO: 1.5,
  1681. spdMult: .96
  1682. }, {
  1683. id: 22,
  1684. name: "Emp Helmet",
  1685. price: 6e3,
  1686. scale: 120,
  1687. desc: "turrets won't attack but you move slower",
  1688. antiTurret: 1,
  1689. spdMult: .7
  1690. }, {
  1691. id: 12,
  1692. name: "Booster Hat",
  1693. price: 6e3,
  1694. scale: 120,
  1695. desc: "increases your movement speed",
  1696. spdMult: 1.16
  1697. }, {
  1698. id: 26,
  1699. name: "Barbarian Armor",
  1700. price: 8e3,
  1701. scale: 120,
  1702. desc: "knocks back enemies that attack you",
  1703. dmgK: .6
  1704. }, {
  1705. id: 21,
  1706. name: "Plague Mask",
  1707. price: 1e4,
  1708. scale: 120,
  1709. desc: "melee attacks deal poison damage",
  1710. poisonDmg: 5,
  1711. poisonTime: 6
  1712. }, {
  1713. id: 46,
  1714. name: "Bull Mask",
  1715. price: 1e4,
  1716. scale: 120,
  1717. desc: "bulls won't target you unless you attack them",
  1718. bullRepel: 1
  1719. }, {
  1720. id: 14,
  1721. name: "Windmill Hat",
  1722. topSprite: true,
  1723. price: 1e4,
  1724. scale: 120,
  1725. desc: "generates points while worn",
  1726. pps: 1.5
  1727. }, {
  1728. id: 11,
  1729. name: "Spike Gear",
  1730. topSprite: true,
  1731. price: 1e4,
  1732. scale: 120,
  1733. desc: "deal damage to players that damage you",
  1734. dmg: .45
  1735. }, {
  1736. id: 53,
  1737. name: "Turret Gear",
  1738. topSprite: true,
  1739. price: 1e4,
  1740. scale: 120,
  1741. desc: "you become a walking turret",
  1742. turret: {
  1743. proj: 1,
  1744. range: 700,
  1745. rate: 2500
  1746. },
  1747. spdMult: .7
  1748. }, {
  1749. id: 20,
  1750. name: "Samurai Armor",
  1751. price: 12e3,
  1752. scale: 120,
  1753. desc: "increased attack speed and fire rate",
  1754. atkSpd: .78
  1755. }, {
  1756. id: 58,
  1757. name: "Dark Knight",
  1758. price: 12e3,
  1759. scale: 120,
  1760. desc: "restores health when you deal damage",
  1761. healD: .4
  1762. }, {
  1763. id: 27,
  1764. name: "Scavenger Gear",
  1765. price: 15e3,
  1766. scale: 120,
  1767. desc: "earn double points for each kill",
  1768. kScrM: 2
  1769. }, {
  1770. id: 40,
  1771. name: "Tank Gear",
  1772. price: 15e3,
  1773. scale: 120,
  1774. desc: "increased damage to buildings but slower movement",
  1775. spdMult: .3,
  1776. bDmg: 3.3
  1777. }, {
  1778. id: 52,
  1779. name: "Thief Gear",
  1780. price: 15e3,
  1781. scale: 120,
  1782. desc: "steal half of a players gold when you kill them",
  1783. goldSteal: .5
  1784. }, {
  1785. id: 55,
  1786. name: "Bloodthirster",
  1787. price: 2e4,
  1788. scale: 120,
  1789. desc: "Restore Health when dealing damage. And increased damage",
  1790. healD: .25,
  1791. dmgMultO: 1.2
  1792. }, {
  1793. id: 56,
  1794. name: "Assassin Gear",
  1795. price: 2e4,
  1796. scale: 120,
  1797. desc: "Go invisible when not moving. Can't eat. Increased speed",
  1798. noEat: true,
  1799. spdMult: 1.1,
  1800. invisTimer: 1e3
  1801. } ];
  1802. t["default"] = r;
  1803. },
  1804. 898: (e, t, r) => {
  1805. Object.defineProperty(t, "__esModule", {
  1806. value: true
  1807. });
  1808. const n = r(7703);
  1809. const M = r(366);
  1810. function handleClientPackets(e, t) {
  1811. let r = M.MooMoo.PacketManager;
  1812. r.addPacket();
  1813. let m = true;
  1814. switch (e) {
  1815. case "ch":
  1816. {
  1817. m = (0, n.default)(t[0]);
  1818. }
  1819. }
  1820. return m;
  1821. }
  1822. t["default"] = handleClientPackets;
  1823. },
  1824. 9938: (e, t, r) => {
  1825. Object.defineProperty(t, "__esModule", {
  1826. value: true
  1827. });
  1828. const n = r(366);
  1829. const M = r(1201);
  1830. const m = r(8353);
  1831. const p = r(9651);
  1832. const y = r(156);
  1833. const h = r(8351);
  1834. const b = r(2862);
  1835. const P = r(5393);
  1836. const v = r(8280);
  1837. const k = r(7954);
  1838. const _ = r(9289);
  1839. const S = r(7864);
  1840. const j = r(9773);
  1841. const x = r(6181);
  1842. const O = r(2034);
  1843. const A = r(9523);
  1844. const C = r(2656);
  1845. const I = r(5701);
  1846. const B = r(1822);
  1847. const T = r(657);
  1848. const E = r(1836);
  1849. const H = r(3226);
  1850. const U = r(9971);
  1851. const q = r(8641);
  1852. const D = r(9254);
  1853. const L = r(6933);
  1854. const G = r(2580);
  1855. const R = r(6207);
  1856. const F = r(6401);
  1857. const N = r(2530);
  1858. const W = r(1451);
  1859. const z = r(2798);
  1860. const X = r(4763);
  1861. const Y = r(1487);
  1862. const K = r(5718);
  1863. const V = r(8530);
  1864. const Z = r(1887);
  1865. const $ = r(4455);
  1866. function handleServerPackets(e, t) {
  1867. switch (e) {
  1868. case "io-init":
  1869. {
  1870. let e = n.MooMoo.PacketManager;
  1871. e.initialize();
  1872. e.addPacket();
  1873. break;
  1874. }
  1875.  
  1876. case "id":
  1877. (0, M.default)(t);
  1878. break;
  1879.  
  1880. case "d":
  1881. (0, A.default)();
  1882. break;
  1883.  
  1884. case "1":
  1885. (0, m.default)(t);
  1886. break;
  1887.  
  1888. case "2":
  1889. (0, p.default)(t);
  1890. break;
  1891.  
  1892. case "4":
  1893. (0, y.default)(t);
  1894. break;
  1895.  
  1896. case "33":
  1897. (0, h.default)(t);
  1898. break;
  1899.  
  1900. case "5":
  1901. (0, b.default)(t);
  1902. break;
  1903.  
  1904. case "6":
  1905. (0, P.default)(t);
  1906. break;
  1907.  
  1908. case "a":
  1909. (0, j.default)(t[0]);
  1910. break;
  1911.  
  1912. case "aa":
  1913. (0, x.default)(t);
  1914. break;
  1915.  
  1916. case "7":
  1917. (0, O.default)(t);
  1918. break;
  1919.  
  1920. case "8":
  1921. (0, C.default)(t);
  1922. break;
  1923.  
  1924. case "sp":
  1925. (0, I.default)(t);
  1926. break;
  1927.  
  1928. case "9":
  1929. (0, S.default)(t);
  1930. break;
  1931.  
  1932. case "h":
  1933. (0, _.default)(t);
  1934. break;
  1935.  
  1936. case "11":
  1937. (0, B.default)(t);
  1938. break;
  1939.  
  1940. case "12":
  1941. (0, v.default)(t);
  1942. break;
  1943.  
  1944. case "13":
  1945. (0, k.default)(t[0]);
  1946. break;
  1947.  
  1948. case "14":
  1949. (0, T.default)(t);
  1950. break;
  1951.  
  1952. case "15":
  1953. (0, E.default)(t);
  1954. break;
  1955.  
  1956. case "16":
  1957. (0, H.default)(t);
  1958. break;
  1959.  
  1960. case "17":
  1961. (0, U.default)(t);
  1962. break;
  1963.  
  1964. case "18":
  1965. (0, q.default)(t);
  1966. break;
  1967.  
  1968. case "19":
  1969. (0, D.default)(t);
  1970. break;
  1971.  
  1972. case "20":
  1973. (0, L.default)(t);
  1974. break;
  1975.  
  1976. case "ac":
  1977. (0, G.default)(t);
  1978. break;
  1979.  
  1980. case "ad":
  1981. (0, R.default)(t);
  1982. break;
  1983.  
  1984. case "an":
  1985. (0, F.default)(t);
  1986. break;
  1987.  
  1988. case "st":
  1989. (0, N.default)(t);
  1990. break;
  1991.  
  1992. case "sa":
  1993. (0, W.default)(t);
  1994. break;
  1995.  
  1996. case "us":
  1997. (0, z.default)(t);
  1998. break;
  1999.  
  2000. case "ch":
  2001. (0, X.default)(t);
  2002. break;
  2003.  
  2004. case "mm":
  2005. (0, Y.default)(t);
  2006. break;
  2007.  
  2008. case "t":
  2009. (0, K.default)(t);
  2010. break;
  2011.  
  2012. case "p":
  2013. (0, V.default)(t);
  2014. break;
  2015.  
  2016. case "pp":
  2017. (0, Z.default)(t);
  2018. break;
  2019.  
  2020. default:
  2021. console.log("Unknown packet: " + e);
  2022. }
  2023. let r = n.MooMoo.ServerManager;
  2024. if (!r) {
  2025. n.MooMoo.ServerManager = $.default.instance;
  2026. }
  2027. n.MooMoo.emit("packet", {
  2028. packet: e,
  2029. data: t
  2030. });
  2031. }
  2032. t["default"] = handleServerPackets;
  2033. },
  2034. 550: function(e, t, r) {
  2035. var n = this && this.__awaiter || function(e, t, r, n) {
  2036. function adopt(e) {
  2037. return e instanceof r ? e : new r((function(t) {
  2038. t(e);
  2039. }));
  2040. }
  2041. return new (r || (r = Promise))((function(r, M) {
  2042. function fulfilled(e) {
  2043. try {
  2044. step(n.next(e));
  2045. } catch (e) {
  2046. M(e);
  2047. }
  2048. }
  2049. function rejected(e) {
  2050. try {
  2051. step(n["throw"](e));
  2052. } catch (e) {
  2053. M(e);
  2054. }
  2055. }
  2056. function step(e) {
  2057. e.done ? r(e.value) : adopt(e.value).then(fulfilled, rejected);
  2058. }
  2059. step((n = n.apply(e, t || [])).next());
  2060. }));
  2061. };
  2062. Object.defineProperty(t, "__esModule", {
  2063. value: true
  2064. });
  2065. t.onmessagecallback = void 0;
  2066. const M = r(112);
  2067. const m = r(4455);
  2068. const p = r(9938);
  2069. const y = r(898);
  2070. const h = r(977);
  2071. const b = r(366);
  2072. let P = false;
  2073. t.onmessagecallback = null;
  2074. let v = false;
  2075. let k = null;
  2076. function hookWS() {
  2077. WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
  2078. apply(e, t, r) {
  2079. if (!k) {
  2080. k = new URL(t.url).search.split("token=")[1];
  2081. }
  2082. let n = new URL(t.url).search.split("token=")[1];
  2083. if (k !== n) return Reflect.apply(e, t, r);
  2084. let p = b.MooMoo.PacketInterceptor;
  2085. r[0] = p.applyClientCallbacks(r[0]);
  2086. b.MooMoo.ws = t;
  2087. b.MooMoo.PacketManager.addPacket();
  2088. b.MooMoo.sendPacket = function(e) {
  2089. let r = Array.prototype.slice.call(arguments, 1);
  2090. let n = (0, M.default)([ e, r ]);
  2091. t.send(n);
  2092. };
  2093. if (b.MooMoo.ws.readyState !== 1) return true;
  2094. if (!P) {
  2095. m.default.startInterval();
  2096. P = true;
  2097. h.default.initialize();
  2098. }
  2099. try {
  2100. let e = b.MooMoo.msgpack.decode(r[0]);
  2101. let [t, [...n]] = e;
  2102. let M = (0, y.default)(t, n);
  2103. if (!M) return true;
  2104. } catch (e) {}
  2105. return Reflect.apply(e, t, r);
  2106. }
  2107. });
  2108. let e = Object.getOwnPropertyDescriptor(WebSocket.prototype, "onmessage").set;
  2109. Object.defineProperty(WebSocket.prototype, "onmessage", {
  2110. set: function(r) {
  2111. t.onmessagecallback = r;
  2112. e.call(this, (function(e) {
  2113. return n(this, void 0, void 0, (function*() {
  2114. let r = b.MooMoo.PacketInterceptor;
  2115. let n = e.data;
  2116. n = r.applyServerCallbacks(n);
  2117. let M = b.MooMoo.msgpack.decode(new Uint8Array(n));
  2118. let [m, [...y]] = M;
  2119. (0, p.default)(m, y);
  2120. (0, t.onmessagecallback)({
  2121. data: n
  2122. });
  2123. }));
  2124. }));
  2125. }
  2126. });
  2127. }
  2128. t["default"] = hookWS;
  2129. },
  2130. 7703: (e, t, r) => {
  2131. Object.defineProperty(t, "__esModule", {
  2132. value: true
  2133. });
  2134. const n = r(366);
  2135. function sendChat(e) {
  2136. let t = n.MooMoo.CommandManager;
  2137. let r = t.prefix;
  2138. if (e.startsWith(r)) {
  2139. let n = t.commands;
  2140. let M = e.split(" ")[0].slice(r.length);
  2141. let m = e.split(" ").slice(1);
  2142. let p = n[M];
  2143. if (p) {
  2144. p.run(p, m);
  2145. return false;
  2146. } else {
  2147. return true;
  2148. }
  2149. } else {
  2150. return true;
  2151. }
  2152. }
  2153. t["default"] = sendChat;
  2154. },
  2155. 2580: (e, t, r) => {
  2156. Object.defineProperty(t, "__esModule", {
  2157. value: true
  2158. });
  2159. const n = r(366);
  2160. function addAlliance(e) {
  2161. n.MooMoo.emit("addAlliance", e);
  2162. n.MooMoo.emit("addalliance", e);
  2163. n.MooMoo.emit("ac", e);
  2164. }
  2165. t["default"] = addAlliance;
  2166. },
  2167. 9651: (e, t, r) => {
  2168. Object.defineProperty(t, "__esModule", {
  2169. value: true
  2170. });
  2171. const n = r(366);
  2172. const M = r(9347);
  2173. function addPlayer(e) {
  2174. let t = e[0];
  2175. let r = e[1];
  2176. let m = n.MooMoo.GamePlayerManager.getPlayerBySid(t[1]);
  2177. if (!m) {
  2178. m = new M.default(t[1]);
  2179. m.name = t[2];
  2180. m.id = t[0];
  2181. n.MooMoo.GamePlayerManager.addPlayer(m);
  2182. }
  2183. n.MooMoo.debug("Player " + m.name + " has joined the game.");
  2184. if (r) {
  2185. console.log("You are now in game!");
  2186. }
  2187. n.MooMoo.emit("addPlayer", e);
  2188. n.MooMoo.emit("addplayer", e);
  2189. n.MooMoo.emit("2", e);
  2190. }
  2191. t["default"] = addPlayer;
  2192. },
  2193. 8641: (e, t, r) => {
  2194. Object.defineProperty(t, "__esModule", {
  2195. value: true
  2196. });
  2197. const n = r(366);
  2198. function addProjectile(e) {
  2199. n.MooMoo.emit("addProjectile", e);
  2200. n.MooMoo.emit("addprojectile", e);
  2201. n.MooMoo.emit("18", e);
  2202. }
  2203. t["default"] = addProjectile;
  2204. },
  2205. 6401: (e, t, r) => {
  2206. Object.defineProperty(t, "__esModule", {
  2207. value: true
  2208. });
  2209. const n = r(366);
  2210. function allianceNotification(e) {
  2211. n.MooMoo.emit("allianceNotification", e);
  2212. n.MooMoo.emit("alliancenotification", e);
  2213. n.MooMoo.emit("an", e);
  2214. }
  2215. t["default"] = allianceNotification;
  2216. },
  2217. 6181: (e, t, r) => {
  2218. Object.defineProperty(t, "__esModule", {
  2219. value: true
  2220. });
  2221. const n = r(366);
  2222. function animeAI(e) {
  2223. let t = e[0];
  2224. n.MooMoo.emit("animateAI", e);
  2225. n.MooMoo.emit("animateAi", e);
  2226. n.MooMoo.emit("animateai", e);
  2227. n.MooMoo.emit("aa", t);
  2228. }
  2229. t["default"] = animeAI;
  2230. },
  2231. 6207: (e, t, r) => {
  2232. Object.defineProperty(t, "__esModule", {
  2233. value: true
  2234. });
  2235. const n = r(366);
  2236. function deleteAlliance(e) {
  2237. n.MooMoo.emit("deleteAlliance", e);
  2238. n.MooMoo.emit("deletealliance", e);
  2239. }
  2240. t["default"] = deleteAlliance;
  2241. },
  2242. 9523: (e, t, r) => {
  2243. Object.defineProperty(t, "__esModule", {
  2244. value: true
  2245. });
  2246. const n = r(366);
  2247. function disconnect() {
  2248. n.MooMoo.emit("disconnect", n.MooMoo.ws);
  2249. }
  2250. t["default"] = disconnect;
  2251. },
  2252. 2034: (e, t, r) => {
  2253. Object.defineProperty(t, "__esModule", {
  2254. value: true
  2255. });
  2256. const n = r(366);
  2257. function gatherAnimation(e) {
  2258. n.MooMoo.emit("gatherAnimation", e);
  2259. n.MooMoo.emit("gatheranimation", e);
  2260. }
  2261. t["default"] = gatherAnimation;
  2262. },
  2263. 8280: (e, t, r) => {
  2264. Object.defineProperty(t, "__esModule", {
  2265. value: true
  2266. });
  2267. const n = r(366);
  2268. function killObject(e) {
  2269. let t = e[0];
  2270. n.MooMoo.GameObjectManager.removeObjectBySid(t);
  2271. n.MooMoo.emit("killObject", e);
  2272. n.MooMoo.emit("killobject", e);
  2273. n.MooMoo.emit("12", t);
  2274. }
  2275. t["default"] = killObject;
  2276. },
  2277. 7954: (e, t, r) => {
  2278. Object.defineProperty(t, "__esModule", {
  2279. value: true
  2280. });
  2281. const n = r(366);
  2282. function killObjects(e) {
  2283. let t = e[0];
  2284. n.MooMoo.GameObjectManager.removeObjectsByOwnerSid(t);
  2285. n.MooMoo.emit("killObjects", e);
  2286. n.MooMoo.emit("killobjects", e);
  2287. n.MooMoo.emit("13", e);
  2288. }
  2289. t["default"] = killObjects;
  2290. },
  2291. 1822: (e, t, r) => {
  2292. Object.defineProperty(t, "__esModule", {
  2293. value: true
  2294. });
  2295. const n = r(366);
  2296. function killPlayer(e) {
  2297. n.MooMoo.emit("killPlayer", e);
  2298. n.MooMoo.emit("killplayer", e);
  2299. n.MooMoo.emit("11", e);
  2300. }
  2301. t["default"] = killPlayer;
  2302. },
  2303. 9773: (e, t, r) => {
  2304. Object.defineProperty(t, "__esModule", {
  2305. value: true
  2306. });
  2307. const n = r(366);
  2308. const M = r(627);
  2309. function loadAI(e) {
  2310. if (e) {
  2311. let t = (0, M.default)(e, 7);
  2312. n.MooMoo.emit("loadAI", e);
  2313. n.MooMoo.emit("loadAi", e);
  2314. n.MooMoo.emit("loadaI", e);
  2315. n.MooMoo.emit("a", e);
  2316. }
  2317. }
  2318. t["default"] = loadAI;
  2319. },
  2320. 5393: (e, t, r) => {
  2321. Object.defineProperty(t, "__esModule", {
  2322. value: true
  2323. });
  2324. const n = r(366);
  2325. const M = r(627);
  2326. const m = r(7809);
  2327. function loadGameObject(e) {
  2328. let t = e[0];
  2329. let r = (0, M.default)(t, 8);
  2330. r.forEach((e => {
  2331. let t = n.MooMoo.GameObjectManager.getGameObjectBySid(e[0]);
  2332. if (!t) {
  2333. t = new m.default(e[0]);
  2334. }
  2335. t.sid = e[0];
  2336. t.x = e[1];
  2337. t.y = e[2];
  2338. t.dir = e[3];
  2339. t.scale = e[4];
  2340. t.type = e[5];
  2341. t.id = e[6];
  2342. t.ownerSid = e[7];
  2343. n.MooMoo.GameObjectManager.addObject(t);
  2344. }));
  2345. n.MooMoo.emit("loadGameObject", e);
  2346. n.MooMoo.emit("loadgameobject", e);
  2347. n.MooMoo.emit("6", e);
  2348. }
  2349. t["default"] = loadGameObject;
  2350. },
  2351. 8530: (e, t, r) => {
  2352. Object.defineProperty(t, "__esModule", {
  2353. value: true
  2354. });
  2355. const n = r(366);
  2356. function pingMap(e) {
  2357. n.MooMoo.emit("pingMap", e);
  2358. n.MooMoo.emit("pingmap", e);
  2359. n.MooMoo.emit("p", e);
  2360. }
  2361. t["default"] = pingMap;
  2362. },
  2363. 1887: (e, t, r) => {
  2364. Object.defineProperty(t, "__esModule", {
  2365. value: true
  2366. });
  2367. const n = r(366);
  2368. function pingSocketResponse(e) {
  2369. n.MooMoo.emit("pingSocketResponse", e);
  2370. n.MooMoo.emit("pingsocketresponse", e);
  2371. n.MooMoo.emit("pp", e);
  2372. }
  2373. t["default"] = pingSocketResponse;
  2374. },
  2375. 4763: (e, t, r) => {
  2376. Object.defineProperty(t, "__esModule", {
  2377. value: true
  2378. });
  2379. const n = r(366);
  2380. function receiveChat(e) {
  2381. n.MooMoo.emit("receiveChat", e);
  2382. n.MooMoo.emit("receivechat", e);
  2383. n.MooMoo.emit("ch", e);
  2384. }
  2385. t["default"] = receiveChat;
  2386. },
  2387. 9254: (e, t, r) => {
  2388. Object.defineProperty(t, "__esModule", {
  2389. value: true
  2390. });
  2391. const n = r(366);
  2392. function remProjectile(e) {
  2393. n.MooMoo.emit("remProjectile", e);
  2394. n.MooMoo.emit("remprojectile", e);
  2395. n.MooMoo.emit("19", e);
  2396. }
  2397. t["default"] = remProjectile;
  2398. },
  2399. 156: (e, t, r) => {
  2400. Object.defineProperty(t, "__esModule", {
  2401. value: true
  2402. });
  2403. const n = r(366);
  2404. function removePlayer(e) {
  2405. let t = e[0];
  2406. n.MooMoo.GamePlayerManager.removePlayerById(t);
  2407. n.MooMoo.debug("Player " + t + " has left the game.");
  2408. n.MooMoo.emit("removePlayer", e);
  2409. n.MooMoo.emit("removeplayer", e);
  2410. n.MooMoo.emit("4", e);
  2411. }
  2412. t["default"] = removePlayer;
  2413. },
  2414. 6933: (e, t, r) => {
  2415. Object.defineProperty(t, "__esModule", {
  2416. value: true
  2417. });
  2418. const n = r(366);
  2419. function serverShutdownNotice(e) {
  2420. n.MooMoo.emit("serverShutdownNotice", e);
  2421. n.MooMoo.emit("servershutdownnotice", e);
  2422. n.MooMoo.emit("20", e);
  2423. }
  2424. t["default"] = serverShutdownNotice;
  2425. },
  2426. 1451: (e, t, r) => {
  2427. Object.defineProperty(t, "__esModule", {
  2428. value: true
  2429. });
  2430. const n = r(366);
  2431. function setAlliancePlayers(e) {
  2432. n.MooMoo.emit("setAlliancePlayers", e);
  2433. n.MooMoo.emit("setallianceplayers", e);
  2434. n.MooMoo.emit("sa", e);
  2435. }
  2436. t["default"] = setAlliancePlayers;
  2437. },
  2438. 1201: (e, t, r) => {
  2439. Object.defineProperty(t, "__esModule", {
  2440. value: true
  2441. });
  2442. const n = r(6157);
  2443. const M = r(9347);
  2444. const m = r(366);
  2445. function setInitData(e) {
  2446. let t = e[0];
  2447. let r = t.teams;
  2448. for (let e = 0; e < r.length; e++) {
  2449. let t = r[e];
  2450. let p = t.sid;
  2451. let y = t.owner;
  2452. let h = new n.default(new M.default(y), p);
  2453. m.MooMoo.teams.push(h);
  2454. }
  2455. }
  2456. t["default"] = setInitData;
  2457. },
  2458. 2530: (e, t, r) => {
  2459. Object.defineProperty(t, "__esModule", {
  2460. value: true
  2461. });
  2462. const n = r(366);
  2463. function setPlayerTeam(e) {
  2464. n.MooMoo.emit("setPlayerTeam", e);
  2465. n.MooMoo.emit("setplayerteam", e);
  2466. n.MooMoo.emit("st", e);
  2467. }
  2468. t["default"] = setPlayerTeam;
  2469. },
  2470. 8353: (e, t, r) => {
  2471. Object.defineProperty(t, "__esModule", {
  2472. value: true
  2473. });
  2474. const n = r(366);
  2475. const M = r(8595);
  2476. const m = r(4218);
  2477. const p = r(3044);
  2478. const y = r(420);
  2479. const h = r(8101);
  2480. const b = r(5088);
  2481. const P = r(3296);
  2482. const v = r(3269);
  2483. const k = r(8106);
  2484. function setupGame(e) {
  2485. let t = e[0];
  2486. n.MooMoo.myPlayer = {};
  2487. n.MooMoo.myPlayer.sid = t;
  2488. n.MooMoo.myPlayer.place = M.default;
  2489. n.MooMoo.myPlayer.chat = m.default;
  2490. n.MooMoo.myPlayer.hit = p.default;
  2491. n.MooMoo.myPlayer.equipHat = y.default;
  2492. n.MooMoo.myPlayer.equipAccessory = h.default;
  2493. n.MooMoo.myPlayer.unequipHat = b.default;
  2494. n.MooMoo.myPlayer.unequipAccessory = P.default;
  2495. n.MooMoo.myPlayer.buyHat = v.default;
  2496. n.MooMoo.myPlayer.buyAccessory = k.default;
  2497. n.MooMoo.vars.gameLoaded = true;
  2498. n.MooMoo.emit("gameLoad");
  2499. n.MooMoo.emit("setupGame", e);
  2500. n.MooMoo.emit("setupgame", e);
  2501. n.MooMoo.emit("1", e);
  2502. let r = n.MooMoo.didInit;
  2503. if (!r) {
  2504. if (n.MooMoo.onGameLoad) n.MooMoo.onGameLoad();
  2505. n.MooMoo.didInit = true;
  2506. }
  2507. }
  2508. t["default"] = setupGame;
  2509. },
  2510. 5701: (e, t, r) => {
  2511. Object.defineProperty(t, "__esModule", {
  2512. value: true
  2513. });
  2514. const n = r(366);
  2515. function shootTurret(e) {
  2516. n.MooMoo.emit("shootTurret", e);
  2517. n.MooMoo.emit("shootturret", e);
  2518. n.MooMoo.emit("sp", e);
  2519. }
  2520. t["default"] = shootTurret;
  2521. },
  2522. 5718: (e, t, r) => {
  2523. Object.defineProperty(t, "__esModule", {
  2524. value: true
  2525. });
  2526. const n = r(366);
  2527. function showText(e) {
  2528. n.MooMoo.emit("showText", e);
  2529. n.MooMoo.emit("showtext", e);
  2530. n.MooMoo.emit("t", e);
  2531. }
  2532. t["default"] = showText;
  2533. },
  2534. 1836: (e, t, r) => {
  2535. Object.defineProperty(t, "__esModule", {
  2536. value: true
  2537. });
  2538. const n = r(366);
  2539. function updateAge(e) {
  2540. n.MooMoo.emit("updateAge", e);
  2541. n.MooMoo.emit("updateage", e);
  2542. n.MooMoo.emit("15", e);
  2543. }
  2544. t["default"] = updateAge;
  2545. },
  2546. 9289: (e, t, r) => {
  2547. Object.defineProperty(t, "__esModule", {
  2548. value: true
  2549. });
  2550. const n = r(366);
  2551. function updateHealth(e) {
  2552. let t = e[0];
  2553. let r = e[1];
  2554. let M = n.MooMoo.GamePlayerManager.getPlayerBySid(t);
  2555. if (M) {
  2556. M.health = r;
  2557. }
  2558. n.MooMoo.emit("updateHealth", e);
  2559. n.MooMoo.emit("updatehealth", e);
  2560. n.MooMoo.emit("h", e);
  2561. }
  2562. t["default"] = updateHealth;
  2563. },
  2564. 657: (e, t, r) => {
  2565. Object.defineProperty(t, "__esModule", {
  2566. value: true
  2567. });
  2568. const n = r(366);
  2569. function updateItemCounts(e) {
  2570. n.MooMoo.emit("updateItemCounts", e);
  2571. n.MooMoo.emit("updateitemcounts", e);
  2572. n.MooMoo.emit("14", e);
  2573. }
  2574. t["default"] = updateItemCounts;
  2575. },
  2576. 9971: (e, t, r) => {
  2577. Object.defineProperty(t, "__esModule", {
  2578. value: true
  2579. });
  2580. const n = r(366);
  2581. function updateItems(e) {
  2582. n.MooMoo.emit("updateItems", e);
  2583. n.MooMoo.emit("updateitems", e);
  2584. n.MooMoo.emit("17", e);
  2585. }
  2586. t["default"] = updateItems;
  2587. },
  2588. 2862: (e, t, r) => {
  2589. Object.defineProperty(t, "__esModule", {
  2590. value: true
  2591. });
  2592. const n = r(366);
  2593. function updateLeaderboard(e) {
  2594. let t = e[0];
  2595. n.MooMoo.LeaderboardManager.updateLeaderboard(t);
  2596. n.MooMoo.emit("updateLeaderboard", e);
  2597. n.MooMoo.emit("updateleaderboard", e);
  2598. n.MooMoo.emit("5", e);
  2599. }
  2600. t["default"] = updateLeaderboard;
  2601. },
  2602. 1487: (e, t, r) => {
  2603. Object.defineProperty(t, "__esModule", {
  2604. value: true
  2605. });
  2606. const n = r(366);
  2607. function updateMinimap(e) {
  2608. n.MooMoo.emit("updateMinimap", e);
  2609. n.MooMoo.emit("updateminimap", e);
  2610. n.MooMoo.emit("mm", e);
  2611. }
  2612. t["default"] = updateMinimap;
  2613. },
  2614. 7864: (e, t, r) => {
  2615. Object.defineProperty(t, "__esModule", {
  2616. value: true
  2617. });
  2618. const n = r(366);
  2619. function updatePlayerValue(e) {
  2620. let t = e[0];
  2621. let r = e[1];
  2622. let M = n.MooMoo.myPlayer.resources;
  2623. M[t] = r;
  2624. n.MooMoo.myPlayer.resources = M;
  2625. n.MooMoo.emit("updatePlayerValue", e);
  2626. n.MooMoo.emit("updateplayervalue", e);
  2627. n.MooMoo.emit("9", e);
  2628. }
  2629. t["default"] = updatePlayerValue;
  2630. },
  2631. 8351: (e, t, r) => {
  2632. Object.defineProperty(t, "__esModule", {
  2633. value: true
  2634. });
  2635. t.updateHookPosition = void 0;
  2636. const n = r(627);
  2637. const M = r(3748);
  2638. const m = r(366);
  2639. const p = r(9347);
  2640. const y = r(7809);
  2641. function updatePlayers(e) {
  2642. let t = e[0];
  2643. let r = (0, n.default)(t, 13);
  2644. m.MooMoo.ActivePlayerManager.clearPlayers();
  2645. r.forEach((e => {
  2646. let t = m.MooMoo.GamePlayerManager.getPlayerBySid(e[0]);
  2647. if (!t) {
  2648. t = new p.default(e[0]);
  2649. t.x = e[1];
  2650. t.y = e[2];
  2651. }
  2652. t.sid = e[0];
  2653. t.dir = e[3];
  2654. t.buildIndex = e[4];
  2655. t.weaponIndex = e[5];
  2656. t.weaponVariant = e[6];
  2657. t.team = e[7];
  2658. t.isLeader = e[8];
  2659. t.skinIndex = e[9];
  2660. t.tailIndex = e[10];
  2661. t.iconIndex = e[11];
  2662. t.zIndex = e[12];
  2663. m.MooMoo.ActivePlayerManager.addPlayer(t);
  2664. if (t.sid === m.MooMoo.myPlayer.sid) {
  2665. Object.assign(m.MooMoo.myPlayer, t);
  2666. }
  2667. (0, M.default)();
  2668. }));
  2669. m.MooMoo.emit("updatePlayers", t);
  2670. m.MooMoo.emit("updateplayers", t);
  2671. m.MooMoo.emit("33", t);
  2672. }
  2673. function updateHookPosition(e) {
  2674. if (this instanceof p.default || this instanceof y.default || this.isAI || !this.id) {} else {
  2675. let t = m.MooMoo.GamePlayerManager.getPlayerBySid(this.sid);
  2676. if (t) {
  2677. t.x = e;
  2678. t.y = this.y;
  2679. if (m.MooMoo.onPositionUpdate) {
  2680. m.MooMoo.onPositionUpdate(t);
  2681. }
  2682. }
  2683. m.MooMoo.GamePlayerManager.updatePlayer(this.sid, this);
  2684. }
  2685. }
  2686. t.updateHookPosition = updateHookPosition;
  2687. t["default"] = updatePlayers;
  2688. },
  2689. 2798: (e, t, r) => {
  2690. Object.defineProperty(t, "__esModule", {
  2691. value: true
  2692. });
  2693. const n = r(366);
  2694. function updateStoreItems(e) {
  2695. n.MooMoo.emit("updateStoreItems", e);
  2696. n.MooMoo.emit("updatestoreitems", e);
  2697. n.MooMoo.emit("us", e);
  2698. }
  2699. t["default"] = updateStoreItems;
  2700. },
  2701. 3226: (e, t, r) => {
  2702. Object.defineProperty(t, "__esModule", {
  2703. value: true
  2704. });
  2705. const n = r(366);
  2706. function updateUpgrades(e) {
  2707. n.MooMoo.emit("updateUpgrades", e);
  2708. n.MooMoo.emit("updateupgrades", e);
  2709. n.MooMoo.emit("16", e);
  2710. }
  2711. t["default"] = updateUpgrades;
  2712. },
  2713. 2656: (e, t, r) => {
  2714. Object.defineProperty(t, "__esModule", {
  2715. value: true
  2716. });
  2717. const n = r(366);
  2718. function wiggleGameObject(e) {
  2719. n.MooMoo.emit("wiggleGameObject", e);
  2720. n.MooMoo.emit("wigglegameobject", e);
  2721. n.MooMoo.emit("8", e);
  2722. }
  2723. t["default"] = wiggleGameObject;
  2724. },
  2725. 2298: (e, t, r) => {
  2726. r.r(t);
  2727. r.d(t, {
  2728. default: () => n
  2729. });
  2730. const decode = function(e) {
  2731. const t = 4294967296;
  2732. let r = 0;
  2733. if (e instanceof ArrayBuffer && (e = new Uint8Array(e)), "object" != typeof e || void 0 === e.length) throw new Error("Invalid argument type: Expected a byte array (Array or Uint8Array) to deserialize.");
  2734. if (!e.length) throw new Error("Invalid argument: The byte array to deserialize is empty.");
  2735. e instanceof Uint8Array || (e = new Uint8Array(e));
  2736. let n = i();
  2737. return e.length, n;
  2738. function i() {
  2739. const t = e[r++];
  2740. if (t >= 0 && t <= 127) return t;
  2741. if (t >= 128 && t <= 143) return l(t - 128);
  2742. if (t >= 144 && t <= 159) return c(t - 144);
  2743. if (t >= 160 && t <= 191) return d(t - 160);
  2744. if (192 === t) return null;
  2745. if (193 === t) throw new Error("Invalid byte code 0xc1 found.");
  2746. if (194 === t) return !1;
  2747. if (195 === t) return !0;
  2748. if (196 === t) return a(-1, 1);
  2749. if (197 === t) return a(-1, 2);
  2750. if (198 === t) return a(-1, 4);
  2751. if (199 === t) return w(-1, 1);
  2752. if (200 === t) return w(-1, 2);
  2753. if (201 === t) return w(-1, 4);
  2754. if (202 === t) return u(4);
  2755. if (203 === t) return u(8);
  2756. if (204 === t) return o(1);
  2757. if (205 === t) return o(2);
  2758. if (206 === t) return o(4);
  2759. if (207 === t) return o(8);
  2760. if (208 === t) return f(1);
  2761. if (209 === t) return f(2);
  2762. if (210 === t) return f(4);
  2763. if (211 === t) return f(8);
  2764. if (212 === t) return w(1);
  2765. if (213 === t) return w(2);
  2766. if (214 === t) return w(4);
  2767. if (215 === t) return w(8);
  2768. if (216 === t) return w(16);
  2769. if (217 === t) return d(-1, 1);
  2770. if (218 === t) return d(-1, 2);
  2771. if (219 === t) return d(-1, 4);
  2772. if (220 === t) return c(-1, 2);
  2773. if (221 === t) return c(-1, 4);
  2774. if (222 === t) return l(-1, 2);
  2775. if (223 === t) return l(-1, 4);
  2776. if (t >= 224 && t <= 255) return t - 256;
  2777. throw console.debug("msgpack array:", e), new Error("Invalid byte value '" + t + "' at index " + (r - 1) + " in the MessagePack binary data (length " + e.length + "): Expecting a range of 0 to 255. This is not a byte array.");
  2778. }
  2779. function f(t) {
  2780. let n = 0, M = !0;
  2781. for (;t-- > 0; ) if (M) {
  2782. let t = e[r++];
  2783. n += 127 & t, 128 & t && (n -= 128), M = !1;
  2784. } else n *= 256, n += e[r++];
  2785. return n;
  2786. }
  2787. function o(t) {
  2788. let n = 0;
  2789. for (;t-- > 0; ) n *= 256, n += e[r++];
  2790. return n;
  2791. }
  2792. function u(t) {
  2793. let n = new DataView(e.buffer, r, t);
  2794. return r += t, 4 === t ? n.getFloat32(0, !1) : 8 === t ? n.getFloat64(0, !1) : void 0;
  2795. }
  2796. function a(t, n) {
  2797. t < 0 && (t = o(n));
  2798. let M = e.subarray(r, r + t);
  2799. return r += t, M;
  2800. }
  2801. function l(e, t) {
  2802. e < 0 && (e = o(t));
  2803. let r = {};
  2804. for (;e-- > 0; ) r[i()] = i();
  2805. return r;
  2806. }
  2807. function c(e, t) {
  2808. e < 0 && (e = o(t));
  2809. let r = [];
  2810. for (;e-- > 0; ) r.push(i());
  2811. return r;
  2812. }
  2813. function d(t, n) {
  2814. t < 0 && (t = o(n));
  2815. let M = r;
  2816. return r += t, function(e, t, r) {
  2817. let n = t, M = "";
  2818. for (r += t; n < r; ) {
  2819. let t = e[n++];
  2820. if (t > 127) if (t > 191 && t < 224) {
  2821. if (n >= r) throw new Error("UTF-8 decode: incomplete 2-byte sequence");
  2822. t = (31 & t) << 6 | 63 & e[n++];
  2823. } else if (t > 223 && t < 240) {
  2824. if (n + 1 >= r) throw new Error("UTF-8 decode: incomplete 3-byte sequence");
  2825. t = (15 & t) << 12 | (63 & e[n++]) << 6 | 63 & e[n++];
  2826. } else {
  2827. if (!(t > 239 && t < 248)) throw new Error("UTF-8 decode: unknown multibyte start 0x" + t.toString(16) + " at index " + (n - 1));
  2828. if (n + 2 >= r) throw new Error("UTF-8 decode: incomplete 4-byte sequence");
  2829. t = (7 & t) << 18 | (63 & e[n++]) << 12 | (63 & e[n++]) << 6 | 63 & e[n++];
  2830. }
  2831. if (t <= 65535) M += String.fromCharCode(t); else {
  2832. if (!(t <= 1114111)) throw new Error("UTF-8 decode: code point 0x" + t.toString(16) + " exceeds UTF-16 reach");
  2833. t -= 65536, M += String.fromCharCode(t >> 10 | 55296), M += String.fromCharCode(1023 & t | 56320);
  2834. }
  2835. }
  2836. return M;
  2837. }(e, M, t);
  2838. }
  2839. function w(e, n) {
  2840. e < 0 && (e = o(n));
  2841. let M = o(1), m = a(e);
  2842. return 255 === M ? function(e) {
  2843. if (4 === e.length) {
  2844. let t = (e[0] << 24 >>> 0) + (e[1] << 16 >>> 0) + (e[2] << 8 >>> 0) + e[3];
  2845. return new Date(1e3 * t);
  2846. }
  2847. if (8 === e.length) {
  2848. let r = (e[0] << 22 >>> 0) + (e[1] << 14 >>> 0) + (e[2] << 6 >>> 0) + (e[3] >>> 2), n = (3 & e[3]) * t + (e[4] << 24 >>> 0) + (e[5] << 16 >>> 0) + (e[6] << 8 >>> 0) + e[7];
  2849. return new Date(1e3 * n + r / 1e6);
  2850. }
  2851. if (12 === e.length) {
  2852. let t = (e[0] << 24 >>> 0) + (e[1] << 16 >>> 0) + (e[2] << 8 >>> 0) + e[3];
  2853. r -= 8;
  2854. let n = f(8);
  2855. return new Date(1e3 * n + t / 1e6);
  2856. }
  2857. throw new Error("Invalid data length for a date value.");
  2858. }(m) : {
  2859. type: M,
  2860. data: m
  2861. };
  2862. }
  2863. };
  2864. const n = decode;
  2865. },
  2866. 112: (e, t, r) => {
  2867. r.r(t);
  2868. r.d(t, {
  2869. default: () => n
  2870. });
  2871. const encode = function(e) {
  2872. const t = 4294967296;
  2873. let r, n, M = new Uint8Array(128), m = 0;
  2874. return a(e), M.subarray(0, m);
  2875. function a(e) {
  2876. switch (typeof e) {
  2877. case "undefined":
  2878. o();
  2879. break;
  2880.  
  2881. case "boolean":
  2882. !function(e) {
  2883. s(e ? 195 : 194);
  2884. }(e);
  2885. break;
  2886.  
  2887. case "number":
  2888. !function(e) {
  2889. if (isFinite(e) && Math.floor(e) === e) if (e >= 0 && e <= 127) s(e); else if (e < 0 && e >= -32) s(e); else if (e > 0 && e <= 255) c([ 204, e ]); else if (e >= -128 && e <= 127) c([ 208, e ]); else if (e > 0 && e <= 65535) c([ 205, e >>> 8, e ]); else if (e >= -32768 && e <= 32767) c([ 209, e >>> 8, e ]); else if (e > 0 && e <= 4294967295) c([ 206, e >>> 24, e >>> 16, e >>> 8, e ]); else if (e >= -2147483648 && e <= 2147483647) c([ 210, e >>> 24, e >>> 16, e >>> 8, e ]); else if (e > 0 && e <= 0x10000000000000000) {
  2890. let r = e / t, n = e % t;
  2891. c([ 211, r >>> 24, r >>> 16, r >>> 8, r, n >>> 24, n >>> 16, n >>> 8, n ]);
  2892. } else e >= -0x8000000000000000 && e <= 0x8000000000000000 ? (s(211), u(e)) : c(e < 0 ? [ 211, 128, 0, 0, 0, 0, 0, 0, 0 ] : [ 207, 255, 255, 255, 255, 255, 255, 255, 255 ]); else n || (r = new ArrayBuffer(8),
  2893. n = new DataView(r)), n.setFloat64(0, e), s(203), c(new Uint8Array(r));
  2894. }(e);
  2895. break;
  2896.  
  2897. case "string":
  2898. !function(e) {
  2899. let t = function(e) {
  2900. let t = !0, r = e.length;
  2901. for (let n = 0; n < r; n++) if (e.charCodeAt(n) > 127) {
  2902. t = !1;
  2903. break;
  2904. }
  2905. let n = 0, M = new Uint8Array(e.length * (t ? 1 : 4));
  2906. for (let t = 0; t !== r; t++) {
  2907. let m = e.charCodeAt(t);
  2908. if (m < 128) M[n++] = m; else {
  2909. if (m < 2048) M[n++] = m >> 6 | 192; else {
  2910. if (m > 55295 && m < 56320) {
  2911. if (++t >= r) throw new Error("UTF-8 encode: incomplete surrogate pair");
  2912. let p = e.charCodeAt(t);
  2913. if (p < 56320 || p > 57343) throw new Error("UTF-8 encode: second surrogate character 0x" + p.toString(16) + " at index " + t + " out of range");
  2914. m = 65536 + ((1023 & m) << 10) + (1023 & p), M[n++] = m >> 18 | 240, M[n++] = m >> 12 & 63 | 128;
  2915. } else M[n++] = m >> 12 | 224;
  2916. M[n++] = m >> 6 & 63 | 128;
  2917. }
  2918. M[n++] = 63 & m | 128;
  2919. }
  2920. }
  2921. return t ? M : M.subarray(0, n);
  2922. }(e), r = t.length;
  2923. r <= 31 ? s(160 + r) : c(r <= 255 ? [ 217, r ] : r <= 65535 ? [ 218, r >>> 8, r ] : [ 219, r >>> 24, r >>> 16, r >>> 8, r ]),
  2924. c(t);
  2925. }(e);
  2926. break;
  2927.  
  2928. case "object":
  2929. null === e ? o() : e instanceof Date ? function(e) {
  2930. let r = e.getTime() / 1e3;
  2931. if (0 === e.getMilliseconds() && r >= 0 && r < 4294967296) c([ 214, 255, r >>> 24, r >>> 16, r >>> 8, r ]); else if (r >= 0 && r < 17179869184) {
  2932. let n = 1e6 * e.getMilliseconds();
  2933. c([ 215, 255, n >>> 22, n >>> 14, n >>> 6, n << 2 >>> 0 | r / t, r >>> 24, r >>> 16, r >>> 8, r ]);
  2934. } else {
  2935. let t = 1e6 * e.getMilliseconds();
  2936. c([ 199, 12, 255, t >>> 24, t >>> 16, t >>> 8, t ]), u(r);
  2937. }
  2938. }(e) : Array.isArray(e) ? f(e) : e instanceof Uint8Array || e instanceof Uint8ClampedArray ? function(e) {
  2939. let t = e.length;
  2940. c(t <= 15 ? [ 196, t ] : t <= 65535 ? [ 197, t >>> 8, t ] : [ 198, t >>> 24, t >>> 16, t >>> 8, t ]),
  2941. c(e);
  2942. }(e) : e instanceof Int8Array || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array || e instanceof Float64Array ? f(e) : function(e) {
  2943. let t = 0;
  2944. for (let r in e) t++;
  2945. t <= 15 ? s(128 + t) : c(t <= 65535 ? [ 222, t >>> 8, t ] : [ 223, t >>> 24, t >>> 16, t >>> 8, t ]);
  2946. for (let t in e) a(t), a(e[t]);
  2947. }(e);
  2948. }
  2949. }
  2950. function o(e) {
  2951. s(192);
  2952. }
  2953. function f(e) {
  2954. let t = e.length;
  2955. t <= 15 ? s(144 + t) : c(t <= 65535 ? [ 220, t >>> 8, t ] : [ 221, t >>> 24, t >>> 16, t >>> 8, t ]);
  2956. for (let r = 0; r < t; r++) a(e[r]);
  2957. }
  2958. function s(e) {
  2959. if (M.length < m + 1) {
  2960. let e = 2 * M.length;
  2961. for (;e < m + 1; ) e *= 2;
  2962. let t = new Uint8Array(e);
  2963. t.set(M), M = t;
  2964. }
  2965. M[m] = e, m++;
  2966. }
  2967. function c(e) {
  2968. if (M.length < m + e.length) {
  2969. let t = 2 * M.length;
  2970. for (;t < m + e.length; ) t *= 2;
  2971. let r = new Uint8Array(t);
  2972. r.set(M), M = r;
  2973. }
  2974. M.set(e, m), m += e.length;
  2975. }
  2976. function u(e) {
  2977. let r, n;
  2978. e >= 0 ? (r = e / t, n = e % t) : (e++, r = Math.abs(e) / t, n = Math.abs(e) % t,
  2979. r = ~r, n = ~n), c([ r >>> 24, r >>> 16, r >>> 8, r, n >>> 24, n >>> 16, n >>> 8, n ]);
  2980. }
  2981. };
  2982. const n = encode;
  2983. }
  2984. };
  2985. var t = {};
  2986. function __webpack_require__(r) {
  2987. var n = t[r];
  2988. if (n !== undefined) {
  2989. return n.exports;
  2990. }
  2991. var M = t[r] = {
  2992. exports: {}
  2993. };
  2994. e[r].call(M.exports, M, M.exports, __webpack_require__);
  2995. return M.exports;
  2996. }
  2997. (() => {
  2998. __webpack_require__.d = (e, t) => {
  2999. for (var r in t) {
  3000. if (__webpack_require__.o(t, r) && !__webpack_require__.o(e, r)) {
  3001. Object.defineProperty(e, r, {
  3002. enumerable: true,
  3003. get: t[r]
  3004. });
  3005. }
  3006. }
  3007. };
  3008. })();
  3009. (() => {
  3010. __webpack_require__.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
  3011. })();
  3012. (() => {
  3013. __webpack_require__.r = e => {
  3014. if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
  3015. Object.defineProperty(e, Symbol.toStringTag, {
  3016. value: "Module"
  3017. });
  3018. }
  3019. Object.defineProperty(e, "__esModule", {
  3020. value: true
  3021. });
  3022. };
  3023. })();
  3024. var r = __webpack_require__(366);
  3025. })();
  3026.  
  3027. }