mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
117 lines
61 KiB
JavaScript
117 lines
61 KiB
JavaScript
(function() {var h,ba=ba||{},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.B=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Vb=function(a,c,g){var f=Array.prototype.slice.call(arguments,2);return b.prototype[c].apply(a,f)}};
|
|
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]},w=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.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))};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")},Fa=function(a){if(!Aa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ba,"&"));-1!=a.indexOf("<")&&(a=a.replace(Ca,"<"));-1!=a.indexOf(">")&&(a=a.replace(Da,">"));-1!=a.indexOf('"')&&(a=a.replace(Ea,"""));return a},Ba=/&/g,Ca=/</g,Da=/>/g,Ea=/\"/g,Aa=/[&<>\"]/,Ga=function(a,b){return a<b?-1:a>b?1:0};var Ha=function(a,b){b.unshift(a);ya.call(this,za.apply(null,b));b.shift()};v(Ha,ya);Ha.prototype.name="AssertionError";var y=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 Ha(""+e,g||[]);}return a},Ia=function(a,b){throw new Ha("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var z=Array.prototype,Ja=z.indexOf?function(a,b,c){y(null!=a.length);return z.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=z.forEach?function(a,b,c){y(null!=a.length);z.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)},C=z.map?function(a,b,c){y(null!=a.length);return z.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)y(null!=a.length),z.splice.call(a,c,1);return d},Oa=function(a){return z.concat.apply(z,arguments)},Pa=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 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){y(null!=a.length);return 2>=arguments.length?z.slice.call(a,b):z.slice.call(a,b,c)},Sa=function(a){var b=["properties"];if(!ea(a)||!ea(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={},D=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 A=x.exec(f)||["","",""],Z=B.exec(l)||["","",""];if(0==A[0].length&&0==Z[0].length)break;b=Ga(0==A[1].length?0:parseInt(A[1],10),0==Z[1].length?0:parseInt(Z[1],10))||Ga(0==A[2].length,
|
|
0==Z[2].length)||Ga(A[2],Z[2])}while(0==b)}b=nb[a]=0<=b}return b};cb&&D("9");!eb||D("528");db&&D("1.9b")||cb&&D("8")||bb&&D("9.5")||eb&&D("528");db&&!D("8")||cb&&D("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 tb=function(){this.C=new sb(this);this.ib=this};v(tb,Ta);tb.prototype[ob]=!0;tb.prototype.sa=null;
|
|
tb.prototype.dispatchEvent=function(a){ub(this);var b,c=this.sa;if(c){b=[];for(var d=1;c;c=c.sa)b.push(c),y(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=vb(g,d,!0,a)&&e;a.ca||(g=a.currentTarget=c,e=vb(g,d,!0,a)&&e,a.ca||(e=vb(g,d,!1,a)&&e));if(b)for(f=0;!a.ca&&f<b.length;f++)g=a.currentTarget=b[f],e=vb(g,d,!1,a)&&e;return e};
|
|
tb.prototype.G=function(){tb.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 vb=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,A=l.type;A in B.n&&Na(B.n[A],l)&&(rb(l),0==B.n[A].length&&(delete B.n[A],B.ka--))}e=!1!==f.call(x,d)&&e}}return e&&!1!=d.$a},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.ob=function(){return this};var E=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 E?(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])}};E.prototype.o=function(){yb(this);for(var a=[],b=0;b<this.g.length;b++)a.push(this.u[this.g[b]]);return a};E.prototype.w=function(){yb(this);return this.g.concat()};
|
|
E.prototype.Y=function(a){return Object.prototype.hasOwnProperty.call(this.u,a)};var yb=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}};E.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.u,a)?this.u[a]:b};
|
|
E.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.u,a)||(this.m++,this.g.push(a),this.ma++);this.u[a]=b};E.prototype.J=function(){return new E(this)};E.prototype.ob=function(a){yb(this);var b=0,c=this.g,d=this.u,e=this.ma,g=this,f=new xb;f.next=function(){for(;;){if(e!=g.ma)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw wb;var f=c[b++];return a?f:d[f]}};return f};var zb=function(a){if("function"==typeof a.o)return a.o();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))Ka(a,b,c);else{var d;if("function"==typeof a.w)d=a.w();else if("function"!=typeof a.o)if(ea(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=zb(a),g=e.length,f=0;f<g;f++)b.call(c,e[f],d&&d[f],a)}};var Cb=function(a){return Bb(a||arguments.callee.caller,[])},Bb=function(a,b){var c=[];if(0<=Ja(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(Db(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=Db(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(Bb(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("")},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.Ha=null;Fb.prototype.Ga=null;var Gb=0;Fb.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Gb++;d||ha();this.P=a;this.gb=b;delete this.Ha;delete this.Ga};Fb.prototype.Oa=function(a){this.P=a};var F=function(a){this.O=a};F.prototype.ba=null;F.prototype.P=null;F.prototype.ya=null;F.prototype.Qa=null;var Hb=function(a,b){this.name=a;this.value=b};Hb.prototype.toString=function(){return this.name};var Ib=new Hb("SEVERE",1E3),Jb=new Hb("WARNING",900),Kb=new Hb("CONFIG",700),Lb=new Hb("FINE",500);F.prototype.getParent=function(){return this.ba};F.prototype.Oa=function(a){this.P=a};var Mb=function(a){if(a.P)return a.P;if(a.ba)return Mb(a.ba);Ia("Root logger has no level set.");return null};
|
|
F.prototype.log=function(a,b,c){if(a.value>=Mb(this).value)for(r(b)&&(b=b()),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()}};
|
|
F.prototype.kb=function(a,b,c){var d=new Fb(a,String(b),this.O);if(c){d.Ha=c;var e;var g=arguments.callee.caller;try{var f;var l;e:{for(var x=["window","location","href"],B=k,A;A=x.shift();)if(null!=B[A])B=B[A];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 Z,aa,x=!1;try{Z=c.lineNumber||c.Ub||"Not available"}catch(de){Z="Not available",x=!0}try{aa=c.fileName||c.filename||c.sourceURL||k.$googDebugFname||l}catch(fe){aa=
|
|
"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:Z,fileName:aa,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(Cb(g)+"-> ")}catch(Pd){e="Exception trying to expose exception! You win, we lose. "+Pd}d.Ga=e}return d};
|
|
var Nb={},Ob=null,Pb=function(a){Ob||(Ob=new F(""),Nb[""]=Ob,Ob.Oa(Kb));var b;if(!(b=Nb[a])){b=new F(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Pb(a.substr(0,c));c.ya||(c.ya={});c.ya[d]=b;b.ba=c;Nb[a]=b}return b};var G=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=eb,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.Sa=null;Ub.prototype.L=function(){var a;(a=this.Sa)||(a={},Vb(this)&&(a[0]=!0,a[1]=!0),a=this.Sa=a);return a};var Wb=function(a,b){this.nb=a;this.mb=b};v(Wb,Ub);Wb.prototype.ga=function(){return this.nb()};Wb.prototype.L=function(){return this.mb()};var H=function(){return H.Na.ga()};H.lb=!1;H.L=function(){return H.Na.L()};H.Yb=function(a,b){H.Wa(new Wb(y(a),y(b)))};H.Wa=function(a){H.Na=a};var Xb=function(){};v(Xb,Ub);Xb.prototype.ga=function(){var a=Vb(this);return a?new ActiveXObject(a):new XMLHttpRequest};
|
|
var Vb=function(a){if(H.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};H.Wa(new Xb);var I=function(a){tb.call(this);this.headers=new E;this.V=a||null;this.s=!1;this.R=this.a=null;this.K=this.Aa=this.S="";this.A=this.ea=this.Q=this.fa=!1;this.F=0;this.T=null;this.Ba="";this.U=this.za=!1};v(I,tb);var Yb=I.prototype,Zb=Pb("goog.net.XhrIo");Yb.i=Zb;var $b=/^https?$/i,ac=["POST","PUT"],bc=[],cc=function(a,b,c,d,e,g,f){var l=new I;bc.push(l);b&&(ub(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.za=f);l.send(a,c,d,e)};
|
|
I.prototype.hb=function(){this.Ta();Na(bc,this)};
|
|
I.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.Aa=b;this.fa=!1;this.s=!0;this.a=this.V?this.V.ga():H();this.R=this.V?this.V.L():H.L();this.a.onreadystatechange=t(this.Ca,this);try{G(this.i,dc(this,"Opening Xhr")),this.ea=!0,this.a.open(b,a,!0),this.ea=!1}catch(e){G(this.i,dc(this,"Error opening Xhr: "+e.message));ec(this,e);return}a=c||"";var g=this.headers.J();
|
|
d&&Ab(d,function(a,b){g.set(b,a)});d=Ma(g.w());c=k.FormData&&a instanceof k.FormData;!(0<=Ja(ac,b))||d||c||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");Ab(g,function(a,b){this.a.setRequestHeader(b,a)},this);this.Ba&&(this.a.responseType=this.Ba);"withCredentials"in this.a&&(this.a.withCredentials=this.za);try{fc(this),0<this.F&&(this.U=gc(this.a),G(this.i,dc(this,"Will abort after "+this.F+"ms if incomplete, xhr2 "+this.U)),this.U?(this.a.timeout=this.F,this.a.ontimeout=
|
|
t(this.Da,this)):this.T=Qb(this.Da,this.F,this)),G(this.i,dc(this,"Sending request")),this.Q=!0,this.a.send(a),this.Q=!1}catch(f){G(this.i,dc(this,"Send error: "+f.message)),ec(this,f)}};var gc=function(a){return cb&&D(9)&&q(a.timeout)&&m(a.ontimeout)},La=function(a){return"content-type"==a.toLowerCase()};I.prototype.Da=function(){"undefined"!=typeof ba&&this.a&&(this.K="Timed out after "+this.F+"ms, aborting",G(this.i,dc(this,this.K)),this.dispatchEvent("timeout"),this.abort(8))};
|
|
var ec=function(a,b){a.s=!1;a.a&&(a.A=!0,a.a.abort(),a.A=!1);a.K=b;hc(a);ic(a)},hc=function(a){a.fa||(a.fa=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};I.prototype.abort=function(){this.a&&this.s&&(G(this.i,dc(this,"Aborting")),this.s=!1,this.A=!0,this.a.abort(),this.A=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ic(this))};I.prototype.G=function(){this.a&&(this.s&&(this.s=!1,this.A=!0,this.a.abort(),this.A=!1),ic(this,!0));I.B.G.call(this)};
|
|
I.prototype.Ca=function(){this.ua||(this.ea||this.Q||this.A?jc(this):this.bb())};I.prototype.bb=function(){jc(this)};
|
|
var jc=function(a){if(a.s&&"undefined"!=typeof ba)if(a.R[1]&&4==kc(a)&&2==lc(a))G(a.i,dc(a,"Local request error detected and ignored"));else if(a.Q&&4==kc(a))Qb(a.Ca,0,a);else if(a.dispatchEvent("readystatechange"),4==kc(a)){G(a.i,dc(a,"Request complete"));a.s=!1;try{var b=lc(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=Tb(1,String(a.S));if(!g&&self.location)var f=self.location.protocol,g=f.substr(0,
|
|
f.length-1);e=!$b.test(g?g.toLowerCase():"")}c=e}if(c)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var l;try{l=2<kc(a)?a.a.statusText:""}catch(x){G(a.i,"Can not get status: "+x.message),l=""}a.K=l+" ["+lc(a)+"]";hc(a)}}finally{ic(a)}}},ic=function(a,b){if(a.a){fc(a);var c=a.a,d=a.R[0]?ca:null;a.a=null;a.R=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.i)&&c.log(Ib,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},fc=function(a){a.a&&
|
|
a.U&&(a.a.ontimeout=null);q(a.T)&&(k.clearTimeout(a.T),a.T=null)},kc=function(a){return a.a?a.a.readyState:0},lc=function(a){try{return 2<kc(a)?a.a.status:-1}catch(b){return(a=a.i)&&a.log(Jb,"Can not get status: "+b.message,void 0),-1}};I.prototype.Fa=function(){try{return this.a?this.a.responseText:""}catch(a){return G(this.i,"Can not get responseText: "+a.message),""}};var dc=function(a,b){return b+" ["+a.Aa+" "+a.S+" "+lc(a)+"]"};var mc=function(a,b,c){this.p=a||null;this.jb=!!c},oc=function(a){if(!a.c&&(a.c=new E,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=nc(a,e);a.add(e,g?decodeURIComponent(g.replace(/\+/g," ")):"")}};h=mc.prototype;h.c=null;h.m=null;h.add=function(a,b){oc(this);this.p=null;a=nc(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){oc(this);a=nc(this,a);return this.c.Y(a)};h.w=function(){oc(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){oc(this);var b=[];if(p(a))this.Y(a)&&(b=Oa(b,this.c.get(nc(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){oc(this);this.p=null;a=nc(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 mc;a.p=this.p;this.c&&(a.c=this.c.J(),a.m=this.m);return a};
|
|
var nc=function(a,b){var c=String(b);a.jb&&(c=c.toLowerCase());return c};var J={};u("ee.data",J);J.Z=null;J.D=null;J.aa=!1;J.La=0;J.cb="/api";J.eb="https://earthengine.googleapis.com";J.Ma=function(a,b){null!=a?J.Z=a:J.aa||(J.Z=J.cb);null!=b?J.D=b:J.aa||(J.D=J.eb);J.aa=!0};J.reset=function(){J.Z=null;J.D=null;J.aa=!1};J.Rb=function(a){J.La=a};J.setDeadline=J.Rb;J.Db=function(){return J.D};J.getTileBaseUrl=J.Db;
|
|
J.h=function(a,b){k.console&&k.console.error&&k.console.error("ee.data.getInfo is DEPRECATED. Use ee.data.getValue() instead.");return J.k("/info",(new mc).add("id",a),b)};J.getInfo=J.h;J.Ab=function(a,b){var c=J.q(a);return J.k("/list",c,b)};J.getList=J.Ab;J.xa=function(a,b){a=w(a);a.json_format="v2";return J.k("/mapid",J.q(a),b)};J.getMapId=J.xa;J.Eb=function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[J.D,"map",a.mapid,d,b,c].join("/")+"?token="+a.token};J.getTileUrl=J.Eb;
|
|
J.Ka=function(a,b){a=w(a);a.json_format="v2";return J.k("/value",J.q(a),b)};J.getValue=J.Ka;J.Ia=function(a,b){a=w(a);a.json_format="v2";n(a.size)&&(a.size=a.size.join("x"));var c=J.q(a).add("getid","1");return J.k("/thumb",c,b)};J.getThumbId=J.Ia;J.Ja=function(a){return J.D+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};J.makeThumbUrl=J.Ja;J.va=function(a,b){a=w(a);a.json_format="v2";return J.k("/download",J.q(a),b)};J.getDownloadId=J.va;
|
|
J.wa=function(a){return J.D+"/api/download?docid="+a.docid+"&token="+a.token};J.makeDownloadUrl=J.wa;J.Ua=function(a){return J.k("/algorithms",null,a,"GET")};J.rb=function(a,b,c){a={value:a,json_format:"v2"};void 0!==b&&(a.id=b);return J.k("/create",J.q(a),c)};u("ee.data.createAsset",J.rb);J.Mb=function(a,b){var c={};q(a)&&(c.count=a);return J.k("/newtaskid",J.q(c),b)};u("ee.data.newTaskId",J.Mb);
|
|
J.Bb=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 J.k("/taskstatus?q="+a.join(),null,b,"GET")};u("ee.data.getTaskStatus",J.Bb);J.Qb=function(a,b,c){b=w(b);b.tid=a;return J.k("/prepare",J.q(b),c)};u("ee.data.prepareValue",J.Qb);J.Sb=function(a,b,c){b=w(b);b.id=a;return J.k("/processingrequest",J.q(b),c)};u("ee.data.startProcessing",J.Sb);
|
|
J.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 aa=void 0;c||!("data"in d||"error"in d)?aa="Malformed response: "+a:"error"in d&&(aa=d.error.message);if(b)b(e,aa);else{if(!aa)return e;throw Error(aa);}}J.Ma();d=d||"POST";a=J.Z+a;b=b?b.toString():"";if(c)cc(a,function(a){return e(a.target.Fa(),c)},d,b,{"Content-Type":"application/x-www-form-urlencoded"},J.La);else{var g=H();g.open(d,a,!1);g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
|
|
g.send(b);return e(g.responseText,null)}};J.q=function(a){var b=new mc,c;for(c in a)b.set(c,a[c]);return b};
|
|
J.Zb=function(a){var b=a?w(a):{};cc=function(a,c,g,f){var l=new function(){};l.target={};l.target.Fa=function(){return a in b?p(b[a])?b[a]:b[a](a,c,g,f):'{"error": {}}'};setTimeout(t(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}})};
|
|
H=function(){return new c}};var pc=function(){};var qc=function(){};var rc=function(){this.b=Array(4);this.ab=Array(64);this.$=this.M=0;this.reset()};v(rc,qc);rc.prototype.reset=function(){this.b[0]=1732584193;this.b[1]=4023233417;this.b[2]=2562383102;this.b[3]=271733878;this.$=this.M=0};
|
|
var sc=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};
|
|
rc.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;)sc(this,a,g),g+=64;if(p(a))for(;g<b;){if(d[e++]=a.charCodeAt(g++),64==e){sc(this,d);e=0;break}}else for(;g<b;)if(d[e++]=a[g++],64==e){sc(this,d);e=0;break}}this.M=e;this.$+=b};
|
|
var uc=function(){var a=tc,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 vc=function(a){this.W="__ee_hash__";this.la=!1!==a;this.H=[];this.t={}};u("ee.Serializer",vc);var wc=new ta,tc=new rc,yc=function(a){return xc(new vc(!0),a)};u("ee.Serializer.encode",yc);var zc=function(a){return wc.e(yc(a))};u("ee.Serializer.toJSON",zc);var Ac=function(a){a=xc(new vc(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):wc.e(a)};u("ee.Serializer.toReadableJSON",Ac);
|
|
var xc=function(a,b){var c=a.X(b);if(a.la){c=s(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};
|
|
vc.prototype.X=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b,c=s(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(s(a)&&"function"==typeof a.getFullYear)return{type:"Date",value:Math.floor(1E3*a.getTime())};if(a instanceof pc){if(b=a.d(t(this.X,this)),!s(b)||"ArgumentRef"==b.type)return b}else if(n(a))b=C(a,function(a){return this.X(a)},this);else if(s(a)&&!r(a))b=la(a,
|
|
function(a){if(!r(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){tc.reset();tc.update(wc.e(b));var c=uc(),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 K=function(a,b){if(!(this instanceof K))return new K(a,b);this.f=a;this.j=b};v(K,pc);u("ee.ComputedObject",K);K.prototype.h=function(a){return J.Ka({json:this.e()},a)};u("ee.ComputedObject.prototype.getInfo",K.prototype.h);K.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};K.prototype.e=function(){return zc(this)};u("ee.ComputedObject.prototype.serialize",K.prototype.e);
|
|
K.prototype.toString=function(){return"ee."+this.name()+"("+Ac(this)+")"};u("ee.ComputedObject.prototype.toString",K.prototype.toString);K.prototype.name=function(){return"ComputedObject"};var L=function(){if(!(this instanceof L))return new L};v(L,pc);u("ee.Function",L);var Bc=function(a){return a};L.prototype.call=function(a){return this.apply(Cc(this,Array.prototype.slice.call(arguments,0)))};u("ee.Function.prototype.call",L.prototype.call);L.prototype.apply=function(a){a=new K(this,Dc(this,a));return Bc(a,this.r().returns)};u("ee.Function.prototype.apply",L.prototype.apply);
|
|
var Dc=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]=Bc(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},Cc=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(C(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 zc(this)};var Ec={},Fc=function(a){return a in Ec?Ec[a]:null};u("ee.Types.nameToClass",Fc);var Gc=function(a){return a.prototype instanceof K?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"};u("ee.Types.classToName",Gc);
|
|
var Hc=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}},Jc=function(a){return p(a)||Ic(a,String)},Ic=function(a,b){if(a instanceof pc){var c=a.__EE_VAR_TYPE;return c&&(c==b||c.prototype instanceof
|
|
b)}return!1},Kc=function(a){return s(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var M=function(a,b){if(!m(b))return Lc(a);if(!(this instanceof M))return new M(a,b);this.I=pa(b);this.I.name=a};v(M,L);u("ee.ApiFunction",M);var N=function(a,b){return L.prototype.call.apply(Lc(a),Array.prototype.slice.call(arguments,1))};u("ee.ApiFunction._call",N);var Mc=function(a,b){return Lc(a).apply(b)};u("ee.ApiFunction._apply",Mc);M.prototype.d=function(){return this.I.name};M.prototype.r=function(){return this.I};
|
|
var ja=null,Nc={},Pc=function(){Oc();return la(ja,function(a){return a.r()})},Qc=function(){Oc();return ka(function(a,b){return!Nc[b]})},Lc=function(a){Oc();var b=ja[a];if(!b)throw Error("Unknown built-in function name: "+a);return b};u("ee.ApiFunction.lookup",Lc);
|
|
var Oc=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?J.Ua(c):c(J.Ua())}},O=function(a,b,c,d){Oc();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();Nc[f]=!0;var A=!1;B.args.length&&(l=B.args[0].type,A="Object"!=l&&Hc(l,c));l=A?a.prototype:a;x in l&&(x+="_");l[x]=function(a){var b=
|
|
Array.prototype.slice.call(arguments,0);if(1==b.length&&Kc(b[0])){if(b=w(b[0]),A){var c=B.args[0].name;if(c in b)throw Error("Named args for "+x+" can't contain keyword "+c);b[c]=this}}else b=Cc(d,A?[this].concat(b):b);return d.apply(b)};l[x].toString=t(d.toString,d,x,A);l[x].signature=B}})},P=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 Rc=function(a,b){if(!(this instanceof Rc))return new Rc(a,b);for(var c=[],d=a.args,e=0;e<d.length;e++){var g=d[e];c.push(Sc(Fc(g.type),g.name))}this.Pa=b.apply(null,c);this.I=Tc(a,c,this.Pa)};v(Rc,L);u("ee.CustomFunction",Rc);Rc.prototype.d=function(a){return{type:"Function",argumentNames:C(this.I.args,function(a){return a.name}),body:a(this.Pa)}};Rc.prototype.r=function(){return this.I};
|
|
var Sc=function(a,b){var c=function(){};a=a||Object;c.prototype=a.prototype instanceof pc?a.prototype:pc.prototype;c=new c;c.O=b;c.d=function(){return{type:"ArgumentRef",value:this.O}};c.__EE_VAR_TYPE=a;return c},Tc=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;s(a)&&!r(a)&&("ArgumentRef"!=a.type||null===a.value?ia(a,function(a){b+=g(a)}):b++);return b},e=yc(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;Uc();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new Q(a[0]);K.call(this,new M("Filter.and"),{filters:a});this.N=a}else if(a instanceof K)K.call(this,a.f,a.j),this.N=[a];else{if(m(a))throw Error("Invalid argument specified for ee.Filter(): "+a);K.call(this,null,null);this.N=[]}};v(Q,K);u("ee.Filter",Q);
|
|
var Vc=!1,Uc=function(){Vc||(O(Q,"Filter","Filter"),Vc=!0)},Wc={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 Xc=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in Wc))throw Error("Unknown filtering operator: "+b);a=N("Filter."+Wc[b],a,c);return d?a.v():a};Q.metadata=Xc;var Yc=function(a,b){return N("Filter.equals",a,b)};Q.eq=Yc;var Zc=function(a,b){return Yc(a,b).v()};Q.neq=Zc;var $c=function(a,b){return N("Filter.lessThan",a,b)};Q.lt=$c;var ad=function(a,b){return $c(a,b).v()};Q.gte=ad;var bd=function(a,b){return N("Filter.greaterThan",a,b)};
|
|
Q.gt=bd;var cd=function(a,b){return bd(a,b).v()};Q.lte=cd;var dd=function(a,b){return N("Filter.stringContains",a,b)};Q.contains=dd;var ed=function(a,b){return dd(a,b).v()};Q.not_contains=ed;var fd=function(a,b){return N("Filter.stringStartsWith",a,b)};Q.starts_with=fd;var gd=function(a,b){return fd(a,b).v()};Q.not_starts_with=gd;var hd=function(a,b){return N("Filter.stringEndsWith",a,b)};Q.ends_with=hd;var id=function(a,b){return hd(a,b).v()};Q.not_ends_with=id;
|
|
var jd=function(a){var b=Array.prototype.slice.call(arguments);return N("Filter.and",b)};Q.and=jd;Q.or=function(a){var b=Array.prototype.slice.call(arguments);return N("Filter.or",b)};var kd=function(a,b){m(b)||(b=0xffffffffffff);var c=N("DateRange",a,b);return Mc("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};Q.date=kd;var ld=function(a,b,c,d){return Mc("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};Q.inList=ld;
|
|
var md=function(a,b){return Mc("Filter.intersects",{leftField:".all",rightValue:N("Feature",a),maxError:b})};Q.bounds=md;Q.prototype.ub=function(){return R(this,Yc.apply(null,[].slice.call(arguments)))};Q.prototype.eq=Q.prototype.ub;Q.prototype.Lb=function(){return R(this,Zc.apply(null,[].slice.call(arguments)))};Q.prototype.neq=Q.prototype.Lb;Q.prototype.Jb=function(){return R(this,$c.apply(null,[].slice.call(arguments)))};Q.prototype.lt=Q.prototype.Jb;
|
|
Q.prototype.Gb=function(){return R(this,ad.apply(null,[].slice.call(arguments)))};Q.prototype.gte=Q.prototype.Gb;Q.prototype.Fb=function(){return R(this,bd.apply(null,[].slice.call(arguments)))};Q.prototype.gt=Q.prototype.Fb;Q.prototype.Kb=function(){return R(this,cd.apply(null,[].slice.call(arguments)))};Q.prototype.lte=Q.prototype.Kb;Q.prototype.contains=function(){return R(this,dd.apply(null,[].slice.call(arguments)))};Q.prototype.contains=Q.prototype.contains;
|
|
Q.prototype.Nb=function(){return R(this,ed.apply(null,[].slice.call(arguments)))};Q.prototype.not_contains=Q.prototype.Nb;Q.prototype.Tb=function(){return R(this,fd.apply(null,[].slice.call(arguments)))};Q.prototype.starts_with=Q.prototype.Tb;Q.prototype.Pb=function(){return R(this,gd.apply(null,[].slice.call(arguments)))};Q.prototype.not_starts_with=Q.prototype.Pb;Q.prototype.tb=function(){return R(this,hd.apply(null,[].slice.call(arguments)))};Q.prototype.ends_with=Q.prototype.tb;
|
|
Q.prototype.Ob=function(){return R(this,id.apply(null,[].slice.call(arguments)))};Q.prototype.not_ends_with=Q.prototype.Ob;Q.prototype.pb=function(){return R(this,jd.apply(null,[].slice.call(arguments)))};Q.prototype.and=Q.prototype.pb;Q.prototype.sb=function(){return R(this,kd.apply(null,[].slice.call(arguments)))};Q.prototype.date=Q.prototype.sb;Q.prototype.Hb=function(){return R(this,ld.apply(null,[].slice.call(arguments)))};Q.prototype.inList=Q.prototype.Hb;
|
|
Q.prototype.qb=function(){return R(this,md.apply(null,[].slice.call(arguments)))};Q.prototype.bounds=Q.prototype.qb;Q.prototype.name=function(){return"Filter"};var S=function(a,b){K.call(this,a,b);nd()};v(S,K);u("ee.Collection",S);var od=!1,nd=function(){od||(O(S,"Collection","Collection"),O(S,"AggregateFeatureCollection","Collection","aggregate_"),od=!0)};S.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return pd(this,N("Collection.filter",this,a))};u("ee.Collection.prototype.filter",S.prototype.filter);S.prototype.yb=function(a,b,c){return this.filter(Xc(a,b,c))};u("ee.Collection.prototype.filterMetadata",S.prototype.yb);
|
|
S.prototype.wb=function(a){return this.filter(md(a))};u("ee.Collection.prototype.filterBounds",S.prototype.wb);S.prototype.xb=function(a,b){return this.filter(kd(a,b))};u("ee.Collection.prototype.filterDate",S.prototype.xb);S.prototype.Ib=function(a,b,c){return pd(this,N("Collection.limit",this,a,b,c))};u("ee.Collection.prototype.limit",S.prototype.Ib);S.prototype.sort=function(a,b){return pd(this,N("Collection.limit",this,void 0,a,b))};u("ee.Collection.prototype.sort",S.prototype.sort);
|
|
var pd=function(a,b){return b instanceof a.constructor?b:new a.constructor(b)};S.prototype.name=function(){return"Collection"};var qd=function(a,b,c){if(!r(c))throw Error("Can't map non-callable object: "+c);b={name:"",returns:"Object",args:[{name:null,type:Gc(b)}]};return pd(a,Mc("Collection.map",{collection:a,baseAlgorithm:new Rc(b,c)}))};S.prototype.map=function(a){return qd(this,K,a)};u("ee.Collection.prototype.map",S.prototype.map);var T=function(a,b,c){if(!(this instanceof T))return new T(a,b,c);rd();var d=null!=b||null!=c;if(a instanceof K&&Boolean(a.f)){if(d)throw Error("Setting the CRS or geodesic on a computed Geometry is not suported. Use Geometry.transform().");K.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(!sd(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));K.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(s(a.crs)&&"name"==a.crs.type&&s(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))}};v(T,K);u("ee.Geometry",T);
|
|
var td=!1,rd=function(){td||(O(T,"Geometry","Geometry"),td=!0)},ud=function(a,b){if(!(this instanceof ud))return vd(ud,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(ud,T);T.Point=ud;
|
|
var wd=function(a){if(!(this instanceof wd))return vd(wd,arguments);T.call(this,{type:"MultiPoint",coordinates:xd(a,2,arguments)})};v(wd,T);T.MultiPoint=wd;var yd=function(a,b,c,d){if(!(this instanceof yd))return new yd(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(yd,T);T.Rectangle=yd;
|
|
var zd=function(a){if(!(this instanceof zd))return vd(zd,arguments);T.call(this,{type:"LineString",coordinates:xd(a,2,arguments)})};v(zd,T);T.LineString=zd;var Ad=function(a){if(!(this instanceof Ad))return vd(Ad,arguments);T.call(this,{type:"LinearRing",coordinates:xd(a,2,arguments)})};v(Ad,T);T.LinearRing=Ad;var Bd=function(a){if(!(this instanceof Bd))return vd(Bd,arguments);T.call(this,{type:"MultiLineString",coordinates:xd(a,3,arguments)})};v(Bd,T);T.MultiLineString=Bd;
|
|
var Cd=function(a){if(!(this instanceof Cd))return vd(Cd,arguments);T.call(this,{type:"Polygon",coordinates:xd(a,3,arguments)})};v(Cd,T);T.Polygon=Cd;var Dd=function(a){if(!(this instanceof Dd))return vd(Dd,arguments);T.call(this,{type:"MultiPolygon",coordinates:xd(a,4,arguments)})};v(Dd,T);T.MultiPolygon=Dd;
|
|
T.prototype.d=function(a){if(this.f){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return K.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.Ea=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.Ea;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.Ea())};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 zc(this)};T.prototype.serialize=T.prototype.e;
|
|
T.prototype.toString=function(){return"ee.Geometry("+this.Xa()+")"};
|
|
var sd=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(!sd(b[a]))return!1;return!0}a=Ed(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},Ed=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=Ed(a[0]),c=1;c<a.length;c++)if(Ed(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},xd=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(Ed(a)!=b)throw Error("Invalid geometry");return a},vd=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 Fd(sa(a))});var Fd=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],g=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=Gd(g,b)}a=a.value}return Gd(a,b)};u("ee.Deserializer.decode",Fd);
|
|
var Gd=function(a,b){if(null===a||q(a)||"boolean"==typeof a||p(a))return a;if(n(a))return C(a,function(a){return Gd(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 Sc(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 pc,
|
|
c.d=function(){return a},c;case "Invocation":var c="functionName"in a?Lc(a.functionName):Gd(a["function"],b),d=la(a.arguments,function(a){return Gd(a,b)});if(c instanceof L)return c.apply(d);if(c instanceof K)return new K(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return la(a.value,function(a){return Gd(a,b)});case "Function":var e=Gd(a.body,b),c={name:"",args:C(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new Rc(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)");Hd();a instanceof T||null===a?K.call(this,new M("Feature"),{geometry:a,metadata:b||null}):a instanceof K?K.call(this,a.f,a.j):"Feature"==a.type?K.call(this,new M("Feature"),{geometry:new T(a.geometry),metadata:a.properties||
|
|
null}):K.call(this,new M("Feature"),{geometry:new T(a),metadata:b||null})};v(U,K);u("ee.Feature",U);var Id=!1,Hd=function(){Id||(O(U,"Feature","Feature"),Id=!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 ud.apply(null,arguments)};U.MultiPoint=function(a){return wd.apply(null,arguments)};
|
|
U.Rectangle=function(a,b,c,d){return new yd(a,b,c,d)};U.LineString=function(a){return zd.apply(null,arguments)};U.LinearRing=function(a){return Ad.apply(null,arguments)};U.MultiLine=function(a){return Bd.apply(null,arguments)};U.Polygon=function(a){return Cd.apply(null,arguments)};U.MultiPolygon=function(a){return Dd.apply(null,arguments)};
|
|
U.prototype.set=function(a){if(1!=arguments.length||!s(a))throw Error("Feature.set() takes only one argument (a dictionary).");Kc(a)&&Sa(na(a))&&Kc(a.properties)&&(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)");Jd();a instanceof T&&(a=new U(a));a instanceof U&&(a=[a]);if(q(a)||Ic(a,Number)||Jc(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:C(a,function(a){return new U(a)})});else if(a instanceof
|
|
K)S.call(this,a.f,a.j);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};v(V,S);u("ee.FeatureCollection",V);var Kd=!1,Jd=function(){Kd||(O(V,"FeatureCollection","FeatureCollection"),Kd=!0)};V.prototype.l=function(a,b){var c=Mc("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 qd(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;Ld();var b=arguments.length;if(0==b||1==b&&!m(a))K.call(this,new M("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(q(a)||Ic(a,Number))K.call(this,new M("Image.constant"),{value:a});else if(Jc(a))K.call(this,new M("Image.load"),{id:a});else{if(n(a))return Md(C(a,function(a){return new W(a)}));if(a instanceof K)K.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(Jc(b)&&(q(c)||Ic(c,Number)))K.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)");};v(W,K);u("ee.Image",W);var Nd=!1,Ld=function(){Nd||(O(W,"Image","Image"),O(W,"Window","Image","focal_"),Nd=!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?w(a):{};c.image=this.e();if(b)J.xa(c,t(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=J.xa(c),c.image=this,c};W.prototype.getMap=W.prototype.l;W.prototype.zb=function(a,b){var c=a?w(a):{};c.image=this.e();if(b)J.va(c,function(a,c){a?b(J.wa(a)):b(null,c)});else return J.wa(J.va(c))};W.prototype.getDownloadURL=W.prototype.zb;W.prototype.Cb=function(a){a=a?w(a):{};a.image=this.e();return J.Ja(J.Ia(a))};W.prototype.getThumbURL=W.prototype.Cb;
|
|
W.rgb=function(a,b,c){return Md([a,b,c],["vis-red","vis-green","vis-blue"])};W.cat=function(a){var b=Array.prototype.slice.call(arguments);return Md(b,null)};var Md=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 Mc("Image.select",c)};W.prototype.select=W.prototype.select;
|
|
W.prototype.vb=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:C(d,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return g.apply(e)};W.prototype.expression=W.prototype.vb;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||!s(a))throw Error("Image.set() takes only one argument (a dictionary).");Kc(a)&&Sa(na(a))&&Kc(a.properties)&&(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)");Od();a instanceof W&&(a=[a]);if(Jc(a))S.call(this,new M("ImageCollection.load"),{id:a});else if(n(a))S.call(this,new M("ImageCollection.fromImages"),{images:C(a,function(a){return new W(a)})});else if(a instanceof K)S.call(this,a.f,a.j);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+
|
|
a);};v(X,S);u("ee.ImageCollection",X);var Qd=!1,Od=function(){Qd||(O(X,"ImageCollection","ImageCollection"),O(X,"reduce","ImageCollection"),Qd=!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 qd(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;Rd();if(q(a))K.call(this,null,null),this.qa=a;else if(a instanceof K)K.call(this,a.f,a.j),this.qa=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};v(Y,K);u("ee.Number",Y);var Sd=!1,Rd=function(){Sd||(O(Y,"Number","Number"),Sd=!0)};Y.prototype.d=function(a){return q(this.qa)?this.qa:Y.B.d.call(this,a)};Y.prototype.name=function(){return"Number"};var $=function(a){if(!(this instanceof $))return new $(a);if(a instanceof $)return a;Td();if(p(a))K.call(this,null,null);else if(a instanceof K)K.call(this,a.f,a.j);else throw Error("Invalid argument specified for ee.String(): "+a);this.ta=a};v($,K);u("ee.String",$);var Ud=!1,Td=function(){Ud||(O($,"String","String"),Ud=!0)};$.prototype.d=function(a){return p(this.ta)?this.ta:this.ta.d(a)};$.prototype.name=function(){return"String"};u("ee.initialize",function(a,b,c,d){if("ready"!=Vd||a||b){var e=null!=c;if(d)if(e)Wd.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Vd&&e)Xd.push(c);else if(Vd="loading",J.Ma(a,b),e)Xd.push(c),Oc(Yd,Zd);else try{Oc(),Yd()}catch(g){throw Zd(g),g;}}else c&&c()});
|
|
u("ee.reset",function(){Vd="not_ready";J.reset();ja=null;Nc={};P(W);Nd=!1;P(U);Id=!1;P(S);od=!1;P(X);Qd=!1;P(V);Kd=!1;P(Q);Vc=!1;P(T);td=!1;P(Y);Sd=!1;P($);Ud=!1;for(var a=k.ee,b=0;b<$d.length;b++){var c=$d[b];P(a[c]);delete a[c]}$d=[];Ec=a;var a=ae,d;for(d in a)delete a[d]});u("ee.InitState",{Wb:"not_ready",LOADING:"loading",Xb:"ready"});u("ee.InitState.NOT_READY","not_ready");u("ee.InitState.LOADING","loading");u("ee.InitState.READY","ready");var Vd="not_ready",Xd=[],Wd=[];u("ee.TILE_SIZE",256);
|
|
var $d=[],ae={};u("ee.Algorithms",ae);u("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)});u("ee.apply",function(a,b){p(a)&&(a=new M(a));return a.apply(b)});
|
|
var Yd=function(){if("loading"==Vd){try{Ld();Hd();nd();Od();Jd();Uc();rd();Rd();Td();var a=Pc(),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]=be(x),$d.push(x));Ec=l;ce()}catch(B){Zd(B);return}Vd="ready";for(Wd=[];0<Xd.length;)Xd.shift()()}},Zd=function(a){if("loading"==Vd)for(Vd="not_ready",Xd=[];0<Wd.length;)Wd.shift()(a)},
|
|
ce=function(){ia(Qc(),function(a,b){var c=a.r();if(!c.hidden){for(var d=b.split("."),e=ae;1<d.length;){var g=d[0];g in e||(e[g]={signature:{}});e=e[g];d=Qa(d,1)}g=t(a.call,a);g.signature=c;g.toString=t(a.toString,a);e[d[0]]=g}})},be=function(a){var b=function(b){var d=Array.prototype.slice.apply(arguments);d[0]instanceof K&&1==d.length?d=d[0]:(d.unshift(a),d=N.apply(null,d));var e=k.ee;if(this instanceof e[a])K.call(this,d.f,d.j);else return new e[a](d)};v(b,K);O(b,a,a);return b},Bc=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 K?(c=Lc("Date"),new K(c,Dc(c,Cc(c,[a])))):a;case "Dictionary":return b in c?a instanceof c[b]?a:a instanceof K?new c[b](a):a:a;case "String":return Jc(a)||a instanceof $||a instanceof K||Ic(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
|