mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
152 lines
78 KiB
JavaScript
152 lines
78 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},ea=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},fa="closure_uid_"+
|
|
(1E9*Math.random()>>>0),ga=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.qc=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[fa]||(e[fa]=++ga)):(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.na=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.na?a.na.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.na?a.na.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]||"",O=RegExp("(\\d*)(\\D*)","g"),ha=RegExp("(\\d*)(\\D*)","g");do{var T=O.exec(g)||["","",""],Na=ha.exec(m)||["","",""];if(0==T[0].length&&0==Na[0].length)break;b=ya(0==T[1].length?0:parseInt(T[1],10),0==Na[1].length?0:parseInt(Na[1],10))||ya(0==T[2].length,0==Na[2].length)||
|
|
ya(T[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.Va;c.Va=null;a()}};return function(a){d.next={Va: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 kb=function(a,b,c){this.Ub=c;this.Bb=a;this.gc=b;this.ka=0;this.ha=null};kb.prototype.get=function(){var a;0<this.ka?(this.ka--,a=this.ha,this.ha=a.next,a.next=null):a=this.Bb();return a};kb.prototype.put=function(a){this.gc(a);this.ka<this.Ub&&(this.ka++,a.next=this.ha,this.ha=a)};var lb=function(){this.va=this.H=null},nb=new kb(function(){return new mb},function(a){a.reset()},100);lb.prototype.add=function(a,b){var c=nb.get();c.set(a,b);this.va?this.va.next=c:(y(!this.H),this.H=c);this.va=c};lb.prototype.remove=function(){var a=null;this.H&&(a=this.H,this.H=this.H.next,this.H||(this.va=null),a.next=null);return a};var mb=function(){this.next=this.scope=this.Fa=null};mb.prototype.set=function(a,b){this.Fa=a;this.scope=b;this.next=null};
|
|
mb.prototype.reset=function(){this.next=this.scope=this.Fa=null};var sb=function(a,b){ob||pb();qb||(ob(),qb=!0);rb.add(a,b)},ob,pb=function(){if(k.Promise&&k.Promise.resolve){var a=k.Promise.resolve();ob=function(){a.then(tb)}}else ob=function(){var a=tb;!q(k.setImmediate)||k.Window&&k.Window.prototype&&k.Window.prototype.setImmediate==k.setImmediate?(ib||(ib=jb()),ib(a)):k.setImmediate(a)}},qb=!1,rb=new lb;[].push(function(){qb=!1;rb=new lb});var tb=function(){for(var a=null;a=rb.remove();){try{a.Fa.call(a.scope)}catch(b){hb(b)}nb.put(a)}qb=!1};var ub=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},vb=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var zb=function(a,b){this.l=0;this.w=void 0;this.n=this.e=null;this.fa=this.Ea=!1;if(a==wb)xb(this,2,b);else try{var c=this;a.call(b,function(a){xb(c,2,a)},function(a){if(!(a instanceof yb))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}xb(c,3,a)})}catch(d){xb(this,3,d)}},wb=function(){};
|
|
zb.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 Ab(this,q(a)?a:null,q(b)?b:null,c)};ub(zb);zb.prototype.cancel=function(a){0==this.l&&sb(function(){var b=new yb(a);Bb(this,b)},this)};
|
|
var Bb=function(a,b){if(0==a.l)if(a.e){var c=a.e;if(c.n){for(var d=0,e=-1,f=0,g;g=c.n[f];f++)if(g=g.D)if(d++,g==a&&(e=f),0<=e&&1<d)break;0<=e&&(0==c.l&&1==d?Bb(c,b):(d=c.n.splice(e,1)[0],Cb(c,d,3,b)))}a.e=null}else xb(a,3,b)},Eb=function(a,b){a.n&&a.n.length||2!=a.l&&3!=a.l||Db(a);a.n||(a.n=[]);a.n.push(b)},Ab=function(a,b,c,d){var e={D:null,gb:null,ib:null};e.D=new zb(function(a,g){e.gb=b?function(c){try{var e=b.call(d,c);a(e)}catch(ha){g(ha)}}:a;e.ib=c?function(b){try{var e=c.call(d,b);!l(e)&&b instanceof
|
|
yb?g(b):a(e)}catch(ha){g(ha)}}:g});e.D.e=a;Eb(a,e);return e.D};zb.prototype.qb=function(a){y(1==this.l);this.l=0;xb(this,2,a)};zb.prototype.rb=function(a){y(1==this.l);this.l=0;xb(this,3,a)};
|
|
var xb=function(a,b,c){if(0==a.l){if(a==c)b=3,c=new TypeError("Promise cannot resolve to itself");else{if(vb(c)){a.l=1;c.then(a.qb,a.rb,a);return}if(r(c))try{var d=c.then;if(q(d)){Fb(a,c,d);return}}catch(e){b=3,c=e}}a.w=c;a.l=b;a.e=null;Db(a);3!=b||c instanceof yb||Gb(a,c)}},Fb=function(a,b,c){a.l=1;var d=!1,e=function(b){d||(d=!0,a.qb(b))},f=function(b){d||(d=!0,a.rb(b))};try{c.call(b,e,f)}catch(g){f(g)}},Db=function(a){a.Ea||(a.Ea=!0,sb(a.Gb,a))};
|
|
zb.prototype.Gb=function(){for(;this.n&&this.n.length;){var a=this.n;this.n=null;for(var b=0;b<a.length;b++)Cb(this,a[b],this.l,this.w)}this.Ea=!1};var Cb=function(a,b,c,d){b.D&&(b.D.e=null);if(2==c)b.gb(d);else{if(b.D)for(;a&&a.fa;a=a.e)a.fa=!1;b.ib(d)}},Gb=function(a,b){a.fa=!0;sb(function(){a.fa&&Hb.call(null,b)})},Hb=hb,yb=function(a){x.call(this,a)};v(yb,x);yb.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 Ib=function(a,b){this.oa=[];this.fb=a;this.Xa=b||null;this.V=this.J=!1;this.w=void 0;this.Qa=this.Ta=this.ya=!1;this.sa=0;this.e=null;this.za=0};Ib.prototype.cancel=function(a){if(this.J)this.w instanceof Ib&&this.w.cancel();else{if(this.e){var b=this.e;delete this.e;a?b.cancel(a):(b.za--,0>=b.za&&b.cancel())}this.fb?this.fb.call(this.Xa,this):this.Qa=!0;this.J||Jb(this,new Kb)}};Ib.prototype.Wa=function(a,b){this.ya=!1;Lb(this,a,b)};
|
|
var Lb=function(a,b,c){a.J=!0;a.w=c;a.V=!b;Mb(a)},Ob=function(a){if(a.J){if(!a.Qa)throw new Nb;a.Qa=!1}},Jb=function(a,b){Ob(a);Pb(b);Lb(a,!1,b)},Pb=function(a){y(!(a instanceof Ib),"An execution sequence may not be initiated with a blocking Deferred.")},Qb=function(a,b,c){y(!a.Ta,"Blocking Deferreds can not be re-used");a.oa.push([b,c,void 0]);a.J&&Mb(a)};
|
|
Ib.prototype.then=function(a,b,c){var d,e,f=new zb(function(a,b){d=a;e=b});Qb(this,d,function(a){a instanceof Kb?f.cancel():e(a)});return f.then(a,b,c)};ub(Ib);
|
|
var Rb=function(a){return Ga(a.oa,function(a){return q(a[1])})},Mb=function(a){if(a.sa&&a.J&&Rb(a)){var b=a.sa,c=Sb[b];c&&(k.clearTimeout(c.W),delete Sb[b]);a.sa=0}a.e&&(a.e.za--,delete a.e);for(var b=a.w,d=c=!1;a.oa.length&&!a.ya;){var e=a.oa.shift(),f=e[0],g=e[1],e=e[2];if(f=a.V?g:f)try{var m=f.call(e||a.Xa,b);l(m)&&(a.V=a.V&&(m==b||m instanceof Error),a.w=b=m);vb(b)&&(d=!0,a.ya=!0)}catch(O){b=O,a.V=!0,Rb(a)||(c=!0)}}a.w=b;d&&(m=t(a.Wa,a,!0),d=t(a.Wa,a,!1),b instanceof Ib?(Qb(b,m,d),b.Ta=!0):b.then(m,
|
|
d));c&&(b=new Tb(b),Sb[b.W]=b,a.sa=b.W)},Nb=function(){x.call(this)};v(Nb,x);Nb.prototype.message="Deferred has already fired";Nb.prototype.name="AlreadyCalledError";var Kb=function(){x.call(this)};v(Kb,x);Kb.prototype.message="Deferred was canceled";Kb.prototype.name="CanceledError";var Tb=function(a){this.W=k.setTimeout(t(this.ic,this),0);this.ea=a};Tb.prototype.ic=function(){y(Sb[this.W],"Cannot throw an error that is not scheduled.");delete Sb[this.W];throw this.ea;};var Sb={};var Yb=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={lb:d,Z:void 0},f=new Ib(Ub,e),g=null,m=null!=b.timeout?b.timeout:5E3;0<m&&(g=window.setTimeout(function(){Vb(d,!0);Jb(f,new Wb(1,"Timeout reached for loading script "+a))},m),e.Z=g);d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(Vb(d,b.rc||!1,g),Ob(f),Pb(null),Lb(f,!0,null))};d.onerror=function(){Vb(d,!0,g);Jb(f,new Wb(0,"Error while loading script "+
|
|
a))};gb(d,{type:"text/javascript",charset:"UTF-8",src:a});Xb(c).appendChild(d)},Xb=function(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement},Ub=function(){if(this&&this.lb){var a=this.lb;a&&"SCRIPT"==a.tagName&&Vb(a,!0,this.Z)}},Vb=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)},Wb=function(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=
|
|
": "+b);x.call(this,c);this.code=a};v(Wb,x);var Zb=function(){this.S=this.S;this.la=this.la};Zb.prototype.S=!1;Zb.prototype.Db=function(){this.S||(this.S=!0,this.R())};Zb.prototype.R=function(){if(this.la)for(;this.la.length;)this.la.shift()()};var $b=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.K=!1;this.kb=!0};$b.prototype.preventDefault=function(){this.defaultPrevented=!0;this.kb=!1};var ac=function(a){ac[" "](a);return a};ac[" "]=ba;var bc=!B||B&&9<=eb,cc=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 dc=function(a,b){$b.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.Ya=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{ac(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.Ya=a;a.defaultPrevented&&this.preventDefault()}};v(dc,$b);dc.prototype.preventDefault=function(){dc.q.preventDefault.call(this);var a=this.Ya;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,cc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var ec="closure_listenable_"+(1E6*Math.random()|0),fc=0;var gc=function(a,b,c,d,e){this.G=a;this.ma=null;this.src=b;this.type=c;this.ca=!!d;this.ga=e;this.key=++fc;this.L=this.ba=!1},hc=function(a){a.L=!0;a.G=null;a.ma=null;a.src=null;a.ga=null};var ic=function(a){this.src=a;this.j={};this.$=0};ic.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.j[f];a||(a=this.j[f]=[],this.$++);var g=jc(a,b,d,e);-1<g?(b=a[g],c||(b.ba=!1)):(b=new gc(b,this.src,f,!!d,e),b.ba=c,a.push(b));return b};ic.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.j))return!1;var e=this.j[a];b=jc(e,b,c,d);return-1<b?(hc(e[b]),y(null!=e.length),z.splice.call(e,b,1),0==e.length&&(delete this.j[a],this.$--),!0):!1};
|
|
var kc=function(a,b){var c=b.type;c in a.j&&Ja(a.j[c],b)&&(hc(b),0==a.j[c].length&&(delete a.j[c],a.$--))};ic.prototype.fc=function(){var a=0,b;for(b in this.j){for(var c=this.j[b],d=0;d<c.length;d++)++a,hc(c[d]);delete this.j[b];this.$--}};ic.prototype.Ia=function(a,b,c,d){a=this.j[a.toString()];var e=-1;a&&(e=jc(a,b,c,d));return-1<e?a[e]:null};var jc=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.L&&f.G==b&&f.ca==!!c&&f.ga==d)return e}return-1};var lc="closure_lm_"+(1E6*Math.random()|0),mc={},nc=0,oc=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)oc(a,b[f],c,d,e);else if(c=pc(c),a&&a[ec])a.eb(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,g=qc(a);g||(a[lc]=g=new ic(a));c=g.add(b,c,!1,d,e);c.ma||(d=rc(),c.ma=d,d.src=a,d.G=c,a.addEventListener?a.addEventListener(b.toString(),d,f):a.attachEvent(sc(b.toString()),d),nc++)}},rc=function(){var a=tc,b=bc?function(c){return a.call(b.src,b.G,c)}:function(c){c=a.call(b.src,
|
|
b.G,c);if(!c)return c};return b},uc=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)uc(a,b[f],c,d,e);else c=pc(c),a&&a[ec]?a.jc(b,c,d,e):a&&(a=qc(a))&&(b=a.Ia(b,c,!!d,e))&&vc(b)},vc=function(a){if(!ea(a)&&a&&!a.L){var b=a.src;if(b&&b[ec])kc(b.s,a);else{var c=a.type,d=a.ma;b.removeEventListener?b.removeEventListener(c,d,a.ca):b.detachEvent&&b.detachEvent(sc(c),d);nc--;(c=qc(b))?(kc(c,a),0==c.$&&(c.src=null,b[lc]=null)):hc(a)}}},sc=function(a){return a in mc?mc[a]:mc[a]="on"+a},xc=function(a,
|
|
b,c,d){var e=!0;if(a=qc(a))if(b=a.j[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.ca==c&&!f.L&&(f=wc(f,d),e=e&&!1!==f)}return e},wc=function(a,b){var c=a.G,d=a.ga||a.src;a.ba&&vc(a);return c.call(d,b)},tc=function(a,b){if(a.L)return!0;if(!bc){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 dc(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.K&&0<=m;m--){c.currentTarget=e[m];var O=xc(e[m],f,!0,c),d=d&&O}for(m=0;!c.K&&m<e.length;m++)c.currentTarget=e[m],O=xc(e[m],f,!1,c),d=d&&O}return d}return wc(a,new dc(b,this))},qc=function(a){a=a[lc];return a instanceof ic?a:null},yc="__closure_events_fn_"+(1E9*Math.random()>>>0),pc=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[yc]||(a[yc]=function(b){return a.handleEvent(b)});return a[yc]};var zc=function(){Zb.call(this);this.s=new ic(this);this.ub=this;this.Oa=null};v(zc,Zb);zc.prototype[ec]=!0;h=zc.prototype;h.addEventListener=function(a,b,c,d){oc(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){uc(this,a,b,c,d)};
|
|
h.dispatchEvent=function(a){Ac(this);var b,c=this.Oa;if(c){b=[];for(var d=1;c;c=c.Oa)b.push(c),y(1E3>++d,"infinite loop")}c=this.ub;d=a.type||a;if(p(a))a=new $b(a,c);else if(a instanceof $b)a.target=a.target||c;else{var e=a;a=new $b(d,c);ua(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.K&&0<=g;g--)f=a.currentTarget=b[g],e=Bc(f,d,!0,a)&&e;a.K||(f=a.currentTarget=c,e=Bc(f,d,!0,a)&&e,a.K||(e=Bc(f,d,!1,a)&&e));if(b)for(g=0;!a.K&&g<b.length;g++)f=a.currentTarget=b[g],e=Bc(f,d,!1,a)&&e;return e};
|
|
h.R=function(){zc.q.R.call(this);this.s&&this.s.fc();this.Oa=null};h.eb=function(a,b,c,d){Ac(this);this.s.add(String(a),b,!1,c,d)};h.Vb=function(a){this.s.add("ready",a,!0,void 0,void 0)};h.jc=function(a,b,c,d){this.s.remove(String(a),b,c,d)};var Bc=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.L&&g.ca==c){var m=g.G,O=g.ga||g.src;g.ba&&kc(a.s,g);e=!1!==m.call(O,d)&&e}}return e&&0!=d.kb};
|
|
zc.prototype.Ia=function(a,b,c,d){return this.s.Ia(String(a),b,c,d)};var Ac=function(a){y(a.s,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var Cc="StopIteration"in k?k.StopIteration:Error("StopIteration"),Dc=function(){};Dc.prototype.next=function(){throw Cc;};Dc.prototype.tb=function(){return this};var Ec=function(a,b){this.t={};this.h=[];this.ua=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.vb(a)};Ec.prototype.v=function(){Fc(this);for(var a=[],b=0;b<this.h.length;b++)a.push(this.t[this.h[b]]);return a};Ec.prototype.B=function(){Fc(this);return this.h.concat()};Ec.prototype.Q=function(a){return Gc(this.t,a)};
|
|
Ec.prototype.remove=function(a){return Gc(this.t,a)?(delete this.t[a],this.i--,this.ua++,this.h.length>2*this.i&&Fc(this),!0):!1};var Fc=function(a){if(a.i!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Gc(a.t,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.i!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Gc(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}};h=Ec.prototype;h.get=function(a,b){return Gc(this.t,a)?this.t[a]:b};
|
|
h.set=function(a,b){Gc(this.t,a)||(this.i++,this.h.push(a),this.ua++);this.t[a]=b};h.vb=function(a){var b;a instanceof Ec?(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 Ec(this)};
|
|
h.tb=function(a){Fc(this);var b=0,c=this.h,d=this.t,e=this.ua,f=this,g=new Dc;g.next=function(){for(;;){if(e!=f.ua)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw Cc;var g=c[b++];return a?g:d[g]}};return g};var Gc=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Hc=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)},Ic=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=Hc(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],
|
|
a)}};var Jc=function(a,b,c,d,e){this.reset(a,b,c,d,e)};Jc.prototype.Za=null;var Kc=0;Jc.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Kc++;d||ka();this.Y=a;this.Yb=b;delete this.Za};Jc.prototype.nb=function(a){this.Y=a};var Lc=function(a){this.Zb=a;this.ab=this.Aa=this.Y=this.e=null},Mc=function(a,b){this.name=a;this.value=b};Mc.prototype.toString=function(){return this.name};var Nc=new Mc("SEVERE",1E3),Oc=new Mc("CONFIG",700),Pc=new Mc("FINE",500);Lc.prototype.getParent=function(){return this.e};Lc.prototype.Mb=function(){this.Aa||(this.Aa={});return this.Aa};Lc.prototype.nb=function(a){this.Y=a};var Qc=function(a){if(a.Y)return a.Y;if(a.e)return Qc(a.e);Ba("Root logger has no level set.");return null};
|
|
Lc.prototype.log=function(a,b,c){if(a.value>=Qc(this).value)for(q(b)&&(b=b()),a=new Jc(a,String(b),this.Zb),c&&(a.Za=c),c="log:"+a.Yb,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.ab)for(var e=0,f=void 0;f=b.ab[e];e++)f(d);c=c.getParent()}};
|
|
var Rc={},Sc=null,Tc=function(a){Sc||(Sc=new Lc(""),Rc[""]=Sc,Sc.nb(Oc));var b;if(!(b=Rc[a])){b=new Lc(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Tc(a.substr(0,c));c.Mb()[d]=b;b.e=c;Rc[a]=b}return b};var Uc=function(a,b){a&&a.log(Pc,b,void 0)};var Vc=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 Wc=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Yc=function(a){if(Xc){Xc=!1;var b=k.location;if(b){var c=b.href;if(c&&(c=(c=Yc(c)[3]||null)?decodeURI(c):c)&&c!=b.hostname)throw Xc=!0,Error();}}return a.match(Wc)},Xc=$a,Zc=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 $c=function(){};$c.prototype.Ua=null;$c.prototype.U=function(){var a;(a=this.Ua)||(a={},ad(this)&&(a[0]=!0,a[1]=!0),a=this.Ua=a);return a};var bd=function(a,b){this.lc=a;this.ec=b};v(bd,$c);bd.prototype.Ba=function(){return this.lc()};bd.prototype.U=function(){return this.ec()};var D=function(){return D.$a.Ba()};D.sb=!1;D.U=function(){return D.$a.U()};D.sc=function(a,b){D.mb(new bd(y(a),y(b)))};D.mb=function(a){D.$a=a};var cd=function(){};v(cd,$c);cd.prototype.Ba=function(){var a=ad(this);return a?new ActiveXObject(a):new XMLHttpRequest};
|
|
var ad=function(a){if(D.sb)return"";if(!a.bb&&"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.bb=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.bb};D.mb(new cd);var E=function(a){zc.call(this);this.headers=new Ec;this.xa=a||null;this.A=!1;this.wa=this.a=null;this.X=this.cb=this.ja="";this.F=this.Ja=this.ia=this.Da=!1;this.O=0;this.pa=null;this.jb="";this.ta=this.kc=!1};v(E,zc);var dd=E.prototype,ed=Tc("goog.net.XhrIo");dd.p=ed;var fd=/^https?$/i,gd=["POST","PUT"],hd=[],jd=function(a,b,c,d,e){var f=id,g=new E;hd.push(g);b&&g.eb("complete",b);g.Vb(g.zb);f&&(g.O=Math.max(0,f));g.send(a,c,d,e)};E.prototype.zb=function(){this.Db();Ja(hd,this)};
|
|
E.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.ja+"; newUri="+a);b=b?b.toUpperCase():"GET";this.ja=a;this.X="";this.cb=b;this.Da=!1;this.A=!0;this.a=this.xa?this.xa.Ba():D();this.wa=this.xa?this.xa.U():D.U();this.a.onreadystatechange=t(this.hb,this);try{Uc(this.p,kd(this,"Opening Xhr")),this.Ja=!0,this.a.open(b,String(a),!0),this.Ja=!1}catch(e){Uc(this.p,kd(this,"Error opening Xhr: "+e.message));this.ea(5,e);return}a=c||"";var f=
|
|
this.headers.clone();d&&Ic(d,function(a,b){f.set(b,a)});d=Ia(f.B());c=k.FormData&&a instanceof k.FormData;!(0<=Da(gd,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.jb&&(this.a.responseType=this.jb);"withCredentials"in this.a&&(this.a.withCredentials=this.kc);try{ld(this),0<this.O&&(this.ta=md(this.a),Uc(this.p,kd(this,"Will abort after "+this.O+"ms if incomplete, xhr2 "+this.ta)),this.ta?(this.a.timeout=
|
|
this.O,this.a.ontimeout=t(this.Z,this)):this.pa=Vc(this.Z,this.O,this)),Uc(this.p,kd(this,"Sending request")),this.ia=!0,this.a.send(a),this.ia=!1}catch(g){Uc(this.p,kd(this,"Send error: "+g.message)),this.ea(5,g)}};var md=function(a){return B&&C(9)&&ea(a.timeout)&&l(a.ontimeout)},Ha=function(a){return"content-type"==a.toLowerCase()};E.prototype.Z=function(){"undefined"!=typeof aa&&this.a&&(this.X="Timed out after "+this.O+"ms, aborting",Uc(this.p,kd(this,this.X)),this.dispatchEvent("timeout"),this.abort(8))};
|
|
E.prototype.ea=function(a,b){this.A=!1;this.a&&(this.F=!0,this.a.abort(),this.F=!1);this.X=b;nd(this);od(this)};var nd=function(a){a.Da||(a.Da=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};E.prototype.abort=function(){this.a&&this.A&&(Uc(this.p,kd(this,"Aborting")),this.A=!1,this.F=!0,this.a.abort(),this.F=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),od(this))};E.prototype.R=function(){this.a&&(this.A&&(this.A=!1,this.F=!0,this.a.abort(),this.F=!1),od(this,!0));E.q.R.call(this)};
|
|
E.prototype.hb=function(){this.S||(this.Ja||this.ia||this.F?pd(this):this.dc())};E.prototype.dc=function(){pd(this)};
|
|
var pd=function(a){if(a.A&&"undefined"!=typeof aa)if(a.wa[1]&&4==qd(a)&&2==a.getStatus())Uc(a.p,kd(a,"Local request error detected and ignored"));else if(a.ia&&4==qd(a))Vc(a.hb,0,a);else if(a.dispatchEvent("readystatechange"),4==qd(a)){Uc(a.p,kd(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=Yc(String(a.ja))[1]||null;if(!f&&self.location)var g=self.location.protocol,
|
|
f=g.substr(0,g.length-1);e=!fd.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var m;try{m=2<qd(a)?a.a.statusText:""}catch(O){Uc(a.p,"Can not get status: "+O.message),m=""}a.X=m+" ["+a.getStatus()+"]";nd(a)}}finally{od(a)}}},od=function(a,b){if(a.a){ld(a);var c=a.a,d=a.wa[0]?ba:null;a.a=null;a.wa=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.p)&&c.log(Nc,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},
|
|
ld=function(a){a.a&&a.ta&&(a.a.ontimeout=null);ea(a.pa)&&(k.clearTimeout(a.pa),a.pa=null)},qd=function(a){return a.a?a.a.readyState:0};E.prototype.getStatus=function(){try{return 2<qd(this)?this.a.status:-1}catch(a){return-1}};var kd=function(a,b){return b+" ["+a.cb+" "+a.ja+" "+a.getStatus()+"]"};var rd=function(a,b,c){this.r=a||null;this.Qb=!!c},sd=function(a){a.d||(a.d=new Ec,a.i=0,a.r&&Zc(a.r,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=rd.prototype;h.d=null;h.i=null;h.add=function(a,b){sd(this);this.r=null;a=td(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){sd(this);a=td(this,a);return this.d.Q(a)?(this.r=null,this.i-=this.d.get(a).length,this.d.remove(a)):!1};h.Q=function(a){sd(this);a=td(this,a);return this.d.Q(a)};
|
|
h.B=function(){sd(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){sd(this);var b=[];if(p(a))this.Q(a)&&(b=Ka(b,this.d.get(td(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){sd(this);this.r=null;a=td(this,a);this.Q(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 rd;a.r=this.r;this.d&&(a.d=this.d.clone(),a.i=this.i);return a};
|
|
var td=function(a,b){var c=String(b);a.Qb&&(c=c.toLowerCase());return c};var ud=null,vd=null,wd=null,xd=null,yd=null,zd=[],Ad=!1,id=0,Bd={mc:"CANCEL",pc:"UPDATE"},Cd=function(a,b,c){null!=a?ud=a:Ad||(ud="/api");null!=b?vd=b:Ad||(vd="https://earthengine.googleapis.com");l(c)&&(wd=c);Ad=!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));yd=a;zd=e;if(r(k.gapi)&&r(k.gapi.auth)&&q(k.gapi.auth.authorize))Dd(b,c);else{for(var f=ka().toString(36);f in k;)f+="_";k[f]=function(){delete k[f];Dd(b,c)};Yb("https://apis.google.com/js/client.js?onload="+f)}});u("ee.data.setDeadline",function(a){id=a});u("ee.data.getApiBaseUrl",function(){return ud});u("ee.data.getTileBaseUrl",function(){return vd});
|
|
u("ee.data.getXsrfToken",function(){return wd});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 rd).add("id",a),b)});u("ee.data.getList",function(a,b){var c=G(a);return F("/list",c,b)});var Ed=function(a,b){a=w(a);return F("/mapid",G(a),b)};u("ee.data.getMapId",Ed);
|
|
u("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[vd,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});var Fd=function(a,b){a=w(a);return F("/value",G(a),b)};u("ee.data.getValue",Fd);var Gd=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",Gd);var Hd=function(a){return vd+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};u("ee.data.makeThumbUrl",Hd);
|
|
var Id=function(a,b){a=w(a);return F("/download",G(a),b)};u("ee.data.getDownloadId",Id);var Jd=function(a){return vd+"/api/download?docid="+a.docid+"&token="+a.token};u("ee.data.makeDownloadUrl",Jd);var Kd=function(a,b){a=w(a);return F("/table",G(a),b)};u("ee.data.getTableDownloadId",Kd);var Ld=function(a){return vd+"/api/table?docid="+a.docid+"&token="+a.token};u("ee.data.makeTableDownloadUrl",Ld);
|
|
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={};ea(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 Md(a,"CANCEL",b)});var Md=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 Bd)if(Bd[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",Md);
|
|
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){Cd();d=d||"POST";var e={"Content-Type":"application/x-www-form-urlencoded"};null!=xd&&(e.Authorization=xd);null!=wd&&("GET"==d?(a+=-1!=a.indexOf("?")?"&":"?",a+="xsrfToken="+wd):(b||(b=new rd),b.add("xsrfToken",wd)));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=ud+a;b=b?b.toString():"";if(c)return jd(a,function(a){var b;var d=a.target;try{b=d.a?d.a.responseText:""}catch(e){Uc(d.p,"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)},Dd=function(a,b){var c={client_id:yd,immediate:!0,scope:zd.join(" ")},d=function(c){c.access_token?(xd=c.token_type+" "+c.access_token,setTimeout(Dd,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 rd,c;for(c in a)b.set(c,a[c]);return b};var Nd=function(){};var Od=function(){this.u=-1};var Pd=function(){this.u=-1;this.u=64;this.g=Array(4);this.xb=Array(this.u);this.qa=this.P=0;this.reset()};v(Pd,Od);Pd.prototype.reset=function(){this.g[0]=1732584193;this.g[1]=4023233417;this.g[2]=2562383102;this.g[3]=271733878;this.qa=this.P=0};
|
|
var Qd=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.g[0];c=a.g[1];var e=a.g[2],f=a.g[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.g[0]=a.g[0]+b&4294967295;a.g[1]=a.g[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.g[2]=a.g[2]+e&4294967295;a.g[3]=a.g[3]+f&4294967295};
|
|
Pd.prototype.update=function(a,b){l(b)||(b=a.length);for(var c=b-this.u,d=this.xb,e=this.P,f=0;f<b;){if(0==e)for(;f<=c;)Qd(this,a,f),f+=this.u;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.u){Qd(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.u){Qd(this,d);e=0;break}}this.P=e;this.qa+=b};
|
|
var Sd=function(){var a=Rd,b=Array((56>a.P?a.u:2*a.u)-a.P);b[0]=128;for(var c=1;c<b.length-8;++c)b[c]=0;for(var d=8*a.qa,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.g[c]>>>e&255;return b};var Td=function(a){this.aa="__ee_hash__";this.La=!1!==a;this.M=[];this.I={};this.Sa=[]};u("ee.Serializer",Td);var Ud=new Ra,Rd=new Pd,Wd=function(a,b){return Vd(new Td(l(b)?b:!0),a)};u("ee.Serializer.encode",Wd);var Xd=function(a){return Ud.k(Wd(a))};u("ee.Serializer.toJSON",Xd);var Yd=function(a){a=Vd(new Td(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Ud.k(a)};u("ee.Serializer.toReadableJSON",Yd);
|
|
var Vd=function(a,b){var c=a.da(b);a.La&&(c=r(c)&&"ValueRef"==c.type&&1==a.M.length?a.M[0][1]:{type:"CompoundValue",scope:a.M,value:c},a.M=[],Ea(a.Sa,t(function(a){delete a[this.aa]},a)),a.Sa=[],a.I={});return c};
|
|
Td.prototype.da=function(a){if(!l(a))throw Error("Can't encode an undefined value.");var b,c=r(a)?a[this.aa]:null;if(this.La&&null!=c&&this.I[c])return{type:"ValueRef",value:this.I[c]};if(null===a||"boolean"==typeof a||ea(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 Nd){if(b=a.encode(t(this.da,this)),!(n(b)||r(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Fa(a,function(a){return this.da(a)},
|
|
this);else if(r(a)&&!q(a))b=oa(a,function(a){if(!q(a))return this.da(a)},this),ra(b,this.aa),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.La){Rd.reset();Rd.update(Ud.k(b));var c=Sd().toString(),d;this.I[c]?d=this.I[c]:(d=String(this.M.length),this.M.push([d,b]),this.I[c]=d);a[this.aa]=c;this.Sa.push(a);return{type:"ValueRef",value:d}}return b};var H=function(a,b,c){if(!(this instanceof H))return I(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.f=c||null};v(H,Nd);u("ee.ComputedObject",H);H.prototype.m=function(a){return Fd({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.f};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 Xd(this)};u("ee.ComputedObject.prototype.serialize",H.prototype.k);H.prototype.toString=function(){return"ee."+this.name()+"("+Yd(this)+")"};u("ee.ComputedObject.prototype.toString",H.prototype.toString);
|
|
H.prototype.name=function(){return"ComputedObject"};var Zd=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.f=b.f;return c},I=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var $d={},ae=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"},be=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}},ce=function(a){return ea(a)||
|
|
a instanceof H&&"Number"==a.name()},de=function(a){return p(a)||a instanceof H&&"String"==a.name()},fe=function(a){return r(a)&&!q(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var J=function(){if(!(this instanceof J))return new J};v(J,Nd);u("ee.Function",J);var ge=function(a){return a};J.prototype.call=function(a){return this.apply(he(this,Array.prototype.slice.call(arguments,0)))};u("ee.Function.prototype.call",J.prototype.call);J.prototype.apply=function(a){a=new H(this,ie(this,a));return ge(a,this.o().returns)};u("ee.Function.prototype.apply",J.prototype.apply);
|
|
var je=function(a,b,c){var d=l(b),e=a.o(),f=!1;if(1==c.length&&fe(c[0])){var g=e.args;d&&(g=g.slice(1));g.length&&(f=!((1==g.length||g[1].optional)&&"Dictionary"==g[0].type))}if(f){if(c=w(c[0]),d){d=e.args[0].name;if(d in c)throw Error("Named args for "+e.name+" can't contain keyword "+d);c[d]=b}}else c=he(a,d?[b].concat(c):c);return a.apply(c)},ie=function(a,b){for(var c=a.o().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&l(b[g]))d[g]=ge(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},he=function(a,b){var c=a.o().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};
|
|
J.prototype.toString=function(a,b){var c=this.o(),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("")};J.prototype.k=function(){return Xd(this)};var K=function(a,b){if(!l(b))return ke(a);if(!(this instanceof K))return I(K,arguments);this.N=sa(b);this.N.name=a};v(K,J);u("ee.ApiFunction",K);var L=function(a,b){return J.prototype.call.apply(ke(a),Array.prototype.slice.call(arguments,1))};u("ee.ApiFunction._call",L);var le=function(a,b){return ke(a).apply(b)};u("ee.ApiFunction._apply",le);K.prototype.encode=function(){return this.N.name};K.prototype.o=function(){return this.N};
|
|
var ma=null,me={},oe=function(){ne();return oa(ma,function(a){return a.o()})},pe=function(){ne();return na(function(a,b){return!me[b]})},ke=function(a){var b=qe(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};u("ee.ApiFunction.lookup",ke);
|
|
var qe=function(a){ne();return ma[a]||null},ne=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 K(b,a)}),a&&a())};a?F("/algorithms",null,c,"GET"):c(F("/algorithms",null,void 0,"GET"))}},M=function(a,b,c,d){ne();var e=d||"";la(ma,function(d,g){var m=g.split(".");if(2==m.length&&m[0]==b){var m=e+m[1],O=d.o();me[g]=!0;var ha=!1;
|
|
if(O.args.length)var T=O.args[0].type,ha="Object"!=T&&be(T,c);T=ha?a.prototype:a;m in T||(T[m]=function(a){return je(d,ha?this:void 0,Array.prototype.slice.call(arguments,0))},T[m].toString=t(d.toString,d,m,ha),T[m].signature=O)}})},N=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);re()};v(P,H);u("ee.Element",P);var se=!1,re=function(){se||(M(P,"Element","Element"),se=!0)};P.prototype.name=function(){return"Element"};
|
|
P.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=fe(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(fe(c)){b=this;for(var g in c)d=c[g],b=L("Element.set",b,g,d)}else if(c instanceof H&&qe("Element.setMulti"))b=L("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=L("Element.set",b,g,d)}return Zd(this,b)};u("ee.Element.prototype.set",P.prototype.set);var Q=function(a){if(!(this instanceof Q))return I(Q,arguments);if(a instanceof Q)return a;te();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 K("Filter.and"),{filters:a});this.T=a}else if(a instanceof H)H.call(this,a.b,a.c,a.f),this.T=[a];else{if(l(a))throw Error("Invalid argument specified for ee.Filter(): "+a);H.call(this,null,null);this.T=[]}};v(Q,H);u("ee.Filter",Q);
|
|
var ue=!1,te=function(){ue||(M(Q,"Filter","Filter"),ue=!0)},ve={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};Q.prototype.length=function(){return this.T.length};Q.prototype.length=Q.prototype.length;var R=function(a,b){var c=a.T.slice(0);b instanceof Q?La(c,b.T):b instanceof Array?La(c,b):c.push(b);return new Q(c)};Q.prototype.C=function(){return L("Filter.not",this)};Q.prototype.not=Q.prototype.C;
|
|
var we=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in ve))throw Error("Unknown filtering operator: "+b);a=L("Filter."+ve[b],a,c);return d?a.C():a};Q.metadata=we;var xe=function(a,b){return L("Filter.equals",a,b)};Q.eq=xe;var ye=function(a,b){return xe(a,b).C()};Q.neq=ye;var ze=function(a,b){return L("Filter.lessThan",a,b)};Q.lt=ze;var Ae=function(a,b){return ze(a,b).C()};Q.gte=Ae;var Be=function(a,b){return L("Filter.greaterThan",a,b)};
|
|
Q.gt=Be;var Ce=function(a,b){return Be(a,b).C()};Q.lte=Ce;var De=function(a,b){return L("Filter.stringContains",a,b)};Q.contains=De;var Ee=function(a,b){return De(a,b).C()};Q.not_contains=Ee;var Fe=function(a,b){return L("Filter.stringStartsWith",a,b)};Q.starts_with=Fe;var Ge=function(a,b){return Fe(a,b).C()};Q.not_starts_with=Ge;var He=function(a,b){return L("Filter.stringEndsWith",a,b)};Q.ends_with=He;var Ie=function(a,b){return He(a,b).C()};Q.not_ends_with=Ie;
|
|
var Je=function(a){return L("Filter.and",Array.prototype.slice.call(arguments))};Q.and=Je;Q.or=function(a){return L("Filter.or",Array.prototype.slice.call(arguments))};var Ke=function(a,b){var c=L("DateRange",a,b);return le("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};Q.date=Ke;var Le=function(a,b,c,d){return le("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};Q.inList=Le;
|
|
var Me=function(a,b){return le("Filter.intersects",{leftField:".all",rightValue:L("Feature",a),maxError:b})};Q.bounds=Me;Q.prototype.Fb=function(a){return R(this,xe.apply(null,[].slice.call(arguments)))};Q.prototype.eq=Q.prototype.Fb;Q.prototype.$b=function(a){return R(this,ye.apply(null,[].slice.call(arguments)))};Q.prototype.neq=Q.prototype.$b;Q.prototype.Wb=function(a){return R(this,ze.apply(null,[].slice.call(arguments)))};Q.prototype.lt=Q.prototype.Wb;
|
|
Q.prototype.Pb=function(a){return R(this,Ae.apply(null,[].slice.call(arguments)))};Q.prototype.gte=Q.prototype.Pb;Q.prototype.Ob=function(a){return R(this,Be.apply(null,[].slice.call(arguments)))};Q.prototype.gt=Q.prototype.Ob;Q.prototype.Xb=function(a){return R(this,Ce.apply(null,[].slice.call(arguments)))};Q.prototype.lte=Q.prototype.Xb;Q.prototype.contains=function(a){return R(this,De.apply(null,[].slice.call(arguments)))};Q.prototype.contains=Q.prototype.contains;
|
|
Q.prototype.ac=function(a){return R(this,Ee.apply(null,[].slice.call(arguments)))};Q.prototype.not_contains=Q.prototype.ac;Q.prototype.hc=function(a){return R(this,Fe.apply(null,[].slice.call(arguments)))};Q.prototype.starts_with=Q.prototype.hc;Q.prototype.cc=function(a){return R(this,Ge.apply(null,[].slice.call(arguments)))};Q.prototype.not_starts_with=Q.prototype.cc;Q.prototype.Eb=function(a){return R(this,He.apply(null,[].slice.call(arguments)))};Q.prototype.ends_with=Q.prototype.Eb;
|
|
Q.prototype.bc=function(a){return R(this,Ie.apply(null,[].slice.call(arguments)))};Q.prototype.not_ends_with=Q.prototype.bc;Q.prototype.wb=function(a){return R(this,Je.apply(null,[].slice.call(arguments)))};Q.prototype.and=Q.prototype.wb;Q.prototype.Cb=function(a){return R(this,Ke.apply(null,[].slice.call(arguments)))};Q.prototype.date=Q.prototype.Cb;Q.prototype.Rb=function(a){return R(this,Le.apply(null,[].slice.call(arguments)))};Q.prototype.inList=Q.prototype.Rb;
|
|
Q.prototype.bounds=function(a){return R(this,Me.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);Ne()};v(S,P);u("ee.Collection",S);var Oe=!1,Ne=function(){Oe||(M(S,"Collection","Collection"),M(S,"AggregateFeatureCollection","Collection","aggregate_"),Oe=!0)};S.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Zd(this,L("Collection.filter",this,a))};u("ee.Collection.prototype.filter",S.prototype.filter);S.prototype.Kb=function(a,b,c){return this.filter(we(a,b,c))};u("ee.Collection.prototype.filterMetadata",S.prototype.Kb);
|
|
S.prototype.Ib=function(a){return this.filter(Me(a))};u("ee.Collection.prototype.filterBounds",S.prototype.Ib);S.prototype.Jb=function(a,b){return this.filter(Ke(a,b))};u("ee.Collection.prototype.filterDate",S.prototype.Jb);S.prototype.limit=function(a,b,c){return Zd(this,L("Collection.limit",this,a,b,c))};u("ee.Collection.prototype.limit",S.prototype.limit);S.prototype.sort=function(a,b){return Zd(this,L("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 Zd(this,L("Collection.map",this,function(c){return a(new b(c))}))};u("ee.Collection.prototype.map",S.prototype.map);S.prototype.Tb=function(a,b){var c=l(b)?b:null,d=this.elementType();return L("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};u("ee.Collection.prototype.iterate",S.prototype.Tb);var Pe=function(a){if(!(this instanceof Pe))return I(Pe,arguments);if(a instanceof Pe)return a;Qe();if(ea(a))H.call(this,null,null),this.Na=a;else if(a instanceof H)H.call(this,a.b,a.c,a.f),this.Na=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};v(Pe,H);u("ee.Number",Pe);var Re=!1,Qe=function(){Re||(M(Pe,"Number","Number"),Re=!0)};Pe.prototype.encode=function(a){return ea(this.Na)?this.Na:Pe.q.encode.call(this,a)};Pe.prototype.name=function(){return"Number"};var U=function(a){if(!(this instanceof U))return I(U,arguments);if(a instanceof U)return a;Se();if(p(a))H.call(this,null,null),this.Ra=a;else if(a instanceof H)this.Ra=null,a.b&&"String"==a.b.o().returns?H.call(this,a.b,a.c,a.f):H.call(this,new K("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};v(U,H);u("ee.String",U);var Te=!1,Se=function(){Te||(M(U,"String","String"),Te=!0)};
|
|
U.prototype.encode=function(a){return p(this.Ra)?this.Ra:U.q.encode.call(this,a)};U.prototype.name=function(){return"String"};var Ue=function(a,b){if(!(this instanceof Ue))return I(Ue,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(Ve(g in $d?$d[g]:null,f.name))}if(!l(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.N=We(a,c,b);this.yb=b.apply(null,c)};v(Ue,J);u("ee.CustomFunction",Ue);Ue.prototype.encode=function(a){return{type:"Function",argumentNames:Fa(this.N.args,function(a){return a.name}),body:a(this.yb)}};Ue.prototype.o=function(){return this.N};
|
|
var Ve=function(a,b){a=a||Object;if(!(a.prototype instanceof H))if(a&&a!=Object)if(a==String)a=U;else if(a==Number)a=Pe;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.f=b;return c},Xe=function(a,b){var c=Fa(b,function(a){return{name:null,type:p(a)?a:ae(a)}}),c={name:"",returns:p("Object")?"Object":ae("Object"),args:c};return new Ue(c,a)},We=function(a,b,c){for(var d=
|
|
[],e=0;e<b.length;e++)null===b[e].f&&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=Wd(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].f=m;a.args[g].name=m}return a};var Ye=function(a,b){if(!(this instanceof Ye))return I(Ye,arguments);if(a instanceof Ye)return a;Ze();var c=new K("Date"),d={},e=null;if(de(a)){if(d.value=a,b)if(de(b))d.timeZone=b;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+b);}else if(ce(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.o().returns?(c=a.b,d=a.c,e=a.f):d.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);H.call(this,c,d,e)};v(Ye,H);u("ee.Date",Ye);var $e=!1,Ze=function(){$e||(M(Ye,"Date","Date"),$e=!0)};Ye.prototype.name=function(){return"Date"};var V=function(a,b,c){if(!(this instanceof V))return I(V,arguments);af();var d=null!=b||null!=c;if(a instanceof H&&!(a instanceof V&&a.ra)){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.f)}else{a instanceof V&&(a=a.encode());if(3<arguments.length)throw Error("The Geometry constructor takes at most 3 arguments ("+arguments.length+" given)");if(!bf(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));
|
|
H.call(this,null,null);this.ra=a.type;this.Ab=a.coordinates||null;this.Lb=a.geometries||null;if(null!=b)this.Pa=b;else if("crs"in a)if(r(a.crs)&&"name"==a.crs.type&&r(a.crs.properties)&&p(a.crs.properties.name))this.Pa=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new Ra).k(a.crs));this.Ga=c;!l(c)&&"geodesic"in a&&(this.Ga=Boolean(a.geodesic))}};v(V,H);u("ee.Geometry",V);
|
|
var cf=!1,af=function(){cf||(M(V,"Geometry","Geometry"),cf=!0)},df=function(a,b){if(!(this instanceof df))return ef(df,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]}V.call(this,{type:"Point",coordinates:[a,b]})};v(df,V);V.Point=df;
|
|
var ff=function(a){if(!(this instanceof ff))return ef(ff,arguments);V.call(this,{type:"MultiPoint",coordinates:gf(a,2,arguments)})};v(ff,V);V.MultiPoint=ff;var hf=function(a,b,c,d){if(!(this instanceof hf))return I(hf,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]}V.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]})};v(hf,V);V.Rectangle=hf;
|
|
var jf=function(a){if(!(this instanceof jf))return ef(jf,arguments);V.call(this,{type:"LineString",coordinates:gf(a,2,arguments)})};v(jf,V);V.LineString=jf;var kf=function(a){if(!(this instanceof kf))return ef(kf,arguments);V.call(this,{type:"LinearRing",coordinates:gf(a,2,arguments)})};v(kf,V);V.LinearRing=kf;var lf=function(a){if(!(this instanceof lf))return ef(lf,arguments);V.call(this,{type:"MultiLineString",coordinates:gf(a,3,arguments)})};v(lf,V);V.MultiLineString=lf;
|
|
var mf=function(a){if(!(this instanceof mf))return ef(mf,arguments);V.call(this,{type:"Polygon",coordinates:gf(a,3,arguments)})};v(mf,V);V.Polygon=mf;var nf=function(a){if(!(this instanceof nf))return ef(nf,arguments);V.call(this,{type:"MultiPolygon",coordinates:gf(a,4,arguments)})};v(nf,V);V.MultiPolygon=nf;
|
|
V.prototype.encode=function(a){if(!this.ra){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return H.prototype.encode.call(this,a)}a={type:this.ra};"GeometryCollection"==this.ra?a.geometries=this.Lb:a.coordinates=this.Ab;null!=this.Pa&&(a.crs={type:"name",properties:{name:this.Pa}});null!=this.Ga&&(a.geodesic=this.Ga);return a};V.prototype.ob=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};
|
|
V.prototype.toGeoJSON=V.prototype.ob;V.prototype.pb=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new Ra).k(this.ob())};V.prototype.toGeoJSONString=V.prototype.pb;V.prototype.k=function(){return Xd(this)};V.prototype.serialize=V.prototype.k;V.prototype.toString=function(){return"ee.Geometry("+this.pb()+")"};
|
|
var bf=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(!bf(b[a]))return!1;return!0}a=of(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},of=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=of(a[0]),c=1;c<a.length;c++)if(of(a[c])!=b)return-1;return b+1}for(c=0;c<a.length;c++)if(!ea(a[c]))return-1;return 0==
|
|
a.length%2?1:-1},gf=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(of(a)!=b)throw Error("Invalid geometry");return a},ef=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};V.prototype.name=function(){return"Geometry"};u("ee.Deserializer",function(){});u("ee.Deserializer.fromJSON",function(a){return pf(Pa(a))});var pf=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]=qf(f,b)}a=a.value}return qf(a,b)};u("ee.Deserializer.decode",pf);
|
|
var qf=function(a,b){if(null===a||ea(a)||"boolean"==typeof a||p(a))return a;if(n(a))return Fa(a,function(a){return qf(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 Ve(Object,c);case "Date":c=a.value;if(!ea(c))throw Error("Invalid date value: "+c);return new Ye(c/1E3);case "Bytes":return c=
|
|
new Nd,c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?ke(a.functionName):qf(a["function"],b),d=oa(a.arguments,function(a){return qf(a,b)});if(c instanceof J)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 qf(a,b)});case "Function":var e=qf(a.body,b),c={name:"",args:Fa(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};
|
|
return new Ue(c,function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new V(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var rf=function(a){if(!(this instanceof rf))return I(rf,arguments);if(a instanceof rf)return a;sf();if(fe(a))H.call(this,null,null),this.Ca=a;else if(a instanceof H)H.call(this,a.b,a.c,a.f),this.Ca=null;else throw Error("Invalid argument specified for ee.Dictionary(): "+a);};v(rf,H);u("ee.Dictionary",rf);var tf=!1,sf=function(){tf||(M(rf,"Dictionary","Dictionary"),tf=!0)};rf.prototype.encode=function(a){return null===this.Ca?rf.q.encode.call(this,a):a(this.Ca)};rf.prototype.name=function(){return"Dictionary"};var W=function(a,b){if(!(this instanceof W))return I(W,arguments);if(a instanceof W){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)");uf();if(a instanceof V||null===a)P.call(this,new K("Feature"),{geometry:a,metadata:b||null});else if(a instanceof H)P.call(this,a.b,a.c,a.f);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 K("Feature"),{geometry:new V(a.geometry),metadata:c})}else P.call(this,new K("Feature"),{geometry:new V(a),metadata:b||null})};v(W,P);u("ee.Feature",W);var vf=!1,uf=function(){vf||(M(W,"Feature","Feature"),vf=!0)};W.prototype.m=function(a){return W.q.m.call(this,a)};W.prototype.getInfo=W.prototype.m;W.prototype.getMap=function(a,b){return L("Collection",[this]).getMap(a,b)};
|
|
W.prototype.getMap=W.prototype.getMap;W.Point=function(a,b){return df.apply(null,arguments)};W.MultiPoint=function(a){return ff.apply(null,arguments)};W.Rectangle=function(a,b,c,d){return new hf(a,b,c,d)};W.LineString=function(a){return jf.apply(null,arguments)};W.LinearRing=function(a){return kf.apply(null,arguments)};W.MultiLine=function(a){return lf.apply(null,arguments)};W.Polygon=function(a){return mf.apply(null,arguments)};W.MultiPolygon=function(a){return nf.apply(null,arguments)};
|
|
W.prototype.name=function(){return"Feature"};var wf=function(a){if(!(this instanceof wf))return I(wf,arguments);if(a instanceof wf)return a;xf();if(n(a))H.call(this,null,null),this.Ma=a;else if(a instanceof H)H.call(this,a.b,a.c,a.f),this.Ma=null;else throw Error("Invalid argument specified for ee.List(): "+a);};v(wf,H);u("ee.List",wf);var yf=!1,xf=function(){yf||(M(wf,"List","List"),yf=!0)};wf.prototype.encode=function(a){return n(this.Ma)?Fa(this.Ma,function(b){return a(b)}):wf.q.encode.call(this,a)};wf.prototype.name=function(){return"List"};var X=function(a,b){if(!(this instanceof X))return I(X,arguments);if(a instanceof X)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");zf();a instanceof V&&(a=new W(a));a instanceof W&&(a=[a]);if(ce(a)||de(a)){var c={tableId:a};b&&(c.geometryColumn=b);S.call(this,new K("Collection.loadTable"),c)}else if(n(a))S.call(this,new K("Collection"),{features:Fa(a,function(a){return new W(a)})});else if(a instanceof wf)S.call(this,
|
|
new K("Collection"),{features:a});else if(a instanceof H)S.call(this,a.b,a.c,a.f);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};v(X,S);u("ee.FeatureCollection",X);var Af=!1,zf=function(){Af||(M(X,"FeatureCollection","FeatureCollection"),Af=!0)};X.prototype.getMap=function(a,b){var c=le("Collection.draw",{collection:this,color:(a||{}).color||"000000"});if(b)c.getMap(null,b);else return c.getMap()};X.prototype.getMap=X.prototype.getMap;
|
|
X.prototype.m=function(a){return X.q.m.call(this,a)};X.prototype.getInfo=X.prototype.m;X.prototype.Ha=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)Kd(e,function(a,b){a?d(Ld(a)):d(null,b)});else return Ld(Kd(e))};X.prototype.getDownloadURL=X.prototype.Ha;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"FeatureCollection"};
|
|
X.prototype.elementType=function(){return W};var Y=function(a){if(!(this instanceof Y))return I(Y,arguments);if(a instanceof Y)return a;Bf();var b=arguments.length;if(0==b||1==b&&!l(a))P.call(this,new K("Image.mask"),{image:new Y(0),mask:new Y(0)});else if(1==b)if(ce(a))P.call(this,new K("Image.constant"),{value:a});else if(de(a))P.call(this,new K("Image.load"),{id:a});else{if(n(a))return Cf(Fa(a,function(a){return new Y(a)}));if(a instanceof H)"Array"==a.name()?P.call(this,new K("Image.constant"),{value:a}):P.call(this,a.b,a.c,a.f);else throw Error("Unrecognized argument type to convert to an Image: "+
|
|
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(de(b)&&ce(c))P.call(this,new K("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 Df=!1,Bf=function(){Df||(M(Y,"Image","Image"),M(Y,"Window","Image","focal_"),Df=!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)Ed(c,t(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=Ed(c),c.image=this,c};Y.prototype.getMap=Y.prototype.getMap;Y.prototype.Ha=function(a,b){var c=a?w(a):{};c.image=this.k();if(b)Id(c,function(a,c){a?b(Jd(a)):b(null,c)});else return Jd(Id(c))};Y.prototype.getDownloadURL=Y.prototype.Ha;Y.prototype.Nb=function(a){a=a?w(a):{};a.image=this.k();return Hd(Gd(a))};Y.prototype.getThumbURL=Y.prototype.Nb;
|
|
Y.rgb=function(a,b,c){return Cf([a,b,c],["vis-red","vis-green","vis-blue"])};Y.cat=function(a){return Cf(Array.prototype.slice.call(arguments),null)};var Cf=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=L("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
Y.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||de(b[0])||ce(b[0])){for(var d=0;d<b.length;d++)if(!(de(b[d])||ce(b[d])||b[d]instanceof H))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return le("Image.select",c)};Y.prototype.select=Y.prototype.select;
|
|
Y.prototype.Hb=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=L("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE",c);e=new J;e.encode=function(a){return f.encode(a)};e.o=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.Hb;
|
|
Y.prototype.clip=function(a){try{a=new V(a)}catch(b){}return L("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 I(Z,arguments);if(a instanceof Z)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");Ef();a instanceof Y&&(a=[a]);if(de(a))S.call(this,new K("ImageCollection.load"),{id:a});else if(n(a))S.call(this,new K("ImageCollection.fromImages"),{images:Fa(a,function(a){return new Y(a)})});else if(a instanceof H)S.call(this,a.b,a.c,a.f);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+
|
|
a);};v(Z,S);u("ee.ImageCollection",Z);var Ff=!1,Ef=function(){Ff||(M(Z,"ImageCollection","ImageCollection"),M(Z,"reduce","ImageCollection"),Ff=!0)};Z.prototype.getMap=function(a,b){var c=L("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 Gf={};u("ee.Terrain",Gf);Gf.Ka=!1;Gf.Sb=function(){Gf.Ka||(M(Gf,"Terrain","Terrain"),Gf.Ka=!0)};Gf.reset=function(){N(Gf);Gf.Ka=!1};u("ee.initialize",function(a,b,c,d,e){if("ready"!=Hf||a||b){var f=null!=c;if(d)if(f)If.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Hf&&f)Jf.push(c);else if(Hf="loading",Cd(a,b,e),f)Jf.push(c),ne(Kf,Lf);else try{ne(),Kf()}catch(g){throw Lf(g),g;}}else c&&c()});
|
|
u("ee.reset",function(){Hf="not_ready";yd=wd=vd=ud=null;zd=[];xd=null;Ad=!1;ma=null;me={};N(Ye);$e=!1;N(rf);tf=!1;N(P);se=!1;N(Y);Df=!1;N(W);vf=!1;N(S);Oe=!1;N(Z);Ff=!1;N(X);Af=!1;N(Q);ue=!1;N(V);cf=!1;N(wf);yf=!1;N(Pe);Re=!1;N(U);Te=!1;Gf.reset();for(var a=k.ee,b=0;b<Mf.length;b++){var c=Mf[b];N(a[c]);delete a[c]}Mf=[];$d=a;var a=Nf,d;for(d in a)delete a[d]});u("ee.InitState",{nc:"not_ready",LOADING:"loading",oc:"ready"});u("ee.InitState.NOT_READY","not_ready");u("ee.InitState.LOADING","loading");
|
|
u("ee.InitState.READY","ready");var Hf="not_ready",Jf=[],If=[];u("ee.TILE_SIZE",256);var Mf=[],Nf={};u("ee.Algorithms",Nf);u("ee.call",function(a,b){p(a)&&(a=new K(a));return J.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))});u("ee.apply",function(a,b){p(a)&&(a=new K(a));return a.apply(b)});
|
|
var Kf=function(){if("loading"==Hf){try{Ze();sf();re();Bf();uf();Ne();Ef();zf();te();af();xf();Qe();Se();Gf.Sb();var a=oe(),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]=Of(g),Mf.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,me[g]=!0):f[g].signature={});$d=f;Pf()}catch(m){Lf(m);return}Hf="ready";for(If=[];0<Jf.length;)Jf.shift()()}},Lf=function(a){if("loading"==
|
|
Hf)for(Hf="not_ready",Jf=[];0<If.length;)If.shift()(a)},Pf=function(){var a=pe();qa(a).sort().forEach(function(b){var c=a[b],d=c.o();if(!d.hidden){b=b.split(".");var e=Nf;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=Ma(b,1)}f=function(a){return je(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=t(c.toString,c);e[b[0]]=f}})},Of=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 I(d,e);var d=qe(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,ie(d,he(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.f)}};v(b,H);b.prototype.name=function(){return a};M(b,a,a);return b},ge=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?L("Feature",L("Collection.geometry",a)):new W(a);case "Element":if(a instanceof P)return a;if(a instanceof H)return new P(a.b,a.c,a.f);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof X?L("Collection.geometry",a):new V(a);case "FeatureCollection":case "Collection":return a instanceof S?a:new X(a);case "ImageCollection":return new Z(a);case "Filter":return new Q(a);case "Algorithm":if(p(a))return new K(a);if(q(a)){for(var c=a.length,
|
|
d=[],e=0;e<c;e++)d[e]="Object";return Xe(a,d)}if(a instanceof Nd)return a;throw Error("Argument is not a function: "+a);case "String":return de(a)||a instanceof U||a instanceof H?new U(a):a;case "Dictionary":return fe(a)?a:new rf(a);case "List":return new wf(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new Pe(a);default:if(b in c){d=qe(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
|