Message 4
Message 4
document.getElementById("mainMenu").style.backgroundImage =
"url('https://images.pexels.com/photos/3308588/pexels-photo-3308588.jpeg?
cs=srgb&dl=pexels-mnm-zameer-3308588.jpg&fm=jpg')";
document.getElementById("mainMenu").style.width = "100%"
document.getElementById("mainMenu").style.height = "100vh"
document.getElementById("pingDisplay").style.color = "b32821"
document.getElementById("killCounter").style.color = "b32821"
document.getElementById("killCounter").style.backgroundColor = "rgba(0, 0, 0,
0.10)"
document.getElementById("scoreDisplay").style.backgroundColor = "rgba(0, 0, 0,
0.10)"
document.getElementById("foodDisplay").style.color = "b32821"
document.getElementById("foodDisplay").style.backgroundColor = "rgba(0, 0, 0,
0.10)"
document.getElementById("woodDisplay").style.color = "b32821"
document.getElementById("woodDisplay").style.backgroundColor = "rgba(0, 0, 0,
0.10)"
document.getElementById("stoneDisplay").style.color = "b32821"
document.getElementById("stoneDisplay").style.backgroundColor = "rgba(0, 0, 0,
0.10)"
document.getElementById("leaderboard").style.color = "b32821"
document.getElementById("leaderboard").style.backgroundColor = "rgba(0, 0, 0,
0.10)"
document.getElementById('chatBox').style.color = "b32821"
document.getElementById('chatBox').style.backgroundColor = "rgba(0, 0, 0, 0.10)"
document.getElementById("ageText").style.color = "b32821"
document.getElementById('chatButton').style.color = "b32821"
document.getElementById("chatButton").style.backgroundColor = "rgba(0, 0, 0, 0.10)"
document.getElementById("ageBar").style.backgroundColor = "rgba(0, 0, 0, 0.10)"
document.getElementById("ageBarBody").style.backgroundColor = "b32821"
document.getElementById("mapDisplay").style.backgroundColor = "rgba(0, 0, 0, 0.10)"
document.getElementById("allianceButton").style.color = "b32821"
document.getElementById("allianceButton").style.backgroundColor = "rgba(0, 0, 0,
0.10)"
document.getElementById("storeButton").style.color = "b32821"
document.getElementById("storeButton").style.backgroundColor = "rgba(0, 0, 0,
0.10)"
Math.florr = Math.floor;
function getEl(id) {
return document.getElementById(id);
}
let firstConfig = [];
let streamerMode = false;
const HTML = {
newLine: function(amount) {
let text = ``;
for (let i = 0; i < amount; i++) {
text += `<br>`;
}
return text;
},
line: function() {
return `<hr>`;
},
text: function(id, value, size, length) {
return `<input type = "text" id = ${id} size = ${size} value = "${value}"
maxlength = ${length} style = "border-radius: 5px;">`;
},
checkBox: function(id, name, checked, rl) {
return `${rl ? name + ` ` : ``}<input type = "checkbox" ${checked ?
`checked` : ``} id = ${id}>${rl ? `` : ` ` + name}`;
},
button: function(id, name, onclick, classs) {
return `<button class = ${classs} id = ${id} onclick = ${onclick}>$
{name}</button>`;
},
select: function(id, selects) {
let text = `<select id = ${id}>`;
selects.forEach((e,i)=>{
text += `<option value = ${e.value} ${e.selected ? ` selected` : ``}>$
{e.name}</option>`;
if (i == selects.length - 1) {
text += `</select>`;
}
}
);
return text;
},
modChange: function(id, selects) {
console.log("test");
},
mod: function(id, selects) {
let text = `<select id = ${id}>`;
selects.forEach((e,i)=>{
text += `<option value = ${e.value + "C"}>${e.name}</option>`;
if (i == selects.length - 1) {
text += `</select> `;
}
if (i == 0) {
firstConfig.push(e.value + "C");
}
}
);
selects.forEach((e,i)=>{
text += `<input type = "checkbox" ${e.checked ? `checked` : ``} id = $
{e.value} style = "${i == 0 ? "display: inline-block;" : "display: none;"}">`;
}
);
return text;
},
hotkey: function(id, value, size, length) {
return `<input style = "border-radius: 5px;" type = "text" id = ${id} size
= ${size} value = ${value} maxlength = ${length}><input type = "checkbox" checked
id = ${id + "k"}>`;
},
};
function getTabId(el) {
return el.id == "tHome" ? "homeTab" : el.id == "t1" ? "miscTab" : el.id == "t2"
? "configTab" : el.id == "t3" ? "combatTab" : "homeTab";
}
function changer() {
getEl("homeTab").style.display = "none";
getEl("miscTab").style.display = "none";
getEl("configTab").style.display = "none";
getEl("combatTab").style.display = "none";
getEl("tHome").style.border = "2px solid transparent";
getEl("tHome").style.color = "#000000";
getEl("tHome").style.backgroundColor = "#fff";
for (let i = 1; i <= 3; i++) {
getEl("t" + i).style.border = "2px solid transparent";
getEl("t" + i).style.color = "#000000";
getEl("t" + i).style.backgroundColor = "#fff";
}
}
function changeDisp(el) {
changer();
getEl(el.id).style.color = "#000";
getEl(el.id).style.backgroundColor = "#fff";
getEl(el.id).style.border = "2px solid #000";
getEl(getTabId(el)).style.display = "block";
}
let updateLogs = `
Toggle:${HTML.newLine(1)}
${HTML.checkBox("ranName", "randomName", false)}${HTML.newLine(1)}
`;
let Wut = "Select";
// menu html
let modMenus = document.createElement("div");
modMenus.id = "modMenus";
document.body.append(modMenus);
modMenus.style = `
display: block;
padding: 10px;
background-color: rgba(0, 0, 0, 0);
border-radius: 10px;
position: absolute;
left: 20px;
top: 20px;
width: 250px;
height: 2000;
transition: 1s;
border-style: solid;
border-width: 2px;
border-color: #ffffff;
`;
let canmove = true;
function updateInnerHTML() {
modMenus.innerHTML = `
<style>
.tabchange {
color: #fff;
background-color: #000;
border: 2px solid transparent;
border-radius: 4px;
text-align: center;
height: 25px;
}
.menuTabs {
padding-left: 5px;
padding-top: 5px;
padding-bottom: 5px;
}
.holder {
padding-left: 1em;
}
.nothing {
}
</style>
<script>
function test() {
console.log("call");
}
</script>
<div id = "headline" style = "font-size: 30px; color: rgb(255, 255, 255);">
<div style = "font-size: 30px" >PrO Client V3</div>
<div class = "menuTabs">
${HTML.button("tHome", "Home", "", "tabchange")}
${HTML.button("t1", "page 1", "", "tabchange")}
${HTML.button("t2", "page 2", "", "tabchange")}
${HTML.button("t3", "page 3", "", "tabchange")}
</div>
<div style = "font-size: 12px; overflow-y: scroll; max-height: 320px;" max-
width: 150px;>
<div id = "homeTab" style = "display: block">
<div id = "priXP">Primary XP: 0 / not found</div>
<div id = "secXP">Seconadry XP: 0 / not found</div>
<div id = "healer">Healer: High Ping</div>
</div>
<div id = "miscTab" style = "display: none">
Create clan: ${HTML.text("ccv", "ü", "20", "7")}${HTML.newLine(1)}
${HTML.button("ccf", "Create clan",
`document.createAlliance(document.getElementById("ccv").value)`, "nothing")}$
{HTML.newLine(1)}
${HTML.select("autoupgrade", [{
name: "Autoupgrade to DH",
value: "dh",
}, {
name: "Autoupgrade to KH",
value: "kh",
}, {
name: "Autoupgrade to SM",
value: "sm",
}, ])}${HTML.newLine(1)}
7-Slot: ${HTML.select("7slot", [{
name: "Teleporter",
value: "38",
}, {
name: "Turret",
value: "33",
}, ])}${HTML.newLine(1)}
</div>
<div id = "configTab" style = "display: none">
${HTML.mod("configs", [{
name: "AddAdditionalRangeOnLag",
value: "addictdist",
checked: true
}, {
name: "doAntiKickAtPacketLimit",
value: "ak",
checked: true
}, {
name: "doRenderKMTexture",
value: "kmtexture",
}, {
name: "doAutoBullTick",
value: "bulltick",
checked: true
}, {
name: "doAutoQOnSync",
value: "antisync",
checked: true
}, {
name: "doAutoQOnHighPing",
value: "autoq",
checked: true
}, {
name: "doSimpleAntiInsta",
value: "simpleheal",
checked: true
}, {
name: "doTickBasedHealing",
value: "tickheal",
checked: true
}, {
name: "doTeamSyncWithChat",
value: "teamsync",
checked: true
}, {
name: "doAutoSpikeTickOnReplaced",
value: "spiketick",
checked: true
}, {
name: "doUseTurretOnCounter",
value: "countertur",
checked: true
}, {
name: "doUseSecondaryOnCounter",
value: "countersec",
}, {
name: "doClickCombat",
value: "clicktype",
}, {
name: "doAutoSpinning",
value: "spin",
}, {
name: "doBuildingHealth",
value: "bh",
checked: true
}, {
name: "doRenderDark",
value: "darkmode",
checked: true
}, {
name: "doRenderShadow (CANT TURN OFF)",
value: "shadowss",
}, {
name: "doShowStackedAnimtext",
value: "stacktext",
}, {
name: "doDisableAnimtext",
value: "hidetext",
}, {
name: "doUpperCaseChatting",
value: "chatc",
}, {
name: "doTryHardMode",
value: "tryhard",
}, {
name: "doAlwaysRevInsta",
value: "alwaysrev",
checked: true
}, {
name: "doAlwaysSyncRevInsta",
value: "alwayssyncrev",
}, {
name: "doAlwaysSpikeInstaTurnOn",
value: "alwayspikess",
}, {
name: "doCommandChat",
value: "comchatss",
}, {
name: "doShowClanOnLeaderboard",
value: "clanleaderbo",
}, {
name: "doAlwaysAutoAimIfClick",
value: "autoaimclick",
}, {
name: "doAutoChangeWeapons",
value: "weaponsautoch",
checked: true
}, {
name: "doRevTurretGearInsta",
value: "revturretins",
checked: true
}, {
name: "doPlaceSpikeBoost",
value: "placeboostss",
}, {
name: "DoLineTracer",
value: "linetracer",
checked: true
}, {
name: "DoSmoothCamera",
value: "stmooshcamera",
}, ])}${HTML.newLine(1)}
<div id = "freeCam">Freecam: none</div>
<div id = "boosttrue">Spike boost: false</div>
<div id = "instaspiketrue">Spike insta: false</div>
Freecam hotkey: ${HTML.hotkey("freecumLOL", "/", "2", "1")}${HTML.newLine(1)}
4 placer hotkey: ${HTML.hotkey("stonespawn", "[", "2", "1")}${HTML.newLine(1)}
Bow Insta hotkey: ${HTML.hotkey("bowinstakey", "g", "2", "1")}$
{HTML.newLine(1)}
One Tick hotkey: ${HTML.hotkey("zeroframe", "t", "2", "1")}${HTML.newLine(1)}
Insta by essa hotkey: ${HTML.hotkey("essainsta", "m", "2", "1")}$
{HTML.newLine(1)}
New insta sword hotkey: ${HTML.hotkey("newinstaspike", "y", "2", "1")}$
{HTML.newLine(1)}
Toggle insta spike hotkey: ${HTML.hotkey("instawithspike", "F", "2", "1")}$
{HTML.newLine(1)}
Age 2 insta hotkey: ${HTML.hotkey("ageinstass", "i", "2", "1")}$
{HTML.newLine(1)}
Team Sync shot hotkey: ${HTML.hotkey("synckey", "b", "2", "1")}$
{HTML.newLine(1)}
Team Sync primary hotkey: ${HTML.hotkey("syncprikey", ".", "2", "1")}$
{HTML.newLine(1)}
Team Sync insta hotkey: ${HTML.hotkey("syncinstakey", "u", "2", "1")}$
{HTML.newLine(1)}
Debug hotkey: ${HTML.hotkey("debugkey", "Z", "2", "1")}${HTML.newLine(1)}
chatshortcut hotkey: ${HTML.hotkey("chatskey", "j", "2", "1")}$
{HTML.newLine(1)}
Spike hotkey: ${HTML.hotkey("spikekey", "v", "2", "1")}${HTML.newLine(1)}
Trap/Boost hotkey: ${HTML.hotkey("trapkey", "f", "2", "1")}${HTML.newLine(1)}
Walls hotkey (bug): ${HTML.hotkey("wallsskeyss", "B", "2", "1")}$
{HTML.newLine(1)}
Turret/Teleport hotkey: ${HTML.hotkey("turretkey", "h", "2", "1")}$
{HTML.newLine(1)}
Automill hotkey: ${HTML.hotkey("millkey", "z", "2", "1")}${HTML.newLine(1)}
Toggle boost spike hotkey: ${HTML.hotkey("boostsspikes", ",", "2", "1")}$
{HTML.newLine(1)}
Toggle chat mod hotkey: ${HTML.hotkey("chatmod", "n", "2", "1")}$
{HTML.newLine(1)}
Connectbot hotkey: ${HTML.hotkey("botkey", "G", "2", "1")}${HTML.newLine(1)}
Zoom hotkey: ${HTML.hotkey("zoomkey", "-", "2", "1")}${HTML.newLine(1)}
Zoom reset key: ${HTML.hotkey("zoomresetkey", "=", "2", "1")}${HTML.newLine(1)}
Song hotkey: ${HTML.hotkey("songkey", "C", "2", "1")}${HTML.newLine(1)}
Song: ${HTML.select("songs", [{
name: "DJ Junggle Dutch",
value: "1",
}, {
name: "sound jedag jedug kece",
value: "2",
}, {
name: "DJ Enakeun V9",
value: "3",
selected: true
}, {
name: "hensonn sahara x dxrk rave",
value: "4",
}, {
name: "we make it bounce jedag jedug",
value: "5",
}, {
name: "dj paijo mumet ndase",
value: "6",
}, {
name: "dj on the floor x gak tau",
value: "7",
}, {
name: "dj zerz softboy jedag jedug",
value: "8",
}, {
name: "dj tangkis dang",
value: "9",
}, {
name: "jantung bergoyang v2",
value: "10",
}, {
name: "DJ Ganteng / Cantik",
value: "11",
}, {
name: "stop song",
value: "12",
}, ])}${HTML.newLine(1)}
AutoGG: ${HTML.select("autogg", [{
name: "kills",
value: "1",
}, {
name: "LOL U DIE SO NOOB XD",
value: "2",
}, {
name: "ez lol",
value: "3",
}, {
name: "AutoGG PrO|Client kills",
value: "4",
selected: true
}, {
name: "AutoGG PrO|Client",
value: "5",
}, {
name: "write below",
value: "6",
}, {
name: "your name + kills",
value: "7",
}, {
name: "write + kills",
value: "8",
}, {
name: "Noob died: kills",
value: "9",
}, ])}${HTML.newLine(1)}
Write: ${HTML.text("killschats", "AutoGG | PrO | Race Master", "15", "30")}$
{HTML.newLine(1)}
${HTML.checkBox("secondkillschat", "Second AutoGG", true, true)}$
{HTML.text("killchatse", "I am super PrO", "6", "30")}${HTML.newLine(1)}
${HTML.checkBox("thkillshat", "Third AutoGG", true, true)}$
{HTML.text("killchattee", "He super BAD", "6", "30")}${HTML.newLine(1)}
Bow insta mode: ${HTML.select("modebow", [{
name: "bow + crossbow + musket",
value: "1",
selected: true
}, {
name: "bow + crossbow + repearter",
value: "2",
}, ])}${HTML.newLine(1)}
spike insta mode: ${HTML.select("modeinspi", [{
name: "1 spike",
value: "1",
selected: true
}, {
name: "2 spike",
value: "2",
}, {
name: "trap + spike",
value: "3",
}, ])}${HTML.newLine(1)}
4 placer mode: ${HTML.select("modestone", [{
name: "Walls",
value: "1",
}, {
name: "Spikes",
value: "2",
}, {
name: "Windmills",
value: "3",
}, {
name: "Trap/Boosts",
value: "4",
}, {
name: "Teleport/Turrets/mine",
value: "5",
selected: true,
}, ]
)}${HTML.newLine(1)}
one tick mode: ${HTML.select("modezerotick", [{
name: "v1",
value: "1",
selected: true
}, {
name: "v2",
value: "2",
}, {
name: "polearm + hammer",
value: "3",
}, {
name: "katana + bow",
value: "4",
}, ])}${HTML.newLine(1)}
insta mode: ${HTML.select("instamode", [{
name: "v1",
value: "1",
selected: true
}, {
name: "v2",
value: "2",
}, ])}${HTML.newLine(1)}
${HTML.checkBox("showch", "sendChatPacket", true, true)}${HTML.newLine(1)}
Ratio hotkey: ${HTML.hotkey("ezkey", "p", "2", "1")}${HTML.newLine(1)}
Vision: ${HTML.select("vision", [{
name: "1",
value: "1",
}, {
name: "1.1",
value: "1.1",
}, {
name: "1.2",
value: "1.2",
selected: true,
}, {
name: "1.3",
value: "1.3",
}, {
name: "1.4",
value: "1.4",
}, {
name: "1.5",
value: "1.5",
}, ])}${HTML.newLine(1)}
ExtraCombat(Beta): ${HTML.select("combat", [{
name: "Default",
value: "0",
}, {
name: "essa",
value: "hans",
selected: true,
}, {
name: "Spyder",
value: "spyder",
}, {
name: "L._.re",
value: "lore",
}, {
name: "Celestial",
value: "cele",
}, {
name: "zeph",
value: "zeph",
}, {
name: "Ae86",
value: "ae",
}, {
name: "FlareZ",
value: "fz",
}, {
name: "Zyenith",
value: "zyenith",
}, {
name: "Ueheua",
value: "me",
}, ])} - <div id = "crp" style = "display: inline-block;">lol ur bad</div>$
{HTML.newLine(1)}
ExtraVisual: ${HTML.select("visual", [{
name: "Default",
value: "0",
}, {
name: "essa",
value: "hans",
selected: true,
}, {
name: "Spyder",
value: "spyder",
}, {
name: "L._.re",
value: "lore",
}, {
name: "Celestial",
value: "cele",
}, {
name: "Zeph",
value: "zeph",
}, {
name: "Ae86",
value: "ae",
}, {
name: "FlareZ",
value: "fz",
}, {
name: "Zyenith",
value: "zyenith",
}, {
name: "Ueheua",
value: "me",
}, ])} - <div id = "vrp" style = "display: inline-block;">lol ur b a d</div>$
{HTML.newLine(1)}
</div>
<div id = "combatTab" style = "display: none">
(region locked) ${HTML.button("serverwarper", "Warp to Active Server",
`document.warpServer()`, "nothing")}${HTML.newLine(2)}
Object for the placer: ${HTML.select("placeconfig", [{
name: "Walls",
value: "1",
}, {
name: "Spikes",
value: "2",
}, {
name: "Windmills",
value: "3",
selected: true,
}, {
name: "Trap/Boosts",
value: "4",
}, {
name: "Teleport/Turrets",
value: "5",
}, ])}${HTML.newLine(2)}
One-way: ${HTML.button("streamer", "Streamer Mode", "", "nothing")}$
{HTML.newLine(2)}
farm
<div class = "holder">
${HTML.checkBox("grind", "autoRuby", false)}${HTML.newLine(1)}
${HTML.checkBox("grindsec", "autoRubySec", true)}${HTML.newLine(1)}
</div>
anti
<div class = "holder">
${HTML.checkBox("soldieranti", "soldierAntiInsta", true)}${HTML.newLine(1)}
${HTML.checkBox("soldierempanti", "soldierEmpAntiInsta", true)}$
{HTML.newLine(1)}
${HTML.checkBox("antitick", "anti0Tick", true)}${HTML.newLine(1)}
${HTML.checkBox("antirange", "antiRangedInsta", true)}${HTML.newLine(1)}
</div>
autoBreak
<div class = "holder">
${HTML.checkBox("earlyab", "early", true)}${HTML.newLine(1)}
earlyWaitTime ${HTML.newLine(1)}
${HTML.text("earlytime", "10", "6", "5")}${HTML.newLine(1)}
${HTML.checkBox("abactive", "activate", true)}${HTML.newLine(1)}
${HTML.checkBox("ab360hit", "breakitems(Patched)", false)}${HTML.newLine(1)}
${HTML.checkBox("abplace", "tryPlacementEveryTick", false)}${HTML.newLine(1)}
</div>
music
<div class = "holder">
${HTML.checkBox("msync", "sync", true)}${HTML.newLine(1)}
</div>
autoTrigger
<div class = "holder">
${HTML.checkBox("sync", "syncShots (no chat)", false)}${HTML.newLine(1)}
${HTML.checkBox("syncsss", "syncShots (with chat)", false)}${HTML.newLine(1)}
${HTML.checkBox("syncpole", "syncPolearm (no chat)", false)}${HTML.newLine(1)}
${HTML.checkBox("syncpri", "syncPrimary (with chat)", false)}${HTML.newLine(1)}
${HTML.checkBox("syncinsta", "syncInsta", false)}${HTML.newLine(1)}
syncThrottle: ${HTML.text("synccount", "1", "6", "2")}${HTML.newLine(1)}
sync shot chat: ${HTML.text("syncschats", "Pew", "6", "20")}${HTML.newLine(1)}
sync primary chat: ${HTML.text("syncschatpri", "Piw", "6", "20")}$
{HTML.newLine(1)}
sync insta chat: ${HTML.text("syncschatinsta", "Paw", "6", "20")}$
{HTML.newLine(1)}
</div>
mouse
<div class = "holder">
${HTML.checkBox("clicksync", "mclickSync", false)}${HTML.newLine(1)}
</div>
autoQ
<div class = "holder">
${HTML.checkBox("evautoq", "alwaysOn", false)}${HTML.newLine(1)}
</div>
placement
<div class = "holder">
${HTML.checkBox("replc", "autoreplace", true)}${HTML.newLine(1)}
${HTML.checkBox("autoplc", "placeEveryTick", true)}${HTML.newLine(1)}
</div>
messages
<div class = "holder">
${HTML.checkBox("eautochat", "autoChat", false)}${HTML.newLine(1)}
${HTML.checkBox("esyncteams", "teamSyncChat", false)}${HTML.newLine(1)}
${HTML.checkBox("chatshort", "chatShortcut", false)}$
{HTML.text("chatshorttext", "hi", "6", "25")}${HTML.newLine(1)}
${HTML.checkBox("chattypingsss", "chatTyping", false)}$
{HTML.text("chattypingtext", "Typing", "6", "25")}${HTML.newLine(1)}
Typing type: ${HTML.select("typengtypi", [{
name: "...",
value: "1",
selected: true,
}, {
name: ".-+_",
value: "2",
}, {
name: "ABCD",
value: "3",
}, ])}${HTML.newLine(1)}
</div>
autoUpgrade
<div class = "holder">
${HTML.checkBox("aaauaua", "activate", false)}${HTML.newLine(1)}
</div>
</div>
</div>
`;
}
modMenus.style.transition = 'none';
});
document.addEventListener('mouseup', () => {
isDragging = false;
modMenus.style.transition = '';
});
updateInnerHTML();
changeDisp(getEl("tHome"));
getEl("tHome").onclick = function() {
changeDisp(this);
}
;
getEl("t1").onclick = function() {
changeDisp(this);
}
;
getEl("t2").onclick = function() {
changeDisp(this);
}
;
getEl("t3").onclick = function() {
changeDisp(this);
}
;
getEl("streamer").onclick = function() {
streamerMode = !streamerMode;
}
;
getEl("ccv").onfocus = function() {
canmove = false;
};
getEl("ccv").onblur = function() {
canmove = true;
};
let oldSelect = firstConfig[0];
let newSelect = firstConfig[0];
getEl("configs").onchange = function() {
let value = getEl("configs").value;
let sliced = function(val) {
return val.slice(0, val.length - 1);
};
oldSelect = newSelect;
newSelect = value;
getEl(sliced(oldSelect)).style.display = "none";
getEl(sliced(newSelect)).style.display = "inline-block";
}
;
function checkCheckChickenModV69(a) {
let aw = a == "0" ? "Legit" : a == "spyder" ? "Quasar Beta v0.83" : a == "lore"
? "L._.re FZ Lover" : a == "zeph" ? "J Mod" : a == "cele" ? "Goofy Ahh Mod" : a ==
"ae" ? "Alpine A110" : a == "fz" ? "RV2" : a == "zyenith" ? "RV3" : a == "me" ?
"Pre Client V69420" : a == "hans" ? "PrO Client" : "U r bad";
return aw;
}
getEl("crp").innerHTML = checkCheckChickenModV69(getEl("combat").value);
getEl("vrp").innerHTML = checkCheckChickenModV69(getEl("visual").value);
document.gototouchgrass = function() {
window.onbeforeunload = undefined;
window.location.href = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
}
function bConnect(token) {
let o = token && new WebSocket(tmpAddress + "&token=" +
encodeURIComponent(token));
o.binaryType = "arraybuffer";
o.firstMan = firstMan ? true : false;
firstMan = false;
if (o.firstMan) {
o.allianceNotifications = [];
o.tickC = 0;
}
function wsSend(ms) {
o.send(new Uint8Array(Array.from(window.msgpack.encode(ms))));
}
function botSpawn() {
wsSend(["sp", [{
name: "essa-PrO fan",
moofoll: 1,
skin: 6,
}]]);
}
o.onopen = function() {
wsconnected++;
botSpawn();
botSockets.push(o);
};
o.onclose = function() {
if (o.firstMan) {
firstMan = true;
}
};
}
/******/
(function(modules) {
// webpackBootstrap
/******/
// The module cache
/******/
var installedModules = {};
/******/
/******/
// The require function
/******/
function __webpack_require__(moduleId) {
/******/
/******/
// Check if module is in cache
/******/
if (installedModules[moduleId]) {
/******/
return installedModules[moduleId].exports;
/******/
}
/******/
// Create a new module (and put it into the cache)
/******/
var module = (installedModules[moduleId] = {
/******/
i: moduleId,
/******/
l: false,
/******/
exports: {},
/******/
});
/******/
/******/
// Execute the module function
/******/
modules[moduleId].call(module.exports, module, module.exports,
__webpack_require__);
/******/
/******/
// Flag the module as loaded
/******/
module.l = true;
/******/
/******/
// Return the exports of the module
/******/
return module.exports;
/******/
}
/******/
/******/
/******/
// expose the modules object (__webpack_modules__)
/******/
__webpack_require__.m = modules;
/******/
/******/
// expose the module cache
/******/
__webpack_require__.c = installedModules;
/******/
/******/
// define getter function for harmony exports
/******/
__webpack_require__.d = function(exports, name, getter) {
/******/
if (!__webpack_require__.o(exports, name)) {
/******/
Object.defineProperty(exports, name, {
enumerable: true,
get: getter,
});
/******/
}
/******/
}
;
/******/
/******/
// define __esModule on exports
/******/
__webpack_require__.r = function(exports) {
/******/
if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
/******/
Object.defineProperty(exports, Symbol.toStringTag, {
value: "Module",
});
/******/
}
/******/
Object.defineProperty(exports, "__esModule", {
value: true
});
/******/
}
;
/******/
/******/
// create a fake namespace object
/******/
// mode & 1: value is a module id, require it
/******/
// mode & 2: merge all properties of value into the ns
/******/
// mode & 4: return value when already ns object
/******/
// mode & 8|1: behave like require
/******/
__webpack_require__.t = function(value, mode) {
/******/
if (mode & 1)
value = __webpack_require__(value);
/******/
if (mode & 8)
return value;
/******/
if (mode & 4 && typeof value === "object" && value && value.__esModule)
return value;
/******/
var ns = Object.create(null);
/******/
__webpack_require__.r(ns);
/******/
Object.defineProperty(ns, "default", {
enumerable: true,
value: value,
});
/******/
if (mode & 2 && typeof value != "string")
for (var key in value)
__webpack_require__.d(ns, key, function(key) {
return value[key];
}
.bind(null, key));
/******/
return ns;
/******/
}
;
/******/
/******/
// getDefaultExport function for compatibility with non-harmony modules
/******/
__webpack_require__.n = function(module) {
/******/
var getter = module && module.__esModule ? /******/
function getDefault() {
return module["default"];
}
: /******/
function getModuleExports() {
return module;
}
;
/******/
__webpack_require__.d(getter, "a", getter);
/******/
return getter;
/******/
}
;
/******/
/******/
// Object.prototype.hasOwnProperty.call
/******/
__webpack_require__.o = function(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
}
;
/******/
/******/
// __webpack_public_path__
/******/
__webpack_require__.p = "";
/******/
/******/
/******/
// Load entry module and return exports
/******/
return __webpack_require__((__webpack_require__.s = "./src/js/app.js"));
/******/
}
)(/************************************************************************/
/******/
{
/***/
"./node_modules/bad-words/lib/badwords.js": /*!
************************************************!*\
!*** ./node_modules/bad-words/lib/badwords.js ***!
\************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
const localList = __webpack_require__(/*! ./lang.json */
"./node_modules/bad-words/lib/lang.json").words;
const baseList = __webpack_require__(/*! badwords-list */
"./node_modules/badwords-list/lib/index.js").array;
class Filter {
/**
* Filter constructor.
* @constructor
* @param {object} options - Filter instance options
* @param {boolean} options.emptyList - Instantiate filter with
no blacklist
* @param {array} options.list - Instantiate filter with custom
list
* @param {string} options.placeHolder - Character used to
replace profane words.
* @param {string} options.regex - Regular expression used to
sanitize words before comparing them to blacklist.
* @param {string} options.replaceRegex - Regular expression
used to replace profane words with placeHolder.
*/
constructor(options={}) {
Object.assign(this, {
list: (options.emptyList && []) ||
Array.prototype.concat.apply(localList, [baseList, options.list || [], ]),
exclude: options.exclude || [],
placeHolder: options.placeHolder || "*",
regex: options.regex || /[^a-zA-Z0-9|\$|\@]|\^/g,
replaceRegex: options.replaceRegex || /\w/g,
});
}
/**
* Determine if a string contains profane language.
* @param {string} string - String to evaluate for profanity.
*/
isProfane(string) {
return (this.list.filter((word)=>{
const wordExp = new RegExp(`\\b ${word.replace(/(\W)/g, "\\
$1")}\\b`,"gi");
return (!this.exclude.includes(word.toLowerCase()) &&
wordExp.test(string));
}
).length > 0 || false);
}
/**
* Replace a word with placeHolder characters;
* @param {string} string - String to replace.
*/
replaceWord(string) {
return string.replace(this.regex,
"").replace(this.replaceRegex, this.placeHolder);
}
/**
* Evaluate a string for profanity and return an edited
version.
* @param {string} string - Sentence to filter.
*/
clean(string) {
return string.split(/\b/).map((word)=>{
return this.isProfane(word) ? this.replaceWord(word) :
word;
}
).join("");
}
/**
* Add word(s) to blacklist filter / remove words from
whitelist filter
* @param {...string} word - Word(s) to add to blacklist
*/
addWords() {
let words = Array.from(arguments);
this.list.push(...words);
words.map((word)=>word.toLowerCase()).forEach((word)=>{
if (this.exclude.includes(word)) {
this.exclude.splice(this.exclude.indexOf(word), 1);
}
}
);
}
/**
* Add words to whitelist filter
* @param {...string} word - Word(s) to add to whitelist.
*/
removeWords() {
this.exclude.push(...Array.from(arguments).map((word)=>word.toLowerCase()));
}
}
module.exports = Filter;
/***/
},
/***/
"./node_modules/bad-words/lib/lang.json": /*!
**********************************************!*\
!*** ./node_modules/bad-words/lib/lang.json ***!
\**********************************************/
/*! exports provided: words, default */
/***/
function(module) {
module.exports = {
words: ["ahole", "anus", "ash0le", "ash0les", "asholes", "ass",
"Ass Monkey", "Assface", "assh0le", "assh0lez", "asshole", "assholes", "assholz",
"asswipe", "azzhole", "bassterds", "bastard", "bastards", "bastardz", "basterds",
"basterdz", "Biatch", "bitch", "bitches", "Blow Job", "boffing", "butthole",
"buttwipe", "c0ck", "c0cks", "c0k", "Carpet Muncher", "cawk", "cawks", "Clit",
"cnts", "cntz", "cock", "cockhead", "cock-head", "cocks", "CockSucker", "cock-
sucker", "crap", "cum", "cunt", "cunts", "cuntz", "dick", "dild0", "dild0s",
"dildo", "dildos", "dilld0", "dilld0s", "dominatricks", "dominatrics",
"dominatrix", "dyke", "enema", "f u c k", "f u c k e r", "fag", "fag1t", "faget",
"fagg1t", "faggit", "faggot", "fagg0t", "fagit", "fags", "fagz", "faig", "faigs",
"fart", "flipping the bird", "fuck", "fucker", "fuckin", "fucking", "fucks", "Fudge
Packer", "fuk", "Fukah", "Fuken", "fuker", "Fukin", "Fukk", "Fukkah", "Fukken",
"Fukker", "Fukkin", "g00k", "God-damned", "h00r", "h0ar", "h0re", "hells", "hoar",
"hoor", "hoore", "jackoff", "jap", "japs", "jerk-off", "jisim", "jiss", "jizm",
"jizz", "knob", "knobs", "knobz", "kunt", "kunts", "kuntz", "Lezzian", "Lipshits",
"Lipshitz", "masochist", "masokist", "massterbait", "masstrbait", "masstrbate",
"masterbaiter", "masterbate", "masterbates", "Motha Fucker", "Motha Fuker", "Motha
Fukkah", "Motha Fukker", "Mother Fucker", "Mother Fukah", "Mother Fuker", "Mother
Fukkah", "Mother Fukker", "mother-fucker", "Mutha Fucker", "Mutha Fukah", "Mutha
Fuker", "Mutha Fukkah", "Mutha Fukker", "n1gr", "nastt", "nigger;", "nigur;",
"niiger;", "niigr;", "orafis", "orgasim;", "orgasm", "orgasum", "oriface",
"orifice", "orifiss", "packi", "packie", "packy", "paki", "pakie", "paky",
"pecker", "peeenus", "peeenusss", "peenus", "peinus", "pen1s", "penas", "penis",
"penis-breath", "penus", "penuus", "Phuc", "Phuck", "Phuk", "Phuker", "Phukker",
"polac", "polack", "polak", "Poonani", "pr1c", "pr1ck", "pr1k", "pusse", "pussee",
"pussy", "puuke", "puuker", "queer", "queers", "queerz", "qweers", "qweerz",
"qweir", "recktum", "rectum", "retard", "sadist", "scank", "schlong", "screwing",
"semen", "sex", "sexy", "Sh!t", "sh1t", "sh1ter", "sh1ts", "sh1tter", "sh1tz",
"shit", "shits", "shitter", "Shitty", "Shity", "shitz", "Shyt", "Shyte", "Shytty",
"Shyty", "skanck", "skank", "skankee", "skankey", "skanks", "Skanky", "slag",
"slut", "sluts", "Slutty", "slutz", "son-of-a-bitch", "tit", "turd", "va1jina",
"vag1na", "vagiina", "vagina", "vaj1na", "vajina", "vullva", "vulva", "w0p",
"wh00r", "wh0re", "whore", "xrated", "xxx", "b!+ch", "bitch", "blowjob", "clit",
"arschloch", "fuck", "shit", "ass", "asshole", "b!tch", "b17ch", "b1tch",
"bastard", "bi+ch", "boiolas", "buceta", "c0ck", "cawk", "chink", "cipa", "clits",
"cock", "cum", "cunt", "dildo", "dirsa", "ejakulate", "fatass", "fcuk", "fuk",
"fux0r", "hoer", "hore", "jism", "kawk", "l3itch", "l3i+ch", "lesbian",
"masturbate", "masterbat*", "masterbat3", "motherfucker", "s.o.b.", "mofo", "nazi",
"nigga", "nigger", "nutsack", "phuck", "pimpis", "pusse", "pussy", "scrotum", "sh!
t", "shemale", "shi+", "sh!+", "slut", "smut", "teets", "tits", "boobs", "b00bs",
"teez", "testical", "testicle", "titt", "w00se", "jackoff", "wank", "whoar",
"whore", "*damn", "*dyke", "*fuck*", "*shit*", "@$$", "amcik", "andskota", "arse*",
"assrammer", "ayir", "bi7ch", "bitch*", "bollock*", "breasts", "butt-pirate",
"cabron", "cazzo", "chraa", "chuj", "Cock*", "cunt*", "d4mn", "daygo", "dego",
"dick*", "dike*", "dupa", "dziwka", "ejackulate", "Ekrem*", "Ekto", "enculer",
"faen", "fag*", "fanculo", "fanny", "feces", "feg", "Felcher", "ficken", "fitt*",
"Flikker", "foreskin", "Fotze", "Fu(*", "fuk*", "futkretzn", "gook", "guiena",
"h0r", "h4x0r", "hell", "helvete", "hoer*", "honkey", "Huevon", "hui", "injun",
"jizz", "kanker*", "kike", "klootzak", "kraut", "knulle", "kuk", "kuksuger",
"Kurac", "kurwa", "kusi*", "kyrpa*", "lesbo", "mamhoon", "masturbat*", "merd*",
"mibun", "monkleigh", "mouliewop", "muie", "mulkku", "muschi", "nazis",
"nepesaurio", "nigger*", "orospu", "paska*", "perse", "picka", "pierdol*",
"pillu*", "pimmel", "piss*", "pizda", "poontsee", "poop", "porn", "p0rn", "pr0n",
"preteen", "pula", "pule", "puta", "puto", "qahbeh", "queef*", "rautenberg",
"schaffer", "scheiss*", "schlampe", "schmuck", "screw", "sh!t*", "sharmuta",
"sharmute", "shipal", "shiz", "skribz", "skurwysyn", "sphencter", "spic",
"spierdalaj", "splooge", "suka", "b00b*", "testicle*", "titt*", "twat", "vittu",
"wank*", "wetback*", "wichser", "wop*", "yed", "zabourah", ],
};
/***/
},
/***/
"./node_modules/badwords-list/lib/array.js": /*!
*************************************************!*\
!*** ./node_modules/badwords-list/lib/array.js ***!
\*************************************************/
/*! no static exports found */
/***/
function(module, exports) {
module.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus",
"ar5e", "arrse", "arse", "ass", "ass-fucker", "asses", "assfucker", "assfukka",
"asshole", "assholes", "asswhole", "a_s_s", "b!tch", "b00bs", "b17ch", "b1tch",
"ballbag", "balls", "ballsack", "bastard", "beastial", "beastiality", "bellend",
"bestial", "bestiality", "bi+ch", "biatch", "bitch", "bitcher", "bitchers",
"bitches", "bitchin", "bitching", "bloody", "blow job", "blowjob", "blowjobs",
"boiolas", "bollock", "bollok", "boner", "boob", "boobs", "booobs", "boooobs",
"booooobs", "booooooobs", "breasts", "buceta", "bugger", "bum", "bunny fucker",
"butt", "butthole", "buttmuch", "buttplug", "c0ck", "c0cksucker", "carpet muncher",
"cawk", "chink", "cipa", "cl1t", "clit", "clitoris", "clits", "cnut", "cock",
"cock-sucker", "cockface", "cockhead", "cockmunch", "cockmuncher", "cocks",
"cocksuck", "cocksucked", "cocksucker", "cocksucking", "cocksucks", "cocksuka",
"cocksukka", "cok", "cokmuncher", "coksucka", "coon", "cox", "crap", "cum",
"cummer", "cumming", "cums", "cumshot", "cunilingus", "cunillingus", "cunnilingus",
"cunt", "cuntlick", "cuntlicker", "cuntlicking", "cunts", "cyalis", "cyberfuc",
"cyberfuck", "cyberfucked", "cyberfucker", "cyberfuckers", "cyberfucking", "d1ck",
"damn", "dick", "dickhead", "dildo", "dildos", "dink", "dinks", "dirsa", "dlck",
"dog-fucker", "doggin", "dogging", "donkeyribber", "doosh", "duche", "dyke",
"ejaculate", "ejaculated", "ejaculates", "ejaculating", "ejaculatings",
"ejaculation", "ejakulate", "f u c k", "f u c k e r", "f4nny", "fag", "fagging",
"faggitt", "faggot", "faggs", "fagot", "fagots", "fags", "fanny", "fannyflaps",
"fannyfucker", "fanyy", "fatass", "fcuk", "fcuker", "fcuking", "feck", "fecker",
"felching", "fellate", "fellatio", "fingerfuck", "fingerfucked", "fingerfucker",
"fingerfuckers", "fingerfucking", "fingerfucks", "fistfuck", "fistfucked",
"fistfucker", "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange",
"fook", "fooker", "fuck", "fucka", "fucked", "fucker", "fuckers", "fuckhead",
"fuckheads", "fuckin", "fucking", "fuckings", "fuckingshitmotherfucker", "fuckme",
"fucks", "fuckwhit", "fuckwit", "fudge packer", "fudgepacker", "fuk", "fuker",
"fukker", "fukkin", "fuks", "fukwhit", "fukwit", "fux", "fux0r", "f_u_c_k",
"gangbang", "gangbanged", "gangbangs", "gaylord", "gaysex", "goatse", "God", "god-
dam", "god-damned", "goddamn", "goddamned", "hardcoresex", "hell", "heshe", "hoar",
"hoare", "hoer", "homo", "hore", "horniest", "horny", "hotsex", "jack-off",
"jackoff", "jap", "jerk-off", "jism", "jiz", "jizm", "jizz", "kawk", "knob",
"knobead", "knobed", "knobend", "knobhead", "knobjocky", "knobjokey", "kock",
"kondum", "kondums", "kum", "kummer", "kumming", "kums", "kunilingus", "l3i+ch",
"l3itch", "labia", "lust", "lusting", "m0f0", "m0fo", "m45terbate", "ma5terb8",
"ma5terbate", "masochist", "master-bate", "masterb8", "masterbat*", "masterbat3",
"masterbate", "masterbation", "masterbations", "masturbate", "mo-fo", "mof0",
"mofo", "mothafuck", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked",
"mothafucker", "mothafuckers", "mothafuckin", "mothafucking", "mothafuckings",
"mothafucks", "mother fucker", "motherfuck", "motherfucked", "motherfucker",
"motherfuckers", "motherfuckin", "motherfucking", "motherfuckings", "motherfuckka",
"motherfucks", "muff", "mutha", "muthafecker", "muthafuckker", "muther",
"mutherfucker", "n1gga", "n1gger", "nazi", "nigg3r", "nigg4h", "nigga", "niggah",
"niggas", "niggaz", "nigger", "niggers", "nob", "nob jokey", "nobhead", "nobjocky",
"nobjokey", "numbnuts", "nutsack", "orgasim", "orgasims", "orgasm", "orgasms",
"p0rn", "pawn", "pecker", "penis", "penisfucker", "phonesex", "phuck", "phuk",
"phuked", "phuking", "phukked", "phukking", "phuks", "phuq", "pigfucker", "pimpis",
"piss", "pissed", "pisser", "pissers", "pisses", "pissflaps", "pissin", "pissing",
"pissoff", "poop", "porn", "porno", "pornography", "pornos", "prick", "pricks",
"pron", "pube", "pusse", "pussi", "pussies", "pussy", "pussys", "rectum", "retard",
"rimjaw", "rimming", "s hit", "s.o.b.", "sadist", "schlong", "screwing", "scroat",
"scrote", "scrotum", "semen", "sex", "sh!+", "sh!t", "sh1t", "shag", "shagger",
"shaggin", "shagging", "shemale", "shi+", "shit", "shitdick", "shite", "shited",
"shitey", "shitfuck", "shitfull", "shithead", "shiting", "shitings", "shits",
"shitted", "shitter", "shitters", "shitting", "shittings", "shitty", "skank",
"slut", "sluts", "smegma", "smut", "snatch", "son-of-a-bitch", "spac", "spunk",
"s_h_i_t", "t1tt1e5", "t1tties", "teets", "teez", "testical", "testicle", "tit",
"titfuck", "tits", "titt", "tittie5", "tittiefucker", "titties", "tittyfuck",
"tittywank", "titwank", "tosser", "turd", "tw4t", "twat", "twathead", "twatty",
"twunt", "twunter", "v14gra", "v1gra", "vagina", "viagra", "vulva", "w00se",
"wang", "wank", "wanker", "wanky", "whoar", "whore", "willies", "willy", "xrated",
"xxx", ];
/***/
},
/***/
"./node_modules/badwords-list/lib/index.js": /*!
*************************************************!*\
!*** ./node_modules/badwords-list/lib/index.js ***!
\*************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
object: __webpack_require__(/*! ./object */
"./node_modules/badwords-list/lib/object.js"),
array: __webpack_require__(/*! ./array */
"./node_modules/badwords-list/lib/array.js"),
regex: __webpack_require__(/*! ./regexp */
"./node_modules/badwords-list/lib/regexp.js"),
};
/***/
},
/***/
"./node_modules/badwords-list/lib/object.js": /*!
**************************************************!*\
!*** ./node_modules/badwords-list/lib/object.js ***!
\**************************************************/
/*! no static exports found */
/***/
function(module, exports) {
module.exports = {
"4r5e": 1,
"5h1t": 1,
"5hit": 1,
a55: 1,
anal: 1,
anus: 1,
ar5e: 1,
arrse: 1,
arse: 1,
ass: 1,
"ass-fucker": 1,
asses: 1,
assfucker: 1,
assfukka: 1,
asshole: 1,
assholes: 1,
asswhole: 1,
a_s_s: 1,
"b!tch": 1,
b00bs: 1,
b17ch: 1,
b1tch: 1,
ballbag: 1,
balls: 1,
ballsack: 1,
bastard: 1,
beastial: 1,
beastiality: 1,
bellend: 1,
bestial: 1,
bestiality: 1,
"bi+ch": 1,
biatch: 1,
bitch: 1,
bitcher: 1,
bitchers: 1,
bitches: 1,
bitchin: 1,
bitching: 1,
bloody: 1,
"blow job": 1,
blowjob: 1,
blowjobs: 1,
boiolas: 1,
bollock: 1,
bollok: 1,
boner: 1,
boob: 1,
boobs: 1,
booobs: 1,
boooobs: 1,
booooobs: 1,
booooooobs: 1,
breasts: 1,
buceta: 1,
bugger: 1,
bum: 1,
"bunny fucker": 1,
butt: 1,
butthole: 1,
buttmuch: 1,
buttplug: 1,
c0ck: 1,
c0cksucker: 1,
"carpet muncher": 1,
cawk: 1,
chink: 1,
cipa: 1,
cl1t: 1,
clit: 1,
clitoris: 1,
clits: 1,
cnut: 1,
cock: 1,
"cock-sucker": 1,
cockface: 1,
cockhead: 1,
cockmunch: 1,
cockmuncher: 1,
cocks: 1,
cocksuck: 1,
cocksucked: 1,
cocksucker: 1,
cocksucking: 1,
cocksucks: 1,
cocksuka: 1,
cocksukka: 1,
cok: 1,
cokmuncher: 1,
coksucka: 1,
coon: 1,
cox: 1,
crap: 1,
cum: 1,
cummer: 1,
cumming: 1,
cums: 1,
cumshot: 1,
cunilingus: 1,
cunillingus: 1,
cunnilingus: 1,
cunt: 1,
cuntlick: 1,
cuntlicker: 1,
cuntlicking: 1,
cunts: 1,
cyalis: 1,
cyberfuc: 1,
cyberfuck: 1,
cyberfucked: 1,
cyberfucker: 1,
cyberfuckers: 1,
cyberfucking: 1,
d1ck: 1,
damn: 1,
dick: 1,
dickhead: 1,
dildo: 1,
dildos: 1,
dink: 1,
dinks: 1,
dirsa: 1,
dlck: 1,
"dog-fucker": 1,
doggin: 1,
dogging: 1,
donkeyribber: 1,
doosh: 1,
duche: 1,
dyke: 1,
ejaculate: 1,
ejaculated: 1,
ejaculates: 1,
ejaculating: 1,
ejaculatings: 1,
ejaculation: 1,
ejakulate: 1,
"f u c k": 1,
"f u c k e r": 1,
f4nny: 1,
fag: 1,
fagging: 1,
faggitt: 1,
faggot: 1,
faggs: 1,
fagot: 1,
fagots: 1,
fags: 1,
fanny: 1,
fannyflaps: 1,
fannyfucker: 1,
fanyy: 1,
fatass: 1,
fcuk: 1,
fcuker: 1,
fcuking: 1,
feck: 1,
fecker: 1,
felching: 1,
fellate: 1,
fellatio: 1,
fingerfuck: 1,
fingerfucked: 1,
fingerfucker: 1,
fingerfuckers: 1,
fingerfucking: 1,
fingerfucks: 1,
fistfuck: 1,
fistfucked: 1,
fistfucker: 1,
fistfuckers: 1,
fistfucking: 1,
fistfuckings: 1,
fistfucks: 1,
flange: 1,
fook: 1,
fooker: 1,
fuck: 1,
fucka: 1,
fucked: 1,
fucker: 1,
fuckers: 1,
fuckhead: 1,
fuckheads: 1,
fuckin: 1,
fucking: 1,
fuckings: 1,
fuckingshitmotherfucker: 1,
fuckme: 1,
fucks: 1,
fuckwhit: 1,
fuckwit: 1,
"fudge packer": 1,
fudgepacker: 1,
fuk: 1,
fuker: 1,
fukker: 1,
fukkin: 1,
fuks: 1,
fukwhit: 1,
fukwit: 1,
fux: 1,
fux0r: 1,
f_u_c_k: 1,
gangbang: 1,
gangbanged: 1,
gangbangs: 1,
gaylord: 1,
gaysex: 1,
goatse: 1,
God: 1,
"god-dam": 1,
"god-damned": 1,
goddamn: 1,
goddamned: 1,
hardcoresex: 1,
hell: 1,
heshe: 1,
hoar: 1,
hoare: 1,
hoer: 1,
homo: 1,
hore: 1,
horniest: 1,
horny: 1,
hotsex: 1,
"jack-off": 1,
jackoff: 1,
jap: 1,
"jerk-off": 1,
jism: 1,
jiz: 1,
jizm: 1,
jizz: 1,
kawk: 1,
knob: 1,
knobead: 1,
knobed: 1,
knobend: 1,
knobhead: 1,
knobjocky: 1,
knobjokey: 1,
kock: 1,
kondum: 1,
kondums: 1,
kum: 1,
kummer: 1,
kumming: 1,
kums: 1,
kunilingus: 1,
"l3i+ch": 1,
l3itch: 1,
labia: 1,
lust: 1,
lusting: 1,
m0f0: 1,
m0fo: 1,
m45terbate: 1,
ma5terb8: 1,
ma5terbate: 1,
masochist: 1,
"master-bate": 1,
masterb8: 1,
"masterbat*": 1,
masterbat3: 1,
masterbate: 1,
masterbation: 1,
masterbations: 1,
masturbate: 1,
"mo-fo": 1,
mof0: 1,
mofo: 1,
mothafuck: 1,
mothafucka: 1,
mothafuckas: 1,
mothafuckaz: 1,
mothafucked: 1,
mothafucker: 1,
mothafuckers: 1,
mothafuckin: 1,
mothafucking: 1,
mothafuckings: 1,
mothafucks: 1,
"mother fucker": 1,
motherfuck: 1,
motherfucked: 1,
motherfucker: 1,
motherfuckers: 1,
motherfuckin: 1,
motherfucking: 1,
motherfuckings: 1,
motherfuckka: 1,
motherfucks: 1,
muff: 1,
mutha: 1,
muthafecker: 1,
muthafuckker: 1,
muther: 1,
mutherfucker: 1,
n1gga: 1,
n1gger: 1,
nazi: 1,
nigg3r: 1,
nigg4h: 1,
nigga: 1,
niggah: 1,
niggas: 1,
niggaz: 1,
nigger: 1,
niggers: 1,
nob: 1,
"nob jokey": 1,
nobhead: 1,
nobjocky: 1,
nobjokey: 1,
numbnuts: 1,
nutsack: 1,
orgasim: 1,
orgasims: 1,
orgasm: 1,
orgasms: 1,
p0rn: 1,
pawn: 1,
pecker: 1,
penis: 1,
penisfucker: 1,
phonesex: 1,
phuck: 1,
phuk: 1,
phuked: 1,
phuking: 1,
phukked: 1,
phukking: 1,
phuks: 1,
phuq: 1,
pigfucker: 1,
pimpis: 1,
piss: 1,
pissed: 1,
pisser: 1,
pissers: 1,
pisses: 1,
pissflaps: 1,
pissin: 1,
pissing: 1,
pissoff: 1,
poop: 1,
porn: 1,
porno: 1,
pornography: 1,
pornos: 1,
prick: 1,
pricks: 1,
pron: 1,
pube: 1,
pusse: 1,
pussi: 1,
pussies: 1,
pussy: 1,
pussys: 1,
rectum: 1,
retard: 1,
rimjaw: 1,
rimming: 1,
"s hit": 1,
"s.o.b.": 1,
sadist: 1,
schlong: 1,
screwing: 1,
scroat: 1,
scrote: 1,
scrotum: 1,
semen: 1,
sex: 1,
"sh!+": 1,
"sh!t": 1,
sh1t: 1,
shag: 1,
shagger: 1,
shaggin: 1,
shagging: 1,
shemale: 1,
"shi+": 1,
shit: 1,
shitdick: 1,
shite: 1,
shited: 1,
shitey: 1,
shitfuck: 1,
shitfull: 1,
shithead: 1,
shiting: 1,
shitings: 1,
shits: 1,
shitted: 1,
shitter: 1,
shitters: 1,
shitting: 1,
shittings: 1,
shitty: 1,
skank: 1,
slut: 1,
sluts: 1,
smegma: 1,
smut: 1,
snatch: 1,
"son-of-a-bitch": 1,
spac: 1,
spunk: 1,
s_h_i_t: 1,
t1tt1e5: 1,
t1tties: 1,
teets: 1,
teez: 1,
testical: 1,
testicle: 1,
tit: 1,
titfuck: 1,
tits: 1,
titt: 1,
tittie5: 1,
tittiefucker: 1,
titties: 1,
tittyfuck: 1,
tittywank: 1,
titwank: 1,
tosser: 1,
turd: 1,
tw4t: 1,
twat: 1,
twathead: 1,
twatty: 1,
twunt: 1,
twunter: 1,
v14gra: 1,
v1gra: 1,
vagina: 1,
viagra: 1,
vulva: 1,
w00se: 1,
wang: 1,
wank: 1,
wanker: 1,
wanky: 1,
whoar: 1,
whore: 1,
willies: 1,
willy: 1,
xrated: 1,
xxx: 1,
};
/***/
},
/***/
"./node_modules/badwords-list/lib/regexp.js": /*!
**************************************************!*\
!*** ./node_modules/badwords-list/lib/regexp.js ***!
\**************************************************/
/*! no static exports found */
/***/
function(module, exports) {
module.exports = /\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|
ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|
b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|
bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|
blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|
booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|
buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|
cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|
cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|
coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|
cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|
cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|
dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|
dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|
ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|
fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|
felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|
fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|
fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|
fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|
fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|
fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|
god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|
hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|
knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|
kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|
m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|
masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|
mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|
mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|
motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|
motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|
n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob
jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|
p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|
phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|
pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|
pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|
schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|
shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|
shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|
skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|
t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|
titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|
twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|
willies|willy|xrated|xxx)\b/gi;
/***/
},
/***/
"./node_modules/base64-js/index.js": /*!
*****************************************!*\
!*** ./node_modules/base64-js/index.js ***!
\*****************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
"use strict";
exports.byteLength = byteLength;
exports.toByteArray = toByteArray;
exports.fromByteArray = fromByteArray;
var lookup = [];
var revLookup = [];
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
var code =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i];
revLookup[code.charCodeAt(i)] = i;
}
// Support decoding URL-safe base64 strings, as Node.js does.
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
revLookup["-".charCodeAt(0)] = 62;
revLookup["_".charCodeAt(0)] = 63;
function getLens(b64) {
var len = b64.length;
if (len % 4 > 0) {
throw new Error("Invalid string. Length must be a multiple of
4");
}
// Trim off extra bytes after placeholder bytes are found
// See: https://github.com/beatgammit/base64-js/issues/42
var validLen = b64.indexOf("=");
if (validLen === -1)
validLen = len;
var placeHoldersLen = validLen === len ? 0 : 4 - (validLen % 4);
return [validLen, placeHoldersLen];
}
// base64 is 4/3 + up to two characters of the original data
function byteLength(b64) {
var lens = getLens(b64);
var validLen = lens[0];
var placeHoldersLen = lens[1];
return ((validLen + placeHoldersLen) * 3) / 4 - placeHoldersLen;
}
function toByteArray(b64) {
var tmp;
var lens = getLens(b64);
var validLen = lens[0];
var placeHoldersLen = lens[1];
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
var curByte = 0;
// if there are placeholders, only get up to the last complete 4
chars
var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
var i;
for (i = 0; i < len; i += 4) {
tmp = (revLookup[b64.charCodeAt(i)] << 18) |
(revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6)
| revLookup[b64.charCodeAt(i + 3)];
arr[curByte++] = (tmp >> 16) & 0xff;
arr[curByte++] = (tmp >> 8) & 0xff;
arr[curByte++] = tmp & 0xff;
}
if (placeHoldersLen === 2) {
tmp = (revLookup[b64.charCodeAt(i)] << 2) |
(revLookup[b64.charCodeAt(i + 1)] >> 4);
arr[curByte++] = tmp & 0xff;
}
if (placeHoldersLen === 1) {
tmp = (revLookup[b64.charCodeAt(i)] << 10) |
(revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2);
arr[curByte++] = (tmp >> 8) & 0xff;
arr[curByte++] = tmp & 0xff;
}
return arr;
}
function tripletToBase64(num) {
return (lookup[(num >> 18) & 0x3f] + lookup[(num >> 12) & 0x3f] +
lookup[(num >> 6) & 0x3f] + lookup[num & 0x3f]);
}
function fromByteArray(uint8) {
var tmp;
var len = uint8.length;
var extraBytes = len % 3;
// if we have 1 byte left, pad 2 bytes
var parts = [];
var maxChunkLength = 16383;
// must be multiple of 3
// go through the array every three bytes, we'll deal with trailing
stuff later
for (var i = 0, len2 = len - extraBytes; i < len2; i +=
maxChunkLength) {
parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ?
len2 : i + maxChunkLength));
}
// pad the end with zeros, but make sure to not forget the extra
bytes
if (extraBytes === 1) {
tmp = uint8[len - 1];
parts.push(lookup[tmp >> 2] + lookup[(tmp << 4) & 0x3f] +
"==");
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + uint8[len - 1];
parts.push(lookup[tmp >> 10] + lookup[(tmp >> 4) & 0x3f] +
lookup[(tmp << 2) & 0x3f] + "=");
}
return parts.join("");
}
/***/
},
/***/
"./node_modules/buffer/index.js": /*!
**************************************!*\
!*** ./node_modules/buffer/index.js ***!
\**************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */
(function(global) {
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
/* eslint-disable no-proto */
var base64 = __webpack_require__(/*! base64-js */
"./node_modules/base64-js/index.js");
var ieee754 = __webpack_require__(/*! ieee754 */
"./node_modules/ieee754/index.js");
var isArray = __webpack_require__(/*! isarray */
"./node_modules/buffer/node_modules/isarray/index.js");
exports.Buffer = Buffer;
exports.SlowBuffer = SlowBuffer;
exports.INSPECT_MAX_BYTES = 50;
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari
5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Due to various browser bugs, sometimes the Object implementation will be used
even
* when the browser supports typed arrays.
*
* Note:
*
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array`
instances,
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns
arrays of
* incorrect length in some situations.
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false`
so they
* get the Object implementation, which is slower but behaves correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !==
undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();
/*
* Export kMaxLength after typed array support is determined.
*/
exports.kMaxLength = kMaxLength();
function typedArraySupport() {
try {
var arr = new Uint8Array(1);
arr.__proto__ = {
__proto__: Uint8Array.prototype,
foo: function() {
return 42;
},
};
return (arr.foo() === 42 && // typed array instances can be
augmented
typeof arr.subarray === "function" && // chrome 9-
10 lack `subarray`
arr.subarray(1, 1).byteLength === 0);
// ie10 has broken `subarray`
} catch (e) {
return false;
}
}
function kMaxLength() {
return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
}
function assertSize(size) {
if (typeof size !== "number") {
throw new TypeError('"size" argument must be a number');
} else if (size < 0) {
throw new RangeError('"size" argument must not be
negative');
}
}
function checked(length) {
// Note: cannot use `length < kMaxLength()` here because that
fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError("Attempt to allocate Buffer larger
than maximum " + "size: 0x" + kMaxLength().toString(16) + " bytes");
}
return length | 0;
}
function SlowBuffer(length) {
if (+length != length) {
// eslint-disable-line eqeqeq
length = 0;
}
return Buffer.alloc(+length);
}
Buffer.isBuffer = function isBuffer(b) {
return !!(b != null && b._isBuffer);
}
;
Buffer.compare = function compare(a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
throw new TypeError("Arguments must be Buffers");
}
if (a === b)
return 0;
var x = a.length;
var y = b.length;
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
if (a[i] !== b[i]) {
x = a[i];
y = b[i];
break;
}
}
if (x < y)
return -1;
if (y < x)
return 1;
return 0;
}
;
Buffer.isEncoding = function isEncoding(encoding) {
switch (String(encoding).toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "latin1":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return true;
default:
return false;
}
}
;
Buffer.concat = function concat(list, length) {
if (!isArray(list)) {
throw new TypeError('"list" argument must be an Array of
Buffers');
}
if (list.length === 0) {
return Buffer.alloc(0);
}
var i;
if (length === undefined) {
length = 0;
for (i = 0; i < list.length; ++i) {
length += list[i].length;
}
}
var buffer = Buffer.allocUnsafe(length);
var pos = 0;
for (i = 0; i < list.length; ++i) {
var buf = list[i];
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array
of Buffers');
}
buf.copy(buffer, pos);
pos += buf.length;
}
return buffer;
}
;
function swap(b, n, m) {
var i = b[n];
b[n] = b[m];
b[m] = i;
}
Buffer.prototype.swap16 = function swap16() {
var len = this.length;
if (len % 2 !== 0) {
throw new RangeError("Buffer size must be a multiple of 16-
bits");
}
for (var i = 0; i < len; i += 2) {
swap(this, i, i + 1);
}
return this;
}
;
Buffer.prototype.swap32 = function swap32() {
var len = this.length;
if (len % 4 !== 0) {
throw new RangeError("Buffer size must be a multiple of 32-
bits");
}
for (var i = 0; i < len; i += 4) {
swap(this, i, i + 3);
swap(this, i + 1, i + 2);
}
return this;
}
;
Buffer.prototype.swap64 = function swap64() {
var len = this.length;
if (len % 8 !== 0) {
throw new RangeError("Buffer size must be a multiple of 64-
bits");
}
for (var i = 0; i < len; i += 8) {
swap(this, i, i + 7);
swap(this, i + 1, i + 6);
swap(this, i + 2, i + 5);
swap(this, i + 3, i + 4);
}
return this;
}
;
Buffer.prototype.toString = function toString() {
var length = this.length | 0;
if (length === 0)
return "";
if (arguments.length === 0)
return utf8Slice(this, 0, length);
return slowToString.apply(this, arguments);
}
;
Buffer.prototype.equals = function equals(b) {
if (!Buffer.isBuffer(b))
throw new TypeError("Argument must be a Buffer");
if (this === b)
return true;
return Buffer.compare(this, b) === 0;
}
;
Buffer.prototype.inspect = function inspect() {
var str = "";
var max = exports.INSPECT_MAX_BYTES;
if (this.length > 0) {
str = this.toString("hex", 0, max).match(/.{2}/g).join("
");
if (this.length > max)
str += " ... ";
}
return "<Buffer " + str + ">";
}
;
Buffer.prototype.compare = function compare(target, start, end,
thisStart, thisEnd) {
if (!Buffer.isBuffer(target)) {
throw new TypeError("Argument must be a Buffer");
}
if (start === undefined) {
start = 0;
}
if (end === undefined) {
end = target ? target.length : 0;
}
if (thisStart === undefined) {
thisStart = 0;
}
if (thisEnd === undefined) {
thisEnd = this.length;
}
if (start < 0 || end > target.length || thisStart < 0 ||
thisEnd > this.length) {
throw new RangeError("out of range index");
}
if (thisStart >= thisEnd && start >= end) {
return 0;
}
if (thisStart >= thisEnd) {
return -1;
}
if (start >= end) {
return 1;
}
start >>>= 0;
end >>>= 0;
thisStart >>>= 0;
thisEnd >>>= 0;
if (this === target)
return 0;
var x = thisEnd - thisStart;
var y = end - start;
var len = Math.min(x, y);
var thisCopy = this.slice(thisStart, thisEnd);
var targetCopy = target.slice(start, end);
for (var i = 0; i < len; ++i) {
if (thisCopy[i] !== targetCopy[i]) {
x = thisCopy[i];
y = targetCopy[i];
break;
}
}
if (x < y)
return -1;
if (y < x)
return 1;
return 0;
}
;
// Finds either the first index of `val` in `buffer` at offset >=
`byteOffset`,
// OR the last index of `val` in `buffer` at offset <=
`byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an
int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf(buffer, val, byteOffset, encoding,
dir) {
// Empty buffer means no match
if (buffer.length === 0)
return -1;
// Normalize byteOffset
if (typeof byteOffset === "string") {
encoding = byteOffset;
byteOffset = 0;
} else if (byteOffset > 0x7fffffff) {
byteOffset = 0x7fffffff;
} else if (byteOffset < -0x80000000) {
byteOffset = -0x80000000;
}
byteOffset = +byteOffset;
// Coerce to Number.
if (isNaN(byteOffset)) {
// byteOffset: it it's undefined, null, NaN, "foo", etc,
search whole buffer
byteOffset = dir ? 0 : buffer.length - 1;
}
// Normalize byteOffset: negative offsets start from the end of
the buffer
if (byteOffset < 0)
byteOffset = buffer.length + byteOffset;
if (byteOffset >= buffer.length) {
if (dir)
return -1;
else
byteOffset = buffer.length - 1;
} else if (byteOffset < 0) {
if (dir)
byteOffset = 0;
else
return -1;
}
// Normalize val
if (typeof val === "string") {
val = Buffer.from(val, encoding);
}
// Finally, search either indexOf (if dir is true) or
lastIndexOf
if (Buffer.isBuffer(val)) {
// Special case: looking for empty string/buffer always
fails
if (val.length === 0) {
return -1;
}
return arrayIndexOf(buffer, val, byteOffset, encoding,
dir);
} else if (typeof val === "number") {
val = val & 0xff;
// Search for a byte value [0-255]
if (Buffer.TYPED_ARRAY_SUPPORT && typeof
Uint8Array.prototype.indexOf === "function") {
if (dir) {
return Uint8Array.prototype.indexOf.call(buffer,
val, byteOffset);
} else {
return
Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
}
}
return arrayIndexOf(buffer, [val], byteOffset, encoding,
dir);
}
throw new TypeError("val must be string, number or Buffer");
}
function read(buf, i) {
if (indexSize === 1) {
return buf[i];
} else {
return buf.readUInt16BE(i * indexSize);
}
}
var i;
if (dir) {
var foundIndex = -1;
for (i = byteOffset; i < arrLength; i++) {
if (read(arr, i) === read(val, foundIndex === -1 ? 0 :
i - foundIndex)) {
if (foundIndex === -1)
foundIndex = i;
if (i - foundIndex + 1 === valLength)
return foundIndex * indexSize;
} else {
if (foundIndex !== -1)
i -= i - foundIndex;
foundIndex = -1;
}
}
} else {
if (byteOffset + valLength > arrLength)
byteOffset = arrLength - valLength;
for (i = byteOffset; i >= 0; i--) {
var found = true;
for (var j = 0; j < valLength; j++) {
if (read(arr, i + j) !== read(val, j)) {
found = false;
break;
}
}
if (found)
return i;
}
}
return -1;
}
Buffer.prototype.includes = function includes(val, byteOffset,
encoding) {
return this.indexOf(val, byteOffset, encoding) !== -1;
}
;
Buffer.prototype.indexOf = function indexOf(val, byteOffset,
encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding,
true);
}
;
Buffer.prototype.lastIndexOf = function lastIndexOf(val,
byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding,
false);
}
;
function decodeCodePointsArray(codePoints) {
var len = codePoints.length;
if (len <= MAX_ARGUMENTS_LENGTH) {
return String.fromCharCode.apply(String, codePoints);
// avoid extra slice()
}
// Decode in chunks to avoid "call stack size exceeded".
var res = "";
var i = 0;
while (i < len) {
res += String.fromCharCode.apply(String,
codePoints.slice(i, (i += MAX_ARGUMENTS_LENGTH)));
}
return res;
}
function base64clean(str) {
// Node strips out invalid characters like \n and \t from the
string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, "");
// Node converts strings with length < 2 to ''
if (str.length < 2)
return "";
// Node allows for non-padded base64 strings (missing trailing
===), base64-js does not
while (str.length % 4 !== 0) {
str = str + "=";
}
return str;
}
function stringtrim(str) {
if (str.trim)
return str.trim();
return str.replace(/^\s+|\s+$/g, "");
}
function toHex(n) {
if (n < 16)
return "0" + n.toString(16);
return n.toString(16);
}
function asciiToBytes(str) {
var byteArray = [];
for (var i = 0; i < str.length; ++i) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xff);
}
return byteArray;
}
function base64ToBytes(str) {
return base64.toByteArray(base64clean(str));
}
function isnan(val) {
return val !== val;
// eslint-disable-line no-self-compare
}
/* WEBPACK VAR INJECTION */
}
).call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */
"./node_modules/webpack/buildin/global.js"));
/***/
},
/***/
"./node_modules/buffer/node_modules/isarray/index.js": /*!
***********************************************************!*\
!*** ./node_modules/buffer/node_modules/isarray/index.js ***!
\***********************************************************/
/*! no static exports found */
/***/
function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function(arr) {
return toString.call(arr) == "[object Array]";
}
;
/***/
},
/***/
"./node_modules/charenc/charenc.js": /*!
*****************************************!*\
!*** ./node_modules/charenc/charenc.js ***!
\*****************************************/
/*! no static exports found */
/***/
function(module, exports) {
var charenc = {
// UTF-8 encoding
utf8: {
// Convert a string to a byte array
stringToBytes: function(str) {
return
charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
},
// Convert a byte array to a string
bytesToString: function(bytes) {
return
decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
},
},
// Binary encoding
bin: {
// Convert a string to a byte array
stringToBytes: function(str) {
for (var bytes = [], i = 0; i < str.length; i++)
bytes.push(str.charCodeAt(i) & 0xff);
return bytes;
},
// Convert a byte array to a string
bytesToString: function(bytes) {
for (var str = [], i = 0; i < bytes.length; i++)
str.push(String.fromCharCode(bytes[i]));
return str.join("");
},
},
};
module.exports = charenc;
/***/
},
/***/
"./node_modules/crypt/crypt.js": /*!*************************************!
*\
!*** ./node_modules/crypt/crypt.js ***!
\*************************************/
/*! no static exports found */
/***/
function(module, exports) {
(function() {
var base64map =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
, crypt = {
// Bit-wise rotation left
rotl: function(n, b) {
return (n << b) | (n >>> (32 - b));
},
// Bit-wise rotation right
rotr: function(n, b) {
return (n << (32 - b)) | (n >>> b);
},
// Swap big-endian to little-endian and vice versa
endian: function(n) {
// If number given, swap endian
if (n.constructor == Number) {
return ((crypt.rotl(n, 8) & 0x00ff00ff) |
(crypt.rotl(n, 24) & 0xff00ff00));
}
// Else, assume array and swap all items
for (var i = 0; i < n.length; i++)
n[i] = crypt.endian(n[i]);
return n;
},
// Generate an array of any length of random bytes
randomBytes: function(n) {
for (var bytes = []; n > 0; n--)
bytes.push(Math.floor(Math.random() * 256));
return bytes;
},
// Convert a byte array to big-endian 32-bit words
bytesToWords: function(bytes) {
for (var words = [], i = 0, b = 0; i < bytes.length; i++,
b += 8)
words[b >>> 5] |= bytes[i] << (24 - (b % 32));
return words;
},
// Convert big-endian 32-bit words to a byte array
wordsToBytes: function(words) {
for (var bytes = [], b = 0; b < words.length * 32; b += 8)
bytes.push((words[b >>> 5] >>> (24 - (b % 32))) &
0xff);
return bytes;
},
// Convert a byte array to a hex string
bytesToHex: function(bytes) {
for (var hex = [], i = 0; i < bytes.length; i++) {
hex.push((bytes[i] >>> 4).toString(16));
hex.push((bytes[i] & 0xf).toString(16));
}
return hex.join("");
},
// Convert a hex string to a byte array
hexToBytes: function(hex) {
for (var bytes = [], c = 0; c < hex.length; c += 2)
bytes.push(parseInt(hex.substr(c, 2), 16));
return bytes;
},
// Convert a byte array to a base-64 string
bytesToBase64: function(bytes) {
for (var base64 = [], i = 0; i < bytes.length; i += 3) {
var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) |
bytes[i + 2];
for (var j = 0; j < 4; j++)
if (i * 8 + j * 6 <= bytes.length * 8)
base64.push(base64map.charAt((triplet >>> (6 *
(3 - j))) & 0x3f));
else
base64.push("=");
}
return base64.join("");
},
// Convert a base-64 string to a byte array
base64ToBytes: function(base64) {
// Remove non-base-64 characters
base64 = base64.replace(/[^A-Z0-9+\/]/gi, "");
for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
imod4 = ++i % 4) {
if (imod4 == 0)
continue;
bytes.push(((base64map.indexOf(base64.charAt(i - 1)) &
(Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2)) |
(base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
}
return bytes;
},
};
module.exports = crypt;
}
)();
/***/
},
/***/
"./node_modules/event-lite/event-lite.js": /*!
***********************************************!*\
!*** ./node_modules/event-lite/event-lite.js ***!
\***********************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
/**
* event-lite.js - Light-weight EventEmitter (less than 1KB when
gzipped)
*
* @copyright Yusuke Kawasaki
* @license MIT
* @constructor
* @see https://github.com/kawanet/event-lite
* @see http://kawanet.github.io/event-lite/EventLite.html
* @example
* var EventLite = require("event-lite");
*
* function MyClass() {...} // your class
*
* EventLite.mixin(MyClass.prototype); // import event methods
*
* var obj = new MyClass();
* obj.on("foo", function() {...}); // add event listener
* obj.once("bar", function() {...}); // add one-time event
listener
* obj.emit("foo"); // dispatch event
* obj.emit("bar"); // dispatch another event
* obj.off("foo"); // remove event listener
*/
function EventLite() {
if (!(this instanceof EventLite))
return new EventLite();
}
(function(EventLite) {
// export the class for node.js
if (true)
module.exports = EventLite;
// property name to hold listeners
var LISTENERS = "listeners";
// methods to export
var methods = {
on: on,
once: once,
off: off,
emit: emit,
};
// mixin to self
mixin(EventLite.prototype);
// export mixin function
EventLite.mixin = mixin;
/**
* Import on(), once(), off() and emit() methods into target
object.
*
* @function EventLite.mixin
* @param target {Prototype}
*/
function mixin(target) {
for (var key in methods) {
target[key] = methods[key];
}
return target;
}
/**
* Add an event listener.
*
* @function EventLite.prototype.on
* @param type {string}
* @param func {Function}
* @returns {EventLite} Self for method chaining
*/
function on(type, func) {
getListeners(this, type).push(func);
return this;
}
/**
* Add one-time event listener.
*
* @function EventLite.prototype.once
* @param type {string}
* @param func {Function}
* @returns {EventLite} Self for method chaining
*/
function once(type, func) {
var that = this;
wrap.originalListener = func;
getListeners(that, type).push(wrap);
return that;
function wrap() {
off.call(that, type, wrap);
func.apply(this, arguments);
}
}
/**
* Remove an event listener.
*
* @function EventLite.prototype.off
* @param [type] {string}
* @param [func] {Function}
* @returns {EventLite} Self for method chaining
*/
function off(type, func) {
var that = this;
var listners;
if (!arguments.length) {
delete that[LISTENERS];
} else if (!func) {
listners = that[LISTENERS];
if (listners) {
delete listners[type];
if (!Object.keys(listners).length)
return off.call(that);
}
} else {
listners = getListeners(that, type, true);
if (listners) {
listners = listners.filter(ne);
if (!listners.length)
return off.call(that, type);
that[LISTENERS][type] = listners;
}
}
return that;
function ne(test) {
return test !== func && test.originalListener !== func;
}
}
/**
* Dispatch (trigger) an event.
*
* @function EventLite.prototype.emit
* @param type {string}
* @param [value] {*}
* @returns {boolean} True when a listener received the event
*/
function emit(type, value) {
var that = this;
var listeners = getListeners(that, type, true);
if (!listeners)
return false;
var arglen = arguments.length;
if (arglen === 1) {
listeners.forEach(zeroarg);
} else if (arglen === 2) {
listeners.forEach(onearg);
} else {
var args = Array.prototype.slice.call(arguments, 1);
listeners.forEach(moreargs);
}
return !!listeners.length;
function zeroarg(func) {
func.call(that);
}
function onearg(func) {
func.call(that, value);
}
function moreargs(func) {
func.apply(that, args);
}
}
/**
* @ignore
*/
function getListeners(that, type, readonly) {
if (readonly && !that[LISTENERS])
return;
var listeners = that[LISTENERS] || (that[LISTENERS] = {});
return listeners[type] || (listeners[type] = []);
}
}
)(EventLite);
/***/
},
/***/
"./node_modules/ieee754/index.js": /*!
***************************************!*\
!*** ./node_modules/ieee754/index.js ***!
\***************************************/
/*! no static exports found */
/***/
function(module, exports) {
exports.read = function(buffer, offset, isLE, mLen, nBytes) {
var e, m;
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var nBits = -7;
var i = isLE ? nBytes - 1 : 0;
var d = isLE ? -1 : 1;
var s = buffer[offset + i];
i += d;
e = s & ((1 << -nBits) - 1);
s >>= -nBits;
nBits += eLen;
for (; nBits > 0; e = e * 256 + buffer[offset + i],
i += d,
nBits -= 8) {}
m = e & ((1 << -nBits) - 1);
e >>= -nBits;
nBits += mLen;
for (; nBits > 0; m = m * 256 + buffer[offset + i],
i += d,
nBits -= 8) {}
if (e === 0) {
e = 1 - eBias;
} else if (e === eMax) {
return m ? NaN : (s ? -1 : 1) * Infinity;
} else {
m = m + Math.pow(2, mLen);
e = e - eBias;
}
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
}
;
exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c;
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
var i = isLE ? 0 : nBytes - 1;
var d = isLE ? 1 : -1;
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
value = Math.abs(value);
if (isNaN(value) || value === Infinity) {
m = isNaN(value) ? 1 : 0;
e = eMax;
} else {
e = Math.floor(Math.log(value) / Math.LN2);
if (value * (c = Math.pow(2, -e)) < 1) {
e--;
c *= 2;
}
if (e + eBias >= 1) {
value += rt / c;
} else {
value += rt * Math.pow(2, 1 - eBias);
}
if (value * c >= 2) {
e++;
c /= 2;
}
if (e + eBias >= eMax) {
m = 0;
e = eMax;
} else if (e + eBias >= 1) {
m = (value * c - 1) * Math.pow(2, mLen);
e = e + eBias;
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
e = 0;
}
}
for (; mLen >= 8; buffer[offset + i] = m & 0xff,
i += d,
m /= 256,
mLen -= 8) {}
e = (e << mLen) | m;
eLen += mLen;
for (; eLen > 0; buffer[offset + i] = e & 0xff,
i += d,
e /= 256,
eLen -= 8) {}
buffer[offset + i - d] |= s * 128;
}
;
/***/
},
/***/
"./node_modules/int64-buffer/int64-buffer.js": /*!
***************************************************!*\
!*** ./node_modules/int64-buffer/int64-buffer.js ***!
\***************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */
(function(Buffer) {
// int64-buffer.js
/*jshint -W018 */
// Confusing use of '!'.
/*jshint -W030 */
// Expected an assignment or function call and instead saw an
expression.
/*jshint -W093 */
// Did you mean to return a conditional instead of an assignment?
var Uint64BE, Int64BE, Uint64LE, Int64LE;
!(function(exports) {
// constants
var UNDEFINED = "undefined";
var BUFFER = UNDEFINED !== typeof Buffer && Buffer;
var UINT8ARRAY = UNDEFINED !== typeof Uint8Array && Uint8Array;
var ARRAYBUFFER = UNDEFINED !== typeof ArrayBuffer &&
ArrayBuffer;
var ZERO = [0, 0, 0, 0, 0, 0, 0, 0];
var isArray = Array.isArray || _isArray;
var BIT32 = 4294967296;
var BIT24 = 16777216;
// storage class
var storage;
// Array;
// generate classes
Uint64BE = factory("Uint64BE", true, true);
Int64BE = factory("Int64BE", true, false);
Uint64LE = factory("Uint64LE", false, true);
Int64LE = factory("Int64LE", false, false);
// class factory
function factory(name, bigendian, unsigned) {
var posH = bigendian ? 0 : 4;
var posL = bigendian ? 4 : 0;
var pos0 = bigendian ? 0 : 3;
var pos1 = bigendian ? 1 : 2;
var pos2 = bigendian ? 2 : 1;
var pos3 = bigendian ? 3 : 0;
var fromPositive = bigendian ? fromPositiveBE :
fromPositiveLE;
var fromNegative = bigendian ? fromNegativeBE :
fromNegativeLE;
var proto = Int64.prototype;
var isName = "is" + name;
var _isInt64 = "_" + isName;
// properties
proto.buffer = void 0;
proto.offset = 0;
proto[_isInt64] = true;
// methods
proto.toNumber = toNumber;
proto.toString = toString;
proto.toJSON = toNumber;
proto.toArray = toArray;
// add .toBuffer() method only when Buffer available
if (BUFFER)
proto.toBuffer = toBuffer;
// add .toArrayBuffer() method only when Uint8Array
available
if (UINT8ARRAY)
proto.toArrayBuffer = toArrayBuffer;
// isUint64BE, isInt64BE
Int64[isName] = isInt64;
// CommonJS
exports[name] = Int64;
return Int64;
// constructor
function Int64(buffer, offset, value, raddix) {
if (!(this instanceof Int64))
return new Int64(buffer,offset,value,raddix);
return init(this, buffer, offset, value, raddix);
}
// isUint64BE, isInt64BE
function isInt64(b) {
return !!(b && b[_isInt64]);
}
// initializer
function init(that, buffer, offset, value, raddix) {
if (UINT8ARRAY && ARRAYBUFFER) {
if (buffer instanceof ARRAYBUFFER)
buffer = new UINT8ARRAY(buffer);
if (value instanceof ARRAYBUFFER)
value = new UINT8ARRAY(value);
}
// Int64BE() style
if (!buffer && !offset && !value && !storage) {
// shortcut to initialize with zero
that.buffer = newArray(ZERO, 0);
return;
}
// Int64BE(value, raddix) style
if (!isValidBuffer(buffer, offset)) {
var _storage = storage || Array;
raddix = offset;
value = buffer;
offset = 0;
buffer = new _storage(8);
}
that.buffer = buffer;
that.offset = offset |= 0;
// Int64BE(buffer, offset) style
if (UNDEFINED === typeof value)
return;
// Int64BE(buffer, offset, value, raddix) style
if ("string" === typeof value) {
fromString(buffer, offset, value, raddix || 10);
} else if (isValidBuffer(value, raddix)) {
fromArray(buffer, offset, value, raddix);
} else if ("number" === typeof raddix) {
writeInt32(buffer, offset + posH, value);
// high
writeInt32(buffer, offset + posL, raddix);
// low
} else if (value > 0) {
fromPositive(buffer, offset, value);
// positive
} else if (value < 0) {
fromNegative(buffer, offset, value);
// negative
} else {
fromArray(buffer, offset, ZERO, 0);
// zero, NaN and others
}
}
function toNumber() {
var buffer = this.buffer;
var offset = this.offset;
var high = readInt32(buffer, offset + posH);
var low = readInt32(buffer, offset + posL);
if (!unsigned)
high |= 0;
// a trick to get signed
return high ? high * BIT32 + low : low;
}
function toString(radix) {
var buffer = this.buffer;
var offset = this.offset;
var high = readInt32(buffer, offset + posH);
var low = readInt32(buffer, offset + posL);
var str = "";
var sign = !unsigned && high & 0x80000000;
if (sign) {
high = ~high;
low = BIT32 - low;
}
radix = radix || 10;
while (1) {
var mod = (high % radix) * BIT32 + low;
high = Math.floor(high / radix);
low = Math.floor(mod / radix);
str = (mod % radix).toString(radix) + str;
if (!high && !low)
break;
}
if (sign) {
str = "-" + str;
}
return str;
}
function toArray(raw) {
var buffer = this.buffer;
var offset = this.offset;
storage = null;
// Array
if (raw !== false && offset === 0 && buffer.length === 8 &&
isArray(buffer))
return buffer;
return newArray(buffer, offset);
}
function toBuffer(raw) {
var buffer = this.buffer;
var offset = this.offset;
storage = BUFFER;
if (raw !== false && offset === 0 && buffer.length === 8 &&
Buffer.isBuffer(buffer))
return buffer;
var dest = new BUFFER(8);
fromArray(dest, 0, buffer, offset);
return dest;
}
function toArrayBuffer(raw) {
var buffer = this.buffer;
var offset = this.offset;
var arrbuf = buffer.buffer;
storage = UINT8ARRAY;
if (raw !== false && offset === 0 && arrbuf instanceof
ARRAYBUFFER && arrbuf.byteLength === 8)
return arrbuf;
var dest = new UINT8ARRAY(8);
fromArray(dest, 0, buffer, offset);
return dest.buffer;
}
function isBuffer(obj) {
return (!!obj.constructor && typeof obj.constructor.isBuffer ===
"function" && obj.constructor.isBuffer(obj));
}
// For Node v0.10 support. Remove this eventually.
function isSlowBuffer(obj) {
return (typeof obj.readFloatLE === "function" && typeof obj.slice
=== "function" && isBuffer(obj.slice(0, 0)));
}
/***/
},
/***/
"./node_modules/md5/md5.js": /*!*********************************!*\
!*** ./node_modules/md5/md5.js ***!
\*********************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
(function() {
var crypt = __webpack_require__(/*! crypt */
"./node_modules/crypt/crypt.js")
, utf8 = __webpack_require__(/*! charenc */
"./node_modules/charenc/charenc.js").utf8
, isBuffer = __webpack_require__(/*! is-buffer */
"./node_modules/is-buffer/index.js")
, bin = __webpack_require__(/*! charenc */
"./node_modules/charenc/charenc.js").bin
, // The core
md5 = function(message, options) {
// Convert to byte array
if (message.constructor == String)
if (options && options.encoding === "binary")
message = bin.stringToBytes(message);
else
message = utf8.stringToBytes(message);
else if (isBuffer(message))
message = Array.prototype.slice.call(message, 0);
else if (!Array.isArray(message))
message = message.toString();
// else, assume byte array already
var m = crypt.bytesToWords(message)
, l = message.length * 8
, a = 1732584193
, b = -271733879
, c = -1732584194
, d = 271733878;
// Swap endian
for (var i = 0; i < m.length; i++) {
m[i] = (((m[i] << 8) | (m[i] >>> 24)) & 0x00ff00ff) |
(((m[i] << 24) | (m[i] >>> 8)) & 0xff00ff00);
}
// Padding
m[l >>> 5] |= 0x80 << l % 32;
m[(((l + 64) >>> 9) << 4) + 14] = l;
// Method shortcuts
var FF = md5._ff
, GG = md5._gg
, HH = md5._hh
, II = md5._ii;
for (var i = 0; i < m.length; i += 16) {
var aa = a
, bb = b
, cc = c
, dd = d;
a = FF(a, b, c, d, m[i + 0], 7, -680876936);
d = FF(d, a, b, c, m[i + 1], 12, -389564586);
c = FF(c, d, a, b, m[i + 2], 17, 606105819);
b = FF(b, c, d, a, m[i + 3], 22, -1044525330);
a = FF(a, b, c, d, m[i + 4], 7, -176418897);
d = FF(d, a, b, c, m[i + 5], 12, 1200080426);
c = FF(c, d, a, b, m[i + 6], 17, -1473231341);
b = FF(b, c, d, a, m[i + 7], 22, -45705983);
a = FF(a, b, c, d, m[i + 8], 7, 1770035416);
d = FF(d, a, b, c, m[i + 9], 12, -1958414417);
c = FF(c, d, a, b, m[i + 10], 17, -42063);
b = FF(b, c, d, a, m[i + 11], 22, -1990404162);
a = FF(a, b, c, d, m[i + 12], 7, 1804603682);
d = FF(d, a, b, c, m[i + 13], 12, -40341101);
c = FF(c, d, a, b, m[i + 14], 17, -1502002290);
b = FF(b, c, d, a, m[i + 15], 22, 1236535329);
a = GG(a, b, c, d, m[i + 1], 5, -165796510);
d = GG(d, a, b, c, m[i + 6], 9, -1069501632);
c = GG(c, d, a, b, m[i + 11], 14, 643717713);
b = GG(b, c, d, a, m[i + 0], 20, -373897302);
a = GG(a, b, c, d, m[i + 5], 5, -701558691);
d = GG(d, a, b, c, m[i + 10], 9, 38016083);
c = GG(c, d, a, b, m[i + 15], 14, -660478335);
b = GG(b, c, d, a, m[i + 4], 20, -405537848);
a = GG(a, b, c, d, m[i + 9], 5, 568446438);
d = GG(d, a, b, c, m[i + 14], 9, -1019803690);
c = GG(c, d, a, b, m[i + 3], 14, -187363961);
b = GG(b, c, d, a, m[i + 8], 20, 1163531501);
a = GG(a, b, c, d, m[i + 13], 5, -1444681467);
d = GG(d, a, b, c, m[i + 2], 9, -51403784);
c = GG(c, d, a, b, m[i + 7], 14, 1735328473);
b = GG(b, c, d, a, m[i + 12], 20, -1926607734);
a = HH(a, b, c, d, m[i + 5], 4, -378558);
d = HH(d, a, b, c, m[i + 8], 11, -2022574463);
c = HH(c, d, a, b, m[i + 11], 16, 1839030562);
b = HH(b, c, d, a, m[i + 14], 23, -35309556);
a = HH(a, b, c, d, m[i + 1], 4, -1530992060);
d = HH(d, a, b, c, m[i + 4], 11, 1272893353);
c = HH(c, d, a, b, m[i + 7], 16, -155497632);
b = HH(b, c, d, a, m[i + 10], 23, -1094730640);
a = HH(a, b, c, d, m[i + 13], 4, 681279174);
d = HH(d, a, b, c, m[i + 0], 11, -358537222);
c = HH(c, d, a, b, m[i + 3], 16, -722521979);
b = HH(b, c, d, a, m[i + 6], 23, 76029189);
a = HH(a, b, c, d, m[i + 9], 4, -640364487);
d = HH(d, a, b, c, m[i + 12], 11, -421815835);
c = HH(c, d, a, b, m[i + 15], 16, 530742520);
b = HH(b, c, d, a, m[i + 2], 23, -995338651);
a = II(a, b, c, d, m[i + 0], 6, -198630844);
d = II(d, a, b, c, m[i + 7], 10, 1126891415);
c = II(c, d, a, b, m[i + 14], 15, -1416354905);
b = II(b, c, d, a, m[i + 5], 21, -57434055);
a = II(a, b, c, d, m[i + 12], 6, 1700485571);
d = II(d, a, b, c, m[i + 3], 10, -1894986606);
c = II(c, d, a, b, m[i + 10], 15, -1051523);
b = II(b, c, d, a, m[i + 1], 21, -2054922799);
a = II(a, b, c, d, m[i + 8], 6, 1873313359);
d = II(d, a, b, c, m[i + 15], 10, -30611744);
c = II(c, d, a, b, m[i + 6], 15, -1560198380);
b = II(b, c, d, a, m[i + 13], 21, 1309151649);
a = II(a, b, c, d, m[i + 4], 6, -145523070);
d = II(d, a, b, c, m[i + 11], 10, -1120210379);
c = II(c, d, a, b, m[i + 2], 15, 718787259);
b = II(b, c, d, a, m[i + 9], 21, -343485551);
a = (a + aa) >>> 0;
b = (b + bb) >>> 0;
c = (c + cc) >>> 0;
d = (d + dd) >>> 0;
}
return crypt.endian([a, b, c, d]);
};
// Auxiliary functions
md5._ff = function(a, b, c, d, x, s, t) {
var n = a + ((b & c) | (~b & d)) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
;
md5._gg = function(a, b, c, d, x, s, t) {
var n = a + ((b & d) | (c & ~d)) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
;
md5._hh = function(a, b, c, d, x, s, t) {
var n = a + (b ^ c ^ d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
;
md5._ii = function(a, b, c, d, x, s, t) {
var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
;
// Package private blocksize
md5._blocksize = 16;
md5._digestsize = 16;
module.exports = function(message, options) {
if (message === undefined || message === null)
throw new Error("Illegal argument " + message);
var digestbytes = crypt.wordsToBytes(md5(message, options));
return options && options.asBytes ? digestbytes : options &&
options.asString ? bin.bytesToString(digestbytes) : crypt.bytesToHex(digestbytes);
}
;
}
)();
/***/
},
/***/
"./node_modules/msgpack-lite/lib/browser.js": /*!
**************************************************!*\
!*** ./node_modules/msgpack-lite/lib/browser.js ***!
\**************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// browser.js
exports.encode = __webpack_require__(/*! ./encode */
"./node_modules/msgpack-lite/lib/encode.js").encode;
exports.decode = __webpack_require__(/*! ./decode */
"./node_modules/msgpack-lite/lib/decode.js").decode;
exports.Encoder = __webpack_require__(/*! ./encoder */
"./node_modules/msgpack-lite/lib/encoder.js").Encoder;
exports.Decoder = __webpack_require__(/*! ./decoder */
"./node_modules/msgpack-lite/lib/decoder.js").Decoder;
exports.createCodec = __webpack_require__(/*! ./ext */
"./node_modules/msgpack-lite/lib/ext.js").createCodec;
exports.codec = __webpack_require__(/*! ./codec */
"./node_modules/msgpack-lite/lib/codec.js").codec;
/***/
},
/***/
"./node_modules/msgpack-lite/lib/buffer-global.js": /*!
********************************************************!*\
!*** ./node_modules/msgpack-lite/lib/buffer-global.js ***!
\********************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */
(function(Buffer) {
/* globals Buffer */
module.exports = c("undefined" !== typeof Buffer && Buffer) ||
c(this.Buffer) || c("undefined" !== typeof window && window.Buffer) || this.Buffer;
function c(B) {
return B && B.isBuffer && B;
}
/* WEBPACK VAR INJECTION */
}
).call(this, __webpack_require__(/*! ./../../buffer/index.js */
"./node_modules/buffer/index.js").Buffer);
/***/
},
/***/
"./node_modules/msgpack-lite/lib/buffer-lite.js": /*!
******************************************************!*\
!*** ./node_modules/msgpack-lite/lib/buffer-lite.js ***!
\******************************************************/
/*! no static exports found */
/***/
function(module, exports) {
// buffer-lite.js
var MAXBUFLEN = 8192;
exports.copy = copy;
exports.toString = toString;
exports.write = write;
/**
* Buffer.prototype.write()
*
* @param string {String}
* @param [offset] {Number}
* @returns {Number}
*/
function write(string, offset) {
var buffer = this;
var index = offset || (offset |= 0);
var length = string.length;
var chr = 0;
var i = 0;
while (i < length) {
chr = string.charCodeAt(i++);
if (chr < 128) {
buffer[index++] = chr;
} else if (chr < 0x800) {
// 2 bytes
buffer[index++] = 0xc0 | (chr >>> 6);
buffer[index++] = 0x80 | (chr & 0x3f);
} else if (chr < 0xd800 || chr > 0xdfff) {
// 3 bytes
buffer[index++] = 0xe0 | (chr >>> 12);
buffer[index++] = 0x80 | ((chr >>> 6) & 0x3f);
buffer[index++] = 0x80 | (chr & 0x3f);
} else {
// 4 bytes - surrogate pair
chr = (((chr - 0xd800) << 10) | (string.charCodeAt(i++) -
0xdc00)) + 0x10000;
buffer[index++] = 0xf0 | (chr >>> 18);
buffer[index++] = 0x80 | ((chr >>> 12) & 0x3f);
buffer[index++] = 0x80 | ((chr >>> 6) & 0x3f);
buffer[index++] = 0x80 | (chr & 0x3f);
}
}
return index - offset;
}
/**
* Buffer.prototype.toString()
*
* @param [encoding] {String} ignored
* @param [start] {Number}
* @param [end] {Number}
* @returns {String}
*/
function toString(encoding, start, end) {
var buffer = this;
var index = start | 0;
if (!end)
end = buffer.length;
var string = "";
var chr = 0;
while (index < end) {
chr = buffer[index++];
if (chr < 128) {
string += String.fromCharCode(chr);
continue;
}
if ((chr & 0xe0) === 0xc0) {
// 2 bytes
chr = ((chr & 0x1f) << 6) | (buffer[index++] & 0x3f);
} else if ((chr & 0xf0) === 0xe0) {
// 3 bytes
chr = ((chr & 0x0f) << 12) | ((buffer[index++] & 0x3f) <<
6) | (buffer[index++] & 0x3f);
} else if ((chr & 0xf8) === 0xf0) {
// 4 bytes
chr = ((chr & 0x07) << 18) | ((buffer[index++] & 0x3f) <<
12) | ((buffer[index++] & 0x3f) << 6) | (buffer[index++] & 0x3f);
}
if (chr >= 0x010000) {
// A surrogate pair
chr -= 0x010000;
string += String.fromCharCode((chr >>> 10) + 0xd800, (chr &
0x3ff) + 0xdc00);
} else {
string += String.fromCharCode(chr);
}
}
return string;
}
/**
* Buffer.prototype.copy()
*
* @param target {Buffer}
* @param [targetStart] {Number}
* @param [start] {Number}
* @param [end] {Number}
* @returns {number}
*/
function copy(target, targetStart, start, end) {
var i;
if (!start)
start = 0;
if (!end && end !== 0)
end = this.length;
if (!targetStart)
targetStart = 0;
var len = end - start;
if (target === this && start < targetStart && targetStart < end) {
// descending
for (i = len - 1; i >= 0; i--) {
target[i + targetStart] = this[i + start];
}
} else {
// ascending
for (i = 0; i < len; i++) {
target[i + targetStart] = this[i + start];
}
}
return len;
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/bufferish-array.js": /*!
**********************************************************!*\
!*** ./node_modules/msgpack-lite/lib/bufferish-array.js ***!
\**********************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// bufferish-array.js
var Bufferish = __webpack_require__(/*! ./bufferish */
"./node_modules/msgpack-lite/lib/bufferish.js");
var exports = (module.exports = alloc(0));
exports.alloc = alloc;
exports.concat = Bufferish.concat;
exports.from = from;
/**
* @param size {Number}
* @returns {Buffer|Uint8Array|Array}
*/
function alloc(size) {
return new Array(size);
}
/**
* @param value {Array|ArrayBuffer|Buffer|String}
* @returns {Array}
*/
function from(value) {
if (!Bufferish.isBuffer(value) && Bufferish.isView(value)) {
// TypedArray to Uint8Array
value = Bufferish.Uint8Array.from(value);
} else if (Bufferish.isArrayBuffer(value)) {
// ArrayBuffer to Uint8Array
value = new Uint8Array(value);
} else if (typeof value === "string") {
// String to Array
return Bufferish.from.call(exports, value);
} else if (typeof value === "number") {
throw new TypeError('"value" argument must not be a number');
}
// Array-like to Array
return Array.prototype.slice.call(value);
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/bufferish-buffer.js": /*!
***********************************************************!*\
!*** ./node_modules/msgpack-lite/lib/bufferish-buffer.js ***!
\***********************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// bufferish-buffer.js
var Bufferish = __webpack_require__(/*! ./bufferish */
"./node_modules/msgpack-lite/lib/bufferish.js");
var Buffer = Bufferish.global;
var exports = (module.exports = Bufferish.hasBuffer ? alloc(0) : []);
exports.alloc = (Bufferish.hasBuffer && Buffer.alloc) || alloc;
exports.concat = Bufferish.concat;
exports.from = from;
/**
* @param size {Number}
* @returns {Buffer|Uint8Array|Array}
*/
function alloc(size) {
return new Buffer(size);
}
/**
* @param value {Array|ArrayBuffer|Buffer|String}
* @returns {Buffer}
*/
function from(value) {
if (!Bufferish.isBuffer(value) && Bufferish.isView(value)) {
// TypedArray to Uint8Array
value = Bufferish.Uint8Array.from(value);
} else if (Bufferish.isArrayBuffer(value)) {
// ArrayBuffer to Uint8Array
value = new Uint8Array(value);
} else if (typeof value === "string") {
// String to Buffer
return Bufferish.from.call(exports, value);
} else if (typeof value === "number") {
throw new TypeError('"value" argument must not be a number');
}
// Array-like to Buffer
if (Buffer.from && Buffer.from.length !== 1) {
return Buffer.from(value);
// node v6+
} else {
return new Buffer(value);
// node v4
}
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/bufferish-proto.js": /*!
**********************************************************!*\
!*** ./node_modules/msgpack-lite/lib/bufferish-proto.js ***!
\**********************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// bufferish-proto.js
/* jshint eqnull:true */
var BufferLite = __webpack_require__(/*! ./buffer-lite */
"./node_modules/msgpack-lite/lib/buffer-lite.js");
exports.copy = copy;
exports.slice = slice;
exports.toString = toString;
exports.write = gen("write");
var Bufferish = __webpack_require__(/*! ./bufferish */
"./node_modules/msgpack-lite/lib/bufferish.js");
var Buffer = Bufferish.global;
var isBufferShim = Bufferish.hasBuffer && "TYPED_ARRAY_SUPPORT"in
Buffer;
var brokenTypedArray = isBufferShim && !Buffer.TYPED_ARRAY_SUPPORT;
/**
* @param target {Buffer|Uint8Array|Array}
* @param [targetStart] {Number}
* @param [start] {Number}
* @param [end] {Number}
* @returns {Buffer|Uint8Array|Array}
*/
function copy(target, targetStart, start, end) {
var thisIsBuffer = Bufferish.isBuffer(this);
var targetIsBuffer = Bufferish.isBuffer(target);
if (thisIsBuffer && targetIsBuffer) {
// Buffer to Buffer
return this.copy(target, targetStart, start, end);
} else if (!brokenTypedArray && !thisIsBuffer && !targetIsBuffer &&
Bufferish.isView(this) && Bufferish.isView(target)) {
// Uint8Array to Uint8Array (except for minor some browsers)
var buffer = start || end != null ? slice.call(this, start,
end) : this;
target.set(buffer, targetStart);
return buffer.length;
} else {
// other cases
return BufferLite.copy.call(this, target, targetStart, start,
end);
}
}
/**
* @param [start] {Number}
* @param [end] {Number}
* @returns {Buffer|Uint8Array|Array}
*/
function slice(start, end) {
// for Buffer, Uint8Array (except for minor some browsers) and
Array
var f = this.slice || (!brokenTypedArray && this.subarray);
if (f)
return f.call(this, start, end);
// Uint8Array (for minor some browsers)
var target = Bufferish.alloc.call(this, end - start);
copy.call(this, target, 0, start, end);
return target;
}
/**
* Buffer.prototype.toString()
*
* @param [encoding] {String} ignored
* @param [start] {Number}
* @param [end] {Number}
* @returns {String}
*/
function toString(encoding, start, end) {
var f = !isBufferShim && Bufferish.isBuffer(this) ? this.toString :
BufferLite.toString;
return f.apply(this, arguments);
}
/**
* @private
*/
function gen(method) {
return wrap;
function wrap() {
var f = this[method] || BufferLite[method];
return f.apply(this, arguments);
}
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/bufferish-uint8array.js": /*!
***************************************************************!*\
!*** ./node_modules/msgpack-lite/lib/bufferish-uint8array.js ***!
\***************************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// bufferish-uint8array.js
var Bufferish = __webpack_require__(/*! ./bufferish */
"./node_modules/msgpack-lite/lib/bufferish.js");
var exports = (module.exports = Bufferish.hasArrayBuffer ? alloc(0) :
[]);
exports.alloc = alloc;
exports.concat = Bufferish.concat;
exports.from = from;
/**
* @param size {Number}
* @returns {Buffer|Uint8Array|Array}
*/
function alloc(size) {
return new Uint8Array(size);
}
/**
* @param value {Array|ArrayBuffer|Buffer|String}
* @returns {Uint8Array}
*/
function from(value) {
if (Bufferish.isView(value)) {
// TypedArray to ArrayBuffer
var byteOffset = value.byteOffset;
var byteLength = value.byteLength;
value = value.buffer;
if (value.byteLength !== byteLength) {
if (value.slice) {
value = value.slice(byteOffset, byteOffset +
byteLength);
} else {
// Android 4.1 does not have
ArrayBuffer.prototype.slice
value = new Uint8Array(value);
if (value.byteLength !== byteLength) {
// TypedArray to ArrayBuffer to Uint8Array to Array
value = Array.prototype.slice.call(value,
byteOffset, byteOffset + byteLength);
}
}
}
} else if (typeof value === "string") {
// String to Uint8Array
return Bufferish.from.call(exports, value);
} else if (typeof value === "number") {
throw new TypeError('"value" argument must not be a number');
}
return new Uint8Array(value);
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/bufferish.js": /*!
****************************************************!*\
!*** ./node_modules/msgpack-lite/lib/bufferish.js ***!
\****************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// bufferish.js
var Buffer = (exports.global = __webpack_require__(/*! ./buffer-global
*/
"./node_modules/msgpack-lite/lib/buffer-global.js"));
var hasBuffer = (exports.hasBuffer = Buffer && !!Buffer.isBuffer);
var hasArrayBuffer = (exports.hasArrayBuffer = "undefined" !== typeof
ArrayBuffer);
var isArray = (exports.isArray = __webpack_require__(/*! isarray */
"./node_modules/msgpack-lite/node_modules/isarray/index.js"));
exports.isArrayBuffer = hasArrayBuffer ? isArrayBuffer : _false;
var isBuffer = (exports.isBuffer = hasBuffer ? Buffer.isBuffer :
_false);
var isView = (exports.isView = hasArrayBuffer ? ArrayBuffer.isView ||
_is("ArrayBuffer", "buffer") : _false);
exports.alloc = alloc;
exports.concat = concat;
exports.from = from;
var BufferArray = (exports.Array = __webpack_require__(/*! ./bufferish-
array */
"./node_modules/msgpack-lite/lib/bufferish-array.js"));
var BufferBuffer = (exports.Buffer = __webpack_require__(/*!
./bufferish-buffer */
"./node_modules/msgpack-lite/lib/bufferish-buffer.js"));
var BufferUint8Array = (exports.Uint8Array =
__webpack_require__(/*! ./bufferish-uint8array */
"./node_modules/msgpack-lite/lib/bufferish-uint8array.js"));
var BufferProto = (exports.prototype = __webpack_require__(/*!
./bufferish-proto */
"./node_modules/msgpack-lite/lib/bufferish-proto.js"));
/**
* @param value {Array|ArrayBuffer|Buffer|String}
* @returns {Buffer|Uint8Array|Array}
*/
function from(value) {
if (typeof value === "string") {
return fromString.call(this, value);
} else {
return auto(this).from(value);
}
}
/**
* @param size {Number}
* @returns {Buffer|Uint8Array|Array}
*/
function alloc(size) {
return auto(this).alloc(size);
}
/**
* @param list {Array} array of (Buffer|Uint8Array|Array)s
* @param [length]
* @returns {Buffer|Uint8Array|Array}
*/
function concat(list, length) {
if (!length) {
length = 0;
Array.prototype.forEach.call(list, dryrun);
}
var ref = (this !== exports && this) || list[0];
var result = alloc.call(ref, length);
var offset = 0;
Array.prototype.forEach.call(list, append);
return result;
function dryrun(buffer) {
length += buffer.length;
}
function append(buffer) {
offset += BufferProto.copy.call(buffer, result, offset);
}
}
var _isArrayBuffer = _is("ArrayBuffer");
function isArrayBuffer(value) {
return value instanceof ArrayBuffer || _isArrayBuffer(value);
}
/**
* @private
*/
function fromString(value) {
var expected = value.length * 3;
var that = alloc.call(this, expected);
var actual = BufferProto.write.call(that, value);
if (expected !== actual) {
that = BufferProto.slice.call(that, 0, actual);
}
return that;
}
function auto(that) {
return isBuffer(that) ? BufferBuffer : isView(that) ?
BufferUint8Array : isArray(that) ? BufferArray : hasBuffer ? BufferBuffer :
hasArrayBuffer ? BufferUint8Array : BufferArray;
}
function _false() {
return false;
}
function Codec(options) {
if (!(this instanceof Codec))
return new Codec(options);
this.options = options;
this.init();
}
Codec.prototype.init = function() {
var options = this.options;
if (options && options.uint8array) {
this.bufferish = Bufferish.Uint8Array;
}
return this;
}
;
function install(props) {
for (var key in props) {
Codec.prototype[key] = add(Codec.prototype[key], props[key]);
}
}
function add(a, b) {
return a && b ? ab : a || b;
function ab() {
a.apply(this, arguments);
return b.apply(this, arguments);
}
}
function join(filters) {
filters = filters.slice();
return function(value) {
return filters.reduce(iterator, value);
}
;
function filter(filter) {
return IS_ARRAY(filter) ? join(filter) : filter;
}
// @public
// msgpack.createCodec()
function createCodec(options) {
return new Codec(options);
}
// default shared codec
exports.preset = createCodec({
preset: true
});
/***/
},
/***/
"./node_modules/msgpack-lite/lib/codec.js": /*!
************************************************!*\
!*** ./node_modules/msgpack-lite/lib/codec.js ***!
\************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// codec.js
// load both interfaces
__webpack_require__(/*! ./read-core */
"./node_modules/msgpack-lite/lib/read-core.js");
__webpack_require__(/*! ./write-core */
"./node_modules/msgpack-lite/lib/write-core.js");
// @public
// msgpack.codec.preset
exports.codec = {
preset: __webpack_require__(/*! ./codec-base */
"./node_modules/msgpack-lite/lib/codec-base.js").preset,
};
/***/
},
/***/
"./node_modules/msgpack-lite/lib/decode-buffer.js": /*!
********************************************************!*\
!*** ./node_modules/msgpack-lite/lib/decode-buffer.js ***!
\********************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// decode-buffer.js
exports.DecodeBuffer = DecodeBuffer;
var preset = __webpack_require__(/*! ./read-core */
"./node_modules/msgpack-lite/lib/read-core.js").preset;
var FlexDecoder = __webpack_require__(/*! ./flex-buffer */
"./node_modules/msgpack-lite/lib/flex-buffer.js").FlexDecoder;
FlexDecoder.mixin(DecodeBuffer.prototype);
function DecodeBuffer(options) {
if (!(this instanceof DecodeBuffer))
return new DecodeBuffer(options);
if (options) {
this.options = options;
if (options.codec) {
var codec = (this.codec = options.codec);
if (codec.bufferish)
this.bufferish = codec.bufferish;
}
}
}
DecodeBuffer.prototype.codec = preset;
DecodeBuffer.prototype.fetch = function() {
return this.codec.decode(this);
}
;
/***/
},
/***/
"./node_modules/msgpack-lite/lib/decode.js": /*!
*************************************************!*\
!*** ./node_modules/msgpack-lite/lib/decode.js ***!
\*************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// decode.js
exports.decode = decode;
var DecodeBuffer = __webpack_require__(/*! ./decode-buffer */
"./node_modules/msgpack-lite/lib/decode-buffer.js").DecodeBuffer;
function Decoder(options) {
if (!(this instanceof Decoder))
return new Decoder(options);
DecodeBuffer.call(this, options);
}
Decoder.prototype = new DecodeBuffer();
EventLite.mixin(Decoder.prototype);
Decoder.prototype.decode = function(chunk) {
if (arguments.length)
this.write(chunk);
this.flush();
}
;
Decoder.prototype.push = function(chunk) {
this.emit("data", chunk);
}
;
Decoder.prototype.end = function(chunk) {
this.decode(chunk);
this.emit("end");
}
;
/***/
},
/***/
"./node_modules/msgpack-lite/lib/encode-buffer.js": /*!
********************************************************!*\
!*** ./node_modules/msgpack-lite/lib/encode-buffer.js ***!
\********************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// encode-buffer.js
exports.EncodeBuffer = EncodeBuffer;
var preset = __webpack_require__(/*! ./write-core */
"./node_modules/msgpack-lite/lib/write-core.js").preset;
var FlexEncoder = __webpack_require__(/*! ./flex-buffer */
"./node_modules/msgpack-lite/lib/flex-buffer.js").FlexEncoder;
FlexEncoder.mixin(EncodeBuffer.prototype);
function EncodeBuffer(options) {
if (!(this instanceof EncodeBuffer))
return new EncodeBuffer(options);
if (options) {
this.options = options;
if (options.codec) {
var codec = (this.codec = options.codec);
if (codec.bufferish)
this.bufferish = codec.bufferish;
}
}
}
EncodeBuffer.prototype.codec = preset;
EncodeBuffer.prototype.write = function(input) {
this.codec.encode(this, input);
}
;
/***/
},
/***/
"./node_modules/msgpack-lite/lib/encode.js": /*!
*************************************************!*\
!*** ./node_modules/msgpack-lite/lib/encode.js ***!
\*************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// encode.js
exports.encode = encode;
var EncodeBuffer = __webpack_require__(/*! ./encode-buffer */
"./node_modules/msgpack-lite/lib/encode-buffer.js").EncodeBuffer;
function Encoder(options) {
if (!(this instanceof Encoder))
return new Encoder(options);
EncodeBuffer.call(this, options);
}
Encoder.prototype = new EncodeBuffer();
EventLite.mixin(Encoder.prototype);
Encoder.prototype.encode = function(chunk) {
this.write(chunk);
this.emit("data", this.read());
}
;
Encoder.prototype.end = function(chunk) {
if (arguments.length)
this.encode(chunk);
this.flush();
this.emit("end");
}
;
/***/
},
/***/
"./node_modules/msgpack-lite/lib/ext-buffer.js": /*!
*****************************************************!*\
!*** ./node_modules/msgpack-lite/lib/ext-buffer.js ***!
\*****************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// ext-buffer.js
exports.ExtBuffer = ExtBuffer;
var Bufferish = __webpack_require__(/*! ./bufferish */
"./node_modules/msgpack-lite/lib/bufferish.js");
function ExtBuffer(buffer, type) {
if (!(this instanceof ExtBuffer))
return new ExtBuffer(buffer,type);
this.buffer = Bufferish.from(buffer);
this.type = type;
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/ext-packer.js": /*!
*****************************************************!*\
!*** ./node_modules/msgpack-lite/lib/ext-packer.js ***!
\*****************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// ext-packer.js
exports.setExtPackers = setExtPackers;
var Bufferish = __webpack_require__(/*! ./bufferish */
"./node_modules/msgpack-lite/lib/bufferish.js");
var Buffer = Bufferish.global;
var packTypedArray = Bufferish.Uint8Array.from;
var _encode;
var ERROR_COLUMNS = {
name: 1,
message: 1,
stack: 1,
columnNumber: 1,
fileName: 1,
lineNumber: 1,
};
function setExtPackers(codec) {
codec.addExtPacker(0x0e, Error, [packError, encode]);
codec.addExtPacker(0x01, EvalError, [packError, encode]);
codec.addExtPacker(0x02, RangeError, [packError, encode]);
codec.addExtPacker(0x03, ReferenceError, [packError, encode]);
codec.addExtPacker(0x04, SyntaxError, [packError, encode]);
codec.addExtPacker(0x05, TypeError, [packError, encode]);
codec.addExtPacker(0x06, URIError, [packError, encode]);
codec.addExtPacker(0x0a, RegExp, [packRegExp, encode]);
codec.addExtPacker(0x0b, Boolean, [packValueOf, encode]);
codec.addExtPacker(0x0c, String, [packValueOf, encode]);
codec.addExtPacker(0x0d, Date, [Number, encode]);
codec.addExtPacker(0x0f, Number, [packValueOf, encode]);
if ("undefined" !== typeof Uint8Array) {
codec.addExtPacker(0x11, Int8Array, packTypedArray);
codec.addExtPacker(0x12, Uint8Array, packTypedArray);
codec.addExtPacker(0x13, Int16Array, packTypedArray);
codec.addExtPacker(0x14, Uint16Array, packTypedArray);
codec.addExtPacker(0x15, Int32Array, packTypedArray);
codec.addExtPacker(0x16, Uint32Array, packTypedArray);
codec.addExtPacker(0x17, Float32Array, packTypedArray);
// PhantomJS/1.9.7 doesn't have Float64Array
if ("undefined" !== typeof Float64Array) {
codec.addExtPacker(0x18, Float64Array, packTypedArray);
}
// IE10 doesn't have Uint8ClampedArray
if ("undefined" !== typeof Uint8ClampedArray) {
codec.addExtPacker(0x19, Uint8ClampedArray,
packTypedArray);
}
codec.addExtPacker(0x1a, ArrayBuffer, packTypedArray);
codec.addExtPacker(0x1d, DataView, packTypedArray);
}
if (Bufferish.hasBuffer) {
codec.addExtPacker(0x1b, Buffer, Bufferish.from);
}
}
function encode(input) {
if (!_encode)
_encode = __webpack_require__(/*! ./encode */
"./node_modules/msgpack-lite/lib/encode.js").encode;
// lazy load
return _encode(input);
}
function packValueOf(value) {
return value.valueOf();
}
function packRegExp(value) {
value = RegExp.prototype.toString.call(value).split("/");
value.shift();
var out = [value.pop()];
out.unshift(value.join("/"));
return out;
}
function packError(value) {
var out = {};
for (var key in ERROR_COLUMNS) {
out[key] = value[key];
}
return out;
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/ext-unpacker.js": /*!
*******************************************************!*\
!*** ./node_modules/msgpack-lite/lib/ext-unpacker.js ***!
\*******************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// ext-unpacker.js
exports.setExtUnpackers = setExtUnpackers;
var Bufferish = __webpack_require__(/*! ./bufferish */
"./node_modules/msgpack-lite/lib/bufferish.js");
var Buffer = Bufferish.global;
var _decode;
var ERROR_COLUMNS = {
name: 1,
message: 1,
stack: 1,
columnNumber: 1,
fileName: 1,
lineNumber: 1,
};
function setExtUnpackers(codec) {
codec.addExtUnpacker(0x0e, [decode, unpackError(Error)]);
codec.addExtUnpacker(0x01, [decode, unpackError(EvalError)]);
codec.addExtUnpacker(0x02, [decode, unpackError(RangeError)]);
codec.addExtUnpacker(0x03, [decode, unpackError(ReferenceError)]);
codec.addExtUnpacker(0x04, [decode, unpackError(SyntaxError)]);
codec.addExtUnpacker(0x05, [decode, unpackError(TypeError)]);
codec.addExtUnpacker(0x06, [decode, unpackError(URIError)]);
codec.addExtUnpacker(0x0a, [decode, unpackRegExp]);
codec.addExtUnpacker(0x0b, [decode, unpackClass(Boolean)]);
codec.addExtUnpacker(0x0c, [decode, unpackClass(String)]);
codec.addExtUnpacker(0x0d, [decode, unpackClass(Date)]);
codec.addExtUnpacker(0x0f, [decode, unpackClass(Number)]);
if ("undefined" !== typeof Uint8Array) {
codec.addExtUnpacker(0x11, unpackClass(Int8Array));
codec.addExtUnpacker(0x12, unpackClass(Uint8Array));
codec.addExtUnpacker(0x13, [unpackArrayBuffer,
unpackClass(Int16Array), ]);
codec.addExtUnpacker(0x14, [unpackArrayBuffer,
unpackClass(Uint16Array), ]);
codec.addExtUnpacker(0x15, [unpackArrayBuffer,
unpackClass(Int32Array), ]);
codec.addExtUnpacker(0x16, [unpackArrayBuffer,
unpackClass(Uint32Array), ]);
codec.addExtUnpacker(0x17, [unpackArrayBuffer,
unpackClass(Float32Array), ]);
// PhantomJS/1.9.7 doesn't have Float64Array
if ("undefined" !== typeof Float64Array) {
codec.addExtUnpacker(0x18, [unpackArrayBuffer,
unpackClass(Float64Array), ]);
}
// IE10 doesn't have Uint8ClampedArray
if ("undefined" !== typeof Uint8ClampedArray) {
codec.addExtUnpacker(0x19, unpackClass(Uint8ClampedArray));
}
codec.addExtUnpacker(0x1a, unpackArrayBuffer);
codec.addExtUnpacker(0x1d, [unpackArrayBuffer,
unpackClass(DataView), ]);
}
if (Bufferish.hasBuffer) {
codec.addExtUnpacker(0x1b, unpackClass(Buffer));
}
}
function decode(input) {
if (!_decode)
_decode = __webpack_require__(/*! ./decode */
"./node_modules/msgpack-lite/lib/decode.js").decode;
// lazy load
return _decode(input);
}
function unpackRegExp(value) {
return RegExp.apply(null, value);
}
function unpackError(Class) {
return function(value) {
var out = new Class();
for (var key in ERROR_COLUMNS) {
out[key] = value[key];
}
return out;
}
;
}
function unpackClass(Class) {
return function(value) {
return new Class(value);
}
;
}
function unpackArrayBuffer(value) {
return new Uint8Array(value).buffer;
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/ext.js": /*!
**********************************************!*\
!*** ./node_modules/msgpack-lite/lib/ext.js ***!
\**********************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// ext.js
// load both interfaces
__webpack_require__(/*! ./read-core */
"./node_modules/msgpack-lite/lib/read-core.js");
__webpack_require__(/*! ./write-core */
"./node_modules/msgpack-lite/lib/write-core.js");
exports.createCodec = __webpack_require__(/*! ./codec-base */
"./node_modules/msgpack-lite/lib/codec-base.js").createCodec;
/***/
},
/***/
"./node_modules/msgpack-lite/lib/flex-buffer.js": /*!
******************************************************!*\
!*** ./node_modules/msgpack-lite/lib/flex-buffer.js ***!
\******************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// flex-buffer.js
exports.FlexDecoder = FlexDecoder;
exports.FlexEncoder = FlexEncoder;
var Bufferish = __webpack_require__(/*! ./bufferish */
"./node_modules/msgpack-lite/lib/bufferish.js");
var MIN_BUFFER_SIZE = 2048;
var MAX_BUFFER_SIZE = 65536;
var BUFFER_SHORTAGE = "BUFFER_SHORTAGE";
function FlexDecoder() {
if (!(this instanceof FlexDecoder))
return new FlexDecoder();
}
function FlexEncoder() {
if (!(this instanceof FlexEncoder))
return new FlexEncoder();
}
FlexDecoder.mixin = mixinFactory(getDecoderMethods());
FlexDecoder.mixin(FlexDecoder.prototype);
FlexEncoder.mixin = mixinFactory(getEncoderMethods());
FlexEncoder.mixin(FlexEncoder.prototype);
function getDecoderMethods() {
return {
bufferish: Bufferish,
write: write,
fetch: fetch,
flush: flush,
push: push,
pull: pull,
read: read,
reserve: reserve,
offset: 0,
};
function write(chunk) {
var prev = this.offset ?
Bufferish.prototype.slice.call(this.buffer, this.offset) : this.buffer;
this.buffer = prev ? chunk ? this.bufferish.concat([prev,
chunk]) : prev : chunk;
this.offset = 0;
}
function flush() {
while (this.offset < this.buffer.length) {
var start = this.offset;
var value;
try {
value = this.fetch();
} catch (e) {
if (e && e.message != BUFFER_SHORTAGE)
throw e;
// rollback
this.offset = start;
break;
}
this.push(value);
}
}
function reserve(length) {
var start = this.offset;
var end = start + length;
if (end > this.buffer.length)
throw new Error(BUFFER_SHORTAGE);
this.offset = end;
return start;
}
}
function getEncoderMethods() {
return {
bufferish: Bufferish,
write: write,
fetch: fetch,
flush: flush,
push: push,
pull: pull,
read: read,
reserve: reserve,
send: send,
maxBufferSize: MAX_BUFFER_SIZE,
minBufferSize: MIN_BUFFER_SIZE,
offset: 0,
start: 0,
};
function fetch() {
var start = this.start;
if (start < this.offset) {
var end = (this.start = this.offset);
return Bufferish.prototype.slice.call(this.buffer, start,
end);
}
}
function flush() {
while (this.start < this.offset) {
var value = this.fetch();
if (value)
this.push(value);
}
}
function pull() {
var buffers = this.buffers || (this.buffers = []);
var chunk = buffers.length > 1 ? this.bufferish.concat(buffers)
: buffers[0];
buffers.length = 0;
// buffer exhausted
return chunk;
}
function reserve(length) {
var req = length | 0;
if (this.buffer) {
var size = this.buffer.length;
var start = this.offset | 0;
var end = start + req;
// is it long enough?
if (end < size) {
this.offset = end;
return start;
}
// flush current buffer
this.flush();
// resize it to 2x current length
length = Math.max(length, Math.min(size * 2,
this.maxBufferSize));
}
// minimum buffer size
length = Math.max(length, this.minBufferSize);
// allocate new buffer
this.buffer = this.bufferish.alloc(length);
this.start = 0;
this.offset = req;
return 0;
}
function send(buffer) {
var length = buffer.length;
if (length > this.minBufferSize) {
this.flush();
this.push(buffer);
} else {
var offset = this.reserve(length);
Bufferish.prototype.copy.call(buffer, this.buffer, offset);
}
}
}
// common methods
function write() {
throw new Error("method not implemented: write()");
}
function fetch() {
throw new Error("method not implemented: fetch()");
}
function read() {
var length = this.buffers && this.buffers.length;
// fetch the first result
if (!length)
return this.fetch();
// flush current buffer
this.flush();
// read from the results
return this.pull();
}
function push(chunk) {
var buffers = this.buffers || (this.buffers = []);
buffers.push(chunk);
}
function pull() {
var buffers = this.buffers || (this.buffers = []);
return buffers.shift();
}
function mixinFactory(source) {
return mixin;
function mixin(target) {
for (var key in source) {
target[key] = source[key];
}
return target;
}
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/read-core.js": /*!
****************************************************!*\
!*** ./node_modules/msgpack-lite/lib/read-core.js ***!
\****************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// read-core.js
var ExtBuffer = __webpack_require__(/*! ./ext-buffer */
"./node_modules/msgpack-lite/lib/ext-buffer.js").ExtBuffer;
var ExtUnpacker = __webpack_require__(/*! ./ext-unpacker */
"./node_modules/msgpack-lite/lib/ext-unpacker.js");
var readUint8 = __webpack_require__(/*! ./read-format */
"./node_modules/msgpack-lite/lib/read-format.js").readUint8;
var ReadToken = __webpack_require__(/*! ./read-token */
"./node_modules/msgpack-lite/lib/read-token.js");
var CodecBase = __webpack_require__(/*! ./codec-base */
"./node_modules/msgpack-lite/lib/codec-base.js");
CodecBase.install({
addExtUnpacker: addExtUnpacker,
getExtUnpacker: getExtUnpacker,
init: init,
});
exports.preset = init.call(CodecBase.preset);
function getDecoder(options) {
var readToken = ReadToken.getReadToken(options);
return decode;
function decode(decoder) {
var type = readUint8(decoder);
var func = readToken[type];
if (!func)
throw new Error("Invalid type: " + (type ? "0x" +
type.toString(16) : type));
return func(decoder);
}
}
function init() {
var options = this.options;
this.decode = getDecoder(options);
if (options && options.preset) {
ExtUnpacker.setExtUnpackers(this);
}
return this;
}
function getExtUnpacker(type) {
var unpackers = this.extUnpackers || (this.extUnpackers = []);
return unpackers[type] || extUnpacker;
function extUnpacker(buffer) {
return new ExtBuffer(buffer,type);
}
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/read-format.js": /*!
******************************************************!*\
!*** ./node_modules/msgpack-lite/lib/read-format.js ***!
\******************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// read-format.js
var ieee754 = __webpack_require__(/*! ieee754 */
"./node_modules/ieee754/index.js");
var Int64Buffer = __webpack_require__(/*! int64-buffer */
"./node_modules/int64-buffer/int64-buffer.js");
var Uint64BE = Int64Buffer.Uint64BE;
var Int64BE = Int64Buffer.Int64BE;
exports.getReadFormat = getReadFormat;
exports.readUint8 = uint8;
var Bufferish = __webpack_require__(/*! ./bufferish */
"./node_modules/msgpack-lite/lib/bufferish.js");
var BufferProto = __webpack_require__(/*! ./bufferish-proto */
"./node_modules/msgpack-lite/lib/bufferish-proto.js");
var HAS_MAP = "undefined" !== typeof Map;
var NO_ASSERT = true;
function getReadFormat(options) {
var binarraybuffer = Bufferish.hasArrayBuffer && options &&
options.binarraybuffer;
var int64 = options && options.int64;
var usemap = HAS_MAP && options && options.usemap;
var readFormat = {
map: usemap ? map_to_map : map_to_obj,
array: array,
str: str,
bin: binarraybuffer ? bin_arraybuffer : bin_buffer,
ext: ext,
uint8: uint8,
uint16: uint16,
uint32: uint32,
uint64: read(8, int64 ? readUInt64BE_int64 : readUInt64BE),
int8: int8,
int16: int16,
int32: int32,
int64: read(8, int64 ? readInt64BE_int64 : readInt64BE),
float32: read(4, readFloatBE),
float64: read(8, readDoubleBE),
};
return readFormat;
}
function uint8(decoder) {
var start = decoder.reserve(1);
return decoder.buffer[start];
}
function int8(decoder) {
var start = decoder.reserve(1);
var value = decoder.buffer[start];
return value & 0x80 ? value - 0x100 : value;
}
function uint16(decoder) {
var start = decoder.reserve(2);
var buffer = decoder.buffer;
return (buffer[start++] << 8) | buffer[start];
}
function int16(decoder) {
var start = decoder.reserve(2);
var buffer = decoder.buffer;
var value = (buffer[start++] << 8) | buffer[start];
return value & 0x8000 ? value - 0x10000 : value;
}
function uint32(decoder) {
var start = decoder.reserve(4);
var buffer = decoder.buffer;
return (buffer[start++] * 16777216 + (buffer[start++] << 16) +
(buffer[start++] << 8) + buffer[start]);
}
function int32(decoder) {
var start = decoder.reserve(4);
var buffer = decoder.buffer;
return ((buffer[start++] << 24) | (buffer[start++] << 16) |
(buffer[start++] << 8) | buffer[start]);
}
function readUInt64BE(start) {
return new Uint64BE(this,start).toNumber();
}
function readInt64BE(start) {
return new Int64BE(this,start).toNumber();
}
function readUInt64BE_int64(start) {
return new Uint64BE(this,start);
}
function readInt64BE_int64(start) {
return new Int64BE(this,start);
}
function readFloatBE(start) {
return ieee754.read(this, start, false, 23, 4);
}
function readDoubleBE(start) {
return ieee754.read(this, start, false, 52, 8);
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/read-token.js": /*!
*****************************************************!*\
!*** ./node_modules/msgpack-lite/lib/read-token.js ***!
\*****************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// read-token.js
var ReadFormat = __webpack_require__(/*! ./read-format */
"./node_modules/msgpack-lite/lib/read-format.js");
exports.getReadToken = getReadToken;
function getReadToken(options) {
var format = ReadFormat.getReadFormat(options);
if (options && options.useraw) {
return init_useraw(format);
} else {
return init_token(format);
}
}
function init_token(format) {
var i;
var token = new Array(256);
// positive fixint -- 0x00 - 0x7f
for (i = 0x00; i <= 0x7f; i++) {
token[i] = constant(i);
}
// fixmap -- 0x80 - 0x8f
for (i = 0x80; i <= 0x8f; i++) {
token[i] = fix(i - 0x80, format.map);
}
// fixarray -- 0x90 - 0x9f
for (i = 0x90; i <= 0x9f; i++) {
token[i] = fix(i - 0x90, format.array);
}
// fixstr -- 0xa0 - 0xbf
for (i = 0xa0; i <= 0xbf; i++) {
token[i] = fix(i - 0xa0, format.str);
}
// nil -- 0xc0
token[0xc0] = constant(null);
// (never used) -- 0xc1
token[0xc1] = null;
// false -- 0xc2
// true -- 0xc3
token[0xc2] = constant(false);
token[0xc3] = constant(true);
// bin 8 -- 0xc4
// bin 16 -- 0xc5
// bin 32 -- 0xc6
token[0xc4] = flex(format.uint8, format.bin);
token[0xc5] = flex(format.uint16, format.bin);
token[0xc6] = flex(format.uint32, format.bin);
// ext 8 -- 0xc7
// ext 16 -- 0xc8
// ext 32 -- 0xc9
token[0xc7] = flex(format.uint8, format.ext);
token[0xc8] = flex(format.uint16, format.ext);
token[0xc9] = flex(format.uint32, format.ext);
// float 32 -- 0xca
// float 64 -- 0xcb
token[0xca] = format.float32;
token[0xcb] = format.float64;
// uint 8 -- 0xcc
// uint 16 -- 0xcd
// uint 32 -- 0xce
// uint 64 -- 0xcf
token[0xcc] = format.uint8;
token[0xcd] = format.uint16;
token[0xce] = format.uint32;
token[0xcf] = format.uint64;
// int 8 -- 0xd0
// int 16 -- 0xd1
// int 32 -- 0xd2
// int 64 -- 0xd3
token[0xd0] = format.int8;
token[0xd1] = format.int16;
token[0xd2] = format.int32;
token[0xd3] = format.int64;
// fixext 1 -- 0xd4
// fixext 2 -- 0xd5
// fixext 4 -- 0xd6
// fixext 8 -- 0xd7
// fixext 16 -- 0xd8
token[0xd4] = fix(1, format.ext);
token[0xd5] = fix(2, format.ext);
token[0xd6] = fix(4, format.ext);
token[0xd7] = fix(8, format.ext);
token[0xd8] = fix(16, format.ext);
// str 8 -- 0xd9
// str 16 -- 0xda
// str 32 -- 0xdb
token[0xd9] = flex(format.uint8, format.str);
token[0xda] = flex(format.uint16, format.str);
token[0xdb] = flex(format.uint32, format.str);
// array 16 -- 0xdc
// array 32 -- 0xdd
token[0xdc] = flex(format.uint16, format.array);
token[0xdd] = flex(format.uint32, format.array);
// map 16 -- 0xde
// map 32 -- 0xdf
token[0xde] = flex(format.uint16, format.map);
token[0xdf] = flex(format.uint32, format.map);
// negative fixint -- 0xe0 - 0xff
for (i = 0xe0; i <= 0xff; i++) {
token[i] = constant(i - 0x100);
}
return token;
}
function init_useraw(format) {
var i;
var token = init_token(format).slice();
// raw 8 -- 0xd9
// raw 16 -- 0xda
// raw 32 -- 0xdb
token[0xd9] = token[0xc4];
token[0xda] = token[0xc5];
token[0xdb] = token[0xc6];
// fixraw -- 0xa0 - 0xbf
for (i = 0xa0; i <= 0xbf; i++) {
token[i] = fix(i - 0xa0, format.bin);
}
return token;
}
function constant(value) {
return function() {
return value;
}
;
}
function getEncoder(options) {
var writeType = WriteType.getWriteType(options);
return encode;
function init() {
var options = this.options;
this.encode = getEncoder(options);
if (options && options.preset) {
ExtPacker.setExtPackers(this);
}
return this;
}
function extPacker(value) {
if (packer)
value = packer(value);
return new ExtBuffer(value,etype);
}
}
function getExtPacker(value) {
var packers = this.extPackers || (this.extPackers = {});
var c = value.constructor;
var e = c && c.name && packers[c.name];
if (e)
return e;
// fallback for IE
var list = this.extEncoderList || (this.extEncoderList = []);
var len = list.length;
for (var i = 0; i < len; i++) {
var pair = list[i];
if (c === pair[0])
return pair[1];
}
}
/***/
},
/***/
"./node_modules/msgpack-lite/lib/write-token.js": /*!
******************************************************!*\
!*** ./node_modules/msgpack-lite/lib/write-token.js ***!
\******************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
// write-token.js
var ieee754 = __webpack_require__(/*! ieee754 */
"./node_modules/ieee754/index.js");
var Int64Buffer = __webpack_require__(/*! int64-buffer */
"./node_modules/int64-buffer/int64-buffer.js");
var Uint64BE = Int64Buffer.Uint64BE;
var Int64BE = Int64Buffer.Int64BE;
var uint8 = __webpack_require__(/*! ./write-uint8 */
"./node_modules/msgpack-lite/lib/write-uint8.js").uint8;
var Bufferish = __webpack_require__(/*! ./bufferish */
"./node_modules/msgpack-lite/lib/bufferish.js");
var Buffer = Bufferish.global;
var IS_BUFFER_SHIM = Bufferish.hasBuffer && "TYPED_ARRAY_SUPPORT"in
Buffer;
var NO_TYPED_ARRAY = IS_BUFFER_SHIM && !Buffer.TYPED_ARRAY_SUPPORT;
var Buffer_prototype = (Bufferish.hasBuffer && Buffer.prototype) || {};
exports.getWriteToken = getWriteToken;
function getWriteToken(options) {
if (options && options.uint8array) {
return init_uint8array();
} else if (NO_TYPED_ARRAY || (Bufferish.hasBuffer && options &&
options.safe)) {
return init_safe();
} else {
return init_token();
}
}
function init_uint8array() {
var token = init_token();
// float 32 -- 0xca
// float 64 -- 0xcb
token[0xca] = writeN(0xca, 4, writeFloatBE);
token[0xcb] = writeN(0xcb, 8, writeDoubleBE);
return token;
}
// Node.js and browsers with TypedArray
function init_token() {
// (immediate values)
// positive fixint -- 0x00 - 0x7f
// nil -- 0xc0
// false -- 0xc2
// true -- 0xc3
// negative fixint -- 0xe0 - 0xff
var token = uint8.slice();
// bin 8 -- 0xc4
// bin 16 -- 0xc5
// bin 32 -- 0xc6
token[0xc4] = write1(0xc4);
token[0xc5] = write2(0xc5);
token[0xc6] = write4(0xc6);
// ext 8 -- 0xc7
// ext 16 -- 0xc8
// ext 32 -- 0xc9
token[0xc7] = write1(0xc7);
token[0xc8] = write2(0xc8);
token[0xc9] = write4(0xc9);
// float 32 -- 0xca
// float 64 -- 0xcb
token[0xca] = writeN(0xca, 4, Buffer_prototype.writeFloatBE ||
writeFloatBE, true);
token[0xcb] = writeN(0xcb, 8, Buffer_prototype.writeDoubleBE ||
writeDoubleBE, true);
// uint 8 -- 0xcc
// uint 16 -- 0xcd
// uint 32 -- 0xce
// uint 64 -- 0xcf
token[0xcc] = write1(0xcc);
token[0xcd] = write2(0xcd);
token[0xce] = write4(0xce);
token[0xcf] = writeN(0xcf, 8, writeUInt64BE);
// int 8 -- 0xd0
// int 16 -- 0xd1
// int 32 -- 0xd2
// int 64 -- 0xd3
token[0xd0] = write1(0xd0);
token[0xd1] = write2(0xd1);
token[0xd2] = write4(0xd2);
token[0xd3] = writeN(0xd3, 8, writeInt64BE);
// str 8 -- 0xd9
// str 16 -- 0xda
// str 32 -- 0xdb
token[0xd9] = write1(0xd9);
token[0xda] = write2(0xda);
token[0xdb] = write4(0xdb);
// array 16 -- 0xdc
// array 32 -- 0xdd
token[0xdc] = write2(0xdc);
token[0xdd] = write4(0xdd);
// map 16 -- 0xde
// map 32 -- 0xdf
token[0xde] = write2(0xde);
token[0xdf] = write4(0xdf);
return token;
}
// safe mode: for old browsers and who needs asserts
function init_safe() {
// (immediate values)
// positive fixint -- 0x00 - 0x7f
// nil -- 0xc0
// false -- 0xc2
// true -- 0xc3
// negative fixint -- 0xe0 - 0xff
var token = uint8.slice();
// bin 8 -- 0xc4
// bin 16 -- 0xc5
// bin 32 -- 0xc6
token[0xc4] = writeN(0xc4, 1, Buffer.prototype.writeUInt8);
token[0xc5] = writeN(0xc5, 2, Buffer.prototype.writeUInt16BE);
token[0xc6] = writeN(0xc6, 4, Buffer.prototype.writeUInt32BE);
// ext 8 -- 0xc7
// ext 16 -- 0xc8
// ext 32 -- 0xc9
token[0xc7] = writeN(0xc7, 1, Buffer.prototype.writeUInt8);
token[0xc8] = writeN(0xc8, 2, Buffer.prototype.writeUInt16BE);
token[0xc9] = writeN(0xc9, 4, Buffer.prototype.writeUInt32BE);
// float 32 -- 0xca
// float 64 -- 0xcb
token[0xca] = writeN(0xca, 4, Buffer.prototype.writeFloatBE);
token[0xcb] = writeN(0xcb, 8, Buffer.prototype.writeDoubleBE);
// uint 8 -- 0xcc
// uint 16 -- 0xcd
// uint 32 -- 0xce
// uint 64 -- 0xcf
token[0xcc] = writeN(0xcc, 1, Buffer.prototype.writeUInt8);
token[0xcd] = writeN(0xcd, 2, Buffer.prototype.writeUInt16BE);
token[0xce] = writeN(0xce, 4, Buffer.prototype.writeUInt32BE);
token[0xcf] = writeN(0xcf, 8, writeUInt64BE);
// int 8 -- 0xd0
// int 16 -- 0xd1
// int 32 -- 0xd2
// int 64 -- 0xd3
token[0xd0] = writeN(0xd0, 1, Buffer.prototype.writeInt8);
token[0xd1] = writeN(0xd1, 2, Buffer.prototype.writeInt16BE);
token[0xd2] = writeN(0xd2, 4, Buffer.prototype.writeInt32BE);
token[0xd3] = writeN(0xd3, 8, writeInt64BE);
// str 8 -- 0xd9
// str 16 -- 0xda
// str 32 -- 0xdb
token[0xd9] = writeN(0xd9, 1, Buffer.prototype.writeUInt8);
token[0xda] = writeN(0xda, 2, Buffer.prototype.writeUInt16BE);
token[0xdb] = writeN(0xdb, 4, Buffer.prototype.writeUInt32BE);
// array 16 -- 0xdc
// array 32 -- 0xdd
token[0xdc] = writeN(0xdc, 2, Buffer.prototype.writeUInt16BE);
token[0xdd] = writeN(0xdd, 4, Buffer.prototype.writeUInt32BE);
// map 16 -- 0xde
// map 32 -- 0xdf
token[0xde] = writeN(0xde, 2, Buffer.prototype.writeUInt16BE);
token[0xdf] = writeN(0xdf, 4, Buffer.prototype.writeUInt32BE);
return token;
}
function write1(type) {
return function(encoder, value) {
var offset = encoder.reserve(2);
var buffer = encoder.buffer;
buffer[offset++] = type;
buffer[offset] = value;
}
;
}
function write2(type) {
return function(encoder, value) {
var offset = encoder.reserve(3);
var buffer = encoder.buffer;
buffer[offset++] = type;
buffer[offset++] = value >>> 8;
buffer[offset] = value;
}
;
}
function write4(type) {
return function(encoder, value) {
var offset = encoder.reserve(5);
var buffer = encoder.buffer;
buffer[offset++] = type;
buffer[offset++] = value >>> 24;
buffer[offset++] = value >>> 16;
buffer[offset++] = value >>> 8;
buffer[offset] = value;
}
;
}
function getWriteType(options) {
var token = WriteToken.getWriteToken(options);
var useraw = options && options.useraw;
var binarraybuffer = HAS_UINT8ARRAY && options &&
options.binarraybuffer;
var isBuffer = binarraybuffer ? Bufferish.isArrayBuffer :
Bufferish.isBuffer;
var bin = binarraybuffer ? bin_arraybuffer : bin_buffer;
var usemap = HAS_MAP && options && options.usemap;
var map = usemap ? map_to_map : obj_to_map;
var writeType = {
boolean: bool,
function: nil,
number: number,
object: useraw ? object_raw : object,
string: _string(useraw ? raw_head_size : str_head_size),
symbol: nil,
undefined: nil,
};
return writeType;
// false -- 0xc2
// true -- 0xc3
function bool(encoder, value) {
var type = value ? 0xc3 : 0xc2;
token[type](encoder, value);
}
function _string(head_size) {
return string;
function write0(type) {
return function(encoder) {
var offset = encoder.reserve(1);
encoder.buffer[offset] = type;
}
;
}
/***/
},
/***/
"./node_modules/msgpack-lite/node_modules/isarray/index.js": /*!
*****************************************************************!*\
!*** ./node_modules/msgpack-lite/node_modules/isarray/index.js ***!
\*****************************************************************/
/*! no static exports found */
/***/
function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function(arr) {
return toString.call(arr) == "[object Array]";
}
;
/***/
},
/***/
"./node_modules/process/browser.js": /*!
*****************************************!*\
!*** ./node_modules/process/browser.js ***!
\*****************************************/
/*! no static exports found */
/***/
function(module, exports) {
// shim for using process in browser
var process = (module.exports = {});
// cached from whatever global is present so that test runners that
stub it
// don't break things. But we need to wrap it in a try catch in case
it is
// wrapped in strict mode code which doesn't define any globals. It's
inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error("setTimeout has not been defined");
}
function defaultClearTimeout() {
throw new Error("clearTimeout has not been defined");
}
(function() {
try {
if (typeof setTimeout === "function") {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === "function") {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
}
)();
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) &&
setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E.
maddness
return cachedSetTimeout(fun, 0);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so
I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch (e) {
// same as above but when it's a version of I.E. that must
have the global object for 'this', hopfully our context correct otherwise it will
throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !
cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E.
maddness
return cachedClearTimeout(marker);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so
I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e) {
// same as above but when it's a version of I.E. that must
have the global object for 'this', hopfully our context correct otherwise it will
throw a global error.
// Some versions of I.E. have different rules for
clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while (len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function(fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun,args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
}
;
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function() {
this.fun.apply(null, this.array);
}
;
process.title = "browser";
process.browser = true;
process.env = {};
process.argv = [];
process.version = "";
// empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function(name) {
return [];
}
;
process.binding = function(name) {
throw new Error("process.binding is not supported");
}
;
process.cwd = function() {
return "/";
}
;
process.chdir = function(dir) {
throw new Error("process.chdir is not supported");
}
;
process.umask = function() {
return 0;
}
;
/***/
},
/***/
"./node_modules/punycode/punycode.js": /*!
*******************************************!*\
!*** ./node_modules/punycode/punycode.js ***!
\*******************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */
(function(module, global) {
var __WEBPACK_AMD_DEFINE_RESULT__;
/*! https://mths.be/punycode v1.4.1 by @mathias */
(function(root) {
/** Detect free variables */
var freeExports = true && exports && !exports.nodeType &&
exports;
var freeModule = true && module && !module.nodeType && module;
var freeGlobal = typeof global == "object" && global;
if (freeGlobal.global === freeGlobal || freeGlobal.window ===
freeGlobal || freeGlobal.self === freeGlobal) {
root = freeGlobal;
}
/**
* The `punycode` object.
* @name punycode
* @type Object
*/
var punycode, /** Highest positive signed 32-bit float value */
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
/** Bootstring parameters */
base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700,
initialBias = 72, initialN = 128, // 0x80
delimiter = "-", // '\x2D'
/** Regular expressions */
regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, //
unprintable ASCII chars + non-ASCII chars
regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490
separators
/** Error messages */
errors = {
overflow: "Overflow: input needs wider integers to
process",
"not-basic": "Illegal input >= 0x80 (not a basic code
point)",
"invalid-input": "Invalid input",
}, /** Convenience shortcuts */
baseMinusTMin = base - tMin, floor = Math.floor,
stringFromCharCode = String.fromCharCode, /** Temporary variable */
key;
/*--------------------------------------------------------------------------*/
/**
* A generic error utility function.
* @private
* @param {String} type The error type.
* @returns {Error} Throws a `RangeError` with the
applicable error message.
*/
function error(type) {
throw new RangeError(errors[type]);
}
/**
* A generic `Array#map` utility function.
* @private
* @param {Array} array The array to iterate over.
* @param {Function} callback The function that gets called
for every array
* item.
* @returns {Array} A new array of values returned by the
callback function.
*/
function map(array, fn) {
var length = array.length;
var result = [];
while (length--) {
result[length] = fn(array[length]);
}
return result;
}
/**
* A simple `Array#map`-like wrapper to work with domain
name strings or email
* addresses.
* @private
* @param {String} domain The domain name or email address.
* @param {Function} callback The function that gets called
for every
* character.
* @returns {Array} A new string of characters returned by
the callback
* function.
*/
function mapDomain(string, fn) {
var parts = string.split("@");
var result = "";
if (parts.length > 1) {
// In email addresses, only the domain name should be
punycoded. Leave
// the local part (i.e. everything up to `@`) intact.
result = parts[0] + "@";
string = parts[1];
}
// Avoid `split(regex)` for IE8 compatibility. See #17.
string = string.replace(regexSeparators, ".");
var labels = string.split(".");
var encoded = map(labels, fn).join(".");
return result + encoded;
}
/**
* Creates an array containing the numeric code points of
each Unicode
* character in the string. While JavaScript uses UCS-2
internally,
* this function will convert a pair of surrogate halves
(each of which
* UCS-2 exposes as separate characters) into a single code
point,
* matching UTF-16.
* @see `punycode.ucs2.encode`
* @see <https://mathiasbynens.be/notes/javascript-
encoding>
* @memberOf punycode.ucs2
* @name decode
* @param {String} string The Unicode input string (UCS-2).
* @returns {Array} The new array of code points.
*/
function ucs2decode(string) {
var output = [], counter = 0, length = string.length,
value, extra;
while (counter < length) {
value = string.charCodeAt(counter++);
if (value >= 0xd800 && value <= 0xdbff && counter <
length) {
// high surrogate, and there is a next character
extra = string.charCodeAt(counter++);
if ((extra & 0xfc00) == 0xdc00) {
// low surrogate
output.push(((value & 0x3ff) << 10) + (extra &
0x3ff) + 0x10000);
} else {
// unmatched surrogate; only append this code
unit, in case the next
// code unit is the high surrogate of a
surrogate pair
output.push(value);
counter--;
}
} else {
output.push(value);
}
}
return output;
}
/**
* Creates a string based on an array of numeric code
points.
* @see `punycode.ucs2.decode`
* @memberOf punycode.ucs2
* @name encode
* @param {Array} codePoints The array of numeric code
points.
* @returns {String} The new Unicode string (UCS-2).
*/
function ucs2encode(array) {
return map(array, function(value) {
var output = "";
if (value > 0xffff) {
value -= 0x10000;
output += stringFromCharCode(((value >>> 10) &
0x3ff) | 0xd800);
value = 0xdc00 | (value & 0x3ff);
}
output += stringFromCharCode(value);
return output;
}).join("");
}
/**
* Converts a basic code point into a digit/integer.
* @see `digitToBasic()`
* @private
* @param {Number} codePoint The basic numeric code point
value.
* @returns {Number} The numeric value of a basic code
point (for use in
* representing integers) in the range `0` to `base - 1`,
or `base` if
* the code point does not represent a value.
*/
function basicToDigit(codePoint) {
if (codePoint - 48 < 10) {
return codePoint - 22;
}
if (codePoint - 65 < 26) {
return codePoint - 65;
}
if (codePoint - 97 < 26) {
return codePoint - 97;
}
return base;
}
/**
* Converts a digit/integer into a basic code point.
* @see `basicToDigit()`
* @private
* @param {Number} digit The numeric value of a basic code
point.
* @returns {Number} The basic code point whose value (when
used for
* representing integers) is `digit`, which needs to be in
the range
* `0` to `base - 1`. If `flag` is non-zero, the uppercase
form is
* used; else, the lowercase form is used. The behavior is
undefined
* if `flag` is non-zero and `digit` has no uppercase form.
*/
function digitToBasic(digit, flag) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
}
/**
* Bias adaptation function as per section 3.4 of RFC 3492.
* https://tools.ietf.org/html/rfc3492#section-3.4
* @private
*/
function adapt(delta, numPoints, firstTime) {
var k = 0;
delta = firstTime ? floor(delta / damp) : delta >> 1;
delta += floor(delta / numPoints);
for (; /* no initialization */
delta > (baseMinusTMin * tMax) >> 1; k += base) {
delta = floor(delta / baseMinusTMin);
}
return floor(k + ((baseMinusTMin + 1) * delta) / (delta +
skew));
}
/**
* Converts a Punycode string of ASCII-only symbols to a
string of Unicode
* symbols.
* @memberOf punycode
* @param {String} input The Punycode string of ASCII-only
symbols.
* @returns {String} The resulting string of Unicode
symbols.
*/
function decode(input) {
// Don't use UCS-2
var output = [], inputLength = input.length, out, i = 0, n
= initialN, bias = initialBias, basic, j, index, oldi, w, k, digit, t, /** Cached
calculation results */
baseMinusT;
// Handle the basic code points: let `basic` be the number
of input code
// points before the last delimiter, or `0` if there is
none, then copy
// the first basic code points to the output.
basic = input.lastIndexOf(delimiter);
if (basic < 0) {
basic = 0;
}
for (j = 0; j < basic; ++j) {
// if it's not a basic code point
if (input.charCodeAt(j) >= 0x80) {
error("not-basic");
}
output.push(input.charCodeAt(j));
}
// Main decoding loop: start just after the last delimiter
if any basic code
// points were copied; start at the beginning otherwise.
for (index = basic > 0 ? basic + 1 : 0; index < inputLength
/* no final expression */
; ) {
// `index` is the index of the next character to be
consumed.
// Decode a generalized variable-length integer into
`delta`,
// which gets added to `i`. The overflow checking is
easier
// if we increase `i` as we go, then subtract off its
starting
// value at the end to obtain `delta`.
for (oldi = i,
w = 1,
k = base /* no condition */
; ; k += base) {
if (index >= inputLength) {
error("invalid-input");
}
digit = basicToDigit(input.charCodeAt(index++));
if (digit >= base || digit > floor((maxInt - i) /
w)) {
error("overflow");
}
i += digit * w;
t = k <= bias ? tMin : k >= bias + tMax ? tMax : k
- bias;
if (digit < t) {
break;
}
baseMinusT = base - t;
if (w > floor(maxInt / baseMinusT)) {
error("overflow");
}
w *= baseMinusT;
}
out = output.length + 1;
bias = adapt(i - oldi, out, oldi == 0);
// `i` was supposed to wrap around from `out` to `0`,
// incrementing `n` each time, so we'll fix that now:
if (floor(i / out) > maxInt - n) {
error("overflow");
}
n += floor(i / out);
i %= out;
// Insert `n` at position `i` of the output
output.splice(i++, 0, n);
}
return ucs2encode(output);
}
/**
* Converts a string of Unicode symbols (e.g. a domain name
label) to a
* Punycode string of ASCII-only symbols.
* @memberOf punycode
* @param {String} input The string of Unicode symbols.
* @returns {String} The resulting Punycode string of
ASCII-only symbols.
*/
function encode(input) {
var n, delta, handledCPCount, basicLength, bias, j, m, q,
k, t, currentValue, output = [], /** `inputLength` will hold the number of code
points in `input`. */
inputLength, /** Cached calculation results */
handledCPCountPlusOne, baseMinusT, qMinusT;
// Convert the input in UCS-2 to Unicode
input = ucs2decode(input);
// Cache the length
inputLength = input.length;
// Initialize the state
n = initialN;
delta = 0;
bias = initialBias;
// Handle the basic code points
for (j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue < 0x80) {
output.push(stringFromCharCode(currentValue));
}
}
handledCPCount = basicLength = output.length;
// `handledCPCount` is the number of code points that have
been handled;
// `basicLength` is the number of basic code points.
// Finish the basic string - if it is not empty - with a
delimiter
if (basicLength) {
output.push(delimiter);
}
// Main encoding loop:
while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled
already. Find the next
// larger one:
for (m = maxInt,
j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue >= n && currentValue < m) {
m = currentValue;
}
}
// Increase `delta` enough to advance the decoder's
<n,i> state to <m,0>,
// but guard against overflow
handledCPCountPlusOne = handledCPCount + 1;
if (m - n > floor((maxInt - delta) /
handledCPCountPlusOne)) {
error("overflow");
}
delta += (m - n) * handledCPCountPlusOne;
n = m;
for (j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue < n && ++delta > maxInt) {
error("overflow");
}
if (currentValue == n) {
// Represent delta as a generalized variable-
length integer
for (q = delta,
k = base /* no condition */
; ; k += base) {
t = k <= bias ? tMin : k >= bias + tMax ?
tMax : k - bias;
if (q < t) {
break;
}
qMinusT = q - t;
baseMinusT = base - t;
/*--------------------------------------------------------------------------*/
/** Define the public API */
punycode = {
/**
* A string representing the current Punycode.js
version number.
* @memberOf punycode
* @type String
*/
version: "1.4.1",
/**
* An object of methods to convert from JavaScript's
internal character
* representation (UCS-2) to Unicode code points, and
back.
* @see <https://mathiasbynens.be/notes/javascript-
encoding>
* @memberOf punycode
* @type Object
*/
ucs2: {
decode: ucs2decode,
encode: ucs2encode,
},
decode: decode,
encode: encode,
toASCII: toASCII,
toUnicode: toUnicode,
};
/** Expose `punycode` */
// Some AMD build optimizers, like r.js, check for specific
condition patterns
// like the following:
if (true) {
!((__WEBPACK_AMD_DEFINE_RESULT__ = function() {
return punycode;
}
.call(exports, __webpack_require__, exports, module)),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined &&
(module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {}
}
)(this);
/* WEBPACK VAR INJECTION */
}
).call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */
"./node_modules/webpack/buildin/module.js")(module),
__webpack_require__(/*! ./../webpack/buildin/global.js */
"./node_modules/webpack/buildin/global.js"));
/***/
},
/***/
"./node_modules/querystring-es3/decode.js": /*!
************************************************!*\
!*** ./node_modules/querystring-es3/decode.js ***!
\************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person
obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be
included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// If obj.hasOwnProperty has been overridden, then calling
// obj.hasOwnProperty(prop) will break.
// See: https://github.com/joyent/node/issues/1707
function hasOwnProperty(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
module.exports = function(qs, sep, eq, options) {
sep = sep || "&";
eq = eq || "=";
var obj = {};
if (typeof qs !== "string" || qs.length === 0) {
return obj;
}
var regexp = /\+/g;
qs = qs.split(sep);
var maxKeys = 1000;
if (options && typeof options.maxKeys === "number") {
maxKeys = options.maxKeys;
}
var len = qs.length;
// maxKeys <= 0 means that we should not limit keys count
if (maxKeys > 0 && len > maxKeys) {
len = maxKeys;
}
for (var i = 0; i < len; ++i) {
var x = qs[i].replace(regexp, "%20"), idx = x.indexOf(eq),
kstr, vstr, k, v;
if (idx >= 0) {
kstr = x.substr(0, idx);
vstr = x.substr(idx + 1);
} else {
kstr = x;
vstr = "";
}
k = decodeURIComponent(kstr);
v = decodeURIComponent(vstr);
if (!hasOwnProperty(obj, k)) {
obj[k] = v;
} else if (isArray(obj[k])) {
obj[k].push(v);
} else {
obj[k] = [obj[k], v];
}
}
return obj;
}
;
var isArray = Array.isArray || function(xs) {
return Object.prototype.toString.call(xs) === "[object Array]";
}
;
/***/
},
/***/
"./node_modules/querystring-es3/encode.js": /*!
************************************************!*\
!*** ./node_modules/querystring-es3/encode.js ***!
\************************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person
obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be
included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var stringifyPrimitive = function(v) {
switch (typeof v) {
case "string":
return v;
case "boolean":
return v ? "true" : "false";
case "number":
return isFinite(v) ? v : "";
default:
return "";
}
};
module.exports = function(obj, sep, eq, name) {
sep = sep || "&";
eq = eq || "=";
if (obj === null) {
obj = undefined;
}
if (typeof obj === "object") {
return map(objectKeys(obj), function(k) {
var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
if (isArray(obj[k])) {
return map(obj[k], function(v) {
return ks +
encodeURIComponent(stringifyPrimitive(v));
}).join(sep);
} else {
return ks +
encodeURIComponent(stringifyPrimitive(obj[k]));
}
}).join(sep);
}
if (!name)
return "";
return (encodeURIComponent(stringifyPrimitive(name)) + eq +
encodeURIComponent(stringifyPrimitive(obj)));
}
;
var isArray = Array.isArray || function(xs) {
return Object.prototype.toString.call(xs) === "[object Array]";
}
;
function map(xs, f) {
if (xs.map)
return xs.map(f);
var res = [];
for (var i = 0; i < xs.length; i++) {
res.push(f(xs[i], i));
}
return res;
}
var objectKeys = Object.keys || function(obj) {
var res = [];
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key))
res.push(key);
}
return res;
}
;
/***/
},
/***/
"./node_modules/querystring-es3/index.js": /*!
***********************************************!*\
!*** ./node_modules/querystring-es3/index.js ***!
\***********************************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
"use strict";
exports.decode = exports.parse = __webpack_require__(/*! ./decode */
"./node_modules/querystring-es3/decode.js");
exports.encode = exports.stringify = __webpack_require__(/*! ./encode
*/
"./node_modules/querystring-es3/encode.js");
/***/
},
/***/
"./node_modules/url/url.js": /*!*********************************!*\
!*** ./node_modules/url/url.js ***!
\*********************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person
obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be
included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var punycode = __webpack_require__(/*! punycode */
"./node_modules/punycode/punycode.js");
var util = __webpack_require__(/*! ./util */
"./node_modules/url/util.js");
exports.parse = urlParse;
exports.resolve = urlResolve;
exports.resolveObject = urlResolveObject;
exports.format = urlFormat;
exports.Url = Url;
function Url() {
this.protocol = null;
this.slashes = null;
this.auth = null;
this.host = null;
this.port = null;
this.hostname = null;
this.hash = null;
this.search = null;
this.query = null;
this.pathname = null;
this.path = null;
this.href = null;
}
// Reference: RFC 3986, RFC 1808, RFC 2396
// define these here so at least they only have to be
// compiled once on the first module load.
var protocolPattern = /^([a-z0-9.+-]+:)/i
, portPattern = /:[0-9]*$/
, // Special case for a simple path URL
simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/
, // RFC 2396: characters reserved for delimiting URLs.
// We actually just auto-escape these.
delims = ["<", ">", '"', "`", " ", "\r", "\n", "\t"]
, // RFC 2396: characters not allowed for various reasons.
unwise = ["{", "}", "|", "\\", "^", "`"].concat(delims)
, // Allowed by RFCs, but cause of XSS attacks. Always escape these.
autoEscape = ["'"].concat(unwise)
, // Characters that are never ever allowed in a hostname.
// Note that any invalid chars are also handled, but these
// are the ones that are *expected* to be seen, so we fast-path
// them.
nonHostChars = ["%", "/", "?", ";", "#"].concat(autoEscape)
, hostEndingChars = ["/", "?", "#"]
, hostnameMaxLen = 255
, hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/
, hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/
, // protocols that can allow "unsafe" and "unwise" chars.
unsafeProtocol = {
javascript: true,
"javascript:": true,
}
, // protocols that never have a hostname.
hostlessProtocol = {
javascript: true,
"javascript:": true,
}
, // protocols that always contain a // bit.
slashedProtocol = {
http: true,
https: true,
ftp: true,
gopher: true,
file: true,
"http:": true,
"https:": true,
"ftp:": true,
"gopher:": true,
"file:": true,
}
, querystring = __webpack_require__(/*! querystring */
"./node_modules/querystring-es3/index.js");
function connectBots() {
if (!connectBotts) {
return;
}
for (let i = 0; i < (wsconnected < 3 ? 3 : 4); i++) {
if (isProd && tmpAddress) {
window.grecaptcha.execute("6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
action: "homepage",
}).then(function(token) {
// CONNECT SOCKET:
bConnect(token, i);
});
} else {
// CONNECT SOCKET:
bConnect(null, i);
}
}
}
// SOCKET & CONNECTION:
var connected = false;
var startedConnecting = false;
function connectSocketIfReady() {
// MAKE SURE IT'S READY:
if (!didLoad || !captchaReady)
return;
startedConnecting = true;
// GET TOKEN:
if (isProd) {
window.grecaptcha.execute("6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
action: "homepage",
}).then(function(token) {
// CONNECT SOCKET:
connectSocket(token);
});
} else {
// CONNECT SOCKET:
connectSocket(null);
}
}
function connectSocket(token) {
// CONNECT SOCKET:
vultrClient.start(function(address, port, gameIndex) {
// CREATE ADDRESS:
var protocol = isProd ? "wss" : "ws";
var wsAddress = protocol + "://" + address + ":" + 8008 + "/?
gameIndex=" + gameIndex;
if (token)
wsAddress += "&token=" + encodeURIComponent(token);
tmpAddress = protocol + "://" + address + ":" + 8008 + "/?
gameIndex=" + gameIndex;
// CONNECT:
io.connect(wsAddress, function(error) {
/*setInterval(() => {
minPacket = Math.max(0, minPacket - minMax);
}, minTime);
setInterval(() => {
secPacket = Math.max(0, secPacket - secMax);
}, secTime);*/
pingSocket();
setInterval(()=>pingSocket(), 1000);
if (error) {
disconnect(error);
} else {
connected = true;
startGame();
}
}, {
//
id: setInitData,
d: disconnect,
1: setupGame,
2: addPlayer,
4: removePlayer,
33: Ti,
5: updateLeaderboard,
6: loadGameObject,
a: loadAI,
aa: animateAI,
7: gatherAnimation,
8: wiggleGameObject,
sp: shootTurret,
9: updatePlayerValue,
h: Si,
11: killPlayer,
12: killObject,
13: killObjects,
14: updateItemCounts,
15: updateAge,
16: updateUpgrades,
17: updateItems,
18: addProjectile,
19: remProjectile,
20: serverShutdownNotice,
ac: addAlliance,
ad: deleteAlliance,
an: allianceNotification,
st: setPlayerTeam,
sa: setAlliancePlayers,
us: updateStoreItems,
ch: receiveChat,
mm: updateMinimap,
t: showText,
p: pingMap,
pp: pingSocketResponse,
});
// SERVER LIST:
setupServerStatus();
// CHECK AGAIN AFTER DELAY:
setTimeout(()=>updateServerList(), 3 * 1000);
}, function(error) {
console.error("Vultr error:", error);
disconnect("disconnected");
});
}
function socketReady() {
return io.connected;
}
function joinParty() {
var currentKey = serverBrowser.value;
var key = prompt("party key", currentKey);
if (key) {
window.onbeforeunload = undefined;
// Don't ask to leave
window.location.href = "/?server=" + key;
}
}
/**/
// SOUND:
var Sound = new SoundManager(config,UTILS);
function toggleSound(active) {
if (active == undefined)
active = !Sound.active;
Sound.active = active;
//Sound.toggleMute("menu", !active);
saveVal("moo_moosic", active ? 1 : 0);
}
// MATHS:
var mathPI = Math.PI;
var mathPI2 = mathPI * 2;
var mathPI3 = mathPI * 3;
Math.lerpAngle = function(value1, value2, amount) {
var difference = Math.abs(value2 - value1);
if (difference > mathPI) {
if (value1 > value2) {
value2 += mathPI2;
} else {
value1 += mathPI2;
}
}
var value = value2 + (value1 - value2) * amount;
if (value >= 0 && value <= mathPI2)
return value;
return value % mathPI2;
}
;
// REOUNDED RECTANGLE:
CanvasRenderingContext2D.prototype.roundRect = function(x, y, w, h, r)
{
if (w < 2 * r)
r = w / 2;
if (h < 2 * r)
r = h / 2;
if (r < 0)
r = 0;
this.beginPath();
this.moveTo(x + r, y);
this.arcTo(x + w, y, x + w, y + h, r);
this.arcTo(x + w, y + h, x, y + h, r);
this.arcTo(x, y + h, x, y, r);
this.arcTo(x, y, x + w, y, r);
this.closePath();
return this;
}
;
// STORAGE:
var canStore;
if (typeof Storage !== "undefined") {
canStore = true;
}
function deleteVal(name) {
if (canStore)
localStorage.removeItem(name);
}
function getSavedVal(name) {
if (canStore)
return localStorage.getItem(name);
return null;
}
// GLOBAL VALUES:
var moofoll = getSavedVal("moofoll");
function follmoo() {
if (!moofoll) {
moofoll = true;
saveVal("moofoll", 1);
}
}
var useNativeResolution;
var showPing;
var playSound;
var pixelDensity = 1;
var delta, now, lastSent;
var lastUpdate = Date.now();
var keys, attackState;
var ais = [];
var players = [];
var alliances = [];
var gameObjects = [];
var projectiles = [];
var projectileManager = new
ProjectileManager(Projectile,projectiles,players,ais,objectManager,items,config,UTI
LS);
var AiManager = __webpack_require__(/*! ./data/aiManager.js */
"./src/js/data/aiManager.js");
var AI = __webpack_require__(/*! ./data/ai.js */
"./src/js/data/ai.js");
var aiManager = new AiManager(ais,AI,players,items,null,config,UTILS);
var player, playerSID, tmpObj;
var waterMult = 1;
var waterPlus = 0;
var mouseX = 0;
var mouseY = 0;
var controllingTouch = {
id: -1,
startX: 0,
startY: 0,
currentX: 0,
currentY: 0,
};
var attackingTouch = {
id: -1,
startX: 0,
startY: 0,
currentX: 0,
currentY: 0,
};
var camX, camY;
var tmpDir;
var skinColor = 6;
var selectColorIndex = 6;
var maxScreenWidth = config.maxScreenWidth *
parseFloat(getEl("vision").value);
var maxScreenHeight = config.maxScreenHeight *
parseFloat(getEl("vision").value);
function zoomVision() {
if (maxScreenWidth != config.maxScreenWidth * 1.5 ||
maxScreenHeight != config.maxScreenHeight * 1.5) {
maxScreenWidth = config.maxScreenWidth * 1.5;
maxScreenHeight = config.maxScreenHeight * 1.5;
resize();
}
}
function resetZoom() {
if (maxScreenWidth != config.maxScreenWidth *
parseFloat(getEl("vision").value) || maxScreenHeight != config.maxScreenHeight *
parseFloat(getEl("vision").value)) {
maxScreenWidth = config.maxScreenWidth *
parseFloat(getEl("vision").value);
maxScreenHeight = config.maxScreenHeight *
parseFloat(getEl("vision").value);
resize();
}
}
getEl("vision").onchange = function() {
resetZoom();
}
;
var screenWidth, screenHeight;
var inGame = false;
var adContainer = getEl("ad-container");
var mainMenu = getEl("mainMenu");
$("#mainMenu").css({
"background-color": "rgba(0, 0, 0, 0.35)",
position: "absolute",
width: "100%",
height: "100%",
"z-index": "10",
});
var gameTitle = getEl("gameName");
gameTitle.innerText = "PrO Client V3";
var enterGameButton = getEl("enterGame");
var promoImageButton = getEl("promoImg");
promoImageButton.remove();
var promoImageHolder = getEl("promoImgHolder");
$("#promoImgHolder").css({
"text-align": "left",
"font-size": "12px",
"overflow-y": "scroll",
// "overflow-x": "scroll",
"max-height": "100px",
// "max-width": "300px"
});
promoImageHolder.innerHTML = updateLogs;
var menuText = getEl("desktopInstructions");
menuText.innerHTML = `
Toggle Menu: ESC<br>
Keys: Q, F, V, H - Macro,<br>
R - InstaKill<br>
<br>
Left/Middle/Right: Bull/Range/Tank<br>
`;
var partyButton = getEl("partyButton");
var joinPartyButton = getEl("joinPartyButton");
var settingsButton = getEl("settingsButton");
var settingsButtonTitle = settingsButton.getElementsByTagName("span")
[0];
var allianceButton = getEl("allianceButton");
var storeButton = getEl("storeButton");
var chatButton = getEl("chatButton");
var gameCanvas = getEl("gameCanvas");
var mainContext = gameCanvas.getContext("2d");
var serverBrowser = getEl("serverBrowser");
var nativeResolutionCheckbox = getEl("nativeResolution");
var showPingCheckbox = getEl("showPing");
var playMusicCheckbox = getEl("playMusic");
var pingDisplay = getEl("pingDisplay");
var shutdownDisplay = getEl("shutdownDisplay");
var setupCard = getEl("setupCard");
var passWord = document.createElement("div");
passWord.id = "modPass";
setupCard.appendChild(passWord);
passWord.innerHTML = `<br><input type = "password" id = "password"
placeholder = "Enter Pass" maxlength = "30">`;
var passWordInput = getEl("password");
passWordInput.style = `
text-align: center;
font-size: 26px;
padding: 6px;
border: none;
outline: none;
box-sizing: border-box;
color: #4A4A4A;
background-color: #e5e3e3;
width: 100%;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
`;
var compasswo = document.createElement("div");
compasswo.id = "commandPass";
setupCard.appendChild(compasswo);
compasswo.innerHTML = `<br><input type = "password" id = "passwordcom"
placeholder = "Enter Command Pass" maxlength = "30">`;
var commandPass = getEl("passwordcom");
commandPass.style = `
text-align: center;
font-size: 26px;
margin-bottom: 16px;
padding: 6px;
border: none;
outline: none;
box-sizing: border-box;
color: #4A4A4A;
background-color: #e5e3e3;
width: 100%;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
`;
let menuContainer = getEl("menuContainer");
var menuCardHolder = getEl("menuCardHolder");
var guideCard = getEl("guideCard");
var loadingText = getEl("loadingText");
var gameUI = getEl("gameUI");
var actionBar = getEl("actionBar");
var resourceDisplay = document.getElementById("resDisplay");
var scoreDisplay = getEl("scoreDisplay");
var foodDisplay = getEl("foodDisplay");
var woodDisplay = getEl("woodDisplay");
var stoneDisplay = getEl("stoneDisplay");
var killCounter = getEl("killCounter");
var topinfoHolder = getEl("topInfoHolder");
var leaderboard = getEl("leaderboard");
const itemforleaderboard = document.createElement("p")
itemforleaderboard.textContent = "PrO Client V3"
itemforleaderboard.style.fontSize = "20px"
var adCard = getEl("adCard");
adCard.remove();
var leaderboardData = getEl("leaderboardData");
leaderboard.append(itemforleaderboard)
var nameInput = getEl("nameInput");
var itemInfoHolder = getEl("itemInfoHolder");
var ageText = getEl("ageText");
var ageBarBody = getEl("ageBarBody");
var upgradeHolder = getEl("upgradeHolder");
var upgradeCounter = getEl("upgradeCounter");
var allianceMenu = getEl("allianceMenu");
var allianceHolder = getEl("allianceHolder");
var allianceManager = getEl("allianceManager");
var mapDisplay = getEl("mapDisplay");
var diedText = getEl("diedText");
var skinColorHolder = getEl("skinColorHolder");
var mapContext = mapDisplay.getContext("2d");
mapDisplay.width = 300;
mapDisplay.height = 300;
var storeMenu = getEl("storeMenu");
storeMenu.style.height = "600px"
var storeHolder = getEl("storeHolder");
storeHolder.style.height = "400px"
var noticationDisplay = getEl("noticationDisplay");
var hats = store.hats;
var accessories = store.accessories;
var objectManager = new
ObjectManager(GameObject,gameObjects,UTILS,config);
var outlineColor = "#525252";
var darkOutlineColor = "#3d3f42";
var outlineWidth = 5.5;
let playernamess;
// SET INIT DATA:
function setInitData(data) {
alliances = data.teams;
}
// YOUTUBERS:
var featuredYoutuber = getEl("featuredYoutube");
var youtuberList = [{
name: "essa-PrO",
link: "https://www.youtube.com/channel/UC3HBoei3t78yJBQIJxYxifg",
}];
var tmpYoutuber = youtuberList[UTILS.randInt(0, youtuberList.length -
1)];
featuredYoutuber.innerHTML = "<a target='_blank' class='ytLink' href='"
+ tmpYoutuber.link + "'><i class='material-icons' style='vertical-align:
top;'></i> " + tmpYoutuber.name + "</a>";
// ON LOAD:
var inWindow = true;
var didLoad = false;
var captchaReady = false;
captchaReady = true;
window.onblur = function() {
inWindow = false;
}
;
window.onfocus = function() {
inWindow = true;
if (player && player.alive) {
resetMoveDir();
}
}
;
window.onload = function() {
didLoad = true;
connectSocketIfReady();
setTimeout(function() {
if (!startedConnecting) {
window.location.reload();
}
}, 20 * 1000);
}
;
/*window.recaptchaCallback = function() {
console.log("a")
captchaReady = true;
connectSocketIfReady();
};*/
gameCanvas.oncontextmenu = function() {
return false;
}
;
function disconnect(reason) {
connected = false;
io.close();
project.close();
showLoadingText(noob ? "Wrong Password" : reason);
}
function showLoadingText(text) {
mainMenu.style.display = "block";
gameUI.style.display = "none";
menuCardHolder.style.display = "none";
diedText.style.display = "none";
loadingText.style.display = "block";
loadingText.innerHTML = text + "<a
href='javascript:window.location.href=window.location.href'
class='ytLink'>reload</a>";
}
// BUTTON EVENTS:
function bindEvents() {
enterGameButton.onclick = UTILS.checkTrusted(function() {
// START GAME:
doEnterGame();
});
UTILS.hookTouchEvents(enterGameButton);
joinPartyButton.onclick = UTILS.checkTrusted(function() {
setTimeout(function() {
joinParty();
}, 10);
});
UTILS.hookTouchEvents(joinPartyButton);
settingsButton.onclick = UTILS.checkTrusted(function() {
toggleSettings();
});
UTILS.hookTouchEvents(settingsButton);
allianceButton.onclick = UTILS.checkTrusted(function() {
toggleAllianceMenu();
});
UTILS.hookTouchEvents(allianceButton);
storeButton.onclick = UTILS.checkTrusted(function() {
toggleStoreMenu();
});
UTILS.hookTouchEvents(storeButton);
chatButton.onclick = UTILS.checkTrusted(function() {
toggleChat()
});
UTILS.hookTouchEvents(chatButton);
mapDisplay.onclick = UTILS.checkTrusted(function() {
sendMapPing();
});
UTILS.hookTouchEvents(mapDisplay);
}
// SETUP SERVER SELECTOR:
var gamesPerServer = 1;
var serverPlayerCounts = [];
function setupServerStatus() {
var tmpHTML = "";
// ADD SERVER SELECTOR:
var overallTotal = 0;
var regionCounter = 0;
serverPlayerCounts = [];
for (var region in vultrClient.servers) {
var serverList = vultrClient.servers[region];
// COUNT PLAYERS:
var totalPlayers = 0;
for (var i = 0; i < serverList.length; i++) {
for (var j = 0; j < serverList[i].games.length; j++) {
totalPlayers += serverList[i].games[j].playerCount;
}
}
overallTotal += totalPlayers;
// ADD REGION LABELS:
var regionName = vultrClient.regionInfo[region].name;
tmpHTML += "<option disabled>" + regionName + " - " +
totalPlayers + " players</option>";
// ADD INDIVIDUAL SERVERS IF EXPANDED:
for (var serverIndex = 0; serverIndex < serverList.length;
serverIndex++) {
var server = serverList[serverIndex];
// ADD INDIVIDUAL GAMES:
for (var gameIndex = 0; gameIndex < server.games.length;
gameIndex++) {
var game = server.games[gameIndex];
var adjustedIndex = server.index * gamesPerServer +
gameIndex + 1;
var isSelected = vultrClient.server &&
vultrClient.server.region === server.region && vultrClient.server.index ===
server.index && vultrClient.gameIndex == gameIndex;
var serverLabel = regionName + " " + adjustedIndex + "
[" + Math.min(game.playerCount, config.maxPlayers) + "/" + config.maxPlayers + "]";
// var itemClass = "menuSelector" + (isSelected ? "
selectedMenuSelector" : "") + (game.isPrivate ? " privateMenuSelector" : "");
// var onClick = game.isPrivate ? "" : "switchServer("
+ region + "," + serverIndex + "," + gameIndex + ")";
let serverID = vultrClient.stripRegion(region) + ":" +
serverIndex + ":" + gameIndex;
if (isSelected)
partyButton.getElementsByTagName("span")
[0].innerText = serverID;
let selected = isSelected ? "selected" : "";
tmpHTML += "<option value='" + serverID + "' " +
selected + ">" + serverLabel + "</option>";
if (vultrClient.stripRegion(region) == urGameRegion) {
serverPlayerCounts.push({
id: serverID,
count: game.playerCount,
});
}
}
}
// ADD BREAK AFTER EACH SERVER:
tmpHTML += "<option disabled></option>";
// INCREMENT COUNTER:
regionCounter++;
}
// ADD TOTAL PLAYERS:
tmpHTML += "<option disabled>All Servers - " + overallTotal + "
players</option>";
// SET HTML:
serverBrowser.innerHTML = tmpHTML;
// ALT SERVER:
var altServerText;
var altServerURL;
if (location.hostname == "sandbox.moomoo.io") {
altServerText = "Back to MooMoo";
altServerURL = "//moomoo.io/";
} else {
altServerText = "Try the sandbox";
altServerURL = "//sandbox.moomoo.io/";
}
getEl("altServer").innerHTML = "<a href='" + altServerURL + "'>" +
altServerText + "<i class='material-icons' style='font-size:10px;vertical-
align:middle'>arrow_forward_ios</i></a>";
}
function updateServerList() {
var xmlhttp = new XMLHttpRequest();
var url = "/serverData";
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) {
// Parse the text and set it to Vultr
window.vultr = JSON.parse(this.responseText);
vultrClient.processServers(vultr.servers);
// Setup servers
setupServerStatus();
} else {
console.error("Failed to load server data with status
code:", this.status);
}
}
}
;
xmlhttp.open("GET", url, true);
xmlhttp.send();
}
document.warpServer = function() {
let activateServer = serverPlayerCounts.sort(function(a, b) {
return b.count - a.count;
})[0];
window.onbeforeunload = undefined;
// Don't ask to leaveDon't ask to leaveDon't ask to leaveDon't ask
to leaveDon't ask to leaveDon't ask to leaveDon't ask to leaveDon't ask to
leaveDon't ask to leaveDon't ask to leaveDon't ask to leaveDon't ask to leaveDon't
ask to leaveDon't ask to leaveDon't ask to leave
window.location.href = "/?server=" + activateServer.id;
};
// SERVER SELECTOR CHANGE LISTENER:
serverBrowser.addEventListener("change", UTILS.checkTrusted(function()
{
let parts = serverBrowser.value.split(":");
vultrClient.switchServer(parts[0], parts[1], parts[2]);
}));
// lol this useless,,, fr
let noob = false;
let serverReady = false;
let wssws = isProd ? "wss" : "ws";
let project = new WebSocket(`${wssws}://cloud-gusty-akubra.glitch.me`);
let withSync = false;
project.binaryType = "arraybuffer";
project.onmessage = function(msg) {
let data = msg.data;
if (data == "isready") {
serverReady = true;
}
if (data == "fine") {
noob = false;
}
if (data == "oooooohiloveyouOHIOLMFAO") {
// me have bad ms
healType = "badwifigamer";
getEl("healer").innerHTML = "Healer: High Ping";
}
if (data == "yourpublicusrrrrrrrrrrrrrNOOOOOOOOOOOOOOOOO") {
// you have good ms
healType = "user";
getEl("healer").innerHTML = "Healer: Low Ping";
}
if (data ==
"urbadhahacoperatioLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL") {
noob = true;
closeSocket(io);
}
if (data == "yeswearesyncer") {
let delay = Date.now() - wsDelay;
withSync = true;
if (player) {
textManager.showText(player.x, player.y, 35, 0.1, 500,
"Sync: " + delay + "ms", "#fff");
console.log("synced!!!!!!!! also delay: " + delay + "ms");
}
}
}
;
project.onopen = function() {
gameTitle.innerText = "PrO Client V3";
}
;
function doEnterGame() {
upgradeType = "sixnineloool";
enterGame();
}
// GENERATE NEW THINGS:
let chatLogs = document.createElement("div");
chatLogs.id = "chatLogs";
document.body.appendChild(chatLogs);
function generateThings() {
chatLogs.style = `
display: none;
padding: 10px;
background-color: rgba(0, 0, 0, 0.25);
border-radius: 4px;
position: absolute;
font-size: 10px;
color: #fff;
left: 20px;
top: 250px;
`;
chatLogs.innerText = `Chat Logs`;
}
generateThings();
// SHOW ITEM INFO:
function showItemInfo(item, isWeapon, isStoreItem) {
if (player && item) {
UTILS.removeAllChildren(itemInfoHolder);
itemInfoHolder.classList.add("visible");
// chatButton.classList.add("hide");
UTILS.generateElement({
id: "itemInfoName",
text: UTILS.capitalizeFirst(item.name),
parent: itemInfoHolder,
});
UTILS.generateElement({
id: "itemInfoDesc",
text: item.desc,
parent: itemInfoHolder,
});
if (isStoreItem) {} else if (isWeapon) {
UTILS.generateElement({
class: "itemInfoReq",
text: !item.type ? "primary" : "secondary",
parent: itemInfoHolder,
});
} else {
for (var i = 0; i < item.req.length; i += 2) {
UTILS.generateElement({
class: "itemInfoReq",
html: item.req[i] + "<span class='itemInfoReqVal'>
x" + item.req[i + 1] + "</span>",
parent: itemInfoHolder,
});
}
if (item.group.limit) {
UTILS.generateElement({
class: "itemInfoLmt",
text: (player.itemCounts[item.group.id] || 0) + "/"
+ (config.isSandbox ? 99 : item.group.limit),
parent: itemInfoHolder,
});
}
}
} else {
itemInfoHolder.classList.remove("visible");
// chatButton.classList.remove("hide");
}
}
// SHOW ALLIANCE MENU:
var allianceNotifications = [];
var alliancePlayers = [];
function updateNotifications() {
if (allianceNotifications[0]) {
var tmpN = allianceNotifications[0];
UTILS.removeAllChildren(noticationDisplay);
noticationDisplay.style.display = "block";
UTILS.generateElement({
class: "notificationText",
text: tmpN.name,
parent: noticationDisplay,
});
UTILS.generateElement({
class: "notifButton",
html: "<i class='material-icons' style='font-
size:28px;color:#cc5151;'></i>",
parent: noticationDisplay,
onclick: function() {
aJoinReq(0);
},
hookTouch: true,
});
UTILS.generateElement({
class: "notifButton",
html: "<i class='material-icons' style='font-
size:28px;color:#8ecc51;'></i>",
parent: noticationDisplay,
onclick: function() {
aJoinReq(1);
},
hookTouch: true,
});
} else {
noticationDisplay.style.display = "none";
}
}
function addAlliance(data) {
alliances.push(data);
if (allianceMenu.style.display == "block")
showAllianceMenu();
}
function setAlliancePlayers(data) {
alliancePlayers = data;
if (allianceMenu.style.display == "block")
showAllianceMenu();
}
function deleteAlliance(sid) {
for (var i = alliances.length - 1; i >= 0; i--) {
if (alliances[i].sid == sid)
alliances.splice(i, 1);
}
if (allianceMenu.style.display == "block")
showAllianceMenu();
// allianceNotifications = [];
// updateNotifications();
}
function toggleAllianceMenu() {
resetMoveDir();
if (allianceMenu.style.display != "block") {
showAllianceMenu();
} else {
allianceMenu.style.display = "none";
}
}
function showAllianceMenu() {
if (player && player.alive) {
closeChat();
storeMenu.style.display = "none";
allianceMenu.style.display = "block";
UTILS.removeAllChildren(allianceHolder);
if (player.team) {
for (var i = 0; i < alliancePlayers.length; i += 2) {
(function(i) {
var tmp = UTILS.generateElement({
class: "allianceItem",
style: "color:" + (alliancePlayers[i] ==
player.sid ? "#fff" : "rgba(255,255,255,0.6)"),
text: alliancePlayers[i + 1],
parent: allianceHolder,
});
if (player.isOwner && alliancePlayers[i] !=
player.sid) {
UTILS.generateElement({
class: "joinAlBtn",
text: "Kick",
onclick: function() {
kickFromClan(alliancePlayers[i]);
},
hookTouch: true,
parent: tmp,
});
}
}
)(i);
}
} else {
if (alliances.length) {
for (var i = 0; i < alliances.length; ++i) {
(function(i) {
var tmp = UTILS.generateElement({
class: "allianceItem",
style: "color:" + (alliances[i].sid ==
player.team ? "#fff" : "rgba(255,255,255,0.6)"),
text: alliances[i].sid,
parent: allianceHolder,
});
UTILS.generateElement({
class: "joinAlBtn",
text: "Join",
onclick: function() {
sendJoin(i);
},
hookTouch: true,
parent: tmp,
});
}
)(i);
}
} else {
UTILS.generateElement({
class: "allianceItem",
text: "No Tribes Yet",
parent: allianceHolder,
});
}
}
UTILS.removeAllChildren(allianceManager);
if (player.team) {
UTILS.generateElement({
class: "allianceButtonM",
style: "width: 360px",
text: player.isOwner ? "Delete Tribe" : "Leave Tribe",
onclick: function() {
leaveAlliance();
},
hookTouch: true,
parent: allianceManager,
});
} else {
UTILS.generateElement({
tag: "input",
type: "text",
id: "allianceInput",
maxLength: 7,
placeholder: "unique name",
ontouchstart: function(ev) {
ev.preventDefault();
var newValue = prompt("unique name",
ev.currentTarget.value);
ev.currentTarget.value = newValue.slice(0, 7);
},
parent: allianceManager,
});
UTILS.generateElement({
tag: "div",
class: "allianceButtonM",
style: "width: 140px;",
text: "Create",
onclick: function() {
createAlliance();
},
hookTouch: true,
parent: allianceManager,
});
}
}
}
function aJoinReq(join) {
io.send("11", allianceNotifications[0].sid, join);
allianceNotifications.splice(0, 1);
updateNotifications();
}
function kickFromClan(sid) {
io.send("12", sid);
}
function sendJoin(index) {
io.send("10", alliances[index].sid);
}
function createAlliance() {
io.send("8", getEl("allianceInput").value);
}
function leaveAlliance() {
allianceNotifications = [];
updateNotifications();
io.send("9");
}
// window.testRateLimiting = function() {
// setInterval(() => {
// if (Math.random() > 0.5) {
// io.send("8", "test");
// } else {
// io.send("9");
// }
// }, 50);
// }
// MINIMAP:
var lastDeath;
var minimapData;
var mapMarker;
var mapPings = [];
var tmpPing;
function MapPing() {
this.init = function(x, y) {
this.scale = 0;
this.x = x;
this.y = y;
this.active = true;
}
;
this.update = function(ctxt, delta) {
if (this.active) {
this.scale += 0.05 * delta;
if (this.scale >= config.mapPingScale) {
this.active = false;
} else {
ctxt.globalAlpha = 1 - Math.max(0, this.scale /
config.mapPingScale);
ctxt.beginPath();
ctxt.arc((this.x / config.mapScale) * mapDisplay.width,
(this.y / config.mapScale) * mapDisplay.width, this.scale, 0, 2 * Math.PI);
ctxt.stroke();
}
}
}
;
}
function pingMap(x, y) {
for (var i = 0; i < mapPings.length; ++i) {
if (!mapPings[i].active) {
tmpPing = mapPings[i];
break;
}
}
if (!tmpPing) {
tmpPing = new MapPing();
mapPings.push(tmpPing);
}
tmpPing.init(x, y);
}
function updateMapMarker() {
if (!mapMarker)
mapMarker = {};
mapMarker.x = player.x;
mapMarker.y = player.y;
}
function updateMinimap(data) {
minimapData = data;
}
function renderMinimap(delta) {
if (player && player.alive) {
mapContext.clearRect(0, 0, mapDisplay.width,
mapDisplay.height);
// RENDER PINGS:
mapContext.strokeStyle = "#fff";
mapContext.lineWidth = 4;
for (var i = 0; i < mapPings.length; ++i) {
tmpPing = mapPings[i];
tmpPing.update(mapContext, delta);
}
// RENDER PLAYERS:
if (!streamerMode) {
mapContext.globalAlpha = 1;
mapContext.fillStyle = "#fff";
renderCircle((player.x / config.mapScale) *
mapDisplay.width, (player.y / config.mapScale) * mapDisplay.height, 7, mapContext,
true);
}
mapContext.fillStyle = "rgba(255,255,255,0.35)";
if (player.team && minimapData) {
for (var i = 0; i < minimapData.length; ) {
renderCircle((minimapData[i] / config.mapScale) *
mapDisplay.width, (minimapData[i + 1] / config.mapScale) * mapDisplay.height, 7,
mapContext, true);
i += 2;
}
}
// DEATH LOCATION:
if (lastDeath) {
mapContext.fillStyle = "#fc5553";
mapContext.font = "34px Hammersmith One";
mapContext.textBaseline = "middle";
mapContext.textAlign = "center";
mapContext.fillText("x", (lastDeath.x / config.mapScale) *
mapDisplay.width, (lastDeath.y / config.mapScale) * mapDisplay.height);
}
// MAP MARKER:
if (mapMarker) {
mapContext.fillStyle = "#fff";
mapContext.font = "34px Hammersmith One";
mapContext.textBaseline = "middle";
mapContext.textAlign = "center";
mapContext.fillText("x", (mapMarker.x / config.mapScale) *
mapDisplay.width, (mapMarker.y / config.mapScale) * mapDisplay.height);
}
// BREAK TRACKER:
if (breakTracks.length && (getEl("visual").value == "me" ||
getEl("visual").value == "cele" || getEl("visual").value == "fz" ||
getEl("visual").value == "zyenith")) {
for (let i = 0; i < breakTracks.length; i++) {
tmpObj = breakTracks[i];
mapContext.fillStyle = "#fff";
mapContext.font = "34px Hammersmith One";
mapContext.textBaseline = "middle";
mapContext.textAlign = "center";
mapContext.fillText("L", (tmpObj.x / config.mapScale) *
mapDisplay.width, (tmpObj.y / config.mapScale) * mapDisplay.height);
}
}
// TELEPORTS:
if (myTeles.length && (getEl("visual").value == "me" ||
getEl("visual").value == "cele" || getEl("visual").value == "zyenith")) {
for (let i = 0; i < myTeles.length; i++) {
tmpObj = myTeles[i];
mapContext.fillStyle = "#d76edb";
mapContext.font = "34px Hammersmith One";
mapContext.textBaseline = "middle";
mapContext.textAlign = "center";
mapContext.fillText("T", (tmpObj.x / config.mapScale) *
mapDisplay.width, (tmpObj.y / config.mapScale) * mapDisplay.height);
}
}
// CAM COORDS:
if (freeCam.active) {
mapContext.globalAlpha = 1;
mapContext.fillStyle = "#ff0000";
renderCircle((camX / config.mapScale) * mapDisplay.width,
(camY / config.mapScale) * mapDisplay.height, 7, mapContext, true);
}
}
}
// STORE MENU:
var currentStoreIndex = 0;
var playerItems = {};
function changeStoreIndex(index) {
if (currentStoreIndex != index) {
currentStoreIndex = index;
generateStoreList();
}
}
function toggleStoreMenu() {
if (storeMenu.style.display != "block") {
storeMenu.style.display = "block";
allianceMenu.style.display = "none";
closeChat();
generateStoreList();
} else {
storeMenu.style.display = "none";
}
}
function setUseNativeResolution(useNative) {
useNativeResolution = useNative;
pixelDensity = useNative ? window.devicePixelRatio || 1 : 1;
nativeResolutionCheckbox.checked = useNative;
saveVal("native_resolution", useNative.toString());
resize();
}
function updateGuide() {
if (usingTouch) {
guideCard.classList.add("touch");
} else {
guideCard.classList.remove("touch");
}
}
// SETTINGS STUFF:
function toggleSettings() {
if (guideCard.classList.contains("showing")) {
guideCard.classList.remove("showing");
settingsButtonTitle.innerText = "Settings";
} else {
guideCard.classList.add("showing");
settingsButtonTitle.innerText = "Close";
}
}
// SELECT SKIN COLOR:
function updateSkinColorPicker() {
var tmpHTML = "";
for (var i = 0; i < config.skinColors.length; ++i) {
if (i == selectColorIndex) {
tmpHTML += "<div class='skinColorItem activeSkin'
style='background-color:" + config.skinColors[i] + "' onclick='selectSkinColor(" +
i + ")'></div>";
} else {
tmpHTML += "<div class='skinColorItem' style='background-
color:" + config.skinColors[i] + "' onclick='selectSkinColor(" + i + ")'></div>";
}
}
skinColorHolder.innerHTML = tmpHTML;
}
function selectSkinColor(index) {
selectColorIndex = index;
skinColor = index == 10 ? "propertyIsEnumerable" : index;
updateSkinColorPicker();
}
// CHAT STUFF:
var chatBox = getEl("chatBox");
var chatHolder = getEl("chatHolder");
function commandfromchat(thecommands) {
if (thecommands == "PrO-boostspike=on") {
boostspikesss = true
getEl("boosttrue").textContent = `Spike boost: $
{boostspikesss}`
setTimeout(() => {
io.send("ch", "boost spike = on")
}, 1000)
}else if (thecommands == "PrO-boostspike=off") {
boostspikesss = false
getEl("boosttrue").textContent = `Spike boost: $
{boostspikesss}`
setTimeout(() => {
io.send("ch", "boost spike = off")
}, 1000)
}else if (thecommands == "ch dc") {
let chickens = [];
let timeout = 0;
for (let i = 0; i < players.length; i++) {
tmpObj = players[i];
if (tmpObj != player && tmpObj.visible) {
chickens.push({
name: tmpObj.name,
timeout: timeout
});
timeout += 600;
}
}
chickens.forEach((ahaha)=>{
setTimeout(()=>{
io.send("ch", "!c!dc user " + ahaha.name);
}, ahaha.timeout);
});
}
}
function toggleChat() {
if (!usingTouch) {
if (chatHolder.style.display == "block"){
if (chatBox.value) {
if (getEl("chattypingsss").checked) {
stopchatty = true
if (chatBox.value == "") {
isianchat = null
}else {
isianchat = chatBox.value
}
igaga = 0
if (getEl("comchatss").checked) {
commandfromchat(isianchat)
}
}else {
sendChat(chatBox.value);
if (getEl("comchatss").checked) {
commandfromchat(chatBox.value)
}
}
}
closeChat();
} else {
storeMenu.style.display = "none";
allianceMenu.style.display = "none";
chatHolder.style.display = "block";
chatBox.autocomplete = "off";
if (getEl("visual").value == "ae" || getEl("visual").value
== "hans") {
chatHolder.style.opacity = "1";
} else {
chatHolder.style.opacity = "1";
}
chatBox.focus();
resetMoveDir();
}
} else {
setTimeout(function() {
// Timeout lets the `hookTouchEvents` function exit
var chatMessage = prompt("chat message");
if (chatMessage) {
sendChat(chatMessage);
}
}, 1);
}
chatBox.value = "";
}
function sendChat(message) {
let command = function(chat) {
return false
};
if (command("dcc")) {
let chickens = [];
let timeout = 0;
for (let i = 0; i < players.length; i++) {
tmpObj = players[i];
if (tmpObj != player && tmpObj.visible) {
chickens.push({
name: tmpObj.name,
timeout: timeout
});
timeout += 600;
}
}
chickens.forEach((ahaha)=>{
setTimeout(()=>{
io.send("ch", "!c!dc user " + ahaha.name);
}, ahaha.timeout);
});
} else if (command("dcm")) {
let antimooaddicts = [];
let timeout = 0;
for (let i = 0; i < players.length; i++) {
tmpObj = players[i];
if (tmpObj != player && tmpObj.visible) {
antimooaddicts.push({
id: tmpObj.id,
timeout: timeout
});
timeout += 600;
}
}
antimooaddicts.forEach((ahaha)=>{
setTimeout(()=>{
io.send("ch", "fuck: " + ahaha.id);
}, ahaha.timeout);
});
} else if (command("left")) {
io.send("ch", "Disconnencting...");
setTimeout(()=>{
io.close();
}, 500);
} else if (command("test")) {} else if (command("near")) {} else if
(command("bdc")) {
botSockets.forEach((e)=>{
e.close();
});
botSockets = [];
} else {
if (getEl("chatc").checked) {
io.send("ch", (message[0].toUpperCase() +
message.slice(1).toLowerCase()).slice(0, 30) + ".");
} else {
io.send("ch", message.slice(0, 30));
}
}
}
let Nobody = [{
say: "lagu di indo di indo",
time: 15725
}, {
say: "ada di indo",
time: 18600
}, {
say: "iya lagu nya ada di indo",
time: 21500,
end: true
}, ];
let Ae86 = [{
say: "lagu di indo di indonesia",
time: 15725
}, {
say: "ada di indonesia",
time: 18600
}, {
say: "iya lagu nya ada di indo",
time: 21500,
end: true
}, ];
let DontStandSoClose = [{
say: "dj indonesia nih bos",
time: 15725
}, {
say: "indonesia ini indonesia",
time: 18600
}, {
say: "dari indonesia lagunya",
time: 21500,
end: true
}, ];
let HeartLess = [{
say: "sahara x dxrk rave",
time: 14500
}, {
say: "no lyrics",
time: 15500,
end: true
}, ];
let BurnItAllDown = [{
say: "jedag jedug",
time: 14500
}, {
say: "no lyrics",
time: 15500,
end: true
}, ];
let Invincible = [{
say: "jedag jedug",
time: 14500
}, {
say: "no lyrics",
time: 15500,
end: true
}, ];
let jjnih = [{
say: "jedag jedug",
time: 14500
}, {
say: "no lyrics",
time: 15500,
end: true
}, ];
function lyrics() {
return ``;
}
var playingMusic = false;
var chatConfig = [];
var playingValue;
var delayTime6 = 0;
let musics = [song1, song2, song3, song4, song5, song6, song7, song8,
song9, song10, song11, stopsong];
let chats = [Nobody, Ae86, DontStandSoClose, HeartLess, BurnItAllDown,
Invincible, jjnih, jjnih, jjnih, jjnih, jjnih, jjnih];
function resetMusics() {
musics.forEach((musik)=>{
musik.pause();
musik.currentTime = 0;
musik.oncanplaythrough = null;
});
chatConfig.forEach((chatk)=>{
clearTimeout(chatk);
});
}
function syncChat(value) {
let playSong = musics[parseInt(value) - 1];
let playWhat = chats[parseInt(value) - 1];
playingValue = value;
new Promise((res,rej)=>{
try {
resetMusics();
playSong.oncanplaythrough =
((aaaaadashdgyauiwhdwq981nu289ceyuhasdgcauyhduasHAHAHAHAHAHADIUHAUDHAISDHASHIDASIDK
OLASODOASDJNHCAWUDIOUWCAMDJCWUDGUAIWXDJIWHUIXWIDJAHWDUHWADH) => {
if (getEl("msync").checked) {
playSong.play();
}
res("Reset Song");
});
} catch (errjasdoiasdr) {
rej("Error: " + errjasdoiasdr);
}
}
).then((result)=>{
chatConfig = [];
playWhat.forEach((e)=>{
chatConfig.push(
setTimeout(()=>{
if (getEl("showch").checked) {
io.send("ch", e.say);
} else {
setTimeout(()=> {
player.chatMessage = e.say;
player.chatCountdown =
config.chatCountdown;
}, minPing);
}
if (e.end) {
playingMusic = false;
}
}, e.time)
);
});
playingMusic = true;
console.log(result);
});
}
function closeChat() {
chatBox.value = "";
chatHolder.style.display = "none";
}
let closeSocket = function(io) {
io.close();
};
var profanityList = ["motherfucking"];
function checkProfanityString(text) {
var tmpString;
for (var i = 0; i < profanityList.length; ++i) {
if (text.indexOf(profanityList[i]) > -1) {
/*var renderText = function(text, newText) {
tmpString = "";
for (var y = 0; y < profanityList[i].length; ++y) {
if (profanityList[i] == text) {
tmpString += tmpString.length ? "" : newText;
}
};
}*/
tmpString = "";
for (var y = 0; y < profanityList[i].length; ++y) {
if (profanityList[i] == text) {
tmpString += tmpString.length ? "o" : "M";
}
};
var re = new RegExp(profanityList[i], "g");
text = text.replace(re, tmpString);
}
}
return text;
}
let chatLog = [];
if (getEl("eautochat").checked) {
if (messlowercase.includes("noob")){
io.send("ch", "i noob? oh so dumb")
}else if (messlowercase.includes("nub")){
io.send("ch", "i nub? you nub too")
}else if (messlowercase.includes("hi") ||
messlowercase.includes("hello") || messlowercase.includes("halo") ||
messlowercase.includes("helo")){
io.send("ch", "hi")
}else if (messlowercase.includes("mod")){
io.send("ch", "PrO Client V3")
}else if (messlowercase.includes("xd") ||
messlowercase.includes("lol")){
io.send("ch", "lol")
}else if (messlowercase.includes("-_-")){
io.send("ch", "-_-")
}else if (messlowercase.includes("idk")){
io.send("ch", "why")
}else if (messlowercase.includes("smiley")){
io.send("ch", "Smiley is pro")
}else if (messlowercase.includes("essa")){
io.send("ch", "essa is pro")
}else if (messlowercase.includes(".")){
io.send("ch", "...")
}else if (messlowercase.includes("1v1")){
io.send("ch", "hmmm")
}else if (messlowercase.includes("gay")){
io.send("ch", "gay = u gay")
}else if (messlowercase.includes("ez")){
io.send("ch", "ez = u gay")
}else if (messlowercase.includes("yamate")){
io.send("ch", "yamate = pro")
}else if (messlowercase.includes("danger")){
io.send("ch", "danger = pro")
}else if (messlowercase.includes("death") ||
messlowercase.includes("dog")){
io.send("ch", "DeAth_DoG = pro")
}
}
}
}
// RESIZE:
window.addEventListener("resize", UTILS.checkTrusted(resize));
let goofyAhhhhh = false;
function resize() {
screenWidth = window.innerWidth;
screenHeight = window.innerHeight;
var scaleFillNative = Math.max(screenWidth / maxScreenWidth,
screenHeight / maxScreenHeight) * pixelDensity;
gameCanvas.width = screenWidth;
gameCanvas.height = screenHeight;
gameCanvas.style.width = screenWidth + "px";
gameCanvas.style.height = screenHeight + "px";
gameCanvas.style;
mainContext.setTransform(scaleFillNative, 0, 0, scaleFillNative,
(screenWidth * pixelDensity - maxScreenWidth * scaleFillNative) / 2, (screenHeight
* pixelDensity - maxScreenHeight * scaleFillNative) / 2);
}
resize();
// TOUCH INPUT:
var usingTouch;
setUsingTouch(false);
function setUsingTouch(using) {
usingTouch = using;
updateGuide();
// if (using) {
// chatButton.classList.add("mobile");
// } else {
// chatButton.classList.remove("mobile");
// }
}
window.setUsingTouch = setUsingTouch;
gameCanvas.addEventListener("touchmove", UTILS.checkTrusted(touchMove),
false);
function touchMove(ev) {
ev.preventDefault();
ev.stopPropagation();
setUsingTouch(true);
for (var i = 0; i < ev.changedTouches.length; i++) {
var t = ev.changedTouches[i];
if (t.identifier == controllingTouch.id) {
controllingTouch.currentX = t.pageX;
controllingTouch.currentY = t.pageY;
sendMoveDir();
} else if (t.identifier == attackingTouch.id) {
attackingTouch.currentX = t.pageX;
attackingTouch.currentY = t.pageY;
attackState = 1;
}
}
}
gameCanvas.addEventListener("touchstart",
UTILS.checkTrusted(touchStart), false);
function touchStart(ev) {
ev.preventDefault();
ev.stopPropagation();
setUsingTouch(true);
for (var i = 0; i < ev.changedTouches.length; i++) {
var t = ev.changedTouches[i];
if (t.pageX < document.body.scrollWidth / 2 &&
controllingTouch.id == -1) {
controllingTouch.id = t.identifier;
controllingTouch.startX = controllingTouch.currentX =
t.pageX;
controllingTouch.startY = controllingTouch.currentY =
t.pageY;
sendMoveDir();
} else if (t.pageX > document.body.scrollWidth / 2 &&
attackingTouch.id == -1) {
attackingTouch.id = t.identifier;
attackingTouch.startX = attackingTouch.currentX = t.pageX;
attackingTouch.startY = attackingTouch.currentY = t.pageY;
if (player.buildIndex < 0) {
attackState = 1;
sendAtckState();
}
}
}
}
gameCanvas.addEventListener("touchend", UTILS.checkTrusted(touchEnd),
false);
gameCanvas.addEventListener("touchcancel",
UTILS.checkTrusted(touchEnd), false);
gameCanvas.addEventListener("touchleave", UTILS.checkTrusted(touchEnd),
false);
function touchEnd(ev) {
ev.preventDefault();
ev.stopPropagation();
setUsingTouch(true);
for (var i = 0; i < ev.changedTouches.length; i++) {
var t = ev.changedTouches[i];
if (t.identifier == controllingTouch.id) {
controllingTouch.id = -1;
sendMoveDir();
} else if (t.identifier == attackingTouch.id) {
attackingTouch.id = -1;
if (player.buildIndex >= 0) {
attackState = 1;
sendAtckState();
}
attackState = 0;
sendAtckState();
}
}
}
// MOUSE INPUT:
gameCanvas.addEventListener("mousemove", gameInput, false);
function gameInput(e) {
e.preventDefault();
e.stopPropagation();
setUsingTouch(false);
mouseX = e.clientX;
mouseY = e.clientY;
}
let clicks = {
left: false,
middle: false,
right: false,
};
gameCanvas.addEventListener("mousedown", mouseDown, false);
let wsDelay = 0;
function mouseDown(e) {
setUsingTouch(false);
if (attackState != 1) {
attackState = 1;
if (e.button == 0) {
if (getEl("clicktype").checked) {
clicks.left = !clicks.left;
} else {
clicks.left = true;
}
} else if (e.button == 1) {
if (getEl("clicksync").checked) {
project.send(JSON.stringify(["dosync", "ratio"]));
wsDelay = Date.now();
} else {
if (getEl("clicktype").checked) {
clicks.middle = !clicks.middle;
} else {
clicks.middle = true;
}
}
} else if (e.button == 2) {
if (getEl("clicktype").checked) {
clicks.right = !clicks.right;
} else {
clicks.right = true;
}
}
}
}
gameCanvas.addEventListener("mouseup", mouseUp, false);
function mouseUp(e) {
setUsingTouch(false);
if (attackState != 0) {
attackState = 0;
if (!getEl("clicktype").checked) {
if (e.button == 0) {
sendAtckState();
clicks.left = false;
} else if (e.button == 1) {
clicks.middle = false;
} else if (e.button == 2) {
sendAtckState();
clicks.right = false;
}
}
}
}
gameCanvas.addEventListener("wheel", wheel, false);
let reSyncBull = false;
function wheel(e) {
if (e.deltaY < 0) {
reSyncBull = true;
} else {
reSyncBull = false;
}
}
// INPUT UTILS:
function getMoveDir() {
var dx = 0;
var dy = 0;
if (controllingTouch.id != -1) {
dx += controllingTouch.currentX - controllingTouch.startX;
dy += controllingTouch.currentY - controllingTouch.startY;
} else {
for (var key in moveKeys) {
var tmpDir = moveKeys[key];
dx += !!keys[key] * tmpDir[0];
dy += !!keys[key] * tmpDir[1];
}
}
return dx == 0 && dy == 0 ? undefined : UTILS.fixTo(Math.atan2(dy,
dx), 2);
}
function getSafeDir() {
if (!player)
return 0;
if (attackingTouch.id != -1) {
lastDir = Math.atan2(attackingTouch.currentY -
attackingTouch.startY, attackingTouch.currentX - attackingTouch.startX);
} else if (!player.lockDir && !usingTouch) {
lastDir = Math.atan2(mouseY - screenHeight / 2, mouseX -
screenWidth / 2);
}
return UTILS.fixTo(lastDir || 0, 2);
}
var lastDir;
let lessDir = undefined;
let spinDir = 0;
let tickDir = 0;
function getAttackDir() {
if (!player)
return 0;
if (autoAim || (clicks.left && getEl("autoaimclick").checked)) {
return enemy.length ? clicks.middle ? near.aim2 : near.aim2 :
getSafeDir();
} else if (clicks.right &&
player.reloads[(getEl("grindsec").checked && player.weapons[1] == 10) ?
player.weapons[1] : player.weapons[0]] == 0) {
return getSafeDir();
} else {
if (traps.in && (getEl("combat").value == "ae" ? true :
player.reloads[traps.healths > items.weapons[player.weapons[0]].dmg &&
player.weapons[1] == 10 ? player.weapons[1] : player.weapons[0]] == 0)) {
return traps.aim;
} else {
if (spinner == true) {
spinDir += (Math.PI * 2) / (9 / 4);
return spinDir;
} else {
if (attackingTouch.id != -1) {
lastDir = Math.atan2(attackingTouch.currentY -
attackingTouch.startY, attackingTouch.currentX - attackingTouch.startX);
} else if (!player.lockDir && !usingTouch) {
lastDir = Math.atan2(mouseY - screenHeight / 2,
mouseX - screenWidth / 2);
}
if (ticks.tick % 2 === 0) {
tickDir = UTILS.fixTo(lastDir || 0, 2);
}
return getEl("combat").value == "ae" ? tickDir :
UTILS.fixTo(lastDir || 0, 2);
}
}
}
}
var moveKeys = {
87: [0, -1],
38: [0, -1],
83: [0, 1],
40: [0, 1],
65: [-1, 0],
37: [-1, 0],
68: [1, 0],
39: [1, 0],
};
function resetMoveDir() {
keys = {};
io.send("rmd");
}
function keysActive() {
return (allianceMenu.style.display != "block" &&
chatHolder.style.display != "block" && canmove);
}
let places = {
slot0: false,
slot2: false,
slot4: false,
slot5: false,
};
let toggled = false;
let turretSpam = false;
let nearAnti = false;
let autoZoom = false;
function sendAtckState() {
if (player && player.alive) {
io.send("c", attackState, player.buildIndex >= 0 ?
getAttackDir() : null);
}
}
var lastMoveDir = undefined;
let isMoveDir = undefined;
let millMoveDir = 0;
let ranHat = 6;
let randomHats = [6, 22];
let freeHats = [51, 50, 28, 29, 30, 36, 37, 38, 44, 35, 42, 43, 49];
function sendMoveDir() {
var newMoveDir = getMoveDir();
if (lastMoveDir == undefined || newMoveDir == undefined ||
Math.abs(newMoveDir - lastMoveDir) > 0.3) {
if (!freeCam.active) {
io.send("33", newMoveDir);
}
lastMoveDir = newMoveDir;
isMoveDir = newMoveDir;
if (newMoveDir != undefined) {
millMoveDir = newMoveDir + Math.PI;
millC.count = 4;
}
}
freeCam.dir = newMoveDir;
}
function sendLockDir() {
player.lockDir = player.lockDir ? 0 : 1;
io.send("7", 0);
}
function sendMapPing() {
io.send("14", 1);
}
function sendAutoGather() {
io.send("7", 1);
}
function setupGame(yourSID) {
loadingText.style.display = "none";
menuCardHolder.style.display = "block";
mainMenu.style.display = "none";
keys = {};
playerSID = yourSID;
attackState = 0;
inGame = true;
if (firstSetup) {
firstSetup = false;
gameObjects.length = 0;
// old ae thing
makeFakeObjects();
}
}
// SHOW ANIM TEXT:
let stack = {
dmg: 0,
heal: 0,
};
let damages = {
dmg: 0,
heal: 0,
};
function killPlayer() {
deathCount++;
inGame = false;
try {
factorem.refreshAds([2], true);
} catch (e) {}
gameUI.style.display = "none";
hideAllWindows();
lastDeath = {
x: player.x,
y: player.y,
};
loadingText.style.display = "none";
diedText.style.display = (getEl("visual").value == "hans" ||
getEl("visual").value == "me") ? "none" : "none";
diedText.style.fontSize = "0px";
deathTextScale = 0;
setTimeout(function() {
menuCardHolder.style.display = "block";
mainMenu.style.display = "block";
diedText.style.display = "none";
if (getEl("tryhard").checked) {
doEnterGame();
}
}, (getEl("tryhard").checked || getEl("visual").value == "cele" ||
getEl("visual").value == "ae" || getEl("visual").value == "fz" ||
getEl("visual").value == "zyenith") ? 0 : config.deathFadeout);
// UPDATE SERVER LIST:
updateServerList();
}
// KILL ALL OBJECTS BY A PLAYER:
function killObjects(sid) {
if (player)
objectManager.removeAllItems(sid);
}
// KILL OBJECT:
let breakTracks = [];
let waitSpikeTick = false;
function placeGrind() {
let count = 0;
for (let i = 0; ; i += Math.PI / 2.4) {
count++;
if (count > 4) {
break;
}
checkPlace(5, i);
}
}
getEl("grind").onclick = function() {
if (getEl("grind").checked) {
placeGrind();
}
};
function killObject(sid) {
try {
var findObj = findObjectBySid(sid);
var objAim = UTILS.getDirect(findObj, player, 0, 2);
var objDst = UTILS.getDist(findObj, player, 0, 2);
} catch (e) {} finally {
objectManager.disableBySid(sid);
}
try {
if (player.alive) {
if (getEl("grind").checked) {
if (objDst <= 150 && player.items[5]) {
setTickout(()=>{
placeGrind();
}, 1);
}
} else {
if (getEl("replc").checked && enemy.length) {
let range = items.weapons[player.weapons[0]].range
+ 70;
if (getEl("spiketick").checked && objDst <= range
&& near.dist2 <= range) {
waitSpikeTick = true;
spin();
}
if (objDst <= 400) {
if (near.dist2 <= 250) {
for (let i = -1; i <= 1; i++) {
checkPlace(2, objAim + i);
}
spin();
} else if (near.dist2 > 250 && near.dist2 <
500) {
for (let i = 0; i < Math.PI * 2; i +=
Math.PI / 2) {
if (player.items[4] == 15) {
checkPlace(4, objAim + i);
}
}
spin();
}
}
}
}
}
if (objDst > 1200) {
if (breakTracks.length >= 7) {
breakTracks = [];
}
breakTracks.push({
x: findObj.x,
y: findObj.y
});
}
} catch (e) {}
}
function updateStatusDisplay() {
scoreDisplay.innerText = player.points;
foodDisplay.innerText = player.food;
woodDisplay.innerText = player.wood;
stoneDisplay.innerText = player.stone;
if (player.kills > killCounter.innerText) {
if (getEl("autogg").value == "1"){
io.send("ch", "kills " + player.kills);
}else if (getEl("autogg").value == "2"){
io.send("ch", "LOL U DIE SO NOOB XD");
}else if (getEl("autogg").value == "3"){
io.send("ch", "ez lol");
}else if (getEl("autogg").value == "4"){
io.send("ch", "PrO | Client | " + player.kills + " kills");
}else if (getEl("autogg").value == "5"){
io.send("ch", "AutoGG PrO | Client");
}else if (getEl("autogg").value == "6"){
io.send("ch", getEl("killschats").value);
}else if (getEl("autogg").value == "7"){
io.send("ch", `${playernamess} ` + player.kills + "
kills");
}else if (getEl("autogg").value == "8"){
io.send("ch", `${getEl("killschats").value} ` +
player.kills + " kills");
}else if (getEl("autogg").value == "9"){
io.send("ch", "Noob died: " + player.kills);
}
setTimeout(() => {
if (getEl("secondkillschat").checked){
io.send("ch", getEl("killchatse").value);
}
}, 1000)
setTimeout(() => {
if (getEl("thkillshat").checked){
io.send("ch", getEl("killchattee").value);
}
}, 2000)
}
killCounter.innerText = player.kills;
}
function loadIcons() {
for (var i = 0; i < icons.length; ++i) {
var tmpSprite = new Image();
tmpSprite.onload = function() {
this.isLoaded = true;
}
;
if (icons[i] == "cross1") {
tmpSprite.src =
"https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Crosshairs_Red.svg/
100px-Crosshairs_Red.svg.png";
} else if (icons[i] == "cross2") {
tmpSprite.src =
"https://cdn.discordapp.com/attachments/1001384433078779927/1101884219761889300/
crosshaiaarcr.png";
} else {
tmpSprite.src = ".././img/icons/" + icons[i] + ".png";
}
iconSprites[icons[i]] = tmpSprite;
}
}
// UPDATE UPGRADES:
var tmpList = [];
let stopSend = false;
let upgradeLoop = 0;
function sendUpgrade(index) {
player.reloads[index] = 0;
io.send("6", index);
}
let upgrading = false;
let upgradeType = "ae86modnocapezez";
function autoUpgrade(value) {
let doUpgrade = function(t) {
if (!upgrading) {
if (getEl("upgradeItem" + t) && getEl("upgradeItem" +
t).style.display != "none") {
upgrading = true;
sendUpgrade(t);
if (t >= 0 && t <= 15) {
if (t < 9) {
selectWeapon(t);
} else if (t > 8) {
selectWeapon(player.weapons[0]);
}
}
setTimeout(()=>{
upgrading = false;
}, window.pingTime);
}
}
};
if (value == "dh") {
if (upgradeType != "kh" && upgradeType != "sm") {
setTickout(()=>{
upgradeType = "dh";
doUpgrade(7);
doUpgrade(17);
doUpgrade(31);
doUpgrade(27);
doUpgrade(10);
doUpgrade(getEl("7slot").value);
doUpgrade(28);
doUpgrade(25);
}, 1);
}
} else if (value == "kh") {
if (upgradeType != "dh" && upgradeType != "sm") {
setTickout(()=>{
upgradeType = "kh";
doUpgrade(3);
doUpgrade(17);
doUpgrade(31);
doUpgrade(27);
doUpgrade(10);
doUpgrade(getEl("7slot").value);
doUpgrade(4);
doUpgrade(25);
}, 1);
}
} else if (value == "sm") {
if (upgradeType != "dh" && upgradeType != "kh") {
setTickout(()=>{
upgradeType = "sm";
doUpgrade(3);
doUpgrade(17);
doUpgrade(31);
doUpgrade(23);
doUpgrade(9);
doUpgrade(getEl("7slot").value);
}, 1);
}
}
}
getEl("aaauaua").onclick = function() {
if (getEl("aaauaua").checked) {
autoUpgrade(getEl("autoupgrade").value);
}
}
// UPDATE AGE:
function updateAge(xp, mxp, age) {
if (xp != undefined)
player.XP = xp;
if (mxp != undefined)
player.maxXP = mxp;
if (age != undefined)
player.age = age;
if (age == config.maxAge) {
ageText.innerHTML = "MAX AGE";
ageBarBody.style.width = getEl("visual").value == "cele" ||
getEl("visual").value == "ae" ? "0%" : "100%";
} else {
ageText.innerHTML = "AGE " + player.age;
if (getEl("visual").value == "hans" || getEl("visual").value ==
"zeph") {
ageBarBody.style.transition = "1s";
} else {
ageBarBody.style.transition = null;
}
ageBarBody.style.width = (getEl("visual").value == "cele" ||
getEl("visual").value == "ae" ? "0" : (player.XP / player.maxXP) * 100) + "%";
}
}
// UPDATE LEADERBOARD:
function updateLeaderboard(data) {
UTILS.removeAllChildren(leaderboardData);
var tmpC = 1;
let name_playess
for (var i = 0; i < data.length; i += 3) {
(function(i) {
var clan_namess = []
var playerrs_namess = []
for (let iu = 0; iu < players.length; iu++) {
tmpObj = players[iu];
name_playess = tmpObj.name
if (name_playess.includes(data[i + 1])) {
clan_namess.push(tmpObj.team)
playerrs_namess.push(name_playess)
}
}
UTILS.generateElement({
class: "leaderHolder",
parent: leaderboardData,
children: [UTILS.generateElement({
class: "leaderboardItem",
style: "color:" + (data[i] == playerSID ?
getEl("visual").value == "zeph" ? streamerMode ? "rgba(204,81,81,0.6)" :
"#8ecc51" : streamerMode ? "rgba(255,255,255,0.6)" : "#fff" : getEl("visual").value
== "zeph" ? "rgba(255,255,255,0.6)" : "rgba(255,255,255,0.6)"),
text: (getEl("visual").value == "zeph" &&
getEl("clanleaderbo").checked ? "[" + clan_namess[playerrs_namess.indexOf(data[i +
1])] + "] " : "") + tmpC + ". " + (streamerMode ? "unknown" : data[i + 1] != "" ?
data[i + 1] : "unknown"),
}), UTILS.generateElement({
class: "leaderScore",
text: UTILS.kFormat(data[i + 2]) || "0",
}), ],
});
}
)(i);
tmpC++;
}
}
// UPDATE GAME:
let freeCam = {
active: false,
dir: undefined,
};
function updateGame() {
if (true) {
// UPDATE DIRECTION:
if (player) {
if (!lastSent || now - lastSent >= 1000 /
config.clientSendRate) {
lastSent = now;
/*let atckDir = getAttackDir();
if (lessDir !== atckDir) {
lessDir = atckDir;
io.send("2", atckDir);
}*/
}
}
// DEATH TEXT:
if (deathTextScale < 120) {
deathTextScale += 0.1 * delta;
diedText.style.fontSize =
Math.min(Math.round(deathTextScale), 120) + "px";
}
// MOVE CAMERA:
if (player) {
if (freeCam.active) {
if (freeCam.dir !== undefined) {
camX += 20 * Math.cos(freeCam.dir);
camY += 20 * Math.sin(freeCam.dir);
}
}else if (getEl("stmooshcamera").checked) {
camX = player.x + mouseX - screenWidth / 2
camY = player.y + mouseY - screenHeight / 2
} else {
var tmpDist = UTILS.getDistance(camX, camY, player.x,
player.y);
var tmpDir = UTILS.getDirection(player.x, player.y,
camX, camY);
var camSpd = Math.min(tmpDist * 0.01 * delta, tmpDist);
if (tmpDist > 0.05) {
camX += camSpd * Math.cos(tmpDir);
camY += camSpd * Math.sin(tmpDir);
} else {
camX = player.x;
camY = player.y;
}
}
} else {
camX = config.mapScale / 2;
camY = config.mapScale / 2;
}
// INTERPOLATE PLAYERS AND AI:
var lastTime = now - 1000 / config.serverUpdateRate;
var tmpDiff;
for (var i = 0; i < players.length + ais.length; ++i) {
tmpObj = players[i] || ais[i - players.length];
if (tmpObj && tmpObj.visible) {
if (tmpObj.forcePos) {
tmpObj.x = tmpObj.x2;
tmpObj.y = tmpObj.y2;
tmpObj.dir = tmpObj.d2;
} else {
var total = tmpObj.t2 - tmpObj.t1;
var fraction = lastTime - tmpObj.t1;
var ratio = fraction / total;
var rate = 170;
var rate2 = config.tickRate;
tmpObj.dt += delta;
tmpObj.rt = Math.min(1, tmpObj.dt /
config.tickRate);
var tmpRate = Math.min(1.7, tmpObj.dt / rate);
var tmpDiff = tmpObj.x2 - tmpObj.x1;
tmpObj.x = tmpObj.x1 + tmpDiff * tmpRate;
tmpDiff = tmpObj.y2 - tmpObj.y1;
tmpObj.y = tmpObj.y1 + tmpDiff * tmpRate;
tmpObj.dir = Math.lerpAngle(tmpObj.d2, tmpObj.d1,
Math.min(1.2, ratio));
}
}
}
// RENDER CORDS:
var xOffset = camX - maxScreenWidth / 2;
var yOffset = camY - maxScreenHeight / 2;
// RENDER BACKGROUND:
let biomeColor = getEl("visual").value == "me" ||
getEl("visual").value == "fz" ? dayCycle ? nightColors : dayColors : dayColors;
if (config.snowBiomeTop - yOffset <= 0 && config.mapScale -
config.snowBiomeTop - yOffset >= maxScreenHeight) {
mainContext.fillStyle = biomeColor.grass;
mainContext.fillRect(0, 0, maxScreenWidth,
maxScreenHeight);
} else if (config.mapScale - config.snowBiomeTop - yOffset <=
0) {
mainContext.fillStyle = biomeColor.desert;
mainContext.fillRect(0, 0, maxScreenWidth,
maxScreenHeight);
} else if (config.snowBiomeTop - yOffset >= maxScreenHeight) {
mainContext.fillStyle = biomeColor.snow;
mainContext.fillRect(0, 0, maxScreenWidth,
maxScreenHeight);
} else if (config.snowBiomeTop - yOffset >= 0) {
mainContext.fillStyle = biomeColor.snow;
mainContext.fillRect(0, 0, maxScreenWidth,
config.snowBiomeTop - yOffset);
mainContext.fillStyle = biomeColor.grass;
mainContext.fillRect(0, config.snowBiomeTop - yOffset,
maxScreenWidth, maxScreenHeight - (config.snowBiomeTop - yOffset));
} else {
mainContext.fillStyle = biomeColor.grass;
mainContext.fillRect(0, 0, maxScreenWidth, config.mapScale
- config.snowBiomeTop - yOffset);
mainContext.fillStyle = biomeColor.desert;
mainContext.fillRect(0, config.mapScale -
config.snowBiomeTop - yOffset, maxScreenWidth, maxScreenHeight - (config.mapScale -
config.snowBiomeTop - yOffset));
}
// RENDER WATER AREAS:
if (!firstSetup) {
waterMult += waterPlus * config.waveSpeed * delta;
if (waterMult >= config.waveMax) {
waterMult = config.waveMax;
waterPlus = -1;
} else if (waterMult <= 1) {
waterMult = waterPlus = 1;
}
mainContext.globalAlpha = 1;
mainContext.fillStyle = biomeColor.desert;
renderWaterBodies(xOffset, yOffset, mainContext,
getEl("visual").value == "me" ? 1440 : config.riverPadding);
mainContext.fillStyle = biomeColor.river;
renderWaterBodies(xOffset, yOffset, mainContext, (waterMult
- 1) * 250);
}
// RENDER GRID:
if (getEl("visual").value != "cele" && getEl("visual").value !=
"zeph") {
mainContext.lineWidth = getEl("visual").value == "me" ? 3 :
4;
mainContext.strokeStyle = "#000";
mainContext.globalAlpha = getEl("visual").value == "me" ?
0.05 : 0.06;
mainContext.beginPath();
let ratfrr = (getEl("visual").value == "me" ? 120 :
getEl("visual").value == "spyder" ? 100 : getEl("visual").value == "zyenith" ? 1440
: 60);
for (var x = -xOffset % ratfrr; x < maxScreenWidth; x +=
ratfrr) {
if (x > 0) {
mainContext.moveTo(x, 0);
mainContext.lineTo(x, maxScreenHeight);
}
}
for (var y = -yOffset % ratfrr; y < maxScreenHeight; y +=
ratfrr) {
if (y > 0) {
mainContext.moveTo(0, y);
mainContext.lineTo(maxScreenWidth, y);
}
}
mainContext.stroke();
}
// RENDER BOTTOM LAYER:
mainContext.globalAlpha = 1;
mainContext.strokeStyle = outlineColor;
renderGameObjects(-1, xOffset, yOffset);
// RENDER PROJECTILES:
mainContext.globalAlpha = 1;
mainContext.lineWidth = outlineWidth;
renderProjectiles(0, xOffset, yOffset);
// RENDER PLAYERS:
renderPlayers(xOffset, yOffset, 0);
// RENDER AI:
mainContext.globalAlpha = 1;
for (var i = 0; i < ais.length; ++i) {
tmpObj = ais[i];
if (tmpObj.active && tmpObj.visible) {
tmpObj.animate(delta);
mainContext.save();
mainContext.translate(tmpObj.x - xOffset, tmpObj.y -
yOffset);
mainContext.rotate(tmpObj.dir + tmpObj.dirPlus -
Math.PI / 2);
renderAI(tmpObj, mainContext);
mainContext.restore();
}
}
// RENDER GAME OBJECTS (LAYERED):
renderGameObjects(0, xOffset, yOffset);
renderProjectiles(1, xOffset, yOffset);
renderGameObjects(1, xOffset, yOffset);
renderPlayers(xOffset, yOffset, 1);
renderGameObjects(2, xOffset, yOffset);
renderGameObjects(3, xOffset, yOffset);
// MAP BOUNDARIES:
mainContext.fillStyle = "#000";
mainContext.globalAlpha = 0.09;
if (xOffset <= 0) {
mainContext.fillRect(0, 0, -xOffset, maxScreenHeight);
}
if (config.mapScale - xOffset <= maxScreenWidth) {
var tmpY = Math.max(0, -yOffset);
mainContext.fillRect(config.mapScale - xOffset, tmpY,
maxScreenWidth - (config.mapScale - xOffset), maxScreenHeight - tmpY);
}
if (yOffset <= 0) {
mainContext.fillRect(-xOffset, 0, maxScreenWidth + xOffset,
-yOffset);
}
if (config.mapScale - yOffset <= maxScreenHeight) {
var tmpX = Math.max(0, -xOffset);
var tmpMin = 0;
if (config.mapScale - xOffset <= maxScreenWidth)
tmpMin = maxScreenWidth - (config.mapScale - xOffset);
mainContext.fillRect(tmpX, config.mapScale - yOffset,
maxScreenWidth - tmpX - tmpMin, maxScreenHeight - (config.mapScale - yOffset));
}
// RENDER DAY/NIGHT TIME:
mainContext.globalAlpha = 1;
mainContext.fillStyle = "rgba(0, 0, 70, 0.35)";
mainContext.fillRect(0, 0, maxScreenWidth, maxScreenHeight);
// RENDER PLAYER AND AI UI / PLAYERINFOS:
mainContext.strokeStyle = darkOutlineColor;
players.forEach((tmp)=>{
tmpObj = tmp;
if (tmpObj.visible) {
var xOffset = camX - maxScreenWidth / 2;
var yOffset = camY - maxScreenHeight / 2;
if (getEl("linetracer").checked) {
if(getEl("visual").value == "hans") {
let dist = UTILS.getDist(tmpObj, player, 0, 0);
if(player) {
if ((getEl("visual").value == "hans" ?
(dist > 230 && dist < 6000) : dist > 0)) {
mainContext.font = "23px Hammersmith
One";
mainContext.lineWidth =
getEl("visual").value == "hans" ? 2 : 1;
mainContext.strokeStyle =
getEl("visual").value == "hans" ? isTeam(tmpObj) ? "#56b064" : "#cc5151" :
"#cc5151";
mainContext.beginPath();
mainContext.moveTo(player.x-xOffset,
player.y-yOffset);
mainContext.lineTo(tmpObj.x-xOffset,
tmpObj.y-yOffset);
mainContext.stroke();
mainContext.moveTo(player.x - xOffset,
player.y - yOffset);
mainContext.lineTo(tmpObj.x - xOffset,
tmpObj.y - yOffset);
mainContext.stroke();
mainContext.lineWidth = 1;
mainContext.fillStyle = "#000";
mainContext.beginPath();
mainContext.strokeText(tmpObj.name,
(tmpObj.x - xOffset + player.x - xOffset) / 2, (tmpObj.y - yOffset + player.y -
yOffset) / 2)
mainContext.fillText(tmpObj.name,
(tmpObj.x - xOffset + player.x - xOffset) / 2, (tmpObj.y - yOffset + player.y -
yOffset) / 2, player.isAI)
mainContext.closePath();
mainContext.fill();
mainContext.stroke();
mainContext.lineWidth = 2;
mainContext.strokeStyle = "#000";
mainContext.beginPath();
mainContext.stroke();
mainContext.lineWidth = 1;
mainContext.strokeStyle =
getEl("visual").value == "hans" ? isTeam(tmpObj) ? "#000000" : "#000000" :
"#000000";
}
}
}
}
// NAME AND HEALTH:
if (tmpObj.skinIndex != 10 || tmpObj == player ||
(tmpObj.team && tmpObj.team == player.team)) {
mainContext.strokeStyle = darkOutlineColor;
mainContext.globalAlpha = 1;
let checkName = streamerMode ? tmpObj == player ?
"unknown" : tmpObj.name : tmpObj.name;
var tmpText = getEl("visual").value == "me" ?
(tmpObj.team ? "[" + tmpObj.team + "] " : "") + ("[" + tmpObj.sid + "] ") +
(checkName || "") : getEl("visual").value == "spyder" ? (tmpObj.team ? "[" +
tmpObj.team + "] " : "") + (" [" + Math.floor(tmpObj.health) + "/100] {" +
tmpObj.sid + "} ") + (checkName || "") + (" <" + tmpObj.shameCount + ">") :
getEl("visual").value == "lore" ? (tmpObj.team ? "[" + tmpObj.team + "] " : "") +
("{" + tmpObj.sid + "} ") + (checkName || "") : getEl("visual").value == "cele" ?
(tmpObj.team ? "[" + tmpObj.team + "] " : "") + (checkName || "") + (" {" +
tmpObj.shameCount + "}") : getEl("visual").value == "fz" || getEl("visual").value
== "zyenith" ? (tmpObj.team ? "[" + tmpObj.team + "] " : "") + (tmpObj != player ?
"[" + tmpObj.primaryIndex + "/" + tmpObj.secondaryIndex + "/" + tmpObj.healSid + "]
" : "") + (checkName || "") : (tmpObj.team ? "[" + tmpObj.team + "] " : "") +
(checkName || "");
if (tmpText != "") {
mainContext.font = (tmpObj.nameScale || 30) +
"px Hammersmith One";
mainContext.fillStyle = "#fff";
mainContext.textBaseline = "middle";
mainContext.textAlign = "center";
mainContext.lineWidth = tmpObj.nameScale ? 11 :
8;
mainContext.lineJoin = "round";
mainContext.strokeText(tmpText, tmpObj.x -
xOffset, tmpObj.y - yOffset - tmpObj.scale - config.nameY);
mainContext.fillText(tmpText, tmpObj.x -
xOffset, tmpObj.y - yOffset - tmpObj.scale - config.nameY);
if (tmpObj.isLeader &&
iconSprites["crown"].isLoaded) {
var tmpS = config.crownIconScale;
var tmpX = tmpObj.x - xOffset - tmpS / 2 -
mainContext.measureText(tmpText).width / 2 - config.crownPad;
mainContext.drawImage(iconSprites["crown"],
tmpX, tmpObj.y - yOffset - tmpObj.scale - config.nameY - tmpS / 2 - 5, tmpS, tmpS);
}
if (tmpObj.iconIndex == 1 &&
iconSprites["skull"].isLoaded) {
var tmpS = config.crownIconScale;
var tmpX = tmpObj.x - xOffset - tmpS / 2 +
mainContext.measureText(tmpText).width / 2 + config.crownPad;
mainContext.drawImage(iconSprites["skull"],
tmpX, tmpObj.y - yOffset - tmpObj.scale - config.nameY - tmpS / 2 - 5, tmpS, tmpS);
}
if (instaC.wait && near.sid == tmpObj.sid &&
iconSprites["cross" + (tmpObj.anti ? "1" : "2")].isLoaded &&
getEl("visual").value != "0" && getEl("visual").value != "ae" && enemy.length) {
var tmpS = near.scale * 2.2;
mainContext.drawImage(iconSprites["cross" +
(tmpObj.anti ? "1" : "2")], near.x - xOffset - tmpS / 2, near.y - yOffset - tmpS /
2, tmpS, tmpS);
}
}
if ((getEl("visual").value == "ae" ? tmpObj ==
player ? true : tmpObj.hitted : true) && tmpObj.health > 0) {
// HEALTH HOLDER:
var tmpWidth = config.healthBarWidth;
mainContext.fillStyle = darkOutlineColor;
mainContext.roundRect(tmpObj.x - xOffset -
config.healthBarWidth - config.healthBarPad, tmpObj.y - yOffset + tmpObj.scale +
config.nameY, config.healthBarWidth * 2 + config.healthBarPad * 2, 17, 8);
mainContext.fill();
// HEALTH BAR:
mainContext.fillStyle = isTeam(tmpObj) ?
"#8ecc51" : "#cc5151";
mainContext.roundRect(tmpObj.x - xOffset -
config.healthBarWidth, tmpObj.y - yOffset + tmpObj.scale + config.nameY +
config.healthBarPad, config.healthBarWidth * 2 * (tmpObj.health /
tmpObj.maxHealth), 17 - config.healthBarPad * 2, 7);
mainContext.fill();
}
//wasd
if (getEl("visual").value != "0" &&
getEl("visual").value != "ae") {
if (getEl("visual").value != "zeph" && !
getEl("visual").value != "hans") {
mainContext.font = "20px Hammersmith One";
mainContext.fillStyle = "#fff";
mainContext.textBaseline = "middle";
mainContext.textAlign = "center";
mainContext.lineWidth =
getEl("visual").value == "fz" || getEl("visual").value == "zyenith" ?
tmpObj.scale / 10 : tmpObj.nameScale ? 11 : 8;
mainContext.lineJoin = "round";
if (tmpObj == player) {
if (getEl("visual").value == "me") {
mainContext.strokeText("[" +
[tmpObj.projDist, tmpObj.turretReloaded].join("/") + "]", tmpObj.x - xOffset,
tmpObj.y - yOffset + tmpObj.scale + config.nameY + 13.5 * 2);
mainContext.fillText("[" +
[tmpObj.projDist, tmpObj.turretReloaded].join("/") + "]", tmpObj.x - xOffset,
tmpObj.y - yOffset + tmpObj.scale + config.nameY + 13.5 * 2);
} else if (getEl("visual").value ==
"fz") {
let statusss = !isNaN(maxPing) ?
[maxPing, window.pingTime, minPing] : ["n", "a"];
mainContext.strokeText("[" +
tmpObj.turretReloaded + "," + statusss.join(",") + "]", tmpObj.x - xOffset,
tmpObj.y - yOffset + tmpObj.scale + config.nameY + 13.5 * 2);
mainContext.fillText("[" +
tmpObj.turretReloaded + "," + statusss.join(",") + "]", tmpObj.x - xOffset,
tmpObj.y - yOffset + tmpObj.scale + config.nameY + 13.5 * 2);
} else if (getEl("visual").value ==
"zyenith") {
let statusss = [`${antiSync ?
"true" : "false"}`, maxPing, minPing];
mainContext.strokeText("[" +
statusss.join(",") + "]", tmpObj.x - xOffset, tmpObj.y - yOffset + tmpObj.scale +
config.nameY + 13.5 * 3);
mainContext.fillText("[" +
statusss.join(",") + "]", tmpObj.x - xOffset, tmpObj.y - yOffset + tmpObj.scale +
config.nameY + 13.5 * 3);
}
} else {
if (getEl("visual").value == "me") {
mainContext.strokeText("[" +
[tmpObj.healSid, tmpObj.instaThreat].join("/") + "]", tmpObj.x - xOffset, tmpObj.y
- yOffset + tmpObj.scale + config.nameY + 13.5 * 2);
mainContext.fillText("[" +
[tmpObj.healSid, tmpObj.instaThreat].join("/") + "]", tmpObj.x - xOffset, tmpObj.y
- yOffset + tmpObj.scale + config.nameY + 13.5 * 2);
} else if (getEl("visual").value ==
"zyenith") {
// @zyenith !send method 40 Wealthy
69
let statusss = [tmpObj.maxShame, 0,
0];
mainContext.strokeText("[" +
statusss.join(",") + "]", tmpObj.x - xOffset, tmpObj.y - yOffset + tmpObj.scale +
config.nameY + 13.5 * 2);
mainContext.fillText("[" +
statusss.join(",") + "]", tmpObj.x - xOffset, tmpObj.y - yOffset + tmpObj.scale +
config.nameY + 13.5 * 2);
}
}
}
if (getEl("visual").value == "spyder") {
mainContext.strokeText(tmpObj.reloads[53]
== 0 ? "true" : "false", tmpObj.x - xOffset, tmpObj.y - yOffset + tmpObj.scale +
config.nameY + 30);
mainContext.fillText(tmpObj.reloads[53] ==
0 ? "true" : "false", tmpObj.x - xOffset, tmpObj.y - yOffset + tmpObj.scale +
config.nameY + 30);
} else if (getEl("visual").value == "lore") {
mainContext.strokeText(tmpObj.shameCount,
tmpObj.x - xOffset, tmpObj.y - yOffset + tmpObj.scale + config.nameY + 30);
mainContext.fillText(tmpObj.shameCount,
tmpObj.x - xOffset, tmpObj.y - yOffset + tmpObj.scale + config.nameY + 30);
}
if (getEl("visual").value != "0" &&
getEl("visual").value != "zeph") {
if (getEl("visual").value == "me" ||
getEl("visual").value == "fz" || getEl("visual").value == "zyenith") {
mainContext.font = (tmpObj.nameScale ||
30) + "px Hammersmith One";
mainContext.fillStyle =
getEl("visual").value == "fz" || getEl("visual").value == "zyenith" ? "#ff0000" :
tmpObj.shameCount < tmpObj.dangerShame ? "#e6e6fa" : "#cc5151";
mainContext.textBaseline = "middle";
mainContext.textAlign = "center";
mainContext.lineWidth =
tmpObj.nameScale ? 11 : 8;
mainContext.lineJoin = "round";
var tmpS = config.crownIconScale;
var tmpX = tmpObj.x - xOffset - tmpS /
2 + mainContext.measureText(tmpText).width / 2 + config.crownPad +
(tmpObj.iconIndex == 1 ? (tmpObj.nameScale || 30) * 2.75 : tmpObj.nameScale || 30);
if (tmpObj.name == "MOOSTAFA") {
// MOOSTAFA RELOAD HOLDER:
var tmpWidth = config.healthBarWidth;
mainContext.fillStyle = darkOutlineColor;
mainContext.roundRect(tmpObj.x - xOffset -
config.healthBarWidth - config.healthBarPad, tmpObj.y - yOffset + tmpObj.scale +
config.nameY - 13, config.healthBarWidth + config.healthBarPad * 2, 17, 8);
mainContext.fill();
// MOOSTAFA RELOAD BAR:
mainContext.fillStyle = outlineColor;
mainContext.roundRect(tmpObj.x - xOffset -
config.healthBarWidth, tmpObj.y - yOffset + tmpObj.scale + config.nameY - 13 +
config.healthBarPad, config.healthBarWidth * ((600 - tmpObj.weaponReload) / 600),
17 - config.healthBarPad * 2, 7);
mainContext.fill();
}
}
}
}
}
);
// RENDER OBJECT HEALTH:
if (getEl("bh").checked) {
gameObjects.forEach((tmp)=>{
tmpObj = tmp;
if (tmpObj.active && tmpObj.buildHealth) {
if (player) {
if (UTILS.getDist(tmpObj, player, 0, 0) <=
2000) {
if (tmpObj.doUpdate) {
// HEALTH HOLDER:
var tmpWidth = config.healthBarWidth;
mainContext.fillStyle =
darkOutlineColor;
mainContext.roundRect(tmpObj.x -
xOffset - config.healthBarWidth / 2 - config.healthBarPad, tmpObj.y - yOffset -
config.healthBarPad, config.healthBarWidth + config.healthBarPad * 2, 17, 8);
mainContext.fill();
// HEALTH BAR:
mainContext.fillStyle = player.sid !=
tmpObj.owner.sid && !findAllianceBySid(tmpObj.owner.sid) ? "#cc5151" : "#56b064";
mainContext.roundRect(tmpObj.x -
xOffset - config.healthBarWidth / 2, tmpObj.y - yOffset, config.healthBarWidth *
(tmpObj.buildHealth / tmpObj.health), 17 - config.healthBarPad * 2, 7);
mainContext.fill();
}else {
// HEALTH HOLDER:
var tmpWidth = config.healthBarWidth;
mainContext.fillStyle =
darkOutlineColor;
mainContext.roundRect(tmpObj.x -
xOffset - config.healthBarWidth / 2 - config.healthBarPad, tmpObj.y + 10 - yOffset
- config.healthBarPad, config.healthBarWidth + config.healthBarPad * 2, 17, 8);
mainContext.fill();
// HEALTH BAR:
mainContext.fillStyle = player.sid !=
tmpObj.owner.sid && !findAllianceBySid(tmpObj.owner.sid) ? "#cc5151" : "#56b064";
mainContext.roundRect(tmpObj.x -
xOffset - config.healthBarWidth / 2, tmpObj.y + 10 - yOffset, config.healthBarWidth
* (tmpObj.buildHealth / tmpObj.health), 17 - config.healthBarPad * 2, 7);
mainContext.fill();
}
if (tmpObj.doUpdate) {
mainContext.font = "17px Arial";
mainContext.fillStyle = player.sid !=
tmpObj.owner.sid && !findAllianceBySid(tmpObj.owner.sid) ? "#f4cccc" : "#98f6f9";
mainContext.textAlign = "center";
let buildinghealthValue =
Number.isInteger(tmpObj.buildHealth) ? tmpObj.buildHealth :
tmpObj.buildHealth.toFixed(2);
mainContext.rotate(0);
let X = {
one: tmpObj.x - 12,
two: tmpObj.x + 12
}
let Y = tmpObj.y - 3.5;
// EYE:
mainContext.save();
mainContext.fillStyle = "#000";
renderCircle2(X.one - xOffset, Y -
yOffset, 8, mainContext, true, false);
renderCircle2(X.two - xOffset, Y -
yOffset, 8, mainContext, true, false);
mainContext.fillStyle = "#fff";
let maxmin = function(fr, XorY) {
return Math.max(-(fr - 4),
Math.min((fr - 4), XorY));
}
renderCircle2(X.one - xOffset, Y -
yOffset, 4, mainContext, true, false);
renderCircle2(X.two - xOffset, Y -
yOffset, 4, mainContext, true, false);
mainContext.restore();
}*/
}
}
}
}
// RENDER PLAYER:
function renderPlayer(obj, ctxt) {
ctxt = ctxt || mainContext;
ctxt.lineWidth = outlineWidth;
ctxt.lineJoin = "miter";
var handAngle = (Math.PI / 4) *
(items.weapons[obj.weaponIndex].armS || 1);
var oHandAngle = obj.buildIndex < 0 ?
items.weapons[obj.weaponIndex].hndS || 1 : 1;
var oHandDist = obj.buildIndex < 0 ?
items.weapons[obj.weaponIndex].hndD || 1 : 1;
// TAIL/CAPE:
if (obj.tailIndex > 0) {
renderTail(obj.tailIndex, ctxt, obj);
}
if (getEl("darkmode").checked && getEl("shadowss").checked) {
mainContext.shadowColor = "rgba(0, 0, 0, 0.35)";
mainContext.shadowOffsetX = 8;
mainContext.shadowOffsetY = 8;
mainContext.shadowBlur = 7.5;
}
// WEAPON BELLOW HANDS:
if (obj.buildIndex < 0 && !
items.weapons[obj.weaponIndex].aboveHand) {
renderTool(items.weapons[(getEl("kmtexture").checked &&
obj.weaponIndex == 3 && obj.secondaryIndex == 15) ? 4 : obj.weaponIndex],
config.weaponVariants[obj.weaponVariant].src, obj.scale, 0, ctxt);
if (items.weapons[obj.weaponIndex].projectile != undefined && !
items.weapons[obj.weaponIndex].hideProjectile) {
renderProjectile(obj.scale, 0,
items.projectiles[items.weapons[obj.weaponIndex].projectile], mainContext);
}
}
// HANDS:
ctxt.fillStyle = config.skinColors[obj.skinColor];
renderCircle(obj.scale * Math.cos(handAngle), obj.scale *
Math.sin(handAngle), 14);
renderCircle(obj.scale * oHandDist * Math.cos(-handAngle *
oHandAngle), obj.scale * oHandDist * Math.sin(-handAngle * oHandAngle), 14);
// WEAPON ABOVE HANDS:
if (obj.buildIndex < 0 && items.weapons[obj.weaponIndex].aboveHand)
{
renderTool(items.weapons[obj.weaponIndex],
config.weaponVariants[obj.weaponVariant].src, obj.scale, 0, ctxt);
if (items.weapons[obj.weaponIndex].projectile != undefined && !
items.weapons[obj.weaponIndex].hideProjectile) {
renderProjectile(obj.scale, 0,
items.projectiles[items.weapons[obj.weaponIndex].projectile], mainContext);
}
}
// BUILD ITEM:
if (obj.buildIndex >= 0) {
var tmpSprite = getItemSprite(items.list[obj.buildIndex]);
ctxt.drawImage(tmpSprite, obj.scale -
items.list[obj.buildIndex].holdOffset, -tmpSprite.width / 2);
}
//if (getEl("darkmode").checked) {
//mainContext.shadowColor = "rgba(0, 0, 0, 0.35)";
//mainContext.shadowOffsetX = 10;
//mainContext.shadowOffsetY = 10;
//mainContext.shadowBlur = 7.5;
//}
// BODY:
renderCircle(0, 0, obj.scale, ctxt);
// SKIN:
if (obj.skinIndex > 0) {
ctxt.rotate(Math.PI / 2);
renderSkin(obj.skinIndex, ctxt, null, obj);
}
}
// RENDER SKINS:
var skinSprites = {};
var skinPointers = {};
var tmpSkin;
function getResSprite(obj) {
var biomeID = obj.y >= config.mapScale - config.snowBiomeTop ? 2 :
obj.y <= config.snowBiomeTop ? 1 : 0;
var tmpIndex = obj.type + "_" + obj.scale + "_" + biomeID;
var tmpSprite = gameObjectSprites[tmpIndex];
if (!tmpSprite) {
var tmpCanvas = document.createElement("canvas");
tmpCanvas.width = tmpCanvas.height = obj.scale * 2.1 +
outlineWidth;
var tmpContext = tmpCanvas.getContext("2d");
tmpContext.translate(tmpCanvas.width / 2, tmpCanvas.height /
2);
tmpContext.rotate(UTILS.randFloat(0, Math.PI));
tmpContext.strokeStyle = outlineColor;
tmpContext.lineWidth = outlineWidth;
let colors = [["#b1d959", "#95b946"], ["#bade6e", "#aac76b"],
["#a7d544", "#86a63f"], ["#b4db62", "#9ebf57"], ];
let select = colors[Math.floor(Math.random() * colors.length)];
if (obj.type == 0) {
var tmpScale;
for (var i = 0; i < 2; ++i) {
tmpScale = tmpObj.scale * (!i ? 1 : 0.5);
renderStar(tmpContext, 7, tmpScale, tmpScale * 0.7);
tmpContext.fillStyle = !biomeID ? !i ? select[1] :
select[0] : !i ? "#e3f1f4" : "#fff";
tmpContext.fill();
if (!i)
tmpContext.stroke();
}
} else if (obj.type == 1) {
if (biomeID == 2) {
tmpContext.fillStyle = "#606060";
renderStar(tmpContext, 6, obj.scale * 0.3, obj.scale *
0.71);
tmpContext.fill();
tmpContext.stroke();
tmpContext.fillStyle = "#89a54c";
renderCircle(0, 0, obj.scale * 0.55, tmpContext);
tmpContext.fillStyle = "#a5c65b";
renderCircle(0, 0, obj.scale * 0.3, tmpContext, true);
} else {
renderBlob(tmpContext, 6, tmpObj.scale, tmpObj.scale *
0.7);
tmpContext.fillStyle = biomeID ? "#e3f1f4" : "#89a54c";
tmpContext.fill();
tmpContext.stroke();
tmpContext.fillStyle = biomeID ? "#6a64af" : "#c15555";
var tmpRange;
var berries = 4;
var rotVal = mathPI2 / berries;
for (var i = 0; i < berries; ++i) {
tmpRange = UTILS.randInt(tmpObj.scale / 3.5,
tmpObj.scale / 2.3);
renderCircle(tmpRange * Math.cos(rotVal * i),
tmpRange * Math.sin(rotVal * i), UTILS.randInt(10, 12), tmpContext);
}
}
} else if (obj.type == 2 || obj.type == 3) {
tmpContext.fillStyle = obj.type == 2 ? biomeID == 2 ?
"#938d77" : "#939393" : "#e0c655";
renderStar(tmpContext, 3, obj.scale, obj.scale);
tmpContext.fill();
tmpContext.stroke();
tmpContext.fillStyle = obj.type == 2 ? biomeID == 2 ?
"#b2ab90" : "#bcbcbc" : "#ebdca3";
renderStar(tmpContext, 3, obj.scale * 0.55, obj.scale *
0.65);
tmpContext.fill();
}
tmpSprite = tmpCanvas;
gameObjectSprites[tmpIndex] = tmpSprite;
}
return tmpSprite;
}
// GET ITEM SPRITE:
var itemSprites = [];
function getObjSprite(obj) {
var tmpSprite = objSprites[obj.id];
if (!tmpSprite) {
var tmpCanvas = document.createElement("canvas");
tmpCanvas.width = tmpCanvas.height = obj.scale * 2.5 +
outlineWidth + (items.list[obj.id].spritePadding || 0);
var tmpContext = tmpCanvas.getContext("2d");
tmpContext.translate(tmpCanvas.width / 2, tmpCanvas.height /
2);
tmpContext.rotate(Math.PI / 2);
tmpContext.strokeStyle = outlineColor;
tmpContext.lineWidth = outlineWidth;
if (obj.name == "spikes" || obj.name == "greater spikes" ||
obj.name == "poison spikes" || obj.name == "spinning spikes") {
tmpContext.fillStyle = obj.name == "poison spikes" ?
"#7b935d" : "#939393";
var tmpScale = obj.scale * 0.6;
renderStar(tmpContext, obj.name == "spikes" ? 5 : 6,
obj.scale, tmpScale);
tmpContext.fill();
tmpContext.stroke();
tmpContext.fillStyle = "#a5974c";
renderCircle(0, 0, tmpScale, tmpContext);
tmpContext.fillStyle = "#cc5151";
renderCircle(0, 0, tmpScale / 2, tmpContext, true);
} else if (obj.name == "pit trap") {
tmpContext.fillStyle = "#a5974c";
renderStar(tmpContext, 3, obj.scale * 1.1, obj.scale *
1.1);
tmpContext.fill();
tmpContext.stroke();
tmpContext.fillStyle = "#cc5151";
renderStar(tmpContext, 3, obj.scale * 0.65, obj.scale *
0.65);
tmpContext.fill();
}
tmpSprite = tmpCanvas;
objSprites[obj.id] = tmpSprite;
}
return tmpSprite;
}
// RENDER LEAF:
function renderLeaf(x, y, l, r, ctxt) {
var endX = x + l * Math.cos(r);
var endY = y + l * Math.sin(r);
var width = l * 0.4;
ctxt.moveTo(x, y);
ctxt.beginPath();
ctxt.quadraticCurveTo((x + endX) / 2 + width * Math.cos(r + Math.PI
/ 2), (y + endY) / 2 + width * Math.sin(r + Math.PI / 2), endX, endY);
ctxt.quadraticCurveTo((x + endX) / 2 - width * Math.cos(r + Math.PI
/ 2), (y + endY) / 2 - width * Math.sin(r + Math.PI / 2), x, y);
ctxt.closePath();
ctxt.fill();
ctxt.stroke();
}
// RENDER CIRCLE:
function renderCircle(x, y, scale, tmpContext, dontStroke, dontFill) {
tmpContext = tmpContext || mainContext;
tmpContext.beginPath();
tmpContext.arc(x, y, scale, 0, 2 * Math.PI);
if (!dontFill)
tmpContext.fill();
if (!dontStroke)
tmpContext.stroke();
}
function antiTrap(aim) {
if (near.dist2 <= 250) {
for (let i = -45; i <= 45; i += 90) {
checkPlace(2, aim + UTILS.toRad(i) + Math.PI);
}
} else if (near.dist2 <= 600) {
for (let i = -45; i <= 45; i += 90) {
if (enemy.length) {
checkPlace(4, aim + UTILS.toRad(i) + Math.PI);
}
}
}
}
// LOAD GAME OBJECT:
let myTeles = [];
function loadGameObject(data) {
for (var i = 0; i < data.length; ) {
objectManager.add(data[i], data[i + 1], data[i + 2], data[i +
3], data[i + 4], data[i + 5], items.list[data[i + 6]], true, data[i + 7] >= 0 ? {
sid: data[i + 7]
} : null);
let XY = {
x: data[i + 1],
y: data[i + 2],
};
let dist = UTILS.getDist(XY, player, 0, 2);
let aim = UTILS.getDirect(XY, player, 0, 2);
if (data[i + 6] == 22 && player.sid == data[i + 7]) {
myTeles.push({
x: data[i + 1],
y: data[i + 2]
});
setTimeout(()=>{
myTeles.shift();
}
, 30000);
}
if (getEl("earlyab").checked) {
if (data[i + 6] == 15 && dist <= 100 && player.sid !=
data[i + 7] && !findAllianceBySid(data[i + 7])) {
setTimeout(()=>{
dist = UTILS.getDist(XY, player, 0, 2);
aim = UTILS.getDirect(XY, player, 0, 2);
traps.in = true;
traps.aim = aim;
if (!earlyAutoBreak.start) {
earlyAutoBreak.start = true;
earlyAutoBreak.hit = 0;
earlyAutoBreak.miss = 0;
}
if (dist <= 75) {
earlyAutoBreak.hit++;
} else {
earlyAutoBreak.miss++;
}
}
, parseInt(getEl("earlytime").value));
}
}
setTickout(()=>{
dist = UTILS.getDist(XY, player, 0, 2);
aim = UTILS.getDirect(XY, player, 0, 2);
if (data[i + 6] == 15 && dist <= 100 && player.sid !=
data[i + 7] && !findAllianceBySid(data[i + 7])) {
antiTrap(aim);
}
}
, 1);
i += 8;
}
}
// WIGGLE GAME OBJECT:
let ticktickticky = [];
function antiSyncHealing(timearg) {
antiSync = true;
let healAnti = setInterval(()=>{
if (player.shameCount < 5) {
place(0, getAttackDir());
}
}
, 75);
setTimeout(()=>{
clearInterval(healAnti);
setTimeout(()=>{
antiSync = false;
}, config.tickRate);
}
, config.tickRate * timearg);
}
function wiggleGameObject(dir, sid) {
tmpObj = findObjectBySid(sid);
if (tmpObj) {
tmpObj.xWiggle += config.gatherWiggle * Math.cos(dir);
tmpObj.yWiggle += config.gatherWiggle * Math.sin(dir);
if (tmpObj.buildHealth) {
hittedObj.push(tmpObj);
// hittedObj2.push(tmpObj);
}
}
}
// SHOOT TURRET:
function shootTurret(sid, dir) {
tmpObj = findObjectBySid(sid);
if (tmpObj) {
tmpObj.dir = dir;
tmpObj.xWiggle += config.gatherWiggle * Math.cos(dir +
Math.PI);
tmpObj.yWiggle += config.gatherWiggle * Math.sin(dir +
Math.PI);
tmpObj.shootted = 1;
}
}
// ADD PROJECTILE:
let doSync = false;
let dosyncpole = false
let antiSync = false;
let runAtNextTick = [];
let rangeBackup = [];
let middleclicck = false
maxScreenHeight));
}
// FUNCTIONS:
let configs = {
weaponCode: 0,
antiBull: 0,
antiBull2: 0,
waitHit: false,
};
function updateItemCountHTML(index=undefined) {
for (let i = 0; i < items.list.length; ++i) {
let id = items.list[i].group.id;
let tmpI = items.weapons.length + i;
if (!isItemSetted[tmpI]) {
isItemSetted[tmpI] = document.createElement("div");
isItemSetted[tmpI].id = "itemCount" + tmpI;
getEl("actionBarItem" +
tmpI).appendChild(isItemSetted[tmpI]);
isItemSetted[tmpI].style = `
display: block;
position: absolute;
padding-left: 5px;
font-size: 2em;
color: #fff;
`;
if (i < 3) {
isItemSetted[tmpI].innerHTML = Math.floor(player.food /
items.list[i].req[1]);
} else {
isItemSetted[tmpI].innerHTML = player.itemCounts[id] ||
0;
}
} else {
if (index == id) {
isItemSetted[tmpI].innerHTML = player.itemCounts[index]
|| 0;
}
if (index == undefined) {
if (i < 3) {
isItemSetted[tmpI].innerHTML =
Math.floor(player.food / items.list[i].req[1]);
}
}
}
if (getEl("visual").value == "0" || getEl("visual").value ==
"ae") {
if (isItemSetted[tmpI].style.display == "block") {
isItemSetted[tmpI].style.display = "none";
}
} else {
if (isItemSetted[tmpI].style.display == "none") {
isItemSetted[tmpI].style.display = "block";
}
}
}
}
function calcDmg(value) {
return value * player.skinIndex == 6 ? 0.75 : 1;
}
// LATER:
function predictHeal() {}
// UPDATE HEALTH:
let healType = undefined;
let guessEmpAnti = false;
let doEmpAntiInsta = false;
let judgeAtNextTick = false;
let nearSpike = [];
, getEl("tickheal").checked ? 2 : pingHeal());
}
} else {
if (traps.in) {
healIntrap(tmpObj, value);
} else {
(getEl("tickheal").checked ? setTickout :
setTimeout)(()=>{
for (let i = 0; i < applCxC(value); i++) {
place(0, getAttackDir());
}
}
, getEl("tickheal").checked ? 2 : pingHeal());
}
}
if (player.skinIndex == 11) {
if (value >= 30) {
instaC.isCounter = true;
}
}
if (value >= 20) {
hittedTime = Date.now();
judgeAtNextTick = true;
}
} else {
if (traps.in) {
healIntrap(tmpObj, value);
} else {
(getEl("tickheal").checked ? setTickout : setTimeout)
(()=>{
for (let i = 0; i < applCxC(value); i++) {
place(0, getAttackDir());
}
}
,
getEl("tickheal").checked ? 2 : pingHeal());
}
}
}
}
, getEl("tickheal").checked ? 2 : pingHeal());
}
} else {
(getEl("tickheal").checked ? setTickout : setTimeout)
(()=>{
for (let i = 0; i < applCxC(value); i++) {
place(0, getAttackDir());
}
}
,
getEl("tickheal").checked ? 2 : pingHeal());
}
if (player.skinIndex == 11) {
if (value >= 30) {
instaC.isCounter = true;
}
}
} else {
(getEl("tickheal").checked ? setTickout : setTimeout)(()=>{
for (let i = 0; i < applCxC(value); i++) {
place(0, getAttackDir());
}
}
,
getEl("tickheal").checked ? 2 : pingHeal());
}
}
}
// CALC DAMAGE:
function checkCanInsta(nobull) {
let totally = 0;
if (player.alive) {
let primary = {
weapon: player.weapons[0],
variant: player.primaryVariant,
dmg: player.weapons[0] == undefined ? 0 :
items.weapons[player.weapons[0]].dmg,
};
let secondary = {
weapon: player.weapons[1],
variant: player.secondaryVariant,
dmg: player.weapons[1] == undefined ? 0 :
items.weapons[player.weapons[1]].Pdmg,
};
let bull = player.skins[7] && !nobull ? 1.5 : 1;
let pV = primary.variant != undefined ?
config.weaponVariants[primary.variant].val : 1;
if (primary.weapon != undefined &&
player.reloads[primary.weapon] == 0) {
totally += primary.dmg * pV * bull;
}
if (secondary.weapon != undefined &&
player.reloads[secondary.weapon] == 0) {
totally += secondary.dmg;
}
if (player.skins[53] && player.reloads[53] == 0 &&
near.skinIndex != 22) {
totally += 25;
}
totally *= near.skinIndex == 6 ? 0.75 : 1;
return totally;
}
return 0;
}
function getDamageThreat(tmpObj) {
tmpObj.instaThreat = 0;
if (isTeam(tmpObj)) {
let primary = {
weapon: tmpObj.primaryIndex,
variant: tmpObj.primaryVariant,
dmg: tmpObj.primaryIndex == undefined ? 45 :
items.weapons[tmpObj.primaryIndex].dmg,
};
let secondary = {
weapon: tmpObj.secondaryIndex,
variant: tmpObj.secondaryVariant,
dmg: tmpObj.secondaryIndex == undefined ? 50 :
items.weapons[tmpObj.secondaryIndex].Pdmg,
};
let bull = tmpObj.skinIndex == 7 ? 1.5 : 1;
let pV = primary.variant != undefined ?
config.weaponVariants[primary.variant].val : 1.18;
if (primary.weapon != undefined &&
tmpObj.reloads[primary.weapon] == 0) {
tmpObj.instaThreat += primary.dmg * pV * bull;
}
if (secondary.weapon != undefined &&
tmpObj.reloads[secondary.weapon] == 0) {
tmpObj.instaThreat += secondary.dmg;
}
if (tmpObj.reloads[53] === 0) {
tmpObj.instaThreat += 25;
}
tmpObj.instaThreat *= player.skinIndex == 6 ? 0.75 : 1;
}
}
let predictDamage = 0;
function guessDamagePrediction() {
predictDamage = 0;
if (enemy.length) {
if (near.dist2 <= 300) {
if (configs.antiBull2 > 0 && near.skinIndex == 11) {
predictDamage += items.weapons[player.weapons[0]].dmg *
0.45;
}
if (configs.antiBull2 > 0 && near.tailIndex == 21) {
predictDamage += items.weapons[player.weapons[0]].dmg *
0.25;
}
predictDamage *= player.skinIndex == 6 ? 0.75 : 1;
if ((ticks.tick - player.bTick) % config.serverUpdateRate
=== 0 && player.shameCount > 0) {
predictDamage += 5;
if (player.tailIndex == 13) {
predictDamage -= 3;
}
}
}
}
}
// RENDER TRACER / CREDIT TO NEKOSAN:
function addUser(tmpObj) {
let center = {
x: screenWidth / 2,
y: screenHeight / 2,
};
let rad = UTILS.getDirect(tmpObj, player, 2, 2)
let alpha = Math.min(1, (UTILS.getDistance(0, 0, player.x2 -
tmpObj.x2, (player.y2 - tmpObj.y2) * (16 / 9)) * 100) / (config.maxScreenHeight /
2) / center.y);
let dist = center.y * alpha;
let tmpX = center.x + dist * Math.cos(rad) - 20 / 2;
let tmpY = center.y + dist * Math.sin(rad) - 20 / 2;
if (!getEl("enemyradar" + tmpObj.sid)) {
let addRadar = document.createElement("div");
addRadar.id = "enemyradar" + tmpObj.sid;
document.body.append(addRadar);
addRadar.style = `
display: none;
position: absolute;
left: 0;
top: 0;
color: #fff;
width: 0;
height: 0;
border-style: solid;
border-width: 10px 0 10px 20px;
border-color: #eb4034;
`;
}
if (getEl("enemyradar" + tmpObj.sid)) {
getEl("enemyradar" + tmpObj.sid).style.left = tmpX + "px";
getEl("enemyradar" + tmpObj.sid).style.top = tmpY + "px";
getEl("enemyradar" + tmpObj.sid).style.display = !
isTeam(tmpObj) ? "block" : "none";
getEl("enemyradar" + tmpObj.sid).style.opacity = alpha;
getEl("enemyradar" + tmpObj.sid).style.transform = "rotate(" +
UTILS.toAng(rad) + "deg)";
}
}
let enemy = [];
let nears = [];
let near = [];
let millC = {
x: undefined,
y: undefined,
size: function(size) {
return size * 1.45;
},
dist: function(size) {
return size * 1.8;
},
active: config.isSandbox ? true : false,
count: 0,
};
let boostspikesss = false
let placer4
let songnamess = ["DJ Junggle Dutch","sound jedag jedug kece","DJ
Enakeun V9","hensonn sahara x dxrk rave","we make it bounce jedag jedug","dj paijo
mumet ndase","dj on the floor x gak tau","dj zerz softboy jedag jedug","dj tangkis
dang","jantung bergoyang v2","DJ Ganteng / Cantik"]
let chatsmods = false
let spikeinsta = false
let stopchatty = false
let isianchat
function spin() {
let random = [2, 3, 4, 5];
setTickout(() => {
spinner = true;
setTickout(() => {
spinner = false;
}, random[Math.floor(Math.random() * (random.length + 1))]);
}, 1);
}
let stopMusket = 0;
let doAgeInsta = false;
let instaC = {
wait: false,
can: false,
isTrue: false,
nobull: false,
isCounter: false,
abCount: 0,
changeType: function(type) {
instaC.wait = false;
instaC.isTrue = true;
if (type == "rev") {
autoAim = true;
selectWeapon(player.weapons[1]);
buyEquip(53, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 21, 1);
sendAutoGather();
setTickout(()=>{
selectWeapon(player.weapons[0]);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}, 1);
}, 1);
} else if (type == "nobull") {
autoAim = true;
selectWeapon(player.weapons[0]);
buyEquip(getEl("combat").value == "fz" ? 11 : 6, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
sendAutoGather();
setTickout(()=>{
selectWeapon(player.weapons[1]);
buyEquip(53, 0);
buyEquip(getEl("combat").value == "ae" ? 11 :
getEl("combat").value == "hans" ? 0 : 21, 1);
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}, 1);
}, 1);
} else if (type == "normal") {
autoAim = true;
selectWeapon(player.weapons[0]);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
sendAutoGather();
setTickout(()=>{
selectWeapon(player.weapons[1]);
buyEquip(53, 0);
buyEquip(getEl("combat").value == "ae" ? 11 :
getEl("combat").value == "hans" ? 0 : 21, 1);
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}, 1);
}, 1);
} else if (type == "ph") {
autoAim = true;
buyEquip(53, 0);
buyEquip(getEl("combat").value == "ae" ? 11 :
getEl("combat").value == "hans" ? 0 : 21, 1);
setTickout(()=>{
selectWeapon(player.weapons[0]);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
sendAutoGather();
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}, 1);
}, 1);
} else if (type == "pm") {
autoAim = true;
buyEquip(53, 0);
buyEquip(getEl("combat").value == "ae" ? 11 :
getEl("combat").value == "hans" ? 0 : 21, 1);
setTickout(()=>{
selectWeapon(player.weapons[0]);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
sendAutoGather();
setTickout(()=>{
selectWeapon(player.weapons[1]);
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}, 1);
}, 1);
}, 1);
} else if (type == "onetick") {
if ([4, 5].includes(player.weapons[0]) && [9, 12,
13].includes(player.weapons[1])) {
instaC.isTrue = true;
autoAim = true;
setTickout(() => {
buyEquip(53, 0);
buyEquip(0, 1);
selectWeapon(player.weapons[1]);
sendAutoGather();
io.send("33", near.aim2);
setTickout(() => {
buyEquip(7, 0);
buyEquip(21 || 0, 1);
selectWeapon(player.weapons[0]);
io.send("33", near.aim2);
setTickout(() => {
instaC.isTrue = false;
autoAim = false;
io.send("33", null);
io.send("33", isMoveDir);
sendAutoGather();
spin();
}, 1);
}, 1);
}, 1);
}
} else if (type == "sm") {
autoAim = true;
buyEquip(53, 0);
buyEquip(getEl("combat").value == "ae" ? 11 :
getEl("combat").value == "hans" ? 0 : 21, 1);
selectWeapon(player.weapons[0]);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
sendAutoGather();
setTickout(()=>{
selectWeapon(player.weapons[1]);
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}, 1);
}, 1);
} else {
setTimeout(()=>{
instaC.isTrue = false;
autoAim = false;
}, 50);
}
},
syncTry: function() {
if (player.weapons[1] == 15) {
instaC.isTrue = true;
io.send("2", near.aim2);
autoAim = true;
rangeBackup.push(near.dist2);
selectWeapon(player.weapons[1]);
buyEquip(53, 0);
buyEquip(0, 1);
sendAutoGather();
setTickout(() => {
autoAim = false;
instaC.isTrue = false;
sendAutoGather();
}, 2);
}
},
syncpritry: function() {
autoAim = true;
instaC.isTrue = true;
selectWeapon(player.weapons[0]);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
sendAutoGather();
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}, 1);
},
zeroFrame: function() {
if ([4, 5].includes(player.weapons[0]) && [9, 12,
13].includes(player.weapons[1])) {
io.send("ch", "one tick v1 = on");
instaC.isTrue = true;
autoAim = true;
place(4, near.aim2);
setTickout(() => {
buyEquip(53, 0);
buyEquip(0, 1);
selectWeapon(player.weapons[1]);
sendAutoGather();
io.send("33", near.aim2);
setTickout(() => {
buyEquip(7, 0);
buyEquip(21 || 0, 1);
selectWeapon(player.weapons[0]);
io.send("33", near.aim2);
setTickout(() => {
instaC.isTrue = false;
autoAim = false;
io.send("33", null);
io.send("33", isMoveDir);
sendAutoGather();
spin();
}, 1);
}, 1);
}, 1);
}
},
oneFrame: function() {
if ([4, 5].includes(player.weapons[0]) && [9, 12,
13].includes(player.weapons[1])) {
io.send("ch", "one tick v2 = on");
instaC.isTrue = true;
autoAim = true;
buyEquip(53, 0);
buyEquip(0, 1);
selectWeapon(player.weapons[1]);
sendAutoGather();
io.send("33", near.aim2);
setTickout(() => {
place(4, near.aim2);
setTickout(() => {
buyEquip(7, 0);
buyEquip(21 || 0, 1);
selectWeapon(player.weapons[0]);
io.send("33", near.aim2);
setTickout(() => {
io.send("33", null);
io.send("33", isMoveDir);
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
spin();
}, 1);
}, 1);
}, 1);
}
},
phFrame: function() {
if (player.weapons[0] == 5 && player.weapons[1] == 10) {
io.send("ch", "ph one tick = on");
instaC.isTrue = true;
autoAim = true;
buyEquip(53, 0);
buyEquip(0, 1);
selectWeapon(player.weapons[1]);
sendAutoGather();
io.send("33", near.aim2);
place(4, near.aim2);
setTickout(() => {
buyEquip(7, 0);
buyEquip(21 || 0, 1);
selectWeapon(player.weapons[0]);
io.send("33", near.aim2);
setTickout(() => {
instaC.isTrue = false;
autoAim = false;
io.send("33", null);
io.send("33", isMoveDir);
sendAutoGather();
}, 1);
}, 1);
}
},
zeroFramekatana: function() {
if (player.weapons[0] == 4 && player.weapons[1] == 9) {
io.send("ch", "one tick katana = on");
instaC.isTrue = true;
autoAim = true;
place(4, near.aim2);
setTickout(() => {
buyEquip(53, 0);
buyEquip(0, 1);
selectWeapon(player.weapons[1]);
sendAutoGather();
io.send("33", near.aim2);
setTickout(() => {
buyEquip(7, 0);
buyEquip(21 || 0, 1);
selectWeapon(player.weapons[0]);
io.send("33", near.aim2);
setTickout(() => {
place(2, near.aim2);
instaC.isTrue = false;
autoAim = false;
io.send("33", null);
io.send("33", isMoveDir);
sendAutoGather();
spin();
}, 1);
}, 1);
}, 1);
}
},
newinstadev: function() {
io.send("ch", "one tick spike = on");
instaC.isTrue = true;
autoAim = true;
selectWeapon(player.weapons[0]);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
sendAutoGather();
setTickout(()=>{
selectWeapon(player.weapons[1]);
buyEquip(53, 0);
buyEquip(getEl("combat").value == "ae" ? 11 :
getEl("combat").value == "hans" ? 0 : 21, 1);
setTickout(()=>{
sendAutoGather();
place(2)
instaC.isTrue = false;
autoAim = false;
spin();
}, 1);
}, 1);
},
agesinstass: function() {
if (player.weapons[0] == 0 && player.age > 1) {
instaC.isTrue = true;
autoAim = true;
io.send("ch", "age 2 insta = on")
doAgeInsta = true;
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
selectWeapon(player.weapons[0]);
sendAutoGather();
setTickout(()=>{
sendUpgrade(5);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
selectWeapon(player.weapons[0]);
setTickout(()=>{
doAgeInsta = false;
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}, 1);
}, 1);
}
},
instabyeessa: function() {
io.send("ch", "insta by essa = on")
instaC.isTrue = true;
autoAim = true;
if (player.weapons[1] == 9 && player.age > 8) {
rangeBackup.push(near.dist2);
doAgeInsta = true;
selectWeapon(player.weapons[1]);
buyEquip(53, 0);
sendAutoGather();
setTickout(()=>{
sendUpgrade(12);
selectWeapon(player.weapons[1]);
setTickout(()=>{
sendUpgrade(15);
selectWeapon(player.weapons[1]);
setTickout(()=>{
doAgeInsta = false;
sendAutoGather();
}, 1);
}, 1);
}, 1);
} else {
selectWeapon(player.weapons[1]);
if (player.reloads[53] == 0 && near.dist2 <= 700 &&
near.skinIndex != 22) {
buyEquip(53, 0);
} else {
buyEquip(20, 0);
}
buyEquip(11, 1);
sendAutoGather();
setTickout(()=>{
sendAutoGather();
}, 2);
}
setTickout(()=>{
selectWeapon(player.weapons[0]);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 18, 1);
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
spin();
}, 1);
}, 1);
instaC.isTrue = false;
autoAim = false;
},
counterType: function() {
instaC.isTrue = true;
autoAim = true;
selectWeapon(player.weapons[0]);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 0 : 21, 1);
sendAutoGather();
setTickout(()=>{
if ((getEl("countertur").checked && player.reloads[53] == 0
&& player.skins[53]) || (getEl("countersec").checked &&
player.reloads[player.weapons[1]] == 0 && player.weapons[1])) {
if (getEl("countersec").checked &&
player.reloads[player.weapons[1]] == 0 && player.weapons[1]) {
selectWeapon(player.weapons[1]);
}
if (getEl("countertur").checked && player.reloads[53]
== 0 && player.skins[53]) {
buyEquip(53, 0);
} else {
buyEquip(6, 0);
}
buyEquip(getEl("combat").value == "ae" ? 11 :
getEl("combat").value == "hans" ? 0 : 21, 1);
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
spin();
}, 1);
} else {
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}
}, 1);
},
spikeTickType: function() {
instaC.isTrue = true;
autoAim = true;
selectWeapon(player.weapons[0]);
buyEquip(7, 0);
buyEquip(getEl("combat").value == "ae" ? 0 :
getEl("combat").value == "hans" ? 21 : 18, 1);
sendAutoGather();
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}, 1);
},
rangeType: function() {
instaC.isTrue = true;
io.send("2", near.aim2);
autoAim = true;
if (player.weapons[1] == 9 && !middleclicck && player.age > 8)
{
rangeBackup.push(near.dist2);
doAgeInsta = true;
selectWeapon(player.weapons[1]);
buyEquip(53, 0);
sendAutoGather();
setTickout(()=>{
sendUpgrade(12);
selectWeapon(player.weapons[1]);
setTickout(()=>{
if (getEl("modebow").value == "2"){
sendUpgrade(13);
}else {
sendUpgrade(15);
}
selectWeapon(player.weapons[1]);
setTickout(()=>{
doAgeInsta = false;
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
}, 1);
}, 1);
}, 1);
} else {
selectWeapon(player.weapons[1]);
if (player.reloads[53] == 0 && near.dist2 <= 700 &&
near.skinIndex != 22) {
buyEquip(53, 0);
} else {
buyEquip(20, 0);
}
buyEquip(11, 1);
sendAutoGather();
setTickout(()=>{
sendAutoGather();
instaC.isTrue = false;
autoAim = false;
middleclicck = false
}, 2);
}
},
};
let autoAim = false;
let autos = {
reloaded: false,
};
let traps = {
in: false,
aim: Number.MAX_VALUE,
healths: 69,
};
let ticks = {
tick: 0,
delay: 0,
time: [],
manage: [],
};
function checkTestCoord(tmpObj) {
let x = tmpObj.x2 - tmpObj.x1;
let y = tmpObj.y2 - tmpObj.y1;
tmpObj.x3 = tmpObj.x2 + x;
tmpObj.y3 = tmpObj.y2 + y;
}
let oldXY = {
x: undefined,
y: undefined,
};
let autoQ = false;
function isTeam(tmpObj) {
return (tmpObj == player || (tmpObj.team && tmpObj.team ==
player.team));
}
let turretEmp = 0;
let waitTicks = [];
let anti0Tick = 0;
let syncCount = 0;
let syncCountpole = 0;
let nerdChat = ["Don't care", "didin't ask", "cry about it", "stay
mad", "get real", "L", "mad seethe cope harder", "hoes mad", "basic", "skill
issue", "ratio", "you fell off", "the audacity", "triggered", "any askers",
"replled", "get a life", "ok and?", "cringe", "touch grass", "donowalled", "not
based", "not funny didn’t laugh", "*you're", "grammar issues", "go outside", "get
good", "reported", "ad hominem", "GG!", "ask deez", "ez clap", "straight cash",
"ratio again", "final ratio", "problematic", "furry lover", "retard", "bad", "cry",
"ez", "easy", "basic", "need hard", "so bad", "cringe", "get teacher"];
let nerdSpam = false;
let opebchat = false
let hitCount = 0;
let spinner = false;
function combatType(type) {
return getEl("combat").value == type;
}
function tmpObjDist(a, b) {
return Math.hypot(a.y2-b.y2, a.x2-b.x2);
}
function Ti(data) {
enemy = [];
nears = [];
near = [];
ticks.tick++;
ticks.time.push(Date.now() - ticks.delay <= 50 || Date.now() -
ticks.delay >= 175 ? "lag" : 1);
if (ticks.tick % 10 === 0) {
ticks.time = [];
}
if (ticks.tick % 300 === 0) {
if (getEl("visual").value == "fz") {
maxPing = window.pingTime;
minPing = window.pingTime;
}
}
ticks.delay = Date.now();
var tmpTime = Date.now();
for (let i = 0; i < players.length; ++i) {
players[i].forcePos = !players[i].visible;
players[i].visible = false;
if (getEl("enemyradar" + players[i].sid)) {
getEl("enemyradar" + players[i].sid).style.display =
"none";
}
}
for (let i = 0; i < data.length; ) {
tmpObj = findPlayerBySID(data[i]);
if (tmpObj) {
tmpObj.t1 = tmpObj.t2 === undefined ? tmpTime : tmpObj.t2;
tmpObj.t2 = tmpTime;
tmpObj.x1 = tmpObj.x;
tmpObj.y1 = tmpObj.y;
tmpObj.x2 = data[i + 1];
tmpObj.y2 = data[i + 2];
checkTestCoord(tmpObj);
tmpObj.aim2 = UTILS.getDirect(tmpObj, player, 2, 2);
tmpObj.dist2 = UTILS.getDist(tmpObj, player, 2, 2);
tmpObj.aim3 = UTILS.getDirect(tmpObj, player, 3, 3);
tmpObj.dist3 = UTILS.getDist(tmpObj, player, 3, 3);
tmpObj.d1 = tmpObj.d2 === undefined ? data[i + 3] :
tmpObj.d2;
tmpObj.d2 = data[i + 3];
tmpObj.dt = 0;
tmpObj.rt = 0;
tmpObj.buildIndex = data[i + 4];
tmpObj.weaponIndex = data[i + 5];
tmpObj.weaponVariant = data[i + 6];
tmpObj.team = data[i + 7];
tmpObj.isLeader = data[i + 8];
tmpObj.skinIndex = data[i + 9];
tmpObj.tailIndex = data[i + 10];
tmpObj.iconIndex = data[i + 11];
tmpObj.zIndex = data[i + 12];
tmpObj.visible = true;
if (tmpObj == player) {
tmpObj.syncThreats = 0;
tmpObj.primaryIndex = tmpObj.weapons[0];
tmpObj.secondaryIndex = tmpObj.weapons[1];
(!millC.x || !oldXY.x) && (millC.x = oldXY.x =
tmpObj.x2);
(!millC.y || !oldXY.y) && (millC.y = oldXY.y =
tmpObj.y2);
}
if (tmpObj.weaponIndex < 9) {
if (tmpObj != player) {
tmpObj.primaryIndex = tmpObj.weaponIndex;
}
tmpObj.primaryVariant = tmpObj.weaponVariant;
} else if (tmpObj.weaponIndex > 8) {
if (tmpObj != player) {
tmpObj.secondaryIndex = tmpObj.weaponIndex;
}
tmpObj.secondaryVariant = tmpObj.weaponVariant;
}
}
i += 13;
}
if (waitTicks.length) {
waitTicks.forEach((ajaj)=>{
ajaj();
});
waitTicks = [];
}
if (runAtNextTick.length) {
runAtNextTick.forEach((tmp)=>{
checkProjectileHolder(...tmp);
});
runAtNextTick = [];
}
syncCount = 0;
syncCountpole = 0;
for (let i = 0; i < data.length; ) {
tmpObj = findPlayerBySID(data[i]);
if (tmpObj) {
if (tmpObj.doTickUpdate) {
tmpObj.doTickUpdate = false;
}
if (!isTeam(tmpObj)) {
enemy.push(tmpObj);
if (tmpObj.dist2 <= (items.weapons[tmpObj.primaryIndex
== undefined ? 5 : tmpObj.primaryIndex].range + (player.scale * 3)) +
(getEl("addictdist").checked && window.pingTime >= 90 ? (window.pingTime / 3) : 0))
{
nears.push(tmpObj);
}
if (getEl("visual").value == "cele" ||
getEl("visual").value == "fz" || getEl("visual").value == "zyenith") {
addUser(tmpObj);
}
}
if (tmpObj.pCount > -1) {
if ((ticks.tick - tmpObj.bTick) %
config.serverUpdateRate === 0) {
tmpObj.pCount--;
}
}
tmpObj.oldReloads[53] = tmpObj.reloads[53];
if (tmpObj.shooting[53]) {
tmpObj.shooting[53] = 0;
tmpObj.reloads[53] = 2500 - config.tickRate;
tmpObj.oldReloads[53] = tmpObj.reloads[53];
if (getEl("antitick").checked && !isTeam(tmpObj)) {
if (tmpObj.primaryIndex == 5 &&
tmpObj.primaryVariant >= 2 && tmpObj.dist2 >= 175 && tmpObj.dist2 <= 275) {
anti0Tick = 2;
}
}
} else {
if (tmpObj.reloads[53] > 0) {
tmpObj.reloads[53] = Math.max(0, tmpObj.reloads[53]
- config.tickRate);
if (tmpObj.reloads[53] <= 0) {
let tmp = tmpObj;
tmp.turretReloaded = true;
setTickout(()=>{
tmp.turretReloaded = false;
}, 1);
}
}
}
tmpObj.oldReloads[tmpObj.primaryIndex == undefined ?
tmpObj.weaponIndex : tmpObj.primaryIndex] = tmpObj.reloads[tmpObj.primaryIndex ==
undefined ? tmpObj.weaponIndex : tmpObj.primaryIndex];
tmpObj.oldReloads[tmpObj.secondaryIndex == undefined ?
tmpObj.weaponIndex : tmpObj.secondaryIndex] = tmpObj.reloads[tmpObj.secondaryIndex
== undefined ? tmpObj.weaponIndex : tmpObj.secondaryIndex];
if (tmpObj.gathering || tmpObj.shooting[1]) {
if (tmpObj.gathering) {
tmpObj.gathering = 0;
tmpObj.reloads[tmpObj.gatherIndex] =
items.weapons[tmpObj.gatherIndex].speed * (tmpObj.skinIndex == 20 ? 0.78 : 1);
tmpObj.oldReloads[tmpObj.gatherIndex] =
tmpObj.reloads[tmpObj.gatherIndex];
if (tmpObj != player && player.team && tmpObj.team
== player.team && player.weapons[0] == 5 && tmpObj.gatherIndex == 5) {
syncCountpole++;
}
}
if (tmpObj.shooting[1]) {
tmpObj.shooting[1] = 0;
tmpObj.reloads[tmpObj.shootIndex] =
items.weapons[tmpObj.shootIndex].speed * (tmpObj.skinIndex == 20 ? 0.78 : 1);
tmpObj.oldReloads[tmpObj.shootIndex] =
tmpObj.reloads[tmpObj.shootIndex];
if (tmpObj != player && player.team && tmpObj.team
== player.team && player.weapons[1] == 15 && tmpObj.shootIndex == 15) {
syncCount++;
}
}
} else {
if (tmpObj.buildIndex < 0) {
if (tmpObj.reloads[tmpObj.weaponIndex] > 0) {
tmpObj.reloads[tmpObj.weaponIndex] =
Math.max(0, tmpObj.reloads[tmpObj.weaponIndex] - config.tickRate);
if (tmpObj.weaponIndex == tmpObj.primaryIndex)
{
if (tmpObj.reloads[tmpObj.primaryIndex] <=
0) {
if (tmpObj == player) {
configs.antiBull2++;
setTickout(()=>{
configs.antiBull2--;
}, 1);
} else {
if (!isTeam(tmpObj) && tmpObj.dist2
<= items.weapons[tmpObj.primaryIndex ? tmpObj.primaryIndex : 5].range +
player.scale * 1.8 + window.pingTime / 2) {
configs.antiBull++;
setTickout(()=>{
configs.antiBull--;
}, 1);
}
}
}
}
}
}
}
getDamageThreat(tmpObj);
}
i += 13;
}
myConfig.x = player.x2;
myConfig.y = player.y2;
if (ticks.tick % 24 === 0) {
myConfig.sync = true;
} else {
myConfig.sync = false;
}
if (enemy.length) {
near = enemy.sort(function(tmp1, tmp2) {
return (UTILS.getDist(tmp1, player, 2, 2) -
UTILS.getDist(tmp2, player, 2, 2));
})[0];
myNearAim = function(o) {
return UTILS.getDirect(near, o, 2, 0);
};
} else {
myNearAim = function(nothing) {
return undefined;
};
}
try {
if (getEl("spin").checked) {
spinner = true;
} else spinner = false;
nears.forEach((e)=>{
if (e.primaryIndex != undefined &&
e.reloads[e.primaryIndex] == 0 && e.primaryIndex != undefined &&
e.reloads[e.primaryIndex] == 0) {
player.syncThreats++;
}
});
turretEmp = 0;
gameObjects.filter((e)=>e.active &&
e.doUpdate).forEach((tmp)=>{
if (tmp.shootted) {
tmp.shootted = 0;
tmp.shootReload = 2200 - config.tickRate;
} else {
if (tmp.shootReload > 0) {
tmp.shootReload = Math.max(0, tmp.shootReload -
config.tickRate);
if (tmp.shootReload <= 0) {
tmp.shootReload = 2200;
if (player.sid != tmp.owner.sid && !
findAllianceBySid(tmp.owner.sid) && UTILS.getDist(tmp, player, 0, 2) <= 735) {
turretEmp++;
}
}
}
}
}
);
if ((checkCanInsta(true) >= 100 ? checkCanInsta(true) :
checkCanInsta(false)) >= (player.weapons[1] == 10 ? 95 : 100) && near.dist2 <=
items.weapons[player.weapons[1] == 10 && player.weapons[0] == 5 ?
player.weapons[0]: player.weapons[1] == 10 ? player.weapons[1] :
player.weapons[0]].range + near.scale * 1.8 && instaC.wait && !instaC.isTrue && !
configs.waitHit && player.reloads[player.weapons[0]] == 0 &&
player.reloads[player.weapons[1]] == 0 && player.reloads[53] == 0) {
if (checkCanInsta(true) >= 100) {
instaC.nobull = true;
} else {
instaC.nobull = false;
}
instaC.can = true;
} else {
instaC.can = false;
}
guessDamagePrediction();
if (ticks.manage[ticks.tick]) {
ticks.manage[ticks.tick].forEach((doit)=>{
doit();
});
}
if (player.alive) {
if (player.syncThreats >= 2 && getEl("antisync").checked &&
!antiSync) {
antiSyncHealing(3);
}
if (judgeAtNextTick) {
judgeAtNextTick = false;
if (getEl("soldierempanti").checked && enemy.length &&
near.reloads[53] <= config.tickRate && (near.secondaryIndex != 10 &&
near.secondaryIndex != 11 && near.secondaryIndex != 14)) {
doEmpAntiInsta = true;
}
}
if (getEl("autoq").checked && (doAutoQ ||
getEl("evautoq").checked)) {
getEl("healer").innerHTML = "Healer: autoQ";
if (player.shameCount < 4 && near.dist2 <= 300 &&
near.reloads[near.primaryIndex] <= config.tickRate * (window.pingTime >= 200 ? 2 :
1)) {
autoQ = true;
place(0, getAttackDir());
} else {
if (autoQ) {
place(0, getAttackDir());
}
autoQ = false;
}
} else {
autoQ = false;
if (nears.length >= 2) {
getEl("healer").innerHTML = "Healer: " +
nears.length + "v1";
} else {
getEl("healer").innerHTML = "Healer: " +
(window.pingTime <= 80 ? "Low Ping" : "High Ping");
}
}
if (syncCount >= parseInt(getEl("synccount").value)) {
if (getEl("sync").checked) {
doSync = true;
}
}
if (syncCountpole >= parseInt(getEl("synccount").value)) {
if (getEl("syncpole").checked) {
dosyncpole = true;
}
}
if (clicks.middle || doSync || withSync) {
if (doSync) {
instaC.syncTry()
doSync = false;
}
if (withSync) {
withSync = false;
}
if (!instaC.isTrue && !instaC.can &&
player.reloads[player.weapons[1]] == 0) {
middleclicck = true
instaC.rangeType();
}
}
if (dosyncpole){
instaC.syncpritry();
dosyncpole = false;
}
if (instaC.can) {
instaC.changeType(getEl("instamode").value == "2" ?
"onetick": player.weapons[1] == 10 && player.weapons[0] == 5 ? "ph" :
getEl("revturretins").checked && player.weapons[1] == 15 ? "pm" :
getEl("alwaysrev").checked ? "rev": player.weapons[1] == 10 ? "rev" : instaC.nobull
? "nobull" : "normal");
if (getEl("instamode").value == "2") {
io.send("ch", "insta mode v2")
}else {
io.send("ch", "insta mode v1")
}
}
if (instaC.isCounter) {
instaC.isCounter = false;
if (player.reloads[player.weapons[0]] == 0 && !
instaC.isTrue) {
instaC.counterType();
}
}
if (waitSpikeTick) {
waitSpikeTick = false;
if (!instaC.isTrue && player.reloads[player.weapons[0]]
== 0) {
instaC.spikeTickType();
}
}
// MOUSE EVENT:
if (!clicks.middle && (clicks.left || clicks.right) && !
instaC.isTrue && !instaC.can) {
if (player.weaponIndex != (clicks.right &&
getEl("grindsec").checked && player.weapons[1] == 10 ? player.weapons[1] :
player.weapons[0])) {
if (getEl("weaponsautoch").checked) {
selectWeapon(clicks.right &&
getEl("grindsec").checked && player.weapons[1] == 10 ? player.weapons[1] :
player.weapons[0]);
}
}
if (player.reloads[clicks.right &&
getEl("grindsec").checked && player.weapons[1] == 10 ? player.weapons[1] :
player.weapons[0]] == 0) {
io.send("7", 1);
setTickout(()=>{
io.send("7", 1);
}, 1);
}
}
if (gameObjects.length) {
nearSpike = [];
nearSpike = gameObjects.filter((tmp)=>tmp.dmg &&
player.sid != tmp.owner.sid && !findAllianceBySid(tmp.owner.sid) && tmp.active &&
UTILS.getDist(tmp, player, 0, 2) < (tmp.scale + player.scale)).sort(function(a, b)
{
return (UTILS.getDist(a, player, 0, 2) -
UTILS.getDist(b, player, 0, 2));
})[0];
let trap1 = gameObjects.filter((e)=>e.trap &&
e.active).sort(function(a, b) {
return (UTILS.getDist(a, player, 0, 2) -
UTILS.getDist(b, player, 0, 2));
})[0];
if (trap1) {
traps.aim = UTILS.getDirect(trap1, player, 0, 2);
if (player.sid != trap1.owner.sid && !
findAllianceBySid(trap1.owner.sid) && Math.hypot(trap1.y - player.y2, trap1.x -
player.x2) <= 50 && getEl("abactive").checked) {
traps.in = true;
traps.healths = trap1.buildHealth;
if (!instaC.isTrue && !clicks.middle && !
clicks.left && !clicks.right) {
if (player.weaponIndex != player.weapons[1]
== 10 ? player.weapons[1] : player.weapons[0]) {
selectWeapon(trap1.buildHealth >
items.weapons[player.weapons[0]].dmg && player.weapons[1] == 10 ? player.weapons[1]
: player.weapons[0]);
}
if (player.reloads[trap1.buildHealth >
items.weapons[player.weapons[0]].dmg && player.weapons[1] == 10 ? player.weapons[1]
: player.weapons[0]] == 0 && (trap1.buildHealth >
items.weapons[player.weapons[0]].dmg && player.weapons[1] == 10 ? true : !
configs.waitHit)) {
configs.waitHit = true;
io.send("7", 1);
setTickout(()=>{
io.send("7", 1);
configs.waitHit = false;
}, 1);
}
}
} else {
traps.in = false;
}
} else {
traps.in = false;
}
} else {
traps.in = false;
}
// RELOADS:
if (!instaC.isTrue && player.weapons[1] && !clicks.left
&& !clicks.right && !traps.in && getEl("weaponsautoch").checked) {
if ((player.weapons[0] == 3 || player.weapons[0] == 4
|| player.weapons[0] == 5) && (player.weapons[1] == 10 || player.weapons[1] == 14))
{
if (player.reloads[player.weapons[0]] == 0 &&
player.reloads[player.weapons[1]] == 0) {
if (!autos.reloaded) {
autos.reloaded = true;
if (player.weaponIndex !=
player.weapons[1]) {
selectWeapon(player.weapons[1]);
}
}
} else {
autos.reloaded = false;
if (player.reloads[player.weapons[0]] > 0) {
if (player.weaponIndex !=
player.weapons[0]) {
selectWeapon(player.weapons[0]);
}
} else if (player.reloads[player.weapons[0]] ==
0 && player.reloads[player.weapons[1]] > 0) {
if (player.weaponIndex !=
player.weapons[1]) {
selectWeapon(player.weapons[1]);
}
}
}
} else {
if (player.reloads[player.weapons[0]] == 0 &&
player.reloads[player.weapons[1]] == 0) {
if (!autos.reloaded) {
autos.reloaded = true;
if (player.weaponIndex !=
player.weapons[0]) {
selectWeapon(player.weapons[0]);
}
}
} else {
autos.reloaded = false;
if (player.reloads[player.weapons[1]] > 0) {
if (player.weaponIndex !=
player.weapons[1]) {
selectWeapon(player.weapons[1]);
}
} else if (player.reloads[player.weapons[1]] ==
0 && player.reloads[player.weapons[0]] > 0) {
if (player.weaponIndex !=
player.weapons[0]) {
selectWeapon(player.weapons[0]);
}
}
}
}
}
// PLACES:
if (places.slot0 && !autoQ) {
place(0, getAttackDir());
} else if (places.slot2) {
place(2, getAttackDir());
} else if (places.slot4) {
place(4, getAttackDir());
if (boostspikesss){
place(2, getAttackDir() + 300)
place(2, getAttackDir() - 300)
}
} else if (places.slot5) {
place(5, getAttackDir());
}
if (!instaC.isTrue && (getEl("abplace").checked ? true : !
traps.in)) {
autoPlace();
}
try {
let parsed
parsed = parseFloat(getEl("placeconfig").value);
let objectSize =
millC.size(items.list[player.items[parsed]].scale);
let objectDist =
millC.dist(items.list[player.items[parsed]].scale);
if (UTILS.getDist(millC, player, 0, 2) > objectDist +
items.list[player.items[parsed]].placeOffset) {
if (millC.active) {
let millDir = UTILS.getDirect(millC, player, 0,
2);
let plusXY = {
x: millC.x,
y: millC.y
};
let Boom = UTILS.getDirect(plusXY, player, 0,
2);
checkPlace(parsed, Boom +
UTILS.toRad(objectSize));
checkPlace(parsed, Boom -
UTILS.toRad(objectSize));
checkPlace(parsed, Boom);
millC.count = Math.max(0, millC.count - 1);
}
millC.x = player.x2;
millC.y = player.y2;
}
} catch (e) {}
// EXTRA:
if (storeMenu.style.display != "block" && !instaC.isTrue) {
// Wow This Is Real Left Right:
if (clicks.left || clicks.right) {
changeHat("click");
changeAcc("click");
} else {
if (traps.in) {
changeHat("trap");
changeAcc("trap");
} else {
changeHat("normal");
changeAcc("normal");
}
}
}
// SEND DIR:
if (!places.slot0 && !places.slot2 && !places.slot4 && !
places.slot5 && !autoQ) {
let atckDir = getAttackDir();
if (player.dir !== atckDir) {
lessDir = atckDir;
io.send("2", atckDir);
}
}
if (doEmpAntiInsta) {
doEmpAntiInsta = false;
}
if (anti0Tick > 0) {
anti0Tick--;
}
}
} catch (e) {
console.error(e);
}
if (autoZoom) {
if (near.dist2 <= 1000) {
resetZoom();
} else {
zoomVision();
}
} else {
resetZoom();
}
}
function setTickout(doo, timeout) {
if (!ticks.manage[ticks.tick + timeout]) {
ticks.manage[ticks.tick + timeout] = [doo];
} else {
ticks.manage[ticks.tick + timeout].push(doo);
}
}
function doNextTick(doo) {
waitTicks.push(doo);
}
// AUTO PLACE:
function autoPlace() {
let nearObj = [];
let randomDir = Math.random() * Math.PI * 2;
if (gameObjects.length && enemy.length && getEl("autoplc").checked)
{
let nearsa = {
inTrap: false,
};
nearObj = gameObjects.filter((e)=>e.trap).sort(function(a, b) {
return (UTILS.getDist(a, near, 0, 2) - UTILS.getDist(b,
near, 0, 2));
})[0];
if (nearObj) {
if (!(player.sid != nearObj.owner.sid && !
findAllianceBySid(nearObj.owner.sid)) && UTILS.getDist(nearObj, near, 0, 2) <= 70
&& nearObj.active) {
nearsa.inTrap = true;
} else {
nearsa.inTrap = false;
}
if (near.dist2 <= 300) {
if (nearsa.inTrap || near.dist2 <=
items.weapons[player.weapons[0]].range + near.scale * 1.8) {
if (near.dist2 <= 225) {
for (let i = 0; i < Math.PI * 2; i += Math.PI /
1.5) {
checkPlace(2, near.aim2 + i);
}
} else {
for (let i = Math.PI / 1.5; i < Math.PI * 2; i
+= Math.PI / 1.5) {
checkPlace(2, near.aim2 + i);
}
}
} else {
if (player.items[4] == 15) {
if (UTILS.getDist(oldXY, player, 0, 2) >= 125)
{
for (let i = 0; i < Math.PI * 2; i +=
Math.PI / 2) {
checkPlace(4, randomDir + i);
}
oldXY.x = player.x2;
oldXY.y = player.y2;
}
}
}
}
} else {
if (near.dist2 <= 400) {
if (player.items[4] == 15) {
checkPlace(4, near.aim2);
}
}
}
}
}
// EQUIP HATS:
function biomeGear() {
if (player.y2 >= config.mapScale / 2 - config.riverWidth / 2 &&
player.y2 <= config.mapScale / 2 + config.riverWidth / 2) {
buyEquip(31, 0);
} else {
if (isMoveDir == undefined && (getEl("combat").value ==
"zyenith" || getEl("combat").value == "hans" || getEl("combat").value == "me")) {
buyEquip(6, 0);
} else {
if (player.y2 <= config.snowBiomeTop) {
buyEquip(15, 0);
} else {
buyEquip(12, 0);
}
}
}
}
function safeWeapon1() {
return (near.primaryIndex == 0 || near.primaryIndex == 6 ||
near.primaryIndex == 7 || near.primaryIndex == 8);
}
function safeWeapon2() {
return (near.secondaryIndex == 9 || near.secondaryIndex == 10 ||
near.secondaryIndex == 11 || near.secondaryIndex == 14);
}
function changeHat(value) {
if (value == "normal") {
if (anti0Tick > 0) {
buyEquip(6, 0);
} else {
if ((getEl("bulltick").checked && player.shameCount > 0 &&
(ticks.tick - player.bTick) % config.serverUpdateRate === 0 && player.skinIndex !=
45) || reSyncBull) {
buyEquip(7, 0);
} else {
if (getEl("combat").value == "ae") {
buyEquip(6, 0);
} else if (getEl("combat").value == "fz") {
if (turretEmp > 0 || doEmpAntiInsta) {
buyEquip(22, 0);
} else {
if (player.y2 >= config.mapScale / 2 -
config.riverWidth / 2 && player.y2 <= config.mapScale / 2 + config.riverWidth / 2)
{
buyEquip(31, 0);
} else {
if (enemy.length) {
if (near.dist2 <=
items.weapons[near.primaryIndex ? near.primaryIndex : 5].range + player.scale * 3)
{
if (near.primaryIndex != undefined
&& near.reloads[near.primaryIndex] == 0 && near.secondaryIndex != undefined &&
near.reloads[near.secondaryIndex] == 0 && player.reloads[player.weapons[0]] <=
config.tickRate && player.reloads[player.weapons[1]] == 0 && player.weapons[0] != 7
&& player.weapons[0] != 8 && near.primaryIndex != 7 && near.primaryIndex != 8) {
buyEquip(11, 0);
} else {
if (safeWeapon1() &&
safeWeapon2()) {
buyEquip(26, 0);
} else {
function changeAcc(value) {
if (value == "normal") {
if (getEl("combat").value == "ae") {
buyEquip(11, 1);
} else {
if (player.y2 >= config.mapScale / 2 - config.riverWidth /
2 && player.y2 <= config.mapScale / 2 + config.riverWidth / 2) {
buyEquip(11, 1);
} else {
if (enemy.length) {
if (getEl("combat").value == "fz") {
if (near.dist2 <=
items.weapons[near.primaryIndex ? near.primaryIndex : 5].range + player.scale * 3)
{
if (near.primaryIndex != undefined &&
near.reloads[near.primaryIndex] == 0 && near.secondaryIndex != undefined &&
near.reloads[near.secondaryIndex] == 0 && player.reloads[player.weapons[0]] <=
config.tickRate && player.reloads[player.weapons[1]] == 0 && player.weapons[0] != 7
&& player.weapons[0] != 8 && near.primaryIndex != 7 && near.primaryIndex != 8) {
buyEquip(21, 1);
} else {
if (configs.antiBull > 0) {
buyEquip(21, 1);
} else {
if ((ticks.tick - player.bTick) %
config.serverUpdateRate === 0) {
buyEquip(13, 1);
} else {
buyEquip(11, 1);
}
}
}
} else {
buyEquip(11, 1);
}
} else {
if (near.dist2 <=
items.weapons[near.primaryIndex ? near.primaryIndex : 5].range + player.scale * 3)
{
if (configs.antiBull > 0) {
buyEquip(21, 1);
} else {
buyEquip(11, 1);
}
} else {
buyEquip(11, 1);
}
}
} else {
buyEquip(11, 1);
}
}
}
} else if (value == "click") {
if (getEl("combat").value == "ae") {
if (clicks.left) {
buyEquip(0, 1);
} else if (clicks.right) {
buyEquip(11, 1);
}
} else if (getEl("combat").value == "fz") {
if (configs.antiBull > 0) {
buyEquip(21, 1);
} else {
if (clicks.left && player.reloads[player.weapons[0]] ==
0) {
buyEquip(near.dist2 <= 300 ? 18 : 0, 1);
} else if (clicks.right &&
player.reloads[(getEl("grindsec").checked && player.weapons[1] == 10) ?
player.weapons[1] : player.weapons[0]] == 0) {
buyEquip(near.dist2 <= 300 ? 18 : 11, 1);
} else {
if ((ticks.tick - player.bTick) %
config.serverUpdateRate === 0) {
buyEquip(near.dist2 <= 500 ? 13 : 11, 1);
} else {
buyEquip(11, 1);
}
}
}
} else {
buyEquip(21, 1);
}
if (spikeinsta){
if (getEl("modeinspi").value == 1) {
place(2, getAttackDir())
}else if (getEl("modeinspi").value == 2) {
place(2, getAttackDir() + 150)
place(2, getAttackDir() - 150)
}else if (getEl("modeinspi").value == 3) {
place(4, getAttackDir() + 150)
place(2, getAttackDir() - 150)
}
if (!getEl("alwayspikess").checked) {
spikeinsta = false
}
getEl("instaspiketrue").textContent = `Spike insta: $
{spikeinsta}`
}
} else if (value == "trap") {
if (getEl("combat").value == "ae") {
buyEquip(0, 1);
} else if (getEl("combat").value == "hans") {
buyEquip(0, 1);
} else if (getEl("combat").value == "fz") {
if (configs.antiBull > 0) {
buyEquip(21, 1);
} else {
if (traps.healths >
items.weapons[player.weapons[0]].dmg && player.reloads[player.weapons[1] == 10 ?
player.weapons[1] : player.weapons[0]] == 0) {
buyEquip(near.dist2 <= 275 ? 18 : 11, 1);
} else {
if (near.dist2 <= 300) {
if (instaC.wait) {
buyEquip(21, 1);
} else {
if ((ticks.tick - player.bTick) %
config.serverUpdateRate === 0) {
buyEquip(13, 1);
} else {
buyEquip(11, 1);
}
}
} else {
buyEquip(11, 1);
}
}
}
} else {
if (configs.antiBull > 0) {
buyEquip(21, 1);
} else {
if (near.dist2 <= items.weapons[near.primaryIndex ?
near.primaryIndex : 5].range + player.scale * 3) {
buyEquip(21, 1);
} else {
buyEquip(11, 1);
}
}
}
}
}
// FIND OBJECTS BY ID/SID:
function findID(tmpObj, tmp) {
return tmpObj.find((THIS)=>THIS.id === tmp);
}
function findPlayerByID(id) {
return findID(players, id);
}
function findPlayerBySID(sid) {
return findSID(players, sid);
}
function findAIBySID(sid) {
return findSID(ais, sid);
}
function findObjectBySid(sid) {
return findSID(gameObjects, sid);
}
function findAllianceBySid(sid) {
return player.team ? alliancePlayers.find((THIS)=>THIS === sid) :
null;
}
// PING:
var lastPing = -1;
var maxPing = NaN;
var minPing = NaN;
var pingCount = 0;
var doAutoQ = false;
let wkwkwkwk = 0
let asdasd = ["PrO-Client-_", "rO-Client-_-", "O-Client-_-P", "-Client-
_-Pr", "Client-_-PrO", "lient-_-PrO-", "ient-_-PrO-C", "ent-_-PrO-Cl", "nt-_-PrO-
Cli", "t-_-PrO-Clie", "-_-PrO-Clien", "_-PrO-Client", "-PrO-Client-"]
let haghaghag = [".", "..", "..."]
let cihuycom = [".","-","+","_"]
let wakwakwak = ["A", "B", "C", "D"]
let igaga = 0
let modetyping
function pingSocketResponse() {
modetyping = getEl("typengtypi").value
if (getEl("chattypingsss").checked && chatHolder.style.display ==
"block") {
if (!stopchatty) {
if (igaga == 3 && modetyping == "1") {
igaga = 0
}else if (igaga == 4 && modetyping == "2"){
igaga = 0
}else if (igaga == 4 && modetyping == "3"){
igaga = 0
}
if (modetyping == "1"){
io.send("ch", getEl("chattypingtext").value +
haghaghag[igaga])
}else if (modetyping == "2"){
io.send("ch", getEl("chattypingtext").value + " " +
cihuycom[igaga])
}else if (modetyping == "3"){
io.send("ch", getEl("chattypingtext").value + "-" +
wakwakwak[igaga])
}
igaga ++
}
}
if (chatsmods) {
if (wkwkwkwk == 13) {
wkwkwkwk = 0
}
io.send("ch", asdasd[wkwkwkwk])
wkwkwkwk ++
}
if (stopchatty && chatHolder.style.display == "none") {
if (isianchat == null){
io.send("ch", "[canceled]")
}else {
sendChat(isianchat);
}
stopchatty = false
}
var pingTime = Date.now() - lastPing;
window.pingTime = pingTime;
pingCount++;
if (pingTime > maxPing || isNaN(maxPing)) {
maxPing = pingTime;
}
if (pingTime < minPing || isNaN(minPing)) {
minPing = pingTime;
}
if (getEl("visual").value == "zeph") {
pingDisplay.innerText = "Ping: " + pingTime + " ms | FPS: " +
currentFPS + " frames";
} else if (getEl("visual").value == "hans") {
pingDisplay.innerText = "Ping: " + pingTime + " ms | FPS: " +
currentFPS + " frames";
} else {
pingDisplay.innerText = "Ping: " + pingTime + " ms";
}
if (pingTime >= 90) {
doAutoQ = true;
} else {
doAutoQ = false;
}
}
pingDisplay.style.display = "none";
document.body.appendChild(pingDisplay);
function pingSocket() {
lastPing = Date.now();
io.send("pp");
}
// SERVER SHUTDOWN NOTICE:
function serverShutdownNotice(countdown) {
if (countdown < 0)
return;
var minutes = Math.floor(countdown / 60);
var seconds = countdown % 60;
seconds = ("0" + seconds).slice(-2);
shutdownDisplay.innerText = "Server restarting in " + minutes + ":"
+ seconds;
shutdownDisplay.hidden = false;
}
// UPDATE & ANIMATE:
window.requestAnimFrame = (function() {
return (window.requestAnimationFrame ||
window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
}
);
}
)();
// DAY CYCLE MANAGER:
let dayCycle = false;
let dayColors = {
snow: "#fff",
river: "#91b2db",
grass: "#b6db66",
desert: "#dbc666",
};
let nightColors = {
snow: "#e6e6e6",
river: "#78a1d3",
grass: "#8dba2c",
desert: "#d3b945",
};
setInterval(()=>{
dayCycle = !dayCycle;
}
, 39000 * 2);
// LMFAO:
var mStatus = document.createElement("div");
mStatus.id = "status";
mStatus.style.position = "absolute";
mStatus.style.color = "#e6e6fa";
mStatus.style.font = "15px Hammersmith One";
mStatus.style.top = "40px";
mStatus.style.left = "40px";
mStatus.style.display = "none";
mStatus.textAlign = "right";
document.body.appendChild(mStatus);
let currentFPS = 0;
let FPSTimer = 0;
let runAtFirst = true;
let autoMusic = false;
let hatELs = {
6: true,
7: true,
40: true,
22: true,
15: true
};
mStatus.innerHTML = `
<style>
.sizing {
font-size: 15px;
}
.mod {
font-size: 15px;
display: inline-block;
}
.augh {
display: inline-block;
width: 25px;
height: 25px;
background-size: cover;
background-color: #fff;
margin-right: -2.5px;
opacity: 0.4;
}
</style>
<div id = "uehmod" class = "sizing" style = "display: block;">
Ping: <div id = "pingFps" class = "mod">0</div></br>
InstaStatus: [<div id = "instaStatus" class = "mod">0</div>]</br>
Ticks | Lags: [<div id = "tickLag" class = "mod">0</div>]</br>
Packet: <div id = "packetStatus" class = "mod">0</div></br>
<div id = "nearEnemys" class = "mod">0</div></br>
</div><div id = "fzmod" class = "sizing" style = "display: none;">
Auto-Insta: <div id = "autoInsta1" class = "mod">0</div></br>
Damage Prediction: <div id = "dmgPredict" class =
"mod">0</div></br>
Turrets that can hit you: <div id = "turCanHit" class =
"mod">0</div></br>
</div><div id = "zyenithmod" class = "sizing" style = "display:
none;">
objectManager.disableObj(tmpObj);
objectManager.hitObj(tmpObj,
UTILS.getDirection(this.x, this.y, tmpObj.x, tmpObj.y));
}
}
}
}
for (var x = 0; x < players.length; ++x) {
if (players[x].canSee(this)) {
server.send(players[x].id, "aa", this.sid);
}
}
}
}
// PLAYER COLLISIONS:
if (charging || hitting) {
var tmpObj, tmpDst, tmpDir;
for (var i = 0; i < players.length; ++i) {
tmpObj = players[i];
if (tmpObj && tmpObj.alive) {
tmpDst = UTILS.getDistance(this.x, this.y,
tmpObj.x, tmpObj.y);
if (this.hitRange) {
if (!this.hitWait && tmpDst <=
this.hitRange + tmpObj.scale) {
if (hitting) {
tmpDir =
UTILS.getDirection(tmpObj.x, tmpObj.y, this.x, this.y);
tmpObj.changeHealth(-this.dmg);
tmpObj.xVel += 0.6 *
Math.cos(tmpDir);
tmpObj.yVel += 0.6 *
Math.sin(tmpDir);
this.runFrom = null;
this.chargeTarget = null;
this.waitCount = 3000;
this.hitWait = !UTILS.randInt(0, 2)
? 600 : 0;
} else
this.hitWait = this.hitDelay;
}
} else if (tmpDst <= this.scale + tmpObj.scale)
{
tmpDir = UTILS.getDirection(tmpObj.x,
tmpObj.y, this.x, this.y);
tmpObj.changeHealth(-this.dmg);
tmpObj.xVel += 0.55 * Math.cos(tmpDir);
tmpObj.yVel += 0.55 * Math.sin(tmpDir);
}
}
}
}
// DECEL:
if (this.xVel)
this.xVel *= Math.pow(config.playerDecel, delta);
if (this.yVel)
this.yVel *= Math.pow(config.playerDecel, delta);
// MAP BOUNDARIES:
var tmpScale = this.scale;
if (this.x - tmpScale < 0) {
this.x = tmpScale;
this.xVel = 0;
} else if (this.x + tmpScale > config.mapScale) {
this.x = config.mapScale - tmpScale;
this.xVel = 0;
}
if (this.y - tmpScale < 0) {
this.y = tmpScale;
this.yVel = 0;
} else if (this.y + tmpScale > config.mapScale) {
this.y = config.mapScale - tmpScale;
this.yVel = 0;
}
}
}
;
// CAN SEE:
this.canSee = function(other) {
if (!other)
return false;
if (other.skin && other.skin.invisTimer && other.noMovTimer >=
other.skin.invisTimer)
return false;
var dx = Math.abs(other.x - this.x) - other.scale;
var dy = Math.abs(other.y - this.y) - other.scale;
return (dx <= (config.maxScreenWidth / 2) * 1.3 && dy <=
(config.maxScreenHeight / 2) * 1.3);
}
;
var tmpRatio = 0;
var animIndex = 0;
this.animate = function(delta) {
if (this.animTime > 0) {
this.animTime -= delta;
if (this.animTime <= 0) {
this.animTime = 0;
this.dirPlus = 0;
tmpRatio = 0;
animIndex = 0;
} else {
if (animIndex == 0) {
tmpRatio += delta / (this.animSpeed *
config.hitReturnRatio);
this.dirPlus = UTILS.lerp(0, this.targetAngle,
Math.min(1, tmpRatio));
if (tmpRatio >= 1) {
tmpRatio = 1;
animIndex = 1;
}
} else {
tmpRatio -= delta / (this.animSpeed * (1 -
config.hitReturnRatio));
this.dirPlus = UTILS.lerp(0, this.targetAngle,
Math.max(0, tmpRatio));
}
}
}
}
;
// ANIMATION:
this.startAnim = function() {
this.animTime = this.animSpeed = 600;
this.targetAngle = Math.PI * 0.8;
tmpRatio = 0;
animIndex = 0;
}
;
// CHANGE HEALTH:
this.changeHealth = function(val, doer, runFrom) {
if (this.active) {
this.health += val;
if (runFrom) {
if (this.hitScare && !UTILS.randInt(0, this.hitScare))
{
this.runFrom = runFrom;
this.waitCount = 0;
this.moveCount = 2000;
} else if (this.hostile && this.chargePlayer &&
runFrom.isPlayer) {
this.chargeTarget = runFrom;
this.waitCount = 0;
this.moveCount = 8000;
} else if (!this.dontRun) {
this.runFrom = runFrom;
this.waitCount = 0;
this.moveCount = 2000;
}
}
if (val < 0 && this.hitRange && UTILS.randInt(0, 1))
this.hitWait = 500;
if (doer && doer.canSee(this) && val < 0) {
server.send(doer.id, "t", Math.round(this.x),
Math.round(this.y), Math.round(-val), 1);
}
if (this.health <= 0) {
if (this.spawnDelay) {
this.spawnCounter = this.spawnDelay;
this.x = -1000000;
this.y = -1000000;
} else {
this.x = this.startX || UTILS.randInt(0,
config.mapScale);
this.y = this.startY || UTILS.randInt(0,
config.mapScale);
}
this.health = this.maxHealth;
this.runFrom = null;
if (doer) {
scoreCallback(doer, this.killScore);
if (this.drop) {
for (var i = 0; i < this.drop.length; ) {
players[i].changeItemCount(hitObj.group.id, -1);
}
}
}
this.active = false;
for (var i = 0; i < players.length; ++i) {
if (this.sentTo[players[i].id])
server.send(players[i].id, "19", this.sid,
UTILS.fixTo(shortDist, 1));
}
}
}
}
}
;
}
;
/***/
},
/***/
"./src/js/data/projectileManager.js": /*!
******************************************!*\
!*** ./src/js/data/projectileManager.js ***!
\******************************************/
/*! no static exports found */
/***/
function(module, exports) {
module.exports = function(Projectile, projectiles, players, ais,
objectManager, items, config, UTILS, server) {
this.addProjectile = function(x, y, dir, range, speed, indx, owner,
ignoreObj, layer) {
var tmpData = items.projectiles[indx];
var tmpProj = projectiles.find((tmp)=>!tmp.active);
if (!tmpProj) {
tmpProj = new
Projectile(players,ais,objectManager,items,config,UTILS,server);
tmpProj.sid = projectiles.length;
projectiles.push(tmpProj);
}
tmpProj.init(indx, x, y, dir, speed, tmpData.dmg, range,
tmpData.scale, owner);
tmpProj.ignoreObj = ignoreObj;
tmpProj.layer = layer || tmpData.layer;
tmpProj.src = tmpData.src;
return tmpProj;
}
;
}
;
/***/
},
/***/
"./src/js/data/store.js": /*!******************************!*\
!*** ./src/js/data/store.js ***!
\******************************/
/*! no static exports found */
/***/
function(module, exports) {
// STORE HATS:
module.exports.hats = [{
id: 45,
name: "Shame!",
dontSell: true,
price: 0,
scale: 120,
desc: "hacks are for losers",
}, {
id: 51,
name: "Moo Cap",
price: 0,
scale: 120,
desc: "coolest mooer around",
}, {
id: 50,
name: "Apple Cap",
price: 0,
scale: 120,
desc: "apple farms remembers",
}, {
id: 28,
name: "Moo Head",
price: 0,
scale: 120,
desc: "no effect",
}, {
id: 29,
name: "Pig Head",
price: 0,
scale: 120,
desc: "no effect",
}, {
id: 30,
name: "Fluff Head",
price: 0,
scale: 120,
desc: "no effect",
}, {
id: 36,
name: "Pandou Head",
price: 0,
scale: 120,
desc: "no effect",
}, {
id: 37,
name: "Bear Head",
price: 0,
scale: 120,
desc: "no effect",
}, {
id: 38,
name: "Monkey Head",
price: 0,
scale: 120,
desc: "no effect",
}, {
id: 44,
name: "Polar Head",
price: 0,
scale: 120,
desc: "no effect",
}, {
id: 35,
name: "Fez Hat",
price: 0,
scale: 120,
desc: "no effect",
}, {
id: 42,
name: "Enigma Hat",
price: 0,
scale: 120,
desc: "join the enigma army",
}, {
id: 43,
name: "Blitz Hat",
price: 0,
scale: 120,
desc: "hey everybody i'm blitz",
}, {
id: 49,
name: "Bob XIII Hat",
price: 0,
scale: 120,
desc: "like and subscribe",
}, {
id: 57,
name: "Pumpkin",
price: 50,
scale: 120,
desc: "Spooooky",
}, {
id: 8,
name: "Bummle Hat",
price: 100,
scale: 120,
desc: "no effect",
}, {
id: 2,
name: "Straw Hat",
price: 500,
scale: 120,
desc: "no effect",
}, {
id: 15,
name: "Winter Cap",
price: 600,
scale: 120,
desc: "allows you to move at normal speed in snow",
coldM: 1,
}, {
id: 5,
name: "Cowboy Hat",
price: 1000,
scale: 120,
desc: "no effect",
}, {
id: 4,
name: "Ranger Hat",
price: 2000,
scale: 120,
desc: "no effect",
}, {
id: 18,
name: "Explorer Hat",
price: 2000,
scale: 120,
desc: "no effect",
}, {
id: 31,
name: "Flipper Hat",
price: 2500,
scale: 120,
desc: "have more control while in water",
watrImm: true,
}, {
id: 1,
name: "Marksman Cap",
price: 3000,
scale: 120,
desc: "increases arrow speed and range",
aMlt: 1.3,
}, {
id: 10,
name: "Bush Gear",
price: 3000,
scale: 160,
desc: "allows you to disguise yourself as a bush",
}, {
id: 48,
name: "Halo",
price: 3000,
scale: 120,
desc: "no effect",
}, {
id: 6,
name: "Soldier Helmet",
price: 4000,
scale: 120,
desc: "reduces damage taken but slows movement",
spdMult: 0.94,
dmgMult: 0.75,
}, {
id: 23,
name: "Anti Venom Gear",
price: 4000,
scale: 120,
desc: "makes you immune to poison",
poisonRes: 1,
}, {
id: 13,
name: "Medic Gear",
price: 5000,
scale: 110,
desc: "slowly regenerates health over time",
healthRegen: 3,
}, {
id: 9,
name: "Miners Helmet",
price: 5000,
scale: 120,
desc: "earn 1 extra gold per resource",
extraGold: 1,
}, {
id: 32,
name: "Musketeer Hat",
price: 5000,
scale: 120,
desc: "reduces cost of projectiles",
projCost: 0.5,
}, {
id: 7,
name: "Bull Helmet",
price: 6000,
scale: 120,
desc: "increases damage done but drains health",
healthRegen: -5,
dmgMultO: 1.5,
spdMult: 0.96,
}, {
id: 22,
name: "Emp Helmet",
price: 6000,
scale: 120,
desc: "turrets won't attack but you move slower",
antiTurret: 1,
spdMult: 0.7,
}, {
id: 12,
name: "Booster Hat",
price: 6000,
scale: 120,
desc: "increases your movement speed",
spdMult: 1.16,
}, {
id: 26,
name: "Barbarian Armor",
price: 8000,
scale: 120,
desc: "knocks back enemies that attack you",
dmgK: 0.6,
}, {
id: 21,
name: "Plague Mask",
price: 10000,
scale: 120,
desc: "melee attacks deal poison damage",
poisonDmg: 5,
poisonTime: 6,
}, {
id: 46,
name: "Bull Mask",
price: 10000,
scale: 120,
desc: "bulls won't target you unless you attack them",
bullRepel: 1,
}, {
id: 14,
name: "Windmill Hat",
topSprite: true,
price: 10000,
scale: 120,
desc: "generates points while worn",
pps: 1.5,
}, {
id: 11,
name: "Spike Gear",
topSprite: true,
price: 10000,
scale: 120,
desc: "deal damage to players that damage you",
dmg: 0.45,
}, {
id: 53,
name: "Turret Gear",
topSprite: true,
price: 10000,
scale: 120,
desc: "you become a walking turret",
turret: {
proj: 1,
range: 700,
rate: 2500,
},
spdMult: 0.7,
}, {
id: 20,
name: "Samurai Armor",
price: 12000,
scale: 120,
desc: "increased attack speed and fire rate",
atkSpd: 0.78,
}, {
id: 58,
name: "Dark Knight",
price: 12000,
scale: 120,
desc: "restores health when you deal damage",
healD: 0.4,
}, {
id: 27,
name: "Scavenger Gear",
price: 15000,
scale: 120,
desc: "earn double points for each kill",
kScrM: 2,
}, {
id: 40,
name: "Tank Gear",
price: 15000,
scale: 120,
desc: "increased damage to buildings but slower movement",
spdMult: 0.3,
bDmg: 3.3,
}, {
id: 52,
name: "Thief Gear",
price: 15000,
scale: 120,
desc: "steal half of a players gold when you kill them",
goldSteal: 0.5,
}, {
id: 55,
name: "Bloodthirster",
price: 20000,
scale: 120,
desc: "Restore Health when dealing damage. And increased damage",
healD: 0.25,
dmgMultO: 1.2,
}, {
id: 56,
name: "Assassin Gear",
price: 20000,
scale: 120,
desc: "Go invisible when not moving. Can't eat. Increased speed",
noEat: true,
spdMult: 1.1,
invisTimer: 1000,
}, ];
// STORE ACCESSORIES:
module.exports.accessories = [{
id: 12,
name: "Snowball",
price: 1000,
scale: 105,
xOff: 18,
desc: "no effect",
}, {
id: 9,
name: "Tree Cape",
price: 1000,
scale: 90,
desc: "no effect",
}, {
id: 10,
name: "Stone Cape",
price: 1000,
scale: 90,
desc: "no effect",
}, {
id: 3,
name: "Cookie Cape",
price: 1500,
scale: 90,
desc: "no effect",
}, {
id: 8,
name: "Cow Cape",
price: 2000,
scale: 90,
desc: "no effect",
}, {
id: 11,
name: "Monkey Tail",
price: 2000,
scale: 97,
xOff: 25,
desc: "Super speed but reduced damage",
spdMult: 1.35,
dmgMultO: 0.2,
}, {
id: 17,
name: "Apple Basket",
price: 3000,
scale: 80,
xOff: 12,
desc: "slowly regenerates health over time",
healthRegen: 1,
}, {
id: 6,
name: "Winter Cape",
price: 3000,
scale: 90,
desc: "no effect",
}, {
id: 4,
name: "Skull Cape",
price: 4000,
scale: 90,
desc: "no effect",
}, {
id: 5,
name: "Dash Cape",
price: 5000,
scale: 90,
desc: "no effect",
}, {
id: 2,
name: "Dragon Cape",
price: 6000,
scale: 90,
desc: "no effect",
}, {
id: 1,
name: "Super Cape",
price: 8000,
scale: 90,
desc: "no effect",
}, {
id: 7,
name: "Troll Cape",
price: 8000,
scale: 90,
desc: "no effect",
}, {
id: 14,
name: "Thorns",
price: 10000,
scale: 115,
xOff: 20,
desc: "no effect",
}, {
id: 15,
name: "Blockades",
price: 10000,
scale: 95,
xOff: 15,
desc: "no effect",
}, {
id: 20,
name: "Devils Tail",
price: 10000,
scale: 95,
xOff: 20,
desc: "no effect",
}, {
id: 16,
name: "Sawblade",
price: 12000,
scale: 90,
spin: true,
xOff: 0,
desc: "deal damage to players that damage you",
dmg: 0.15,
}, {
id: 13,
name: "Angel Wings",
price: 15000,
scale: 138,
xOff: 22,
desc: "slowly regenerates health over time",
healthRegen: 3,
}, {
id: 19,
name: "Shadow Wings",
price: 15000,
scale: 138,
xOff: 22,
desc: "increased movement speed",
spdMult: 1.1,
}, {
id: 18,
name: "Blood Wings",
price: 20000,
scale: 178,
xOff: 26,
desc: "restores health when you deal damage",
healD: 0.2,
}, {
id: 21,
name: "Corrupt X Wings",
price: 20000,
scale: 178,
xOff: 26,
desc: "deal damage to players that damage you",
dmg: 0.25,
}, ];
/***/
},
/***/
"./src/js/libs/animText.js": /*!*********************************!*\
!*** ./src/js/libs/animText.js ***!
\*********************************/
/*! no static exports found */
/***/
function(module, exports) {
// ANIMATED TEXT:
module.exports.AnimText = function() {
// INIT:
this.init = function(x, y, scale, speed, life, text, color) {
this.x = x;
this.y = y;
this.randomX = Math.floor(Math.random() * 2);
this.randomSpeed = Math.floor(Math.random() * 5);
this.moveSpeed = 10;
this.color = color;
this.scale = scale;
this.startScale = this.scale;
this.maxScale = scale * 1.5;
this.scaleSpeed = getEl("visual").value == "hans" ? 0.35 : 0.7;
this.speed = speed;
this.life = life;
this.life2 = this.life;
this.startLife = this.life;
this.text = text;
this.animation = 0;
this.maxAnim = 100;
this.acc = 1;
this.acc2 = 1;
}
;
// UPDATE:
this.update = function(delta) {
if (this.life) {
this.life -= delta;
this.animation += 6;
if (getEl("visual").value == "me") {
if (this.animation < this.maxAnim) {
this.acc -= 0.1;
this.y -= this.speed * this.acc * delta;
} else {
this.life2 -= delta * 1.75;
this.acc += 0.15;
this.y += this.speed * this.acc * delta;
}
this.scale += this.scaleSpeed * delta;
if (this.scale >= this.maxScale) {
this.scale = this.maxScale;
this.scaleSpeed *= -1;
} else if (this.scale <= this.startScale) {
this.scale = this.startScale;
this.scaleSpeed = 0;
}
} else if (getEl("visual").value == "hans") {
if (this.animation < this.maxAnim) {
this.acc -= 0.05;
this.y -= this.speed * this.acc * delta;
} else {
this.life2 -= delta * 1.9;
this.acc += 0.05;
this.y += this.speed * this.acc * delta;
}
if (this.randomX == 1) {
this.x += this.moveSpeed;
} else if (this.randomX == 0) {
this.x -= this.moveSpeed;
}
this.moveSpeed = Math.max(0, this.moveSpeed - 1);
this.scale += this.scaleSpeed * delta;
if (this.scale >= this.maxScale) {
this.scale = this.maxScale;
this.scaleSpeed *= -1;
} else if (this.scale <= this.startScale) {
this.scaleSpeed = 0;
this.scale -= 0.1;
}
} else {
this.y -= this.speed * delta;
this.scale += this.scaleSpeed * delta;
if (this.scale >= this.maxScale) {
this.scale = this.maxScale;
this.scaleSpeed *= -1;
} else if (this.scale <= this.startScale) {
this.scale = this.startScale;
this.scaleSpeed = 0;
}
}
if (this.life <= 0) {
this.life = 0;
}
}
}
;
// RENDER:
this.render = function(ctxt, xOff, yOff) {
if (getEl("visual").value == "me" || getEl("visual").value ==
"hans") {
ctxt.globalAlpha = Math.min(1, this.life2 /
this.startLife);
}
ctxt.fillStyle = this.color;
ctxt.font = this.scale + "px Hammersmith One";
if (getEl("visual").value == "cele" || getEl("visual").value ==
"zeph") {
ctxt.strokeText(this.text, this.x - xOff, this.y - yOff);
}
ctxt.fillText(this.text, this.x - xOff, this.y - yOff);
ctxt.globalAlpha = 1;
}
;
}
;
// TEXT MANAGER:
module.exports.TextManager = function() {
this.texts = [];
// UPDATE:
this.update = function(delta, ctxt, xOff, yOff) {
ctxt.textBaseline = "middle";
ctxt.textAlign = "center";
for (var i = 0; i < this.texts.length; ++i) {
if (this.texts[i].life) {
this.texts[i].update(delta);
this.texts[i].render(ctxt, xOff, yOff);
}
}
}
;
// SHOW TEXT:
this.showText = function(x, y, scale, speed, life, text, color) {
var tmpText;
for (var i = 0; i < this.texts.length; ++i) {
if (!this.texts[i].life) {
tmpText = this.texts[i];
break;
}
}
if (!tmpText) {
tmpText = new module.exports.AnimText();
this.texts.push(tmpText);
}
tmpText.init(x, y, scale, speed, life, text, color);
}
;
}
;
/***/
},
/***/
"./src/js/libs/io-client.js": /*!**********************************!*\
!*** ./src/js/libs/io-client.js ***!
\**********************************/
/*! no static exports found */
/***/
function(module, exports, __webpack_require__) {
var msgpack = __webpack_require__(/*! msgpack-lite */
"./node_modules/msgpack-lite/lib/browser.js");
var config = __webpack_require__(/*! ../config */
"./src/js/config.js");
module.exports = {
socket: null,
connected: false,
socketId: -1,
connect: function(address, callback, events) {
if (this.socket)
return;
// CREATE SOCKET:
var _this = this;
try {
var socketError = false;
var socketAddress = address;
this.socket = new WebSocket(socketAddress);
this.socket.binaryType = "arraybuffer";
this.socket.onmessage = function(message) {
// PARSE MESSAGE:
var data = new Uint8Array(message.data);
var parsed = msgpack.decode(data);
var type = parsed[0];
var data = parsed[1];
// CALL EVENT:
if (type == "io-init") {
_this.socketId = data[0];
} else {
events[type].apply(undefined, data);
}
}
;
this.socket.onopen = function() {
_this.connected = true;
callback();
}
;
this.socket.onclose = function(event) {
_this.connected = false;
if (event.code == 4001) {
callback("Invalid Connection");
} else if (!socketError) {
callback("disconnected");
}
}
;
this.socket.onerror = function(error) {
if (this.socket && this.socket.readyState !=
WebSocket.OPEN) {
socketError = true;
console.error("Socket error", arguments);
callback("Socket error");
}
}
;
} catch (e) {
console.warn("Socket connection error:", e);
callback(e);
}
},
send: function(type) {
if (!this.connected)
return;
if (!firstSend.min) {
firstSend.min = true;
setTimeout(()=>{
firstSend.min = false;
minPacket = 0;
}
, minTime);
}
if (!firstSend.sec) {
firstSend.sec = true;
setTimeout(()=>{
firstSend.sec = false;
secPacket = 0;
}
, secTime);
}
if ((getEl("ak").checked && secPacket < secMax && minPacket <
minMax) || !getEl("ak").checked) {
// EXTRACT DATA ARRAY:
let data = Array.prototype.slice.call(arguments, 1);
// SEND MESSAGE:
if (type == "ch") {
// ANTI PROFANITY:
let profanity = ["cunt", "whore", "fuck", "shit",
"faggot", "nigger", "nigga", "dick", "vagina", "minge", "cock", "rape", "cum",
"sex", "tits", "penis", "clit", "pussy", "meatcurtain", "jizz", "prune", "douche",
"wanker", "damn", "bitch", "dick", "fag", "bastard", ];
let tmpString;
profanity.forEach((profany)=>{
if (data[0].indexOf(profany) > -1) {
tmpString = "";
for (let i = 0; i < profany.length; ++i) {
if (i == 1) {
tmpString += String.fromCharCode(0);
}
tmpString += profany[i];
}
let re = new RegExp(profany,"g");
data[0] = data[0].replace(re, tmpString);
}
});
// FIX CHAT:
data[0] = data[0].slice(0, 30);
} else if (type == "8") {
// MAKE SAME CLAN:
data[0] = data[0] + String.fromCharCode(0);
data[0] = data[0].slice(0, 7);
}
let binary = msgpack.encode([type, data]);
this.socket.send(binary);
minPacket++;
secPacket++;
}
},
socketReady: function() {
return this.socket && this.connected;
},
close: function() {
this.socket && this.socket.close();
},
};
/***/
},
/***/
"./src/js/libs/modernizr.js": /*!**********************************!*\
!*** ./src/js/libs/modernizr.js ***!
\**********************************/
/*! no static exports found */
/***/
function(module, exports) {
!(function(e, n, s) {
function o(e, n) {
return typeof e === n;
}
function a() {
var e, n, s, a, t, f, l;
for (var c in r)
if (r.hasOwnProperty(c)) {
if (((e = []),
(n = r[c]),
n.name && (e.push(n.name.toLowerCase()),
n.options && n.options.aliases &&
n.options.aliases.length)))
for (s = 0; s < n.options.aliases.length; s++)
e.push(n.options.aliases[s].toLowerCase());
for (a = o(n.fn, "function") ? n.fn() : n.fn,
t = 0; t < e.length; t++)
(f = e[t]),
(l = f.split(".")),
1 === l.length ? (Modernizr[l[0]] = a) : (!
Modernizr[l[0]] || Modernizr[l[0]]instanceof Boolean || (Modernizr[l[0]] = new
Boolean(Modernizr[l[0]])),
(Modernizr[l[0]][l[1]] = a)),
i.push((a ? "" : "no-") + l.join("-"));
}
}
function t(e) {
var n = l.className
, s = Modernizr._config.classPrefix || "";
if ((c && (n = n.baseVal),
Modernizr._config.enableJSClass)) {
var o = new RegExp("(^|\\s)" + s + "no-js(\\s|$)");
n = n.replace(o, "$1" + s + "js$2");
}
Modernizr._config.enableClasses && ((n += " " + s + e.join(" "
+ s)),
c ? (l.className.baseVal =
n) : (l.className = n));
}
var i = []
, r = []
, f = {
_version: "3.5.0",
_config: {
classPrefix: "",
enableClasses: !0,
enableJSClass: !0,
usePrefixes: !0,
},
_q: [],
on: function(e, n) {
var s = this;
setTimeout(function() {
n(s[e]);
}, 0);
},
addTest: function(e, n, s) {
r.push({
name: e,
fn: n,
options: s
});
},
addAsyncTest: function(e) {
r.push({
name: null,
fn: e
});
},
}
, Modernizr = function() {};
(Modernizr.prototype = f),
(Modernizr = new Modernizr());
var l = n.documentElement
, c = "svg" === l.nodeName.toLowerCase();
Modernizr.addTest("passiveeventlisteners", function() {
var n = !1;
try {
var s = Object.defineProperty({}, "passive", {
get: function() {
n = !0;
},
});
e.addEventListener("test", null, s);
} catch (o) {}
return n;
}),
a(),
t(i),
delete f.addTest,
delete f.addAsyncTest;
for (var u = 0; u < Modernizr._q.length; u++)
Modernizr._q[u]();
e.Modernizr = Modernizr;
}
)(window, document);
/***/
},
/***/
"./src/js/libs/soundManager.js": /*!*************************************!
*\
!*** ./src/js/libs/soundManager.js ***!
\*************************************/
/*! no static exports found */
/***/
function(module, exports) {
// PLAYER MANAGER:
module.exports.obj = function(config, UTILS) {
// INIT:
var tmpSound;
this.sounds = [];
this.active = true;
// PLAY SOUND:
this.play = function(id, volume, loop) {
if (!volume || !this.active)
return;
tmpSound = this.sounds[id];
if (!tmpSound) {
tmpSound = new Howl({
src: ".././sound/" + id + ".mp3",
});
this.sounds[id] = tmpSound;
}
if (!loop || !tmpSound.isPlaying) {
tmpSound.isPlaying = true;
tmpSound.play();
tmpSound.volume((volume || 1) * config.volumeMult);
tmpSound.loop(loop);
}
}
;
// TOGGLE MUTE:
this.toggleMute = function(id, mute) {
tmpSound = this.sounds[id];
if (tmpSound)
tmpSound.mute(mute);
}
;
// STOP SOUND:
this.stop = function(id) {
tmpSound = this.sounds[id];
if (tmpSound) {
tmpSound.stop();
tmpSound.isPlaying = false;
}
}
;
}
;
/***/
},
/***/
"./src/js/libs/utils.js": /*!******************************!*\
!*** ./src/js/libs/utils.js ***!
\******************************/
/*! no static exports found */
/***/
function(module, exports) {
// MATH UTILS:
var mathABS = Math.abs;
var mathCOS = Math.cos;
var mathSIN = Math.sin;
var mathPOW = Math.pow;
var mathSQRT = Math.sqrt;
var mathATAN2 = Math.atan2;
var mathPI = Math.PI;
// GLOBAL UTILS:
module.exports.loop = function(action, loop) {
for (let i = 0; i < loop; i++) {
action();
}
}
;
module.exports.toRad = function(angle) {
return angle * (Math.PI / 180);
}
;
module.exports.toAng = function(radian) {
return radian / (Math.PI / 180);
}
;
module.exports.randInt = function(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
;
module.exports.randFloat = function(min, max) {
return Math.random() * (max - min + 1) + min;
}
;
module.exports.lerp = function(value1, value2, amount) {
return value1 + (value2 - value1) * amount;
}
;
module.exports.decel = function(val, cel) {
if (val > 0)
val = Math.max(0, val - cel);
else if (val < 0)
val = Math.min(0, val + cel);
return val;
}
;
module.exports.getDistance = function(x1, y1, x2, y2) {
return mathSQRT((x2 -= x1) * x2 + (y2 -= y1) * y2);
}
;
module.exports.getDist = function(tmp1, tmp2, type1, type2) {
let tmpXY1 = {
x: type1 == 0 ? tmp1.x : type1 == 1 ? tmp1.x1 : type1 == 2 ?
tmp1.x2 : type1 == 3 && tmp1.x3,
y: type1 == 0 ? tmp1.y : type1 == 1 ? tmp1.y1 : type1 == 2 ?
tmp1.y2 : type1 == 3 && tmp1.y3,
};
let tmpXY2 = {
x: type2 == 0 ? tmp2.x : type2 == 1 ? tmp2.x1 : type2 == 2 ?
tmp2.x2 : type2 == 3 && tmp2.x3,
y: type2 == 0 ? tmp2.y : type2 == 1 ? tmp2.y1 : type2 == 2 ?
tmp2.y2 : type2 == 3 && tmp2.y3,
};
return mathSQRT((tmpXY2.x -= tmpXY1.x) * tmpXY2.x + (tmpXY2.y -=
tmpXY1.y) * tmpXY2.y);
}
;
module.exports.getDirection = function(x1, y1, x2, y2) {
return mathATAN2(y1 - y2, x1 - x2);
}
;
module.exports.getDirect = function(tmp1, tmp2, type1, type2) {
let tmpXY1 = {
x: type1 == 0 ? tmp1.x : type1 == 1 ? tmp1.x1 : type1 == 2 ?
tmp1.x2 : type1 == 3 && tmp1.x3,
y: type1 == 0 ? tmp1.y : type1 == 1 ? tmp1.y1 : type1 == 2 ?
tmp1.y2 : type1 == 3 && tmp1.y3,
};
let tmpXY2 = {
x: type2 == 0 ? tmp2.x : type2 == 1 ? tmp2.x1 : type2 == 2 ?
tmp2.x2 : type2 == 3 && tmp2.x3,
y: type2 == 0 ? tmp2.y : type2 == 1 ? tmp2.y1 : type2 == 2 ?
tmp2.y2 : type2 == 3 && tmp2.y3,
};
return mathATAN2(tmpXY1.y - tmpXY2.y, tmpXY1.x - tmpXY2.x);
}
;
module.exports.getAngleDist = function(a, b) {
var p = mathABS(b - a) % (mathPI * 2);
return p > mathPI ? mathPI * 2 - p : p;
}
;
module.exports.isNumber = function(n) {
return typeof n == "number" && !isNaN(n) && isFinite(n);
}
;
module.exports.isString = function(s) {
return s && typeof s == "string";
}
;
module.exports.kFormat = function(num) {
return num > 999 ? (num / 1000).toFixed(1) + "k" : num;
}
;
module.exports.capitalizeFirst = function(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
;
module.exports.fixTo = function(n, v) {
return parseFloat(n.toFixed(v));
}
;
module.exports.sortByPoints = function(a, b) {
return parseFloat(b.points) - parseFloat(a.points);
}
;
module.exports.lineInRect = function(recX, recY, recX2, recY2, x1, y1,
x2, y2) {
var minX = x1;
var maxX = x2;
if (x1 > x2) {
minX = x2;
maxX = x1;
}
if (maxX > recX2)
maxX = recX2;
if (minX < recX)
minX = recX;
if (minX > maxX)
return false;
var minY = y1;
var maxY = y2;
var dx = x2 - x1;
if (Math.abs(dx) > 0.0000001) {
var a = (y2 - y1) / dx;
var b = y1 - a * x1;
minY = a * minX + b;
maxY = a * maxX + b;
}
if (minY > maxY) {
var tmp = maxY;
maxY = minY;
minY = tmp;
}
if (maxY > recY2)
maxY = recY2;
if (minY < recY)
minY = recY;
if (minY > maxY)
return false;
return true;
}
;
module.exports.containsPoint = function(element, x, y) {
var bounds = element.getBoundingClientRect();
var left = bounds.left + window.scrollX;
var top = bounds.top + window.scrollY;
var width = bounds.width;
var height = bounds.height;
var insideHorizontal = x > left && x < left + width;
var insideVertical = y > top && y < top + height;
return insideHorizontal && insideVertical;
}
;
module.exports.mousifyTouchEvent = function(event) {
var touch = event.changedTouches[0];
event.screenX = touch.screenX;
event.screenY = touch.screenY;
event.clientX = touch.clientX;
event.clientY = touch.clientY;
event.pageX = touch.pageX;
event.pageY = touch.pageY;
}
;
module.exports.hookTouchEvents = function(element, skipPrevent) {
var preventDefault = !skipPrevent;
var isHovering = false;
// var passive = window.Modernizr.passiveeventlisteners ? {passive:
true} : false;
var passive = false;
element.addEventListener("touchstart",
module.exports.checkTrusted(touchStart), passive);
element.addEventListener("touchmove",
module.exports.checkTrusted(touchMove), passive);
element.addEventListener("touchend",
module.exports.checkTrusted(touchEnd), passive);
element.addEventListener("touchcancel",
module.exports.checkTrusted(touchEnd), passive);
element.addEventListener("touchleave",
module.exports.checkTrusted(touchEnd), passive);
function touchStart(e) {
module.exports.mousifyTouchEvent(e);
window.setUsingTouch(true);
if (preventDefault) {
e.preventDefault();
e.stopPropagation();
}
if (element.onmouseover)
element.onmouseover(e);
isHovering = true;
}
function touchMove(e) {
module.exports.mousifyTouchEvent(e);
window.setUsingTouch(true);
if (preventDefault) {
e.preventDefault();
e.stopPropagation();
}
if (module.exports.containsPoint(element, e.pageX, e.pageY)) {
if (!isHovering) {
if (element.onmouseover)
element.onmouseover(e);
isHovering = true;
}
} else {
if (isHovering) {
if (element.onmouseout)
element.onmouseout(e);
isHovering = false;
}
}
}
function touchEnd(e) {
module.exports.mousifyTouchEvent(e);
window.setUsingTouch(true);
if (preventDefault) {
e.preventDefault();
e.stopPropagation();
}
if (isHovering) {
if (element.onclick)
element.onclick(e);
if (element.onmouseout)
element.onmouseout(e);
isHovering = false;
}
}
}
;
module.exports.removeAllChildren = function(element) {
while (element.hasChildNodes()) {
element.removeChild(element.lastChild);
}
}
;
module.exports.generateElement = function(config) {
var element = document.createElement(config.tag || "div");
function generateServerList(regions) {
var servers = [];
for (var region in regions) {
var regionServers = regions[region];
for (var i = 0; i < regionServers.length; i++) {
servers.push({
ip: region + ":" + i,
scheme: "testing",
region: region,
index: i,
games: regionServers[i].map((p)=>{
return {
playerCount: p,
isPrivate: false
};
}
),
});
}
}
return servers;
}
// Test 1
var maxPlayers = 5;
var client1 = new VultrClient("test.io",-1,maxPlayers,1,false);
var lastError = undefined;
client1.errorCallback = function(error) {
lastError = error;
}
;
client1.processServers(generateServerList({
1: [[0, 0, 0, 0], [0, 0, 0, 0], ],
2: [[maxPlayers, 1, 0, 0], [0, 0, 0, 0], ],
3: [[maxPlayers, 0, 1, maxPlayers], [0, 0, 0, 0], ],
4: [[maxPlayers, 1, 1, maxPlayers], [1, 0, 0, 0], ],
5: [[maxPlayers, 1, 1, maxPlayers], [1, 0, maxPlayers - 1,
0], ],
6: [[maxPlayers, maxPlayers, maxPlayers, maxPlayers], [2, 3, 1,
4], ],
7: [[maxPlayers, maxPlayers, maxPlayers, maxPlayers],
[maxPlayers, maxPlayers, maxPlayers, maxPlayers], ],
}));
assert(client1.seekServer(1, false), [1, 0, 0]);
assert(client1.seekServer(1, true), [1, 1, 3]);
assert(client1.seekServer(2, false), [2, 0, 1]);
assert(client1.seekServer(2, true), [2, 1, 3]);
assert(client1.seekServer(3, false), [3, 0, 2]);
assert(client1.seekServer(3, true), [3, 1, 3]);
assert(client1.seekServer(4, false), [4, 0, 1]);
assert(client1.seekServer(4, true), [4, 1, 3]);
assert(client1.seekServer(5, false), [5, 1, 2]);
assert(client1.seekServer(5, true), [5, 1, 3]);
assert(client1.seekServer(6, false), [6, 1, 3]);
assert(client1.seekServer(6, true), undefined);
assert(client1.seekServer(7, false), undefined);
assert(client1.seekServer(7, true), undefined);
console.log("Tests passed.");
}
;
// FLATMAP:
var concat = function(x, y) {
return x.concat(y);
};
var flatMap = function(f, xs) {
return xs.map(f).reduce(concat, []);
};
Array.prototype.flatMap = function(f) {
return flatMap(f, this);
}
;
module.exports = VultrClient;
/***/
},
/******/
});
//# sourceMappingURL=bundle.js.map