mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
152 lines
77 KiB
JavaScript
152 lines
77 KiB
JavaScript
(function() {var h,aa=aa||{},k=this,l=function(a){return void 0!==a},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},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},fa=function(a){return"number"==typeof a},q=function(a){return"function"==ca(a)},r=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},ga="closure_uid_"+
|
|
(1E9*Math.random()>>>0),ha=0,ia=function(a,b,c){return a.call.apply(a.bind,arguments)},ja=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")?ia:ja;return t.apply(null,arguments)},
|
|
ka=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&&l(b)?d[e]=b:d=d[e]?d[e]:d[e]={}},v=function(a,b){function c(){}c.prototype=b.prototype;a.q=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.jc=function(a,c,f){for(var g=Array(arguments.length-2),m=2;m<arguments.length;m++)g[m-2]=arguments[m];return b.prototype[c].apply(a,g)}};
|
|
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 la=function(a,b){for(var c in a)b.call(void 0,a[c],c,a)},na=function(a){var b=ma,c={},d;for(d in b)a.call(void 0,b[d],d,b)&&(c[d]=b[d]);return c},oa=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},pa=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},qa=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},ra=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},sa=function(a){var b=ca(a);if("object"==b||"array"==b){if(a.clone)return a.clone();
|
|
var b="array"==b?[]:{},c;for(c in a)b[c]=sa(a[c]);return b}return a},ta="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),ua=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<ta.length;f++)c=ta[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},va=function(a){var b=arguments.length;if(1==b&&n(arguments[0]))return va.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=
|
|
!0;return c};var x=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,x);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};v(x,Error);x.prototype.name="CustomError";var wa=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")},xa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},ya=function(a,b){return a<b?-1:a>b?1:0};var za=function(a,b){b.unshift(a);x.call(this,wa.apply(null,b));b.shift()};v(za,x);za.prototype.name="AssertionError";
|
|
var Aa=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);throw new za(""+e,f||[]);},y=function(a,b,c){a||Aa("",null,b,Array.prototype.slice.call(arguments,2));return a},Ba=function(a,b){throw new za("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Ca=function(a,b,c){q(a)||Aa("Expected function but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var z=Array.prototype,Da=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},Ea=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,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Fa=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),f=p(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},Ga=z.some?function(a,b,c){y(null!=a.length);return z.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1},Ia=function(a){var b;t:{b=Ha;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]},Ja=function(a,b){var c=
|
|
Da(a,b),d;if(d=0<=c)y(null!=a.length),z.splice.call(a,c,1);return d},Ka=function(a){return z.concat.apply(z,arguments)},La=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(da(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var g=0;g<f;g++)a[e+g]=d[g]}else a.push(d)}},Ma=function(a,b,c){y(null!=a.length);return 2>=arguments.length?z.slice.call(a,b):z.slice.call(a,b,c)},Oa=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],f=r(e)?"o"+(e[ga]||(e[ga]=++ha)):(typeof e).charAt(0)+
|
|
e;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c};var Pa=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);},Qa=function(a){return eval("("+a+")")},Ra=function(a){this.ka=a};Ra.prototype.k=function(a){var b=[];Sa(this,a,b);return b.join("")};
|
|
var Sa=function(a,b,c){switch(typeof b){case "string":Ta(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Sa(a,a.ka?a.ka.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ta(f,
|
|
c),c.push(":"),Sa(a,a.ka?a.ka.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}},Ua={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Va=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,Ta=function(a,b){b.push('"',a.replace(Va,function(a){if(a in Ua)return Ua[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ua[a]=
|
|
e+b.toString(16)}),'"')};va("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));va("action","cite","data","formaction","href","manifest","poster","src");va("embed","iframe","link","object","script","style","template");var A;t:{var Wa=k.navigator;if(Wa){var Xa=Wa.userAgent;if(Xa){A=Xa;break t}}A=""};var Ya=-1!=A.indexOf("Opera")||-1!=A.indexOf("OPR"),B=-1!=A.indexOf("Trident")||-1!=A.indexOf("MSIE"),Za=-1!=A.indexOf("Gecko")&&-1==A.toLowerCase().indexOf("webkit")&&!(-1!=A.indexOf("Trident")||-1!=A.indexOf("MSIE")),$a=-1!=A.toLowerCase().indexOf("webkit"),ab=function(){var a=k.document;return a?a.documentMode:void 0},bb=function(){var a="",b;if(Ya&&k.opera)return a=k.opera.version,q(a)?a():a;Za?b=/rv\:([^\);]+)(\)|;)/:B?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:$a&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(A))?
|
|
a[1]:"");return B&&(b=ab(),b>parseFloat(a))?String(b):a}(),cb={},C=function(a){var b;if(!(b=cb[a])){b=0;for(var c=xa(String(bb)).split("."),d=xa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",m=d[f]||"",I=RegExp("(\\d*)(\\D*)","g"),ea=RegExp("(\\d*)(\\D*)","g");do{var X=I.exec(g)||["","",""],Na=ea.exec(m)||["","",""];if(0==X[0].length&&0==Na[0].length)break;b=ya(0==X[1].length?0:parseInt(X[1],10),0==Na[1].length?0:parseInt(Na[1],10))||ya(0==X[2].length,0==Na[2].length)||
|
|
ya(X[2],Na[2])}while(0==b)}b=cb[a]=0<=b}return b},db=k.document,eb=db&&B?ab()||("CSS1Compat"==db.compatMode?parseInt(bb,10):5):void 0;!Za&&!B||B&&B&&9<=eb||Za&&C("1.9.1");B&&C("9");var gb=function(a,b){la(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in fb?a.setAttribute(fb[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},fb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};var hb=function(a){k.setTimeout(function(){throw a;},0)},ib,jb=function(){var a=k.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&-1==A.indexOf("Presto")&&(a=function(){var a=document.createElement("iframe");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+
|
|
"//"+b.location.host,a=t(function(a){if(("*"==d||a.origin==d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&-1==A.indexOf("Trident")&&-1==A.indexOf("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(l(c.next)){c=c.next;var a=c.Qa;c.Qa=null;a()}};return function(a){d.next={Qa:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in
|
|
document.createElement("script")?function(a){var b=document.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){k.setTimeout(a,0)}};var pb=function(a,b){kb||lb();mb||(kb(),mb=!0);nb.push(new ob(a,b))},kb,lb=function(){if(k.Promise&&k.Promise.resolve){var a=k.Promise.resolve();kb=function(){a.then(qb)}}else kb=function(){var a=qb;!q(k.setImmediate)||k.Window&&k.Window.prototype&&k.Window.prototype.setImmediate==k.setImmediate?(ib||(ib=jb()),ib(a)):k.setImmediate(a)}},mb=!1,nb=[];[].push(function(){mb=!1;nb=[]});
|
|
var qb=function(){for(;nb.length;){var a=nb;nb=[];for(var b=0;b<a.length;b++){var c=a[b];try{c.Fb.call(c.scope)}catch(d){hb(d)}}}mb=!1},ob=function(a,b){this.Fb=a;this.scope=b};var rb=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},sb=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var vb=function(a,b){this.l=0;this.w=void 0;this.n=this.h=null;this.ea=this.Aa=!1;try{var c=this;a.call(b,function(a){tb(c,2,a)},function(a){if(!(a instanceof ub))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}tb(c,3,a)})}catch(d){tb(this,3,d)}};
|
|
vb.prototype.then=function(a,b,c){null!=a&&Ca(a,"opt_onFulfilled should be a function.");null!=b&&Ca(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return wb(this,q(a)?a:null,q(b)?b:null,c)};rb(vb);vb.prototype.cancel=function(a){0==this.l&&pb(function(){var b=new ub(a);xb(this,b)},this)};
|
|
var xb=function(a,b){if(0==a.l)if(a.h){var c=a.h;if(c.n){for(var d=0,e=-1,f=0,g;g=c.n[f];f++)if(g=g.O)if(d++,g==a&&(e=f),0<=e&&1<d)break;0<=e&&(0==c.l&&1==d?xb(c,b):(d=c.n.splice(e,1)[0],yb(c,d,3,b)))}}else tb(a,3,b)},Ab=function(a,b){a.n&&a.n.length||2!=a.l&&3!=a.l||zb(a);a.n||(a.n=[]);a.n.push(b)},wb=function(a,b,c,d){var e={O:null,ab:null,cb:null};e.O=new vb(function(a,g){e.ab=b?function(c){try{var e=b.call(d,c);a(e)}catch(ea){g(ea)}}:a;e.cb=c?function(b){try{var e=c.call(d,b);!l(e)&&b instanceof
|
|
ub?g(b):a(e)}catch(ea){g(ea)}}:g});e.O.h=a;Ab(a,e);return e.O};vb.prototype.lb=function(a){y(1==this.l);this.l=0;tb(this,2,a)};vb.prototype.mb=function(a){y(1==this.l);this.l=0;tb(this,3,a)};
|
|
var tb=function(a,b,c){if(0==a.l){if(a==c)b=3,c=new TypeError("Promise cannot resolve to itself");else{if(sb(c)){a.l=1;c.then(a.lb,a.mb,a);return}if(r(c))try{var d=c.then;if(q(d)){Bb(a,c,d);return}}catch(e){b=3,c=e}}a.w=c;a.l=b;zb(a);3!=b||c instanceof ub||Cb(a,c)}},Bb=function(a,b,c){a.l=1;var d=!1,e=function(b){d||(d=!0,a.lb(b))},f=function(b){d||(d=!0,a.mb(b))};try{c.call(b,e,f)}catch(g){f(g)}},zb=function(a){a.Aa||(a.Aa=!0,pb(a.Ab,a))};
|
|
vb.prototype.Ab=function(){for(;this.n&&this.n.length;){var a=this.n;this.n=[];for(var b=0;b<a.length;b++)yb(this,a[b],this.l,this.w)}this.Aa=!1};var yb=function(a,b,c,d){if(2==c)b.ab(d);else{if(b.O)for(;a&&a.ea;a=a.h)a.ea=!1;b.cb(d)}},Cb=function(a,b){a.ea=!0;pb(function(){a.ea&&Db.call(null,b)})},Db=hb,ub=function(a){x.call(this,a)};v(ub,x);ub.prototype.name="cancel";/*
|
|
Portions of this code are from MochiKit, received by
|
|
The Closure Authors under the MIT license. All other code is Copyright
|
|
2005-2009 The Closure Authors. All Rights Reserved.
|
|
*/
|
|
var Eb=function(a,b){this.la=[];this.$a=a;this.Sa=b||null;this.U=this.H=!1;this.w=void 0;this.La=this.Oa=this.ua=!1;this.pa=0;this.h=null;this.va=0};Eb.prototype.cancel=function(a){if(this.H)this.w instanceof Eb&&this.w.cancel();else{if(this.h){var b=this.h;delete this.h;a?b.cancel(a):(b.va--,0>=b.va&&b.cancel())}this.$a?this.$a.call(this.Sa,this):this.La=!0;this.H||Fb(this,new Gb)}};Eb.prototype.Ra=function(a,b){this.ua=!1;Hb(this,a,b)};
|
|
var Hb=function(a,b,c){a.H=!0;a.w=c;a.U=!b;Ib(a)},Kb=function(a){if(a.H){if(!a.La)throw new Jb;a.La=!1}},Fb=function(a,b){Kb(a);Lb(b);Hb(a,!1,b)},Lb=function(a){y(!(a instanceof Eb),"An execution sequence may not be initiated with a blocking Deferred.")},Mb=function(a,b,c){y(!a.Oa,"Blocking Deferreds can not be re-used");a.la.push([b,c,void 0]);a.H&&Ib(a)};
|
|
Eb.prototype.then=function(a,b,c){var d,e,f=new vb(function(a,b){d=a;e=b});Mb(this,d,function(a){a instanceof Gb?f.cancel():e(a)});return f.then(a,b,c)};rb(Eb);
|
|
var Nb=function(a){return Ga(a.la,function(a){return q(a[1])})},Ib=function(a){if(a.pa&&a.H&&Nb(a)){var b=a.pa,c=Ob[b];c&&(k.clearTimeout(c.V),delete Ob[b]);a.pa=0}a.h&&(a.h.va--,delete a.h);for(var b=a.w,d=c=!1;a.la.length&&!a.ua;){var e=a.la.shift(),f=e[0],g=e[1],e=e[2];if(f=a.U?g:f)try{var m=f.call(e||a.Sa,b);l(m)&&(a.U=a.U&&(m==b||m instanceof Error),a.w=b=m);sb(b)&&(d=!0,a.ua=!0)}catch(I){b=I,a.U=!0,Nb(a)||(c=!0)}}a.w=b;d&&(m=t(a.Ra,a,!0),d=t(a.Ra,a,!1),b instanceof Eb?(Mb(b,m,d),b.Oa=!0):b.then(m,
|
|
d));c&&(b=new Pb(b),Ob[b.V]=b,a.pa=b.V)},Jb=function(){x.call(this)};v(Jb,x);Jb.prototype.message="Deferred has already fired";Jb.prototype.name="AlreadyCalledError";var Gb=function(){x.call(this)};v(Gb,x);Gb.prototype.message="Deferred was canceled";Gb.prototype.name="CanceledError";var Pb=function(a){this.V=k.setTimeout(t(this.bc,this),0);this.da=a};Pb.prototype.bc=function(){y(Ob[this.V],"Cannot throw an error that is not scheduled.");delete Ob[this.V];throw this.da;};var Ob={};var Ub=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={gb:d,Y:void 0},f=new Eb(Qb,e),g=null,m=null!=b.timeout?b.timeout:5E3;0<m&&(g=window.setTimeout(function(){Rb(d,!0);Fb(f,new Sb(1,"Timeout reached for loading script "+a))},m),e.Y=g);d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(Rb(d,b.kc||!1,g),Kb(f),Lb(null),Hb(f,!0,null))};d.onerror=function(){Rb(d,!0,g);Fb(f,new Sb(0,"Error while loading script "+
|
|
a))};gb(d,{type:"text/javascript",charset:"UTF-8",src:a});Tb(c).appendChild(d)},Tb=function(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement},Qb=function(){if(this&&this.gb){var a=this.gb;a&&"SCRIPT"==a.tagName&&Rb(a,!0,this.Y)}},Rb=function(a,b,c){null!=c&&k.clearTimeout(c);a.onload=ba;a.onerror=ba;a.onreadystatechange=ba;b&&window.setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},0)},Sb=function(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=
|
|
": "+b);x.call(this,c);this.code=a};v(Sb,x);var Vb=function(){this.R=this.R;this.ia=this.ia};Vb.prototype.R=!1;Vb.prototype.xb=function(){this.R||(this.R=!0,this.Q())};Vb.prototype.Q=function(){if(this.ia)for(;this.ia.length;)this.ia.shift()()};var Wb=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.I=!1;this.fb=!0};Wb.prototype.preventDefault=function(){this.defaultPrevented=!0;this.fb=!1};var Xb=function(a){Xb[" "](a);return a};Xb[" "]=ba;var Yb=!B||B&&9<=eb,Zb=B&&!C("9");!$a||C("528");Za&&C("1.9b")||B&&C("8")||Ya&&C("9.5")||$a&&C("528");Za&&!C("8")||B&&C("9");var $b=function(a,b){Wb.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.Ta=this.state=null;if(a){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(Za){var e;t:{try{Xb(d.nodeName);e=!0;break t}catch(f){}e=!1}e||(d=null)}}else"mouseover"==
|
|
c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.offsetX=$a||void 0!==a.offsetX?a.offsetX:a.layerX;this.offsetY=$a||void 0!==a.offsetY?a.offsetY:a.layerY;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;
|
|
this.metaKey=a.metaKey;this.state=a.state;this.Ta=a;a.defaultPrevented&&this.preventDefault()}};v($b,Wb);$b.prototype.preventDefault=function(){$b.q.preventDefault.call(this);var a=this.Ta;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Zb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var ac="closure_listenable_"+(1E6*Math.random()|0),bc=0;var cc=function(a,b,c,d,e){this.F=a;this.ja=null;this.src=b;this.type=c;this.ba=!!d;this.fa=e;this.key=++bc;this.J=this.aa=!1},dc=function(a){a.J=!0;a.F=null;a.ja=null;a.src=null;a.fa=null};var ec=function(a){this.src=a;this.j={};this.Z=0};ec.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.j[f];a||(a=this.j[f]=[],this.Z++);var g=fc(a,b,d,e);-1<g?(b=a[g],c||(b.aa=!1)):(b=new cc(b,this.src,f,!!d,e),b.aa=c,a.push(b));return b};ec.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.j))return!1;var e=this.j[a];b=fc(e,b,c,d);return-1<b?(dc(e[b]),y(null!=e.length),z.splice.call(e,b,1),0==e.length&&(delete this.j[a],this.Z--),!0):!1};
|
|
var gc=function(a,b){var c=b.type;c in a.j&&Ja(a.j[c],b)&&(dc(b),0==a.j[c].length&&(delete a.j[c],a.Z--))};ec.prototype.$b=function(){var a=0,b;for(b in this.j){for(var c=this.j[b],d=0;d<c.length;d++)++a,dc(c[d]);delete this.j[b];this.Z--}};ec.prototype.Da=function(a,b,c,d){a=this.j[a.toString()];var e=-1;a&&(e=fc(a,b,c,d));return-1<e?a[e]:null};var fc=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.J&&f.F==b&&f.ba==!!c&&f.fa==d)return e}return-1};var hc="closure_lm_"+(1E6*Math.random()|0),ic={},jc=0,kc=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)kc(a,b[f],c,d,e);else if(c=lc(c),a&&a[ac])a.Za(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,g=mc(a);g||(a[hc]=g=new ec(a));c=g.add(b,c,!1,d,e);c.ja||(d=nc(),c.ja=d,d.src=a,d.F=c,a.addEventListener?a.addEventListener(b.toString(),d,f):a.attachEvent(oc(b.toString()),d),jc++)}},nc=function(){var a=pc,b=Yb?function(c){return a.call(b.src,b.F,c)}:function(c){c=a.call(b.src,
|
|
b.F,c);if(!c)return c};return b},qc=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)qc(a,b[f],c,d,e);else c=lc(c),a&&a[ac]?a.cc(b,c,d,e):a&&(a=mc(a))&&(b=a.Da(b,c,!!d,e))&&rc(b)},rc=function(a){if(!fa(a)&&a&&!a.J){var b=a.src;if(b&&b[ac])gc(b.s,a);else{var c=a.type,d=a.ja;b.removeEventListener?b.removeEventListener(c,d,a.ba):b.detachEvent&&b.detachEvent(oc(c),d);jc--;(c=mc(b))?(gc(c,a),0==c.Z&&(c.src=null,b[hc]=null)):dc(a)}}},oc=function(a){return a in ic?ic[a]:ic[a]="on"+a},tc=function(a,
|
|
b,c,d){var e=!0;if(a=mc(a))if(b=a.j[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.ba==c&&!f.J&&(f=sc(f,d),e=e&&!1!==f)}return e},sc=function(a,b){var c=a.F,d=a.fa||a.src;a.aa&&rc(a);return c.call(d,b)},pc=function(a,b){if(a.J)return!0;if(!Yb){var c;if(!(c=b))t:{c=["window","event"];for(var d=k,e;e=c.shift();)if(null!=d[e])d=d[e];else{c=null;break t}c=d}e=c;c=new $b(e,this);d=!0;if(!(0>e.keyCode||void 0!=e.returnValue)){t:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break t}catch(g){f=
|
|
!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var f=a.type,m=e.length-1;!c.I&&0<=m;m--){c.currentTarget=e[m];var I=tc(e[m],f,!0,c),d=d&&I}for(m=0;!c.I&&m<e.length;m++)c.currentTarget=e[m],I=tc(e[m],f,!1,c),d=d&&I}return d}return sc(a,new $b(b,this))},mc=function(a){a=a[hc];return a instanceof ec?a:null},uc="__closure_events_fn_"+(1E9*Math.random()>>>0),lc=function(a){y(a,"Listener can not be null.");if(q(a))return a;y(a.handleEvent,"An object listener must have handleEvent method.");
|
|
a[uc]||(a[uc]=function(b){return a.handleEvent(b)});return a[uc]};var vc=function(){Vb.call(this);this.s=new ec(this);this.pb=this;this.Ja=null};v(vc,Vb);vc.prototype[ac]=!0;h=vc.prototype;h.addEventListener=function(a,b,c,d){kc(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){qc(this,a,b,c,d)};
|
|
h.dispatchEvent=function(a){wc(this);var b,c=this.Ja;if(c){b=[];for(var d=1;c;c=c.Ja)b.push(c),y(1E3>++d,"infinite loop")}c=this.pb;d=a.type||a;if(p(a))a=new Wb(a,c);else if(a instanceof Wb)a.target=a.target||c;else{var e=a;a=new Wb(d,c);ua(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.I&&0<=g;g--)f=a.currentTarget=b[g],e=xc(f,d,!0,a)&&e;a.I||(f=a.currentTarget=c,e=xc(f,d,!0,a)&&e,a.I||(e=xc(f,d,!1,a)&&e));if(b)for(g=0;!a.I&&g<b.length;g++)f=a.currentTarget=b[g],e=xc(f,d,!1,a)&&e;return e};
|
|
h.Q=function(){vc.q.Q.call(this);this.s&&this.s.$b();this.Ja=null};h.Za=function(a,b,c,d){wc(this);this.s.add(String(a),b,!1,c,d)};h.Pb=function(a){this.s.add("ready",a,!0,void 0,void 0)};h.cc=function(a,b,c,d){this.s.remove(String(a),b,c,d)};var xc=function(a,b,c,d){b=a.s.j[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.J&&g.ba==c){var m=g.F,I=g.fa||g.src;g.aa&&gc(a.s,g);e=!1!==m.call(I,d)&&e}}return e&&0!=d.fb};
|
|
vc.prototype.Da=function(a,b,c,d){return this.s.Da(String(a),b,c,d)};var wc=function(a){y(a.s,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var yc="StopIteration"in k?k.StopIteration:Error("StopIteration"),zc=function(){};zc.prototype.next=function(){throw yc;};zc.prototype.ob=function(){return this};var Ac=function(a,b){this.t={};this.g=[];this.ra=this.i=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 a&&this.qb(a)};Ac.prototype.v=function(){Bc(this);for(var a=[],b=0;b<this.g.length;b++)a.push(this.t[this.g[b]]);return a};Ac.prototype.B=function(){Bc(this);return this.g.concat()};Ac.prototype.P=function(a){return Cc(this.t,a)};
|
|
Ac.prototype.remove=function(a){return Cc(this.t,a)?(delete this.t[a],this.i--,this.ra++,this.g.length>2*this.i&&Bc(this),!0):!1};var Bc=function(a){if(a.i!=a.g.length){for(var b=0,c=0;b<a.g.length;){var d=a.g[b];Cc(a.t,d)&&(a.g[c++]=d);b++}a.g.length=c}if(a.i!=a.g.length){for(var e={},c=b=0;b<a.g.length;)d=a.g[b],Cc(e,d)||(a.g[c++]=d,e[d]=1),b++;a.g.length=c}};h=Ac.prototype;h.get=function(a,b){return Cc(this.t,a)?this.t[a]:b};
|
|
h.set=function(a,b){Cc(this.t,a)||(this.i++,this.g.push(a),this.ra++);this.t[a]=b};h.qb=function(a){var b;a instanceof Ac?(b=a.B(),a=a.v()):(b=qa(a),a=pa(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.B(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};h.clone=function(){return new Ac(this)};
|
|
h.ob=function(a){Bc(this);var b=0,c=this.g,d=this.t,e=this.ra,f=this,g=new zc;g.next=function(){for(;;){if(e!=f.ra)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw yc;var g=c[b++];return a?g:d[g]}};return g};var Cc=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Dc=function(a){if("function"==typeof a.v)return a.v();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 pa(a)},Ec=function(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(da(a)||p(a))Ea(a,b,void 0);else{var c;if("function"==typeof a.B)c=a.B();else if("function"!=typeof a.v)if(da(a)||p(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=qa(a);else c=void 0;for(var d=Dc(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],
|
|
a)}};var Fc=function(a,b,c,d,e){this.reset(a,b,c,d,e)};Fc.prototype.Ua=null;var Gc=0;Fc.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Gc++;d||ka();this.X=a;this.Sb=b;delete this.Ua};Fc.prototype.ib=function(a){this.X=a};var Hc=function(a){this.Tb=a;this.Wa=this.wa=this.X=this.h=null},Ic=function(a,b){this.name=a;this.value=b};Ic.prototype.toString=function(){return this.name};var Jc=new Ic("SEVERE",1E3),Kc=new Ic("CONFIG",700),Lc=new Ic("FINE",500);Hc.prototype.getParent=function(){return this.h};Hc.prototype.Hb=function(){this.wa||(this.wa={});return this.wa};Hc.prototype.ib=function(a){this.X=a};var Mc=function(a){if(a.X)return a.X;if(a.h)return Mc(a.h);Ba("Root logger has no level set.");return null};
|
|
Hc.prototype.log=function(a,b,c){if(a.value>=Mc(this).value)for(q(b)&&(b=b()),a=new Fc(a,String(b),this.Tb),c&&(a.Ua=c),c="log:"+a.Sb,k.console&&(k.console.timeStamp?k.console.timeStamp(c):k.console.markTimeline&&k.console.markTimeline(c)),k.msWriteProfilerMark&&k.msWriteProfilerMark(c),c=this;c;){b=c;var d=a;if(b.Wa)for(var e=0,f=void 0;f=b.Wa[e];e++)f(d);c=c.getParent()}};
|
|
var Nc={},Oc=null,Pc=function(a){Oc||(Oc=new Hc(""),Nc[""]=Oc,Oc.ib(Kc));var b;if(!(b=Nc[a])){b=new Hc(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Pc(a.substr(0,c));c.Hb()[d]=b;b.h=c;Nc[a]=b}return b};var Qc=function(a,b){a&&a.log(Lc,b,void 0)};var Rc=function(a,b,c){if(q(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 Sc=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Uc=function(a){if(Tc){Tc=!1;var b=k.location;if(b){var c=b.href;if(c&&(c=(c=Uc(c)[3]||null)?decodeURI(c):c)&&c!=b.hostname)throw Tc=!0,Error();}}return a.match(Sc)},Tc=$a,Vc=function(a,b){for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,g=null;0<=e?(f=c[d].substring(0,e),g=c[d].substring(e+1)):f=c[d];b(f,g?decodeURIComponent(g.replace(/\+/g," ")):"")}};var Wc=function(){};Wc.prototype.Pa=null;Wc.prototype.T=function(){var a;(a=this.Pa)||(a={},Xc(this)&&(a[0]=!0,a[1]=!0),a=this.Pa=a);return a};var Yc=function(a,b){this.ec=a;this.Zb=b};v(Yc,Wc);Yc.prototype.xa=function(){return this.ec()};Yc.prototype.T=function(){return this.Zb()};var D=function(){return D.Va.xa()};D.nb=!1;D.T=function(){return D.Va.T()};D.lc=function(a,b){D.hb(new Yc(y(a),y(b)))};D.hb=function(a){D.Va=a};var Zc=function(){};v(Zc,Wc);Zc.prototype.xa=function(){var a=Xc(this);return a?new ActiveXObject(a):new XMLHttpRequest};
|
|
var Xc=function(a){if(D.nb)return"";if(!a.Xa&&"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.Xa=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Xa};D.hb(new Zc);var E=function(a){vc.call(this);this.headers=new Ac;this.ta=a||null;this.A=!1;this.sa=this.a=null;this.W=this.Ya=this.ha="";this.D=this.Ea=this.ga=this.za=!1;this.M=0;this.ma=null;this.eb="";this.qa=this.dc=!1};v(E,vc);var $c=E.prototype,ad=Pc("goog.net.XhrIo");$c.o=ad;var bd=/^https?$/i,cd=["POST","PUT"],dd=[],fd=function(a,b,c,d,e){var f=ed,g=new E;dd.push(g);b&&g.Za("complete",b);g.Pb(g.ub);f&&(g.M=Math.max(0,f));g.send(a,c,d,e)};E.prototype.ub=function(){this.xb();Ja(dd,this)};
|
|
E.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.ha+"; newUri="+a);b=b?b.toUpperCase():"GET";this.ha=a;this.W="";this.Ya=b;this.za=!1;this.A=!0;this.a=this.ta?this.ta.xa():D();this.sa=this.ta?this.ta.T():D.T();this.a.onreadystatechange=t(this.bb,this);try{Qc(this.o,gd(this,"Opening Xhr")),this.Ea=!0,this.a.open(b,String(a),!0),this.Ea=!1}catch(e){Qc(this.o,gd(this,"Error opening Xhr: "+e.message));this.da(5,e);return}a=c||"";var f=
|
|
this.headers.clone();d&&Ec(d,function(a,b){f.set(b,a)});d=Ia(f.B());c=k.FormData&&a instanceof k.FormData;!(0<=Da(cd,b))||d||c||f.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");f.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.eb&&(this.a.responseType=this.eb);"withCredentials"in this.a&&(this.a.withCredentials=this.dc);try{hd(this),0<this.M&&(this.qa=id(this.a),Qc(this.o,gd(this,"Will abort after "+this.M+"ms if incomplete, xhr2 "+this.qa)),this.qa?(this.a.timeout=
|
|
this.M,this.a.ontimeout=t(this.Y,this)):this.ma=Rc(this.Y,this.M,this)),Qc(this.o,gd(this,"Sending request")),this.ga=!0,this.a.send(a),this.ga=!1}catch(g){Qc(this.o,gd(this,"Send error: "+g.message)),this.da(5,g)}};var id=function(a){return B&&C(9)&&fa(a.timeout)&&l(a.ontimeout)},Ha=function(a){return"content-type"==a.toLowerCase()};E.prototype.Y=function(){"undefined"!=typeof aa&&this.a&&(this.W="Timed out after "+this.M+"ms, aborting",Qc(this.o,gd(this,this.W)),this.dispatchEvent("timeout"),this.abort(8))};
|
|
E.prototype.da=function(a,b){this.A=!1;this.a&&(this.D=!0,this.a.abort(),this.D=!1);this.W=b;jd(this);kd(this)};var jd=function(a){a.za||(a.za=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};E.prototype.abort=function(){this.a&&this.A&&(Qc(this.o,gd(this,"Aborting")),this.A=!1,this.D=!0,this.a.abort(),this.D=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),kd(this))};E.prototype.Q=function(){this.a&&(this.A&&(this.A=!1,this.D=!0,this.a.abort(),this.D=!1),kd(this,!0));E.q.Q.call(this)};
|
|
E.prototype.bb=function(){this.R||(this.Ea||this.ga||this.D?ld(this):this.Yb())};E.prototype.Yb=function(){ld(this)};
|
|
var ld=function(a){if(a.A&&"undefined"!=typeof aa)if(a.sa[1]&&4==md(a)&&2==a.getStatus())Qc(a.o,gd(a,"Local request error detected and ignored"));else if(a.ga&&4==md(a))Rc(a.bb,0,a);else if(a.dispatchEvent("readystatechange"),4==md(a)){Qc(a.o,gd(a,"Request complete"));a.A=!1;try{var b=a.getStatus(),c;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break t;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=Uc(String(a.ha))[1]||null;if(!f&&self.location)var g=self.location.protocol,
|
|
f=g.substr(0,g.length-1);e=!bd.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var m;try{m=2<md(a)?a.a.statusText:""}catch(I){Qc(a.o,"Can not get status: "+I.message),m=""}a.W=m+" ["+a.getStatus()+"]";jd(a)}}finally{kd(a)}}},kd=function(a,b){if(a.a){hd(a);var c=a.a,d=a.sa[0]?ba:null;a.a=null;a.sa=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.o)&&c.log(Jc,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},
|
|
hd=function(a){a.a&&a.qa&&(a.a.ontimeout=null);fa(a.ma)&&(k.clearTimeout(a.ma),a.ma=null)},md=function(a){return a.a?a.a.readyState:0};E.prototype.getStatus=function(){try{return 2<md(this)?this.a.status:-1}catch(a){return-1}};var gd=function(a,b){return b+" ["+a.Ya+" "+a.ha+" "+a.getStatus()+"]"};var nd=function(a,b,c){this.r=a||null;this.Lb=!!c},od=function(a){a.d||(a.d=new Ac,a.i=0,a.r&&Vc(a.r,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=nd.prototype;h.d=null;h.i=null;h.add=function(a,b){od(this);this.r=null;a=pd(this,a);var c=this.d.get(a);c||this.d.set(a,c=[]);c.push(b);this.i++;return this};h.remove=function(a){od(this);a=pd(this,a);return this.d.P(a)?(this.r=null,this.i-=this.d.get(a).length,this.d.remove(a)):!1};h.P=function(a){od(this);a=pd(this,a);return this.d.P(a)};
|
|
h.B=function(){od(this);for(var a=this.d.v(),b=this.d.B(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};h.v=function(a){od(this);var b=[];if(p(a))this.P(a)&&(b=Ka(b,this.d.get(pd(this,a))));else{a=this.d.v();for(var c=0;c<a.length;c++)b=Ka(b,a[c])}return b};h.set=function(a,b){od(this);this.r=null;a=pd(this,a);this.P(a)&&(this.i-=this.d.get(a).length);this.d.set(a,[b]);this.i++;return this};
|
|
h.get=function(a,b){var c=a?this.v(a):[];return 0<c.length?String(c[0]):b};h.toString=function(){if(this.r)return this.r;if(!this.d)return"";for(var a=[],b=this.d.B(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.v(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.r=a.join("&")};h.clone=function(){var a=new nd;a.r=this.r;this.d&&(a.d=this.d.clone(),a.i=this.i);return a};
|
|
var pd=function(a,b){var c=String(b);a.Lb&&(c=c.toLowerCase());return c};var qd=null,rd=null,sd=null,td=null,ud=null,vd=[],wd=!1,ed=0,xd={fc:"CANCEL",ic:"UPDATE"},yd=function(a,b,c){null!=a?qd=a:wd||(qd="/api");null!=b?rd=b:wd||(rd="https://earthengine.googleapis.com");l(c)&&(sd=c);wd=!0};
|
|
u("ee.data.authenticate",function(a,b,c,d){var e=["https://www.googleapis.com/auth/earthengine.readonly"];d&&(La(e,d),Oa(e));ud=a;vd=e;if(r(k.gapi)&&r(k.gapi.auth)&&q(k.gapi.auth.authorize))zd(b,c);else{for(var f=ka().toString(36);f in k;)f+="_";k[f]=function(){delete k[f];zd(b,c)};Ub("https://apis.google.com/js/client.js?onload="+f)}});u("ee.data.setDeadline",function(a){ed=a});u("ee.data.getApiBaseUrl",function(){return qd});u("ee.data.getTileBaseUrl",function(){return rd});
|
|
u("ee.data.getXsrfToken",function(){return sd});u("ee.data.getInfo",function(a,b){k.console&&k.console.error&&k.console.error("ee.data.getInfo is DEPRECATED. Use ee.data.getValue() instead.");return F("/info",(new nd).add("id",a),b)});u("ee.data.getList",function(a,b){var c=G(a);return F("/list",c,b)});var Ad=function(a,b){a=w(a);return F("/mapid",G(a),b)};u("ee.data.getMapId",Ad);
|
|
u("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[rd,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});var Bd=function(a,b){a=w(a);return F("/value",G(a),b)};u("ee.data.getValue",Bd);var Cd=function(a,b){a=w(a);n(a.size)&&(a.size=a.size.join("x"));var c=G(a).add("getid","1");return F("/thumb",c,b)};u("ee.data.getThumbId",Cd);var Dd=function(a){return rd+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};u("ee.data.makeThumbUrl",Dd);
|
|
var Ed=function(a,b){a=w(a);return F("/download",G(a),b)};u("ee.data.getDownloadId",Ed);var Fd=function(a){return rd+"/api/download?docid="+a.docid+"&token="+a.token};u("ee.data.makeDownloadUrl",Fd);var Gd=function(a,b){a=w(a);return F("/table",G(a),b)};u("ee.data.getTableDownloadId",Gd);var Hd=function(a){return rd+"/api/table?docid="+a.docid+"&token="+a.token};u("ee.data.makeTableDownloadUrl",Hd);
|
|
u("ee.data.createAsset",function(a,b,c,d){a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return F("/create",G(a),d)});u("ee.data.createFolder",function(a,b,c){return F("/createfolder",G({id:a,force:b||!1}),c)});u("ee.data.newTaskId",function(a,b){var c={};fa(a)&&(c.count=a);return F("/newtaskid",G(c),b)});u("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid task_id: expected a string or an array of strings.");return F("/taskstatus?q="+a.join(),null,b,"GET")});
|
|
u("ee.data.getTaskList",function(a){return F("/tasklist",null,a,"GET")});u("ee.data.cancelTask",function(a,b){return Id(a,"CANCEL",b)});var Id=function(a,b,c){if(p(a))a=[a];else if(!n(a))throw Error("Invalid task_id: expected a string or an array of strings.");var d;t:{for(d in xd)if(xd[d]==b){d=!0;break t}d=!1}if(!d)throw Error("Invalid action: "+b);return F("/updatetask",G({id:a,action:b}),c,"POST")};u("ee.data.updateTask",Id);
|
|
u("ee.data.prepareValue",function(a,b,c){b=w(b);b.tid=a;return F("/prepare",G(b),c)});u("ee.data.startProcessing",function(a,b,c){b=w(b);b.id=a;return F("/processingrequest",G(b),c)});
|
|
var F=function(a,b,c,d){yd();d=d||"POST";var e={"Content-Type":"application/x-www-form-urlencoded"};null!=td&&(e.Authorization=td);null!=sd&&("GET"==d?(a+=-1!=a.indexOf("?")?"&":"?",a+="xsrfToken="+sd):(b||(b=new nd),b.add("xsrfToken",sd)));var f=function(a,b,c){var d,e,f;try{d=Qa(b),e=d.data}catch(g){f="Invalid JSON: "+b}r(d)?"error"in d&&"message"in d.error?f=d.error.message:"data"in d||(f="Malformed response: "+b):300<=a.status&&(f="HTTP "+a.status+": "+(b||a.statusText));if(c)return c(e,f),null;
|
|
if(!f)return e;throw Error(f);};a=qd+a;b=b?b.toString():"";if(c)return fd(a,function(a){var b;var d=a.target;try{b=d.a?d.a.responseText:""}catch(e){Qc(d.o,"Can not get responseText: "+e.message),b=""}return f(a.target,b,c)},d,b,e),null;var g=D();g.open(d,a,!1);la(e,function(a,b){g.setRequestHeader(b,a)});g.send(b);return f(g,g.responseText,null)},zd=function(a,b){var c={client_id:ud,immediate:!0,scope:vd.join(" ")},d=function(c){c.access_token?(td=c.token_type+" "+c.access_token,setTimeout(zd,1E3*
|
|
c.expires_in/2),a&&a()):b&&b(c.error||"Unknown error.")},e=k.gapi.auth.authorize;e(c,function(a){"immediate_failed"==a.error?(c.immediate=!1,e(c,d)):d(a)})},G=function(a){var b=new nd,c;for(c in a)b.set(c,a[c]);return b};var Jd=function(){};var Kd=function(){this.u=-1};var Ld=function(){this.u=-1;this.u=64;this.f=Array(4);this.sb=Array(this.u);this.na=this.N=0;this.reset()};v(Ld,Kd);Ld.prototype.reset=function(){this.f[0]=1732584193;this.f[1]=4023233417;this.f[2]=2562383102;this.f[3]=271733878;this.na=this.N=0};
|
|
var Md=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.f[0];c=a.f[1];var e=a.f[2],f=a.f[3],g=0,g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&
|
|
(f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>>20);g=
|
|
e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295|
|
|
g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295|
|
|
g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295|
|
|
g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^
|
|
b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295;
|
|
f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+
|
|
(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295;
|
|
c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.f[0]=a.f[0]+b&4294967295;a.f[1]=a.f[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.f[2]=a.f[2]+e&4294967295;a.f[3]=a.f[3]+f&4294967295};
|
|
Ld.prototype.update=function(a,b){l(b)||(b=a.length);for(var c=b-this.u,d=this.sb,e=this.N,f=0;f<b;){if(0==e)for(;f<=c;)Md(this,a,f),f+=this.u;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.u){Md(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.u){Md(this,d);e=0;break}}this.N=e;this.na+=b};
|
|
var Od=function(){var a=Nd,b=Array((56>a.N?a.u:2*a.u)-a.N);b[0]=128;for(var c=1;c<b.length-8;++c)b[c]=0;for(var d=8*a.na,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.f[c]>>>e&255;return b};var Pd=function(a){this.$="__ee_hash__";this.Ga=!1!==a;this.K=[];this.G={};this.Na=[]};u("ee.Serializer",Pd);var Qd=new Ra,Nd=new Ld,Sd=function(a,b){return Rd(new Pd(l(b)?b:!0),a)};u("ee.Serializer.encode",Sd);var Td=function(a){return Qd.k(Sd(a))};u("ee.Serializer.toJSON",Td);var Ud=function(a){a=Rd(new Pd(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Qd.k(a)};u("ee.Serializer.toReadableJSON",Ud);
|
|
var Rd=function(a,b){var c=a.ca(b);a.Ga&&(c=r(c)&&"ValueRef"==c.type&&1==a.K.length?a.K[0][1]:{type:"CompoundValue",scope:a.K,value:c},a.K=[],Ea(a.Na,t(function(a){delete a[this.$]},a)),a.Na=[],a.G={});return c};
|
|
Pd.prototype.ca=function(a){if(!l(a))throw Error("Can't encode an undefined value.");var b,c=r(a)?a[this.$]:null;if(this.Ga&&null!=c&&this.G[c])return{type:"ValueRef",value:this.G[c]};if(null===a||"boolean"==typeof a||fa(a)||p(a))return a;if(r(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof Jd){if(b=a.encode(t(this.ca,this)),!(n(b)||r(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Fa(a,function(a){return this.ca(a)},
|
|
this);else if(r(a)&&!q(a))b=oa(a,function(a){if(!q(a))return this.ca(a)},this),ra(b,this.$),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.Ga){Nd.reset();Nd.update(Qd.k(b));var c=Od().toString(),d;this.G[c]?d=this.G[c]:(d=String(this.K.length),this.K.push([d,b]),this.G[c]=d);a[this.$]=c;this.Na.push(a);return{type:"ValueRef",value:d}}return b};var H=function(a,b,c){if(!(this instanceof H))return J(H,arguments);if(c&&(a||b))throw Error('When "opt_varName" is specified, "func" and "args" must be null.');if(a&&!b)throw Error('When "func" is specified, "args" must not be null.');this.b=a;this.c=b;this.e=c||null};v(H,Jd);u("ee.ComputedObject",H);H.prototype.m=function(a){return Bd({json:this.k()},a)};u("ee.ComputedObject.prototype.getInfo",H.prototype.m);
|
|
H.prototype.encode=function(a){if(null===this.b&&null===this.c)return{type:"ArgumentRef",value:this.e};var b={},c;for(c in this.c)l(this.c[c])&&(b[c]=a(this.c[c]));b={type:"Invocation",arguments:b};a=a(this.b);b[p(a)?"functionName":"function"]=a;return b};H.prototype.k=function(){return Td(this)};u("ee.ComputedObject.prototype.serialize",H.prototype.k);H.prototype.toString=function(){return"ee."+this.name()+"("+Ud(this)+")"};u("ee.ComputedObject.prototype.toString",H.prototype.toString);
|
|
H.prototype.name=function(){return"ComputedObject"};var Vd=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;c=new c;c.b=b.b;c.c=b.c;c.e=b.e;return c},J=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var K=function(){if(!(this instanceof K))return new K};v(K,Jd);u("ee.Function",K);var Wd=function(a){return a};K.prototype.call=function(a){return this.apply(Xd(this,Array.prototype.slice.call(arguments,0)))};u("ee.Function.prototype.call",K.prototype.call);K.prototype.apply=function(a){a=new H(this,Yd(this,a));return Wd(a,this.p().returns)};u("ee.Function.prototype.apply",K.prototype.apply);
|
|
var Yd=function(a,b){for(var c=a.p().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&l(b[g]))d[g]=Wd(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+g+") missing to function: "+a);e[g]=!0}var c=[],m;for(m in b)e[m]||c.push(m);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},Xd=function(a,b){var c=a.p().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);for(var d={},e=0;e<b.length;e++)d[c[e].name]=
|
|
b[e];return d};
|
|
K.prototype.toString=function(a,b){var c=this.p(),d=[];d.push(a||c.name);d.push("(");d.push(Fa(c.args.slice(b?1:0),function(a){return a.name}).join(", "));d.push(")\n");d.push("\n");c.description?d.push(c.description):d.push("Undocumented.");d.push("\n");if(c.args.length){d.push("\nArgs:\n");for(var e=0;e<c.args.length;e++){b&&0==e?d.push(" this:"):d.push("\n ");var f=c.args[e];d.push(f.name);d.push(" (");d.push(f.type);f.optional&&d.push(", optional");d.push("): ");f.description?d.push(f.description):
|
|
d.push("Undocumented.")}}return d.join("")};K.prototype.k=function(){return Td(this)};var Zd={},$d=function(a){return a.prototype instanceof H?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},ae=function(a,b){if(b==a)return!0;switch(a){case "Element":return"Element"==b||"Image"==b||"Feature"==b||"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "FeatureCollection":case "Collection":return"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "Object":return!0;default:return!1}},be=function(a){return fa(a)||
|
|
a instanceof H&&"Number"==a.name()},ce=function(a){return p(a)||a instanceof H&&"String"==a.name()},de=function(a){return r(a)&&!q(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var L=function(a,b){if(!l(b))return fe(a);if(!(this instanceof L))return J(L,arguments);this.L=sa(b);this.L.name=a};v(L,K);u("ee.ApiFunction",L);var M=function(a,b){return K.prototype.call.apply(fe(a),Array.prototype.slice.call(arguments,1))};u("ee.ApiFunction._call",M);var ge=function(a,b){return fe(a).apply(b)};u("ee.ApiFunction._apply",ge);L.prototype.encode=function(){return this.L.name};L.prototype.p=function(){return this.L};
|
|
var ma=null,he={},je=function(){ie();return oa(ma,function(a){return a.p()})},ke=function(){ie();return na(function(a,b){return!he[b]})},fe=function(a){var b=le(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};u("ee.ApiFunction.lookup",fe);
|
|
var le=function(a){ie();return ma[a]||null},ie=function(a,b){if(ma)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(ma=oa(c,function(a,b){a.returns=a.returns.replace(/<.*>/,"");for(var c=0;c<a.args.length;c++)a.args[c].type=a.args[c].type.replace(/<.*>/,"");return new L(b,a)}),a&&a())};a?F("/algorithms",null,c,"GET"):c(F("/algorithms",null,void 0,"GET"))}},N=function(a,b,c,d){ie();var e=d||"";la(ma,function(d,g){var m=g.split(".");if(2==m.length&&m[0]==b){var I=e+m[1],ea=d.p();he[g]=!0;var X=!1;
|
|
ea.args.length&&(m=ea.args[0].type,X="Object"!=m&&ae(m,c));m=X?a.prototype:a;I in m||(m[I]=function(a){var b=Array.prototype.slice.call(arguments,0),c=!1;if(1==b.length&&de(b[0])){var e=ea.args;X&&(e=e.slice(1));e.length&&(c=!((1==e.length||e[1].optional)&&"Dictionary"==e[0].type))}if(c){if(b=w(b[0]),X){c=ea.args[0].name;if(c in b)throw Error("Named args for "+I+" can't contain keyword "+c);b[c]=this}}else b=Xd(d,X?[this].concat(b):b);return d.apply(b)},m[I].toString=t(d.toString,d,I,X),m[I].signature=
|
|
ea)}})},O=function(a){var b=function(a){for(var b in a)q(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var P=function(a,b,c){H.call(this,a,b,c);me()};v(P,H);u("ee.Element",P);var ne=!1,me=function(){ne||(N(P,"Element","Element"),ne=!0)};P.prototype.name=function(){return"Element"};
|
|
P.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=de(c))t:{b=qa(c);var d=["properties"];if(da(b)&&da(d)&&b.length==d.length){for(var e=b.length,f=0;f<e;f++)if(b[f]!==d[f]){b=!1;break t}b=!0}else b=!1}b&&r(c.properties)&&(c=c.properties);if(de(c)){b=this;for(var g in c)d=c[g],b=M("Element.set",b,g,d)}else if(c instanceof H&&le("Element.setMulti"))b=M("Element.setMulti",this,c);else throw Error("When Element.set() is passed one argument, it must be a dictionary.");}else{if(0!=
|
|
arguments.length%2)throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");b=this;for(c=0;c<arguments.length;c+=2)g=arguments[c],d=arguments[c+1],b=M("Element.set",b,g,d)}return Vd(this,b)};u("ee.Element.prototype.set",P.prototype.set);var Q=function(a){if(!(this instanceof Q))return J(Q,arguments);if(a instanceof Q)return a;oe();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new Q(a[0]);H.call(this,new L("Filter.and"),{filters:a});this.S=a}else if(a instanceof H)H.call(this,a.b,a.c,a.e),this.S=[a];else{if(l(a))throw Error("Invalid argument specified for ee.Filter(): "+a);H.call(this,null,null);this.S=[]}};v(Q,H);u("ee.Filter",Q);
|
|
var pe=!1,oe=function(){pe||(N(Q,"Filter","Filter"),pe=!0)},qe={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};Q.prototype.length=function(){return this.S.length};Q.prototype.length=Q.prototype.length;var R=function(a,b){var c=a.S.slice(0);b instanceof Q?La(c,b.S):b instanceof Array?La(c,b):c.push(b);return new Q(c)};Q.prototype.C=function(){return M("Filter.not",this)};Q.prototype.not=Q.prototype.C;
|
|
var re=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in qe))throw Error("Unknown filtering operator: "+b);a=M("Filter."+qe[b],a,c);return d?a.C():a};Q.metadata=re;var se=function(a,b){return M("Filter.equals",a,b)};Q.eq=se;var te=function(a,b){return se(a,b).C()};Q.neq=te;var ue=function(a,b){return M("Filter.lessThan",a,b)};Q.lt=ue;var ve=function(a,b){return ue(a,b).C()};Q.gte=ve;var we=function(a,b){return M("Filter.greaterThan",a,b)};
|
|
Q.gt=we;var xe=function(a,b){return we(a,b).C()};Q.lte=xe;var ye=function(a,b){return M("Filter.stringContains",a,b)};Q.contains=ye;var ze=function(a,b){return ye(a,b).C()};Q.not_contains=ze;var Ae=function(a,b){return M("Filter.stringStartsWith",a,b)};Q.starts_with=Ae;var Be=function(a,b){return Ae(a,b).C()};Q.not_starts_with=Be;var Ce=function(a,b){return M("Filter.stringEndsWith",a,b)};Q.ends_with=Ce;var De=function(a,b){return Ce(a,b).C()};Q.not_ends_with=De;
|
|
var Ee=function(a){return M("Filter.and",Array.prototype.slice.call(arguments))};Q.and=Ee;Q.or=function(a){return M("Filter.or",Array.prototype.slice.call(arguments))};var Fe=function(a,b){var c=M("DateRange",a,b);return ge("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};Q.date=Fe;var Ge=function(a,b,c,d){return ge("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};Q.inList=Ge;
|
|
var He=function(a,b){return ge("Filter.intersects",{leftField:".all",rightValue:M("Feature",a),maxError:b})};Q.bounds=He;Q.prototype.zb=function(){return R(this,se.apply(null,[].slice.call(arguments)))};Q.prototype.eq=Q.prototype.zb;Q.prototype.Ub=function(){return R(this,te.apply(null,[].slice.call(arguments)))};Q.prototype.neq=Q.prototype.Ub;Q.prototype.Qb=function(){return R(this,ue.apply(null,[].slice.call(arguments)))};Q.prototype.lt=Q.prototype.Qb;
|
|
Q.prototype.Kb=function(){return R(this,ve.apply(null,[].slice.call(arguments)))};Q.prototype.gte=Q.prototype.Kb;Q.prototype.Jb=function(){return R(this,we.apply(null,[].slice.call(arguments)))};Q.prototype.gt=Q.prototype.Jb;Q.prototype.Rb=function(){return R(this,xe.apply(null,[].slice.call(arguments)))};Q.prototype.lte=Q.prototype.Rb;Q.prototype.contains=function(){return R(this,ye.apply(null,[].slice.call(arguments)))};Q.prototype.contains=Q.prototype.contains;
|
|
Q.prototype.Vb=function(){return R(this,ze.apply(null,[].slice.call(arguments)))};Q.prototype.not_contains=Q.prototype.Vb;Q.prototype.ac=function(){return R(this,Ae.apply(null,[].slice.call(arguments)))};Q.prototype.starts_with=Q.prototype.ac;Q.prototype.Xb=function(){return R(this,Be.apply(null,[].slice.call(arguments)))};Q.prototype.not_starts_with=Q.prototype.Xb;Q.prototype.yb=function(){return R(this,Ce.apply(null,[].slice.call(arguments)))};Q.prototype.ends_with=Q.prototype.yb;
|
|
Q.prototype.Wb=function(){return R(this,De.apply(null,[].slice.call(arguments)))};Q.prototype.not_ends_with=Q.prototype.Wb;Q.prototype.rb=function(){return R(this,Ee.apply(null,[].slice.call(arguments)))};Q.prototype.and=Q.prototype.rb;Q.prototype.wb=function(){return R(this,Fe.apply(null,[].slice.call(arguments)))};Q.prototype.date=Q.prototype.wb;Q.prototype.Mb=function(){return R(this,Ge.apply(null,[].slice.call(arguments)))};Q.prototype.inList=Q.prototype.Mb;
|
|
Q.prototype.bounds=function(){return R(this,He.apply(null,[].slice.call(arguments)))};Q.prototype.bounds=Q.prototype.bounds;Q.prototype.name=function(){return"Filter"};var S=function(a,b,c){P.call(this,a,b,c);Ie()};v(S,P);u("ee.Collection",S);var Je=!1,Ie=function(){Je||(N(S,"Collection","Collection"),N(S,"AggregateFeatureCollection","Collection","aggregate_"),Je=!0)};S.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Vd(this,M("Collection.filter",this,a))};u("ee.Collection.prototype.filter",S.prototype.filter);S.prototype.Eb=function(a,b,c){return this.filter(re(a,b,c))};u("ee.Collection.prototype.filterMetadata",S.prototype.Eb);
|
|
S.prototype.Cb=function(a){return this.filter(He(a))};u("ee.Collection.prototype.filterBounds",S.prototype.Cb);S.prototype.Db=function(a,b){return this.filter(Fe(a,b))};u("ee.Collection.prototype.filterDate",S.prototype.Db);S.prototype.limit=function(a,b,c){return Vd(this,M("Collection.limit",this,a,b,c))};u("ee.Collection.prototype.limit",S.prototype.limit);S.prototype.sort=function(a,b){return Vd(this,M("Collection.limit",this,void 0,a,b))};u("ee.Collection.prototype.sort",S.prototype.sort);
|
|
S.prototype.name=function(){return"Collection"};S.prototype.elementType=function(){return P};S.prototype.map=function(a){var b=this.elementType();return Vd(this,M("Collection.map",this,function(c){return a(new b(c))}))};u("ee.Collection.prototype.map",S.prototype.map);S.prototype.Ob=function(a,b){var c=l(b)?b:null,d=this.elementType();return M("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};u("ee.Collection.prototype.iterate",S.prototype.Ob);var Ke=function(a){if(!(this instanceof Ke))return J(Ke,arguments);if(a instanceof Ke)return a;Le();if(fa(a))H.call(this,null,null),this.Ia=a;else if(a instanceof H)H.call(this,a.b,a.c,a.e),this.Ia=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};v(Ke,H);u("ee.Number",Ke);var Me=!1,Le=function(){Me||(N(Ke,"Number","Number"),Me=!0)};Ke.prototype.encode=function(a){return fa(this.Ia)?this.Ia:Ke.q.encode.call(this,a)};Ke.prototype.name=function(){return"Number"};var T=function(a){if(!(this instanceof T))return J(T,arguments);if(a instanceof T)return a;Ne();if(p(a))H.call(this,null,null),this.Ma=a;else if(a instanceof H)this.Ma=null,a.b&&"String"==a.b.p().returns?H.call(this,a.b,a.c,a.e):H.call(this,new L("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};v(T,H);u("ee.String",T);var Oe=!1,Ne=function(){Oe||(N(T,"String","String"),Oe=!0)};
|
|
T.prototype.encode=function(a){return p(this.Ma)?this.Ma:T.q.encode.call(this,a)};T.prototype.name=function(){return"String"};var Pe=function(a,b){if(!(this instanceof Pe))return J(Pe,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(Qe(g in Zd?Zd[g]:null,f.name))}if(!l(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.L=Re(a,c,b);this.tb=b.apply(null,c)};v(Pe,K);u("ee.CustomFunction",Pe);Pe.prototype.encode=function(a){return{type:"Function",argumentNames:Fa(this.L.args,function(a){return a.name}),body:a(this.tb)}};Pe.prototype.p=function(){return this.L};
|
|
var Qe=function(a,b){a=a||Object;if(!(a.prototype instanceof H))if(a&&a!=Object)if(a==String)a=T;else if(a==Number)a=Ke;else if(a==Array)a=k.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=H;var c=function(){};c.prototype=a.prototype;c=new c;c.b=null;c.c=null;c.e=b;return c},Se=function(a,b){var c=Fa(b,function(a){return{name:null,type:p(a)?a:$d(a)}}),c={name:"",returns:p("Object")?"Object":$d("Object"),args:c};return new Pe(c,a)},Re=function(a,b,c){for(var d=
|
|
[],e=0;e<b.length;e++)null===b[e].e&&d.push(e);if(0==d.length)return a;var f=function(a){var b=0;r(a)&&!q(a)&&("Function"==a.type&&b++,la(a,function(a){b+=f(a)}));return b},e=Sd(c.apply(null,b));c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],m=c+e;b[g].e=m;a.args[g].name=m}return a};var Te=function(a,b){if(!(this instanceof Te))return J(Te,arguments);if(a instanceof Te)return a;Ue();var c=new L("Date"),d={},e=null;if(ce(a)){if(d.value=a,b)if(ce(b))d.timeZone=b;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+b);}else if(be(a))d.value=a;else if(r(a)&&"function"==typeof a.getFullYear)d.value=Math.floor(a.getTime());else if(a instanceof H)a.b&&"Date"==a.b.p().returns?(c=a.b,d=a.c,e=a.e):d.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);H.call(this,c,d,e)};v(Te,H);u("ee.Date",Te);var Ve=!1,Ue=function(){Ve||(N(Te,"Date","Date"),Ve=!0)};Te.prototype.name=function(){return"Date"};var U=function(a,b,c){if(!(this instanceof U))return J(U,arguments);We();var d=null!=b||null!=c;if(a instanceof H&&!(a instanceof U&&a.oa)){if(d)throw Error("Setting the CRS or geodesic on a computed Geometry is not suported. Use Geometry.transform().");H.call(this,a.b,a.c,a.e)}else{a instanceof U&&(a=a.encode());if(3<arguments.length)throw Error("The Geometry constructor takes at most 3 arguments ("+arguments.length+" given)");if(!Xe(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));
|
|
H.call(this,null,null);this.oa=a.type;this.vb=a.coordinates||null;this.Gb=a.geometries||null;if(null!=b)this.Ka=b;else if("crs"in a)if(r(a.crs)&&"name"==a.crs.type&&r(a.crs.properties)&&p(a.crs.properties.name))this.Ka=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new Ra).k(a.crs));this.Ba=c;!l(c)&&"geodesic"in a&&(this.Ba=Boolean(a.geodesic))}};v(U,H);u("ee.Geometry",U);
|
|
var Ye=!1,We=function(){Ye||(N(U,"Geometry","Geometry"),Ye=!0)},Ze=function(a,b){if(!(this instanceof Ze))return $e(Ze,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]}U.call(this,{type:"Point",coordinates:[a,b]})};v(Ze,U);U.Point=Ze;
|
|
var af=function(a){if(!(this instanceof af))return $e(af,arguments);U.call(this,{type:"MultiPoint",coordinates:bf(a,2,arguments)})};v(af,U);U.MultiPoint=af;var cf=function(a,b,c,d){if(!(this instanceof cf))return J(cf,arguments);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]}U.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]})};v(cf,U);U.Rectangle=cf;
|
|
var df=function(a){if(!(this instanceof df))return $e(df,arguments);U.call(this,{type:"LineString",coordinates:bf(a,2,arguments)})};v(df,U);U.LineString=df;var ef=function(a){if(!(this instanceof ef))return $e(ef,arguments);U.call(this,{type:"LinearRing",coordinates:bf(a,2,arguments)})};v(ef,U);U.LinearRing=ef;var ff=function(a){if(!(this instanceof ff))return $e(ff,arguments);U.call(this,{type:"MultiLineString",coordinates:bf(a,3,arguments)})};v(ff,U);U.MultiLineString=ff;
|
|
var gf=function(a){if(!(this instanceof gf))return $e(gf,arguments);U.call(this,{type:"Polygon",coordinates:bf(a,3,arguments)})};v(gf,U);U.Polygon=gf;var hf=function(a){if(!(this instanceof hf))return $e(hf,arguments);U.call(this,{type:"MultiPolygon",coordinates:bf(a,4,arguments)})};v(hf,U);U.MultiPolygon=hf;
|
|
U.prototype.encode=function(a){if(!this.oa){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return H.prototype.encode.call(this,a)}a={type:this.oa};"GeometryCollection"==this.oa?a.geometries=this.Gb:a.coordinates=this.vb;null!=this.Ka&&(a.crs={type:"name",properties:{name:this.Ka}});null!=this.Ba&&(a.geodesic=this.Ba);return a};U.prototype.jb=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};
|
|
U.prototype.toGeoJSON=U.prototype.jb;U.prototype.kb=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new Ra).k(this.jb())};U.prototype.toGeoJSONString=U.prototype.kb;U.prototype.k=function(){return Td(this)};U.prototype.serialize=U.prototype.k;U.prototype.toString=function(){return"ee.Geometry("+this.kb()+")"};
|
|
var Xe=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(!Xe(b[a]))return!1;return!0}a=jf(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},jf=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=jf(a[0]),c=1;c<a.length;c++)if(jf(a[c])!=b)return-1;return b+1}for(c=0;c<a.length;c++)if(!fa(a[c]))return-1;return 0==
|
|
a.length%2?1:-1},bf=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(jf(a)!=b)throw Error("Invalid geometry");return a},$e=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};U.prototype.name=function(){return"Geometry"};u("ee.Deserializer",function(){});u("ee.Deserializer.fromJSON",function(a){return kf(Pa(a))});var kf=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],f=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=lf(f,b)}a=a.value}return lf(a,b)};u("ee.Deserializer.decode",kf);
|
|
var lf=function(a,b){if(null===a||fa(a)||"boolean"==typeof a||p(a))return a;if(n(a))return Fa(a,function(a){return lf(a,b)});if(!r(a)||q(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 Qe(Object,c);case "Date":c=a.value;if(!fa(c))throw Error("Invalid date value: "+c);return new Te(c/1E3);case "Bytes":return c=
|
|
new Jd,c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?fe(a.functionName):lf(a["function"],b),d=oa(a.arguments,function(a){return lf(a,b)});if(c instanceof K)return c.apply(d);if(c instanceof H)return new H(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return oa(a.value,function(a){return lf(a,b)});case "Function":var e=lf(a.body,b),c={name:"",args:Fa(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};
|
|
return new Pe(c,function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new U(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var mf=function(a){if(!(this instanceof mf))return J(mf,arguments);if(a instanceof mf)return a;nf();if(de(a))H.call(this,null,null),this.ya=a;else if(a instanceof H)H.call(this,a.b,a.c,a.e),this.ya=null;else throw Error("Invalid argument specified for ee.Dictionary(): "+a);};v(mf,H);u("ee.Dictionary",mf);var of=!1,nf=function(){of||(N(mf,"Dictionary","Dictionary"),of=!0)};mf.prototype.encode=function(a){return null===this.ya?mf.q.encode.call(this,a):a(this.ya)};mf.prototype.name=function(){return"Dictionary"};var V=function(a,b){if(!(this instanceof V))return J(V,arguments);if(a instanceof V){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)");pf();if(a instanceof U||null===a)P.call(this,new L("Feature"),{geometry:a,metadata:b||null});else if(a instanceof H)P.call(this,a.b,a.c,a.e);else if("Feature"==a.type){var c=a.properties||{};if("id"in a){if("system:index"in
|
|
c)throw Error('Can\'t specify both "id" and "system:index".');c=w(c);c["system:index"]=a.id}P.call(this,new L("Feature"),{geometry:new U(a.geometry),metadata:c})}else P.call(this,new L("Feature"),{geometry:new U(a),metadata:b||null})};v(V,P);u("ee.Feature",V);var qf=!1,pf=function(){qf||(N(V,"Feature","Feature"),qf=!0)};V.prototype.m=function(a){return V.q.m.call(this,a)};V.prototype.getInfo=V.prototype.m;V.prototype.getMap=function(a,b){return M("Collection",[this]).getMap(a,b)};
|
|
V.prototype.getMap=V.prototype.getMap;V.Point=function(a,b){return Ze.apply(null,arguments)};V.MultiPoint=function(a){return af.apply(null,arguments)};V.Rectangle=function(a,b,c,d){return new cf(a,b,c,d)};V.LineString=function(a){return df.apply(null,arguments)};V.LinearRing=function(a){return ef.apply(null,arguments)};V.MultiLine=function(a){return ff.apply(null,arguments)};V.Polygon=function(a){return gf.apply(null,arguments)};V.MultiPolygon=function(a){return hf.apply(null,arguments)};
|
|
V.prototype.name=function(){return"Feature"};var rf=function(a){if(!(this instanceof rf))return J(rf,arguments);if(a instanceof rf)return a;sf();if(n(a))H.call(this,null,null),this.Ha=a;else if(a instanceof H)H.call(this,a.b,a.c,a.e),this.Ha=null;else throw Error("Invalid argument specified for ee.List(): "+a);};v(rf,H);u("ee.List",rf);var tf=!1,sf=function(){tf||(N(rf,"List","List"),tf=!0)};rf.prototype.encode=function(a){return n(this.Ha)?Fa(this.Ha,function(b){return a(b)}):rf.q.encode.call(this,a)};rf.prototype.name=function(){return"List"};var W=function(a,b){if(!(this instanceof W))return J(W,arguments);if(a instanceof W)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");uf();a instanceof U&&(a=new V(a));a instanceof V&&(a=[a]);if(be(a)||ce(a)){var c={tableId:a};b&&(c.geometryColumn=b);S.call(this,new L("Collection.loadTable"),c)}else if(n(a))S.call(this,new L("Collection"),{features:Fa(a,function(a){return new V(a)})});else if(a instanceof rf)S.call(this,
|
|
new L("Collection"),{features:a});else if(a instanceof H)S.call(this,a.b,a.c,a.e);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};v(W,S);u("ee.FeatureCollection",W);var vf=!1,uf=function(){vf||(N(W,"FeatureCollection","FeatureCollection"),vf=!0)};W.prototype.getMap=function(a,b){var c=ge("Collection.draw",{collection:this,color:(a||{}).color||"000000"});if(b)c.getMap(null,b);else return c.getMap()};W.prototype.getMap=W.prototype.getMap;
|
|
W.prototype.m=function(a){return W.q.m.call(this,a)};W.prototype.getInfo=W.prototype.m;W.prototype.Ca=function(a,b,c,d){var e={};e.table=this.k();a&&(e.format=a.toUpperCase());c&&(e.filename=c);b&&(e.selectors=b);if(d)Gd(e,function(a,b){a?d(Hd(a)):d(null,b)});else return Hd(Gd(e))};W.prototype.getDownloadURL=W.prototype.Ca;W.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};W.prototype.select=W.prototype.select;W.prototype.name=function(){return"FeatureCollection"};
|
|
W.prototype.elementType=function(){return V};var Y=function(a){if(!(this instanceof Y))return J(Y,arguments);if(a instanceof Y)return a;wf();var b=arguments.length;if(0==b||1==b&&!l(a))P.call(this,new L("Image.mask"),{image:new Y(0),mask:new Y(0)});else if(1==b)if(be(a))P.call(this,new L("Image.constant"),{value:a});else if(ce(a))P.call(this,new L("Image.load"),{id:a});else{if(n(a))return xf(Fa(a,function(a){return new Y(a)}));if(a instanceof H)"Array"==a.name()?P.call(this,new L("Image.constant"),{value:a}):P.call(this,a.b,a.c,a.e);else throw Error("Unrecognized argument type to convert to an Image: "+
|
|
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(ce(b)&&be(c))P.call(this,new L("Image.load"),{id:b,version:c});else throw Error("Unrecognized argument types to convert to an Image: "+arguments);}else throw Error("The Image constructor takes at most 2 arguments ("+b+" given)");};v(Y,P);u("ee.Image",Y);var yf=!1,wf=function(){yf||(N(Y,"Image","Image"),N(Y,"Window","Image","focal_"),yf=!0)};Y.prototype.m=function(a){return Y.q.m.call(this,a)};Y.prototype.getInfo=Y.prototype.m;
|
|
Y.prototype.getMap=function(a,b){var c=a?w(a):{};c.image=this.k();if(b)Ad(c,t(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=Ad(c),c.image=this,c};Y.prototype.getMap=Y.prototype.getMap;Y.prototype.Ca=function(a,b){var c=a?w(a):{};c.image=this.k();if(b)Ed(c,function(a,c){a?b(Fd(a)):b(null,c)});else return Fd(Ed(c))};Y.prototype.getDownloadURL=Y.prototype.Ca;Y.prototype.Ib=function(a){a=a?w(a):{};a.image=this.k();return Dd(Cd(a))};Y.prototype.getThumbURL=Y.prototype.Ib;
|
|
Y.rgb=function(a,b,c){return xf([a,b,c],["vis-red","vis-green","vis-blue"])};Y.cat=function(a){return xf(Array.prototype.slice.call(arguments),null)};var xf=function(a,b){if(0==a.length)throw Error("Can't combine 0 images.");for(var c=new Y(a[0]),d=1;d<a.length;d++)c=M("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
Y.prototype.select=function(a,b){l(a)||(a=[]);var c={input:this,bandSelectors:a};if(ce(a)||be(a)){a=Array.prototype.slice.call(arguments);for(var d=0;d<a.length;d++)if(!(ce(a[d])||be(a[d])||a[d]instanceof H))throw Error("Illegal argument to select(): "+a[d]);c.bandSelectors=a}else b&&(c.newNames=b);return ge("Image.select",c)};Y.prototype.select=Y.prototype.select;
|
|
Y.prototype.Bb=function(a,b){var c=["DEFAULT_EXPRESSION_IMAGE"],d={DEFAULT_EXPRESSION_IMAGE:this};if(b)for(var e in b)c.push(e),d[e]=new Y(b[e]);var f=M("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE",c);e=new K;e.encode=function(a){return f.encode(a)};e.p=function(){return{name:"",args:Fa(c,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return e.apply(d)};Y.prototype.expression=Y.prototype.Bb;
|
|
Y.prototype.clip=function(a){try{a=new U(a)}catch(b){}return M("Image.clip",this,a)};Y.prototype.clip=Y.prototype.clip;Y.prototype.name=function(){return"Image"};var Z=function(a){if(!(this instanceof Z))return J(Z,arguments);if(a instanceof Z)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");zf();a instanceof Y&&(a=[a]);if(ce(a))S.call(this,new L("ImageCollection.load"),{id:a});else if(n(a))S.call(this,new L("ImageCollection.fromImages"),{images:Fa(a,function(a){return new Y(a)})});else if(a instanceof H)S.call(this,a.b,a.c,a.e);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+
|
|
a);};v(Z,S);u("ee.ImageCollection",Z);var Af=!1,zf=function(){Af||(N(Z,"ImageCollection","ImageCollection"),N(Z,"reduce","ImageCollection"),Af=!0)};Z.prototype.getMap=function(a,b){var c=M("ImageCollection.mosaic",this);if(b)c.getMap(a,b);else return c.getMap(a)};Z.prototype.getMap=Z.prototype.getMap;Z.prototype.m=function(a){return Z.q.m.call(this,a)};Z.prototype.getInfo=Z.prototype.m;Z.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};
|
|
Z.prototype.select=Z.prototype.select;Z.prototype.name=function(){return"ImageCollection"};Z.prototype.elementType=function(){return Y};var Bf={};u("ee.Terrain",Bf);Bf.Fa=!1;Bf.Nb=function(){Bf.Fa||(N(Bf,"Terrain","Terrain"),Bf.Fa=!0)};Bf.reset=function(){O(Bf);Bf.Fa=!1};u("ee.initialize",function(a,b,c,d,e){if("ready"!=Cf||a||b){var f=null!=c;if(d)if(f)Df.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Cf&&f)Ef.push(c);else if(Cf="loading",yd(a,b,e),f)Ef.push(c),ie(Ff,Gf);else try{ie(),Ff()}catch(g){throw Gf(g),g;}}else c&&c()});
|
|
u("ee.reset",function(){Cf="not_ready";ud=sd=rd=qd=null;vd=[];td=null;wd=!1;ma=null;he={};O(Te);Ve=!1;O(mf);of=!1;O(P);ne=!1;O(Y);yf=!1;O(V);qf=!1;O(S);Je=!1;O(Z);Af=!1;O(W);vf=!1;O(Q);pe=!1;O(U);Ye=!1;O(rf);tf=!1;O(Ke);Me=!1;O(T);Oe=!1;Bf.reset();for(var a=k.ee,b=0;b<Hf.length;b++){var c=Hf[b];O(a[c]);delete a[c]}Hf=[];Zd=a;var a=If,d;for(d in a)delete a[d]});u("ee.InitState",{gc:"not_ready",LOADING:"loading",hc:"ready"});u("ee.InitState.NOT_READY","not_ready");u("ee.InitState.LOADING","loading");
|
|
u("ee.InitState.READY","ready");var Cf="not_ready",Ef=[],Df=[];u("ee.TILE_SIZE",256);var Hf=[],If={};u("ee.Algorithms",If);u("ee.call",function(a,b){p(a)&&(a=new L(a));return K.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))});u("ee.apply",function(a,b){p(a)&&(a=new L(a));return a.apply(b)});
|
|
var Ff=function(){if("loading"==Cf){try{Ue();nf();me();wf();pf();Ie();zf();uf();oe();We();sf();Le();Ne();Bf.Nb();var a=je(),b={},c={},d;for(d in a){b[-1!=d.indexOf(".")?d.slice(0,d.indexOf(".")):d]=!0;var e=a[d].returns.replace(/<.*>/,"");c[e]=!0}var f=k.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=Jf(g),Hf.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,he[g]=!0):f[g].signature={});Zd=f;Kf()}catch(m){Gf(m);return}Cf="ready";for(Df=[];0<Ef.length;)Ef.shift()()}},Gf=function(a){if("loading"==
|
|
Cf)for(Cf="not_ready",Ef=[];0<Df.length;)Df.shift()(a)},Kf=function(){var a=ke();qa(a).sort().forEach(function(b){var c=a[b],d=c.p();if(!d.hidden){b=b.split(".");var e=If;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=Ma(b,1)}f=t(c.call,c);f.signature=d;f.toString=t(c.toString,c);e[b[0]]=f}})},Jf=function(a){var b=function(b){var d=k.ee[a],e=Array.prototype.slice.call(arguments),f=1==e.length;if(f&&e[0]instanceof d)return e[0];if(!(this instanceof d))return J(d,
|
|
e);var d=le(a),g=!(e[0]instanceof H),m=!1;d&&(f?g?m=!0:e[0].b!=d&&(m=!0):m=!0);if(m)H.call(this,d,Yd(d,Xd(d,e)));else{if(!f)throw Error("Too many arguments for ee."+a+"(): "+e);if(g)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];H.call(this,e.b,e.c,e.e)}};v(b,H);b.prototype.name=function(){return a};N(b,a,a);return b},Wd=function(a,b){if(null===a)return null;if(l(a)){var c=k.ee;switch(b){case "Image":return new Y(a);case "Feature":return a instanceof S?M("Feature",
|
|
M("Collection.geometry",a)):new V(a);case "Element":if(a instanceof P)return a;if(a instanceof H)return new P(a.b,a.c,a.e);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof W?M("Collection.geometry",a):new U(a);case "FeatureCollection":case "Collection":return a instanceof S?a:new W(a);case "ImageCollection":return new Z(a);case "Filter":return new Q(a);case "Algorithm":if(p(a))return new L(a);if(q(a)){for(var c=a.length,d=[],e=0;e<c;e++)d[e]="Object";return Se(a,
|
|
d)}if(a instanceof Jd)return a;throw Error("Argument is not a function: "+a);case "String":return ce(a)||a instanceof T||a instanceof H?new T(a):a;case "Dictionary":return de(a)?a:new mf(a);case "List":return new rf(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new Ke(a);default:if(b in c){d=le(b);if(a instanceof c[b])return a;if(d)return new c[b](a);if(p(a)){if(a in c[b])return c[b][a].call();throw Error("Unknown algorithm: "+b+"."+a);}return new c[b](a)}return a}}};B&&C("11");})();
|
|
//@ sourceMappingURL=ee_api_js.sourcemap
|