// ==UserScript==
// @name OGARio by szymy
// @description Agar.io Unofficial Polish MOD (EN)
// @author szymy
// @namespace OGARio.szymy
// @include http://agar.io/*
// @include https://agar.io/*
// @version 0.8.0
// @run-at document-start
// @grant none
// ==/UserScript==
if (typeof GM_info === "undefined" || GM_info.scriptHandler) {
alert("Twoja przeglądarka nie obsługuje tej wersji OGARio by szymy! Zainstaluj wersję przeznaczoną dla przeglądarki Chrome lub Opera z wtyczką Tampermonkey! Więcej informacji: http://www.ogario.ovh");
} else {
// Prevent and remove original script
document.addEventListener("beforescriptexecute", function(event) {
if (event.target.src.search("main_out.js") > -1) {
event.preventDefault();
event.stopPropagation();
window.jQuery(event.target).remove();
}
}, true);
// Inject scripts
document.addEventListener("DOMContentLoaded", function(event) {
// Color picker CSS
var link = document.createElement('link');
link.href = "http://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.3.0/css/bootstrap-colorpicker.min.css";
link.rel = "stylesheet";
document.head.appendChild(link);
// Inject OGARio
var ogario = function(a,b){function Oa(a,b,c){b?(87!=a.keyCode||Ea||c||(db(!0),Ea=!0),69!=a.keyCode||Fa||c||(bb(),Fa=!0),65!=a.keyCode||Ga||c||(eb(),Ga=!0),83!=a.keyCode||Ha||c||($a(!0),Ha=!0),68!=a.keyCode||Ia||c||(ab(),Ia=!0),70!=a.keyCode||Ja||c||(_a(),Ja=!0),90!=a.keyCode||Ka||c||(Ya(),Ka=!0),88!=a.keyCode||La||c||(hb(),La=!0),16!=a.keyCode||Ma||c||r.disableshift||(gb(),Ma=!0)):(87==a.keyCode&&(db(!1),Ea=!1),69==a.keyCode&&(Fa=!1),65==a.keyCode&&(Ga=!1),83==a.keyCode&&($a(!1),Ha=!1),68==a.keyCode&&(Ia=!1),70==a.keyCode&&(Ja=!1),90==a.keyCode&&(Ka=!1),88==a.keyCode&&(La=!1),16==a.keyCode&&(Ma=!1))}function Pa(){return Va()?e[d].exit:void 0}function Qa(a){return"string"==typeof a?JSON.parse(a):JSON.stringify(a)}function Ra(){for(var b in q)q.hasOwnProperty(b)&&null!=a.localStorage.getItem(b)&&(q[b]=a.localStorage.getItem(b));for(var b in r)r.hasOwnProperty(b)&&null!=a.localStorage.getItem(b)&&(r[b]=Qa(a.localStorage.getItem(b)))}function Sa(){for(var b in q)q.hasOwnProperty(b)&&a.localStorage.setItem(b,q[b]);for(var b in r)r.hasOwnProperty(b)&&a.localStorage.setItem(b,Qa(r[b]))}function Ta(a){y||(y=!0,fa=Date.now()),!A&&a?(A=!0,ha=Date.now(),D=0,E=0,aa=0,ib(Q,R),Sa(),Ya()):A&&!a&&(A=!1),a&&(z=!1)}function Ua(a,b,c,d){return q.nick=a,q.clantag=b,q.skin=c,q.color=d,b.length>0?b+a:a}function Va(){return cd.length>0}function Wa(){return cd.length>1}function Xa(){return cd.length}function Ya(){Sd=1}function Za(a,b){~cd.indexOf(a)&&b.name&&aa++}function $a(a){W=a,a?b("#message").hide():b("#message").show()}function _a(){X=!X}function ab(){G=!G}function bb(){z=!z}function cb(a){dc(),gc(a)}function db(a){return a?(ea||cb(21),void(ea=setInterval(function(){cb(21)},100))):void(ea&&(clearInterval(ea),ea=null))}function eb(){var a=0,b=setInterval(function(){cb(21),7==++a&&clearInterval(b)},100)}function fb(){var a=0,b=setInterval(function(){cb(17),2==++a&&clearInterval(b)},100)}function gb(){var a=0,b=setInterval(function(){cb(17),4==++a&&clearInterval(b)},100)}function hb(){Z--,0>Z&&(Z=Y.length-1)}function ib(a,b){Y.push({x:a,y:b}),6==Y.length&&Y.splice(0,1),Z=Y.length-1}function jb(a,c){":party"===T&&(0==a&&(U=""),U+=c+"<br />",9==a&&b(".party-info-leaderboard").html(U))}function kb(a,b,c,d,e){var f=String.fromCharCode(65+Math.floor((d+e/2)/(e/a))),g=(Math.floor((c+e/2)/(e/b))+1).toString();return f+g}function lb(a){return(Date.now()-a)/1e3}function mb(a){return Math.floor(lb(a)/3600)+"h "+Math.floor(lb(a)/60)%60+"m "+Math.floor(lb(a)%60)+"s"}function nb(){return 30+Math.round(.02*D)}function ob(){return Wa()?r.timetoremerge&&Va()?(ka!=Xa()&&(ja=cd[Xa()-1].createTime,ka=Xa()),Math.floor(nb()-(Date.now()-ja)/1e3)):null:(ka>1&&(ka=1),G||(G=!0),null)}function pb(){if(!na)return void(na=Date.now());var a=Date.now(),b=a-na;b>=1e3&&(la=oa,ma=pa,oa=0,pa=0,na=a),oa++}function qb(){for(var a=0,b=cd[0].size,c=1;c<cd.length;c++)G?b<cd[c].size&&(b=cd[c].size,a=c):b>cd[c].size&&(b=cd[c].size,a=c);return{index:a,size:b}}function rb(a){return Math.floor(Math.pow(a,2)/100)}function sb(a,b){return a/b}function tb(a,b){if(a)return"#E16400";if(b&&b>0){var c=1e3>I?.35:.38;return b>11?"#FF008C":b>=2.5?"#BE00FF":b>=1.25?"#FF0A00":1.25>b&&b>.75?"#FFDC00":b>c?"#00C8FF":"#64FF00"}}function ub(a){return a>183?"#C80000":r.darktheme?"#999999":"#666666"}function vb(a){return a>.76?"#FFDC00":"#C80000"}function wb(a){return Math.floor((200-a)/14).toString()}function xb(a,b){var c=1e3>D?.35:.38;return c>=b&&a>50&&D>=280&&rb(a)>Math.ceil(D/11)?!0:!1}function yb(a,b,c){if(Va()){C=c,D=Math.floor(C/100),H=qb(),I=rb(H.size),J=H.index;for(var d=0;d<ed.length;d++){var e=cd.indexOf(ed[d]),f=-1!=e,g=ed[d][b],h=ed[d].size<=30,i=0;if(!(r.opponentscolors||r.opponentsrings||r.splitrange)||f||h||(i=rb(ed[d].size),ed[d].sizeRatio=sb(i,I)),f&&":teams"!==T&&(ed[d].color=q.color),(r.opponentscolors||r.opponentsrings)&&!f)if(g)ed[d].color=ub(i),ed[d].strokeColor=vb(ed[d].sizeRatio);else{var j=tb(h,ed[d].sizeRatio);r.opponentsrings&&!h?ed[d].newColor=j:h&&r.rainbowfood||(ed[d].color=j)}h||((r.opponentsrings&&!f||r.splitrange&&!g||r.virusrange&&g||r.cursortracking&&f)&&ed[d].drawOgarioLayer(a,e,f,g),g&&ed[d].A(wb(rb(ed[d].size))),!r.opponentscolors&&!r.opponentsrings||f||g||(ed[d].isShiftable=xb(ed[d].size,ed[d].sizeRatio)))}}else for(var d=0;d<ed.length;d++){var g=ed[d][b],h=ed[d].size<=30;(r.opponentscolors||r.opponentsrings)&&(g?ed[d].color=ub(rb(ed[d].size)):h&&!r.rainbowfood&&(ed[d].color=tb(h,0)))}}function zb(a,b,c,d,e,f){a.strokeStyle="#FF7800",a.lineWidth=f,a.beginPath(),a.moveTo(b,c),a.lineTo(d,c),a.lineTo(d,e),a.lineTo(b,e),a.closePath(),a.stroke()}function Ab(a,b,c,d,e,f,g,h,i){var j=Math.ceil((f-d)/b),k=Math.ceil((g-e)/c);a.save(),i?(a.strokeStyle=r.darktheme?"#292929":"#D9E1E5",a.fillStyle=r.darktheme?"#292929":"#D9E1E5"):(a.strokeStyle="#FFFFFF",a.fillStyle="#FFFFFF"),a.lineWidth=h,a.beginPath();for(var l=0;b+1>l;l++)a.moveTo(l==b?f:d+j*l,e),a.lineTo(l==b?f:d+j*l,g);for(var l=0;c+1>l;l++)a.moveTo(d,l==c?g:e+k*l),a.lineTo(f,l==c?g:e+k*l);a.stroke(),a.font=.6*k+"px Ubuntu";for(var l=0;c>l;l++)for(var m="",n=0;b>n;n++)m=String.fromCharCode(65+l)+(n+1),a.fillText(m,d+j/2+n*j-a.measureText(m).width/2,e+k/2+l*k+.2*k);a.restore()}function Bb(a,b,c,d){ra=document.createElement("canvas");var e=ra.getContext("2d");ra.width=c,ra.height=d,Ab(e,a,b,.5,.5,c-.5,d-.5,1,!1)}function Cb(a,b,c,d,e,f){qa=null,qa=document.createElement("canvas");var g=qa.getContext("2d"),h=e/f,i=f/2;qa.width=200,qa.height=222,g.globalAlpha=.2,g.fillStyle="#000000",g.fillRect(0,0,200,222),g.globalAlpha=1,g.font="16px Ubuntu",g.fillStyle="#FF7800",g.fillText(currentSector,11,22),g.fillStyle="#FFFFFF",g.globalAlpha=r.darktheme?.2:.4,ra&&ra.width?g.drawImage(ra,9,31):Bb(a,b,e,e),g.translate(9.5,30.5),g.globalAlpha=1,g.fillStyle="#FFFFFF";for(var j=0,k=cd.length;k>j;j++)1==k&&(g.beginPath(),g.arc((cd[j].x+i)*h,(cd[j].y+i)*h,Math.max(4.5,(cd[j].size+5)*h)+2,0,2*Math.PI,!1),g.closePath(),g.strokeStyle="#FFFFFF",g.stroke()),g.beginPath(),g.arc((cd[j].x+i)*h,(cd[j].y+i)*h,Math.max(4.5,(cd[j].size+5)*h),0,2*Math.PI,!1),g.closePath(),g.fill();if(Y.length>0){var l=Math.round((Y[Z].x+i)*h),m=Math.round((Y[Z].y+i)*h);g.lineWidth=1,g.strokeStyle=Y.length-1==Z?"#FF7800":"#FFFFFF",g.beginPath(),g.moveTo(l-4.5,m),g.lineTo(l+4.5,m),g.moveTo(l,m-4.5),g.lineTo(l,m+4.5),g.stroke()}}function Db(a,b,c,f,g,h){var i=null,j=0;if(a.fillStyle="#000000",E>0&&(sa||(sa=new b(20,"#FFFFFF")),sa[c](e[d].currentmass+D+" | "+e[d].bestmass+E+" | "+e[d].roundvictims+aa+" | "+e[d].food+ca+" | "+e[d].roundtime+ga),i=sa[f](),j=i.width,a.globalAlpha=.3,a.fillRect(10,h-30-10,j+10,30),a.globalAlpha=1,a.drawImage(i,15,h-30-6)),W&&F>0&&(ta||(ta=new b(20,"#FF7800")),ta[c](e[d].topmass+F+" | "+e[d].totalvictims+ba+" | "+e[d].totalfood+da+" | "+e[d].totaldeaths+$+" | "+e[d].gametime+mb(fa)),i=ta[f](),j=i.width,a.globalAlpha=.3,a.fillRect(10,h-30-45,j+10,30),a.globalAlpha=1,a.drawImage(i,15,h-30-41)),r.showfps&&(ua||(ua=new b(20,"#FF7800")),ua[c]("FPS: "+la+" | rFPS: "+ma),i=ua[f](),j=i.width,a.globalAlpha=.3,a.fillRect(10,10,j+10,30),a.globalAlpha=1,a.drawImage(i,15,14)),r.showmassguides&&Va()){var k=r.showfps?41:10,l=r.opponentsrings?"○":"●";va||(va=new b(20,"#BE00FF")),va[c](l+l+" >"+Math.floor(2.5*I)),i=va[f](),j=i.width,a.globalAlpha=.2,a.fillRect(10,k,j+10,30),a.globalAlpha=1,a.drawImage(i,15,k+4),wa||(wa=new b(20,"#FF0A00")),wa[c](l+" >"+Math.floor(1.25*I)),i=wa[f](),j=i.width,a.globalAlpha=.2,a.fillRect(10,k+31,j+10,30),a.globalAlpha=1,a.drawImage(i,15,k+31+4),xa||(xa=new b(20,"#00C8FF")),xa[c](l+" <"+Math.floor(.75*I)),i=xa[f](),j=i.width,a.globalAlpha=.2,a.fillRect(10,k+62,j+10,30),a.globalAlpha=1,a.drawImage(i,15,k+62+4),I>=35&&(ya||(ya=new b(20,"#64FF00")),ya[c](l+l+" <"+Math.floor(I*(1e3>I?.35:.38))),i=ya[f](),j=i.width,a.globalAlpha=.2,a.fillRect(10,k+93,j+10,30),a.globalAlpha=1,a.drawImage(i,15,k+93+4),za||(za=new b(20,"#FFFFFF")),za[c]("W x"+Math.floor((D-18*Xa())/17)),i=za[f](),j=i.width,a.globalAlpha=.2,a.fillRect(10,k+124,j+10,30),a.globalAlpha=1,a.drawImage(i,15,k+124+4))}if(null!=ia&&(Aa||(Aa=new b(30,"#FF7800","000000")),Aa[c](ia+"s"),i=Aa[f](),j=i.width,a.globalAlpha=1,a.drawImage(i,g/2-j/2,10)),Wa()){var k=r.timetoremerge?44:10;Eb(a,k),Ba||(Ba=new b(20,"#FFFFFF","#000000")),Ba[c](Xa()+" / 16"),i=Ba[f](),j=i.width,a.globalAlpha=1,a.drawImage(i,g/2-j/2,k+34)}z&&(Ca||(Ca=new b(30,"#FF0000","#000000")),Ca[c]("PAUZA!"),i=Ca[f](),j=i.width,a.globalAlpha=.8,a.drawImage(i,g/2-j/2,110)),Da||(Da=new b(14,"#FFFFFF","#000000")),Da[c](e[d].modinfo),i=Da[f](),j=i.width,a.globalAlpha=.75,a.drawImage(i,g-j-10,h-25),a.globalAlpha=1}function Eb(a,b){a.save(),a.fillStyle=r.darktheme?"#FFFFFF":"#000000",a.globalAlpha=G?.6:.3,a.beginPath(),a.arc(K/2-12,b+16,16,0,2*Math.PI,!1),a.closePath(),a.fill(),a.globalAlpha=G?.3:.6,a.beginPath(),a.arc(K/2+16,b+16,12,0,2*Math.PI,!1),a.closePath(),a.fill(),a.restore()}function Fb(a){var b=Gb(a);return b&&p.hasOwnProperty(b)?p[b]:"#FFFFFF"}function Gb(a){for(i=0;i<m.length;i++)if(0==a.indexOf(m[i]))return m[i];return null}function Hb(b,c){return-1!=o.indexOf(c)?-1!=k.indexOf(c)?V+l[k.indexOf(c)]:-1!=h.indexOf(c)?V+"wykop":-1!=j.indexOf(c)?V+"mirko":V+c:r.onlyogarioskins||-1==ne.indexOf(c)?b?V+n[m.indexOf(b)]:null:a.ASSETS_ROOT+"skins/"+c+".png"}function Ib(a){if(!a||0==a.length)return null;var b=a.trim(),c=Gb(b);if(c&&(b=b.replace(c,"").trim()),b=b.replace("|",""),b=b.toLowerCase(),f.hasOwnProperty(b))return f[b].width&&f[b].complete?f[b]:null;var d=Hb(c,b);return d&&(f[b]=new Image,f[b].crossOrigin="Anonymous",f[b].src=d,f[b].width&&f[b].complete)?f[b]:null}function Jb(a){Ra(),a("#helloContainer div[role=form] .form-group:first").after("<center><h5>"+e[d].modinfo+" | "+c+' | <a href="http://ogario.ovh" target="_blank">'+e[d].home+"</a></h5></center>"),a("#nick").before('<input id="clantag" class="form-control" placeholder="Clan tag" />'),a("#nick").remove(),a("#clantag").after('<div class="input-group nick"><input id="nick" class="form-control" placeholder="Nick" maxlength="15" autofocus /><input type="hidden" id="color" value="'+q.color+'" /><span class="input-group-addon"><i></i></span></div>'),a("#locationKnown, #locationUnknown").insertAfter(a(".nick")),a(".btn-settings, .btn-spectate, .btn-logout").appendTo("#agario-main-buttons"),a(".btn-settings").after('<button class="btn btn-info btn-next" onclick="nextServer(); return false;">>></button>'),a("#agario-main-buttons").append('<br clear="both"/>'),a("#helloContainer div[role=form]").after('<div id="ogario-party"><input class="partyToken form-control" placeholder="Party token" /> <button class="btn btn-info btn-copy-token" onclick="copyToken();">Copy</button> <button class="btn btn-primary btn-create-party" onclick="$(\'#helloContainer\').attr(\'data-party-state\', \'3\'); createParty();" data-itr="create_party">Create</button> <button class="btn btn-success btn-join-party" onclick="joinParty($(\'.partyToken\').val());" data-itr="join_party">Join</button> <button class="btn btn-danger btn-cancel-party" onclick="cancelParty();">×</button> <br clear="both"/></div>'),a("#mainPanel hr, #instructions, small.text-muted").remove(),a(".btn-settings").attr("onclick","$('#ogario-settings').fadeToggle(300); return false;"),a(".side-container:eq(1)").prepend('<div id="ogario-settings" class="agario-panel checkbox"><h4>'+e[d].settings+"</h4></div>");for(var b in r)if(r.hasOwnProperty(b)){if("skins"===b||"names"===b){a("#ogario-settings").append('<label><input type="checkbox" onchange="setSettings(\''+b+"', !$(this).is(':checked'));\" id=\""+b+'">'+e[d][b]+"</label>");continue}a("#ogario-settings").append('<label><input type="checkbox" onchange="setSettings(\''+b+"', $(this).is(':checked'));\" id=\""+b+'">'+e[d][b]+"</label>")}a("#ogario-settings").append('<br clear="both"/><hr><h4>'+e[d].keys+'</h4><span class="key"><span class="bold">[W]</span> - '+e[d].wkey+'</span> <span class="key"><span class="bold">[E]</span> - '+e[d].ekey+'</span> <span class="key"><span class="bold">[A]</span> - '+e[d].akey+'</span> <span class="key"><span class="bold">[S]</span> - '+e[d].skey+'</span> <span class="key"><span class="bold">[D]</span> - '+e[d].dkey+'</span> <span class="key"><span class="bold">[X]</span> - '+e[d].xkey+'</span> <span class="key"><span class="bold">[Z]</span> - '+e[d].zkey+'</span> <span class="key"><span class="bold">['+e[d].space+"]</span> - "+e[d].spacekey+'</span> <span class="key"><span class="bold">[Shift]</span> - '+e[d].shiftkey+'</span> <span class="key"><span class="bold">[Q]</span> - '+e[d].qkey+'</span> <span class="key"><span class="bold">[F]</span> - '+e[d].fkey+'</span> <br clear="both"/>'),a("#tags-container").appendTo("#ogario-settings"),a("#settings, #stats hr").remove(),a(".agario-party-1, .agario-party-5").append('<div class="party-info">Token: <span class="party-info-token"></span><br />'+e[d].leaderboard+':<br /><span class="party-info-leaderboard"></span><br /></div>'),a("#statsContinue").after('<button type="submit" onclick="closeStats(); setNick(document.getElementById(\'nick\').value); return false;" id="stats-play" class="btn btn-success btn-needs-server" data-itr="play">Play</button> <button onclick="closeStats(); spectate(); return false;" id="stats-spectate" class="btn btn-warning btn-needs-server" data-itr="spectate">Spectate</button>'),a(".agario-party-1 div:first, .agario-party-1 .clearfix, .agario-party-3, .agario-party-4, .agario-party-5 div:first, .agario-party-5 .clearfix").remove(),a("#helloContainer").css({height:"auto"}),a("#helloContainer .agario-panel").css({"background-color":"#111111"}),a("#mainPanel h2, #mainPanel h5").css({color:"#FFFFFF"}),a(".side-container").css({color:"#DDDDDD"}),a("#clantag, .btn-copy-token, .btn-logout").css({width:"33%"}),a(".nick").css({width:"65%","float":"right"}),a("#nick").css({width:"100%","float":"none"}),a("#region, #ogario-party .partyToken").css({width:"65%",margin:"6px 0 0 0","float":"left"}),a("#gamemode").css({"margin-top":"6px"}),a(".btn-play-guest, .btn-login-play").css({width:"49%","margin-left":"0"}),a(".btn-play").css({width:"100%","margin-left":"0"}),a(".btn-settings, .btn-cancel-party").css({width:"13%","margin-top":"6px"}),a(".btn-next").css({width:"15%",height:"35px","font-weight":"bold",margin:"6px 0 0 2%","float":"left"}),a(".btn-spectate, .btn-logout").css({margin:"6px 0 0 2%"}),a("#clantag, .btn-copy-token, .btn-spectate").css({"float":"left"}),a("#nick, .btn-login-play, .btn-logout, .btn-copy-token, .btn-cancel-party").css({"float":"right"}),a(".btn-create-party, .btn-join-party").css({width:"41.5%",margin:"6px 2% 0 0","float":"left"}),a("#ogario-party").css({"padding-bottom":"15px"}),a("#ogario-party .partyToken").css({margin:"0"}),a("#ogario-settings").css({width:"inherit",display:"none",margin:"0",position:"absolute",top:"0","z-index":"400"}),a("#ogario-settings h4").css({color:"#FF7800","text-align":"center"}),a("#ogario-settings label, #ogario-settings .key").css({width:"50%",display:"block","font-size":"12px","float":"left"}),a("#ogario-settings hr").css({"border-color":"#555555",margin:"10px 0 0 0"}),a("#ogario-settings .key").css({padding:"3px 2%"}),a("#ogario-settings .bold").css({color:"#FF7800","font-weight":"bold"}),a("#stats").css({height:"640px"}),a("#socialStats").css({bottom:"360px"}),a("#stats-play").css({width:"42%",position:"absolute",left:"25px",bottom:"270px"}),a("#stats-spectate").css({width:"42%",position:"absolute",right:"25px",bottom:"270px"}),a(".skin").css({"margin-top":"6px","float":"left"}),a("head").append('<style>#helloContainer[data-logged-in="0"] .btn-spectate { width: 68%; } #helloContainer[data-logged-in="1"] .btn-spectate { width: 33%; } #mainPanel h5 a, .agario-party h4 { color: #FF7800; } .agario-profile-panel { padding-top: 8px; } .close { color: #FF7800; text-shadow: none; opacity: 1; } #mainPanel h5 a:hover, .close:focus, .close:hover { color: #FFFFFF; } #statsText { color: #BBBBBB; } #stats h2, #statsSubtext { color: #DDDDDD; } #statsGraph { bottom: 400px; opacity: 1; } #statsContinue { bottom: 310px; } #helloContainer[data-logged-in="0"] #agario-main-buttons, #agario-main-buttons { padding: 0 0; } #agario-main-buttons .row { margin: 0 0 }</style>'),a("#ogario-settings input:checkbox").each(function(){var b=a(this).attr("id");if(r.hasOwnProperty(b)){if("skins"===b||"names"===b)return void a(this).prop("checked",!r[b]);a(this).prop("checked",r[b])}}),a("#nick").val(q.nick),a("#clantag").val(q.clantag)}function Kb(){Hd=!0,Tc.google.ka(),Tc.ca.init(),Ob(),setInterval(Ob,18e4),Wc=Uc=document.getElementById("canvas"),Vc=Wc.getContext("2d"),Wc.onmousedown=function(a){if($d){var b=a.clientX-(5+Xc/5/2),c=a.clientY-(5+Xc/5/2);if(Math.sqrt(b*b+c*c)<=Xc/5/2)return dc(),void gc(17)}hd=1*a.clientX,id=1*a.clientY,Nb(),dc()},Wc.onmousemove=function(a){hd=1*a.clientX,id=1*a.clientY,Nb()},Wc.onmouseup=function(){},/firefox/i.test(navigator.userAgent)?document.addEventListener("DOMMouseScroll",Lb,!1):document.body.onmousewheel=Lb;var c=!1,d=!1,e=!1;a.onkeydown=function(a){Oa(a,!0,!1),32!=a.keyCode||c||("nick"!=a.target.id&&a.preventDefault(),dc(),gc(17),c=!0),81!=a.keyCode||d||(fb(),gc(18),d=!0),27==a.keyCode&&(a.preventDefault(),Rb(300))},a.onkeyup=function(a){Oa(a,!1,!1),32==a.keyCode&&(c=!1),81==a.keyCode&&d&&(gc(19),d=!1)},a.onblur=function(){gc(19),e=d=c=!1},a.onresize=ic,a.requestAnimationFrame(le),setInterval(dc,40),ud&&b("#region").val(ud),Tb(),Qb(b("#region").val()),0==Vd&&ud&&Wb(),Rb(0),ic(),a.location.hash&&6<=a.location.hash.length&&Ec(a.location.hash)}function Lb(a){a.preventDefault(),Sd*=Math.pow(.9,a.wheelDelta/-120||a.detail||0),!r.unlimitedzoom&&1>Sd&&(Sd=1),Sd>4/td&&(Sd=4/td)}function Mb(){if(.4>td)Zc=null;else{for(var a=Number.POSITIVE_INFINITY,b=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,d=Number.NEGATIVE_INFINITY,e=0;e<ed.length;e++){var f=ed[e];!f.L()||f.R||20>=f.size*td||(a=Math.min(f.x-f.size,a),b=Math.min(f.y-f.size,b),c=Math.max(f.x+f.size,c),d=Math.max(f.y+f.size,d))}for(Zc=qe.init({oa:a-10,pa:b-10,ma:c+10,na:d+10,za:2,Aa:4}),e=0;e<ed.length;e++)if(f=ed[e],f.L()&&!(20>=f.size*td))for(a=0;a<f.a.length;++a)b=f.a[a].x,c=f.a[a].y,_c-Xc/2/td>b||ad-Yc/2/td>c||b>_c+Xc/2/td||c>ad+Yc/2/td||Zc.ja(f.a[a])}}function Nb(){jd=(hd-Xc/2)/td+_c,kd=(id-Yc/2)/td+ad,O=jd,P=kd}function Ob(){null==be&&(be={},b("#region").children().each(function(){var a=b(this),c=a.val();c&&(be[c]=a.text())})),b.get(Rc+"info",function(a){var d,c={};for(d in a.regions){var e=d.split(":")[0];c[e]=c[e]||0,c[e]+=a.regions[d].numPlayers}for(d in c)b('#region option[value="'+d+'"]').text(be[d]+" ("+c[d]+" players)")},"json")}function Pb(){b("#adsBottom").hide(),b("#overlays").hide(),b("#stats").hide(),b("#mainPanel").hide(),De=Ud=!1,Tb(),a.destroyAd(a.adSlots.aa),a.destroyAd(a.adSlots.ac)}function Qb(c){c&&(c==ud?b(".btn-needs-server").prop("disabled",!1):(b("#region").val()!=c&&b("#region").val(c),ud=a.localStorage.location=c,b(".region-message").hide(),b(".region-message."+c).show(),b(".btn-needs-server").prop("disabled",!1),Hd&&Wb()))}function Rb(c){Ud||De||(od=null,ce||(b("#adsBottom").show(),b("#g300x250").hide(),b("#a300x250").show(),b("#g728x90").hide(),b("#a728x90").show()),a.refreshAd(ce?a.adSlots.ac:a.adSlots.aa),ce=!1,1e3>c&&(Td=1),Ud=!0,b("#mainPanel").show(),c>0?b("#overlays").fadeIn(c):b("#overlays").show()),300==c&&(z=!0)}function Sb(a){b("#helloContainer").attr("data-gamemode",a),Fd=a,b("#gamemode").val(a),T=a}function Tb(){b("#region").val()?a.localStorage.location=b("#region").val():a.localStorage.location&&b("#region").val(a.localStorage.location),b("#region").val()?b("#locationKnown").append(b("#region")):b("#locationUnknown").append(b("#region"))}function Ub(b){return a.i18n[b]||a.i18n_dict.en[b]||b}function Vb(){var c=++Vd;console.log("Find "+ud+Fd),Xb(),b.ajax(Rc+"findServer",{error:function(){setTimeout(Vb,3e4)},success:function(b){if(c==Vd){b.alert&&alert(b.alert);var d=b.ip;void 0!=Oc.ha&&(d=a.location.hostname+":"+Oc.ha),Yb("ws"+(Qc?"s":"")+"://"+d,b.token)}},dataType:"json",method:"POST",cache:!1,crossDomain:!0,data:(ud+Fd||"?")+"\n2200049715"})}function Wb(){Hd&&ud&&(b("#connecting").show(),Vb())}function Xb(){if($c){$c.onopen=null,$c.onmessage=null,$c.onclose=null;try{$c.close()}catch(a){}$c=null}}function Yb(a,b){if(Xb(),Nc.ip&&(a="ws"+(Qc?"s":"")+"://"+Nc.ip),null!=ee){var c=ee;ee=function(){c(b)}}if(Qc&&!Oc.env_development&&!Oc.env_local){var d=a.split(":");a="wss://ip-"+d[1].replace(/\./g,"-").replace(/\//g,"")+".tech.agar.io:"+ +d[2]}bd=[],cd=[],dd={},ed=[],fd=[],gd=[],ie=Gd=null,zd=0,Pd=!1,console.log("Connecting to "+a),$c=new WebSocket(a),$c.binaryType="arraybuffer",$c.onopen=function(){var a;console.log("socket open"),a=Zb(5),a.setUint8(0,254),a.setUint32(1,5,!0),$b(a),a=Zb(5),a.setUint8(0,255),a.setUint32(1,2200049715,!0),$b(a),a=Zb(1+b.length),a.setUint8(0,80);for(var c=0;c<b.length;++c)a.setUint8(c+1,b.charCodeAt(c));$b(a),hc()},$c.onmessage=ac,$c.onclose=_b,$c.onerror=function(){console.log("socket error")}}function Zb(a){return new DataView(new ArrayBuffer(a))}function $b(a){$c.send(a.buffer)}function _b(){Pd&&(fe=500),console.log("socket close"),setTimeout(Wb,fe),fe*=2}function ac(a){bc(new DataView(a.data))}function bc(b){function c(){for(var a="";;){var c=b.getUint16(d,!0);if(d+=2,0==c)break;a+=String.fromCharCode(c)}return a}var d=0;switch(240==b.getUint8(d)&&(d+=5),b.getUint8(d++)){case 16:cc(b,d);break;case 17:Cd=b.getFloat32(d,!0),d+=4,Dd=b.getFloat32(d,!0),d+=4,Ed=b.getFloat32(d,!0),d+=4;break;case 20:cd=[],bd=[];break;case 21:Jd=b.getInt16(d,!0),d+=2,Kd=b.getInt16(d,!0),d+=2,Id||(Id=!0,Ld=Jd,Md=Kd);break;case 32:bd.push(b.getUint32(d,!0)),d+=4;break;case 49:if(null!=Gd)break;var e=b.getUint32(d,!0),d=d+4;gd=[];for(var f=0;e>f;++f){var g=b.getUint32(d,!0),d=d+4;gd.push({id:g,name:c()})}pc();break;case 50:for(Gd=[],e=b.getUint32(d,!0),d+=4,f=0;e>f;++f)Gd.push(b.getFloat32(d,!0)),d+=4;pc();break;case 64:pd=b.getFloat64(d,!0),d+=8,qd=b.getFloat64(d,!0),d+=8,rd=b.getFloat64(d,!0),d+=8,sd=b.getFloat64(d,!0),d+=8,Cd=(rd+pd)/2,Dd=(sd+qd)/2,Ed=1,0==cd.length&&(_c=Cd,ad=Dd,td=Ed),b.byteLength>d&&(e=b.getUint32(d,!0),d+=4,Yd=!!(1&e),Xd=c(),a.MC.updateServerVersion(Xd),console.log("Server version "+Xd));break;case 81:var h=b.getUint32(d,!0),d=d+4,i=b.getUint32(d,!0),d=d+4,j=b.getUint32(d,!0),d=d+4;setTimeout(function(){var b={level:h,xp:i,xpNeeded:j};a.MC.updateUserXPInfo(b),Bc(b,null)},1200)}}function cc(c,d){function e(){for(var a="";;){var b=c.getUint16(d,!0);if(d+=2,0==b)break;a+=String.fromCharCode(b)}return a}function f(){for(var a="";;){var b=c.getUint8(d++);if(0==b)break;a+=String.fromCharCode(b)}return a}Qd=md=Date.now(),Pd||(Pd=!0,b("#connecting").hide(),ec(),ee&&(ee(),ee=null)),yd=!1;var g=c.getUint16(d,!0);d+=2;for(var h=0;g>h;++h){var i=dd[c.getUint32(d,!0)],j=dd[c.getUint32(d+4,!0)];d+=8,i&&j&&(j.Z(),j.s=j.x,j.u=j.y,j.o=j.size,j.H=i.x,j.I=i.y,j.g=j.size,j.P=md,Gc(i,j))}for(h=0;g=c.getUint32(d,!0),d+=4,0!=g;){++h;var k,i=c.getInt32(d,!0);d+=4,j=c.getInt32(d,!0),d+=4,k=c.getInt16(d,!0),d+=2;var l=c.getUint8(d++),m=c.getUint8(d++),n=c.getUint8(d++),m=uc(l<<16|m<<8|n),n=c.getUint8(d++),o=!!(1&n),p=!!(16&n),q=null;2&n&&(d+=4+c.getUint32(d,!0)),4&n&&(q=f());var r=e(),l=null;dd.hasOwnProperty(g)?(l=dd[g],l.O(),l.s=l.x,l.u=l.y,l.o=l.size,l.color=m):(l=new tc(g,i,j,k,m,r),ed.push(l),dd[g]=l,l.W=i,l.va=j),l.c=o,l.h=p,l.H=i,l.I=j,l.g=k,l.P=md,l.ba=n,q&&(l.N=q),r&&l.A(r),-1!=bd.indexOf(g)&&-1==cd.indexOf(l)&&(cd.push(l),1==cd.length&&(_c=l.x,ad=l.y,re(),document.getElementById("overlays").style.display="none",Ae=[],Be=0,Ce=cd[0].color,Ee=!0,Fe=Date.now(),Je=Ie=He=0))}for(i=c.getUint32(d,!0),d+=4,h=0;i>h;h++)g=c.getUint32(d,!0),d+=4,l=dd[g],null!=l&&l.Z();yd&&0==cd.length&&(null==a.storageInfo&&a.createDefaultStorage(),Ge=Date.now(),Ee=!1,Kc(),a.MC.deltaUpdateStats({games_played:1,total_mass:~~(zd/100),turn_time:(Ge-Fe)/1e3,cells_eaten:Ie}))}function dc(){if(fc()){var a=hd-Xc/2,b=id-Yc/2;64>a*a+b*b||.01>Math.abs(ge-jd)&&.01>Math.abs(he-kd)||(ge=jd,he=kd,a=Zb(13),a.setUint8(0,16),a.setInt32(1,z?Q:jd,!0),a.setInt32(5,z?R:kd,!0),a.setUint32(9,0,!0),$b(a))}}function ec(){if(fc()&&Pd&&null!=od){var a=Zb(1+2*od.length);a.setUint8(0,0);for(var b=0;b<od.length;++b)a.setUint16(1+2*b,od.charCodeAt(b),!0);$b(a),od=null}}function fc(){return null!=$c&&$c.readyState==$c.OPEN}function gc(a){if(fc()){var b=Zb(1);b.setUint8(0,a),$b(b)}}function hc(){if(fc()&&null!=Rd){var a=Zb(1+Rd.length);a.setUint8(0,81);for(var b=0;b<Rd.length;++b)a.setUint8(b+1,Rd.charCodeAt(b));$b(a)}}function ic(){Xc=1*a.innerWidth,Yc=1*a.innerHeight,K=Xc,L=Yc,Uc.width=Wc.width=Xc,Uc.height=Wc.height=Yc;var c=b("#helloContainer");c.css("transform","none");var d=c.height(),e=a.innerHeight;0!=d/2%2&&(d++,c.height(d)),d>e/1.1?c.css("transform","translate(-50%, -50%) scale("+e/d/1.1+")"):c.css("transform","translate(-50%, -50%)"),lc()}function jc(){var a;return a=1*Math.max(Yc/1080,Xc/1920),a*=Sd}function kc(){if(0!=cd.length){for(var a=0,b=0;b<cd.length;b++)a+=cd[b].size;td=(9*td+Math.pow(Math.min(64/a,1),.4)*jc())/10}}function lc(){var a,b=Date.now();if(++ld,md=b,0<cd.length){kc();for(var c=a=0,d=0;d<cd.length;d++)cd[d].O(),a+=cd[d].x/cd.length,c+=cd[d].y/cd.length;Cd=a,Dd=c,Ed=td,_c=(_c+a)/2,ad=(ad+c)/2}else _c=(29*_c+Cd)/30,ad=(29*ad+Dd)/30,td=(9*td+Ed*jc())/10;for(Mb(),Nb(),r.acidmode||Vc.clearRect(0,0,Xc,Yc),r.acidmode?(Vc.fillStyle=r.darktheme?"#0A0A0A":"#F2FBFF",Vc.globalAlpha=.05,Vc.fillRect(0,0,Xc,Yc),Vc.globalAlpha=1):mc(),ed.sort(function(a,b){return a.size==b.size?a.id-b.id:a.size-b.size}),Q=Cd,R=Dd,B=td,M=_c,N=ad,Va()&&(ca=Be,ga=mb(ha),ia=ob(),E=Math.max(E,D),F=Math.max(F,E),ba=Math.max(ba,aa),da=Math.max(da,ca),zd=Math.max(zd,C)),Vc.save(),Vc.translate(Xc/2,Yc/2),Vc.scale(td,td),Vc.translate(-_c,-ad),r.drawbackgroundsectors&&Ab(Vc,w,x,s,t,u,v,10,!0),r.showmapborders&&zb(Vc,s,t,u,v,20),yb(Vc,"c",oc()),d=0;d<fd.length;d++)fd[d].w(Vc);for(d=0;d<ed.length;d++)ed[d].w(Vc);if(Id){for(Ld=(3*Ld+Jd)/4,Md=(3*Md+Kd)/4,Vc.save(),Vc.strokeStyle="#FFAAAA",Vc.lineWidth=10,Vc.lineCap="round",Vc.lineJoin="round",Vc.globalAlpha=.5,Vc.beginPath(),d=0;d<cd.length;d++)Vc.moveTo(cd[d].x,cd[d].y),Vc.lineTo(Ld,Md);Vc.stroke(),Vc.restore()}Vc.restore(),ie&&ie.width&&Vc.drawImage(ie,Xc-ie.width-10,10),Db(Vc,vc,"B","J",K,L),r.showminimap&&(currentSector=kb(w,x,Q,R,2*u),Cb(w,x,Q,R,182,2*u,cd),qa&&qa.width&&Vc.drawImage(qa,K-qa.width-10,L-qa.height-45)),r.showfps&&pa++,nc(),b=Date.now()-b,b>1e3/60?je-=.01:1e3/65>b&&(je+=.01),.4>je&&(je=.4),je>1&&(je=1),b=md-nd,!fc()||Ud||De?(Td+=b/2e3,Td>1&&(Td=1)):(Td-=b/300,0>Td&&(Td=0)),Td>0?(Vc.fillStyle="#000000",Wd?(Vc.globalAlpha=Td,Vc.fillRect(0,0,Xc,Yc),Zd.complete&&Zd.width&&(Zd.width/Zd.height<Xc/Yc?(b=Xc,a=Zd.height*Xc/Zd.width):(b=Zd.width*Yc/Zd.height,a=Yc),Vc.drawImage(Zd,(Xc-b)/2,(Yc-a)/2,b,a),Vc.globalAlpha=.5*Td,Vc.fillRect(0,0,Xc,Yc))):(Vc.globalAlpha=.5*Td,Vc.fillRect(0,0,Xc,Yc)),Vc.globalAlpha=1):Wd=!1,nd=md}function mc(){if(Vc.fillStyle=r.darktheme?"#0A0A0A":"#F2FBFF",Vc.fillRect(0,0,K,L),!r.drawbackgroundsectors){Vc.fillStyle=r.darktheme?"#0A0A0A":"#F2FBFF",Vc.fillRect(0,0,Xc,Yc),Vc.save(),Vc.strokeStyle=r.darktheme?"#AAAAAA":"#000000",Vc.globalAlpha=.2*td;for(var a=Xc/td,b=Yc/td,c=(-_c+a/2)%50;a>c;c+=50)Vc.beginPath(),Vc.moveTo(c*td-.5,0),Vc.lineTo(c*td-.5,b*td),Vc.stroke();for(c=(-ad+b/2)%50;b>c;c+=50)Vc.beginPath(),Vc.moveTo(0,c*td-.5),Vc.lineTo(a*td,c*td-.5),Vc.stroke();Vc.restore()}}function nc(){if($d&&_d.width){var a=Xc/5;Vc.drawImage(_d,5,5,a,a)}}function oc(){for(var a=0,b=0;b<cd.length;b++)a+=cd[b].g*cd[b].g;return a}function pc(){if(ie=null,(null!=Gd||0!=gd.length)&&(null!=Gd||r.names)){ie=document.createElement("canvas");var a=ie.getContext("2d"),b=40,b=null==Gd?b+22*gd.length:b+180,c=Math.min(200,.3*Xc)/200;if(ie.width=200*c,ie.height=b*c,a.scale(c,c),a.globalAlpha=.4,a.fillStyle="#000000",a.fillRect(0,0,200,b),a.globalAlpha=1,a.fillStyle="#FFFFFF",c=null,c=Ub("leaderboard"),a.fillStyle="#FF7800",c=e[d].leaderboard,a.font="20px Ubuntu",a.fillText(c,100-a.measureText(c).width/2,25),null==Gd)for(a.font="18px Ubuntu",b=0;b<gd.length;++b)c=gd[b].name||Ub("unnamed_cell"),r.names||(c=Ub("unnamed_cell")),-1!=bd.indexOf(gd[b].id)?(cd[0].name&&(c=cd[0].name),a.fillStyle="#FF7800"):a.fillStyle=Fb(c),c=b+1+". "+c,a.fillText(c,100-a.measureText(c).width/2,50+22*b),jb(b,c);else for(b=c=0;b<Gd.length;++b){var f=c+Gd[b]*Math.PI*2;a.fillStyle=Nd[b+1],a.beginPath(),a.moveTo(100,120),a.arc(100,120,80,c,f,!1),a.fill(),c=f}}}function qc(b){if(null==b||0==b.length)return null;if("%"==b[0]){if(!a.MC||!a.MC.getSkinInfo)return null;if(b=a.MC.getSkinInfo("skin_"+b.slice(1)),null==b)return null;for(b=(+b.color).toString(16);6>b.length;)b="0"+b;return"#"+b}return null}function rc(b){if(null==b||0==b.length)return null;if(!pe.hasOwnProperty(b)){var c=new Image;if(":"==b[0])c.src=b.slice(1);else if("%"==b[0]){if(!a.MC||!a.MC.getSkinInfo)return null;var d=a.MC.getSkinInfo("skin_"+b.slice(1));if(null==d)return null;c.src=a.ASSETS_ROOT+"skins/premium/"+d.url}pe[b]=c}return 0!=pe[b].width&&pe[b].complete?pe[b]:null}function sc(a,b,c,d,e){this.X=a,this.x=b,this.y=c,this.f=d,this.b=e}function tc(a,b,c,d,e,f){this.id=a,this.s=this.x=b,this.u=this.y=c,this.o=this.size=d,this.color=e,this.a=[],this.Y(),this.A(f),this.createTime=Date.now()}function uc(a){for(a=a.toString(16);6>a.length;)a="0"+a;return"#"+a}function vc(a,b,c,d){a&&(this.v=a),b&&(this.S=b),this.U=!!c,d&&(this.V=d)}function wc(a){for(var c,d,b=a.length;b>0;)d=Math.floor(Math.random()*b),b--,c=a[b],a[b]=a[d],a[d]=c}function xc(){ue=te}function yc(a){ue.context="google"==a?"google":"facebook",zc()}function zc(){a.localStorage[se]=JSON.stringify(ue),ue=JSON.parse(a.localStorage[se]),a.storageInfo=ue,"google"==ue.context?(b("#gPlusShare").show(),b("#fbShare").hide()):(b("#gPlusShare").hide(),b("#fbShare").show())}function Ac(a){b("#helloContainer").attr("data-has-account-data"),b("#helloContainer").attr("data-has-account-data","1"),b("#helloContainer").attr("data-logged-in","1"),b(".agario-profile-panel .progress-bar-star").text(a.level),b(".agario-exp-bar .progress-bar-text").text(a.xp+"/"+a.xpNeeded+" XP"),b(".agario-exp-bar .progress-bar").css("width",(88*a.xp/a.xpNeeded).toFixed(2)+"%"),b(".agario-profile-name").text(a.name),b(".agario-profile-picture").attr("src",a.picture),b("#instructions").show()}function Bc(c,d){var e="1"==b("#helloContainer").attr("data-has-account-data");if(b("#helloContainer").attr("data-has-account-data","1"),ue.userInfo.xp=c.xp,ue.userInfo.xpNeeded=c.xpNeeded,ue.userInfo.level=c.level,zc(),e){var f=+b(".agario-exp-bar .progress-bar-text").first().text().split("/")[0],e=+b(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0],g=b(".agario-profile-panel .progress-bar-star").first().text();if(g!=c.level)Bc({xp:e,xpNeeded:e,level:g},function(){b(".agario-profile-panel .progress-bar-star").text(c.level),b(".agario-exp-bar .progress-bar").css("width","100%"),b(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){b(".progress-bar-star").removeClass("animated tada")}),setTimeout(function(){b(".agario-exp-bar .progress-bar-text").text(c.xpNeeded+"/"+c.xpNeeded+" XP"),Bc({xp:0,xpNeeded:c.xpNeeded,level:c.level},function(){Bc(c,null)})},1e3)});else{var h=Date.now(),i=function(){var e;e=(Date.now()-h)/1e3,e=0>e?0:e>1?1:e,e=e*e*(3-2*e),b(".agario-exp-bar .progress-bar-text").text(~~(f+(c.xp-f)*e)+"/"+c.xpNeeded+" XP"),b(".agario-exp-bar .progress-bar").css("width",(88*(f+(c.xp-f)*e)/c.xpNeeded).toFixed(2)+"%"),d&&d(),1>e&&a.requestAnimationFrame(i)};a.requestAnimationFrame(i)}}else b(".agario-profile-panel .progress-bar-star").text(c.level),b(".agario-exp-bar .progress-bar-text").text(c.xp+"/"+c.xpNeeded+" XP"),b(".agario-exp-bar .progress-bar").css("width",(88*c.xp/c.xpNeeded).toFixed(2)+"%")}function Cc(){"none"==b("#settings").css("display")&&"none"==b("#socialLoginContainer").css("display")&&b("#instructions").show()}function Dc(c){if("connected"==c.status){var d=c.authResponse.accessToken;null==d||"undefined"==d||""==d?(3>ve&&(ve++,a.facebookRelogin()),a.logout()):(a.MC.doLoginWithFB(d),a.FB.api("/me/picture?width=180&height=180",function(c){ue.userInfo.picture=c.data.url,a.updateStorage(),b(".agario-profile-picture").attr("src",c.data.url)}),b("#helloContainer").attr("data-logged-in","1"),ue.context="facebook",ue.loginIntent="1",a.updateStorage(),null!=Rd?a.checkSocialAPIToken(c):a.getSocialAPIToken("facebookLogin",d))}}function Ec(c){Sb(":party"),b("#helloContainer").attr("data-party-state","4"),c=decodeURIComponent(c).replace(/.*#/gim,""),Fc("#"+a.encodeURIComponent(c)),b.ajax(Rc+"getToken",{error:function(){b("#helloContainer").attr("data-party-state","6")},success:function(d){d=d.split("\n"),b(".partyToken").val("agar.io/#"+a.encodeURIComponent(c)),b(".party-info-token").text("http://agar.io/#"+a.encodeURIComponent(c)),b("#helloContainer").attr("data-party-state","5"),Sb(":party"),Yb("ws://"+d[0],c)},dataType:"text",method:"POST",cache:!1,crossDomain:!0,data:c})}function Fc(b){a.history&&a.history.replaceState&&a.history.replaceState({},a.document.title,b)}function Gc(a,b){Za(a,b);var c=-1!=bd.indexOf(a.id),d=-1!=bd.indexOf(b.id),e=30>b.size;c&&e&&++Be,e||!c||d||32&b.ba||++Ie}function Hc(a){a=~~a;var b=(a%60).toString();return a=(~~(a/60)).toString(),2>b.length&&(b="0"+b),a+":"+b}function Ic(){if(null==gd)return 0;for(var a=0;a<gd.length;++a)if(-1!=bd.indexOf(gd[a].id))return a+1;return 0}function Jc(){b(".stats-food-eaten").text(Be),b(".stats-time-alive").text(Hc((Ge-Fe)/1e3)),b(".stats-leaderboard-time").text(Hc(He)),b(".stats-highest-mass").text(~~(zd/100)),b(".stats-cells-eaten").text(Ie),b(".stats-top-position").text(0==Je?":(":Je);var a=document.getElementById("statsGraph");if(a){var c=a.getContext("2d"),d=a.width,a=a.height;if(c.clearRect(0,0,d,a),2<Ae.length){for(var e=200,f=0;f<Ae.length;f++)e=Math.max(Ae[f],e);for(c.lineWidth=3,c.lineCap="round",c.lineJoin="round",c.strokeStyle=Ce,c.fillStyle=Ce,c.beginPath(),c.moveTo(0,a-Ae[0]/e*(a-10)+10),f=1;f<Ae.length;f+=Math.max(~~(Ae.length/d),1)){for(var g=f/(Ae.length-1)*d,h=[],i=-20;20>=i;++i)0>f+i||f+i>=Ae.length||h.push(Ae[f+i]);h=h.reduce(function(a,b){return a+b})/h.length/e,c.lineTo(g,a-h*(a-10)+10)}c.stroke(),c.globalAlpha=.5,c.lineTo(d,a),c.lineTo(0,a),c.fill(),c.globalAlpha=1}}}function Kc(){Ud||De||(r.skipstats?Rb(500):(a.refreshAd(a.adSlots.ab),Jc(),De=!0,setTimeout(function(){b("#overlays").fadeIn(500),b("#stats").show(),$++,Ta(!1);var c=Lc("g_plus_share_stats");a.fillSocialValues(c,"gPlusShare")},1500)))}function Lc(c){var d=b(".stats-time-alive").text();return a.parseString(c,"%@",[d.split(":")[0],d.split(":")[1],b(".stats-highest-mass").text()])}function Mc(){a.open("https://plus.google.com/share?url=www.agar.io&hl=en-US","Agar.io","width=484,height=580,menubar=no,toolbar=no,resizable=yes,scrollbars=no,left="+(a.screenX+a.innerWidth/2-242)+",top="+(a.innerHeight-580)/2)}b(a).on("beforeunload",Pa);var c="v0.8.0",d="en",e={pl:{settings:"Ustawienia OGARio",skins:"Wyłącz skiny",names:"Wyłącz nazwy",nocolors:"Wyłącz kolory",showmass:"Pokaż masę",darktheme:"Ciemny motyw",skipstats:"Pomiń statystyki",unlimitedzoom:"Zoom",showmapborders:"Granice mapy",opponentscolors:"Kolory przeciwników",opponentsrings:"Ringi przeciwników",transparentcells:"Przezroczyste kulki",transparentskins:"Przezroczyste skiny",simpledrawing:"Proste rysowanie",timetoremerge:"Czas do złączenia",splitrange:"Zasięg podziału",virusrange:"Zasięg wirusów",showbiggernames:"Większe nazwy",onlyogarioskins:"Tylko skiny OGARio",showminimap:"Pokaż minimapę",disableshift:"Wyłącz Shift",showfps:"Licznik FPS",showmassguides:"Wskaźniki masy",cursortracking:"Śledzenie kursora",rainbowfood:"Kolorowy pokarm",drawbackgroundsectors:"Sektory w tle",textshadows:"Cienie nazw",acidmode:"Tryb ACID",keys:"Klawisze",wkey:"Karmienie",ekey:"Pauza kulki",akey:"Strzał w wirusy",skey:"Statystyki",dkey:"Przełączanie kulki",fkey:"Pokaż/ukryj pokarm",zkey:"Reset zoomu",xkey:"Przełączanie miejsca śmierci",qkey:"Podwójny podział",shiftkey:"Szybki podział",spacekey:"Podział",space:"Spacja",leaderboard:"Topka",currentmass:"Masa: ",bestmass:"Top: ",topmass:"Top gry: ",roundvictims:"Ofiary: ",totalvictims:"Top ofiar: ",food:"Pokarm: ",totalfood:"Top pokarmu: ",totaldeaths:"Smierci: ",roundtime:"Czas: ",gametime:"Czas gry: ",modinfo:"Polski MOD: OGARio by szymy",home:"Strona",exit:"OGARio by szymy: Czy na pewno chcesz opuścic grę?"},en:{settings:"OGARio settings",skins:"No skins",names:"No names",nocolors:"No colors",showmass:"Show mass",darktheme:"Dark theme",skipstats:"Skip stats",unlimitedzoom:"Zoom",showmapborders:"Show map borders",opponentscolors:"Opponents colors",opponentsrings:"Opponents rings",transparentcells:"Transparent cells",transparentskins:"Transparent skins",simpledrawing:"Simple drawing",timetoremerge:"Time to re-merge",splitrange:"Split range",virusrange:"Viruses range",showbiggernames:"Show bigger names",onlyogarioskins:"Only OGARio skins",showminimap:"Show minimap",disableshift:"Disable Shift",showfps:"Show FPS",showmassguides:"Show mass guides",cursortracking:"Cursor tracking",rainbowfood:"Rainbow food",drawbackgroundsectors:"Background sectors",textshadows:"Text shadows",acidmode:"ACID mode",keys:"Keys",wkey:"Rapid Ejeculate",ekey:"Cell pause",akey:"Shoot viruses",skey:"Show stats",dkey:"Toggle cells",fkey:"Toggle food",zkey:"Reset zoom",xkey:"Switch death location",qkey:"Double split",shiftkey:"Fast split",spacekey:"Split",space:"Space",leaderboard:"Leaderboard",currentmass:"Mass: ",bestmass:"Highest mass: ",topmass:"Game highest mass: ",roundvictims:"Kills: ",totalvictims:"Highest kills: ",food:"Food: ",totalfood:"Highest food: ",totaldeaths:"Total deaths: ",roundtime:"Time: ",gametime:"Game time: ",modinfo:"Polish MOD: OGARio by szymy",home:"Home",exit:"OGARio by szymy: Are you sure you want to quit the game?"}},f={},g="michau;michau biauek;leszke;korwin;grzegorz braun;szczesc boze;jp2;linda;kosmonauta;chuj jebany;stulejarnosc;feels;smutna zaba;germandeathcamp;thanks doge;smutny piesek;pinionszek;ami;92gruszka;gruszka;anka-agar;blacksketch;bladi89;bolyss;ciepla_kupa;cimcirimci;davidmcpolska;d1ck;edward_kenway;empe666 wypok;filozofujaca;hansolony;hulajdusza;janusz-cebula;jayjay1337;kat_rzeznikow;kiku;michalek;oscyp33;polonium;psposki;ruszowaa;siabadabada;sialababamak;smashgoor;szymy;typowy_sebix;xaimeii;papaj;bean;kenny;benis;penis;mario;bender;bert;gaben;dolan;heisenberg;chuck;pikachu;slowpoke;pig;pedobear;rainbow;illuminati;coca cola;pepsi;cage;dupa;dupa wykop;quinn;rafalala;qas;agar online;albus dumbledor;albus;dumbledore;ginny weasley;harry potter;hermione;ron weasley;lord voldemort;draco malfoy;wykop peel;panda;polska;tymbark;kpr. wojtek;atari;amiga;marihuana;thug life;g2;vp;fnatic;tsm;cojawamzrobilem;neymar;koksy;policja;krzysiu jp;puchauke;pi;rain;deszcz;thunder;night;flower;trollface;troll;osama;sasha grey;wina tuska;wsk;sosnowiec;nevergonna;terminator;spyro;tiger bonzo;kobra bonzo;ordenminer;zoidberg;swidnik;chrome;firefox;cookie;lg;peppa pig;peppa;spongebob;vw;durex;france;russia;usa;brazil;portugal;israel;sweden;radagast;gandalf;cygan;wolsky;bpc;majsterroo;arstiard;arstard;kordian;vasili;forfiter;otozto;skurwysyny".split(";"),h="wykop;#wykop;@wykop;wykop.pl;#wykop.pl;wypok;wypoczek".split(";"),j="mirko;#mirko;@mirko;mikro;tylko mirko;tylkomirko;#tylkomirko;@tylkomirko".split(";"),k="#koksy;.( ͡° ͜ʖ ͡°);( ͡° ͜ʖ ͡°).;[pl]ziomek00725;wiktorkox100#ht;ϩảςℌǻ ɠɍ℮ɣ;฿ĭℊ ℬøƨƨ;ოﻪรէεгofﻪցﻪг皮;w=friend;w = friend;w=friends;w = friends;w=team;w = team;need a bro;ą ę;świdnik;szczęść boże;ŋìċθļåĩ;乃ц尺ムズ;布拉克;kirmaz ㊗㊙;☂ƛȥȥɗɩɲ☂;ⱥめξทǥєʀ;ℜℯḱтɐℜ;ℬấℌọʐ ²¹;zyronik;ρʀøƒ 越;к∂©ℙєℜ;┆♕₭↑ℵǥ♕;ℚʊ@к℮432;ᎯᏝᎮℋᎯ;ј ฝ ☼ᎯᏝᎮℋᎯ;røŀєx ミ;๔єคtђรtг๏кє;ℛấʝọɳ (◣_◢);šєβǻ-ⓐⓖⓐⓡ;ⓐⓜⓘⓖⓐⓐⓖⓐⓡ;ѧᵭᵯѧӿɨᵴ;gαмєσνєя".split(";"),l="koksy;lennyface_left;lennyface_right;ziomek00725;wiktorkox100;sasha;sasha;masterofagar;wfriend;wfriend;wfriend;wfriend;wfriend;wfriend;wfriend;ae;swidnik;szczesc boze;nicolai;burak;atom;kirmaz;azzdin;avenger;rektar;bahoz;zyronik;prof;kacper;king;quake;alpha;alpha;rolex;deathstroke;rajon;sebaagar;amigaagar;admaxis;gameover".split(";"),m="☢Ⓜ;㉹;㉿;〖ƝƁƘ〗;☠ⒻⓇ;ᓮᗯᗩᘐ;ƵŦ;ƵŦ★;ℛɨᎮ;ӍᏨ²;【☠】;ȺƧƤЄƇƬ✠;ฬℬ;『ℛนℵ』;《ℝ》;〘GѺ〙;ƬψƬ".split(";"),n="atomicmirko;et;kings;nbk;dfr;iwag;zt;zts;rip;mc2;scull;aspect;wumbo;run;reddit;go;tyt".split(";"),o=g.concat(h,j,k),p={"☢Ⓜ":"#00C8FF"},q={nick:"",clantag:"",skin:"",color:"#FF7800"},r={skins:!0,names:!0,nocolors:!1,showmass:!0,darktheme:!0,skipstats:!1,unlimitedzoom:!0,showmapborders:!0,opponentscolors:!0,opponentsrings:!1,transparentcells:!0,transparentskins:!0,simpledrawing:!0,timetoremerge:!0,splitrange:!0,virusrange:!0,showbiggernames:!0,onlyogarioskins:!0,showminimap:!0,disableshift:!1,showfps:!0,showmassguides:!0,cursortracking:!0,rainbowfood:!1,drawbackgroundsectors:!0,textshadows:!1,acidmode:!1},s=-7080,t=-7080,u=7080,v=7080,w=7,x=7,y=!1,z=!1,A=!1,B=1,C=0,D=0,E=0,F=0,G=!0,H={},I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=3,T="",U="",V="http://ogario.ovh/skins.php?s=",W=!1,X=!0,Y=[],Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=null,fa=null,ga=null,ha=null,ia=null,ja=null,ka=1,la=0,ma=0,na=null,oa=0,pa=0,qa=null,ra=null,sa=null,ta=null,ua=null,va=null,wa=null,xa=null,ya=null,za=null,Aa=null,Ba=null,Ca=null,Da=null,Ea=!1,Fa=!1,Ga=!1,Ha=!1,Ia=!1,Ja=!1,Ka=!1,La=!1,Ma=!1;a.nextServer=function(){return":party"===T?void a.createParty():void Vb()},a.setSettings=function(a,b){r.hasOwnProperty(a)&&null!=b&&(r[a]=b,Sa())},a.copyToken=function(){var a=b(".partyToken:visible")[0];a.setSelectionRange(0,a.value.length),a.select();try{document.execCommand("copy")}catch(b){}},b(function(){Jb(b)});var Nc={};if(function(){var b=a.location.search;"?"==b.charAt(0)&&(b=b.slice(1));for(var b=b.split("&"),c=0;c<b.length;c++){var d=b[c].split("=");Nc[d[0]]=d[1]}}(),"fb"in Nc||"miniclip"in Nc||"http:"==a.location.protocol||(a.location.href="http:"+a.location.href.substring(a.location.protocol.length)),void 0!=a.EnvConfig){var Oc=a.EnvConfig;a.EnvConfig=Oc}if(!a.agarioNoInit){var Pc=a.location.protocol,Qc="https:"==Pc;Nc.master&&(Oc.master_url=Nc.master);var Rc=Pc+"//"+Oc.master_url+"/",Sc=a.navigator.userAgent;if(-1!=Sc.indexOf("Android"))a.ga&&a.ga("send","event","MobileRedirect","PlayStore"),setTimeout(function(){a.location.href="https://play.google.com/store/apps/details?id=com.miniclip.agar.io"},1e3);else if(-1!=Sc.indexOf("iPhone")||-1!=Sc.indexOf("iPad")||-1!=Sc.indexOf("iPod"))a.ga&&a.ga("send","event","MobileRedirect","AppStore"),setTimeout(function(){a.location.href="https://itunes.apple.com/app/agar.io/id995999703?mt=8&at=1l3vajp"},1e3);else{var Tc={};a.agarApp=Tc;var Uc,Vc,Wc,Xc,Yc,Zc=null,$c=null,_c=0,ad=0,bd=[],cd=[],dd={},ed=[],fd=[],gd=[],hd=0,id=0,jd=-1,kd=-1,ld=0,md=0,nd=0,od=null,pd=0,qd=0,rd=1e4,sd=1e4,td=1,ud=null,vd=!0,wd=!0,xd=!1,yd=!1,zd=0,Ad=!1,Bd=!1,Cd=_c=~~((pd+rd)/2),Dd=ad=~~((qd+sd)/2),Ed=1,Fd="",Gd=null,Hd=!1,Id=!1,Jd=0,Kd=0,Ld=0,Md=0,Nd=["#333333","#FF3333","#33FF33","#3333FF"],Od=!1,Pd=!1,Qd=0,Rd=null,Sd=1,Td=1,Ud=!1,Vd=0,Wd=!1,Xd=null,Yd=!1,Zd=new Image;Zd.src="/img/background.png";var $d="ontouchstart"in a&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a.navigator.userAgent),_d=new Image;_d.src="/img/split.png";var ae=document.createElement("canvas");if("undefined"==typeof console||"undefined"==typeof DataView||"undefined"==typeof WebSocket||null==ae||null==ae.getContext||null==a.localStorage)alert("You browser does not support this game, we recommend you to use Firefox to play this");else{var be=null;a.setNick=function(c){od=Ua(c,b("#clantag").val(),"",b("#color").val()),a.ga&&a.ga("send","event","Nick",od.toLowerCase()),Pb(),ec(),zd=0,Ta(!0)},a.setRegion=Qb;var ce=!0;a.setSkins=function(a){vd=a},a.setNames=function(a){wd=a},a.setDarkTheme=function(a){Ad=a},a.setColors=function(a){xd=a},a.setShowMass=function(a){Bd=a},a.spectate=function(){od=null,gc(1),Pb(),z=!1},a.setGameMode=function(a){a!=Fd&&(":party"==Fd&&b("#helloContainer").attr("data-party-state","0"),Sb(a),":party"!=a&&Wb())},a.setAcid=function(a){Od=a},b.get(Pc+"//gc.agar.io",function(a){var b=a.split(" ");a=b[0],b=b[1]||"",de.hasOwnProperty(a)&&("string"==typeof de[a]?ud||Qb(de[a]):de[a].hasOwnProperty(b)&&(ud||Qb(de[a][b])))},"text");var de={AF:"JP-Tokyo",AX:"EU-London",AL:"EU-London",DZ:"EU-London",AS:"SG-Singapore",AD:"EU-London",AO:"EU-London",AI:"US-Atlanta",AG:"US-Atlanta",AR:"BR-Brazil",AM:"JP-Tokyo",AW:"US-Atlanta",AU:"SG-Singapore",AT:"EU-London",AZ:"JP-Tokyo",BS:"US-Atlanta",BH:"JP-Tokyo",BD:"JP-Tokyo",BB:"US-Atlanta",BY:"EU-London",BE:"EU-London",BZ:"US-Atlanta",BJ:"EU-London",BM:"US-Atlanta",BT:"JP-Tokyo",BO:"BR-Brazil",BQ:"US-Atlanta",BA:"EU-London",BW:"EU-London",BR:"BR-Brazil",IO:"JP-Tokyo",VG:"US-Atlanta",BN:"JP-Tokyo",BG:"EU-London",BF:"EU-London",BI:"EU-London",KH:"JP-Tokyo",CM:"EU-London",CA:"US-Atlanta",CV:"EU-London",KY:"US-Atlanta",CF:"EU-London",TD:"EU-London",CL:"BR-Brazil",CN:"CN-China",CX:"JP-Tokyo",CC:"JP-Tokyo",CO:"BR-Brazil",KM:"EU-London",CD:"EU-London",CG:"EU-London",CK:"SG-Singapore",CR:"US-Atlanta",CI:"EU-London",HR:"EU-London",CU:"US-Atlanta",CW:"US-Atlanta",CY:"JP-Tokyo",CZ:"EU-London",DK:"EU-London",DJ:"EU-London",DM:"US-Atlanta",DO:"US-Atlanta",EC:"BR-Brazil",EG:"EU-London",SV:"US-Atlanta",GQ:"EU-London",ER:"EU-London",EE:"EU-London",ET:"EU-London",FO:"EU-London",FK:"BR-Brazil",FJ:"SG-Singapore",FI:"EU-London",FR:"EU-London",GF:"BR-Brazil",PF:"SG-Singapore",GA:"EU-London",GM:"EU-London",GE:"JP-Tokyo",DE:"EU-London",GH:"EU-London",GI:"EU-London",GR:"EU-London",GL:"US-Atlanta",GD:"US-Atlanta",GP:"US-Atlanta",GU:"SG-Singapore",GT:"US-Atlanta",GG:"EU-London",GN:"EU-London",GW:"EU-London",GY:"BR-Brazil",HT:"US-Atlanta",VA:"EU-London",HN:"US-Atlanta",HK:"JP-Tokyo",HU:"EU-London",IS:"EU-London",IN:"JP-Tokyo",ID:"JP-Tokyo",IR:"JP-Tokyo",IQ:"JP-Tokyo",IE:"EU-London",IM:"EU-London",IL:"JP-Tokyo",IT:"EU-London",JM:"US-Atlanta",JP:"JP-Tokyo",JE:"EU-London",JO:"JP-Tokyo",KZ:"JP-Tokyo",KE:"EU-London",KI:"SG-Singapore",KP:"JP-Tokyo",KR:"JP-Tokyo",KW:"JP-Tokyo",KG:"JP-Tokyo",LA:"JP-Tokyo",LV:"EU-London",LB:"JP-Tokyo",LS:"EU-London",LR:"EU-London",LY:"EU-London",LI:"EU-London",LT:"EU-London",LU:"EU-London",MO:"JP-Tokyo",MK:"EU-London",MG:"EU-London",MW:"EU-London",MY:"JP-Tokyo",MV:"JP-Tokyo",ML:"EU-London",MT:"EU-London",MH:"SG-Singapore",MQ:"US-Atlanta",MR:"EU-London",MU:"EU-London",YT:"EU-London",MX:"US-Atlanta",FM:"SG-Singapore",MD:"EU-London",MC:"EU-London",MN:"JP-Tokyo",ME:"EU-London",MS:"US-Atlanta",MA:"EU-London",MZ:"EU-London",MM:"JP-Tokyo",NA:"EU-London",NR:"SG-Singapore",NP:"JP-Tokyo",NL:"EU-London",NC:"SG-Singapore",NZ:"SG-Singapore",NI:"US-Atlanta",NE:"EU-London",NG:"EU-London",NU:"SG-Singapore",NF:"SG-Singapore",MP:"SG-Singapore",NO:"EU-London",OM:"JP-Tokyo",PK:"JP-Tokyo",PW:"SG-Singapore",PS:"JP-Tokyo",PA:"US-Atlanta",PG:"SG-Singapore",PY:"BR-Brazil",PE:"BR-Brazil",PH:"JP-Tokyo",PN:"SG-Singapore",PL:"EU-London",PT:"EU-London",PR:"US-Atlanta",QA:"JP-Tokyo",RE:"EU-London",RO:"EU-London",RU:"RU-Russia",RW:"EU-London",BL:"US-Atlanta",SH:"EU-London",KN:"US-Atlanta",LC:"US-Atlanta",MF:"US-Atlanta",PM:"US-Atlanta",VC:"US-Atlanta",WS:"SG-Singapore",SM:"EU-London",ST:"EU-London",SA:"EU-London",SN:"EU-London",RS:"EU-London",SC:"EU-London",SL:"EU-London",SG:"JP-Tokyo",SX:"US-Atlanta",SK:"EU-London",SI:"EU-London",SB:"SG-Singapore",SO:"EU-London",ZA:"EU-London",SS:"EU-London",ES:"EU-London",LK:"JP-Tokyo",SD:"EU-London",SR:"BR-Brazil",SJ:"EU-London",SZ:"EU-London",SE:"EU-London",CH:"EU-London",SY:"EU-London",TW:"JP-Tokyo",TJ:"JP-Tokyo",TZ:"EU-London",TH:"JP-Tokyo",TL:"JP-Tokyo",TG:"EU-London",TK:"SG-Singapore",TO:"SG-Singapore",TT:"US-Atlanta",TN:"EU-London",TR:"TK-Turkey",TM:"JP-Tokyo",TC:"US-Atlanta",TV:"SG-Singapore",UG:"EU-London",UA:"EU-London",AE:"EU-London",GB:"EU-London",US:"US-Atlanta",UM:"SG-Singapore",VI:"US-Atlanta",UY:"BR-Brazil",UZ:"JP-Tokyo",VU:"SG-Singapore",VE:"BR-Brazil",VN:"JP-Tokyo",WF:"SG-Singapore",EH:"EU-London",YE:"JP-Tokyo",ZM:"EU-London",ZW:"EU-London"},ee=null;a.connect=Yb;var fe=500,ge=-1,he=-1;a.refreshPlayerInfo=function(){gc(253)};var ie=null,je=1,le=function(){var b=Date.now(),c=1e3/60;return function(){a.requestAnimationFrame(le),r.showfps&&pb();var d=Date.now(),e=d-b;e>c&&(b=d-e%c,!fc()||240>Date.now()-Qd?lc():console.warn("Skipping draw"),ze())}}(),ne="poland;usa;china;russia;canada;australia;spain;brazil;germany;ukraine;france;sweden;chaplin;north korea;south korea;japan;united kingdom;earth;greece;latvia;lithuania;estonia;finland;norway;cia;maldivas;austria;nigeria;reddit;yaranaika;confederate;9gag;indiana;4chan;italy;bulgaria;tumblr;2ch.hk;hong kong;portugal;jamaica;german empire;mexico;sanik;switzerland;croatia;chile;indonesia;bangladesh;thailand;iran;iraq;peru;moon;botswana;bosnia;netherlands;european union;taiwan;pakistan;hungary;satanist;qing dynasty;matriarchy;patriarchy;feminism;ireland;texas;facepunch;prodota;cambodia;steam;piccolo;ea;india;kc;denmark;quebec;ayy lmao;sealand;bait;tsarist russia;origin;vinesauce;stalin;belgium;luxembourg;stussy;prussia;8ch;argentina;scotland;sir;romania;belarus;wojak;doge;nasa;byzantium;imperial japan;french kingdom;somalia;turkey;mars;pokerface;8;irs;receita federal;facebook;putin;merkel;tsipras;obama;kim jong-un;dilma;hollande;berlusconi;cameron;clinton;hillary;venezuela;blatter;chavez;cuba;fidel;merkel;palin;queen;boris;bush;trump;hitler;nazi;ussr".split(";"),oe="8;nasa;putin;merkel;tsipras;obama;kim jong-un;dilma;hollande;berlusconi;cameron;clinton;hillary;blatter;chavez;fidel;merkel;palin;queen;boris;bush;trump".split(";"),pe={};sc.prototype={X:null,x:0,y:0,f:0,b:0},tc.prototype={id:0,a:null,name:null,i:null,M:null,x:0,y:0,size:0,s:0,u:0,o:0,H:0,I:0,g:0,ba:0,P:0,fa:0,F:!1,c:!1,h:!1,R:!0,$:0,N:null,da:0,Z:function(){var a;for(a=0;a<ed.length;a++)if(ed[a]==this){ed.splice(a,1);break}delete dd[this.id],a=cd.indexOf(this),-1!=a&&(yd=!0,cd.splice(a,1)),a=bd.indexOf(this.id),-1!=a&&bd.splice(a,1),this.F=!0,0<this.$&&fd.push(this)},m:function(){return Math.max(~~(.3*this.size),24)},A:function(a){(this.name=a)&&(null==this.i?this.i=new vc(this.m(),"#FFFFFF",r.textshadows,"#000000"):this.i.K(this.m()),this.i.B(this.name))},Y:function(){for(var a=this.G();this.a.length>a;){var b=~~(Math.random()*this.a.length);this.a.splice(b,1)}for(0==this.a.length&&a>0&&this.a.push(new sc(this,this.x,this.y,this.size,Math.random()-.5));this.a.length<a;)b=~~(Math.random()*this.a.length),b=this.a[b],this.a.push(new sc(this,b.x,b.y,b.f,b.b))},G:function(){var a=10;20>this.size&&(a=0),this.c&&(a=30);var b=this.size;return this.c||(b*=td),b*=je,~~Math.max(b,a)},qa:function(){this.Y();for(var a=this.a,b=a.length,c=0;b>c;++c){var d=a[(c-1+b)%b].b,e=a[(c+1)%b].b;a[c].b+=(Math.random()-.5)*(this.h?3:1),a[c].b*=.7,10<a[c].b&&(a[c].b=10),-10>a[c].b&&(a[c].b=-10),a[c].b=(d+e+8*a[c].b)/10}for(var f=this,g=this.c?0:(this.id/1e3+md/1e4)%(2*Math.PI),h=0,c=0;b>c;++c){var i=a[c].f,d=a[(c-1+b)%b].f,e=a[(c+1)%b].f;if(15<this.size&&null!=Zc&&20<this.size*td&&0<this.id){var j=!1,k=a[c].x,l=a[c].y;Zc.ta(k-5,l-5,10,10,function(a){a.X!=f&&25>(k-a.x)*(k-a.x)+(l-a.y)*(l-a.y)&&(j=!0)}),!j&&(a[c].x<pd||a[c].y<qd||a[c].x>rd||a[c].y>sd)&&(j=!0),j&&(0<a[c].b&&(a[c].b=0),--a[c].b)}i+=a[c].b,0>i&&(i=0),i=this.h?(19*i+this.size)/20:(12*i+this.size)/13,a[c].f=(d+e+8*i)/10,d=2*Math.PI/b,e=this.a[c].f,this.c&&0==c%2&&(e+=5),a[c].x=this.x+Math.cos(d*c+g)*e,a[c].y=this.y+Math.sin(d*c+g)*e,h=Math.max(h,e)}this.da=h},O:function(){if(0>=this.id)return 1;var a;a=(md-this.P)/120,a=0>a?0:a>1?1:a;var b=0>a?0:a>1?1:a;if(this.F&&b>=1){var c=fd.indexOf(this);-1!=c&&fd.splice(c,1)}return this.x=a*(this.H-this.s)+this.s,this.y=a*(this.I-this.u)+this.u,this.size=b*(this.g-this.o)+this.o,.01>Math.abs(this.size-this.g)&&(this.size=this.g),b},L:function(){return 0>=this.id?!0:this.x+this.size+40<_c-Xc/2/td||this.y+this.size+40<ad-Yc/2/td||this.x-this.size-40>_c+Xc/2/td||this.y-this.size-40>ad+Yc/2/td?!1:!0},w:function(a){if(this.L()){var b=this.c,c=this.h,d=this.size<=30,e=null,f=0,g=r.showbiggernames?1.5:1,h=r.showbiggernames?10:4,i=r.showbiggernames?1:2;if(!X&&d)return;++this.$;var j=0<this.id&&!this.c&&!this.h&&(r.simpledrawing||.4>td);if(5>this.G()&&0<this.id&&(j=!0),this.R&&!j)for(var k=0;k<this.a.length;k++)this.a[k].f=this.size;this.R=j,a.save(),this.fa=md;var l=this.O();this.F&&(a.globalAlpha*=1-l),a.lineWidth=10,a.lineCap="round",a.lineJoin=this.c?"miter":"round";var k=this.name.toLowerCase(),m=null,l=!1,n=this.color;b||d||c||!r.skins||":teams"==T||(!r.onlyogarioskins&&(e=rc(this.N)),null!=e?n=r.opponentscolors?n:qc(this.N)||n:e=Ib(this.name),null!=e&&-1!=oe.indexOf(k)&&(l=!0)),r.nocolors?(a.fillStyle="#FFFFFF",a.strokeStyle="#AAAAAA"):(a.fillStyle=n,a.strokeStyle=n),b&&this.strokeColor&&(a.strokeStyle=this.strokeColor);var o=Va()&&r.opponentscolors&&!r.opponentsrings&&null!=e;if(j)o?f=-10:d&&(f=5),a.beginPath(),a.arc(this.x,this.y,this.size+f,0,2*Math.PI,!1);else for(this.qa(),a.beginPath(),n=this.G(),a.moveTo(this.a[0].x,this.a[0].y),k=1;n>=k;++k){var p=k%n;a.lineTo(this.a[p].x,this.a[p].y)}if(a.closePath(),r.transparentcells?(d||b||(a.globalAlpha=.8),b&&(a.globalAlpha=.5)):a.globalAlpha=1,o?(a.lineWidth=20,a.stroke()):j||a.stroke(),a.fill(),d)return void a.restore();b&&a.stroke(),a.globalAlpha=1,null!=e&&(a.save(),a.clip(),k=j?this.size+f:Math.max(this.size,this.g),r.transparentskins&&(a.globalAlpha=.75),j?a.drawImage(e,this.x-k,this.y-k,2*k,2*k):a.drawImage(e,this.x-k-5,this.y-k-5,2*k+10,2*k+10),a.restore()),(r.nocolors||15<this.size)&&!j&&(a.strokeStyle="#000000",a.globalAlpha*=.1,a.stroke()),a.globalAlpha=1,m=-1!=cd.indexOf(this),j=~~this.y,!b&&this.isShiftable&&(a.beginPath(),a.arc(this.x,this.y,this.size+f-5,0,2*Math.PI,!1),a.closePath(),a.strokeStyle="#FFFFFF",a.lineWidth=10,a.stroke()),0!=this.id&&(r.names||m)&&this.name&&this.i&&!l&&(k=this.i,k.B(this.name),k.K(this.m()*(b?S:g)),l=0>=this.id?1:Math.ceil(10*td)/10,k.ea(l),k=k.J(),n=Math.ceil(k.width/l),p=Math.ceil(k.height/l),a.drawImage(k,~~this.x-~~(n/2),j-~~(p/2),n,p),j+=k.height/2/l+h),0<this.id&&r.showmass&&(null==this.M&&(this.M=new vc(this.m()/i,"#FFFFFF",r.textshadows,"#000000")),m=this.M,m.K(this.m()/i),m.B(~~(this.size*this.size/100)),l=Math.ceil(10*td)/10,m.ea(l),k=m.J(),n=Math.ceil(k.width/l),p=Math.ceil(k.height/l),a.drawImage(k,~~this.x-~~(n/2),j-~~(p/2),n,p)),a.restore()}}},tc.prototype.createTime=null,tc.prototype.sizeRatio=null,tc.prototype.newColor=null,tc.prototype.strokeColor=null,tc.prototype.isShiftable=!1,tc.prototype.drawOgarioLayer=function(a,b,c,d){if(this.L()){if(a.save(),a.globalAlpha*=1-this.O(),a.lineWidth=10,a.lineCap="round",a.lineJoin="round",r.virusrange&&d&&(a.beginPath(),a.arc(this.x,this.y,this.size+820,0,2*Math.PI,!1),a.closePath(),a.globalAlpha="#C80000"==this.color?.2:.1,r.darktheme||(a.globalAlpha*=.5),a.fillStyle=this.color,a.fill()),d)return void a.restore();r.opponentsrings&&!c&&this.size>40&&(a.beginPath(),a.arc(this.x,this.y,this.size+16+2/B,0,2*Math.PI,!1),a.closePath(),a.globalAlpha=.75,a.lineWidth=10+1/B,a.strokeStyle=this.newColor,a.stroke()),r.splitrange&&(c||this.sizeRatio&&this.sizeRatio>=2.5)&&this.size>59&&(a.beginPath(),a.arc(this.x,this.y,this.size+760,0,2*Math.PI,!1),a.closePath(),a.globalAlpha=.4,r.darktheme||c||(a.globalAlpha*=.4),a.lineWidth=4,c?(a.strokeStyle="#FF7800",b==J?(Wa()&&(a.lineWidth=6,a.strokeStyle=r.darktheme?"#FFFFFF":"#222222"),a.stroke(),a.beginPath(),a.arc(this.x,this.y,820,0,2*Math.PI,!1),a.closePath(),a.lineWidth=2,a.stroke()):a.stroke()):(r.opponentsrings&&":teams"!=T?a.strokeStyle=this.newColor:a.strokeStyle=this.color,a.stroke())),r.cursortracking&&c&&(a.beginPath(),a.moveTo(this.x,this.y),a.lineTo(O,P),a.globalAlpha=r.darktheme?.7:.35,a.lineWidth=2,a.strokeStyle=r.darktheme?"#FFFFFF":"#000000",a.stroke()),a.restore()}},a.Maths=function(a){function b(a,b,c){return b>a?b:a>c?c:a}return a.xa=function(a,c,d){return d=b(d,0,1),a+d*(c-a)},a.wa=b,a}({}),vc.prototype={D:"",S:"#000000",U:!1,V:"#000000",v:16,j:null,T:null,l:!1,C:1,K:function(a){this.v!=a&&(this.v=a,this.l=!0)},ea:function(a){this.C!=a&&(this.C=a,this.l=!0)},B:function(a){a!=this.D&&(this.D=a,this.l=!0)},J:function(){if(null==this.j&&(this.j=document.createElement("canvas"),this.T=this.j.getContext("2d")),this.l){this.l=!1;var a=this.j,b=this.T,c=this.D,d=this.C,e=this.v,f=e+"px Ubuntu";b.font=f;var g=~~(.2*e);a.width=(b.measureText(c).width+6)*d,a.height=(e+g)*d,b.font=f,b.scale(d,d),b.globalAlpha=1,b.lineWidth=3,b.strokeStyle=this.V,b.fillStyle=this.S,this.U&&b.strokeText(c,3,e-g/2),b.fillText(c,3,e-g/2)}return this.j}},Date.now||(Date.now=function(){return(new Date).getTime()}),function(){for(var b=["ms","moz","webkit","o"],c=0;c<b.length&&!a.requestAnimationFrame;++c)a.requestAnimationFrame=a[b[c]+"RequestAnimationFrame"],a.cancelAnimationFrame=a[b[c]+"CancelAnimationFrame"]||a[b[c]+"CancelRequestAnimationFrame"];a.requestAnimationFrame||(a.requestAnimationFrame=function(a){return setTimeout(a,1e3/60)},a.cancelAnimationFrame=function(a){clearTimeout(a)})}();var qe={init:function(a){function b(a){return d>a&&(a=d),a>f&&(a=f),~~((a-d)/32)}function c(a){return e>a&&(a=e),a>g&&(a=g),~~((a-e)/32)}var d=a.oa,e=a.pa,f=a.ma,g=a.na,h=~~((f-d)/32)+1,i=~~((g-e)/32)+1,j=Array(h*i);return{ja:function(a){var d=b(a.x)+c(a.y)*h;null==j[d]?j[d]=a:Array.isArray(j[d])?j[d].push(a):j[d]=[j[d],a]},ta:function(a,d,e,f,g){var k=b(a),l=c(d);for(a=b(a+e),d=c(d+f);d>=l;++l)for(f=k;a>=f;++f)if(e=j[f+l*h],null!=e)if(Array.isArray(e))for(var m=0;m<e.length;m++)g(e[m]);else g(e)}}}},re=function(){var a=new tc(0,0,0,32,"#ED1C24",""),b=document.createElement("canvas");b.width=32,b.height=32;var c=b.getContext("2d");return function(){0<cd.length&&(a.color=cd[0].color,a.A(cd[0].name)),c.clearRect(0,0,32,32),c.save(),c.translate(16,16),c.scale(.4,.4),a.w(c),c.restore();var d=document.getElementById("favicon"),e=d.cloneNode(!0);e.setAttribute("href",b.toDataURL("image/png")),d.parentNode.replaceChild(e,d)}}();b(function(){re()});var se="storeObjectInfo",te={context:null,defaultProvider:"facebook",loginIntent:"0",userInfo:{socialToken:null,tokenExpires:"",level:"",xp:"",xpNeeded:"",name:"",picture:""}},ue=te;a.storageInfo=ue,a.createDefaultStorage=xc,a.updateStorage=zc,b(function(){null!=a.localStorage[se]&&(ue=JSON.parse(a.localStorage[se])),"1"==ue.loginIntent&&yc(ue.context),""!=ue.userInfo.name&&(Ac(ue.userInfo),null!=ue.userInfo.socialToken&&(Rd=ue.userInfo.socialToken))}),a.checkLoginStatus=function(){"1"==ue.loginIntent&&yc(ue.context)},a.logout=function(){ue=te,Rd=null,ye(),b("#helloContainer").attr("data-logged-in","0"),b("#helloContainer").attr("data-has-account-data","0"),b("#gPlusShare").hide(),b("#fbShare").show(),b("#user-id-tag").text(""),delete a.localStorage[se],a.localStorage[se]=JSON.stringify(ue),Wb(),a.MC.doLogout()},a.gameServerLogin=function(){""!=ue.userInfo.name&&a.localStorage[se]&&(Date.now()+3e4>1e3*ue.userInfo.tokenExpires?(b("#helloContainer").attr("data-logged-in","0"),a.logout()):(Rd=ue.userInfo.socialToken,hc()))},a.checkSocialAPIToken=function(){b.ajax(Rc+"checkToken",{error:function(){Rd=null,a.logout()},success:function(b){ue.ya="1",b=b.split("\n"),Bc({level:+b[0],xp:+b[1],xpNeeded:+b[2]},null),a.gameServerLogin()},dataType:"text",method:"POST",cache:!1,crossDomain:!0,data:Rd})},a.getSocialAPIToken=function(c,d){null==d||"undefined"==d?a.logout():b.ajax(Rc+c,{error:function(){Rd=null,b("#helloContainer").attr("data-logged-in","0")},success:function(b){b=b.split("\n"),ue.userInfo.socialToken=b[2],ue.userInfo.tokenExpires=b[3],ue.userInfo.level=b[4],ue.userInfo.xp=b[5],ue.userInfo.xpNeeded=b[6],ue.userInfo.name=b[0].split(" ")[0],Ac(ue.userInfo),zc(),a.gameServerLogin()},dataType:"text",method:"POST",cache:!1,crossDomain:!0,data:d})},a.toggleSocialLogin=function(){b("#socialLoginContainer").toggle(),b("#settings").hide(),b("#instructions").hide(),Cc()},a.toggleSettings=function(){b("#settings").toggle(),b("#socialLoginContainer").hide(),b("#instructions").hide(),Cc()};var ve=0;a.fbAsyncInit=function(){function b(){null==a.FB?alert("You seem to have something blocking Facebook on your browser, please check for any extensions"):(ue.loginIntent="1",a.updateStorage(),a.FB.login(function(a){Dc(a)},{scope:"public_profile, email"}))}a.FB.init({appId:Oc.fb_app_id,cookie:!0,xfbml:!0,status:!0,version:"v2.2"}),"1"==a.storageInfo.loginIntent&&"facebook"==a.storageInfo.context&&a.FB.getLoginStatus(function(c){"connected"===c.status?Dc(c):(a.logout(),b())}),a.facebookRelogin=b,a.facebookLogin=b};var we=!1;!function(c){function d(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="//apis.google.com/js/client:platform.js?onload=gapiAsyncInit";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b),f=!0}var e={},f=!1;return a.gapiAsyncInit=function(){b(e).trigger("initialized")},c.google={ka:function(){d()},ia:function(b,c){a.gapi.client.load("plus","v1",function(){console.log("fetching me profile"),gapi.client.plus.people.get({userId:"me"}).execute(function(a){c(a)})})}},c.sa=function(a){f||d(),"undefined"!=typeof gapi?a():b(e).bind("initialized",a)},c}(Tc);var xe=function(c){function d(b){null!=Rd?a.checkSocialAPIToken():a.getSocialAPIToken("googleLogin",b),a.MC.doLoginWithGPlus(b)}function e(a){ue.userInfo.picture=a,b(".agario-profile-picture").attr("src",a)}var f=null,g={client_id:Oc.gplus_client_id,cookie_policy:"single_host_origin",scope:"profile email"};return c.ca={W:function(){return f},init:function(){var b=this,c=ue&&"1"==ue.loginIntent&&"google"==ue.context;Tc.sa(function(){a.gapi.ytsubscribe.go("agarYoutube"),a.gapi.load("auth2",function(){f=a.gapi.auth2.init(g),f.attachClickHandler(document.getElementById("gplusLogin"),{},function(a){console.log("googleUser : "+a)},function(a){console.log("failed to login in google plus: ",JSON.stringify(a,void 0,2))}),f.currentUser.listen(_.bind(b.ra,b)),c&&1==f.isSignedIn.get()&&f.signIn()})})},ra:function(b){if(f&&b&&f.isSignedIn.get()&&!we){we=!0,ue.loginIntent="1";var c=b.getAuthResponse(),g=c.access_token;a.W=c,console.log("loggedIn with G+!"),b=b.getBasicProfile().getImageUrl(),void 0==b?Tc.google.ia(c,function(b){b.result.isPlusUser?(b&&e(b.image.url),d(g)):(alert("Please add Google+ to your Google account and try again.\nOr you can login with another account."),a.logout())}):(e(b),d(g)),ue.context="google",a.updateStorage()}},la:function(){f&&(f.signOut(),we=!1)}},c}(Tc);a.gplusModule=xe;var ye=function(){Tc.ca.la()};a.logoutGooglePlus=ye;var ze=function(){function a(a,b,c,d,e){var f=b.getContext("2d"),g=b.width;b=b.height,a.color=e,a.A(c),a.size=d,f.save(),f.translate(g/2,b/2),a.w(f),f.restore()}for(var c=new tc(-1,0,0,32,"#5bc0de",""),d=new tc(-1,0,0,32,"#5bc0de",""),e="#0791ff #5a07ff #ff07fe #ffa507 #ff0774 #077fff #3aff07 #ff07ed #07a8ff #ff076e #3fff07 #ff0734 #07ff20 #ff07a2 #ff8207 #07ff0e".split(" "),f=[],g=0;g<e.length;++g){var h=g/e.length*12,i=30*Math.sqrt(g/e.length);f.push(new tc(-1,Math.cos(h)*i,Math.sin(h)*i,10,e[g],""))}wc(f);var j=document.createElement("canvas");return j.getContext("2d"),j.width=j.height=70,a(d,j,"",26,"#ebc0de"),function(){b(".cell-spinner").filter(":visible").each(function(){var d=b(this),e=Date.now(),f=this.width,g=this.height,h=this.getContext("2d");h.clearRect(0,0,f,g),h.save(),h.translate(f/2,g/2);for(var i=0;10>i;++i)h.drawImage(j,(.1*e+80*i)%(f+140)-f/2-70-35,g/2*Math.sin((.001*e+i)%Math.PI*2)-35,70,70);h.restore(),(d=d.attr("data-itr"))&&(d=Ub(d)),a(c,this,d||"",+b(this).attr("data-size"),"#5bc0de")}),b("#statsPellets").filter(":visible").each(function(){b(this);var c=this.width,d=this.height;for(this.getContext("2d").clearRect(0,0,c,d),c=0;c<f.length;c++)a(f[c],this,"",f[c].size,f[c].color)})}}();a.createParty=function(){Sb(":party"),ee=function(c){Fc("/#"+a.encodeURIComponent(c)),b(".partyToken").val("agar.io/#"+a.encodeURIComponent(c)),b(".party-info-token").text("http://agar.io/#"+a.encodeURIComponent(c)),b("#helloContainer").attr("data-party-state","1")},Wb()},a.joinParty=Ec,a.cancelParty=function(){Fc("/"),b("#helloContainer").attr("data-party-state","0"),Sb(""),Wb()};var Ae=[],Be=0,Ce="#000000",De=!1,Ee=!1,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=!0;setInterval(function(){Ee&&Ae.push(oc()/100)},1e3/60),setInterval(function(){var a=Ic();0!=a&&(++He,0==Je&&(Je=a),Je=Math.min(Je,a))},1e3),a.closeStats=function(){De=!1,b("#stats").hide(),a.destroyAd(a.adSlots.ab),Rb(0)},a.setSkipStats=function(a){Ke=!a},a.getStatsString=Lc,a.gPlusShare=Mc,a.twitterShareStats=function(){var b=a.getStatsString("g_plus_share_stats");a.open("https://twitter.com/intent/tweet?text="+b,"Agar.io","width=660,height=310,menubar=no,toolbar=no,resizable=yes,scrollbars=no,left="+(a.screenX+a.innerWidth/2-330)+",top="+(a.innerHeight-310)/2)},a.fbShareStats=function(){var b=a.getStatsString("fb_matchresults_subtitle");a.FB.ui({method:"feed",display:"iframe",name:Ub("fb_matchresults_title"),caption:Ub("fb_matchresults_description"),description:b,link:"http://agar.io",Ba:"http://static2.miniclipcdn.com/mobile/agar/Agar.io_matchresults_fb_1200x630.png",ua:{name:"play now!",link:"http://agar.io"}})},a.fillSocialValues=function(b,c){1==a.isChrome&&"google"==a.storageInfo.context&&a.gapi.interactivepost.render(c,{contenturl:Oc.game_url,clientid:Oc.gplus_client_id,cookiepolicy:"http://agar.io",prefilltext:b,calltoactionlabel:"BEAT",calltoactionurl:Oc.game_url})},b(function(){b(Kb),"MAsyncInit"in a&&a.MAsyncInit()})}}}};
var script = document.createElement('script');
script.textContent = '!' + ogario + '(window,window.jQuery);';
document.body.appendChild(script);
script.onload = function() {
this.parentNode.removeChild(this);
};
// Color picker JS
var script = document.createElement('script');
script.textContent = '$.getScript("http://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.3.0/js/bootstrap-colorpicker.min.js").then(function() { $(".nick").colorpicker({format: "hex", input: "#color"}); });';
document.body.appendChild(script);
}, true);
}