Max Shawabkeh 191eea5e53 v0.1.17
2014-02-06 13:31:06 -08:00

120 lines
61 KiB
JavaScript

(function() {var h,aa=aa||{},k=this,ca=function(){},da=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&
!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},m=function(a){return void 0!==a},n=function(a){return"array"==da(a)},ea=function(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},q=function(a){return"number"==typeof a},r=function(a){return"function"==da(a)},s=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},fa=function(a,
b,c){return a.call.apply(a.bind,arguments)},ga=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},t=function(a,b,c){t=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa:ga;return t.apply(null,arguments)},ha=Date.now||function(){return+new Date},
u=function(a,b){var c=a.split("."),d=k;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b},v=function(a,b){function c(){}c.prototype=b.prototype;a.A=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.xb=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}};
Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return t.apply(null,c)}return t(this,a)};var ia=function(a,b){for(var c in a)b.call(void 0,a[c],c,a)},ka=function(a){var b=ja,c={},d;for(d in b)a.call(void 0,b[d],d,b)&&(c[d]=b[d]);return c},la=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},ma=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},na=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},oa=function(a,b){b in a&&delete a[b]},x=function(a){var b={},c;for(c in a)b[c]=a[c];return b},pa=function(a){var b=da(a);if("object"==b||"array"==b){if(a.I)return a.I();
var b="array"==b?[]:{},c;for(c in a)b[c]=pa(a[c]);return b}return a},qa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),ra=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<qa.length;f++)c=qa[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var sa=function(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},ta=function(a){this.$=a};ta.prototype.g=function(a){var b=[];ua(this,a,b);return b.join("")};
var ua=function(a,b,c){switch(typeof b){case "string":va(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],ua(a,a.$?a.$.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),va(f,
c),c.push(":"),ua(a,a.$?a.$.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}},wa={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},xa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,va=function(a,b){b.push('"',a.replace(xa,function(a){if(a in wa)return wa[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return wa[a]=
e+b.toString(16)}),'"')};var ya=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,ya);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};v(ya,Error);ya.prototype.name="CustomError";var za=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},Ga=function(a){if(!Aa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ba,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Ca,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Da,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Ea,"&quot;"));-1!=a.indexOf("'")&&(a=a.replace(Fa,"&#39;"));return a},Ba=/&/g,Ca=/</g,Da=/>/g,Ea=/"/g,Fa=/'/g,Aa=/[&<>"']/,Ha=function(a,
b){return a<b?-1:a>b?1:0};var Ia=function(a,b){b.unshift(a);ya.call(this,za.apply(null,b));b.shift()};v(Ia,ya);Ia.prototype.name="AssertionError";var y=function(a,b,c){if(!a){var d="Assertion failed";if(b)var d=d+(": "+b),e=Array.prototype.slice.call(arguments,2);throw new Ia(""+d,e||[]);}return a},Ja=function(a,b){throw new Ia("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var A=Array.prototype,Ka=A.indexOf?function(a,b,c){y(null!=a.length);return A.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},La=A.forEach?function(a,b,c){y(null!=a.length);A.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},B=A.map?function(a,b,c){y(null!=a.length);return A.map.call(a,b,c)}:function(a,
b,c){for(var d=a.length,e=Array(d),f=p(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},Na=function(a){var b;t:{b=Ma;for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break t}b=-1}return 0>b?null:p(a)?a.charAt(b):a[b]},Oa=function(a,b){var c=Ka(a,b),d;if(d=0<=c)y(null!=a.length),A.splice.call(a,c,1);return d},Pa=function(a){return A.concat.apply(A,arguments)},Qa=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],e;
if(n(d)||(e=ea(d))&&Object.prototype.hasOwnProperty.call(d,"callee"))a.push.apply(a,d);else if(e)for(var f=a.length,g=d.length,l=0;l<g;l++)a[f+l]=d[l];else a.push(d)}},Ra=function(a,b,c){y(null!=a.length);return 2>=arguments.length?A.slice.call(a,b):A.slice.call(a,b,c)};var Sa=function(){};Sa.prototype.ra=!1;Sa.prototype.Ga=function(){this.ra||(this.ra=!0,this.F())};Sa.prototype.F=function(){if(this.Ha)for(;this.Ha.length;)this.Ha.shift()()};var Ta=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Z=!1;this.Na=!0};Ta.prototype.F=function(){};Ta.prototype.Ga=function(){};var Ua,Va,Wa,Xa,Ya=function(){return k.navigator?k.navigator.userAgent:null};Xa=Wa=Va=Ua=!1;var Za;if(Za=Ya()){var $a=k.navigator;Ua=0==Za.lastIndexOf("Opera",0);Va=!Ua&&(-1!=Za.indexOf("MSIE")||-1!=Za.indexOf("Trident"));Wa=!Ua&&-1!=Za.indexOf("WebKit");Xa=!Ua&&!Wa&&!Va&&"Gecko"==$a.product}var ab=Ua,bb=Va,cb=Xa,db=Wa,eb;
t:{var fb="",gb;if(ab&&k.opera)var hb=k.opera.version,fb="function"==typeof hb?hb():hb;else if(cb?gb=/rv\:([^\);]+)(\)|;)/:bb?gb=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:db&&(gb=/WebKit\/(\S+)/),gb)var ib=gb.exec(Ya()),fb=ib?ib[1]:"";if(bb){var jb,kb=k.document;jb=kb?kb.documentMode:void 0;if(jb>parseFloat(fb)){eb=String(jb);break t}}eb=fb}
var lb=eb,mb={},nb=function(a){var b;if(!(b=mb[a])){b=0;for(var c=String(lb).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",l=d[f]||"",w=RegExp("(\\d*)(\\D*)","g"),C=RegExp("(\\d*)(\\D*)","g");do{var z=w.exec(g)||["","",""],$=C.exec(l)||["","",""];if(0==z[0].length&&0==$[0].length)break;b=Ha(0==z[1].length?0:parseInt(z[1],10),0==$[1].length?0:parseInt($[1],10))||Ha(0==z[2].length,
0==$[2].length)||Ha(z[2],$[2])}while(0==b)}b=mb[a]=0<=b}return b};bb&&nb("9");!db||nb("528");cb&&nb("1.9b")||bb&&nb("8")||ab&&nb("9.5")||db&&nb("528");cb&&!nb("8")||bb&&nb("9");var ob="closure_listenable_"+(1E6*Math.random()|0),pb=0;var qb=function(a,b,c,d,e){this.ka=a;this.Pa=null;this.src=b;this.type=c;this.wa=!!d;this.ja=e;this.key=++pb;this.la=this.na=!1},rb=function(a){a.la=!0;a.ka=null;a.Pa=null;a.src=null;a.ja=null};var sb=function(a){this.src=a;this.m={};this.ga=0};sb.prototype.add=function(a,b,c,d,e){var f=this.m[a];f||(f=this.m[a]=[],this.ga++);var g;t:{for(g=0;g<f.length;++g){var l=f[g];if(!l.la&&l.ka==b&&l.wa==!!d&&l.ja==e)break t}g=-1}-1<g?(a=f[g],c||(a.na=!1)):(a=new qb(b,this.src,a,!!d,e),a.na=c,f.push(a));return a};var tb=function(){this.C=new sb(this);this.Sa=this};v(tb,Sa);tb.prototype[ob]=!0;tb.prototype.pa=null;
tb.prototype.dispatchEvent=function(a){ub(this);var b,c=this.pa;if(c){b=[];for(var d=1;c;c=c.pa)b.push(c),y(1E3>++d,"infinite loop")}c=this.Sa;d=a.type||a;if(p(a))a=new Ta(a,c);else if(a instanceof Ta)a.target=a.target||c;else{var e=a;a=new Ta(d,c);ra(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Z&&0<=g;g--)f=a.currentTarget=b[g],e=vb(f,d,!0,a)&&e;a.Z||(f=a.currentTarget=c,e=vb(f,d,!0,a)&&e,a.Z||(e=vb(f,d,!1,a)&&e));if(b)for(g=0;!a.Z&&g<b.length;g++)f=a.currentTarget=b[g],e=vb(f,d,!1,a)&&e;return e};
tb.prototype.F=function(){tb.A.F.call(this);if(this.C){var a=this.C,b=0,c;for(c in a.m){for(var d=a.m[c],e=0;e<d.length;e++)++b,rb(d[e]);delete a.m[c];a.ga--}}this.pa=null};
var vb=function(a,b,c,d){b=a.C.m[String(b)];if(!b)return!0;var e=b.length;if(0<e){for(var f=Array(e),g=0;g<e;g++)f[g]=b[g];b=f}else b=[];e=!0;for(f=0;f<b.length;++f){var l=b[f];if(l&&!l.la&&l.wa==c){var g=l.ka,w=l.ja||l.src;if(l.na){var C=a.C,z=l.type;z in C.m&&Oa(C.m[z],l)&&(rb(l),0==C.m[z].length&&(delete C.m[z],C.ga--))}e=!1!==g.call(w,d)&&e}}return e&&!1!=d.Na},ub=function(a){y(a.C,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var wb="StopIteration"in k?k.StopIteration:Error("StopIteration"),xb=function(){};xb.prototype.next=function(){throw wb;};xb.prototype.Za=function(){return this};var D=function(a,b){this.t={};this.f=[];this.ia=this.l=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){a instanceof D?(c=a.v(),d=a.n()):(c=na(a),d=ma(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}};D.prototype.n=function(){yb(this);for(var a=[],b=0;b<this.f.length;b++)a.push(this.t[this.f[b]]);return a};D.prototype.v=function(){yb(this);return this.f.concat()};
D.prototype.W=function(a){return Object.prototype.hasOwnProperty.call(this.t,a)};var yb=function(a){if(a.l!=a.f.length){for(var b=0,c=0;b<a.f.length;){var d=a.f[b];Object.prototype.hasOwnProperty.call(a.t,d)&&(a.f[c++]=d);b++}a.f.length=c}if(a.l!=a.f.length){for(var e={},c=b=0;b<a.f.length;)d=a.f[b],Object.prototype.hasOwnProperty.call(e,d)||(a.f[c++]=d,e[d]=1),b++;a.f.length=c}};D.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.t,a)?this.t[a]:b};
D.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.t,a)||(this.l++,this.f.push(a),this.ia++);this.t[a]=b};D.prototype.I=function(){return new D(this)};D.prototype.Za=function(a){yb(this);var b=0,c=this.f,d=this.t,e=this.ia,f=this,g=new xb;g.next=function(){for(;;){if(e!=f.ia)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw wb;var g=c[b++];return a?g:d[g]}};return g};var zb=function(a){if("function"==typeof a.n)return a.n();if(p(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return ma(a)},Ab=function(a,b,c){if("function"==typeof a.forEach)a.forEach(b,c);else if(ea(a)||p(a))La(a,b,c);else{var d;if("function"==typeof a.v)d=a.v();else if("function"!=typeof a.n)if(ea(a)||p(a)){d=[];for(var e=a.length,f=0;f<e;f++)d.push(f)}else d=na(a);else d=void 0;for(var e=zb(a),f=e.length,g=0;g<f;g++)b.call(c,e[g],d&&d[g],a)}};var Cb=function(a){return Bb(a||arguments.callee.caller,[])},Bb=function(a,b){var c=[];if(0<=Ka(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(Db(a)+"(");for(var d=a.arguments,e=0;d&&e<d.length;e++){0<e&&c.push(", ");var f;f=d[e];switch(typeof f){case "object":f=f?"object":"null";break;case "string":break;case "number":f=String(f);break;case "boolean":f=f?"true":"false";break;case "function":f=(f=Db(f))?f:"[fn]";break;default:f=typeof f}40<f.length&&(f=f.substr(0,40)+"...");
c.push(f)}b.push(a);c.push(")\n");try{c.push(Bb(a.caller,b))}catch(g){c.push("[exception trying to get caller]\n")}}else a?c.push("[...long stack...]"):c.push("[end]");return c.join("")},Db=function(a){if(Eb[a])return Eb[a];a=String(a);if(!Eb[a]){var b=/function ([^\(]+)/.exec(a);Eb[a]=b?b[1]:"[Anonymous]"}return Eb[a]},Eb={};var Fb=function(a,b,c,d,e){this.reset(a,b,c,d,e)};Fb.prototype.Aa=null;Fb.prototype.za=null;var Gb=0;Fb.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Gb++;d||ha();this.N=a;this.Ra=b;delete this.Aa;delete this.za};Fb.prototype.Ca=function(a){this.N=a};var Hb=function(a){this.B=a;this.ya=this.qa=this.N=this.Y=null},Ib=function(a,b){this.name=a;this.value=b};Ib.prototype.toString=function(){return this.name};var Jb=new Ib("SEVERE",1E3),Kb=new Ib("CONFIG",700),Lb=new Ib("FINE",500);Hb.prototype.getParent=function(){return this.Y};Hb.prototype.Ca=function(a){this.N=a};var Mb=function(a){if(a.N)return a.N;if(a.Y)return Mb(a.Y);Ja("Root logger has no level set.");return null};
Hb.prototype.log=function(a,b,c){if(a.value>=Mb(this).value)for(r(b)&&(b=b()),a=this.Va(a,b,c),b="log:"+a.Ra,k.console&&(k.console.timeStamp?k.console.timeStamp(b):k.console.markTimeline&&k.console.markTimeline(b)),k.msWriteProfilerMark&&k.msWriteProfilerMark(b),b=this;b;){c=b;var d=a;if(c.ya)for(var e=0,f=void 0;f=c.ya[e];e++)f(d);b=b.getParent()}};
Hb.prototype.Va=function(a,b,c){var d=new Fb(a,String(b),this.B);if(c){d.Aa=c;var e;var f=arguments.callee.caller;try{var g;var l;e:{for(var w=["window","location","href"],C=k,z;z=w.shift();)if(null!=C[z])C=C[z];else{l=null;break e}l=C}if(p(c))g={message:c,name:"Unknown error",lineNumber:"Not available",fileName:l,stack:"Not available"};else{var $,ba,w=!1;try{$=c.lineNumber||c.wb||"Not available"}catch(we){$="Not available",w=!0}try{ba=c.fileName||c.filename||c.sourceURL||k.$googDebugFname||l}catch(xe){ba=
"Not available",w=!0}g=!w&&c.lineNumber&&c.fileName&&c.stack&&c.message&&c.name?c:{message:c.message||"Not available",name:c.name||"UnknownError",lineNumber:$,fileName:ba,stack:c.stack||"Not available"}}e="Message: "+Ga(g.message)+'\nUrl: <a href="view-source:'+g.fileName+'" target="_new">'+g.fileName+"</a>\nLine: "+g.lineNumber+"\n\nBrowser stack:\n"+Ga(g.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+Ga(Cb(f)+"-> ")}catch(ge){e="Exception trying to expose exception! You win, we lose. "+ge}d.za=e}return d};
var Nb={},Ob=null,Pb=function(a){Ob||(Ob=new Hb(""),Nb[""]=Ob,Ob.Ca(Kb));var b;if(!(b=Nb[a])){b=new Hb(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Pb(a.substr(0,c));c.qa||(c.qa={});c.qa[d]=b;b.Y=c;Nb[a]=b}return b};var E=function(a,b){a&&a.log(Lb,b,void 0)};var Qb=function(a,b,c){if(r(a))c&&(a=t(a,c));else if(a&&"function"==typeof a.handleEvent)a=t(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:k.setTimeout(a,b||0)};var Rb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),Sb=db,Tb=function(a,b){if(Sb){Sb=!1;var c=k.location;if(c){var d=c.href;if(d&&(d=(d=Tb(3,d))&&decodeURIComponent(d))&&d!=c.hostname)throw Sb=!0,Error();}}return b.match(Rb)[a]||null};var Ub=function(){};Ub.prototype.Fa=null;Ub.prototype.K=function(){var a;(a=this.Fa)||(a={},Vb(this)&&(a[0]=!0,a[1]=!0),a=this.Fa=a);return a};var Wb=function(a,b){this.Ya=a;this.Xa=b};v(Wb,Ub);Wb.prototype.ca=function(){return this.Ya()};Wb.prototype.K=function(){return this.Xa()};var F=function(){return F.Ba.ca()};F.Wa=!1;F.K=function(){return F.Ba.K()};F.Cb=function(a,b){F.Ia(new Wb(y(a),y(b)))};F.Ia=function(a){F.Ba=a};var Xb=function(){};v(Xb,Ub);Xb.prototype.ca=function(){var a=Vb(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var Vb=function(a){if(F.Wa)return"";if(!a.Ea&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.Ea=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Ea};F.Ia(new Xb);var G=function(a){tb.call(this);this.headers=new D;this.T=a||null;this.r=!1;this.P=this.a=null;this.J=this.sa=this.Q="";this.w=this.aa=this.O=this.ba=!1;this.D=0;this.R=null;this.ta="";this.S=this.Ka=!1};v(G,tb);var Yb=G.prototype,Zb=Pb("goog.net.XhrIo");Yb.j=Zb;var $b=/^https?$/i,ac=["POST","PUT"],bc=[],dc=function(a,b,c,d){var e=cc,f=new G;bc.push(f);b&&(ub(f),f.C.add("complete",b,!1,void 0,void 0));f.C.add("ready",f.Ta,!0,void 0,void 0);e&&(f.D=Math.max(0,e));f.send(a,c,d,{"Content-Type":"application/x-www-form-urlencoded"})};
G.prototype.Ta=function(){this.Ga();Oa(bc,this)};
G.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Q+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Q=a;this.J="";this.sa=b;this.ba=!1;this.r=!0;this.a=this.T?this.T.ca():F();this.P=this.T?this.T.K():F.K();this.a.onreadystatechange=t(this.ua,this);try{E(this.j,ec(this,"Opening Xhr")),this.aa=!0,this.a.open(b,String(a),!0),this.aa=!1}catch(e){E(this.j,ec(this,"Error opening Xhr: "+e.message));fc(this,e);return}a=c||"";var f=this.headers.I();
d&&Ab(d,function(a,b){f.set(b,a)});d=Na(f.v());c=k.FormData&&a instanceof k.FormData;!(0<=Ka(ac,b))||d||c||f.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");Ab(f,function(a,b){this.a.setRequestHeader(b,a)},this);this.ta&&(this.a.responseType=this.ta);"withCredentials"in this.a&&(this.a.withCredentials=this.Ka);try{gc(this),0<this.D&&(this.S=hc(this.a),E(this.j,ec(this,"Will abort after "+this.D+"ms if incomplete, xhr2 "+this.S)),this.S?(this.a.timeout=this.D,this.a.ontimeout=
t(this.va,this)):this.R=Qb(this.va,this.D,this)),E(this.j,ec(this,"Sending request")),this.O=!0,this.a.send(a),this.O=!1}catch(g){E(this.j,ec(this,"Send error: "+g.message)),fc(this,g)}};var hc=function(a){return bb&&nb(9)&&q(a.timeout)&&m(a.ontimeout)},Ma=function(a){return"content-type"==a.toLowerCase()};G.prototype.va=function(){"undefined"!=typeof aa&&this.a&&(this.J="Timed out after "+this.D+"ms, aborting",E(this.j,ec(this,this.J)),this.dispatchEvent("timeout"),this.abort(8))};
var fc=function(a,b){a.r=!1;a.a&&(a.w=!0,a.a.abort(),a.w=!1);a.J=b;ic(a);jc(a)},ic=function(a){a.ba||(a.ba=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};G.prototype.abort=function(){this.a&&this.r&&(E(this.j,ec(this,"Aborting")),this.r=!1,this.w=!0,this.a.abort(),this.w=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),jc(this))};G.prototype.F=function(){this.a&&(this.r&&(this.r=!1,this.w=!0,this.a.abort(),this.w=!1),jc(this,!0));G.A.F.call(this)};
G.prototype.ua=function(){this.ra||(this.aa||this.O||this.w?kc(this):this.Qa())};G.prototype.Qa=function(){kc(this)};
var kc=function(a){if(a.r&&"undefined"!=typeof aa)if(a.P[1]&&4==lc(a)&&2==mc(a))E(a.j,ec(a,"Local request error detected and ignored"));else if(a.O&&4==lc(a))Qb(a.ua,0,a);else if(a.dispatchEvent("readystatechange"),4==lc(a)){E(a.j,ec(a,"Request complete"));a.r=!1;try{var b=mc(a),c,d;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:d=!0;break t;default:d=!1}if(!(c=d)){var e;if(e=0===b){var f=Tb(1,String(a.Q));if(!f&&self.location)var g=self.location.protocol,f=g.substr(0,
g.length-1);e=!$b.test(f?f.toLowerCase():"")}c=e}if(c)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var l;try{l=2<lc(a)?a.a.statusText:""}catch(w){E(a.j,"Can not get status: "+w.message),l=""}a.J=l+" ["+mc(a)+"]";ic(a)}}finally{jc(a)}}},jc=function(a,b){if(a.a){gc(a);var c=a.a,d=a.P[0]?ca:null;a.a=null;a.P=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.j)&&c.log(Jb,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},gc=function(a){a.a&&
a.S&&(a.a.ontimeout=null);q(a.R)&&(k.clearTimeout(a.R),a.R=null)},lc=function(a){return a.a?a.a.readyState:0},mc=function(a){try{return 2<lc(a)?a.a.status:-1}catch(b){return-1}},ec=function(a,b){return b+" ["+a.sa+" "+a.Q+" "+mc(a)+"]"};var nc=function(a,b,c){this.o=a||null;this.Ua=!!c},pc=function(a){if(!a.d&&(a.d=new D,a.l=0,a.o))for(var b=a.o.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null,f=null;0<=d?(e=b[c].substring(0,d),f=b[c].substring(d+1)):e=b[c];e=decodeURIComponent(e.replace(/\+/g," "));e=oc(a,e);a.add(e,f?decodeURIComponent(f.replace(/\+/g," ")):"")}};h=nc.prototype;h.d=null;h.l=null;h.add=function(a,b){pc(this);this.o=null;a=oc(this,a);var c=this.d.get(a);c||this.d.set(a,c=[]);c.push(b);this.l++;return this};
h.W=function(a){pc(this);a=oc(this,a);return this.d.W(a)};h.v=function(){pc(this);for(var a=this.d.n(),b=this.d.v(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};h.n=function(a){pc(this);var b=[];if(p(a))this.W(a)&&(b=Pa(b,this.d.get(oc(this,a))));else{a=this.d.n();for(var c=0;c<a.length;c++)b=Pa(b,a[c])}return b};h.set=function(a,b){pc(this);this.o=null;a=oc(this,a);this.W(a)&&(this.l-=this.d.get(a).length);this.d.set(a,[b]);this.l++;return this};
h.get=function(a,b){var c=a?this.n(a):[];return 0<c.length?String(c[0]):b};h.toString=function(){if(this.o)return this.o;if(!this.d)return"";for(var a=[],b=this.d.v(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.n(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.o=a.join("&")};h.I=function(){var a=new nc;a.o=this.o;this.d&&(a.d=this.d.I(),a.l=this.l);return a};
var oc=function(a,b){var c=String(b);a.Ua&&(c=c.toLowerCase());return c};var qc=null,rc=null,sc=!1,cc=0,tc={yb:"CANCEL",Bb:"UPDATE"},uc=function(a,b){null!=a?qc=a:sc||(qc="/api");null!=b?rc=b:sc||(rc="https://earthengine.googleapis.com");sc=!0};u("ee.data.setDeadline",function(a){cc=a});u("ee.data.getTileBaseUrl",function(){return rc});u("ee.data.getInfo",function(a,b){k.console&&k.console.error&&k.console.error("ee.data.getInfo is DEPRECATED. Use ee.data.getValue() instead.");return H("/info",(new nc).add("id",a),b)});
u("ee.data.getList",function(a,b){var c=I(a);return H("/list",c,b)});var vc=function(a,b){a=x(a);a.json_format="v2";return H("/mapid",I(a),b)};u("ee.data.getMapId",vc);u("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[rc,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});var wc=function(a,b){a=x(a);a.json_format="v2";return H("/value",I(a),b)};u("ee.data.getValue",wc);
var xc=function(a,b){a=x(a);a.json_format="v2";n(a.size)&&(a.size=a.size.join("x"));var c=I(a).add("getid","1");return H("/thumb",c,b)};u("ee.data.getThumbId",xc);var yc=function(a){return rc+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};u("ee.data.makeThumbUrl",yc);var zc=function(a,b){a=x(a);a.json_format="v2";return H("/download",I(a),b)};u("ee.data.getDownloadId",zc);var Ac=function(a){return rc+"/api/download?docid="+a.docid+"&token="+a.token};u("ee.data.makeDownloadUrl",Ac);
u("ee.data.createAsset",function(a,b,c){a={value:a,json_format:"v2"};void 0!==b&&(a.id=b);return H("/create",I(a),c)});u("ee.data.newTaskId",function(a,b){var c={};q(a)&&(c.count=a);return H("/newtaskid",I(c),b)});u("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid task_id: expected a string or an array of strings.");return H("/taskstatus?q="+a.join(),null,b,"GET")});u("ee.data.getTaskList",function(a){return H("/tasklist",null,a,"GET")});
u("ee.data.cancelTask",function(a,b){return Bc(a,"CANCEL",b)});var Bc=function(a,b,c){if(p(a))a=[a];else if(!n(a))throw Error("Invalid task_id: expected a string or an array of strings.");var d;t:{for(d in tc)if(tc[d]==b){d=!0;break t}d=!1}if(!d)throw Error("Invalid action: "+b);return H("/updatetask",I({id:a,action:b}),c,"POST")};u("ee.data.updateTask",Bc);u("ee.data.prepareValue",function(a,b,c){b=x(b);b.tid=a;return H("/prepare",I(b),c)});
u("ee.data.startProcessing",function(a,b,c){b=x(b);b.id=a;return H("/processingrequest",I(b),c)});
var H=function(a,b,c,d){function e(a,b){var c=!1;try{var d=sa(a),e=d.data}catch(f){c=!0}var ba=void 0;c||!("data"in d||"error"in d)?ba="Malformed response: "+a:"error"in d&&(ba=d.error.message);if(b)b(e,ba);else{if(!ba)return e;throw Error(ba);}}uc();d=d||"POST";a=qc+a;b=b?b.toString():"";if(c)dc(a,function(a){var b;a=a.target;try{b=a.a?a.a.responseText:""}catch(d){E(a.j,"Can not get responseText: "+d.message),b=""}return e(b,c)},d,b);else{var f=F();f.open(d,a,!1);f.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");f.send(b);return e(f.responseText,null)}},I=function(a){var b=new nc,c;for(c in a)b.set(c,a[c]);return b};var Cc=function(){};var Dc=function(){this.p=-1};var Ec=function(){this.p=-1;this.p=64;this.c=Array(4);this.Oa=Array(this.p);this.X=this.L=0;this.reset()};v(Ec,Dc);Ec.prototype.reset=function(){this.c[0]=1732584193;this.c[1]=4023233417;this.c[2]=2562383102;this.c[3]=271733878;this.X=this.L=0};
var Fc=function(a,b,c){c||(c=0);var d=Array(16);if(p(b))for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.c[0];c=a.c[1];var e=a.c[2],f=a.c[3],g=0,g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&
(f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>>20);g=
e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295|
g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295|
g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295|
g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^
b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295;
f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+
(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295;
c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.c[0]=a.c[0]+b&4294967295;a.c[1]=a.c[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.c[2]=a.c[2]+e&4294967295;a.c[3]=a.c[3]+f&4294967295};
Ec.prototype.update=function(a,b){m(b)||(b=a.length);for(var c=b-this.p,d=this.Oa,e=this.L,f=0;f<b;){if(0==e)for(;f<=c;)Fc(this,a,f),f+=this.p;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.p){Fc(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.p){Fc(this,d);e=0;break}}this.L=e;this.X+=b};
var Hc=function(){var a=Gc,b=Array((56>a.L?a.p:2*a.p)-a.L);b[0]=128;for(var c=1;c<b.length-8;++c)b[c]=0;for(var d=8*a.X,c=b.length-8;c<b.length;++c)b[c]=d&255,d/=256;a.update(b);b=Array(16);for(c=d=0;4>c;++c)for(var e=0;32>e;e+=8)b[d++]=a.c[c]>>>e&255;return b};var Ic=function(a){this.U="__ee_hash__";this.ha=!1!==a;this.G=[];this.s={}};u("ee.Serializer",Ic);var Jc=new ta,Gc=new Ec,Lc=function(a){return Kc(new Ic(!0),a)};u("ee.Serializer.encode",Lc);var Mc=function(a){return Jc.g(Lc(a))};u("ee.Serializer.toJSON",Mc);var Nc=function(a){a=Kc(new Ic(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Jc.g(a)};u("ee.Serializer.toReadableJSON",Nc);
var Kc=function(a,b){var c=a.V(b);if(a.ha){c=s(c)&&"ValueRef"==c.type&&1==a.G.length?a.G[0][1]:{type:"CompoundValue",scope:a.G,value:c};a.G=[];for(var d in a.s)delete a.s[d].object[a.U];a.s={}}return c};
Ic.prototype.V=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b,c=s(a)?a[this.U]:null;if(this.ha&&null!=c&&this.s[c])return{type:"ValueRef",value:this.s[c].name};if(null===a||"boolean"==typeof a||q(a)||p(a))return a;if(s(a)&&"function"==typeof a.getFullYear)return{type:"Date",value:Math.floor(1E3*a.getTime())};if(a instanceof Cc){if(b=a.e(t(this.V,this)),!s(b)||"ArgumentRef"==b.type)return b}else if(n(a))b=B(a,function(a){return this.V(a)},this);else if(s(a)&&!r(a))b=la(a,
function(a){if(!r(a))return this.V(a)},this),oa(b,this.U),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.ha){Gc.reset();Gc.update(Jc.g(b));var c=Hc(),d;this.s[c]?d=this.s[c].name:(d=String(this.G.length),this.G.push([d,b]),this.s[c]={name:d,object:a});a[this.U]=c;return{type:"ValueRef",value:d}}return b};var J=function(a,b){if(!(this instanceof J))return new J(a,b);this.b=a;this.h=b};v(J,Cc);u("ee.ComputedObject",J);J.prototype.i=function(a){return wc({json:this.g()},a)};u("ee.ComputedObject.prototype.getInfo",J.prototype.i);J.prototype.e=function(a){var b={},c;for(c in this.h)m(this.h[c])&&(b[c]=a(this.h[c]));b={type:"Invocation",arguments:b};a=a(this.b);b[p(a)?"functionName":"function"]=a;return b};J.prototype.g=function(){return Mc(this)};u("ee.ComputedObject.prototype.serialize",J.prototype.g);
J.prototype.toString=function(){return"ee."+this.name()+"("+Nc(this)+")"};u("ee.ComputedObject.prototype.toString",J.prototype.toString);J.prototype.name=function(){return"ComputedObject"};var Oc=function(a,b){return b instanceof a.constructor?b:new a.constructor(b)};var K=function(){if(!(this instanceof K))return new K};v(K,Cc);u("ee.Function",K);var Pc=function(a){return a};K.prototype.call=function(a){return this.apply(Qc(this,Array.prototype.slice.call(arguments,0)))};u("ee.Function.prototype.call",K.prototype.call);
K.prototype.apply=function(a){for(var b=J,c=this.q().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in a&&m(a[g]))d[g]=Pc(a[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+g+") missing to function: "+this);e[g]=!0}var c=[],l;for(l in a)e[l]||c.push(l);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+this);return Pc(new b(this,d),this.q().returns)};u("ee.Function.prototype.apply",K.prototype.apply);
var Qc=function(a,b){var c=a.q().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);for(var d={},e=0;e<b.length;e++)d[c[e].name]=b[e];return d};
K.prototype.toString=function(a,b){var c=this.q(),d=[];d.push(a||c.name);d.push("(");d.push(B(c.args.slice(1),function(a){return a.name}).join(", "));d.push(")\n");c.description&&(d.push("\n"),d.push(c.description),d.push("\n"));if(c.args.length){d.push("\nArgs:\n");for(var e=0;e<c.args.length;e++){b&&0==e?d.push(" this:"):d.push("\n ");var f=c.args[e];d.push(f.name);d.push(" (");d.push(f.type);f.optional&&d.push(", optional");d.push("): ");d.push(f.description)}}return d.join("")};
K.prototype.g=function(){return Mc(this)};var Rc={},Sc=function(a){return a in Rc?Rc[a]:null};u("ee.Types.nameToClass",Sc);var Tc=function(a){return a.prototype instanceof J?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"};u("ee.Types.classToName",Tc);
var Uc=function(a,b){if(b==a)return!0;switch(a){case "Element":case "EEObject":return"EEObject"==b||"Element"==b||"Image"==b||"Feature"==b||"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "FeatureCollection":case "Collection":return"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "Object":return!0;default:return!1}},Wc=function(a){return q(a)||Vc(a,Number)},Xc=function(a){return p(a)||Vc(a,String)},Vc=function(a,b){if(a instanceof Cc){var c=a.__EE_VAR_TYPE;return c&&
(c==b||c.prototype instanceof b)}return!1},Yc=function(a){return s(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var L=function(a,b){if(!m(b))return Zc(a);if(!(this instanceof L))return new L(a,b);this.H=pa(b);this.H.name=a};v(L,K);u("ee.ApiFunction",L);var M=function(a,b){return K.prototype.call.apply(Zc(a),Array.prototype.slice.call(arguments,1))};u("ee.ApiFunction._call",M);var $c=function(a,b){return Zc(a).apply(b)};u("ee.ApiFunction._apply",$c);L.prototype.e=function(){return this.H.name};L.prototype.q=function(){return this.H};
var ja=null,ad={},cd=function(){bd();return la(ja,function(a){return a.q()})},dd=function(){bd();return ka(function(a,b){return!ad[b]})},Zc=function(a){bd();var b=ja[a];if(!b)throw Error("Unknown built-in function name: "+a);return b};u("ee.ApiFunction.lookup",Zc);
var bd=function(a,b){if(ja)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(ja=la(c,function(a,b){a.returns=a.returns.replace(/<.*>/,"");for(var c=0;c<a.args.length;c++)a.args[c].type=a.args[c].type.replace(/<.*>/,"");return new L(b,a)}),a&&a())};a?H("/algorithms",null,c,"GET"):c(H("/algorithms",null,void 0,"GET"))}},N=function(a,b,c,d){bd();var e=d||"";ia(ja,function(d,g){var l=g.split(".");if(2==l.length&&l[0]==b){var w=e+l[1],C=d.q();ad[g]=!0;var z=!1;C.args.length&&(l=C.args[0].type,z="Object"!=
l&&Uc(l,c));l=z?a.prototype:a;w in l&&(w+="_");l[w]=function(a){var b=Array.prototype.slice.call(arguments,0);if(1==b.length&&Yc(b[0])){if(b=x(b[0]),z){var c=C.args[0].name;if(c in b)throw Error("Named args for "+w+" can't contain keyword "+c);b[c]=this}}else b=Qc(d,z?[this].concat(b):b);return d.apply(b)};l[w].toString=t(d.toString,d,w,z);l[w].signature=C}})},O=function(a){var b=function(a){for(var b in a)r(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var ed=function(a,b){if(!(this instanceof ed))return new ed(a,b);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e];c.push(fd(Sc(f.type),f.name))}this.Da=b.apply(null,c);this.H=gd(a,c,this.Da)};v(ed,K);u("ee.CustomFunction",ed);ed.prototype.e=function(a){return{type:"Function",argumentNames:B(this.H.args,function(a){return a.name}),body:a(this.Da)}};ed.prototype.q=function(){return this.H};
var fd=function(a,b){var c=function(){};a=a||Object;c.prototype=a.prototype instanceof Cc?a.prototype:Cc.prototype;c=new c;c.B=b;c.e=function(){return{type:"ArgumentRef",value:this.B}};c.__EE_VAR_TYPE=a;return c},gd=function(a,b,c){for(var d=[],e=0;e<b.length;e++)null===b[e].B&&d.push(e);if(0==d.length)return a;var f=function(a){var b=0;s(a)&&!r(a)&&("ArgumentRef"!=a.type||null===a.value?ia(a,function(a){b+=f(a)}):b++);return b},e=Lc(c);c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],
l=c+e;b[g].B=l;a.args[g].name=l}return a};var P=function(a,b){J.call(this,a,b);hd()};v(P,J);u("ee.Element",P);var id=!1,hd=function(){id||(N(P,"Element","Element"),id=!0)};P.prototype.name=function(){return"Element"};
P.prototype.set=function(a){var b=this;if(1>=arguments.length){var c=arguments[0];if(!s(c))throw Error("When Element.set() is passed one argument, it must be a dictionary.");var d;if(d=Yc(c)){t:{d=na(c);var e=["properties"];if(ea(d)&&ea(e)&&d.length==e.length){for(var f=d.length,g=0;g<f;g++)if(d[g]!==e[g]){d=!1;break t}d=!0}else d=!1}d=d&&Yc(c.properties)}d&&(c=c.properties);try{for(var l in c)var w=c[l],b=M("Element.set",b,l,w)}catch(C){b=M("Feature.set",b,c)}}else{if(0!=arguments.length%2)throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");
try{for(d=0;d<arguments.length;d+=2)l=arguments[d],w=arguments[d+1],b=M("Element.set",b,l,w)}catch(z){c={};for(d=0;d<arguments.length;d+=2)l=arguments[d],w=arguments[d+1],c[l]=w;b=M("Feature.set",b,c)}}return Oc(this,b)};u("ee.Element.prototype.set",P.prototype.set);var Q=function(a){if(!(this instanceof Q))return new Q(a);if(a instanceof Q)return a;jd();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new Q(a[0]);J.call(this,new L("Filter.and"),{filters:a});this.M=a}else if(a instanceof J)J.call(this,a.b,a.h),this.M=[a];else{if(m(a))throw Error("Invalid argument specified for ee.Filter(): "+a);J.call(this,null,null);this.M=[]}};v(Q,J);u("ee.Filter",Q);
var kd=!1,jd=function(){kd||(N(Q,"Filter","Filter"),kd=!0)},ld={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};Q.prototype.length=function(){return this.M.length};Q.prototype.length=Q.prototype.length;var R=function(a,b){var c=a.M.slice(0);b instanceof Q?Qa(c,b.M):b instanceof Array?Qa(c,b):c.push(b);return new Q(c)};Q.prototype.u=function(){return M("Filter.not",this)};Q.prototype.not=Q.prototype.u;
var md=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in ld))throw Error("Unknown filtering operator: "+b);a=M("Filter."+ld[b],a,c);return d?a.u():a};Q.metadata=md;var nd=function(a,b){return M("Filter.equals",a,b)};Q.eq=nd;var od=function(a,b){return nd(a,b).u()};Q.neq=od;var pd=function(a,b){return M("Filter.lessThan",a,b)};Q.lt=pd;var qd=function(a,b){return pd(a,b).u()};Q.gte=qd;var rd=function(a,b){return M("Filter.greaterThan",a,b)};
Q.gt=rd;var sd=function(a,b){return rd(a,b).u()};Q.lte=sd;var td=function(a,b){return M("Filter.stringContains",a,b)};Q.contains=td;var ud=function(a,b){return td(a,b).u()};Q.not_contains=ud;var vd=function(a,b){return M("Filter.stringStartsWith",a,b)};Q.starts_with=vd;var wd=function(a,b){return vd(a,b).u()};Q.not_starts_with=wd;var xd=function(a,b){return M("Filter.stringEndsWith",a,b)};Q.ends_with=xd;var yd=function(a,b){return xd(a,b).u()};Q.not_ends_with=yd;
var zd=function(a){return M("Filter.and",Array.prototype.slice.call(arguments))};Q.and=zd;Q.or=function(a){return M("Filter.or",Array.prototype.slice.call(arguments))};var Ad=function(a,b){m(b)||(b=0xffffffffffff);var c=M("DateRange",a,b);return $c("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};Q.date=Ad;var Bd=function(a,b,c,d){return $c("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};Q.inList=Bd;
var Cd=function(a,b){return $c("Filter.intersects",{leftField:".all",rightValue:M("Feature",a),maxError:b})};Q.bounds=Cd;Q.prototype.eb=function(){return R(this,nd.apply(null,[].slice.call(arguments)))};Q.prototype.eq=Q.prototype.eb;Q.prototype.rb=function(){return R(this,od.apply(null,[].slice.call(arguments)))};Q.prototype.neq=Q.prototype.rb;Q.prototype.pb=function(){return R(this,pd.apply(null,[].slice.call(arguments)))};Q.prototype.lt=Q.prototype.pb;
Q.prototype.mb=function(){return R(this,qd.apply(null,[].slice.call(arguments)))};Q.prototype.gte=Q.prototype.mb;Q.prototype.lb=function(){return R(this,rd.apply(null,[].slice.call(arguments)))};Q.prototype.gt=Q.prototype.lb;Q.prototype.qb=function(){return R(this,sd.apply(null,[].slice.call(arguments)))};Q.prototype.lte=Q.prototype.qb;Q.prototype.contains=function(){return R(this,td.apply(null,[].slice.call(arguments)))};Q.prototype.contains=Q.prototype.contains;
Q.prototype.sb=function(){return R(this,ud.apply(null,[].slice.call(arguments)))};Q.prototype.not_contains=Q.prototype.sb;Q.prototype.vb=function(){return R(this,vd.apply(null,[].slice.call(arguments)))};Q.prototype.starts_with=Q.prototype.vb;Q.prototype.ub=function(){return R(this,wd.apply(null,[].slice.call(arguments)))};Q.prototype.not_starts_with=Q.prototype.ub;Q.prototype.cb=function(){return R(this,xd.apply(null,[].slice.call(arguments)))};Q.prototype.ends_with=Q.prototype.cb;
Q.prototype.tb=function(){return R(this,yd.apply(null,[].slice.call(arguments)))};Q.prototype.not_ends_with=Q.prototype.tb;Q.prototype.$a=function(){return R(this,zd.apply(null,[].slice.call(arguments)))};Q.prototype.and=Q.prototype.$a;Q.prototype.bb=function(){return R(this,Ad.apply(null,[].slice.call(arguments)))};Q.prototype.date=Q.prototype.bb;Q.prototype.nb=function(){return R(this,Bd.apply(null,[].slice.call(arguments)))};Q.prototype.inList=Q.prototype.nb;
Q.prototype.ab=function(){return R(this,Cd.apply(null,[].slice.call(arguments)))};Q.prototype.bounds=Q.prototype.ab;Q.prototype.name=function(){return"Filter"};var S=function(a,b){P.call(this,a,b);Dd()};v(S,P);u("ee.Collection",S);var Ed=!1,Dd=function(){Ed||(N(S,"Collection","Collection"),N(S,"AggregateFeatureCollection","Collection","aggregate_"),Ed=!0)};S.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Oc(this,M("Collection.filter",this,a))};u("ee.Collection.prototype.filter",S.prototype.filter);S.prototype.ib=function(a,b,c){return this.filter(md(a,b,c))};u("ee.Collection.prototype.filterMetadata",S.prototype.ib);
S.prototype.gb=function(a){return this.filter(Cd(a))};u("ee.Collection.prototype.filterBounds",S.prototype.gb);S.prototype.hb=function(a,b){return this.filter(Ad(a,b))};u("ee.Collection.prototype.filterDate",S.prototype.hb);S.prototype.ob=function(a,b,c){return Oc(this,M("Collection.limit",this,a,b,c))};u("ee.Collection.prototype.limit",S.prototype.ob);S.prototype.sort=function(a,b){return Oc(this,M("Collection.limit",this,void 0,a,b))};u("ee.Collection.prototype.sort",S.prototype.sort);
S.prototype.name=function(){return"Collection"};var Fd=function(a,b,c){if(!r(c))throw Error("Can't map non-callable object: "+c);b={name:"",returns:"Object",args:[{name:null,type:Tc(b)}]};return Oc(a,$c("Collection.map",{collection:a,baseAlgorithm:new ed(b,c)}))};S.prototype.map=function(a){return Fd(this,J,a)};u("ee.Collection.prototype.map",S.prototype.map);var Gd=function(a,b){if(!(this instanceof Gd))return new Gd(a,b);if(a instanceof Gd)return a;Hd();var c=new L("Date"),d={};if(Xc(a)){if(d.value=a,b)if(Xc(b))d.timeZone=b;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+b);}else if(Wc(a)||Vc(a,Object))d.value=a;else if(s(a)&&"function"==typeof a.getFullYear)d.value=Math.floor(a.getTime());else if(a instanceof J)"Date"!=a.b?d.value=a:(c=a.b,d=a.h);else throw Error("Invalid argument specified for ee.Date(): "+a);J.call(this,c,
d)};v(Gd,J);u("ee.Date",Gd);var Id=!1,Hd=function(){Id||(N(Gd,"Date","Date"),Id=!0)};Gd.prototype.name=function(){return"Date"};var T=function(a,b,c){if(!(this instanceof T))return new T(a,b,c);Jd();var d=null!=b||null!=c;if(a instanceof J&&Boolean(a.b)){if(d)throw Error("Setting the CRS or geodesic on a computed Geometry is not suported. Use Geometry.transform().");J.call(this,a.b,a.h)}else{a instanceof T&&(a=a.e());if(3<arguments.length)throw Error("The Geometry constructor takes at most 3 arguments ("+arguments.length+" given)");if(!Kd(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));J.call(this,null,null);
this.da=a.type;this.La=a.coordinates||null;this.Ma=a.geometries||null;if(null!=b)this.fa=b;else if("crs"in a)if(s(a.crs)&&"name"==a.crs.type&&s(a.crs.properties)&&p(a.crs.properties.name))this.fa=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new ta).g(a.crs));this.ea=c;!m(c)&&"geodesic"in a&&(this.ea=Boolean(a.geodesic))}};v(T,J);u("ee.Geometry",T);
var Ld=!1,Jd=function(){Ld||(N(T,"Geometry","Geometry"),Ld=!0)},Md=function(a,b){if(!(this instanceof Md))return Nd(Md,arguments);if(2<arguments.length)throw Error("The Geometry.Point constructor takes at most 2 arguments ("+arguments.length+" given)");if(1==arguments.length&&n(arguments[0])&&2==arguments[0].length){var c=arguments[0];a=c[0];b=c[1]}T.call(this,{type:"Point",coordinates:[a,b]})};v(Md,T);T.Point=Md;
var Od=function(a){if(!(this instanceof Od))return Nd(Od,arguments);T.call(this,{type:"MultiPoint",coordinates:Pd(a,2,arguments)})};v(Od,T);T.MultiPoint=Od;var Qd=function(a,b,c,d){if(!(this instanceof Qd))return new Qd(a,b,c,d);if(4<arguments.length)throw Error("The Geometry.Rectangle constructor takes at most 4 arguments ("+arguments.length+" given)");if(n(a)){var e=a;a=e[0];b=e[1];c=e[2];d=e[3]}T.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]})};v(Qd,T);T.Rectangle=Qd;
var Rd=function(a){if(!(this instanceof Rd))return Nd(Rd,arguments);T.call(this,{type:"LineString",coordinates:Pd(a,2,arguments)})};v(Rd,T);T.LineString=Rd;var Sd=function(a){if(!(this instanceof Sd))return Nd(Sd,arguments);T.call(this,{type:"LinearRing",coordinates:Pd(a,2,arguments)})};v(Sd,T);T.LinearRing=Sd;var Td=function(a){if(!(this instanceof Td))return Nd(Td,arguments);T.call(this,{type:"MultiLineString",coordinates:Pd(a,3,arguments)})};v(Td,T);T.MultiLineString=Td;
var Ud=function(a){if(!(this instanceof Ud))return Nd(Ud,arguments);T.call(this,{type:"Polygon",coordinates:Pd(a,3,arguments)})};v(Ud,T);T.Polygon=Ud;var Vd=function(a){if(!(this instanceof Vd))return Nd(Vd,arguments);T.call(this,{type:"MultiPolygon",coordinates:Pd(a,4,arguments)})};v(Vd,T);T.MultiPolygon=Vd;
T.prototype.e=function(a){if(this.b){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return J.prototype.e.call(this,a)}a={type:this.da};"GeometryCollection"==this.da?a.geometries=this.Ma:a.coordinates=this.La;null!=this.fa&&(a.crs={type:"name",properties:{name:this.fa}});null!=this.ea&&(a.geodesic=this.ea);return a};T.prototype.xa=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.e()};
T.prototype.toGeoJSON=T.prototype.xa;T.prototype.Ja=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new ta).g(this.xa())};T.prototype.toGeoJSONString=T.prototype.Ja;T.prototype.type=function(){if(this.b)throw Error("Can't get the type of a computed Geometry to GeoJSON. Use getInfo() instead.");return this.da};T.prototype.type=T.prototype.type;T.prototype.g=function(){return Mc(this)};T.prototype.serialize=T.prototype.g;
T.prototype.toString=function(){return"ee.Geometry("+this.Ja()+")"};
var Kd=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!n(b))return!1;for(a=0;a<b.length;a++)if(!Kd(b[a]))return!1;return!0}a=Wd(a.coordinates);return"Point"==b&&1==a||"MultiPoint"==b&&2==a||"LineString"==b&&2==a||"LinearRing"==b&&2==a||"MultiLineString"==b&&3==a||"Polygon"==b&&3==a||"MultiPolygon"==b&&4==a},Wd=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=Wd(a[0]),c=1;c<a.length;c++)if(Wd(a[c])!=b)return-1;return b+1}for(c=0;c<a.length;c++)if(!q(a[c]))return-1;return 0==
a.length%2?1:-1},Pd=function(a,b,c){if(2>b||4<b)throw Error("Unexpected nesting level.");if(!n(a)&&c&&(a=Array.prototype.slice.call(c),"number"==typeof a[0])){if(0!=a.length%2)throw Error("Invalid number of coordinates: "+a.length);c=[];for(var d=0;d<a.length;d+=2)c.push([a[d],a[d+1]]);a=c}c=a;for(d=0;n(c);)c=c[0],d++;for(;d<b;)a=[a],d++;if(Wd(a)!=b)throw Error("Invalid geometry");return a},Nd=function(a,b){var c=function(){};c.prototype=a.prototype;var c=new c,d=a.apply(c,b);return void 0!==d?d:
c};T.prototype.name=function(){return"Geometry"};u("ee.Deserializer",function(){});u("ee.Deserializer.fromJSON",function(a){return Xd(sa(a))});var Xd=function(a){var b={};if(s(a)&&"CompoundValue"==a.type){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],f=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=Yd(f,b)}a=a.value}return Yd(a,b)};u("ee.Deserializer.decode",Xd);
var Yd=function(a,b){if(null===a||q(a)||"boolean"==typeof a||p(a))return a;if(n(a))return B(a,function(a){return Yd(a,b)});if(!s(a)||r(a))throw Error("Cannot decode object: "+a);var c=a.type;switch(c){case "ValueRef":if(a.value in b)return b[a.value];throw Error("Unknown ValueRef: "+a);case "ArgumentRef":c=a.value;if(!p(c))throw Error("Invalid variable name: "+c);return fd(Object,c);case "Date":c=a.value;if(!q(c))throw Error("Invalid date value: "+c);return new Date(c/1E3);case "Bytes":return c=new Cc,
c.e=function(){return a},c;case "Invocation":var c="functionName"in a?Zc(a.functionName):Yd(a["function"],b),d=la(a.arguments,function(a){return Yd(a,b)});if(c instanceof K)return c.apply(d);if(c instanceof J)return new J(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return la(a.value,function(a){return Yd(a,b)});case "Function":var e=Yd(a.body,b),c={name:"",args:B(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new ed(c,
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new T(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var U=function(a,b){if(!(this instanceof U))return new U(a,b);if(a instanceof U){if(b)throw Error("Can't create Feature out of a Feature and properties.");return a}if(2<arguments.length)throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");Zd();if(a instanceof T||null===a)P.call(this,new L("Feature"),{geometry:a,metadata:b||null});else{if(Vc(a,Object))return fd(U,a.B);a instanceof J?P.call(this,a.b,a.h):"Feature"==a.type?P.call(this,new L("Feature"),{geometry:new T(a.geometry),
metadata:a.properties||null}):P.call(this,new L("Feature"),{geometry:new T(a),metadata:b||null})}};v(U,P);u("ee.Feature",U);var $d=!1,Zd=function(){$d||(N(U,"Feature","Feature"),$d=!0)};U.prototype.i=function(a){return U.A.i.call(this,a)};U.prototype.getInfo=U.prototype.i;U.prototype.k=function(a,b){return M("Collection",[this]).k(a,b)};U.prototype.getMap=U.prototype.k;U.Point=function(a,b){return Md.apply(null,arguments)};U.MultiPoint=function(a){return Od.apply(null,arguments)};
U.Rectangle=function(a,b,c,d){return new Qd(a,b,c,d)};U.LineString=function(a){return Rd.apply(null,arguments)};U.LinearRing=function(a){return Sd.apply(null,arguments)};U.MultiLine=function(a){return Td.apply(null,arguments)};U.Polygon=function(a){return Ud.apply(null,arguments)};U.MultiPolygon=function(a){return Vd.apply(null,arguments)};U.prototype.name=function(){return"Feature"};var V=function(a,b){if(!(this instanceof V))return new V(a,b);if(a instanceof V)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");ae();a instanceof T&&(a=new U(a));a instanceof U&&(a=[a]);if(Wc(a)||Xc(a)){var c={tableId:a};b&&(c.geometryColumn=b);S.call(this,new L("Collection.loadTable"),c)}else if(n(a))S.call(this,new L("Collection"),{features:B(a,function(a){return new U(a)})});else if(a instanceof J)S.call(this,
a.b,a.h);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};v(V,S);u("ee.FeatureCollection",V);var be=!1,ae=function(){be||(N(V,"FeatureCollection","FeatureCollection"),be=!0)};V.prototype.k=function(a,b){var c=$c("Collection.draw",{collection:this,color:(a||{}).color||"000000"});if(b)c.k(null,b);else return c.k()};V.prototype.getMap=V.prototype.k;V.prototype.i=function(a){return V.A.i.call(this,a)};V.prototype.getInfo=V.prototype.i;
V.prototype.map=function(a){return Fd(this,U,a)};V.prototype.name=function(){return"FeatureCollection"};var W=function(a){if(!(this instanceof W))return new W(a);if(a instanceof W)return a;ce();var b=arguments.length;if(0==b||1==b&&!m(a))P.call(this,new L("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(Wc(a))P.call(this,new L("Image.constant"),{value:a});else if(Xc(a))P.call(this,new L("Image.load"),{id:a});else{if(n(a))return de(B(a,function(a){return new W(a)}));if(Vc(a,Object))return fd(W,a.B);if(a instanceof J)P.call(this,a.b,a.h);else throw Error("Unrecognized argument type to convert to an Image: "+
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(Xc(b)&&Wc(c))P.call(this,new L("Image.load"),{id:b,version:c});else throw Error("Unrecognized argument types to convert to an Image: "+arguments);}else throw Error("The Image constructor takes at most 2 arguments ("+b+" given)");};v(W,P);u("ee.Image",W);var fe=!1,ce=function(){fe||(N(W,"Image","Image"),N(W,"Window","Image","focal_"),fe=!0)};W.prototype.i=function(a){return W.A.i.call(this,a)};W.prototype.getInfo=W.prototype.i;
W.prototype.k=function(a,b){var c=a?x(a):{};c.image=this.g();if(b)vc(c,t(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=vc(c),c.image=this,c};W.prototype.getMap=W.prototype.k;W.prototype.jb=function(a,b){var c=a?x(a):{};c.image=this.g();if(b)zc(c,function(a,c){a?b(Ac(a)):b(null,c)});else return Ac(zc(c))};W.prototype.getDownloadURL=W.prototype.jb;W.prototype.kb=function(a){a=a?x(a):{};a.image=this.g();return yc(xc(a))};W.prototype.getThumbURL=W.prototype.kb;
W.rgb=function(a,b,c){return de([a,b,c],["vis-red","vis-green","vis-blue"])};W.cat=function(a){return de(Array.prototype.slice.call(arguments),null)};var de=function(a,b){if(0==a.length)throw Error("Can't combine 0 images.");for(var c=new W(a[0]),d=1;d<a.length;d++)c=M("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
W.prototype.select=function(a,b){var c={input:this,bandSelectors:a};if(n(a))b&&(c.newNames=b);else{a=Array.prototype.slice.call(arguments);for(var d=0;d<a.length;d++)if(!p(a[d])&&!q(a[d]))throw Error("Illegal argument to select(): "+a[d]);c.bandSelectors=a}return $c("Image.select",c)};W.prototype.select=W.prototype.select;
W.prototype.fb=function(a,b){var c=M("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE"),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(b)for(var f in b)d.push(f),e[f]=new W(b[f]);f=new K;f.e=function(a){return c.e(a)};f.q=function(){return{name:"",args:B(d,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return f.apply(e)};W.prototype.expression=W.prototype.fb;W.prototype.clip=function(a){try{a=new T(a)}catch(b){}return M("Image.clip",this,a)};
W.prototype.clip=W.prototype.clip;W.prototype.name=function(){return"Image"};var X=function(a){if(!(this instanceof X))return new X(a);if(a instanceof X)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");he();a instanceof W&&(a=[a]);if(Xc(a))S.call(this,new L("ImageCollection.load"),{id:a});else if(n(a))S.call(this,new L("ImageCollection.fromImages"),{images:B(a,function(a){return new W(a)})});else if(a instanceof J)S.call(this,a.b,a.h);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+
a);};v(X,S);u("ee.ImageCollection",X);var ie=!1,he=function(){ie||(N(X,"ImageCollection","ImageCollection"),N(X,"reduce","ImageCollection"),ie=!0)};X.prototype.k=function(a,b){var c=M("ImageCollection.mosaic",this);if(b)c.k(a,b);else return c.k(a)};X.prototype.getMap=X.prototype.k;X.prototype.i=function(a){return X.A.i.call(this,a)};X.prototype.getInfo=X.prototype.i;X.prototype.map=function(a){return Fd(this,W,a)};
X.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"ImageCollection"};var Y=function(a){if(!(this instanceof Y))return new Y(a);if(a instanceof Y)return a;je();if(q(a))J.call(this,null,null),this.ma=a;else if(a instanceof J)J.call(this,a.b,a.h),this.ma=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};v(Y,J);u("ee.Number",Y);var ke=!1,je=function(){ke||(N(Y,"Number","Number"),ke=!0)};Y.prototype.e=function(a){return q(this.ma)?this.ma:Y.A.e.call(this,a)};Y.prototype.name=function(){return"Number"};var Z=function(a){if(!(this instanceof Z))return new Z(a);if(a instanceof Z)return a;le();if(p(a))J.call(this,null,null);else if(a instanceof J)J.call(this,a.b,a.h);else throw Error("Invalid argument specified for ee.String(): "+a);this.oa=a};v(Z,J);u("ee.String",Z);var me=!1,le=function(){me||(N(Z,"String","String"),me=!0)};Z.prototype.e=function(a){return p(this.oa)?this.oa:this.oa.e(a)};Z.prototype.name=function(){return"String"};u("ee.initialize",function(a,b,c,d){if("ready"!=ne||a||b){var e=null!=c;if(d)if(e)oe.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==ne&&e)pe.push(c);else if(ne="loading",uc(a,b),e)pe.push(c),bd(qe,re);else try{bd(),qe()}catch(f){throw re(f),f;}}else c&&c()});
u("ee.reset",function(){ne="not_ready";rc=qc=null;sc=!1;ja=null;ad={};O(Gd);Id=!1;O(P);id=!1;O(W);fe=!1;O(U);$d=!1;O(S);Ed=!1;O(X);ie=!1;O(V);be=!1;O(Q);kd=!1;O(T);Ld=!1;O(Y);ke=!1;O(Z);me=!1;for(var a=k.ee,b=0;b<se.length;b++){var c=se[b];O(a[c]);delete a[c]}se=[];Rc=a;var a=te,d;for(d in a)delete a[d]});u("ee.InitState",{zb:"not_ready",LOADING:"loading",Ab:"ready"});u("ee.InitState.NOT_READY","not_ready");u("ee.InitState.LOADING","loading");u("ee.InitState.READY","ready");
var ne="not_ready",pe=[],oe=[];u("ee.TILE_SIZE",256);var se=[],te={};u("ee.Algorithms",te);u("ee.call",function(a,b){p(a)&&(a=new L(a));return K.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))});u("ee.apply",function(a,b){p(a)&&(a=new L(a));return a.apply(b)});
var qe=function(){if("loading"==ne){try{Hd();hd();ce();Zd();Dd();he();ae();jd();Jd();je();le();var a=cd(),b={},c={},d;for(d in a){b[-1!=d.indexOf(".")?d.slice(0,d.indexOf(".")):d]=!0;var e=a[d].returns.replace(/<.*>/,"");c[e]=!0}var a=["List"],f;for(f in a)b[f]&&delete b[f];var g=k.ee,l;for(l in b)l in c&&!(l in g)&&(g[l]=ue(l),se.push(l));Rc=g;ve()}catch(w){re(w);return}ne="ready";for(oe=[];0<pe.length;)pe.shift()()}},re=function(a){if("loading"==ne)for(ne="not_ready",pe=[];0<oe.length;)oe.shift()(a)},
ve=function(){ia(dd(),function(a,b){var c=a.q();if(!c.hidden){for(var d=b.split("."),e=te;1<d.length;){var f=d[0];f in e||(e[f]={signature:{}});e=e[f];d=Ra(d,1)}f=t(a.call,a);f.signature=c;f.toString=t(a.toString,a);e[d[0]]=f}})},ue=function(a){var b=function(b){var d=Array.prototype.slice.apply(arguments);d[0]instanceof J&&1==d.length?d=d[0]:(d.unshift(a),d=M.apply(null,d));var e=k.ee;if(this instanceof e[a])J.call(this,d.b,d.h);else return new e[a](d)};v(b,J);N(b,a,a);return b},Pc=function(a,b){if(null===
a)return null;if(m(a)){var c=k.ee;switch(b){case "Image":return new W(a);case "Feature":return a instanceof S?M("Feature",M("Collection.geometry",a)):new U(a);case "Element":case "EEObject":if(a instanceof P)return a;if(a instanceof J)return new P(a.b,a.h);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof V?M("Collection.geometry",a):new T(a);case "FeatureCollection":case "Collection":return a instanceof S?a:new V(a);case "ImageCollection":return new X(a);case "Filter":return new Q(a);
case "Algorithm":return p(a)?new L(a):a;case "Dictionary":return b in c?a instanceof c[b]?a:a instanceof J?new c[b](a):a:a;case "String":return Xc(a)||a instanceof Z||a instanceof J||Vc(a,Z)?new Z(a):a;case "List":return a;default:if(b in c&&a){if(a instanceof c[b])return a;if(p(a)){if(!(a in c[b]))throw Error("Unknown algorithm: "+b+"."+a);return c[b][a].call()}return new c[b](a)}return a}}};})();
//@ sourceMappingURL=ee_api_js.sourcemap