2013-10-14 14:36:02 -07:00

115 lines
60 KiB
JavaScript

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