This commit is contained in:
Eric Engle 2016-06-02 15:13:44 -07:00
parent 90cd1b6e0f
commit 8a10c3bab3
19 changed files with 1214 additions and 1061 deletions

View File

@ -2,108 +2,108 @@
typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},da=function(a){return null!=a},n=function(a){return"array"==ca(a)},ea=function(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},q=function(a){return"number"==typeof a},r=function(a){return"function"==ca(a)},t=function(a){var b=typeof a;return"object"==b&&null!=a||
"function"==b},fa="closure_uid_"+(1E9*Math.random()>>>0),ga=0,ha=function(a,b,c){return a.call.apply(a.bind,arguments)},ia=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)}},u=function(a,b,c){u=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?
ha:ia;return u.apply(null,arguments)},ja=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}},ka=Date.now||function(){return+new Date},w=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&&m(b)?d[e]=b:d=d[e]?d[e]:d[e]={}},x=function(a,b){function c(){}c.prototype=b.prototype;a.l=b.prototype;a.prototype=new c;a.prototype.constructor=
a;a.je=function(a,c,f){for(var g=Array(arguments.length-2),l=2;l<arguments.length;l++)g[l-2]=arguments[l];return b.prototype[c].apply(a,g)}};var la=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},ma=function(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c},na=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},oa=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},pa=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},qa=function(a){return null!==a&&"withCredentials"in a},ra=function(a){for(var b in a)return!1;return!0},sa=function(a,b){b in a&&delete a[b]},ta=function(a){var b=
{},c;for(c in a)b[c]=a[c];return b},ua=function(a){var b=ca(a);if("object"==b||"array"==b){if(r(a.clone))return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=ua(a[c]);return b}return a},va="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),wa=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<va.length;f++)c=va[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var xa=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,xa);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};x(xa,Error);xa.prototype.name="CustomError";var ya;var za=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},Aa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ia=function(a){if(!Ba.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ca,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Da,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Ea,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Fa,"&quot;"));-1!=a.indexOf("'")&&
(a=a.replace(Ga,"&#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(Ha,"&#0;"));return a},Ca=/&/g,Da=/</g,Ea=/>/g,Fa=/"/g,Ga=/'/g,Ha=/\x00/g,Ba=/[\x00&<>"']/,Ja=function(a,b){return a<b?-1:a>b?1:0};var Ka=function(a,b){b.unshift(a);xa.call(this,za.apply(null,b));b.shift()};x(Ka,xa);Ka.prototype.name="AssertionError";
var La=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 Ka(""+e,f||[]);},y=function(a,b,c){a||La("",null,b,Array.prototype.slice.call(arguments,2));return a},Ma=function(a,b){throw new Ka("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Na=function(a,b,c){q(a)||La("Expected number but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2));return a},Oa=function(a,b,c){r(a)||La("Expected function but got %s: %s.",[ca(a),
a],b,Array.prototype.slice.call(arguments,2))},Pa=function(a,b,c){t(a)||La("Expected object but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))},Qa=function(a,b,c){n(a)||La("Expected array but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var Ra=Array.prototype.indexOf?function(a,b,c){y(null!=a.length);return Array.prototype.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},Sa=Array.prototype.lastIndexOf?function(a,b,c){y(null!=a.length);return Array.prototype.lastIndexOf.call(a,b,null==c?a.length-1:c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if(p(a))return p(b)&&1==
b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1},Ta=Array.prototype.forEach?function(a,b,c){y(null!=a.length);Array.prototype.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)},Ua=Array.prototype.filter?function(a,b,c){y(null!=a.length);return Array.prototype.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=p(a)?a.split(""):a,l=0;l<d;l++)if(l in g){var v=g[l];b.call(c,v,l,a)&&(e[f++]=
v)}return e},Va=Array.prototype.map?function(a,b,c){y(null!=a.length);return Array.prototype.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},Wa=Array.prototype.some?function(a,b,c){y(null!=a.length);return Array.prototype.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},Xa=Array.prototype.every?function(a,b,c){y(null!=a.length);
return Array.prototype.every.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!1;return!0},Za=function(a){var b;a:{b=Ya;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 a}b=-1}return 0>b?null:p(a)?a.charAt(b):a[b]},$a=function(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},bb=function(a,b){var c=Ra(a,b),d;(d=0<=c)&&ab(a,c);return d},ab=function(a,b){y(null!=a.length);
Array.prototype.splice.call(a,b,1)},cb=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)},db=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]},eb=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(ea(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)}},fb=function(a,b,c){y(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,
b,c)},gb=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],f;f=e;f=t(f)?"o"+(f[fa]||(f[fa]=++ga)):(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c};var z=function(){this.aa=this.aa;this.pb=this.pb};z.prototype.aa=!1;z.prototype.P=function(){this.aa||(this.aa=!0,this.s())};z.prototype.s=function(){if(this.pb)for(;this.pb.length;)this.pb.shift()()};var hb=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.wa=!1;this.kd=!0};hb.prototype.preventDefault=function(){this.defaultPrevented=!0;this.kd=!1};var ib=function(a){ib[" "](a);return a};ib[" "]=ba;var jb;a:{var kb=k.navigator;if(kb){var lb=kb.userAgent;if(lb){jb=lb;break a}}jb=""}var A=function(a){return-1!=jb.indexOf(a)};var mb=A("Opera"),nb=A("Trident")||A("MSIE"),ob=A("Edge"),pb=A("Gecko")&&!(-1!=jb.toLowerCase().indexOf("webkit")&&!A("Edge"))&&!(A("Trident")||A("MSIE"))&&!A("Edge"),qb=-1!=jb.toLowerCase().indexOf("webkit")&&!A("Edge"),rb=function(){var a=k.document;return a?a.documentMode:void 0},sb;
a:{var tb="",ub=function(){var a=jb;if(pb)return/rv\:([^\);]+)(\)|;)/.exec(a);if(ob)return/Edge\/([\d\.]+)/.exec(a);if(nb)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(qb)return/WebKit\/(\S+)/.exec(a);if(mb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();ub&&(tb=ub?ub[1]:"");if(nb){var wb=rb();if(null!=wb&&wb>parseFloat(tb)){sb=String(wb);break a}}sb=tb}
var xb=sb,yb={},zb=function(a){var b;if(!(b=yb[a])){b=0;for(var c=Aa(String(xb)).split("."),d=Aa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",l=d[f]||"",v=RegExp("(\\d*)(\\D*)","g"),Q=RegExp("(\\d*)(\\D*)","g");do{var K=v.exec(g)||["","",""],vb=Q.exec(l)||["","",""];if(0==K[0].length&&0==vb[0].length)break;b=Ja(0==K[1].length?0:parseInt(K[1],10),0==vb[1].length?0:parseInt(vb[1],10))||Ja(0==K[2].length,0==vb[2].length)||Ja(K[2],vb[2])}while(0==b)}b=yb[a]=0<=
b}return b},Ab=k.document,Bb=Ab&&nb?rb()||("CSS1Compat"==Ab.compatMode?parseInt(xb,10):5):void 0;var Cb=!nb||9<=Number(Bb),Db=nb&&!zb("9");!qb||zb("528");pb&&zb("1.9b")||nb&&zb("8")||mb&&zb("9.5")||qb&&zb("528");pb&&!zb("8")||nb&&zb("9");var Eb=function(a,b){hb.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.fa=this.state=null;if(a){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;if(e){if(pb){var f;a:{try{ib(e.nodeName);f=!0;break a}catch(g){}f=
!1}f||(e=null)}}else"mouseover"==c?e=a.fromElement:"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;null===d?(this.offsetX=qb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=qb||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.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||
0,this.screenY=d.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.fa=a;a.defaultPrevented&&this.preventDefault()}};x(Eb,hb);
Eb.prototype.preventDefault=function(){Eb.l.preventDefault.call(this);var a=this.fa;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Db)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Fb="closure_listenable_"+(1E6*Math.random()|0),Gb=function(a){return!(!a||!a[Fb])},Hb=0;var Ib=function(a,b,c,d,e){this.listener=a;this.rb=null;this.src=b;this.type=c;this.Za=!!d;this.ib=e;this.key=++Hb;this.xa=this.Ya=!1},Jb=function(a){a.xa=!0;a.listener=null;a.rb=null;a.src=null;a.ib=null};var Kb=function(a){this.src=a;this.D={};this.Ta=0};Kb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.D[f];a||(a=this.D[f]=[],this.Ta++);var g=Lb(a,b,d,e);-1<g?(b=a[g],c||(b.Ya=!1)):(b=new Ib(b,this.src,f,!!d,e),b.Ya=c,a.push(b));return b};Kb.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.D))return!1;var e=this.D[a];b=Lb(e,b,c,d);return-1<b?(Jb(e[b]),ab(e,b),0==e.length&&(delete this.D[a],this.Ta--),!0):!1};
var Mb=function(a,b){var c=b.type;c in a.D&&bb(a.D[c],b)&&(Jb(b),0==a.D[c].length&&(delete a.D[c],a.Ta--))};Kb.prototype.Pa=function(a){a=a&&a.toString();var b=0,c;for(c in this.D)if(!a||c==a){for(var d=this.D[c],e=0;e<d.length;e++)++b,Jb(d[e]);delete this.D[c];this.Ta--}return b};Kb.prototype.Ha=function(a,b,c,d){a=this.D[a.toString()];var e=-1;a&&(e=Lb(a,b,c,d));return-1<e?a[e]:null};var Lb=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.xa&&f.listener==b&&f.Za==!!c&&f.ib==d)return e}return-1};var Nb="closure_lm_"+(1E6*Math.random()|0),Ob={},Pb=0,Qb=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)Qb(a,b[f],c,d,e);return null}c=Rb(c);return Gb(a)?a.Oa(b,c,d,e):Sb(a,b,c,!1,d,e)},Sb=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e,l=Tb(a);l||(a[Nb]=l=new Kb(a));c=l.add(b,c,d,e,f);if(c.rb)return c;d=Ub();c.rb=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent(Vb(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
Pb++;return c},Ub=function(){var a=Wb,b=Cb?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},Xb=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)Xb(a,b[f],c,d,e);return null}c=Rb(c);return Gb(a)?a.mb(b,c,d,e):Sb(a,b,c,!0,d,e)},Yb=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)Yb(a,b[f],c,d,e);else c=Rb(c),Gb(a)?a.Bb(b,c,d,e):a&&(a=Tb(a))&&(b=a.Ha(b,c,!!d,e))&&Zb(b)},Zb=function(a){if(!q(a)&&a&&!a.xa){var b=a.src;if(Gb(b))Mb(b.R,
a);else{var c=a.type,d=a.rb;b.removeEventListener?b.removeEventListener(c,d,a.Za):b.detachEvent&&b.detachEvent(Vb(c),d);Pb--;(c=Tb(b))?(Mb(c,a),0==c.Ta&&(c.src=null,b[Nb]=null)):Jb(a)}}},Vb=function(a){return a in Ob?Ob[a]:Ob[a]="on"+a},ac=function(a,b,c,d){var e=!0;if(a=Tb(a))if(b=a.D[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.Za==c&&!f.xa&&(f=$b(f,d),e=e&&!1!==f)}return e},$b=function(a,b){var c=a.listener,d=a.ib||a.src;a.Ya&&Zb(a);return c.call(d,b)},Wb=function(a,b){if(a.xa)return!0;
if(!Cb){var c;if(!(c=b))a:{c=["window","event"];for(var d=k,e;e=c.shift();)if(null!=d[e])d=d[e];else{c=null;break a}c=d}e=c;c=new Eb(e,this);d=!0;if(!(0>e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(v){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,g=e.length-1;!c.wa&&0<=g;g--){c.currentTarget=e[g];var l=ac(e[g],f,!0,c),d=d&&l}for(g=0;!c.wa&&g<e.length;g++)c.currentTarget=e[g],
l=ac(e[g],f,!1,c),d=d&&l}return d}return $b(a,new Eb(b,this))},Tb=function(a){a=a[Nb];return a instanceof Kb?a:null},bc="__closure_events_fn_"+(1E9*Math.random()>>>0),Rb=function(a){y(a,"Listener can not be null.");if(r(a))return a;y(a.handleEvent,"An object listener must have handleEvent method.");a[bc]||(a[bc]=function(b){return a.handleEvent(b)});return a[bc]};var cc=function(){z.call(this);this.R=new Kb(this);this.td=this;this.gc=null};x(cc,z);cc.prototype[Fb]=!0;h=cc.prototype;h.addEventListener=function(a,b,c,d){Qb(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){Yb(this,a,b,c,d)};
h.dispatchEvent=function(a){dc(this);var b,c=this.gc;if(c){b=[];for(var d=1;c;c=c.gc)b.push(c),y(1E3>++d,"infinite loop")}c=this.td;d=a.type||a;if(p(a))a=new hb(a,c);else if(a instanceof hb)a.target=a.target||c;else{var e=a;a=new hb(d,c);wa(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.wa&&0<=g;g--)f=a.currentTarget=b[g],e=ec(f,d,!0,a)&&e;a.wa||(f=a.currentTarget=c,e=ec(f,d,!0,a)&&e,a.wa||(e=ec(f,d,!1,a)&&e));if(b)for(g=0;!a.wa&&g<b.length;g++)f=a.currentTarget=b[g],e=ec(f,d,!1,a)&&e;return e};
h.s=function(){cc.l.s.call(this);this.R&&this.R.Pa(void 0);this.gc=null};h.Oa=function(a,b,c,d){dc(this);return this.R.add(String(a),b,!1,c,d)};h.mb=function(a,b,c,d){return this.R.add(String(a),b,!0,c,d)};h.Bb=function(a,b,c,d){return this.R.remove(String(a),b,c,d)};var ec=function(a,b,c,d){b=a.R.D[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.xa&&g.Za==c){var l=g.listener,v=g.ib||g.src;g.Ya&&Mb(a.R,g);e=!1!==l.call(v,d)&&e}}return e&&0!=d.kd};
cc.prototype.Ha=function(a,b,c,d){return this.R.Ha(String(a),b,c,d)};var dc=function(a){y(a.R,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var fc=function(a,b,c){this.Ld=c;this.Cd=a;this.Wd=b;this.ob=0;this.jb=null};fc.prototype.get=function(){var a;0<this.ob?(this.ob--,a=this.jb,this.jb=a.next,a.next=null):a=this.Cd();return a};fc.prototype.put=function(a){this.Wd(a);this.ob<this.Ld&&(this.ob++,a.next=this.jb,this.jb=a)};var gc=function(a){return a};var hc=function(a){k.setTimeout(function(){throw a;},0)},ic,jc=function(){var a=k.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!A("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;a.je=function(a,c,f){for(var g=Array(arguments.length-2),l=2;l<arguments.length;l++)g[l-2]=arguments[l];return b.prototype[c].apply(a,g)}};var la=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},ma=function(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c},na=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},oa=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},pa=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},qa=function(a){for(var b in a)return!1;return!0},ra=function(a,b){b in a&&delete a[b]},sa=function(a){var b={},c;for(c in a)b[c]=a[c];return b},ta=function(a){var b=
ca(a);if("object"==b||"array"==b){if(r(a.clone))return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=ta(a[c]);return b}return a},ua="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),va=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<ua.length;f++)c=ua[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var wa=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,wa);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};x(wa,Error);wa.prototype.name="CustomError";var xa;var ya=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")},za=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ha=function(a){if(!Aa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ba,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Ca,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Da,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Ea,"&quot;"));-1!=a.indexOf("'")&&
(a=a.replace(Fa,"&#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(Ga,"&#0;"));return a},Ba=/&/g,Ca=/</g,Da=/>/g,Ea=/"/g,Fa=/'/g,Ga=/\x00/g,Aa=/[\x00&<>"']/,Ia=function(a,b){return a<b?-1:a>b?1:0};var Ja=function(a,b){b.unshift(a);wa.call(this,ya.apply(null,b));b.shift()};x(Ja,wa);Ja.prototype.name="AssertionError";
var Ka=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 Ja(""+e,f||[]);},y=function(a,b,c){a||Ka("",null,b,Array.prototype.slice.call(arguments,2));return a},La=function(a,b){throw new Ja("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Ma=function(a,b,c){q(a)||Ka("Expected number but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2));return a},Na=function(a,b,c){r(a)||Ka("Expected function but got %s: %s.",[ca(a),
a],b,Array.prototype.slice.call(arguments,2))},Oa=function(a,b,c){t(a)||Ka("Expected object but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))},Pa=function(a,b,c){n(a)||Ka("Expected array but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var Qa=Array.prototype.indexOf?function(a,b,c){y(null!=a.length);return Array.prototype.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},Ra=Array.prototype.lastIndexOf?function(a,b,c){y(null!=a.length);return Array.prototype.lastIndexOf.call(a,b,null==c?a.length-1:c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if(p(a))return p(b)&&1==
b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1},Sa=Array.prototype.forEach?function(a,b,c){y(null!=a.length);Array.prototype.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)},Ta=Array.prototype.filter?function(a,b,c){y(null!=a.length);return Array.prototype.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=p(a)?a.split(""):a,l=0;l<d;l++)if(l in g){var v=g[l];b.call(c,v,l,a)&&(e[f++]=
v)}return e},Ua=Array.prototype.map?function(a,b,c){y(null!=a.length);return Array.prototype.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},Va=Array.prototype.some?function(a,b,c){y(null!=a.length);return Array.prototype.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},Wa=Array.prototype.every?function(a,b,c){y(null!=a.length);
return Array.prototype.every.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!1;return!0},Ya=function(a){var b;a:{b=Xa;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 a}b=-1}return 0>b?null:p(a)?a.charAt(b):a[b]},Za=function(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},ab=function(a,b){var c=Qa(a,b),d;(d=0<=c)&&$a(a,c);return d},$a=function(a,b){y(null!=a.length);
Array.prototype.splice.call(a,b,1)},bb=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)},cb=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]},db=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(ea(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)}},eb=function(a,b,c){y(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,
b,c)},fb=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],f;f=e;f=t(f)?"o"+(f[fa]||(f[fa]=++ga)):(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c};var z=function(){this.aa=this.aa;this.pb=this.pb};z.prototype.aa=!1;z.prototype.P=function(){this.aa||(this.aa=!0,this.s())};z.prototype.s=function(){if(this.pb)for(;this.pb.length;)this.pb.shift()()};var gb=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.wa=!1;this.kd=!0};gb.prototype.preventDefault=function(){this.defaultPrevented=!0;this.kd=!1};var hb=function(a){hb[" "](a);return a};hb[" "]=ba;var ib;a:{var jb=k.navigator;if(jb){var kb=jb.userAgent;if(kb){ib=kb;break a}}ib=""}var A=function(a){return-1!=ib.indexOf(a)};var lb=A("Opera"),mb=A("Trident")||A("MSIE"),nb=A("Edge"),ob=A("Gecko")&&!(-1!=ib.toLowerCase().indexOf("webkit")&&!A("Edge"))&&!(A("Trident")||A("MSIE"))&&!A("Edge"),pb=-1!=ib.toLowerCase().indexOf("webkit")&&!A("Edge"),qb=function(){var a=k.document;return a?a.documentMode:void 0},rb;
a:{var sb="",tb=function(){var a=ib;if(ob)return/rv\:([^\);]+)(\)|;)/.exec(a);if(nb)return/Edge\/([\d\.]+)/.exec(a);if(mb)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(pb)return/WebKit\/(\S+)/.exec(a);if(lb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();tb&&(sb=tb?tb[1]:"");if(mb){var ub=qb();if(null!=ub&&ub>parseFloat(sb)){rb=String(ub);break a}}rb=sb}
var wb=rb,xb={},yb=function(a){var b;if(!(b=xb[a])){b=0;for(var c=za(String(wb)).split("."),d=za(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",l=d[f]||"",v=RegExp("(\\d*)(\\D*)","g"),Q=RegExp("(\\d*)(\\D*)","g");do{var L=v.exec(g)||["","",""],vb=Q.exec(l)||["","",""];if(0==L[0].length&&0==vb[0].length)break;b=Ia(0==L[1].length?0:parseInt(L[1],10),0==vb[1].length?0:parseInt(vb[1],10))||Ia(0==L[2].length,0==vb[2].length)||Ia(L[2],vb[2])}while(0==b)}b=xb[a]=0<=
b}return b},zb=k.document,Ab=zb&&mb?qb()||("CSS1Compat"==zb.compatMode?parseInt(wb,10):5):void 0;var Bb=!mb||9<=Number(Ab),Cb=mb&&!yb("9");!pb||yb("528");ob&&yb("1.9b")||mb&&yb("8")||lb&&yb("9.5")||pb&&yb("528");ob&&!yb("8")||mb&&yb("9");var Db=function(a,b){gb.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.fa=this.state=null;if(a){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;if(e){if(ob){var f;a:{try{hb(e.nodeName);f=!0;break a}catch(g){}f=
!1}f||(e=null)}}else"mouseover"==c?e=a.fromElement:"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;null===d?(this.offsetX=pb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=pb||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.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||
0,this.screenY=d.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.fa=a;a.defaultPrevented&&this.preventDefault()}};x(Db,gb);
Db.prototype.preventDefault=function(){Db.l.preventDefault.call(this);var a=this.fa;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Cb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Eb="closure_listenable_"+(1E6*Math.random()|0),Fb=function(a){return!(!a||!a[Eb])},Gb=0;var Hb=function(a,b,c,d,e){this.listener=a;this.rb=null;this.src=b;this.type=c;this.Za=!!d;this.ib=e;this.key=++Gb;this.xa=this.Ya=!1},Ib=function(a){a.xa=!0;a.listener=null;a.rb=null;a.src=null;a.ib=null};var Jb=function(a){this.src=a;this.D={};this.Ta=0};Jb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.D[f];a||(a=this.D[f]=[],this.Ta++);var g=Kb(a,b,d,e);-1<g?(b=a[g],c||(b.Ya=!1)):(b=new Hb(b,this.src,f,!!d,e),b.Ya=c,a.push(b));return b};Jb.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.D))return!1;var e=this.D[a];b=Kb(e,b,c,d);return-1<b?(Ib(e[b]),$a(e,b),0==e.length&&(delete this.D[a],this.Ta--),!0):!1};
var Lb=function(a,b){var c=b.type;c in a.D&&ab(a.D[c],b)&&(Ib(b),0==a.D[c].length&&(delete a.D[c],a.Ta--))};Jb.prototype.Pa=function(a){a=a&&a.toString();var b=0,c;for(c in this.D)if(!a||c==a){for(var d=this.D[c],e=0;e<d.length;e++)++b,Ib(d[e]);delete this.D[c];this.Ta--}return b};Jb.prototype.Ha=function(a,b,c,d){a=this.D[a.toString()];var e=-1;a&&(e=Kb(a,b,c,d));return-1<e?a[e]:null};var Kb=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.xa&&f.listener==b&&f.Za==!!c&&f.ib==d)return e}return-1};var Mb="closure_lm_"+(1E6*Math.random()|0),Nb={},Ob=0,Pb=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)Pb(a,b[f],c,d,e);return null}c=Qb(c);return Fb(a)?a.Oa(b,c,d,e):Rb(a,b,c,!1,d,e)},Rb=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e,l=Sb(a);l||(a[Mb]=l=new Jb(a));c=l.add(b,c,d,e,f);if(c.rb)return c;d=Tb();c.rb=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent(Ub(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
Ob++;return c},Tb=function(){var a=Vb,b=Bb?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},Wb=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)Wb(a,b[f],c,d,e);return null}c=Qb(c);return Fb(a)?a.mb(b,c,d,e):Rb(a,b,c,!0,d,e)},Xb=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)Xb(a,b[f],c,d,e);else c=Qb(c),Fb(a)?a.Bb(b,c,d,e):a&&(a=Sb(a))&&(b=a.Ha(b,c,!!d,e))&&Yb(b)},Yb=function(a){if(!q(a)&&a&&!a.xa){var b=a.src;if(Fb(b))Lb(b.R,
a);else{var c=a.type,d=a.rb;b.removeEventListener?b.removeEventListener(c,d,a.Za):b.detachEvent&&b.detachEvent(Ub(c),d);Ob--;(c=Sb(b))?(Lb(c,a),0==c.Ta&&(c.src=null,b[Mb]=null)):Ib(a)}}},Ub=function(a){return a in Nb?Nb[a]:Nb[a]="on"+a},$b=function(a,b,c,d){var e=!0;if(a=Sb(a))if(b=a.D[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.Za==c&&!f.xa&&(f=Zb(f,d),e=e&&!1!==f)}return e},Zb=function(a,b){var c=a.listener,d=a.ib||a.src;a.Ya&&Yb(a);return c.call(d,b)},Vb=function(a,b){if(a.xa)return!0;
if(!Bb){var c;if(!(c=b))a:{c=["window","event"];for(var d=k,e;e=c.shift();)if(null!=d[e])d=d[e];else{c=null;break a}c=d}e=c;c=new Db(e,this);d=!0;if(!(0>e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(v){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,g=e.length-1;!c.wa&&0<=g;g--){c.currentTarget=e[g];var l=$b(e[g],f,!0,c),d=d&&l}for(g=0;!c.wa&&g<e.length;g++)c.currentTarget=e[g],
l=$b(e[g],f,!1,c),d=d&&l}return d}return Zb(a,new Db(b,this))},Sb=function(a){a=a[Mb];return a instanceof Jb?a:null},ac="__closure_events_fn_"+(1E9*Math.random()>>>0),Qb=function(a){y(a,"Listener can not be null.");if(r(a))return a;y(a.handleEvent,"An object listener must have handleEvent method.");a[ac]||(a[ac]=function(b){return a.handleEvent(b)});return a[ac]};var bc=function(){z.call(this);this.R=new Jb(this);this.ud=this;this.gc=null};x(bc,z);bc.prototype[Eb]=!0;h=bc.prototype;h.addEventListener=function(a,b,c,d){Pb(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){Xb(this,a,b,c,d)};
h.dispatchEvent=function(a){cc(this);var b,c=this.gc;if(c){b=[];for(var d=1;c;c=c.gc)b.push(c),y(1E3>++d,"infinite loop")}c=this.ud;d=a.type||a;if(p(a))a=new gb(a,c);else if(a instanceof gb)a.target=a.target||c;else{var e=a;a=new gb(d,c);va(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.wa&&0<=g;g--)f=a.currentTarget=b[g],e=dc(f,d,!0,a)&&e;a.wa||(f=a.currentTarget=c,e=dc(f,d,!0,a)&&e,a.wa||(e=dc(f,d,!1,a)&&e));if(b)for(g=0;!a.wa&&g<b.length;g++)f=a.currentTarget=b[g],e=dc(f,d,!1,a)&&e;return e};
h.s=function(){bc.l.s.call(this);this.R&&this.R.Pa(void 0);this.gc=null};h.Oa=function(a,b,c,d){cc(this);return this.R.add(String(a),b,!1,c,d)};h.mb=function(a,b,c,d){return this.R.add(String(a),b,!0,c,d)};h.Bb=function(a,b,c,d){return this.R.remove(String(a),b,c,d)};var dc=function(a,b,c,d){b=a.R.D[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.xa&&g.Za==c){var l=g.listener,v=g.ib||g.src;g.Ya&&Lb(a.R,g);e=!1!==l.call(v,d)&&e}}return e&&0!=d.kd};
bc.prototype.Ha=function(a,b,c,d){return this.R.Ha(String(a),b,c,d)};var cc=function(a){y(a.R,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var ec=function(a,b,c){this.Md=c;this.Dd=a;this.Xd=b;this.ob=0;this.jb=null};ec.prototype.get=function(){var a;0<this.ob?(this.ob--,a=this.jb,this.jb=a.next,a.next=null):a=this.Dd();return a};ec.prototype.put=function(a){this.Xd(a);this.ob<this.Md&&(this.ob++,a.next=this.jb,this.jb=a)};var fc=function(a){return a};var gc=function(a){k.setTimeout(function(){throw a;},0)},hc,ic=function(){var a=k.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!A("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=u(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&&!A("Trident")&&!A("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(m(c.next)){c=c.next;var a=c.wc;c.wc=null;a()}};return function(a){d.next={wc: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 kc=function(){this.Db=this.na=null},mc=new fc(function(){return new lc},function(a){a.reset()},100);kc.prototype.add=function(a,b){var c=mc.get();c.set(a,b);this.Db?this.Db.next=c:(y(!this.na),this.na=c);this.Db=c};kc.prototype.remove=function(){var a=null;this.na&&(a=this.na,this.na=this.na.next,this.na||(this.Db=null),a.next=null);return a};var lc=function(){this.next=this.scope=this.Wb=null};lc.prototype.set=function(a,b){this.Wb=a;this.scope=b;this.next=null};
lc.prototype.reset=function(){this.next=this.scope=this.Wb=null};var rc=function(a,b){nc||oc();pc||(nc(),pc=!0);qc.add(a,b)},nc,oc=function(){if(k.Promise&&k.Promise.resolve){var a=k.Promise.resolve(void 0);nc=function(){a.then(sc)}}else nc=function(){var a=sc;!r(k.setImmediate)||k.Window&&k.Window.prototype&&!A("Edge")&&k.Window.prototype.setImmediate==k.setImmediate?(ic||(ic=jc()),ic(a)):k.setImmediate(a)}},pc=!1,qc=new kc,sc=function(){for(var a;a=qc.remove();){try{a.Wb.call(a.scope)}catch(b){hc(b)}mc.put(a)}pc=!1};var tc=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},uc=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var xc=function(a,b){this.I=0;this.Z=void 0;this.qa=this.V=this.j=null;this.gb=this.Sb=!1;if(a!=ba)try{var c=this;a.call(b,function(a){vc(c,2,a)},function(a){if(!(a instanceof wc))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}vc(c,3,a)})}catch(d){vc(this,3,d)}},yc=function(){this.next=this.context=this.ta=this.ka=this.ea=null;this.Xa=!1};yc.prototype.reset=function(){this.context=this.ta=this.ka=this.ea=null;this.Xa=!1};
var zc=new fc(function(){return new yc},function(a){a.reset()},100),Ac=function(a,b,c){var d=zc.get();d.ka=a;d.ta=b;d.context=c;return d};xc.prototype.then=function(a,b,c){null!=a&&Oa(a,"opt_onFulfilled should be a function.");null!=b&&Oa(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return Bc(this,r(a)?a:null,r(b)?b:null,c)};tc(xc);xc.prototype.cancel=function(a){0==this.I&&rc(function(){var b=new wc(a);Cc(this,b)},this)};
var Cc=function(a,b){if(0==a.I)if(a.j){var c=a.j;if(c.V){for(var d=0,e=null,f=null,g=c.V;g&&(g.Xa||(d++,g.ea==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.I&&1==d?Cc(c,b):(f?(d=f,y(c.V),y(null!=d),d.next==c.qa&&(c.qa=d),d.next=d.next.next):Dc(c),Ec(c,e,3,b)))}a.j=null}else vc(a,3,b)},Gc=function(a,b){a.V||2!=a.I&&3!=a.I||Fc(a);y(null!=b.ka);a.qa?a.qa.next=b:a.V=b;a.qa=b},Bc=function(a,b,c,d){var e=Ac(null,null,null);e.ea=new xc(function(a,g){e.ka=b?function(c){try{var e=b.call(d,c);a(e)}catch(Q){g(Q)}}:
a;e.ta=c?function(b){try{var e=c.call(d,b);!m(e)&&b instanceof wc?g(b):a(e)}catch(Q){g(Q)}}:g});e.ea.j=a;Gc(a,e);return e.ea};xc.prototype.Zd=function(a){y(1==this.I);this.I=0;vc(this,2,a)};xc.prototype.$d=function(a){y(1==this.I);this.I=0;vc(this,3,a)};
var vc=function(a,b,c){if(0==a.I){a==c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.I=1;var d;a:{var e=c,f=a.Zd,g=a.$d;if(e instanceof xc)null!=f&&Oa(f,"opt_onFulfilled should be a function."),null!=g&&Oa(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),Gc(e,Ac(f||ba,g||null,a)),d=!0;else if(uc(e))e.then(f,g,a),d=!0;else{if(t(e))try{var l=e.then;if(r(l)){Hc(e,l,f,g,a);d=!0;break a}}catch(v){g.call(a,v);d=!0;break a}d=!1}}d||
(a.Z=c,a.I=b,a.j=null,Fc(a),3!=b||c instanceof wc||Ic(a,c))}},Hc=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},l=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,l)}catch(v){l(v)}},Fc=function(a){a.Sb||(a.Sb=!0,rc(a.Dd,a))},Dc=function(a){var b=null;a.V&&(b=a.V,a.V=b.next,b.next=null);a.V||(a.qa=null);null!=b&&y(null!=b.ka);return b};xc.prototype.Dd=function(){for(var a;a=Dc(this);)Ec(this,a,this.I,this.Z);this.Sb=!1};
var Ec=function(a,b,c,d){if(3==c&&b.ta&&!b.Xa)for(;a&&a.gb;a=a.j)a.gb=!1;if(b.ea)b.ea.j=null,Jc(b,c,d);else try{b.Xa?b.ka.call(b.context):Jc(b,c,d)}catch(e){Kc.call(null,e)}zc.put(b)},Jc=function(a,b,c){2==b?a.ka.call(a.context,c):a.ta&&a.ta.call(a.context,c)},Ic=function(a,b){a.gb=!0;rc(function(){a.gb&&Kc.call(null,b)})},Kc=hc,wc=function(a){xa.call(this,a)};x(wc,xa);wc.prototype.name="cancel";var Lc=function(a,b,c){if(r(a))c&&(a=u(a,c));else if(a&&"function"==typeof a.handleEvent)a=u(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:k.setTimeout(a,b||0)};var Mc=function(a,b,c){z.call(this);this.Md=null!=c?u(a,c):a;this.Jd=b;this.xd=u(this.Sd,this);this.Hb=[]};x(Mc,z);h=Mc.prototype;h.vb=!1;h.fd=0;h.Ca=null;h.Hc=function(a){this.Hb=arguments;this.Ca||this.fd?this.vb=!0:Nc(this)};h.stop=function(){this.Ca&&(k.clearTimeout(this.Ca),this.Ca=null,this.vb=!1,this.Hb=[])};h.s=function(){Mc.l.s.call(this);this.stop()};h.Sd=function(){this.Ca=null;this.vb&&!this.fd&&(this.vb=!1,Nc(this))};var Nc=function(a){a.Ca=Lc(a.xd,a.Jd);a.Md.apply(null,a.Hb)};var Oc=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+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},Pc=function(a){return eval("("+a+")")},Rc=function(a){return(new Qc(void 0)).A(a)},Qc=function(a){this.sb=a};
Qc.prototype.A=function(a){var b=[];Sc(this,a,b);return b.join("")};
var Sc=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(n(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],Sc(a,a.sb?a.sb.call(d,String(f),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),Tc(d,c),c.push(":"),Sc(a,a.sb?a.sb.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":Tc(b,
c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}},Uc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Vc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,Tc=function(a,b){b.push('"',a.replace(Vc,function(a){var b=Uc[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),
Uc[a]=b);return b}),'"')};var Wc=!nb||9<=Number(Bb),Xc=!pb&&!nb||nb&&9<=Number(Bb)||pb&&zb("1.9.1");nb&&zb("9");var Zc=function(a,b){la(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:Yc.hasOwnProperty(d)?a.setAttribute(Yc[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},Yc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},ad=function(a,
b,c){return $c(document,arguments)},$c=function(a,b){var c=b[0],d=b[1];if(!Wc&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',Ia(d.name),'"');if(d.type){c.push(' type="',Ia(d.type),'"');var e={};wa(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(p(d)?c.className=d:n(d)?c.className=d.join(" "):Zc(c,d));2<b.length&&bd(a,c,b);return c},bd=function(a,b,c){function d(c){c&&b.appendChild(p(c)?a.createTextNode(c):c)}for(var e=2;e<c.length;e++){var f=c[e];!ea(f)||t(f)&&0<
f.nodeType?d(f):Ta(cd(f)?db(f):f,d)}},dd=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},ed=function(a){y(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},cd=function(a){if(a&&"number"==typeof a.length){if(t(a))return"function"==typeof a.item||"string"==typeof a.item;if(r(a))return"function"==typeof a.item}return!1},fd=function(a){this.Qb=a||k.document||document};h=fd.prototype;h.Bd=function(a,b,c){return $c(this.Qb,arguments)};
h.createElement=function(a){return this.Qb.createElement(a)};h.createTextNode=function(a){return this.Qb.createTextNode(String(a))};h.appendChild=function(a,b){a.appendChild(b)};h.Ic=function(a){return Xc&&void 0!=a.children?a.children:Ua(a.childNodes,function(a){return 1==a.nodeType})};
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 jc=function(){this.Db=this.na=null},lc=new ec(function(){return new kc},function(a){a.reset()},100);jc.prototype.add=function(a,b){var c=lc.get();c.set(a,b);this.Db?this.Db.next=c:(y(!this.na),this.na=c);this.Db=c};jc.prototype.remove=function(){var a=null;this.na&&(a=this.na,this.na=this.na.next,this.na||(this.Db=null),a.next=null);return a};var kc=function(){this.next=this.scope=this.Wb=null};kc.prototype.set=function(a,b){this.Wb=a;this.scope=b;this.next=null};
kc.prototype.reset=function(){this.next=this.scope=this.Wb=null};var qc=function(a,b){mc||nc();oc||(mc(),oc=!0);pc.add(a,b)},mc,nc=function(){if(k.Promise&&k.Promise.resolve){var a=k.Promise.resolve(void 0);mc=function(){a.then(rc)}}else mc=function(){var a=rc;!r(k.setImmediate)||k.Window&&k.Window.prototype&&!A("Edge")&&k.Window.prototype.setImmediate==k.setImmediate?(hc||(hc=ic()),hc(a)):k.setImmediate(a)}},oc=!1,pc=new jc,rc=function(){for(var a;a=pc.remove();){try{a.Wb.call(a.scope)}catch(b){gc(b)}lc.put(a)}oc=!1};var sc=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},tc=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var wc=function(a,b){this.I=0;this.Z=void 0;this.qa=this.V=this.j=null;this.gb=this.Sb=!1;if(a!=ba)try{var c=this;a.call(b,function(a){uc(c,2,a)},function(a){if(!(a instanceof vc))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}uc(c,3,a)})}catch(d){uc(this,3,d)}},xc=function(){this.next=this.context=this.ta=this.ka=this.ea=null;this.Xa=!1};xc.prototype.reset=function(){this.context=this.ta=this.ka=this.ea=null;this.Xa=!1};
var yc=new ec(function(){return new xc},function(a){a.reset()},100),zc=function(a,b,c){var d=yc.get();d.ka=a;d.ta=b;d.context=c;return d};wc.prototype.then=function(a,b,c){null!=a&&Na(a,"opt_onFulfilled should be a function.");null!=b&&Na(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return Ac(this,r(a)?a:null,r(b)?b:null,c)};sc(wc);wc.prototype.cancel=function(a){0==this.I&&qc(function(){var b=new vc(a);Bc(this,b)},this)};
var Bc=function(a,b){if(0==a.I)if(a.j){var c=a.j;if(c.V){for(var d=0,e=null,f=null,g=c.V;g&&(g.Xa||(d++,g.ea==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.I&&1==d?Bc(c,b):(f?(d=f,y(c.V),y(null!=d),d.next==c.qa&&(c.qa=d),d.next=d.next.next):Cc(c),Dc(c,e,3,b)))}a.j=null}else uc(a,3,b)},Fc=function(a,b){a.V||2!=a.I&&3!=a.I||Ec(a);y(null!=b.ka);a.qa?a.qa.next=b:a.V=b;a.qa=b},Ac=function(a,b,c,d){var e=zc(null,null,null);e.ea=new wc(function(a,g){e.ka=b?function(c){try{var e=b.call(d,c);a(e)}catch(Q){g(Q)}}:
a;e.ta=c?function(b){try{var e=c.call(d,b);!m(e)&&b instanceof vc?g(b):a(e)}catch(Q){g(Q)}}:g});e.ea.j=a;Fc(a,e);return e.ea};wc.prototype.$d=function(a){y(1==this.I);this.I=0;uc(this,2,a)};wc.prototype.ae=function(a){y(1==this.I);this.I=0;uc(this,3,a)};
var uc=function(a,b,c){if(0==a.I){a==c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.I=1;var d;a:{var e=c,f=a.$d,g=a.ae;if(e instanceof wc)null!=f&&Na(f,"opt_onFulfilled should be a function."),null!=g&&Na(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),Fc(e,zc(f||ba,g||null,a)),d=!0;else if(tc(e))e.then(f,g,a),d=!0;else{if(t(e))try{var l=e.then;if(r(l)){Gc(e,l,f,g,a);d=!0;break a}}catch(v){g.call(a,v);d=!0;break a}d=!1}}d||
(a.Z=c,a.I=b,a.j=null,Ec(a),3!=b||c instanceof vc||Hc(a,c))}},Gc=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},l=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,l)}catch(v){l(v)}},Ec=function(a){a.Sb||(a.Sb=!0,qc(a.Ed,a))},Cc=function(a){var b=null;a.V&&(b=a.V,a.V=b.next,b.next=null);a.V||(a.qa=null);null!=b&&y(null!=b.ka);return b};wc.prototype.Ed=function(){for(var a;a=Cc(this);)Dc(this,a,this.I,this.Z);this.Sb=!1};
var Dc=function(a,b,c,d){if(3==c&&b.ta&&!b.Xa)for(;a&&a.gb;a=a.j)a.gb=!1;if(b.ea)b.ea.j=null,Ic(b,c,d);else try{b.Xa?b.ka.call(b.context):Ic(b,c,d)}catch(e){Jc.call(null,e)}yc.put(b)},Ic=function(a,b,c){2==b?a.ka.call(a.context,c):a.ta&&a.ta.call(a.context,c)},Hc=function(a,b){a.gb=!0;qc(function(){a.gb&&Jc.call(null,b)})},Jc=gc,vc=function(a){wa.call(this,a)};x(vc,wa);vc.prototype.name="cancel";var Kc=function(a,b,c){if(r(a))c&&(a=u(a,c));else if(a&&"function"==typeof a.handleEvent)a=u(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:k.setTimeout(a,b||0)};var Lc=function(a,b,c){z.call(this);this.Nd=null!=c?u(a,c):a;this.Kd=b;this.yd=u(this.Td,this);this.Hb=[]};x(Lc,z);h=Lc.prototype;h.vb=!1;h.fd=0;h.Ca=null;h.Hc=function(a){this.Hb=arguments;this.Ca||this.fd?this.vb=!0:Mc(this)};h.stop=function(){this.Ca&&(k.clearTimeout(this.Ca),this.Ca=null,this.vb=!1,this.Hb=[])};h.s=function(){Lc.l.s.call(this);this.stop()};h.Td=function(){this.Ca=null;this.vb&&!this.fd&&(this.vb=!1,Mc(this))};var Mc=function(a){a.Ca=Kc(a.yd,a.Kd);a.Nd.apply(null,a.Hb)};var Nc=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+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},Oc=function(a){return eval("("+a+")")},Qc=function(a){return(new Pc(void 0)).v(a)},Pc=function(a){this.sb=a};
Pc.prototype.v=function(a){var b=[];Rc(this,a,b);return b.join("")};
var Rc=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(n(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],Rc(a,a.sb?a.sb.call(d,String(f),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),Sc(d,c),c.push(":"),Rc(a,a.sb?a.sb.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":Sc(b,
c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}},Tc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Uc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,Sc=function(a,b){b.push('"',a.replace(Uc,function(a){var b=Tc[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),
Tc[a]=b);return b}),'"')};var Vc=!mb||9<=Number(Ab),Wc=!ob&&!mb||mb&&9<=Number(Ab)||ob&&yb("1.9.1");mb&&yb("9");var Yc=function(a,b){la(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:Xc.hasOwnProperty(d)?a.setAttribute(Xc[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},Xc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},$c=function(a,
b,c){return Zc(document,arguments)},Zc=function(a,b){var c=b[0],d=b[1];if(!Vc&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',Ha(d.name),'"');if(d.type){c.push(' type="',Ha(d.type),'"');var e={};va(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(p(d)?c.className=d:n(d)?c.className=d.join(" "):Yc(c,d));2<b.length&&ad(a,c,b);return c},ad=function(a,b,c){function d(c){c&&b.appendChild(p(c)?a.createTextNode(c):c)}for(var e=2;e<c.length;e++){var f=c[e];!ea(f)||t(f)&&0<
f.nodeType?d(f):Sa(bd(f)?cb(f):f,d)}},cd=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},dd=function(a){y(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},bd=function(a){if(a&&"number"==typeof a.length){if(t(a))return"function"==typeof a.item||"string"==typeof a.item;if(r(a))return"function"==typeof a.item}return!1},ed=function(a){this.Qb=a||k.document||document};h=ed.prototype;h.Cd=function(a,b,c){return Zc(this.Qb,arguments)};
h.createElement=function(a){return this.Qb.createElement(a)};h.createTextNode=function(a){return this.Qb.createTextNode(String(a))};h.appendChild=function(a,b){a.appendChild(b)};h.Ic=function(a){return Wc&&void 0!=a.children?a.children:Ta(a.childNodes,function(a){return 1==a.nodeType})};
h.contains=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};/*
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 gd=function(a,b){this.ub=[];this.bd=a;this.Ac=b||null;this.Ja=this.sa=!1;this.Z=void 0;this.jc=this.uc=this.Ib=!1;this.Ab=0;this.j=null;this.Jb=0};gd.prototype.cancel=function(a){if(this.sa)this.Z instanceof gd&&this.Z.cancel();else{if(this.j){var b=this.j;delete this.j;a?b.cancel(a):(b.Jb--,0>=b.Jb&&b.cancel())}this.bd?this.bd.call(this.Ac,this):this.jc=!0;this.sa||hd(this,new id)}};gd.prototype.xc=function(a,b){this.Ib=!1;jd(this,a,b)};
var jd=function(a,b,c){a.sa=!0;a.Z=c;a.Ja=!b;kd(a)},md=function(a){if(a.sa){if(!a.jc)throw new ld;a.jc=!1}};gd.prototype.Kb=function(a){md(this);nd(a);jd(this,!0,a)};var hd=function(a,b){md(a);nd(b);jd(a,!1,b)},nd=function(a){y(!(a instanceof gd),"An execution sequence may not be initiated with a blocking Deferred.")},od=function(a,b,c){y(!a.uc,"Blocking Deferreds can not be re-used");a.ub.push([b,c,void 0]);a.sa&&kd(a)};
gd.prototype.then=function(a,b,c){var d,e,f=new xc(function(a,b){d=a;e=b});od(this,d,function(a){a instanceof id?f.cancel():e(a)});return f.then(a,b,c)};tc(gd);
var pd=function(a){return Wa(a.ub,function(a){return r(a[1])})},kd=function(a){if(a.Ab&&a.sa&&pd(a)){var b=a.Ab,c=qd[b];c&&(k.clearTimeout(c.X),delete qd[b]);a.Ab=0}a.j&&(a.j.Jb--,delete a.j);for(var b=a.Z,d=c=!1;a.ub.length&&!a.Ib;){var e=a.ub.shift(),f=e[0],g=e[1],e=e[2];if(f=a.Ja?g:f)try{var l=f.call(e||a.Ac,b);m(l)&&(a.Ja=a.Ja&&(l==b||l instanceof Error),a.Z=b=l);if(uc(b)||"function"===typeof k.Promise&&b instanceof k.Promise)d=!0,a.Ib=!0}catch(v){b=v,a.Ja=!0,pd(a)||(c=!0)}}a.Z=b;d&&(l=u(a.xc,
a,!0),d=u(a.xc,a,!1),b instanceof gd?(od(b,l,d),b.uc=!0):b.then(l,d));c&&(b=new rd(b),qd[b.X]=b,a.Ab=b.X)},ld=function(){xa.call(this)};x(ld,xa);ld.prototype.message="Deferred has already fired";ld.prototype.name="AlreadyCalledError";var id=function(){xa.call(this)};x(id,xa);id.prototype.message="Deferred was canceled";id.prototype.name="CanceledError";var rd=function(a){this.X=k.setTimeout(u(this.Yd,this),0);this.bb=a};
rd.prototype.Yd=function(){y(qd[this.X],"Cannot throw an error that is not scheduled.");delete qd[this.X];throw this.bb;};var qd={};var wd=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={ld:d,Sa:void 0},f=new gd(sd,e),g=null,l=null!=b.timeout?b.timeout:5E3;0<l&&(g=window.setTimeout(function(){td(d,!0);hd(f,new ud(1,"Timeout reached for loading script "+a))},l),e.Sa=g);d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(td(d,b.ke||!1,g),f.Kb(null))};d.onerror=function(){td(d,!0,g);hd(f,new ud(0,"Error while loading script "+a))};e=b.attributes||
{};wa(e,{type:"text/javascript",charset:"UTF-8",src:a});Zc(d,e);vd(c).appendChild(d)},vd=function(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement},sd=function(){if(this&&this.ld){var a=this.ld;a&&"SCRIPT"==a.tagName&&td(a,!0,this.Sa)}},td=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)},ud=function(a,b){var c="Jsloader error (code #"+a+")";
b&&(c+=": "+b);xa.call(this,c);this.code=a};x(ud,xa);var xd="StopIteration"in k?k.StopIteration:{message:"StopIteration",stack:""},yd=function(){};yd.prototype.next=function(){throw xd;};yd.prototype.oa=function(){return this};
var zd=function(a){if(a instanceof yd)return a;if("function"==typeof a.oa)return a.oa(!1);if(ea(a)){var b=0,c=new yd;c.next=function(){for(;;){if(b>=a.length)throw xd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},Ad=function(a,b){if(ea(a))try{Ta(a,b,void 0)}catch(c){if(c!==xd)throw c;}else{a=zd(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==xd)throw c;}}};var Bd=function(a,b){this.o={};this.h=[];this.Ua=this.f=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.addAll(a)};h=Bd.prototype;h.C=function(){return this.f};h.u=function(){Cd(this);for(var a=[],b=0;b<this.h.length;b++)a.push(this.o[this.h[b]]);return a};h.M=function(){Cd(this);return this.h.concat()};h.$=function(a){return Dd(this.o,a)};h.isEmpty=function(){return 0==this.f};
h.clear=function(){this.o={};this.Ua=this.f=this.h.length=0};h.remove=function(a){return Dd(this.o,a)?(delete this.o[a],this.f--,this.Ua++,this.h.length>2*this.f&&Cd(this),!0):!1};var Cd=function(a){if(a.f!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Dd(a.o,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.f!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Dd(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}};h=Bd.prototype;h.get=function(a,b){return Dd(this.o,a)?this.o[a]:b};
h.set=function(a,b){Dd(this.o,a)||(this.f++,this.h.push(a),this.Ua++);this.o[a]=b};h.addAll=function(a){var b;a instanceof Bd?(b=a.M(),a=a.u()):(b=pa(a),a=oa(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.M(),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 Bd(this)};
h.oa=function(a){Cd(this);var b=0,c=this.Ua,d=this,e=new yd;e.next=function(){if(c!=d.Ua)throw Error("The map has changed since the iterator was created");if(b>=d.h.length)throw xd;var e=d.h[b++];return a?e:d.o[e]};return e};var Dd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Ed=function(a){if(a.u&&"function"==typeof a.u)return a.u();if(p(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return oa(a)},Fd=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if(ea(a)||p(a))Ta(a,b,void 0);else{var c;if(a.M&&"function"==typeof a.M)c=a.M();else if(a.u&&"function"==typeof a.u)c=void 0;else if(ea(a)||p(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=pa(a);for(var d=Ed(a),e=d.length,f=0;f<e;f++)b.call(void 0,
d[f],c&&c[f],a)}};var Gd=function(a){this.o=new Bd;a&&this.addAll(a)},Hd=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[fa]||(a[fa]=++ga)):b.substr(0,1)+a};h=Gd.prototype;h.C=function(){return this.o.C()};h.add=function(a){this.o.set(Hd(a),a)};h.addAll=function(a){a=Ed(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};h.Pa=function(a){a=Ed(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};h.remove=function(a){return this.o.remove(Hd(a))};h.clear=function(){this.o.clear()};h.isEmpty=function(){return this.o.isEmpty()};
h.contains=function(a){return this.o.$(Hd(a))};var Id=function(a,b){for(var c=new Gd,d=Ed(b),e=0;e<d.length;e++){var f=d[e];a.contains(f)&&c.add(f)}return c},Jd=function(a,b){var c=a.clone();c.Pa(b);return c};Gd.prototype.u=function(){return this.o.u()};Gd.prototype.clone=function(){return new Gd(this)};Gd.prototype.oa=function(){return this.o.oa(!1)};var Kd=function(a,b,c,d,e){this.reset(a,b,c,d,e)};Kd.prototype.Ec=null;var Ld=0;Kd.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Ld++;d||ka();this.Na=a;this.Pd=b;delete this.Ec};Kd.prototype.nd=function(a){this.Na=a};var Md=function(a){this.Qd=a;this.Mc=this.Lb=this.Na=this.j=null},Nd=function(a,b){this.name=a;this.value=b};Nd.prototype.toString=function(){return this.name};var Od=new Nd("SEVERE",1E3),Pd=new Nd("CONFIG",700),Qd=new Nd("FINE",500);Md.prototype.getParent=function(){return this.j};Md.prototype.Ic=function(){this.Lb||(this.Lb={});return this.Lb};Md.prototype.nd=function(a){this.Na=a};var Rd=function(a){if(a.Na)return a.Na;if(a.j)return Rd(a.j);Ma("Root logger has no level set.");return null};
Md.prototype.log=function(a,b,c){if(a.value>=Rd(this).value)for(r(b)&&(b=b()),a=new Kd(a,String(b),this.Qd),c&&(a.Ec=c),c="log:"+a.Pd,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.Mc)for(var e=0,f;f=b.Mc[e];e++)f(d);c=c.getParent()}};
var Sd={},Td=null,Ud=function(a){Td||(Td=new Md(""),Sd[""]=Td,Td.nd(Pd));var b;if(!(b=Sd[a])){b=new Md(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Ud(a.substr(0,c));c.Ic()[d]=b;b.j=c;Sd[a]=b}return b};var Vd=function(a,b){a&&a.log(Qd,b,void 0)};var Wd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Xd=function(a,b){if(a)for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f,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 Yd=function(){};Yd.prototype.vc=null;Yd.prototype.Ia=function(){var a;(a=this.vc)||(a={},Zd(this)&&(a[0]=!0,a[1]=!0),a=this.vc=a);return a};var $d=function(a,b){this.ce=a;this.Td=b};x($d,Yd);$d.prototype.Mb=function(){return this.ce()};$d.prototype.Ia=function(){return this.Td()};var ae=function(){return ae.Fc.Mb()};ae.sd=!1;ae.Ia=function(){return ae.Fc.Ia()};ae.me=function(a,b){ae.md(new $d(y(a),y(b)))};ae.md=function(a){ae.Fc=a};var be=function(){};x(be,Yd);be.prototype.Mb=function(){var a=Zd(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var Zd=function(a){if(ae.sd)return"";if(!a.Nc&&"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.Nc=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Nc};ae.md(new be);var B=function(a){cc.call(this);this.headers=new Bd;this.Fb=a||null;this.K=!1;this.Eb=this.a=null;this.Ma=this.Uc=this.lb="";this.ja=this.Zb=this.kb=this.Rb=!1;this.Ba=0;this.wb=null;this.Qa="";this.Cb=this.Ud=this.be=!1};x(B,cc);var ce=B.prototype,de=Ud("goog.net.XhrIo");ce.F=de;var fe=/^https?$/i,ge=["POST","PUT"],he=[];B.prototype.zd=function(){this.P();bb(he,this)};
B.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.lb+"; newUri="+a);b=b?b.toUpperCase():"GET";this.lb=a;this.Ma="";this.Uc=b;this.Rb=!1;this.K=!0;this.a=this.Fb?this.Fb.Mb():ae();this.Eb=this.Fb?this.Fb.Ia():ae.Ia();this.a.onreadystatechange=u(this.ed,this);this.Ud&&"onprogress"in this.a&&(this.a.onprogress=u(function(a){this.dd(a,!0)},this),this.a.upload&&(this.a.upload.onprogress=u(this.dd,this)));try{Vd(this.F,ie(this,"Opening Xhr")),
this.Zb=!0,this.a.open(b,String(a),!0),this.Zb=!1}catch(f){Vd(this.F,ie(this,"Error opening Xhr: "+f.message));this.bb(5,f);return}a=c||"";var e=this.headers.clone();d&&Fd(d,function(a,b){e.set(b,a)});d=Za(e.M());c=k.FormData&&a instanceof k.FormData;!(0<=Ra(ge,b))||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");e.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.Qa&&(this.a.responseType=this.Qa);qa(this.a)&&(this.a.withCredentials=this.be);try{je(this),
0<this.Ba&&(this.Cb=ke(this.a),Vd(this.F,ie(this,"Will abort after "+this.Ba+"ms if incomplete, xhr2 "+this.Cb)),this.Cb?(this.a.timeout=this.Ba,this.a.ontimeout=u(this.Sa,this)):this.wb=Lc(this.Sa,this.Ba,this)),Vd(this.F,ie(this,"Sending request")),this.kb=!0,this.a.send(a),this.kb=!1}catch(f){Vd(this.F,ie(this,"Send error: "+f.message)),this.bb(5,f)}};var ke=function(a){return nb&&zb(9)&&q(a.timeout)&&m(a.ontimeout)},Ya=function(a){return"content-type"==a.toLowerCase()};
B.prototype.Sa=function(){"undefined"!=typeof aa&&this.a&&(this.Ma="Timed out after "+this.Ba+"ms, aborting",Vd(this.F,ie(this,this.Ma)),this.dispatchEvent("timeout"),this.abort(8))};B.prototype.bb=function(a,b){this.K=!1;this.a&&(this.ja=!0,this.a.abort(),this.ja=!1);this.Ma=b;le(this);me(this)};var le=function(a){a.Rb||(a.Rb=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
B.prototype.abort=function(){this.a&&this.K&&(Vd(this.F,ie(this,"Aborting")),this.K=!1,this.ja=!0,this.a.abort(),this.ja=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),me(this))};B.prototype.s=function(){this.a&&(this.K&&(this.K=!1,this.ja=!0,this.a.abort(),this.ja=!1),me(this,!0));B.l.s.call(this)};B.prototype.ed=function(){this.aa||(this.Zb||this.kb||this.ja?ne(this):this.Rd())};B.prototype.Rd=function(){ne(this)};
var ne=function(a){if(a.K&&"undefined"!=typeof aa)if(a.Eb[1]&&4==oe(a)&&2==a.getStatus())Vd(a.F,ie(a,"Local request error detected and ignored"));else if(a.kb&&4==oe(a))Lc(a.ed,0,a);else if(a.dispatchEvent("readystatechange"),4==oe(a)){Vd(a.F,ie(a,"Request complete"));a.K=!1;try{var b=a.getStatus(),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=String(a.lb).match(Wd)[1]||null;if(!f&&k.self&&k.self.location)var g=
k.self.location.protocol,f=g.substr(0,g.length-1);e=!fe.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var l;try{l=2<oe(a)?a.a.statusText:""}catch(v){Vd(a.F,"Can not get status: "+v.message),l=""}a.Ma=l+" ["+a.getStatus()+"]";le(a)}}finally{me(a)}}};
B.prototype.dd=function(a,b){y("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(pe(a,"progress"));this.dispatchEvent(pe(a,b?"downloadprogress":"uploadprogress"))};
var pe=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},me=function(a,b){if(a.a){je(a);var c=a.a,d=a.Eb[0]?ba:null;a.a=null;a.Eb=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.F)&&c.log(Od,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},je=function(a){a.a&&a.Cb&&(a.a.ontimeout=null);q(a.wb)&&(k.clearTimeout(a.wb),a.wb=null)};B.prototype.Qc=function(){return!!this.a};
var oe=function(a){return a.a?a.a.readyState:0};B.prototype.getStatus=function(){try{return 2<oe(this)?this.a.status:-1}catch(a){return-1}};
var qe=function(a){try{if(!a.a)return null;if("response"in a.a)return a.a.response;switch(a.Qa){case "":case "text":return a.a.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.a)return a.a.mozResponseArrayBuffer}var b=a.F;b&&b.log(Od,"Response type "+a.Qa+" is not supported on this browser",void 0);return null}catch(c){return Vd(a.F,"Can not get response: "+c.message),null}};B.prototype.getResponseHeader=function(a){return this.a&&4==oe(this)?this.a.getResponseHeader(a):void 0};
var ie=function(a,b){return b+" ["+a.Uc+" "+a.lb+" "+a.getStatus()+"]"};var re=function(a,b){this.W=this.ma=this.da="";this.ua=null;this.ga=this.qb="";this.J=this.Kd=!1;var c;if(a instanceof re)this.J=m(b)?b:a.J,se(this,a.da),c=a.ma,te(this),this.ma=c,c=a.W,te(this),this.W=c,ue(this,a.ua),this.setPath(a.getPath()),ve(this,a.T.clone()),c=a.ga,te(this),this.ga=c;else if(a&&(c=String(a).match(Wd))){this.J=!!b;se(this,c[1]||"",!0);var d=c[2]||"";te(this);this.ma=we(d);d=c[3]||"";te(this);this.W=we(d,!0);ue(this,c[4]);this.setPath(c[5]||"",!0);ve(this,c[6]||"",!0);c=c[7]||
"";te(this);this.ga=we(c)}else this.J=!!b,this.T=new xe(null,0,this.J)};
re.prototype.toString=function(){var a=[],b=this.da;b&&a.push(ye(b,ze,!0),":");var c=this.W;if(c||"file"==b)a.push("//"),(b=this.ma)&&a.push(ye(b,ze,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.ua,null!=c&&a.push(":",String(c));if(c=this.getPath())this.W&&"/"!=c.charAt(0)&&a.push("/"),a.push(ye(c,"/"==c.charAt(0)?Ae:Be,!0));(c=this.T.toString())&&a.push("?",c);(c=this.ga)&&a.push("#",ye(c,Ce));return a.join("")};
re.prototype.resolve=function(a){var b=this.clone(),c=!!a.da;c?se(b,a.da):c=!!a.ma;if(c){var d=a.ma;te(b);b.ma=d}else c=!!a.W;c?(d=a.W,te(b),b.W=d):c=null!=a.ua;d=a.getPath();if(c)ue(b,a.ua);else if(c=!!a.qb){if("/"!=d.charAt(0))if(this.W&&!this.qb)d="/"+d;else{var e=b.getPath().lastIndexOf("/");-1!=e&&(d=b.getPath().substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){for(var d=0==e.lastIndexOf("/",0),e=e.split("/"),f=[],g=0;g<e.length;){var l=e[g++];"."==
l?d&&g==e.length&&f.push(""):".."==l?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),d&&g==e.length&&f.push("")):(f.push(l),d=!0)}d=f.join("/")}else d=e}c?b.setPath(d):c=""!==a.T.toString();c?ve(b,we(a.T.toString())):c=!!a.ga;c&&(a=a.ga,te(b),b.ga=a);return b};re.prototype.clone=function(){return new re(this)};
var se=function(a,b,c){te(a);a.da=c?we(b,!0):b;a.da&&(a.da=a.da.replace(/:$/,""))},ue=function(a,b){te(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ua=b}else a.ua=null};re.prototype.getPath=function(){return this.qb};re.prototype.setPath=function(a,b){te(this);this.qb=b?we(a,!0):a;return this};var ve=function(a,b,c){te(a);b instanceof xe?(a.T=b,a.T.ic(a.J)):(c||(b=ye(b,De)),a.T=new xe(b,0,a.J))},te=function(a){if(a.Kd)throw Error("Tried to modify a read-only Uri");};
re.prototype.ic=function(a){this.J=a;this.T&&this.T.ic(a);return this};
var Ee=function(a){return a instanceof re?a.clone():new re(a,void 0)},we=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},ye=function(a,b,c){return p(a)?(a=encodeURI(a).replace(b,Fe),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},Fe=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},ze=/[#\/\?@]/g,Be=/[\#\?:]/g,Ae=/[\#\?]/g,De=/[\#\?@]/g,Ce=/#/g,xe=function(a,b,c){this.f=this.i=null;this.G=a||null;this.J=!!c},Ge=function(a){a.i||
(a.i=new Bd,a.f=0,a.G&&Xd(a.G,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=xe.prototype;h.C=function(){Ge(this);return this.f};h.add=function(a,b){Ge(this);this.G=null;a=He(this,a);var c=this.i.get(a);c||this.i.set(a,c=[]);c.push(b);this.f=Na(this.f)+1;return this};h.remove=function(a){Ge(this);a=He(this,a);return this.i.$(a)?(this.G=null,this.f=Na(this.f)-this.i.get(a).length,this.i.remove(a)):!1};h.clear=function(){this.i=this.G=null;this.f=0};
h.isEmpty=function(){Ge(this);return 0==this.f};h.$=function(a){Ge(this);a=He(this,a);return this.i.$(a)};h.M=function(){Ge(this);for(var a=this.i.u(),b=this.i.M(),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.u=function(a){Ge(this);var b=[];if(p(a))this.$(a)&&(b=cb(b,this.i.get(He(this,a))));else{a=this.i.u();for(var c=0;c<a.length;c++)b=cb(b,a[c])}return b};
h.set=function(a,b){Ge(this);this.G=null;a=He(this,a);this.$(a)&&(this.f=Na(this.f)-this.i.get(a).length);this.i.set(a,[b]);this.f=Na(this.f)+1;return this};h.get=function(a,b){var c=a?this.u(a):[];return 0<c.length?String(c[0]):b};h.setValues=function(a,b){this.remove(a);0<b.length&&(this.G=null,this.i.set(He(this,a),db(b)),this.f=Na(this.f)+b.length)};
h.toString=function(){if(this.G)return this.G;if(!this.i)return"";for(var a=[],b=this.i.M(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.u(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.G=a.join("&")};h.clone=function(){var a=new xe;a.G=this.G;this.i&&(a.i=this.i.clone(),a.f=this.f);return a};var He=function(a,b){var c=String(b);a.J&&(c=c.toLowerCase());return c};
xe.prototype.ic=function(a){a&&!this.J&&(Ge(this),this.G=null,this.i.forEach(function(a,c){var d=c.toLowerCase();c!=d&&(this.remove(c),this.setValues(d,a))},this));this.J=a};var Oe=function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];d&&(eb(f,d),gb(f));Ie=a;Je=f;null===a?Ke=null:Le(function(){Me(b,c,e||ja(Ne,b,c))})};w("ee.data.authenticate",Oe);var Ne=function(a,b){k.gapi.auth.authorize({client_id:Ie,immediate:!1,scope:Je.join(" ")},ja(Pe,a,b))};w("ee.data.authenticateViaPopup",Ne);
var Qe=function(a,b,c,d,e,f,g){var l=["https://www.googleapis.com/auth/earthengine"];e&&(eb(l,e),gb(l));Ie=a;Je=l;var v={token_type:b,access_token:c,state:l.join(" "),expires_in:d};Pe(void 0,void 0,v);!1===g?f&&f():Le(function(){k.gapi.auth.setToken(v);f&&f()})};w("ee.data.setAuthToken",Qe);var Me=function(a,b,c){Re&&Ie&&Re({client_id:String(Ie),immediate:!0,scope:Je.join(" ")},function(d){"immediate_failed"==d.error&&c?c():Pe(a,b,d)})},Se=function(a){Re=a};w("ee.data.setAuthTokenRefresher",Se);
var Ve=function(){Te&&0<=ka()-Te&&Ue();return Ke};w("ee.data.getAuthToken",Ve);var Ue=function(){Te=Ke=null};w("ee.data.clearAuthToken",Ue);var We=function(){return Ie};w("ee.data.getAuthClientId",We);var Xe=function(){return Je};w("ee.data.getAuthScopes",Xe);var bf=function(a,b,c){null!=a?Ye=a:Ze||(Ye="https://earthengine.googleapis.com/api");null!=b?$e=b:Ze||($e="https://earthengine.googleapis.com");m(c)&&(af=c);Ze=!0},df=function(a){cf=a};w("ee.data.setDeadline",df);
w("ee.data.setParamAugmenter",function(a){ef=a||gc});var ff=function(){return Ye};w("ee.data.getApiBaseUrl",ff);var gf=function(){return $e};w("ee.data.getTileBaseUrl",gf);var hf=function(){return af};w("ee.data.getXsrfToken",hf);var jf=function(a,b){a=ta(a);return C("/mapid",D(a),b)};w("ee.data.getMapId",jf);var kf=function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[$e,"map",a.mapid,d,b,c].join("/")+"?token="+a.token};w("ee.data.getTileUrl",kf);
var lf=function(a,b){a=ta(a);return C("/value",D(a),b)};w("ee.data.getValue",lf);var mf=function(a,b){a=ta(a);n(a.size)&&(a.size=a.size.join("x"));var c=D(a).add("getid","1");return C("/thumb",c,b)};w("ee.data.getThumbId",mf);var nf=function(a){return $e+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};w("ee.data.makeThumbUrl",nf);var of=function(a,b){a=ta(a);return C("/download",D(a),b)};w("ee.data.getDownloadId",of);var pf=function(a){return $e+"/api/download?docid="+a.docid+"&token="+a.token};
w("ee.data.makeDownloadUrl",pf);var qf=function(a,b){a=ta(a);return C("/table",D(a),b)};w("ee.data.getTableDownloadId",qf);var rf=function(a){return $e+"/api/table?docid="+a.docid+"&token="+a.token};w("ee.data.makeTableDownloadUrl",rf);var tf=function(a,b,c){var d=sf;try{return sf=a,b.call(c)}finally{sf=d}};w("ee.data.withProfiling",tf);w("ee.data.newTaskId",function(a,b){var c={};q(a)&&(c.count=a);return C("/newtaskid",D(c),b)});
w("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");return C("/taskstatus?q="+a.join(),null,b,"GET")});w("ee.data.getTaskList",function(a){return C("/tasklist",null,a,"GET")});w("ee.data.cancelTask",function(a,b){return uf(a,"CANCEL",b)});
var uf=function(a,b,c){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");var d;a:{d=vf;for(var e in d)if(d[e]==b){d=!0;break a}d=!1}if(!d)throw Error("Invalid action: "+b);return C("/updatetask",D({id:a,action:b}),c,"POST")};w("ee.data.updateTask",uf);w("ee.data.startProcessing",function(a,b,c){b=ta(b);b.id=a;return C("/processingrequest",D(b),c)});
w("ee.data.startIngestion",function(a,b,c){a={id:a,request:Rc(b)};return C("/ingestionrequest",D(a),c)});var wf=function(a,b){return C("/info",(new xe).add("id",a),b)};w("ee.data.getInfo",wf);var xf=function(a,b){var c=D(a);return C("/list",c,b)};w("ee.data.getList",xf);w("ee.data.getAssetRoots",function(a){return C("/buckets",null,a,"GET")});w("ee.data.createAssetHome",function(a,b){var c=D({id:a});C("/createbucket",c,b)});
w("ee.data.createAsset",function(a,b,c,d){p(a)||(a=Rc(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return C("/create",D(a),d)});w("ee.data.createFolder",function(a,b,c){return C("/createfolder",D({id:a,force:b||!1}),c)});w("ee.data.renameAsset",function(a,b,c){C("/rename",D({sourceId:a,destinationId:b}),c)});w("ee.data.copyAsset",function(a,b,c){C("/copy",D({sourceId:a,destinationId:b}),c)});w("ee.data.deleteAsset",function(a,b){C("/delete",D({id:a}),b)});
w("ee.data.getAssetAcl",function(a,b){return C("/getacl",D({id:a}),b,"GET")});w("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:Rc(b)};C("/setacl",D(a),c)});w("ee.data.setAssetProperties",function(a,b,c){a={id:a,properties:Rc(b)};C("/setproperties",D(a),c)});w("ee.data.getAssetRootQuota",function(a,b){return C("/quota",D({id:a}),b,"GET")});
var vf={de:"CANCEL",he:"UPDATE"},C=function(a,b,c,d){bf();var e=sf,f={"Content-Type":"application/x-www-form-urlencoded"},g=Ve();if(null!=g)f.Authorization=g;else if(c&&Re&&Ie)return Me(function(){tf(e,function(){C(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new xe;e&&b.add("profiling","1");b=ef(b,a);null!=af&&(f["X-XSRF-Token"]=af);var l=function(a,b,c,d){var f=b("X-Earth-Engine-Computation-Profile");f&&e&&e(f);var g,l,v;b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==
b||"text/json"==b)try{g=Pc(c),l=g.data}catch(Q){v="Invalid JSON: "+c}else v="Response was unexpectedly not JSON, but "+b;if(t(g))"error"in g&&"message"in g.error?v=g.error.message:"data"in g||(v="Malformed response: "+c);else if(0===a)v="Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";else if(200>a||300<=a)v="Server returned HTTP code: "+a;if(d)return d(l,v),null;if(!v)return l;throw Error(v);},v=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(v)||
(a+=-1!=a.indexOf("?")?"&":"?",a+=v,v=null);var Q=Ye+a;if(c)return yf.push({url:Q,Kb:function(a){a=a.target;var b=a.getStatus(),d=u(a.getResponseHeader,a),e;try{e=a.a?a.a.responseText:""}catch(f){Vd(a.F,"Can not get responseText: "+f.message),e=""}return l(b,d,e,c)},method:g,content:v,headers:f}),zf.Hc(),null;var K=ae();K.open(g,Q,!1);la(f,function(a,b){K.setRequestHeader(b,a)});K.send(v);return l(K.status,function(a){try{return K.getResponseHeader(a)}catch(b){return null}},K.responseText,null)},
Le=function(a){var b=function(){k.gapi.config.update("client/cors",!0);Re||(Re=k.gapi.auth.authorize);a()};if(t(k.gapi)&&t(k.gapi.auth)&&r(k.gapi.auth.authorize))b();else{for(var c=ka().toString(36);c in k;)c+="_";k[c]=function(){delete k[c];b()};wd("https://apis.google.com/js/client.js?onload="+c)}},Pe=function(a,b,c){c.access_token?(b=c.token_type+" "+c.access_token,isFinite(c.expires_in)&&(c=900*c.expires_in,setTimeout(Me,.9*c),Te=ka()+c),Ke=b,a&&a()):b&&b(c.error||"Unknown error.")},D=function(a){var b=
new xe,c;for(c in a)b.set(c,a[c]);return b},yf=[],zf=new Mc(function(){var a=yf.shift();if(a){var b=a.url,c=a.Kb,d=a.method,e=a.content,a=a.headers,f=cf,g=new B;he.push(g);c&&g.Oa("complete",c);g.mb("ready",g.zd);f&&(g.Ba=Math.max(0,f));g.send(b,d,e,a)}0==yf.length||zf.Hc()},350),Ye=null,$e=null,af=null,ef=gc,Ke=null,Te=null,Ie=null,Je=[],Re=null,Ze=!1,cf=0,sf=null;var Af=function(){};var Bf=function(){this.U=-1};var Cf=function(){this.U=-1;this.U=64;this.B=Array(4);this.vd=Array(this.U);this.yb=this.Ea=0;this.reset()};x(Cf,Bf);Cf.prototype.reset=function(){this.B[0]=1732584193;this.B[1]=4023233417;this.B[2]=2562383102;this.B[3]=271733878;this.yb=this.Ea=0};
var Df=function(a,b,c){c||(c=0);var d=Array(16);if(p(b))for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.B[0];c=a.B[1];var e=a.B[2],f=a.B[3],g;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^
var fd=function(a,b){this.ub=[];this.bd=a;this.Ac=b||null;this.Ja=this.sa=!1;this.Z=void 0;this.jc=this.uc=this.Ib=!1;this.Ab=0;this.j=null;this.Jb=0};fd.prototype.cancel=function(a){if(this.sa)this.Z instanceof fd&&this.Z.cancel();else{if(this.j){var b=this.j;delete this.j;a?b.cancel(a):(b.Jb--,0>=b.Jb&&b.cancel())}this.bd?this.bd.call(this.Ac,this):this.jc=!0;this.sa||gd(this,new hd)}};fd.prototype.xc=function(a,b){this.Ib=!1;id(this,a,b)};
var id=function(a,b,c){a.sa=!0;a.Z=c;a.Ja=!b;jd(a)},ld=function(a){if(a.sa){if(!a.jc)throw new kd;a.jc=!1}};fd.prototype.Kb=function(a){ld(this);md(a);id(this,!0,a)};var gd=function(a,b){ld(a);md(b);id(a,!1,b)},md=function(a){y(!(a instanceof fd),"An execution sequence may not be initiated with a blocking Deferred.")},nd=function(a,b,c){y(!a.uc,"Blocking Deferreds can not be re-used");a.ub.push([b,c,void 0]);a.sa&&jd(a)};
fd.prototype.then=function(a,b,c){var d,e,f=new wc(function(a,b){d=a;e=b});nd(this,d,function(a){a instanceof hd?f.cancel():e(a)});return f.then(a,b,c)};sc(fd);
var od=function(a){return Va(a.ub,function(a){return r(a[1])})},jd=function(a){if(a.Ab&&a.sa&&od(a)){var b=a.Ab,c=pd[b];c&&(k.clearTimeout(c.X),delete pd[b]);a.Ab=0}a.j&&(a.j.Jb--,delete a.j);for(var b=a.Z,d=c=!1;a.ub.length&&!a.Ib;){var e=a.ub.shift(),f=e[0],g=e[1],e=e[2];if(f=a.Ja?g:f)try{var l=f.call(e||a.Ac,b);m(l)&&(a.Ja=a.Ja&&(l==b||l instanceof Error),a.Z=b=l);if(tc(b)||"function"===typeof k.Promise&&b instanceof k.Promise)d=!0,a.Ib=!0}catch(v){b=v,a.Ja=!0,od(a)||(c=!0)}}a.Z=b;d&&(l=u(a.xc,
a,!0),d=u(a.xc,a,!1),b instanceof fd?(nd(b,l,d),b.uc=!0):b.then(l,d));c&&(b=new qd(b),pd[b.X]=b,a.Ab=b.X)},kd=function(){wa.call(this)};x(kd,wa);kd.prototype.message="Deferred has already fired";kd.prototype.name="AlreadyCalledError";var hd=function(){wa.call(this)};x(hd,wa);hd.prototype.message="Deferred was canceled";hd.prototype.name="CanceledError";var qd=function(a){this.X=k.setTimeout(u(this.Zd,this),0);this.bb=a};
qd.prototype.Zd=function(){y(pd[this.X],"Cannot throw an error that is not scheduled.");delete pd[this.X];throw this.bb;};var pd={};var vd=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={ld:d,Sa:void 0},f=new fd(rd,e),g=null,l=null!=b.timeout?b.timeout:5E3;0<l&&(g=window.setTimeout(function(){sd(d,!0);gd(f,new td(1,"Timeout reached for loading script "+a))},l),e.Sa=g);d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(sd(d,b.ke||!1,g),f.Kb(null))};d.onerror=function(){sd(d,!0,g);gd(f,new td(0,"Error while loading script "+a))};e=b.attributes||
{};va(e,{type:"text/javascript",charset:"UTF-8",src:a});Yc(d,e);ud(c).appendChild(d)},ud=function(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement},rd=function(){if(this&&this.ld){var a=this.ld;a&&"SCRIPT"==a.tagName&&sd(a,!0,this.Sa)}},sd=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)},td=function(a,b){var c="Jsloader error (code #"+a+")";
b&&(c+=": "+b);wa.call(this,c);this.code=a};x(td,wa);var wd="StopIteration"in k?k.StopIteration:{message:"StopIteration",stack:""},xd=function(){};xd.prototype.next=function(){throw wd;};xd.prototype.oa=function(){return this};
var yd=function(a){if(a instanceof xd)return a;if("function"==typeof a.oa)return a.oa(!1);if(ea(a)){var b=0,c=new xd;c.next=function(){for(;;){if(b>=a.length)throw wd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},zd=function(a,b){if(ea(a))try{Sa(a,b,void 0)}catch(c){if(c!==wd)throw c;}else{a=yd(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==wd)throw c;}}};var Ad=function(a,b){this.o={};this.h=[];this.Ua=this.f=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.addAll(a)};h=Ad.prototype;h.C=function(){return this.f};h.u=function(){Bd(this);for(var a=[],b=0;b<this.h.length;b++)a.push(this.o[this.h[b]]);return a};h.M=function(){Bd(this);return this.h.concat()};h.$=function(a){return Cd(this.o,a)};h.isEmpty=function(){return 0==this.f};
h.clear=function(){this.o={};this.Ua=this.f=this.h.length=0};h.remove=function(a){return Cd(this.o,a)?(delete this.o[a],this.f--,this.Ua++,this.h.length>2*this.f&&Bd(this),!0):!1};var Bd=function(a){if(a.f!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Cd(a.o,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.f!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Cd(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}};h=Ad.prototype;h.get=function(a,b){return Cd(this.o,a)?this.o[a]:b};
h.set=function(a,b){Cd(this.o,a)||(this.f++,this.h.push(a),this.Ua++);this.o[a]=b};h.addAll=function(a){var b;a instanceof Ad?(b=a.M(),a=a.u()):(b=pa(a),a=oa(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.M(),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 Ad(this)};
h.oa=function(a){Bd(this);var b=0,c=this.Ua,d=this,e=new xd;e.next=function(){if(c!=d.Ua)throw Error("The map has changed since the iterator was created");if(b>=d.h.length)throw wd;var e=d.h[b++];return a?e:d.o[e]};return e};var Cd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Dd=function(a){if(a.u&&"function"==typeof a.u)return a.u();if(p(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return oa(a)},Ed=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if(ea(a)||p(a))Sa(a,b,void 0);else{var c;if(a.M&&"function"==typeof a.M)c=a.M();else if(a.u&&"function"==typeof a.u)c=void 0;else if(ea(a)||p(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=pa(a);for(var d=Dd(a),e=d.length,f=0;f<e;f++)b.call(void 0,
d[f],c&&c[f],a)}};var Fd=function(a){this.o=new Ad;a&&this.addAll(a)},Gd=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[fa]||(a[fa]=++ga)):b.substr(0,1)+a};h=Fd.prototype;h.C=function(){return this.o.C()};h.add=function(a){this.o.set(Gd(a),a)};h.addAll=function(a){a=Dd(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};h.Pa=function(a){a=Dd(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};h.remove=function(a){return this.o.remove(Gd(a))};h.clear=function(){this.o.clear()};h.isEmpty=function(){return this.o.isEmpty()};
h.contains=function(a){return this.o.$(Gd(a))};var Hd=function(a,b){for(var c=new Fd,d=Dd(b),e=0;e<d.length;e++){var f=d[e];a.contains(f)&&c.add(f)}return c},Id=function(a,b){var c=a.clone();c.Pa(b);return c};Fd.prototype.u=function(){return this.o.u()};Fd.prototype.clone=function(){return new Fd(this)};Fd.prototype.oa=function(){return this.o.oa(!1)};var Jd=function(a,b,c,d,e){this.reset(a,b,c,d,e)};Jd.prototype.Ec=null;var Kd=0;Jd.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Kd++;d||ka();this.Na=a;this.Qd=b;delete this.Ec};Jd.prototype.nd=function(a){this.Na=a};var Ld=function(a){this.Rd=a;this.Mc=this.Lb=this.Na=this.j=null},Md=function(a,b){this.name=a;this.value=b};Md.prototype.toString=function(){return this.name};var Nd=new Md("SEVERE",1E3),Od=new Md("CONFIG",700),Pd=new Md("FINE",500);Ld.prototype.getParent=function(){return this.j};Ld.prototype.Ic=function(){this.Lb||(this.Lb={});return this.Lb};Ld.prototype.nd=function(a){this.Na=a};var Qd=function(a){if(a.Na)return a.Na;if(a.j)return Qd(a.j);La("Root logger has no level set.");return null};
Ld.prototype.log=function(a,b,c){if(a.value>=Qd(this).value)for(r(b)&&(b=b()),a=new Jd(a,String(b),this.Rd),c&&(a.Ec=c),c="log:"+a.Qd,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.Mc)for(var e=0,f;f=b.Mc[e];e++)f(d);c=c.getParent()}};
var Rd={},Sd=null,Td=function(a){Sd||(Sd=new Ld(""),Rd[""]=Sd,Sd.nd(Od));var b;if(!(b=Rd[a])){b=new Ld(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Td(a.substr(0,c));c.Ic()[d]=b;b.j=c;Rd[a]=b}return b};var Ud=function(a,b){a&&a.log(Pd,b,void 0)};var Vd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Wd=function(a,b){if(a)for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f,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 Xd=function(){};Xd.prototype.vc=null;Xd.prototype.Ia=function(){var a;(a=this.vc)||(a={},Yd(this)&&(a[0]=!0,a[1]=!0),a=this.vc=a);return a};var Zd=function(a,b){this.ce=a;this.Ud=b};x(Zd,Xd);Zd.prototype.Mb=function(){return this.ce()};Zd.prototype.Ia=function(){return this.Ud()};var $d=function(){return $d.Fc.Mb()};$d.td=!1;$d.Ia=function(){return $d.Fc.Ia()};$d.me=function(a,b){$d.md(new Zd(y(a),y(b)))};$d.md=function(a){$d.Fc=a};var ae=function(){};x(ae,Xd);ae.prototype.Mb=function(){var a=Yd(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var Yd=function(a){if($d.td)return"";if(!a.Nc&&"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.Nc=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Nc};$d.md(new ae);var B=function(a){bc.call(this);this.headers=new Ad;this.Fb=a||null;this.K=!1;this.Eb=this.a=null;this.Ma=this.Uc=this.lb="";this.ja=this.Zb=this.kb=this.Rb=!1;this.Ba=0;this.wb=null;this.Qa="";this.Cb=this.Vd=this.sd=!1};x(B,bc);var be=B.prototype,ce=Td("goog.net.XhrIo");be.F=ce;var de=/^https?$/i,fe=["POST","PUT"],ge=[];B.prototype.Ad=function(){this.P();ab(ge,this)};
B.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.lb+"; newUri="+a);b=b?b.toUpperCase():"GET";this.lb=a;this.Ma="";this.Uc=b;this.Rb=!1;this.K=!0;this.a=this.Fb?this.Fb.Mb():$d();this.Eb=this.Fb?this.Fb.Ia():$d.Ia();this.a.onreadystatechange=u(this.ed,this);this.Vd&&"onprogress"in this.a&&(this.a.onprogress=u(function(a){this.dd(a,!0)},this),this.a.upload&&(this.a.upload.onprogress=u(this.dd,this)));try{Ud(this.F,he(this,"Opening Xhr")),
this.Zb=!0,this.a.open(b,String(a),!0),this.Zb=!1}catch(f){Ud(this.F,he(this,"Error opening Xhr: "+f.message));this.bb(5,f);return}a=c||"";var e=this.headers.clone();d&&Ed(d,function(a,b){e.set(b,a)});d=Ya(e.M());c=k.FormData&&a instanceof k.FormData;!(0<=Qa(fe,b))||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");e.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.Qa&&(this.a.responseType=this.Qa);"withCredentials"in this.a&&this.a.withCredentials!==this.sd&&
(this.a.withCredentials=this.sd);try{ie(this),0<this.Ba&&(this.Cb=je(this.a),Ud(this.F,he(this,"Will abort after "+this.Ba+"ms if incomplete, xhr2 "+this.Cb)),this.Cb?(this.a.timeout=this.Ba,this.a.ontimeout=u(this.Sa,this)):this.wb=Kc(this.Sa,this.Ba,this)),Ud(this.F,he(this,"Sending request")),this.kb=!0,this.a.send(a),this.kb=!1}catch(f){Ud(this.F,he(this,"Send error: "+f.message)),this.bb(5,f)}};
var je=function(a){return mb&&yb(9)&&q(a.timeout)&&m(a.ontimeout)},Xa=function(a){return"content-type"==a.toLowerCase()};B.prototype.Sa=function(){"undefined"!=typeof aa&&this.a&&(this.Ma="Timed out after "+this.Ba+"ms, aborting",Ud(this.F,he(this,this.Ma)),this.dispatchEvent("timeout"),this.abort(8))};B.prototype.bb=function(a,b){this.K=!1;this.a&&(this.ja=!0,this.a.abort(),this.ja=!1);this.Ma=b;ke(this);le(this)};var ke=function(a){a.Rb||(a.Rb=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
B.prototype.abort=function(){this.a&&this.K&&(Ud(this.F,he(this,"Aborting")),this.K=!1,this.ja=!0,this.a.abort(),this.ja=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),le(this))};B.prototype.s=function(){this.a&&(this.K&&(this.K=!1,this.ja=!0,this.a.abort(),this.ja=!1),le(this,!0));B.l.s.call(this)};B.prototype.ed=function(){this.aa||(this.Zb||this.kb||this.ja?me(this):this.Sd())};B.prototype.Sd=function(){me(this)};
var me=function(a){if(a.K&&"undefined"!=typeof aa)if(a.Eb[1]&&4==ne(a)&&2==a.getStatus())Ud(a.F,he(a,"Local request error detected and ignored"));else if(a.kb&&4==ne(a))Kc(a.ed,0,a);else if(a.dispatchEvent("readystatechange"),4==ne(a)){Ud(a.F,he(a,"Request complete"));a.K=!1;try{var b=a.getStatus(),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=String(a.lb).match(Vd)[1]||null;if(!f&&k.self&&k.self.location)var g=
k.self.location.protocol,f=g.substr(0,g.length-1);e=!de.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var l;try{l=2<ne(a)?a.a.statusText:""}catch(v){Ud(a.F,"Can not get status: "+v.message),l=""}a.Ma=l+" ["+a.getStatus()+"]";ke(a)}}finally{le(a)}}};
B.prototype.dd=function(a,b){y("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(oe(a,"progress"));this.dispatchEvent(oe(a,b?"downloadprogress":"uploadprogress"))};
var oe=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},le=function(a,b){if(a.a){ie(a);var c=a.a,d=a.Eb[0]?ba:null;a.a=null;a.Eb=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.F)&&c.log(Nd,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},ie=function(a){a.a&&a.Cb&&(a.a.ontimeout=null);q(a.wb)&&(k.clearTimeout(a.wb),a.wb=null)};B.prototype.Qc=function(){return!!this.a};
var ne=function(a){return a.a?a.a.readyState:0};B.prototype.getStatus=function(){try{return 2<ne(this)?this.a.status:-1}catch(a){return-1}};
var pe=function(a){try{if(!a.a)return null;if("response"in a.a)return a.a.response;switch(a.Qa){case "":case "text":return a.a.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.a)return a.a.mozResponseArrayBuffer}var b=a.F;b&&b.log(Nd,"Response type "+a.Qa+" is not supported on this browser",void 0);return null}catch(c){return Ud(a.F,"Can not get response: "+c.message),null}};B.prototype.getResponseHeader=function(a){return this.a&&4==ne(this)?this.a.getResponseHeader(a):void 0};
var he=function(a,b){return b+" ["+a.Uc+" "+a.lb+" "+a.getStatus()+"]"};var qe=function(a,b){this.W=this.ma=this.da="";this.ua=null;this.ga=this.qb="";this.J=this.Ld=!1;var c;if(a instanceof qe)this.J=m(b)?b:a.J,re(this,a.da),c=a.ma,se(this),this.ma=c,c=a.W,se(this),this.W=c,te(this,a.ua),this.setPath(a.getPath()),ue(this,a.T.clone()),c=a.ga,se(this),this.ga=c;else if(a&&(c=String(a).match(Vd))){this.J=!!b;re(this,c[1]||"",!0);var d=c[2]||"";se(this);this.ma=ve(d);d=c[3]||"";se(this);this.W=ve(d,!0);te(this,c[4]);this.setPath(c[5]||"",!0);ue(this,c[6]||"",!0);c=c[7]||
"";se(this);this.ga=ve(c)}else this.J=!!b,this.T=new we(null,0,this.J)};
qe.prototype.toString=function(){var a=[],b=this.da;b&&a.push(xe(b,ye,!0),":");var c=this.W;if(c||"file"==b)a.push("//"),(b=this.ma)&&a.push(xe(b,ye,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.ua,null!=c&&a.push(":",String(c));if(c=this.getPath())this.W&&"/"!=c.charAt(0)&&a.push("/"),a.push(xe(c,"/"==c.charAt(0)?ze:Ae,!0));(c=this.T.toString())&&a.push("?",c);(c=this.ga)&&a.push("#",xe(c,Be));return a.join("")};
qe.prototype.resolve=function(a){var b=this.clone(),c=!!a.da;c?re(b,a.da):c=!!a.ma;if(c){var d=a.ma;se(b);b.ma=d}else c=!!a.W;c?(d=a.W,se(b),b.W=d):c=null!=a.ua;d=a.getPath();if(c)te(b,a.ua);else if(c=!!a.qb){if("/"!=d.charAt(0))if(this.W&&!this.qb)d="/"+d;else{var e=b.getPath().lastIndexOf("/");-1!=e&&(d=b.getPath().substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){for(var d=0==e.lastIndexOf("/",0),e=e.split("/"),f=[],g=0;g<e.length;){var l=e[g++];"."==
l?d&&g==e.length&&f.push(""):".."==l?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),d&&g==e.length&&f.push("")):(f.push(l),d=!0)}d=f.join("/")}else d=e}c?b.setPath(d):c=""!==a.T.toString();c?ue(b,ve(a.T.toString())):c=!!a.ga;c&&(a=a.ga,se(b),b.ga=a);return b};qe.prototype.clone=function(){return new qe(this)};
var re=function(a,b,c){se(a);a.da=c?ve(b,!0):b;a.da&&(a.da=a.da.replace(/:$/,""))},te=function(a,b){se(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ua=b}else a.ua=null};qe.prototype.getPath=function(){return this.qb};qe.prototype.setPath=function(a,b){se(this);this.qb=b?ve(a,!0):a;return this};var ue=function(a,b,c){se(a);b instanceof we?(a.T=b,a.T.ic(a.J)):(c||(b=xe(b,Ce)),a.T=new we(b,0,a.J))},se=function(a){if(a.Ld)throw Error("Tried to modify a read-only Uri");};
qe.prototype.ic=function(a){this.J=a;this.T&&this.T.ic(a);return this};
var De=function(a){return a instanceof qe?a.clone():new qe(a,void 0)},ve=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},xe=function(a,b,c){return p(a)?(a=encodeURI(a).replace(b,Ee),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},Ee=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},ye=/[#\/\?@]/g,Ae=/[\#\?:]/g,ze=/[\#\?]/g,Ce=/[\#\?@]/g,Be=/#/g,we=function(a,b,c){this.f=this.i=null;this.G=a||null;this.J=!!c},Fe=function(a){a.i||
(a.i=new Ad,a.f=0,a.G&&Wd(a.G,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=we.prototype;h.C=function(){Fe(this);return this.f};h.add=function(a,b){Fe(this);this.G=null;a=Ge(this,a);var c=this.i.get(a);c||this.i.set(a,c=[]);c.push(b);this.f=Ma(this.f)+1;return this};h.remove=function(a){Fe(this);a=Ge(this,a);return this.i.$(a)?(this.G=null,this.f=Ma(this.f)-this.i.get(a).length,this.i.remove(a)):!1};h.clear=function(){this.i=this.G=null;this.f=0};
h.isEmpty=function(){Fe(this);return 0==this.f};h.$=function(a){Fe(this);a=Ge(this,a);return this.i.$(a)};h.M=function(){Fe(this);for(var a=this.i.u(),b=this.i.M(),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.u=function(a){Fe(this);var b=[];if(p(a))this.$(a)&&(b=bb(b,this.i.get(Ge(this,a))));else{a=this.i.u();for(var c=0;c<a.length;c++)b=bb(b,a[c])}return b};
h.set=function(a,b){Fe(this);this.G=null;a=Ge(this,a);this.$(a)&&(this.f=Ma(this.f)-this.i.get(a).length);this.i.set(a,[b]);this.f=Ma(this.f)+1;return this};h.get=function(a,b){var c=a?this.u(a):[];return 0<c.length?String(c[0]):b};h.setValues=function(a,b){this.remove(a);0<b.length&&(this.G=null,this.i.set(Ge(this,a),cb(b)),this.f=Ma(this.f)+b.length)};
h.toString=function(){if(this.G)return this.G;if(!this.i)return"";for(var a=[],b=this.i.M(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.u(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.G=a.join("&")};h.clone=function(){var a=new we;a.G=this.G;this.i&&(a.i=this.i.clone(),a.f=this.f);return a};var Ge=function(a,b){var c=String(b);a.J&&(c=c.toLowerCase());return c};
we.prototype.ic=function(a){a&&!this.J&&(Fe(this),this.G=null,this.i.forEach(function(a,c){var d=c.toLowerCase();c!=d&&(this.remove(c),this.setValues(d,a))},this));this.J=a};var Ne=function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];d&&(db(f,d),fb(f));He=a;Ie=f;null===a?Je=null:Ke(function(){Le(b,c,e||ja(Me,b,c))})};w("ee.data.authenticate",Ne);var Me=function(a,b){k.gapi.auth.authorize({client_id:He,immediate:!1,scope:Ie.join(" ")},ja(Oe,a,b))};w("ee.data.authenticateViaPopup",Me);
var Pe=function(a,b,c,d,e,f,g){var l=["https://www.googleapis.com/auth/earthengine"];e&&(db(l,e),fb(l));He=a;Ie=l;var v={token_type:b,access_token:c,state:l.join(" "),expires_in:d};Oe(void 0,void 0,v);!1===g?f&&f():Ke(function(){k.gapi.auth.setToken(v);f&&f()})};w("ee.data.setAuthToken",Pe);var Le=function(a,b,c){Qe&&He&&Qe({client_id:String(He),immediate:!0,scope:Ie.join(" ")},function(d){"immediate_failed"==d.error&&c?c():Oe(a,b,d)})},Re=function(a){Qe=a};w("ee.data.setAuthTokenRefresher",Re);
var Ue=function(){Se&&0<=ka()-Se&&Te();return Je};w("ee.data.getAuthToken",Ue);var Te=function(){Se=Je=null};w("ee.data.clearAuthToken",Te);var Ve=function(){return He};w("ee.data.getAuthClientId",Ve);var We=function(){return Ie};w("ee.data.getAuthScopes",We);var af=function(a,b,c){null!=a?Xe=a:Ye||(Xe="https://earthengine.googleapis.com/api");null!=b?Ze=b:Ye||(Ze="https://earthengine.googleapis.com");m(c)&&($e=c);Ye=!0},cf=function(a){bf=a};w("ee.data.setDeadline",cf);
w("ee.data.setParamAugmenter",function(a){df=a||fc});var ef=function(){return Xe};w("ee.data.getApiBaseUrl",ef);var ff=function(){return Ze};w("ee.data.getTileBaseUrl",ff);var gf=function(){return $e};w("ee.data.getXsrfToken",gf);var hf=function(a,b){a=sa(a);return C("/mapid",D(a),b)};w("ee.data.getMapId",hf);var jf=function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[Ze,"map",a.mapid,d,b,c].join("/")+"?token="+a.token};w("ee.data.getTileUrl",jf);
var kf=function(a,b){a=sa(a);return C("/value",D(a),b)};w("ee.data.getValue",kf);var lf=function(a,b){a=sa(a);n(a.size)&&(a.size=a.size.join("x"));var c=D(a).add("getid","1");return C("/thumb",c,b)};w("ee.data.getThumbId",lf);var mf=function(a){return Ze+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};w("ee.data.makeThumbUrl",mf);var nf=function(a,b){a=sa(a);return C("/download",D(a),b)};w("ee.data.getDownloadId",nf);var of=function(a){return Ze+"/api/download?docid="+a.docid+"&token="+a.token};
w("ee.data.makeDownloadUrl",of);var pf=function(a,b){a=sa(a);return C("/table",D(a),b)};w("ee.data.getTableDownloadId",pf);var qf=function(a){return Ze+"/api/table?docid="+a.docid+"&token="+a.token};w("ee.data.makeTableDownloadUrl",qf);var sf=function(a,b,c){var d=rf;try{return rf=a,b.call(c)}finally{rf=d}};w("ee.data.withProfiling",sf);w("ee.data.newTaskId",function(a,b){var c={};q(a)&&(c.count=a);return C("/newtaskid",D(c),b)});
w("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");return C("/taskstatus?q="+a.join(),null,b,"GET")});w("ee.data.getTaskList",function(a){return C("/tasklist",null,a,"GET")});w("ee.data.cancelTask",function(a,b){return tf(a,"CANCEL",b)});
var tf=function(a,b,c){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");var d;a:{d=uf;for(var e in d)if(d[e]==b){d=!0;break a}d=!1}if(!d)throw Error("Invalid action: "+b);return C("/updatetask",D({id:a,action:b}),c,"POST")};w("ee.data.updateTask",tf);w("ee.data.startProcessing",function(a,b,c){b=sa(b);b.id=a;return C("/processingrequest",D(b),c)});
w("ee.data.startIngestion",function(a,b,c){a={id:a,request:Qc(b)};return C("/ingestionrequest",D(a),c)});var vf=function(a,b){return C("/info",(new we).add("id",a),b)};w("ee.data.getInfo",vf);var wf=function(a,b){var c=D(a);return C("/list",c,b)};w("ee.data.getList",wf);w("ee.data.getAssetRoots",function(a){return C("/buckets",null,a,"GET")});w("ee.data.createAssetHome",function(a,b){var c=D({id:a});C("/createbucket",c,b)});
w("ee.data.createAsset",function(a,b,c,d){p(a)||(a=Qc(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return C("/create",D(a),d)});w("ee.data.createFolder",function(a,b,c){return C("/createfolder",D({id:a,force:b||!1}),c)});w("ee.data.renameAsset",function(a,b,c){C("/rename",D({sourceId:a,destinationId:b}),c)});w("ee.data.copyAsset",function(a,b,c){C("/copy",D({sourceId:a,destinationId:b}),c)});w("ee.data.deleteAsset",function(a,b){C("/delete",D({id:a}),b)});
w("ee.data.getAssetAcl",function(a,b){return C("/getacl",D({id:a}),b,"GET")});w("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:Qc(b)};C("/setacl",D(a),c)});w("ee.data.setAssetProperties",function(a,b,c){a={id:a,properties:Qc(b)};C("/setproperties",D(a),c)});w("ee.data.getAssetRootQuota",function(a,b){return C("/quota",D({id:a}),b,"GET")});
var uf={de:"CANCEL",he:"UPDATE"},C=function(a,b,c,d){af();var e=rf,f={"Content-Type":"application/x-www-form-urlencoded"},g=Ue();if(null!=g)f.Authorization=g;else if(c&&Qe&&He)return Le(function(){sf(e,function(){C(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new we;e&&b.add("profiling","1");b=df(b,a);null!=$e&&(f["X-XSRF-Token"]=$e);var l=function(a,b,c,d){var f=b("X-Earth-Engine-Computation-Profile");f&&e&&e(f);var g,l,v;b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==
b||"text/json"==b)try{g=Oc(c),l=g.data}catch(Q){v="Invalid JSON: "+c}else v="Response was unexpectedly not JSON, but "+b;if(t(g))"error"in g&&"message"in g.error?v=g.error.message:"data"in g||(v="Malformed response: "+c);else if(0===a)v="Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";else if(200>a||300<=a)v="Server returned HTTP code: "+a;if(d)return d(l,v),null;if(!v)return l;throw Error(v);},v=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(v)||
(a+=-1!=a.indexOf("?")?"&":"?",a+=v,v=null);var Q=Xe+a;if(c)return xf.push({url:Q,Kb:function(a){a=a.target;var b=a.getStatus(),d=u(a.getResponseHeader,a),e;try{e=a.a?a.a.responseText:""}catch(f){Ud(a.F,"Can not get responseText: "+f.message),e=""}return l(b,d,e,c)},method:g,content:v,headers:f}),yf.Hc(),null;var L=$d();L.open(g,Q,!1);la(f,function(a,b){L.setRequestHeader(b,a)});L.send(v);return l(L.status,function(a){try{return L.getResponseHeader(a)}catch(b){return null}},L.responseText,null)},
Ke=function(a){var b=function(){k.gapi.config.update("client/cors",!0);Qe||(Qe=k.gapi.auth.authorize);a()};if(t(k.gapi)&&t(k.gapi.auth)&&r(k.gapi.auth.authorize))b();else{for(var c=ka().toString(36);c in k;)c+="_";k[c]=function(){delete k[c];b()};vd("https://apis.google.com/js/client.js?onload="+c)}},Oe=function(a,b,c){c.access_token?(b=c.token_type+" "+c.access_token,isFinite(c.expires_in)&&(c=900*c.expires_in,setTimeout(Le,.9*c),Se=ka()+c),Je=b,a&&a()):b&&b(c.error||"Unknown error.")},D=function(a){var b=
new we,c;for(c in a)b.set(c,a[c]);return b},xf=[],yf=new Lc(function(){var a=xf.shift();if(a){var b=a.url,c=a.Kb,d=a.method,e=a.content,a=a.headers,f=bf,g=new B;ge.push(g);c&&g.Oa("complete",c);g.mb("ready",g.Ad);f&&(g.Ba=Math.max(0,f));g.send(b,d,e,a)}0==xf.length||yf.Hc()},350),Xe=null,Ze=null,$e=null,df=fc,Je=null,Se=null,He=null,Ie=[],Qe=null,Ye=!1,bf=0,rf=null;var zf=function(){};var Af=function(){this.U=-1};var Bf=function(){this.U=-1;this.U=64;this.B=Array(4);this.wd=Array(this.U);this.yb=this.Ea=0;this.reset()};x(Bf,Af);Bf.prototype.reset=function(){this.B[0]=1732584193;this.B[1]=4023233417;this.B[2]=2562383102;this.B[3]=271733878;this.yb=this.Ea=0};
var Cf=function(a,b,c){c||(c=0);var d=Array(16);if(p(b))for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.B[0];c=a.B[1];var e=a.B[2],f=a.B[3],g;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|
@ -113,104 +113,104 @@ b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+
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.B[0]=a.B[0]+b&4294967295;a.B[1]=a.B[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.B[2]=a.B[2]+e&4294967295;a.B[3]=a.B[3]+f&4294967295};
Cf.prototype.update=function(a,b){m(b)||(b=a.length);for(var c=b-this.U,d=this.vd,e=this.Ea,f=0;f<b;){if(0==e)for(;f<=c;)Df(this,a,f),f+=this.U;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.U){Df(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.U){Df(this,d);e=0;break}}this.Ea=e;this.yb+=b};
Cf.prototype.digest=function(){var a=Array((56>this.Ea?this.U:2*this.U)-this.Ea);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;for(var c=8*this.yb,b=a.length-8;b<a.length;++b)a[b]=c&255,c/=256;this.update(a);a=Array(16);for(b=c=0;4>b;++b)for(var d=0;32>d;d+=8)a[c++]=this.B[b]>>>d&255;return a};var Ef=function(a){this.Va="__ee_hash__";this.ac=!1!==a;this.za=[];this.ra={};this.qc=[]};w("ee.Serializer",Ef);var Ff=new Qc,Gf=new Cf,If=function(a,b){return Hf(new Ef(m(b)?b:!0),a)};w("ee.Serializer.encode",If);var Jf=function(a){return Ff.A(If(a))};w("ee.Serializer.toJSON",Jf);var Kf=function(a){a=Hf(new Ef(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Ff.A(a)};w("ee.Serializer.toReadableJSON",Kf);
var Hf=function(a,b){var c=a.ab(b);a.ac&&(c=t(c)&&"ValueRef"==c.type&&1==a.za.length?a.za[0][1]:{type:"CompoundValue",scope:a.za,value:c},a.za=[],Ta(a.qc,u(function(a){delete a[this.Va]},a)),a.qc=[],a.ra={});return c};
Ef.prototype.ab=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b,c=t(a)?a[this.Va]:null;if(this.ac&&null!=c&&this.ra[c])return{type:"ValueRef",value:this.ra[c]};if(null===a||"boolean"==typeof a||q(a)||p(a))return a;if(t(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof Af){if(b=a.encode(u(this.ab,this)),!(n(b)||t(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Va(a,function(a){return this.ab(a)},
this);else if(t(a)&&!r(a))b=na(a,function(a){if(!r(a))return this.ab(a)},this),sa(b,this.Va),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.ac){Gf.reset();Gf.update(Ff.A(b));var c=Gf.digest().toString(),d;this.ra[c]?d=this.ra[c]:(d=String(this.za.length),this.za.push([d,b]),this.ra[c]=d);a[this.Va]=c;this.qc.push(a);return{type:"ValueRef",value:d}}return b};var E=function(a,b,c){if(!(this instanceof E))return F(E,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.c=a;this.m=b;this.v=c||null};x(E,Af);w("ee.ComputedObject",E);E.prototype.w=function(a){return lf({json:this.A()},a)};E.prototype.getInfo=E.prototype.w;
E.prototype.encode=function(a){if(null===this.c&&null===this.m)return{type:"ArgumentRef",value:this.v};var b={},c;for(c in this.m)m(this.m[c])&&(b[c]=a(this.m[c]));b={type:"Invocation",arguments:b};a=a(this.c);b[p(a)?"functionName":"function"]=a;return b};E.prototype.A=function(){return Jf(this)};E.prototype.serialize=E.prototype.A;E.prototype.toString=function(){return"ee."+this.name()+"("+Kf(this)+")"};E.prototype.toString=E.prototype.toString;E.prototype.name=function(){return"ComputedObject"};
E.prototype.sc=function(a,b){var c=db(arguments);c[0]=this;a.apply(k,c);return this};E.prototype.aside=E.prototype.sc;var Lf=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;c=new c;c.c=b.c;c.m=b.m;c.v=b.v;return c},F=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Mf={},Nf=function(a){return a.prototype instanceof E?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},Of=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}},Pf=function(a){return q(a)||
a instanceof E&&"Number"==a.name()},Qf=function(a){return p(a)||a instanceof E&&"String"==a.name()},Rf=function(a){return t(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var G=function(){if(!(this instanceof G))return new G};x(G,Af);w("ee.Function",G);var Sf=gc;G.prototype.call=function(a){return this.apply(Tf(this,Array.prototype.slice.call(arguments,0)))};G.prototype.call=G.prototype.call;G.prototype.apply=function(a){a=new E(this,Uf(this,a));return Sf(a,this.H().returns)};G.prototype.apply=G.prototype.apply;
var Vf=function(a,b,c){var d=m(b),e=a.H(),f=!1;if(1==c.length&&Rf(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=ta(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=Tf(a,d?[b].concat(c):c);return a.apply(c)},Uf=function(a,b){for(var c=a.H().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&m(b[g]))d[g]=Sf(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+
g+") missing to function: "+a);e[g]=!0}var c=[],l;for(l in b)e[l]||c.push(l);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},Tf=function(a,b){var c=a.H().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};
G.prototype.toString=function(a,b){var c=this.H(),d=[];d.push(a||c.name);d.push("(");d.push(Va(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("")};G.prototype.A=function(){return Jf(this)};var H=function(a,b){if(!m(b))return Wf(a);if(!(this instanceof H))return F(H,arguments);this.Aa=ua(b);this.Aa.name=a};x(H,G);w("ee.ApiFunction",H);var I=function(a,b){return G.prototype.call.apply(Wf(a),Array.prototype.slice.call(arguments,1))};w("ee.ApiFunction._call",I);var Xf=function(a,b){return Wf(a).apply(b)};w("ee.ApiFunction._apply",Xf);H.prototype.encode=function(){return this.Aa.name};H.prototype.H=function(){return this.Aa};
var Yf=null,Zf={},ag=function(){$f();return na(Yf,function(a){return a.H()})},bg=function(){$f();return ma(Yf,function(a,b){return!Zf[b]})},Wf=function(a){var b=cg(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};w("ee.ApiFunction.lookup",Wf);
var cg=function(a){$f();return Yf[a]||null},$f=function(a,b){if(Yf)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(Yf=na(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 H(b,a)}),a&&a())};a?C("/algorithms",null,c,"GET"):c(C("/algorithms",null,void 0,"GET"))}},J=function(a,b,c,d){$f();var e=d||"";la(Yf,function(d,g){var l=g.split(".");if(2==l.length&&l[0]==b){var l=e+l[1],v=d.H();Zf[g]=!0;var Q=!1;if(v.args.length)var K=
v.args[0].type,Q="Object"!=K&&Of(K,c);K=Q?a.prototype:a;l in K&&!K[l].signature||(K[l]=function(a){return Vf(d,Q?this:void 0,Array.prototype.slice.call(arguments,0))},K[l].toString=u(d.toString,d,l,Q),K[l].signature=v)}})},L=function(a){var b=function(a){for(var b in a)r(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var M=function(a,b){var c=dg(a),d=Va(c,function(a){return a.replace(/^opt_/,"")}),e=k.Da?k.Da[a.toString()].name.split(".").pop()+"()":null,e=e?" to function "+e:"",f={},g=b[0],l=t(g)&&!r(g)&&!n(g)&&!(g instanceof E);if(1<b.length||!l){if(b.length>d.length)throw Error("Received too many arguments"+e+". Expected at most "+d.length+" but got "+b.length+".");for(g=0;g<b.length;g++)f[d[g]]=b[g]}else{var l=new Gd(pa(g)),v=new Gd(d);if(Id(v,l).isEmpty())f[d[0]]=b[0];else{f=Jd(l,v);if(!f.isEmpty())throw Error("Unexpected arguments"+
e+": "+f.u().join(", "));f=ta(g)}}d=new Gd(pa(f));c=Jd(new Gd(Ua(c,function(a){return 0!=a.lastIndexOf("opt_",0)})),d);if(!c.isEmpty())throw Error("Missing required arguments"+e+": "+c.u().join(", "));return f},dg=function(a){k.Da?(a=k.Da[a.toString()],Pa(a),a=a.paramNames,Qa(a)):a=a.toString().replace(eg,"").match(fg)[1].split(",")||[];return a},eg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/mg,fg=/^function\s*[^\(]*\(\s*([^\)]*)\)/m;var N=function(a,b,c){E.call(this,a,b,c);gg()};x(N,E);w("ee.Element",N);var hg=!1,gg=function(){hg||(J(N,"Element","Element"),hg=!0)};N.prototype.name=function(){return"Element"};
N.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=Rf(c))a:{b=pa(c);var d=["properties"];if(ea(b)&&ea(d)&&b.length==d.length){for(var e=b.length,f=0;f<e;f++)if(b[f]!==d[f]){b=!1;break a}b=!0}else b=!1}b&&t(c.properties)&&(c=c.properties);if(Rf(c)){b=this;for(var g in c)d=c[g],b=I("Element.set",b,g,d)}else if(c instanceof E&&cg("Element.setMulti"))b=I("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=I("Element.set",b,g,d)}return Lf(this,b)};N.prototype.set=N.prototype.set;var O=function(a){if(!(this instanceof O))return F(O,arguments);if(a instanceof O)return a;ig();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new O(a[0]);E.call(this,new H("Filter.and"),{filters:a});this.Ga=a}else if(a instanceof E)E.call(this,a.c,a.m,a.v),this.Ga=[a];else{if(m(a))throw Error("Invalid argument specified for ee.Filter(): "+a);E.call(this,null,null);this.Ga=[]}};x(O,E);w("ee.Filter",O);
var jg=!1,ig=function(){jg||(J(O,"Filter","Filter"),jg=!0)},kg={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"},P=function(a,b){var c=a.Ga.slice(0);b instanceof O?eb(c,b.Ga):b instanceof Array?eb(c,b):c.push(b);return new O(c)};O.prototype.Y=function(){return I("Filter.not",this)};O.prototype.not=O.prototype.Y;var lg=function(a,b){var c=M(lg,arguments);return I("Filter.equals",c.name,c.value)};
O.eq=lg;var mg=function(a,b){var c=M(mg,arguments);return lg(c.name,c.value).Y()};O.neq=mg;var ng=function(a,b){var c=M(ng,arguments);return I("Filter.lessThan",c.name,c.value)};O.lt=ng;var og=function(a,b){var c=M(og,arguments);return ng(c.name,c.value).Y()};O.gte=og;var pg=function(a,b){var c=M(pg,arguments);return I("Filter.greaterThan",c.name,c.value)};O.gt=pg;var qg=function(a,b){var c=M(qg,arguments);return pg(c.name,c.value).Y()};O.lte=qg;var rg=function(a){return I("Filter.and",Array.prototype.slice.call(arguments))};
O.and=rg;var sg=function(a){return I("Filter.or",Array.prototype.slice.call(arguments))};O.or=sg;var tg=function(a,b){var c=M(tg,arguments),c=I("DateRange",c.start,c.end);return Xf("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};O.date=tg;var ug=function(a,b,c,d){var e=M(ug,arguments);return Xf("Filter.listContains",{leftField:e.rightField,rightValue:e.leftValue,rightField:e.leftField,leftValue:e.rightValue})};O.inList=ug;
var vg=function(a,b){return Xf("Filter.intersects",{leftField:".all",rightValue:I("Feature",a),maxError:b})};O.bounds=vg;O.prototype.name=function(){return"Filter"};var wg=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in kg))throw Error("Unknown filtering operator: "+b);a=I("Filter."+kg[b],a,c);return d?a.Y():a};O.metadata=wg;var xg=function(a,b){return I("Filter.stringContains",a,b)};O.contains=xg;var yg=function(a,b){return xg(a,b).Y()};
O.not_contains=yg;var zg=function(a,b){return I("Filter.stringStartsWith",a,b)};O.starts_with=zg;var Ag=function(a,b){return zg(a,b).Y()};O.not_starts_with=Ag;var Bg=function(a,b){return I("Filter.stringEndsWith",a,b)};O.ends_with=Bg;var Cg=function(a,b){return Bg(a,b).Y()};O.not_ends_with=Cg;O.prototype.Dc=function(a){return P(this,lg.apply(null,[].slice.call(arguments)))};O.prototype.eq=O.prototype.Dc;O.prototype.length=function(){return this.Ga.length};O.prototype.length=O.prototype.length;
O.prototype.Yc=function(a){return P(this,mg.apply(null,[].slice.call(arguments)))};O.prototype.neq=O.prototype.Yc;O.prototype.Vc=function(a){return P(this,ng.apply(null,[].slice.call(arguments)))};O.prototype.lt=O.prototype.Vc;O.prototype.Lc=function(a){return P(this,og.apply(null,[].slice.call(arguments)))};O.prototype.gte=O.prototype.Lc;O.prototype.Kc=function(a){return P(this,pg.apply(null,[].slice.call(arguments)))};O.prototype.gt=O.prototype.Kc;
O.prototype.Wc=function(a){return P(this,qg.apply(null,[].slice.call(arguments)))};O.prototype.lte=O.prototype.Wc;O.prototype.contains=function(a){return P(this,xg.apply(null,[].slice.call(arguments)))};O.prototype.contains=O.prototype.contains;O.prototype.Zc=function(a){return P(this,yg.apply(null,[].slice.call(arguments)))};O.prototype.not_contains=O.prototype.Zc;O.prototype.od=function(a){return P(this,zg.apply(null,[].slice.call(arguments)))};O.prototype.starts_with=O.prototype.od;
O.prototype.ad=function(a){return P(this,Ag.apply(null,[].slice.call(arguments)))};O.prototype.not_starts_with=O.prototype.ad;O.prototype.Cc=function(a){return P(this,Bg.apply(null,[].slice.call(arguments)))};O.prototype.ends_with=O.prototype.Cc;O.prototype.$c=function(a){return P(this,Cg.apply(null,[].slice.call(arguments)))};O.prototype.not_ends_with=O.prototype.$c;O.prototype.rc=function(a){return P(this,rg.apply(null,[].slice.call(arguments)))};O.prototype.and=O.prototype.rc;
O.prototype.zc=function(a){return P(this,tg.apply(null,[].slice.call(arguments)))};O.prototype.date=O.prototype.zc;O.prototype.Oc=function(a){return P(this,ug.apply(null,[].slice.call(arguments)))};O.prototype.inList=O.prototype.Oc;O.prototype.bounds=function(a){return P(this,vg.apply(null,[].slice.call(arguments)))};O.prototype.bounds=O.prototype.bounds;var R=function(a,b,c){N.call(this,a,b,c);Dg()};x(R,N);w("ee.Collection",R);var Eg=!1,Dg=function(){Eg||(J(R,"Collection","Collection"),J(R,"AggregateFeatureCollection","Collection","aggregate_"),Eg=!0)};R.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Lf(this,I("Collection.filter",this,a))};R.prototype.filter=R.prototype.filter;R.prototype.Vb=function(a,b,c){var d=M(R.prototype.Vb,arguments);return this.filter(wg(d.name,d.operator,d.value))};R.prototype.filterMetadata=R.prototype.Vb;
R.prototype.Gc=function(a){return this.filter(vg(a))};R.prototype.filterBounds=R.prototype.Gc;R.prototype.Ub=function(a,b){var c=M(R.prototype.Ub,arguments);return this.filter(tg(c.start,c.end))};R.prototype.filterDate=R.prototype.Ub;R.prototype.limit=function(a,b,c){var d=M(R.prototype.limit,arguments);return Lf(this,I("Collection.limit",this,d.max,d.property,d.ascending))};R.prototype.limit=R.prototype.limit;
R.prototype.sort=function(a,b){var c=M(R.prototype.sort,arguments);return Lf(this,I("Collection.limit",this,void 0,c.property,c.ascending))};R.prototype.sort=R.prototype.sort;R.prototype.name=function(){return"Collection"};R.prototype.elementType=function(){return N};R.prototype.map=function(a,b){var c=this.elementType();return Lf(this,I("Collection.map",this,function(b){return a(new c(b))},b))};R.prototype.map=R.prototype.map;
R.prototype.Sc=function(a,b){var c=m(b)?b:null,d=this.elementType();return I("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};R.prototype.iterate=R.prototype.Sc;var Fg=function(a){if(!(this instanceof Fg))return F(Fg,arguments);if(a instanceof Fg)return a;Gg();if(q(a))E.call(this,null,null),this.dc=a;else if(a instanceof E)E.call(this,a.c,a.m,a.v),this.dc=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};x(Fg,E);w("ee.Number",Fg);var Hg=!1,Gg=function(){Hg||(J(Fg,"Number","Number"),Hg=!0)};Fg.prototype.encode=function(a){return q(this.dc)?this.dc:Fg.l.encode.call(this,a)};Fg.prototype.name=function(){return"Number"};var S=function(a){if(!(this instanceof S))return F(S,arguments);if(a instanceof S)return a;Ig();if(p(a))E.call(this,null,null),this.kc=a;else if(a instanceof E)this.kc=null,a.c&&"String"==a.c.H().returns?E.call(this,a.c,a.m,a.v):E.call(this,new H("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};x(S,E);w("ee.String",S);var Jg=!1,Ig=function(){Jg||(J(S,"String","String"),Jg=!0)};
S.prototype.encode=function(a){return p(this.kc)?this.kc:S.l.encode.call(this,a)};S.prototype.name=function(){return"String"};var Kg=function(a,b){if(!(this instanceof Kg))return F(Kg,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(Lg(g in Mf?Mf[g]:null,f.name))}if(!m(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.Aa=Mg(a,c,b);this.wd=b.apply(null,c)};x(Kg,G);w("ee.CustomFunction",Kg);Kg.prototype.encode=function(a){return{type:"Function",argumentNames:Va(this.Aa.args,function(a){return a.name}),body:a(this.wd)}};Kg.prototype.H=function(){return this.Aa};
var Lg=function(a,b){a=a||Object;if(!(a.prototype instanceof E))if(a&&a!=Object)if(a==String)a=S;else if(a==Number)a=Fg;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=E;var c=function(){};c.prototype=a.prototype;c=new c;c.c=null;c.m=null;c.v=b;return c},Ng=function(a,b){var c=Va(b,function(a){return{name:null,type:p(a)?a:Nf(a)}}),c={name:"",returns:p("Object")?"Object":Nf("Object"),args:c};return new Kg(c,a)},Mg=function(a,b,c){for(var d=
[],e=0;e<b.length;e++)null===b[e].v&&d.push(e);if(0==d.length)return a;var f=function(a){var b=0;t(a)&&!r(a)&&("Function"==a.type&&b++,la(a,function(a){b+=f(a)}));return b},e=If(c.apply(null,b));c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],l=c+e;b[g].v=l;a.args[g].name=l}return a};var Og=function(a,b){if(!(this instanceof Og))return F(Og,arguments);if(a instanceof Og)return a;Pg();var c=M(Og,arguments);a=c.date;var c=c.tz,d=new H("Date"),e={},f=null;if(Qf(a)){if(e.value=a,c)if(Qf(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(Pf(a))e.value=a;else if(t(a)&&"function"==typeof a.getFullYear)e.value=Math.floor(a.getTime());else if(a instanceof E)a.c&&"Date"==a.c.H().returns?(d=a.c,e=a.m,f=a.v):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
a);E.call(this,d,e,f)};x(Og,E);w("ee.Date",Og);var Qg=!1,Pg=function(){Qg||(J(Og,"Date","Date"),Qg=!0)};Og.prototype.name=function(){return"Date"};var T=function(a,b,c,d){if(!(this instanceof T))return F(T,arguments);if(!("type"in a)){var e=M(T,arguments);a=e.geoJson;b=e.proj;c=e.geodesic;d=e.evenOdd}Rg();e=null!=b||null!=c||null!=d;if(a instanceof E&&!(a instanceof T&&a.zb)){if(e)throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not suported. Use Geometry.transform().");E.call(this,a.c,a.m,a.v)}else{a instanceof T&&(a=a.encode());if(!Sg(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));E.call(this,
null,null);this.zb=a.type;this.Ad=a.coordinates||null;this.Ed=a.geometries||null;if(null!=b)this.hc=b;else if("crs"in a)if(t(a.crs)&&"name"==a.crs.type&&t(a.crs.properties)&&p(a.crs.properties.name))this.hc=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new Qc).A(a.crs));this.eb=c;!m(this.eb)&&"geodesic"in a&&(this.eb=!!a.geodesic);this.cb=d;!m(this.cb)&&"evenOdd"in a&&(this.cb=!!a.evenOdd)}};x(T,E);w("ee.Geometry",T);
var Tg=!1,Rg=function(){Tg||(J(T,"Geometry","Geometry"),Tg=!0)},Ug=function(a,b){if(!(this instanceof Ug))return Vg(Ug,arguments);var c=Wg(Ug,"Point",1,arguments);if(!(c instanceof E)){var d=c.coordinates;if(!n(d)||2!=d.length)throw Error("The Geometry.Point constructor requires 2 coordinates.");}T.call(this,c)};x(Ug,T);T.Point=Ug;var Xg=function(a,b){if(!(this instanceof Xg))return Vg(Xg,arguments);T.call(this,Wg(Xg,"MultiPoint",2,arguments))};x(Xg,T);T.MultiPoint=Xg;
var Yg=function(a,b,c,d,e){if(!(this instanceof Yg))return Vg(Yg,arguments);var f=Wg(Yg,"Rectangle",2,arguments);if(!(f instanceof E)){var g=f.coordinates;if(2!=g.length)throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");var l=g[0][0],v=g[0][1],Q=g[1][0],g=g[1][1];f.coordinates=[[[l,g],[l,v],[Q,v],[Q,g]]];f.type="Polygon"}T.call(this,f)};x(Yg,T);T.Rectangle=Yg;
var Zg=function(a,b,c,d){if(!(this instanceof Zg))return Vg(Zg,arguments);T.call(this,Wg(Zg,"LineString",2,arguments))};x(Zg,T);T.LineString=Zg;var $g=function(a,b,c,d){if(!(this instanceof $g))return Vg($g,arguments);T.call(this,Wg($g,"LinearRing",2,arguments))};x($g,T);T.LinearRing=$g;var ah=function(a,b,c,d){if(!(this instanceof ah))return Vg(ah,arguments);T.call(this,Wg(ah,"MultiLineString",3,arguments))};x(ah,T);T.MultiLineString=ah;
var bh=function(a,b,c,d,e){if(!(this instanceof bh))return Vg(bh,arguments);T.call(this,Wg(bh,"Polygon",3,arguments))};x(bh,T);T.Polygon=bh;var ch=function(a,b,c,d,e){if(!(this instanceof ch))return Vg(ch,arguments);T.call(this,Wg(ch,"MultiPolygon",4,arguments))};x(ch,T);T.MultiPolygon=ch;
T.prototype.encode=function(a){if(!this.zb){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return E.prototype.encode.call(this,a)}a={type:this.zb};"GeometryCollection"==this.zb?a.geometries=this.Ed:a.coordinates=this.Ad;null!=this.hc&&(a.crs={type:"name",properties:{name:this.hc}});null!=this.eb&&(a.geodesic=this.eb);null!=this.cb&&(a.evenOdd=this.cb);return a};
T.prototype.nc=function(){if(this.c)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};T.prototype.toGeoJSON=T.prototype.nc;T.prototype.oc=function(){if(this.c)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new Qc).A(this.nc())};T.prototype.toGeoJSONString=T.prototype.oc;T.prototype.A=function(){return Jf(this)};T.prototype.serialize=T.prototype.A;
Bf.prototype.update=function(a,b){m(b)||(b=a.length);for(var c=b-this.U,d=this.wd,e=this.Ea,f=0;f<b;){if(0==e)for(;f<=c;)Cf(this,a,f),f+=this.U;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.U){Cf(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.U){Cf(this,d);e=0;break}}this.Ea=e;this.yb+=b};
Bf.prototype.digest=function(){var a=Array((56>this.Ea?this.U:2*this.U)-this.Ea);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;for(var c=8*this.yb,b=a.length-8;b<a.length;++b)a[b]=c&255,c/=256;this.update(a);a=Array(16);for(b=c=0;4>b;++b)for(var d=0;32>d;d+=8)a[c++]=this.B[b]>>>d&255;return a};var Df=function(a){this.Va="__ee_hash__";this.ac=!1!==a;this.za=[];this.ra={};this.qc=[]};w("ee.Serializer",Df);var Ef=new Pc,Ff=new Bf,Hf=function(a,b){return Gf(new Df(m(b)?b:!0),a)};w("ee.Serializer.encode",Hf);var If=function(a){return Ef.v(Hf(a))};w("ee.Serializer.toJSON",If);var Jf=function(a){a=Gf(new Df(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Ef.v(a)};w("ee.Serializer.toReadableJSON",Jf);
var Gf=function(a,b){var c=a.ab(b);a.ac&&(c=t(c)&&"ValueRef"==c.type&&1==a.za.length?a.za[0][1]:{type:"CompoundValue",scope:a.za,value:c},a.za=[],Sa(a.qc,u(function(a){delete a[this.Va]},a)),a.qc=[],a.ra={});return c};
Df.prototype.ab=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b,c=t(a)?a[this.Va]:null;if(this.ac&&null!=c&&this.ra[c])return{type:"ValueRef",value:this.ra[c]};if(null===a||"boolean"==typeof a||q(a)||p(a))return a;if(t(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof zf){if(b=a.encode(u(this.ab,this)),!(n(b)||t(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Ua(a,function(a){return this.ab(a)},
this);else if(t(a)&&!r(a))b=na(a,function(a){if(!r(a))return this.ab(a)},this),ra(b,this.Va),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.ac){Ff.reset();Ff.update(Ef.v(b));var c=Ff.digest().toString(),d;this.ra[c]?d=this.ra[c]:(d=String(this.za.length),this.za.push([d,b]),this.ra[c]=d);a[this.Va]=c;this.qc.push(a);return{type:"ValueRef",value:d}}return b};var E=function(a,b,c){if(!(this instanceof E))return F(E,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.c=a;this.m=b;this.w=c||null};x(E,zf);w("ee.ComputedObject",E);E.prototype.evaluate=function(a){if(!a||!r(a))throw Error("evaluate() requires a callback function.");kf({json:this.v()},a)};E.prototype.evaluate=E.prototype.evaluate;
E.prototype.A=function(a){return kf({json:this.v()},a)};E.prototype.getInfo=E.prototype.A;E.prototype.encode=function(a){if(null===this.c&&null===this.m)return{type:"ArgumentRef",value:this.w};var b={},c;for(c in this.m)m(this.m[c])&&(b[c]=a(this.m[c]));b={type:"Invocation",arguments:b};a=a(this.c);b[p(a)?"functionName":"function"]=a;return b};E.prototype.v=function(){return If(this)};E.prototype.serialize=E.prototype.v;E.prototype.toString=function(){return"ee."+this.name()+"("+Jf(this)+")"};
E.prototype.toString=E.prototype.toString;E.prototype.name=function(){return"ComputedObject"};E.prototype.sc=function(a,b){var c=cb(arguments);c[0]=this;a.apply(k,c);return this};E.prototype.aside=E.prototype.sc;var Kf=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;c=new c;c.c=b.c;c.m=b.m;c.w=b.w;return c},F=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Lf={},Mf=function(a){return a.prototype instanceof E?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},Nf=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}},Of=function(a){return q(a)||
a instanceof E&&"Number"==a.name()},Pf=function(a){return p(a)||a instanceof E&&"String"==a.name()},Qf=function(a){return t(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var G=function(){if(!(this instanceof G))return new G};x(G,zf);w("ee.Function",G);var Rf=fc;G.prototype.call=function(a){return this.apply(Sf(this,Array.prototype.slice.call(arguments,0)))};G.prototype.call=G.prototype.call;G.prototype.apply=function(a){a=new E(this,Tf(this,a));return Rf(a,this.H().returns)};G.prototype.apply=G.prototype.apply;
var Uf=function(a,b,c){var d=m(b),e=a.H(),f=!1;if(1==c.length&&Qf(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=sa(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=Sf(a,d?[b].concat(c):c);return a.apply(c)},Tf=function(a,b){for(var c=a.H().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&m(b[g]))d[g]=Rf(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+
g+") missing to function: "+a);e[g]=!0}var c=[],l;for(l in b)e[l]||c.push(l);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},Sf=function(a,b){var c=a.H().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};
G.prototype.toString=function(a,b){var c=this.H(),d=[];d.push(a||c.name);d.push("(");d.push(Ua(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("")};G.prototype.v=function(){return If(this)};var H=function(a,b){if(!m(b))return Vf(a);if(!(this instanceof H))return F(H,arguments);this.Aa=ta(b);this.Aa.name=a};x(H,G);w("ee.ApiFunction",H);var I=function(a,b){return G.prototype.call.apply(Vf(a),Array.prototype.slice.call(arguments,1))};w("ee.ApiFunction._call",I);var Wf=function(a,b){return Vf(a).apply(b)};w("ee.ApiFunction._apply",Wf);H.prototype.encode=function(){return this.Aa.name};H.prototype.H=function(){return this.Aa};
var Xf=null,Yf={},$f=function(){Zf();return na(Xf,function(a){return a.H()})},ag=function(){Zf();return ma(Xf,function(a,b){return!Yf[b]})},Vf=function(a){var b=bg(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};w("ee.ApiFunction.lookup",Vf);
var bg=function(a){Zf();return Xf[a]||null},Zf=function(a,b){if(Xf)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(Xf=na(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 H(b,a)}),a&&a())};a?C("/algorithms",null,c,"GET"):c(C("/algorithms",null,void 0,"GET"))}},J=function(a,b,c,d){Zf();var e=d||"";la(Xf,function(d,g){var l=g.split(".");if(2==l.length&&l[0]==b){var l=e+l[1],v=d.H();Yf[g]=!0;var Q=!1;if(v.args.length)var L=
v.args[0].type,Q="Object"!=L&&Nf(L,c);L=Q?a.prototype:a;l in L&&!L[l].signature||(L[l]=function(a){return Uf(d,Q?this:void 0,Array.prototype.slice.call(arguments,0))},L[l].toString=u(d.toString,d,l,Q),L[l].signature=v)}})},K=function(a){var b=function(a){for(var b in a)r(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var M=function(a,b){var c=cg(a),d=Ua(c,function(a){return a.replace(/^opt_/,"")}),e=k.Da?k.Da[a.toString()].name.split(".").pop()+"()":null,e=e?" to function "+e:"",f={},g=b[0],l=t(g)&&!r(g)&&!n(g)&&!(g instanceof E);if(1<b.length||!l){if(b.length>d.length)throw Error("Received too many arguments"+e+". Expected at most "+d.length+" but got "+b.length+".");for(g=0;g<b.length;g++)f[d[g]]=b[g]}else{var l=new Fd(pa(g)),v=new Fd(d);if(Hd(v,l).isEmpty())f[d[0]]=b[0];else{f=Id(l,v);if(!f.isEmpty())throw Error("Unexpected arguments"+
e+": "+f.u().join(", "));f=sa(g)}}d=new Fd(pa(f));c=Id(new Fd(Ta(c,function(a){return 0!=a.lastIndexOf("opt_",0)})),d);if(!c.isEmpty())throw Error("Missing required arguments"+e+": "+c.u().join(", "));return f},cg=function(a){k.Da?(a=k.Da[a.toString()],Oa(a),a=a.paramNames,Pa(a)):a=a.toString().replace(dg,"").match(eg)[1].split(",")||[];return a},dg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/mg,eg=/^function\s*[^\(]*\(\s*([^\)]*)\)/m;var N=function(a,b,c){E.call(this,a,b,c);fg()};x(N,E);w("ee.Element",N);var gg=!1,fg=function(){gg||(J(N,"Element","Element"),gg=!0)};N.prototype.name=function(){return"Element"};
N.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=Qf(c))a:{b=pa(c);var d=["properties"];if(ea(b)&&ea(d)&&b.length==d.length){for(var e=b.length,f=0;f<e;f++)if(b[f]!==d[f]){b=!1;break a}b=!0}else b=!1}b&&t(c.properties)&&(c=c.properties);if(Qf(c)){b=this;for(var g in c)d=c[g],b=I("Element.set",b,g,d)}else if(c instanceof E&&bg("Element.setMulti"))b=I("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=I("Element.set",b,g,d)}return Kf(this,b)};N.prototype.set=N.prototype.set;var O=function(a){if(!(this instanceof O))return F(O,arguments);if(a instanceof O)return a;hg();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new O(a[0]);E.call(this,new H("Filter.and"),{filters:a});this.Ga=a}else if(a instanceof E)E.call(this,a.c,a.m,a.w),this.Ga=[a];else{if(m(a))throw Error("Invalid argument specified for ee.Filter(): "+a);E.call(this,null,null);this.Ga=[]}};x(O,E);w("ee.Filter",O);
var ig=!1,hg=function(){ig||(J(O,"Filter","Filter"),ig=!0)},jg={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"},P=function(a,b){var c=a.Ga.slice(0);b instanceof O?db(c,b.Ga):b instanceof Array?db(c,b):c.push(b);return new O(c)};O.prototype.Y=function(){return I("Filter.not",this)};O.prototype.not=O.prototype.Y;var kg=function(a,b){var c=M(kg,arguments);return I("Filter.equals",c.name,c.value)};
O.eq=kg;var lg=function(a,b){var c=M(lg,arguments);return kg(c.name,c.value).Y()};O.neq=lg;var mg=function(a,b){var c=M(mg,arguments);return I("Filter.lessThan",c.name,c.value)};O.lt=mg;var ng=function(a,b){var c=M(ng,arguments);return mg(c.name,c.value).Y()};O.gte=ng;var og=function(a,b){var c=M(og,arguments);return I("Filter.greaterThan",c.name,c.value)};O.gt=og;var pg=function(a,b){var c=M(pg,arguments);return og(c.name,c.value).Y()};O.lte=pg;var qg=function(a){return I("Filter.and",Array.prototype.slice.call(arguments))};
O.and=qg;var rg=function(a){return I("Filter.or",Array.prototype.slice.call(arguments))};O.or=rg;var sg=function(a,b){var c=M(sg,arguments),c=I("DateRange",c.start,c.end);return Wf("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};O.date=sg;var tg=function(a,b,c,d){var e=M(tg,arguments);return Wf("Filter.listContains",{leftField:e.rightField,rightValue:e.leftValue,rightField:e.leftField,leftValue:e.rightValue})};O.inList=tg;
var ug=function(a,b){return Wf("Filter.intersects",{leftField:".all",rightValue:I("Feature",a),maxError:b})};O.bounds=ug;O.prototype.name=function(){return"Filter"};var vg=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in jg))throw Error("Unknown filtering operator: "+b);a=I("Filter."+jg[b],a,c);return d?a.Y():a};O.metadata=vg;var wg=function(a,b){return I("Filter.stringContains",a,b)};O.contains=wg;var xg=function(a,b){return wg(a,b).Y()};
O.not_contains=xg;var yg=function(a,b){return I("Filter.stringStartsWith",a,b)};O.starts_with=yg;var zg=function(a,b){return yg(a,b).Y()};O.not_starts_with=zg;var Ag=function(a,b){return I("Filter.stringEndsWith",a,b)};O.ends_with=Ag;var Bg=function(a,b){return Ag(a,b).Y()};O.not_ends_with=Bg;O.prototype.Dc=function(a){return P(this,kg.apply(null,[].slice.call(arguments)))};O.prototype.eq=O.prototype.Dc;O.prototype.length=function(){return this.Ga.length};O.prototype.length=O.prototype.length;
O.prototype.Yc=function(a){return P(this,lg.apply(null,[].slice.call(arguments)))};O.prototype.neq=O.prototype.Yc;O.prototype.Vc=function(a){return P(this,mg.apply(null,[].slice.call(arguments)))};O.prototype.lt=O.prototype.Vc;O.prototype.Lc=function(a){return P(this,ng.apply(null,[].slice.call(arguments)))};O.prototype.gte=O.prototype.Lc;O.prototype.Kc=function(a){return P(this,og.apply(null,[].slice.call(arguments)))};O.prototype.gt=O.prototype.Kc;
O.prototype.Wc=function(a){return P(this,pg.apply(null,[].slice.call(arguments)))};O.prototype.lte=O.prototype.Wc;O.prototype.contains=function(a){return P(this,wg.apply(null,[].slice.call(arguments)))};O.prototype.contains=O.prototype.contains;O.prototype.Zc=function(a){return P(this,xg.apply(null,[].slice.call(arguments)))};O.prototype.not_contains=O.prototype.Zc;O.prototype.od=function(a){return P(this,yg.apply(null,[].slice.call(arguments)))};O.prototype.starts_with=O.prototype.od;
O.prototype.ad=function(a){return P(this,zg.apply(null,[].slice.call(arguments)))};O.prototype.not_starts_with=O.prototype.ad;O.prototype.Cc=function(a){return P(this,Ag.apply(null,[].slice.call(arguments)))};O.prototype.ends_with=O.prototype.Cc;O.prototype.$c=function(a){return P(this,Bg.apply(null,[].slice.call(arguments)))};O.prototype.not_ends_with=O.prototype.$c;O.prototype.rc=function(a){return P(this,qg.apply(null,[].slice.call(arguments)))};O.prototype.and=O.prototype.rc;
O.prototype.zc=function(a){return P(this,sg.apply(null,[].slice.call(arguments)))};O.prototype.date=O.prototype.zc;O.prototype.Oc=function(a){return P(this,tg.apply(null,[].slice.call(arguments)))};O.prototype.inList=O.prototype.Oc;O.prototype.bounds=function(a){return P(this,ug.apply(null,[].slice.call(arguments)))};O.prototype.bounds=O.prototype.bounds;var R=function(a,b,c){N.call(this,a,b,c);Cg()};x(R,N);w("ee.Collection",R);var Dg=!1,Cg=function(){Dg||(J(R,"Collection","Collection"),J(R,"AggregateFeatureCollection","Collection","aggregate_"),Dg=!0)};R.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Kf(this,I("Collection.filter",this,a))};R.prototype.filter=R.prototype.filter;R.prototype.Vb=function(a,b,c){var d=M(R.prototype.Vb,arguments);return this.filter(vg(d.name,d.operator,d.value))};R.prototype.filterMetadata=R.prototype.Vb;
R.prototype.Gc=function(a){return this.filter(ug(a))};R.prototype.filterBounds=R.prototype.Gc;R.prototype.Ub=function(a,b){var c=M(R.prototype.Ub,arguments);return this.filter(sg(c.start,c.end))};R.prototype.filterDate=R.prototype.Ub;R.prototype.limit=function(a,b,c){var d=M(R.prototype.limit,arguments);return Kf(this,I("Collection.limit",this,d.max,d.property,d.ascending))};R.prototype.limit=R.prototype.limit;
R.prototype.sort=function(a,b){var c=M(R.prototype.sort,arguments);return Kf(this,I("Collection.limit",this,void 0,c.property,c.ascending))};R.prototype.sort=R.prototype.sort;R.prototype.name=function(){return"Collection"};R.prototype.elementType=function(){return N};R.prototype.map=function(a,b){var c=this.elementType();return Kf(this,I("Collection.map",this,function(b){return a(new c(b))},b))};R.prototype.map=R.prototype.map;
R.prototype.Sc=function(a,b){var c=m(b)?b:null,d=this.elementType();return I("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};R.prototype.iterate=R.prototype.Sc;var Eg=function(a){if(!(this instanceof Eg))return F(Eg,arguments);if(a instanceof Eg)return a;Fg();if(q(a))E.call(this,null,null),this.dc=a;else if(a instanceof E)E.call(this,a.c,a.m,a.w),this.dc=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};x(Eg,E);w("ee.Number",Eg);var Gg=!1,Fg=function(){Gg||(J(Eg,"Number","Number"),Gg=!0)};Eg.prototype.encode=function(a){return q(this.dc)?this.dc:Eg.l.encode.call(this,a)};Eg.prototype.name=function(){return"Number"};var S=function(a){if(!(this instanceof S))return F(S,arguments);if(a instanceof S)return a;Hg();if(p(a))E.call(this,null,null),this.kc=a;else if(a instanceof E)this.kc=null,a.c&&"String"==a.c.H().returns?E.call(this,a.c,a.m,a.w):E.call(this,new H("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};x(S,E);w("ee.String",S);var Ig=!1,Hg=function(){Ig||(J(S,"String","String"),Ig=!0)};
S.prototype.encode=function(a){return p(this.kc)?this.kc:S.l.encode.call(this,a)};S.prototype.name=function(){return"String"};var Jg=function(a,b){if(!(this instanceof Jg))return F(Jg,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(Kg(g in Lf?Lf[g]:null,f.name))}if(!m(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.Aa=Lg(a,c,b);this.xd=b.apply(null,c)};x(Jg,G);w("ee.CustomFunction",Jg);Jg.prototype.encode=function(a){return{type:"Function",argumentNames:Ua(this.Aa.args,function(a){return a.name}),body:a(this.xd)}};Jg.prototype.H=function(){return this.Aa};
var Kg=function(a,b){a=a||Object;if(!(a.prototype instanceof E))if(a&&a!=Object)if(a==String)a=S;else if(a==Number)a=Eg;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=E;var c=function(){};c.prototype=a.prototype;c=new c;c.c=null;c.m=null;c.w=b;return c},Mg=function(a,b){var c=Ua(b,function(a){return{name:null,type:p(a)?a:Mf(a)}}),c={name:"",returns:p("Object")?"Object":Mf("Object"),args:c};return new Jg(c,a)},Lg=function(a,b,c){for(var d=
[],e=0;e<b.length;e++)null===b[e].w&&d.push(e);if(0==d.length)return a;var f=function(a){var b=0;t(a)&&!r(a)&&("Function"==a.type&&b++,la(a,function(a){b+=f(a)}));return b},e=Hf(c.apply(null,b));c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],l=c+e;b[g].w=l;a.args[g].name=l}return a};var Ng=function(a,b){if(!(this instanceof Ng))return F(Ng,arguments);if(a instanceof Ng)return a;Og();var c=M(Ng,arguments);a=c.date;var c=c.tz,d=new H("Date"),e={},f=null;if(Pf(a)){if(e.value=a,c)if(Pf(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(Of(a))e.value=a;else if(t(a)&&"function"==typeof a.getFullYear)e.value=Math.floor(a.getTime());else if(a instanceof E)a.c&&"Date"==a.c.H().returns?(d=a.c,e=a.m,f=a.w):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
a);E.call(this,d,e,f)};x(Ng,E);w("ee.Date",Ng);var Pg=!1,Og=function(){Pg||(J(Ng,"Date","Date"),Pg=!0)};Ng.prototype.name=function(){return"Date"};var T=function(a,b,c,d){if(!(this instanceof T))return F(T,arguments);if(!("type"in a)){var e=M(T,arguments);a=e.geoJson;b=e.proj;c=e.geodesic;d=e.evenOdd}Qg();e=null!=b||null!=c||null!=d;if(a instanceof E&&!(a instanceof T&&a.zb)){if(e)throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not suported. Use Geometry.transform().");E.call(this,a.c,a.m,a.w)}else{a instanceof T&&(a=a.encode());if(!Rg(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));E.call(this,
null,null);this.zb=a.type;this.Bd=a.coordinates||null;this.Fd=a.geometries||null;if(null!=b)this.hc=b;else if("crs"in a)if(t(a.crs)&&"name"==a.crs.type&&t(a.crs.properties)&&p(a.crs.properties.name))this.hc=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new Pc).v(a.crs));this.eb=c;!m(this.eb)&&"geodesic"in a&&(this.eb=!!a.geodesic);this.cb=d;!m(this.cb)&&"evenOdd"in a&&(this.cb=!!a.evenOdd)}};x(T,E);w("ee.Geometry",T);
var Sg=!1,Qg=function(){Sg||(J(T,"Geometry","Geometry"),Sg=!0)},Tg=function(a,b){if(!(this instanceof Tg))return Ug(Tg,arguments);var c=Vg(Tg,"Point",1,arguments);if(!(c instanceof E)){var d=c.coordinates;if(!n(d)||2!=d.length)throw Error("The Geometry.Point constructor requires 2 coordinates.");}T.call(this,c)};x(Tg,T);T.Point=Tg;var Wg=function(a,b){if(!(this instanceof Wg))return Ug(Wg,arguments);T.call(this,Vg(Wg,"MultiPoint",2,arguments))};x(Wg,T);T.MultiPoint=Wg;
var Xg=function(a,b,c,d,e){if(!(this instanceof Xg))return Ug(Xg,arguments);var f=Vg(Xg,"Rectangle",2,arguments);if(!(f instanceof E)){var g=f.coordinates;if(2!=g.length)throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");var l=g[0][0],v=g[0][1],Q=g[1][0],g=g[1][1];f.coordinates=[[[l,g],[l,v],[Q,v],[Q,g]]];f.type="Polygon"}T.call(this,f)};x(Xg,T);T.Rectangle=Xg;
var Yg=function(a,b,c,d){if(!(this instanceof Yg))return Ug(Yg,arguments);T.call(this,Vg(Yg,"LineString",2,arguments))};x(Yg,T);T.LineString=Yg;var Zg=function(a,b,c,d){if(!(this instanceof Zg))return Ug(Zg,arguments);T.call(this,Vg(Zg,"LinearRing",2,arguments))};x(Zg,T);T.LinearRing=Zg;var $g=function(a,b,c,d){if(!(this instanceof $g))return Ug($g,arguments);T.call(this,Vg($g,"MultiLineString",3,arguments))};x($g,T);T.MultiLineString=$g;
var ah=function(a,b,c,d,e){if(!(this instanceof ah))return Ug(ah,arguments);T.call(this,Vg(ah,"Polygon",3,arguments))};x(ah,T);T.Polygon=ah;var bh=function(a,b,c,d,e){if(!(this instanceof bh))return Ug(bh,arguments);T.call(this,Vg(bh,"MultiPolygon",4,arguments))};x(bh,T);T.MultiPolygon=bh;
T.prototype.encode=function(a){if(!this.zb){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return E.prototype.encode.call(this,a)}a={type:this.zb};"GeometryCollection"==this.zb?a.geometries=this.Fd:a.coordinates=this.Bd;null!=this.hc&&(a.crs={type:"name",properties:{name:this.hc}});null!=this.eb&&(a.geodesic=this.eb);null!=this.cb&&(a.evenOdd=this.cb);return a};
T.prototype.nc=function(){if(this.c)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};T.prototype.toGeoJSON=T.prototype.nc;T.prototype.oc=function(){if(this.c)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new Pc).v(this.nc())};T.prototype.toGeoJSONString=T.prototype.oc;T.prototype.v=function(){return If(this)};T.prototype.serialize=T.prototype.v;
T.prototype.toString=function(){return"ee.Geometry("+this.oc()+")"};
var Sg=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(!Sg(b[a]))return!1;return!0}a=a.coordinates;var c=dh(a);return"Point"==b&&1==c||"MultiPoint"==b&&(2==c||0==a.length)||"LineString"==b&&2==c||"LinearRing"==b&&2==c||"MultiLineString"==b&&(3==c||0==a.length)||"Polygon"==b&&3==c||"MultiPolygon"==b&&(4==c||0==a.length)},dh=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=dh(a[0]),c=1;c<a.length;c++)if(dh(a[c])!=b)return-1;return b+
1}for(c=0;c<a.length;c++)if(!q(a[c]))return-1;return 0==a.length%2?1:-1},Wg=function(a,b,c,d){Xa(d,Pf)?a={coordinates:db(d)}:(a=M(a,d),a.coordinates=a.coords,delete a.coords,a.crs=a.proj,delete a.proj,a=ma(a,da));if(eh(a.coordinates)||null!=a.crs||null!=a.geodesic||null!=a.maxError)return(new H("GeometryConstructors."+b)).apply(a);a.type=b;d=a.coordinates;if(1>c||4<c)throw Error("Unexpected nesting level.");if(Xa(d,q)&&q(d[0])&&2!=d.length){if(0!=d.length%2)throw Error("Invalid number of coordinates: "+
d.length);for(var e=[],f=0;f<d.length;f+=2)e.push([d[f],d[f+1]]);d=e}e=d;for(f=0;n(e);)e=e[0],f++;for(;f<c;)d=[d],f++;if(dh(d)!=c)throw Error("Invalid geometry");for(e=d;n(e)&&1==e.length;)e=e[0];c=n(e)&&0==e.length?[]:d;a.coordinates=c;if(c=null==a.evenOdd)c=0<=Ra(["Polygon","Rectangle","MultiPolygon"],b);c&&(a.evenOdd=!0);return a},eh=function(a){return n(a)?Wa(a,eh):a instanceof E},Vg=function(a,b){var c=function(){};c.prototype=a.prototype;var c=new c,d=a.apply(c,b);return void 0!==d?d:c};
T.prototype.name=function(){return"Geometry"};w("ee.Deserializer",function(){});var gh=function(a){return fh(Oc(a))};w("ee.Deserializer.fromJSON",gh);var fh=function(a){var b={};if(t(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]=hh(f,b)}a=a.value}return hh(a,b)};w("ee.Deserializer.decode",fh);
var hh=function(a,b){if(null===a||q(a)||"boolean"==typeof a||p(a))return a;if(n(a))return Va(a,function(a){return hh(a,b)});if(!t(a)||r(a))throw Error("Cannot decode object: "+a);var c=a.type;switch(c){case "ValueRef":if(a.value in b)return b[a.value];throw Error("Unknown ValueRef: "+a);case "ArgumentRef":c=a.value;if(!p(c))throw Error("Invalid variable name: "+c);return Lg(Object,c);case "Date":c=a.value;if(!q(c))throw Error("Invalid date value: "+c);return new Og(c/1E3);case "Bytes":return c=new Af,
c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?Wf(a.functionName):hh(a["function"],b),d=na(a.arguments,function(a){return hh(a,b)});if(c instanceof G)return c.apply(d);if(c instanceof E)return new E(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return na(a.value,function(a){return hh(a,b)});case "Function":var e=hh(a.body,b),c={name:"",args:Va(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new Kg(c,
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new T(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var ih=function(a){if(!(this instanceof ih))return F(ih,arguments);if(a instanceof ih)return a;jh();Rf(a)?(E.call(this,null,null),this.Pb=a):(a instanceof E&&a.c&&"Dictionary"==a.c.H().returns?E.call(this,a.c,a.m,a.v):E.call(this,new H("Dictionary"),{input:a},null),this.Pb=null)};x(ih,E);w("ee.Dictionary",ih);var kh=!1,jh=function(){kh||(J(ih,"Dictionary","Dictionary"),kh=!0)};ih.prototype.encode=function(a){return null===this.Pb?ih.l.encode.call(this,a):a(this.Pb)};ih.prototype.name=function(){return"Dictionary"};var U=function(a,b){if(!(this instanceof U))return F(U,arguments);if(a instanceof U){if(b)throw Error("Can't create Feature out of a Feature and properties.");return a}if(2<arguments.length)throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");lh();if(a instanceof T||null===a)N.call(this,new H("Feature"),{geometry:a,metadata:b||null});else if(a instanceof E)N.call(this,a.c,a.m,a.v);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=ta(c);c["system:index"]=a.id}N.call(this,new H("Feature"),{geometry:new T(a.geometry),metadata:c})}else N.call(this,new H("Feature"),{geometry:new T(a),metadata:b||null})};x(U,N);w("ee.Feature",U);var mh=!1,lh=function(){mh||(J(U,"Feature","Feature"),mh=!0)};U.prototype.w=function(a){return U.l.w.call(this,a)};U.prototype.getInfo=U.prototype.w;
U.prototype.getMap=function(a,b){var c=M(U.prototype.getMap,arguments);return I("Collection",[this]).getMap(c.visParams,c.callback)};U.prototype.getMap=U.prototype.getMap;var nh=function(a,b){return Ug.apply(null,arguments)};U.Point=nh;var oh=function(a){return Xg.apply(null,arguments)};U.MultiPoint=oh;var ph=function(a,b,c,d){return new Yg([a,b,c,d])};U.Rectangle=ph;var qh=function(a){return Zg.apply(null,arguments)};U.LineString=qh;var rh=function(a){return $g.apply(null,arguments)};
U.LinearRing=rh;var sh=function(a){return ah.apply(null,arguments)};U.MultiLine=sh;var th=function(a){return bh.apply(null,arguments)};U.Polygon=th;var uh=function(a){return ch.apply(null,arguments)};U.MultiPolygon=uh;U.prototype.name=function(){return"Feature"};var vh=function(a){if(this instanceof vh){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof vh)return a}else return F(vh,arguments);wh();if(n(a))E.call(this,null,null),this.cc=a;else if(a instanceof E)E.call(this,a.c,a.m,a.v),this.cc=null;else throw Error("Invalid argument specified for ee.List(): "+a);};x(vh,E);w("ee.List",vh);var xh=!1,wh=function(){xh||(J(vh,"List","List"),xh=!0)};
vh.prototype.encode=function(a){return n(this.cc)?Va(this.cc,function(b){return a(b)}):vh.l.encode.call(this,a)};vh.prototype.name=function(){return"List"};var V=function(a,b){if(!(this instanceof V))return F(V,arguments);if(a instanceof V)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");yh();a instanceof T&&(a=new U(a));a instanceof U&&(a=[a]);if(Pf(a)||Qf(a)){var c={tableId:a};b&&(c.geometryColumn=b);R.call(this,new H("Collection.loadTable"),c)}else if(n(a))R.call(this,new H("Collection"),{features:Va(a,function(a){return new U(a)})});else if(a instanceof vh)R.call(this,
new H("Collection"),{features:a});else if(a instanceof E)R.call(this,a.c,a.m,a.v);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};x(V,R);w("ee.FeatureCollection",V);var zh=!1,yh=function(){zh||(J(V,"FeatureCollection","FeatureCollection"),zh=!0)};V.prototype.getMap=function(a,b){var c=M(V.prototype.getMap,arguments),d=Xf("Collection.draw",{collection:this,color:(c.visParams||{}).color||"000000"});if(c.callback)d.getMap(null,c.callback);else return d.getMap()};
V.prototype.getMap=V.prototype.getMap;V.prototype.w=function(a){return V.l.w.call(this,a)};V.prototype.getInfo=V.prototype.w;V.prototype.ha=function(a,b,c,d){var e=M(V.prototype.ha,arguments),f={};f.table=this.A();e.format&&(f.format=e.format.toUpperCase());e.filename&&(f.filename=e.filename);if(e.selectors){var g=e.selectors;ea(g)&&(g=g.join(","));f.selectors=g}if(e.callback)qf(f,function(a,b){a?e.callback(rf(a)):e.callback(null,b)});else return rf(qf(f))};V.prototype.getDownloadURL=V.prototype.ha;
V.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};V.prototype.select=V.prototype.select;V.prototype.name=function(){return"FeatureCollection"};V.prototype.elementType=function(){return U};var W=function(a){if(!(this instanceof W))return F(W,arguments);if(a instanceof W)return a;Ah();var b=arguments.length;if(0==b||1==b&&!m(a))N.call(this,new H("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(Pf(a))N.call(this,new H("Image.constant"),{value:a});else if(Qf(a))N.call(this,new H("Image.load"),{id:a});else{if(n(a))return Bh(Va(a,function(a){return new W(a)}));if(a instanceof E)"Array"==a.name()?N.call(this,new H("Image.constant"),{value:a}):N.call(this,a.c,a.m,a.v);else throw Error("Unrecognized argument type to convert to an Image: "+
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(Qf(b)&&Pf(c))N.call(this,new H("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)");};x(W,N);w("ee.Image",W);var Ch=!1,Ah=function(){Ch||(J(W,"Image","Image"),J(W,"Window","Image","focal_"),Ch=!0)};W.prototype.w=function(a){return W.l.w.call(this,a)};W.prototype.getInfo=W.prototype.w;
W.prototype.getMap=function(a,b){var c=M(W.prototype.getMap,arguments),d=c.visParams?ta(c.visParams):{};d.image=this.A();if(c.callback)jf(d,u(function(a,b){a&&(a.image=this);c.callback(a,b)},this));else return d=jf(d),d.image=this,d};W.prototype.getMap=W.prototype.getMap;W.prototype.ha=function(a,b){var c=M(W.prototype.ha,arguments),d=c.params?ta(c.params):{};d.image=this.A();if(c.callback){var e=c.callback;of(d,function(a,b){a?e(pf(a)):e(null,b)})}else return pf(of(d))};
W.prototype.getDownloadURL=W.prototype.ha;W.prototype.Xb=function(a,b){var c=M(W.prototype.Xb,arguments),d=c.params?ta(c.params):{};d.image=this.A();if(d.region)if(n(d.region)||Rf(d.region))d.region=Rc(d.region);else if(!p(d.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(c.callback)mf(d,function(a,b){var d="";if(!m(b))try{d=nf(a)}catch(l){b=String(l.message)}c.callback(d,b)});else return nf(mf(d))};W.prototype.getThumbURL=W.prototype.Xb;
var Dh=function(a,b,c){var d=M(Dh,arguments);return Bh([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};W.rgb=Dh;var Eh=function(a){return Bh(Array.prototype.slice.call(arguments),null)};W.cat=Eh;var Bh=function(a,b){if(0==a.length)return I("Image.constant",[]);for(var c=new W(a[0]),d=1;d<a.length;d++)c=I("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
W.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||Qf(b[0])||Pf(b[0])){for(var d=0;d<b.length;d++)if(!(Qf(b[d])||Pf(b[d])||b[d]instanceof E))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return Xf("Image.select",c)};W.prototype.select=W.prototype.select;
W.prototype.Tb=function(a,b){var c=M(W.prototype.Tb,arguments),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(c.map){var f=c.map,g;for(g in f)d.push(g),e[g]=new W(f[g])}var l=I("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d),c=new G;c.encode=function(a){return l.encode(a)};c.H=function(){return{name:"",args:Va(d,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return c.apply(e)};W.prototype.expression=W.prototype.Tb;
W.prototype.clip=function(a){try{a=new T(a)}catch(b){}return I("Image.clip",this,a)};W.prototype.clip=W.prototype.clip;W.prototype.jd=function(a){var b;b=1!=arguments.length||Qf(arguments[0])?db(arguments):arguments[0];return I("Image.rename",this,b)};W.prototype.rename=W.prototype.jd;W.prototype.name=function(){return"Image"};var X=function(a){if(!(this instanceof X))return F(X,arguments);if(a instanceof X)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");Fh();a instanceof W&&(a=[a]);if(Qf(a))R.call(this,new H("ImageCollection.load"),{id:a});else if(n(a))R.call(this,new H("ImageCollection.fromImages"),{images:Va(a,function(a){return new W(a)})});else if(a instanceof vh)R.call(this,new H("ImageCollection.fromImages"),{images:a});else if(a instanceof
E)R.call(this,a.c,a.m,a.v);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};x(X,R);w("ee.ImageCollection",X);var Gh=!1,Fh=function(){Gh||(J(X,"ImageCollection","ImageCollection"),J(X,"reduce","ImageCollection"),Gh=!0)};X.prototype.getMap=function(a,b){var c=M(X.prototype.getMap,arguments),d=I("ImageCollection.mosaic",this);if(c.callback)d.getMap(c.visParams,c.callback);else return d.getMap(c.visParams)};X.prototype.getMap=X.prototype.getMap;
X.prototype.w=function(a){return X.l.w.call(this,a)};X.prototype.getInfo=X.prototype.w;X.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"ImageCollection"};X.prototype.elementType=function(){return W};var Hh={};w("ee.Terrain",Hh);Hh.$b=!1;Hh.Id=function(){Hh.$b||(J(Hh,"Terrain","Terrain"),Hh.$b=!0)};Hh.reset=function(){L(Hh);Hh.$b=!1};var Nh=function(a,b,c,d,e){if("ready"!=Ih||a||b){var f=null!=c;if(d)if(f)Jh.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Ih&&f)Kh.push(c);else if(Ih="loading",bf(a,b,e),f)Kh.push(c),$f(Lh,Mh);else try{$f(),Lh()}catch(g){throw Mh(g),g;}}else c&&c()};w("ee.initialize",Nh);
var Qh=function(){Ih="not_ready";af=$e=Ye=null;Ze=!1;Yf=null;Zf={};L(Og);Qg=!1;L(ih);kh=!1;L(N);hg=!1;L(W);Ch=!1;L(U);mh=!1;L(R);Eg=!1;L(X);Gh=!1;L(V);zh=!1;L(O);jg=!1;L(T);Tg=!1;L(vh);xh=!1;L(Fg);Hg=!1;L(S);Jg=!1;Hh.reset();for(var a=k.ee,b=0;b<Oh.length;b++){var c=Oh[b];L(a[c]);delete a[c]}Oh=[];Mf=a;var a=Ph,d;for(d in a)delete a[d]};w("ee.reset",Qh);var Rh={fe:"not_ready",LOADING:"loading",ge:"ready"};w("ee.InitState",Rh);w("ee.InitState.NOT_READY","not_ready");w("ee.InitState.LOADING","loading");
w("ee.InitState.READY","ready");var Ih="not_ready",Kh=[],Jh=[];w("ee.TILE_SIZE",256);var Oh=[],Ph={};w("ee.Algorithms",Ph);var Sh=function(a,b){p(a)&&(a=new H(a));return G.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))};w("ee.call",Sh);var Th=function(a,b){p(a)&&(a=new H(a));return a.apply(b)};w("ee.apply",Th);
var Lh=function(){if("loading"==Ih){try{Pg();jh();gg();Ah();lh();Dg();Fh();yh();ig();Rg();wh();Gg();Ig();Hh.Id();var a=ag(),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]=Uh(g),Oh.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Zf[g]=!0):f[g].signature={});Mf=f;Vh()}catch(l){Mh(l);return}Ih="ready";for(Jh=[];0<Kh.length;)Kh.shift()()}},Mh=function(a){if("loading"==
Ih)for(Ih="not_ready",Kh=[];0<Jh.length;)Jh.shift()(a)},Vh=function(){var a=bg();pa(a).sort().forEach(function(b){var c=a[b],d=c.H();if(!d.hidden){b=b.split(".");var e=Ph;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=fb(b,1)}f=function(a){return Vf(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=u(c.toString,c);e[b[0]]=f}})},Uh=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 F(d,e);var d=cg(a),g=!(e[0]instanceof E),l=!1;d&&(f?g?l=!0:e[0].c!=d&&(l=!0):l=!0);if(l)E.call(this,d,Uf(d,Tf(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];E.call(this,e.c,e.m,e.v)}};x(b,E);b.prototype.name=function(){return a};J(b,a,a);return b},Sf=function(a,b){if(null===a)return null;if(m(a)){var c=k.ee;switch(b){case "Image":return new W(a);
case "Feature":return a instanceof R?I("Feature",I("Collection.geometry",a)):new U(a);case "Element":if(a instanceof N)return a;if(a instanceof T)return new U(a);if(a instanceof E)return new N(a.c,a.m,a.v);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof V?I("Collection.geometry",a):new T(a);case "FeatureCollection":case "Collection":return a instanceof R?a:new V(a);case "ImageCollection":return new X(a);case "Filter":return new O(a);case "Algorithm":if(p(a))return new H(a);
if(r(a)){for(var c=a.length,d=[],e=0;e<c;e++)d[e]="Object";return Ng(a,d)}if(a instanceof Af)return a;throw Error("Argument is not a function: "+a);case "String":return Qf(a)||a instanceof S||a instanceof E?new S(a):a;case "Dictionary":return Rf(a)?a:new ih(a);case "List":return new vh(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new Fg(a);default:if(b in c){d=cg(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}}};var Wh=function(a,b){y(a);var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity="+100*Number(b)+")")};var Xh=function(a){z.call(this);this.ia=a;this.h={}};x(Xh,z);var Yh=[];Xh.prototype.Oa=function(a,b,c,d){n(b)||(b&&(Yh[0]=b.toString()),b=Yh);for(var e=0;e<b.length;e++){var f=Qb(a,b[e],c||this.handleEvent,d||!1,this.ia||this);if(!f)break;this.h[f.key]=f}return this};Xh.prototype.mb=function(a,b,c,d){return Zh(this,a,b,c,d)};var Zh=function(a,b,c,d,e,f){if(n(c))for(var g=0;g<c.length;g++)Zh(a,b,c[g],d,e,f);else{b=Xb(b,c,d||a.handleEvent,e,f||a.ia||a);if(!b)return a;a.h[b.key]=b}return a};
Xh.prototype.Bb=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)this.Bb(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.ia||this,c=Rb(c),d=!!d,b=Gb(a)?a.Ha(b,c,d,e):a?(a=Tb(a))?a.Ha(b,c,d,e):null:null,b&&(Zb(b),delete this.h[b.key]);return this};Xh.prototype.Pa=function(){la(this.h,function(a,b){this.h.hasOwnProperty(b)&&Zb(a)},this);this.h={}};Xh.prototype.s=function(){Xh.l.s.call(this);this.Pa()};
Xh.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var $h=function(a){cc.call(this);this.La={};this.Ka={};this.ia=new Xh(this);this.j=a};x($h,cc);var ai=[nb&&!zb("11")?"readystatechange":"load","abort","error"],bi=function(a,b){delete a.La[b];var c=a.Ka[b];c&&(delete a.Ka[b],a.ia.Bb(c,ai,a.cd),ra(a.Ka)&&ra(a.La)&&a.dispatchEvent("complete"))};
$h.prototype.start=function(){var a=this.La;Ta(pa(a),function(b){var c=a[b];if(c&&(delete a[b],!this.aa)){var d;this.j?(d=this.j,d=(d?new fd(ed(d)):ya||(ya=new fd)).Bd("IMG")):d=new Image;c.yc&&(d.crossOrigin=c.yc);this.ia.Oa(d,ai,this.cd);this.Ka[b]=d;d.id=b;d.src=c.src}},this)};
$h.prototype.cd=function(a){var b=a.currentTarget;if(b){if("readystatechange"==a.type)if("complete"==b.readyState)a.type="load";else return;"undefined"==typeof b.naturalWidth&&("load"==a.type?(b.naturalWidth=b.width,b.naturalHeight=b.height):(b.naturalWidth=0,b.naturalHeight=0));this.dispatchEvent({type:a.type,target:b});this.aa||bi(this,b.id)}};$h.prototype.s=function(){delete this.La;delete this.Ka;var a=this.ia;a&&"function"==typeof a.P&&a.P();$h.l.s.call(this)};var ci=function(){this.L=[];this.O=[]};h=ci.prototype;h.enqueue=function(a){this.O.push(a)};h.Fa=function(){0==this.L.length&&(this.L=this.O,this.L.reverse(),this.O=[]);return this.L.pop()};h.C=function(){return this.L.length+this.O.length};h.isEmpty=function(){return 0==this.L.length&&0==this.O.length};h.clear=function(){this.L=[];this.O=[]};h.contains=function(a){return 0<=Ra(this.L,a)||0<=Ra(this.O,a)};
h.remove=function(a){var b;b=this.L;var c=Sa(b,a);0<=c?(ab(b,c),b=!0):b=!1;return b||bb(this.O,a)};h.u=function(){for(var a=[],b=this.L.length-1;0<=b;--b)a.push(this.L[b]);for(var c=this.O.length,b=0;b<c;++b)a.push(this.O[b]);return a};var di=function(a,b){z.call(this);this.Xc=a||0;this.nb=b||10;if(this.Xc>this.nb)throw Error("[goog.structs.Pool] Min can not be greater than max");this.S=new ci;this.ca=new Gd;this.Ob=0;this.bc=null;this.Wa()};x(di,z);h=di.prototype;h.fb=function(){var a=ka();if(!(null!=this.bc&&a-this.bc<this.Ob)){for(var b;0<this.S.C()&&(b=this.S.Fa(),!this.ec(b));)this.Wa();!b&&this.C()<this.nb&&(b=this.Nb());b&&(this.bc=a,this.ca.add(b));return b}};
h.Gb=function(a){this.ca.remove(a);this.ec(a)&&this.C()<this.nb?this.S.enqueue(a):this.$a(a)};h.Wa=function(){for(var a=this.S;this.C()<this.Xc;)a.enqueue(this.Nb());for(;this.C()>this.nb&&0<this.S.C();)this.$a(a.Fa())};h.Nb=function(){return{}};h.$a=function(a){if("function"==typeof a.P)a.P();else for(var b in a)a[b]=null};h.ec=function(a){return"function"==typeof a.yd?a.yd():!0};h.contains=function(a){return this.S.contains(a)||this.ca.contains(a)};h.C=function(){return this.S.C()+this.ca.C()};
h.isEmpty=function(){return this.S.isEmpty()&&this.ca.isEmpty()};h.s=function(){di.l.s.call(this);if(0<this.ca.C())throw Error("[goog.structs.Pool] Objects not released");delete this.ca;for(var a=this.S;!a.isEmpty();)this.$a(a.Fa());delete this.S};var ei=function(a,b){this.Tc=a;this.pc=b};ei.prototype.getKey=function(){return this.Tc};ei.prototype.clone=function(){return new ei(this.Tc,this.pc)};var fi=function(a){this.N=[];if(a)a:{var b;if(a instanceof fi){if(b=a.M(),a=a.u(),0>=this.C()){for(var c=this.N,d=0;d<b.length;d++)c.push(new ei(b[d],a[d]));break a}}else b=pa(a),a=oa(a);for(d=0;d<b.length;d++)gi(this,b[d],a[d])}},gi=function(a,b,c){var d=a.N;d.push(new ei(b,c));b=d.length-1;a=a.N;for(c=a[b];0<b;)if(d=b-1>>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};h=fi.prototype;
h.remove=function(){var a=this.N,b=a.length,c=a[0];if(!(0>=b)){if(1==b)$a(a);else{a[0]=a.pop();for(var a=0,b=this.N,d=b.length,e=b[a];a<d>>1;){var f=2*a+1,g=2*a+2,f=g<d&&b[g].getKey()<b[f].getKey()?g:f;if(b[f].getKey()>e.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.pc}};h.u=function(){for(var a=this.N,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].pc);return b};h.M=function(){for(var a=this.N,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
h.$=function(a){return Wa(this.N,function(b){return b.getKey()==a})};h.clone=function(){return new fi(this)};h.C=function(){return this.N.length};h.isEmpty=function(){return 0==this.N.length};h.clear=function(){$a(this.N)};var hi=function(){fi.call(this)};x(hi,fi);hi.prototype.enqueue=function(a,b){gi(this,a,b)};hi.prototype.Fa=function(){return this.remove()};var ii=function(a,b){this.Bc=void 0;this.tb=new hi;di.call(this,a,b)};x(ii,di);h=ii.prototype;h.fb=function(a,b){if(!a){var c=ii.l.fb.call(this);c&&this.Ob&&(this.Bc=k.setTimeout(u(this.hb,this),this.Ob));return c}this.tb.enqueue(m(b)?b:100,a);this.hb()};h.hb=function(){for(var a=this.tb;0<a.C();){var b=this.fb();if(b)a.Fa().apply(this,[b]);else break}};h.Gb=function(a){ii.l.Gb.call(this,a);this.hb()};h.Wa=function(){ii.l.Wa.call(this);this.hb()};
h.s=function(){ii.l.s.call(this);k.clearTimeout(this.Bc);this.tb.clear();this.tb=null};var Y=function(){cc.call(this);this.xb=new ji(0,4);this.ya=new Bd};x(Y,cc);w("ee.MapTileManager",Y);Y.Jc=function(){return Y.Pc?Y.Pc:Y.Pc=new Y};Y.prototype.send=function(a,b,c,d,e){if(this.ya.get(a))throw Error("[ee.MapTileManager] ID in use");b=new ki(a,b,d,u(this.hd,this),m(e)?e:1);this.ya.set(a,b);a=u(this.Fd,this,b);this.xb.fb(a,c);return b};Y.prototype.abort=function(a){if(a=this.ya.get(a))a.pa||(a.pa=!0,a.fa=new hb("abort")),this.hd(a)};
Y.prototype.Fd=function(a,b){if(a.ba||a.pa)li(this,b);else{a.rd=b;b.setActive(!0);var c=new $h;a.ba=c;if(!mi(a))throw Error("Cannot dispatch first request!");}};Y.prototype.hd=function(a){this.ya.remove(a.X);a.ba&&(li(this,a.rd),a.ba.P());a.Yb&&a.Yb(a.fa,a.gd)};var li=function(a,b){b.setActive(!1);var c;c=a.xb;c.ca.remove(b)?(c.Gb(b),c=!0):c=!1;if(!c)throw Error("Object not released");};
Y.prototype.s=function(){Y.l.s.call(this);this.xb.P();this.xb=null;var a=this.ya;Ta(a.u(),function(a){a.P()});a.clear();this.ya=null};var ki=function(a,b,c,d,e){z.call(this);this.X=a;this.ae=b;this.Od=m(e)?e:1;this.Yb=c;this.la=d};x(ki,z);h=ki.prototype;h.tc=0;h.pa=!1;h.ba=null;h.rd=null;h.fa=null;h.gd=null;var ni=["load","abort","error"];ki.prototype.getUrl=function(){return this.ae};
ki.prototype.Hd=function(a){if(this.pa)this.la&&this.la(this);else switch(a.type){case "load":this.fa=a;this.la&&this.la(this);break;case "error":case "abort":mi(this)||(this.fa=a,this.la&&this.la(this))}};ki.prototype.s=function(){ki.l.s.call(this);delete this.Yb;delete this.la};var mi=function(a){if(a.tc>a.Od)return!1;a.tc++;bi(a.ba,a.X);setTimeout(u(a.Xd,a),0);return!0};
ki.prototype.Xd=function(){if(!this.pa){var a=u(function(a){this.pa||((a=p(a)?a:a.src)&&(this.ba.La[this.X]={src:a,yc:m(void 0)?void 0:null}),Xb(this.ba,ni,u(this.Hd,this)),this.ba.start())},this),b=this.getUrl();if(Ee(b).T.$("profiling")){var c=new B;c.Qa="blob";c.Oa("complete",u(function(){this.gd=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;var d;try{d=URL.createObjectURL(qe(c))}catch(e){}a(d||b)},this));c.mb("ready",u(c.P,c));c.send(b,"GET")}else a(b)}};
var oi=function(){this.K=!1};x(oi,z);oi.prototype.setActive=function(a){this.K=a};oi.prototype.Qc=function(){return this.K};var ji=function(a,b){ii.call(this,a,b)};x(ji,ii);ji.prototype.Nb=function(){return new oi};ji.prototype.$a=function(a){a.P()};ji.prototype.ec=function(a){return!a.aa&&!a.Qc()};var Z=function(a,b,c,d,e){cc.call(this);this.Nd=b;this.qd=c;this.minZoom=d.minZoom||0;this.maxZoom=d.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=d.tileSize||new google.maps.Size(256,256);this.Rc=m(d.Rc)?d.Rc:!0;this.name=d.name;this.Ra=[];this.mc=new Gd;this.pd=new Gd;this.lc=0;this.url=a;this.fc=1;this.va=e||null};x(Z,cc);w("ee.MapLayerOverlay",Z);Z.prototype.ud=function(a){return Qb(this,"tileevent",a)};
Z.prototype.addTileCallback=Z.prototype.ud;Z.prototype.Vd=function(a){Zb(a)};Z.prototype.removeTileCallback=Z.prototype.Vd;
Z.prototype.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||0>a.y||a.y>=d)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;c=a.x%d;0>c&&(c+=d);b=[this.Nd,b,c,a.y].join("/");a=[this.url,b].join("/")+"?token="+this.qd;this.va&&this.va.isEnabled()&&(a+="&profiling=1");b=[b,this.lc,this.qd].join("/");this.lc+=1;d=ad("div",{id:b});c=(new Date).getTime()/1E3;this.Ra.push(b);Y.Jc().send(b,a,c,u(this.Gd,this,d,b));this.dispatchEvent(new pi(this.Ra.length));return d};
Z.prototype.releaseTile=function(a){Y.Jc().abort(a.id);this.mc.remove(m(a.firstElementChild)?a.firstElementChild:dd(a.firstChild));""!==a.id&&(this.pd.remove(a.id),this.va&&this.va.le(a.id))};Z.prototype.setOpacity=function(a){this.fc=a;var b=this.mc.oa();Ad(b,function(b){Wh(b,a)})};Z.prototype.getTile=Z.prototype.getTile;Z.prototype.setOpacity=Z.prototype.setOpacity;Z.prototype.releaseTile=Z.prototype.releaseTile;
Z.prototype.Gd=function(a,b,c,d){"error"==c.type?(bb(this.Ra,b),this.pd.add(b),this.dispatchEvent(c)):(bb(this.Ra,b),c.target&&"load"==c.type&&(c=c.target,this.mc.add(c),1!=this.fc&&Wh(c,this.fc),a.appendChild(c)),this.dispatchEvent(new pi(this.Ra.length)));this.va&&null!==d&&this.va.ie(b,d)};var pi=function(a){hb.call(this,"tileevent");this.count=a};x(pi,hb);(function(){k.Da={};var a="ee.Filter.prototype.ends_with ee.Filter.starts_with ee.data.getInfo ee.Filter.gte ee.Number ee.Filter.prototype.not_contains ee.Filter.prototype.gt ee.Filter.prototype.not_starts_with ee.Filter.prototype.not ee.initialize ee.FeatureCollection ee.FeatureCollection.prototype.getInfo ee.Feature.prototype.getInfo ee.Image ee.Filter.bounds ee.Geometry.Polygon ee.Filter.eq ee.Filter.prototype.bounds ee.Function.prototype.apply ee.Geometry.MultiPoint ee.apply ee.Algorithms ee.Filter.not_contains ee.data.getTableDownloadId ee.Filter.ends_with ee.Geometry.prototype.toGeoJSONString ee.Filter.prototype.inList ee.Filter.prototype.lt ee.ComputedObject.prototype.aside ee.ImageCollection.prototype.select ee.data.setAuthToken ee.Geometry.prototype.toGeoJSON ee.Image.prototype.getThumbURL ee.Image.cat ee.Collection.prototype.sort ee.data.getXsrfToken ee.Date ee.reset ee.Geometry ee.Serializer.toJSON ee.FeatureCollection.prototype.getMap ee.data.makeTableDownloadUrl ee.Feature.Polygon ee.Filter.or ee.Filter.metadata ee.Filter.prototype.gte ee.Collection.prototype.filter ee.Feature.Rectangle ee.data.makeDownloadUrl ee.Dictionary ee.data.getAuthToken ee.List ee.Filter.gt ee.data.authenticateViaPopup ee.Image.rgb ee.Serializer.toReadableJSON ee.Geometry.Point ee.Deserializer.decode ee.Filter.lte ee.data.getApiBaseUrl ee.Filter.prototype.and ee.Deserializer.fromJSON ee.Filter.lt ee.Feature.Point ee.Image.prototype.clip ee.Feature.MultiPoint ee.Image.prototype.rename ee.ComputedObject.prototype.getInfo ee.data.getTileUrl ee.InitState ee.ComputedObject.prototype.toString ee.Filter.prototype.starts_with ee.data.getAuthScopes ee.data.getList ee.data.getDownloadId ee.Image.prototype.getDownloadURL ee.ImageCollection.prototype.getInfo ee.TILE_SIZE ee.Collection.prototype.limit ee.Filter.neq ee.Geometry.Rectangle ee.data.makeThumbUrl ee.ImageCollection ee.Filter.not_starts_with ee.Image.prototype.getInfo ee.Filter.prototype.neq ee.ApiFunction.lookup ee.Collection.prototype.filterDate ee.Geometry.LinearRing ee.Collection.prototype.filterMetadata ee.data.getAuthClientId ee.Filter.contains ee.Geometry.MultiLineString ee.Filter.prototype.contains ee.String ee.data.getThumbId ee.data.authenticate ee.Feature ee.Geometry.prototype.serialize ee.ComputedObject.prototype.serialize ee.data.getMapId ee.Function.prototype.call ee.Geometry.LineString ee.Filter.prototype.eq ee.FeatureCollection.prototype.select ee.Filter.prototype.date ee.Filter.inList ee.Image.prototype.expression ee.Filter ee.ApiFunction._apply ee.Feature.MultiPolygon ee.Feature.LineString ee.Image.prototype.select ee.data.setDeadline ee.Terrain ee.Filter.prototype.lte ee.Filter.date ee.Feature.prototype.getMap ee.FeatureCollection.prototype.getDownloadURL ee.Filter.not_ends_with ee.Serializer.encode ee.Collection.prototype.map ee.Filter.prototype.not_ends_with ee.data.clearAuthToken ee.Image.prototype.getMap ee.Collection.prototype.filterBounds ee.Element.prototype.set ee.Collection.prototype.iterate ee.Feature.MultiLine ee.Filter.prototype.length ee.call ee.data.setAuthTokenRefresher ee.Filter.and ee.Geometry.MultiPolygon ee.data.getTileBaseUrl ee.ImageCollection.prototype.getMap ee.ApiFunction._call ee.data.getValue ee.Feature.LinearRing".split(" "),
b=[["var_args"],["name","value"],["id","opt_callback"],["name","value"],["number"],["var_args"],["var_args"],["var_args"],[],["opt_baseurl","opt_tileurl","opt_successCallback","opt_errorCallback","opt_xsrfToken"],["args","opt_column"],["opt_callback"],["opt_callback"],["opt_args"],["geometry","opt_errorMargin"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["name","value"],["var_args"],["namedArgs"],["coords","opt_proj"],["func","namedArgs"],[],["name","value"],["params","opt_callback"],
["name","value"],[],["var_args"],["var_args"],["func","var_args"],["selectors","opt_names"],"clientId tokenType accessToken expiresIn opt_extraScopes opt_callback opt_updateAuthLibrary".split(" "),[],["params","opt_callback"],["var_args"],["property","opt_ascending"],[],["date","opt_tz"],[],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],["obj"],["opt_visParams","opt_callback"],["id"],["coordinates"],["var_args"],["name","operator","value"],["var_args"],["newFilter"],["lon1","lat1","lon2","lat2"],
["id"],["opt_dict"],[],["list"],["name","value"],["opt_success","opt_error"],["r","g","b"],["obj"],["coords","opt_proj"],["json"],["name","value"],[],["var_args"],["json"],["name","value"],["lon","lat"],["geometry"],["coordinates"],["var_args"],["opt_callback"],["mapid","x","y","z"],[],[],["var_args"],[],["params","opt_callback"],["params","opt_callback"],["params","opt_callback"],["opt_callback"],[],["max","opt_property","opt_ascending"],["name","value"],["coords","opt_proj","opt_geodesic","opt_maxError",
"opt_evenOdd"],["id"],["args"],["name","value"],["opt_callback"],["var_args"],["name"],["start","opt_end"],["coords","opt_proj","opt_geodesic","opt_maxError"],["name","operator","value"],[],["name","value"],["coords","opt_proj","opt_geodesic","opt_maxError"],["var_args"],["string"],["params","opt_callback"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["geometry","opt_properties"],[],[],["params","opt_callback"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError"],
["var_args"],["selectors","opt_names"],["var_args"],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["expression","opt_map"],["opt_filter"],["name","namedArgs"],["coordinates"],["coordinates"],["var_args"],["milliseconds"],[],["var_args"],["start","opt_end"],["opt_visParams","opt_callback"],["opt_format","opt_selectors","opt_filename","opt_callback"],["name","value"],["obj","opt_isCompound"],["algorithm","opt_dropNulls"],["var_args"],[],["opt_visParams","opt_callback"],["geometry"],
["var_args"],["algorithm","opt_first"],["coordinates"],[],["func","var_args"],["refresher"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],[],["opt_visParams","opt_callback"],["name","var_args"],["params","opt_callback"],["coordinates"]];Ta([O.prototype.Cc,zg,wf,og,Fg,O.prototype.Zc,O.prototype.Kc,O.prototype.ad,O.prototype.Y,Nh,V,V.prototype.w,U.prototype.w,W,vg,bh,lg,O.prototype.bounds,G.prototype.apply,Xg,Th,Ph,yg,qf,Bg,T.prototype.oc,O.prototype.Oc,O.prototype.Vc,
E.prototype.sc,X.prototype.select,Qe,T.prototype.nc,W.prototype.Xb,Eh,R.prototype.sort,hf,Og,Qh,T,Jf,V.prototype.getMap,rf,th,sg,wg,O.prototype.Lc,R.prototype.filter,ph,pf,ih,Ve,vh,pg,Ne,Dh,Kf,Ug,fh,qg,ff,O.prototype.rc,gh,ng,nh,W.prototype.clip,oh,W.prototype.jd,E.prototype.w,kf,Rh,E.prototype.toString,O.prototype.od,Xe,xf,of,W.prototype.ha,X.prototype.w,256,R.prototype.limit,mg,Yg,nf,X,Ag,W.prototype.w,O.prototype.Yc,Wf,R.prototype.Ub,$g,R.prototype.Vb,We,xg,ah,O.prototype.contains,S,mf,Oe,U,T.prototype.A,
E.prototype.A,jf,G.prototype.call,Zg,O.prototype.Dc,V.prototype.select,O.prototype.zc,ug,W.prototype.Tb,O,Xf,uh,qh,W.prototype.select,df,Hh,O.prototype.Wc,tg,U.prototype.getMap,V.prototype.ha,Cg,If,R.prototype.map,O.prototype.$c,Ue,W.prototype.getMap,R.prototype.Gc,N.prototype.set,R.prototype.Sc,sh,O.prototype.length,Sh,Se,rg,ch,gf,X.prototype.getMap,I,lf,rh],function(c,d){c&&(k.Da[c.toString()]={name:a[d],paramNames:b[d]})})})();})();
var Rg=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(!Rg(b[a]))return!1;return!0}a=a.coordinates;var c=ch(a);return"Point"==b&&1==c||"MultiPoint"==b&&(2==c||0==a.length)||"LineString"==b&&2==c||"LinearRing"==b&&2==c||"MultiLineString"==b&&(3==c||0==a.length)||"Polygon"==b&&3==c||"MultiPolygon"==b&&(4==c||0==a.length)},ch=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=ch(a[0]),c=1;c<a.length;c++)if(ch(a[c])!=b)return-1;return b+
1}for(c=0;c<a.length;c++)if(!q(a[c]))return-1;return 0==a.length%2?1:-1},Vg=function(a,b,c,d){Wa(d,Of)?a={coordinates:cb(d)}:(a=M(a,d),a.coordinates=a.coords,delete a.coords,a.crs=a.proj,delete a.proj,a=ma(a,da));if(dh(a.coordinates)||null!=a.crs||null!=a.geodesic||null!=a.maxError)return(new H("GeometryConstructors."+b)).apply(a);a.type=b;d=a.coordinates;if(1>c||4<c)throw Error("Unexpected nesting level.");if(Wa(d,q)&&q(d[0])&&2!=d.length){if(0!=d.length%2)throw Error("Invalid number of coordinates: "+
d.length);for(var e=[],f=0;f<d.length;f+=2)e.push([d[f],d[f+1]]);d=e}e=d;for(f=0;n(e);)e=e[0],f++;for(;f<c;)d=[d],f++;if(ch(d)!=c)throw Error("Invalid geometry");for(e=d;n(e)&&1==e.length;)e=e[0];c=n(e)&&0==e.length?[]:d;a.coordinates=c;if(c=null==a.evenOdd)c=0<=Qa(["Polygon","Rectangle","MultiPolygon"],b);c&&(a.evenOdd=!0);return a},dh=function(a){return n(a)?Va(a,dh):a instanceof E},Ug=function(a,b){var c=function(){};c.prototype=a.prototype;var c=new c,d=a.apply(c,b);return void 0!==d?d:c};
T.prototype.name=function(){return"Geometry"};w("ee.Deserializer",function(){});var fh=function(a){return eh(Nc(a))};w("ee.Deserializer.fromJSON",fh);var eh=function(a){var b={};if(t(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]=gh(f,b)}a=a.value}return gh(a,b)};w("ee.Deserializer.decode",eh);
var gh=function(a,b){if(null===a||q(a)||"boolean"==typeof a||p(a))return a;if(n(a))return Ua(a,function(a){return gh(a,b)});if(!t(a)||r(a))throw Error("Cannot decode object: "+a);var c=a.type;switch(c){case "ValueRef":if(a.value in b)return b[a.value];throw Error("Unknown ValueRef: "+a);case "ArgumentRef":c=a.value;if(!p(c))throw Error("Invalid variable name: "+c);return Kg(Object,c);case "Date":c=a.value;if(!q(c))throw Error("Invalid date value: "+c);return new Ng(c/1E3);case "Bytes":return c=new zf,
c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?Vf(a.functionName):gh(a["function"],b),d=na(a.arguments,function(a){return gh(a,b)});if(c instanceof G)return c.apply(d);if(c instanceof E)return new E(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return na(a.value,function(a){return gh(a,b)});case "Function":var e=gh(a.body,b),c={name:"",args:Ua(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new Jg(c,
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new T(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var hh=function(a){if(!(this instanceof hh))return F(hh,arguments);if(a instanceof hh)return a;ih();Qf(a)?(E.call(this,null,null),this.Pb=a):(a instanceof E&&a.c&&"Dictionary"==a.c.H().returns?E.call(this,a.c,a.m,a.w):E.call(this,new H("Dictionary"),{input:a},null),this.Pb=null)};x(hh,E);w("ee.Dictionary",hh);var jh=!1,ih=function(){jh||(J(hh,"Dictionary","Dictionary"),jh=!0)};hh.prototype.encode=function(a){return null===this.Pb?hh.l.encode.call(this,a):a(this.Pb)};hh.prototype.name=function(){return"Dictionary"};var U=function(a,b){if(!(this instanceof U))return F(U,arguments);if(a instanceof U){if(b)throw Error("Can't create Feature out of a Feature and properties.");return a}if(2<arguments.length)throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");kh();if(a instanceof T||null===a)N.call(this,new H("Feature"),{geometry:a,metadata:b||null});else if(a instanceof E)N.call(this,a.c,a.m,a.w);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=sa(c);c["system:index"]=a.id}N.call(this,new H("Feature"),{geometry:new T(a.geometry),metadata:c})}else N.call(this,new H("Feature"),{geometry:new T(a),metadata:b||null})};x(U,N);w("ee.Feature",U);var lh=!1,kh=function(){lh||(J(U,"Feature","Feature"),lh=!0)};U.prototype.A=function(a){return U.l.A.call(this,a)};U.prototype.getInfo=U.prototype.A;
U.prototype.getMap=function(a,b){var c=M(U.prototype.getMap,arguments);return I("Collection",[this]).getMap(c.visParams,c.callback)};U.prototype.getMap=U.prototype.getMap;var mh=function(a,b){return Tg.apply(null,arguments)};U.Point=mh;var nh=function(a){return Wg.apply(null,arguments)};U.MultiPoint=nh;var oh=function(a,b,c,d){return new Xg([a,b,c,d])};U.Rectangle=oh;var ph=function(a){return Yg.apply(null,arguments)};U.LineString=ph;var qh=function(a){return Zg.apply(null,arguments)};
U.LinearRing=qh;var rh=function(a){return $g.apply(null,arguments)};U.MultiLine=rh;var sh=function(a){return ah.apply(null,arguments)};U.Polygon=sh;var th=function(a){return bh.apply(null,arguments)};U.MultiPolygon=th;U.prototype.name=function(){return"Feature"};var uh=function(a){if(this instanceof uh){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof uh)return a}else return F(uh,arguments);vh();if(n(a))E.call(this,null,null),this.cc=a;else if(a instanceof E)E.call(this,a.c,a.m,a.w),this.cc=null;else throw Error("Invalid argument specified for ee.List(): "+a);};x(uh,E);w("ee.List",uh);var wh=!1,vh=function(){wh||(J(uh,"List","List"),wh=!0)};
uh.prototype.encode=function(a){return n(this.cc)?Ua(this.cc,function(b){return a(b)}):uh.l.encode.call(this,a)};uh.prototype.name=function(){return"List"};var V=function(a,b){if(!(this instanceof V))return F(V,arguments);if(a instanceof V)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");xh();a instanceof T&&(a=new U(a));a instanceof U&&(a=[a]);if(Of(a)||Pf(a)){var c={tableId:a};b&&(c.geometryColumn=b);R.call(this,new H("Collection.loadTable"),c)}else if(n(a))R.call(this,new H("Collection"),{features:Ua(a,function(a){return new U(a)})});else if(a instanceof uh)R.call(this,
new H("Collection"),{features:a});else if(a instanceof E)R.call(this,a.c,a.m,a.w);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};x(V,R);w("ee.FeatureCollection",V);var yh=!1,xh=function(){yh||(J(V,"FeatureCollection","FeatureCollection"),yh=!0)};V.prototype.getMap=function(a,b){var c=M(V.prototype.getMap,arguments),d=Wf("Collection.draw",{collection:this,color:(c.visParams||{}).color||"000000"});if(c.callback)d.getMap(null,c.callback);else return d.getMap()};
V.prototype.getMap=V.prototype.getMap;V.prototype.A=function(a){return V.l.A.call(this,a)};V.prototype.getInfo=V.prototype.A;V.prototype.ha=function(a,b,c,d){var e=M(V.prototype.ha,arguments),f={};f.table=this.v();e.format&&(f.format=e.format.toUpperCase());e.filename&&(f.filename=e.filename);if(e.selectors){var g=e.selectors;ea(g)&&(g=g.join(","));f.selectors=g}if(e.callback)pf(f,function(a,b){a?e.callback(qf(a)):e.callback(null,b)});else return qf(pf(f))};V.prototype.getDownloadURL=V.prototype.ha;
V.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};V.prototype.select=V.prototype.select;V.prototype.name=function(){return"FeatureCollection"};V.prototype.elementType=function(){return U};var W=function(a){if(!(this instanceof W))return F(W,arguments);if(a instanceof W)return a;zh();var b=arguments.length;if(0==b||1==b&&!m(a))N.call(this,new H("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(Of(a))N.call(this,new H("Image.constant"),{value:a});else if(Pf(a))N.call(this,new H("Image.load"),{id:a});else{if(n(a))return Ah(Ua(a,function(a){return new W(a)}));if(a instanceof E)"Array"==a.name()?N.call(this,new H("Image.constant"),{value:a}):N.call(this,a.c,a.m,a.w);else throw Error("Unrecognized argument type to convert to an Image: "+
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(Pf(b)&&Of(c))N.call(this,new H("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)");};x(W,N);w("ee.Image",W);var Bh=!1,zh=function(){Bh||(J(W,"Image","Image"),J(W,"Window","Image","focal_"),Bh=!0)};W.prototype.A=function(a){return W.l.A.call(this,a)};W.prototype.getInfo=W.prototype.A;
W.prototype.getMap=function(a,b){var c=M(W.prototype.getMap,arguments),d=c.visParams?sa(c.visParams):{};d.image=this.v();if(c.callback)hf(d,u(function(a,b){a&&(a.image=this);c.callback(a,b)},this));else return d=hf(d),d.image=this,d};W.prototype.getMap=W.prototype.getMap;W.prototype.ha=function(a,b){var c=M(W.prototype.ha,arguments),d=c.params?sa(c.params):{};d.image=this.v();if(c.callback){var e=c.callback;nf(d,function(a,b){a?e(of(a)):e(null,b)})}else return of(nf(d))};
W.prototype.getDownloadURL=W.prototype.ha;W.prototype.Xb=function(a,b){var c=M(W.prototype.Xb,arguments),d=c.params?sa(c.params):{};d.image=this.v();if(d.region)if(n(d.region)||Qf(d.region))d.region=Qc(d.region);else if(!p(d.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(c.callback)lf(d,function(a,b){var d="";if(!m(b))try{d=mf(a)}catch(l){b=String(l.message)}c.callback(d,b)});else return mf(lf(d))};W.prototype.getThumbURL=W.prototype.Xb;
var Ch=function(a,b,c){var d=M(Ch,arguments);return Ah([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};W.rgb=Ch;var Dh=function(a){return Ah(Array.prototype.slice.call(arguments),null)};W.cat=Dh;var Ah=function(a,b){if(0==a.length)return I("Image.constant",[]);for(var c=new W(a[0]),d=1;d<a.length;d++)c=I("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
W.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||Pf(b[0])||Of(b[0])){for(var d=0;d<b.length;d++)if(!(Pf(b[d])||Of(b[d])||b[d]instanceof E))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return Wf("Image.select",c)};W.prototype.select=W.prototype.select;
W.prototype.Tb=function(a,b){var c=M(W.prototype.Tb,arguments),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(c.map){var f=c.map,g;for(g in f)d.push(g),e[g]=new W(f[g])}var l=I("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d),c=new G;c.encode=function(a){return l.encode(a)};c.H=function(){return{name:"",args:Ua(d,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return c.apply(e)};W.prototype.expression=W.prototype.Tb;
W.prototype.clip=function(a){try{a=new T(a)}catch(b){}return I("Image.clip",this,a)};W.prototype.clip=W.prototype.clip;W.prototype.jd=function(a){var b;b=1!=arguments.length||Pf(arguments[0])?cb(arguments):arguments[0];return I("Image.rename",this,b)};W.prototype.rename=W.prototype.jd;W.prototype.name=function(){return"Image"};var X=function(a){if(!(this instanceof X))return F(X,arguments);if(a instanceof X)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");Eh();a instanceof W&&(a=[a]);if(Pf(a))R.call(this,new H("ImageCollection.load"),{id:a});else if(n(a))R.call(this,new H("ImageCollection.fromImages"),{images:Ua(a,function(a){return new W(a)})});else if(a instanceof uh)R.call(this,new H("ImageCollection.fromImages"),{images:a});else if(a instanceof
E)R.call(this,a.c,a.m,a.w);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};x(X,R);w("ee.ImageCollection",X);var Fh=!1,Eh=function(){Fh||(J(X,"ImageCollection","ImageCollection"),J(X,"reduce","ImageCollection"),Fh=!0)};X.prototype.getMap=function(a,b){var c=M(X.prototype.getMap,arguments),d=I("ImageCollection.mosaic",this);if(c.callback)d.getMap(c.visParams,c.callback);else return d.getMap(c.visParams)};X.prototype.getMap=X.prototype.getMap;
X.prototype.A=function(a){return X.l.A.call(this,a)};X.prototype.getInfo=X.prototype.A;X.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"ImageCollection"};X.prototype.elementType=function(){return W};var Gh={};w("ee.Terrain",Gh);Gh.$b=!1;Gh.Jd=function(){Gh.$b||(J(Gh,"Terrain","Terrain"),Gh.$b=!0)};Gh.reset=function(){K(Gh);Gh.$b=!1};var Mh=function(a,b,c,d,e){if("ready"!=Hh||a||b){var f=null!=c;if(d)if(f)Ih.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Hh&&f)Jh.push(c);else if(Hh="loading",af(a,b,e),f)Jh.push(c),Zf(Kh,Lh);else try{Zf(),Kh()}catch(g){throw Lh(g),g;}}else c&&c()};w("ee.initialize",Mh);
var Ph=function(){Hh="not_ready";$e=Ze=Xe=null;Ye=!1;Xf=null;Yf={};K(Ng);Pg=!1;K(hh);jh=!1;K(N);gg=!1;K(W);Bh=!1;K(U);lh=!1;K(R);Dg=!1;K(X);Fh=!1;K(V);yh=!1;K(O);ig=!1;K(T);Sg=!1;K(uh);wh=!1;K(Eg);Gg=!1;K(S);Ig=!1;Gh.reset();for(var a=k.ee,b=0;b<Nh.length;b++){var c=Nh[b];K(a[c]);delete a[c]}Nh=[];Lf=a;var a=Oh,d;for(d in a)delete a[d]};w("ee.reset",Ph);var Qh={fe:"not_ready",LOADING:"loading",ge:"ready"};w("ee.InitState",Qh);w("ee.InitState.NOT_READY","not_ready");w("ee.InitState.LOADING","loading");
w("ee.InitState.READY","ready");var Hh="not_ready",Jh=[],Ih=[];w("ee.TILE_SIZE",256);var Nh=[],Oh={};w("ee.Algorithms",Oh);var Rh=function(a,b){p(a)&&(a=new H(a));return G.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))};w("ee.call",Rh);var Sh=function(a,b){p(a)&&(a=new H(a));return a.apply(b)};w("ee.apply",Sh);
var Kh=function(){if("loading"==Hh){try{Og();ih();fg();zh();kh();Cg();Eh();xh();hg();Qg();vh();Fg();Hg();Gh.Jd();var a=$f(),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]=Th(g),Nh.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Yf[g]=!0):f[g].signature={});Lf=f;Uh()}catch(l){Lh(l);return}Hh="ready";for(Ih=[];0<Jh.length;)Jh.shift()()}},Lh=function(a){if("loading"==
Hh)for(Hh="not_ready",Jh=[];0<Ih.length;)Ih.shift()(a)},Uh=function(){var a=ag();pa(a).sort().forEach(function(b){var c=a[b],d=c.H();if(!d.hidden){b=b.split(".");var e=Oh;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=eb(b,1)}f=function(a){return Uf(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=u(c.toString,c);e[b[0]]=f}})},Th=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 F(d,e);var d=bg(a),g=!(e[0]instanceof E),l=!1;d&&(f?g?l=!0:e[0].c!=d&&(l=!0):l=!0);if(l)E.call(this,d,Tf(d,Sf(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];E.call(this,e.c,e.m,e.w)}};x(b,E);b.prototype.name=function(){return a};J(b,a,a);return b},Rf=function(a,b){if(null===a)return null;if(m(a)){var c=k.ee;switch(b){case "Image":return new W(a);
case "Feature":return a instanceof R?I("Feature",I("Collection.geometry",a)):new U(a);case "Element":if(a instanceof N)return a;if(a instanceof T)return new U(a);if(a instanceof E)return new N(a.c,a.m,a.w);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof V?I("Collection.geometry",a):new T(a);case "FeatureCollection":case "Collection":return a instanceof R?a:new V(a);case "ImageCollection":return new X(a);case "Filter":return new O(a);case "Algorithm":if(p(a))return new H(a);
if(r(a)){for(var c=a.length,d=[],e=0;e<c;e++)d[e]="Object";return Mg(a,d)}if(a instanceof zf)return a;throw Error("Argument is not a function: "+a);case "String":return Pf(a)||a instanceof S||a instanceof E?new S(a):a;case "Dictionary":return Qf(a)?a:new hh(a);case "List":return new uh(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new Eg(a);default:if(b in c){d=bg(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}}};var Vh=function(a,b){y(a);var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity="+100*Number(b)+")")};var Wh=function(a){z.call(this);this.ia=a;this.h={}};x(Wh,z);var Xh=[];Wh.prototype.Oa=function(a,b,c,d){n(b)||(b&&(Xh[0]=b.toString()),b=Xh);for(var e=0;e<b.length;e++){var f=Pb(a,b[e],c||this.handleEvent,d||!1,this.ia||this);if(!f)break;this.h[f.key]=f}return this};Wh.prototype.mb=function(a,b,c,d){return Yh(this,a,b,c,d)};var Yh=function(a,b,c,d,e,f){if(n(c))for(var g=0;g<c.length;g++)Yh(a,b,c[g],d,e,f);else{b=Wb(b,c,d||a.handleEvent,e,f||a.ia||a);if(!b)return a;a.h[b.key]=b}return a};
Wh.prototype.Bb=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)this.Bb(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.ia||this,c=Qb(c),d=!!d,b=Fb(a)?a.Ha(b,c,d,e):a?(a=Sb(a))?a.Ha(b,c,d,e):null:null,b&&(Yb(b),delete this.h[b.key]);return this};Wh.prototype.Pa=function(){la(this.h,function(a,b){this.h.hasOwnProperty(b)&&Yb(a)},this);this.h={}};Wh.prototype.s=function(){Wh.l.s.call(this);this.Pa()};
Wh.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var Zh=function(a){bc.call(this);this.La={};this.Ka={};this.ia=new Wh(this);this.j=a};x(Zh,bc);var $h=[mb&&!yb("11")?"readystatechange":"load","abort","error"],ai=function(a,b){delete a.La[b];var c=a.Ka[b];c&&(delete a.Ka[b],a.ia.Bb(c,$h,a.cd),qa(a.Ka)&&qa(a.La)&&a.dispatchEvent("complete"))};
Zh.prototype.start=function(){var a=this.La;Sa(pa(a),function(b){var c=a[b];if(c&&(delete a[b],!this.aa)){var d;this.j?(d=this.j,d=(d?new ed(dd(d)):xa||(xa=new ed)).Cd("IMG")):d=new Image;c.yc&&(d.crossOrigin=c.yc);this.ia.Oa(d,$h,this.cd);this.Ka[b]=d;d.id=b;d.src=c.src}},this)};
Zh.prototype.cd=function(a){var b=a.currentTarget;if(b){if("readystatechange"==a.type)if("complete"==b.readyState)a.type="load";else return;"undefined"==typeof b.naturalWidth&&("load"==a.type?(b.naturalWidth=b.width,b.naturalHeight=b.height):(b.naturalWidth=0,b.naturalHeight=0));this.dispatchEvent({type:a.type,target:b});this.aa||ai(this,b.id)}};Zh.prototype.s=function(){delete this.La;delete this.Ka;var a=this.ia;a&&"function"==typeof a.P&&a.P();Zh.l.s.call(this)};var bi=function(){this.L=[];this.O=[]};h=bi.prototype;h.enqueue=function(a){this.O.push(a)};h.Fa=function(){0==this.L.length&&(this.L=this.O,this.L.reverse(),this.O=[]);return this.L.pop()};h.C=function(){return this.L.length+this.O.length};h.isEmpty=function(){return 0==this.L.length&&0==this.O.length};h.clear=function(){this.L=[];this.O=[]};h.contains=function(a){return 0<=Qa(this.L,a)||0<=Qa(this.O,a)};
h.remove=function(a){var b;b=this.L;var c=Ra(b,a);0<=c?($a(b,c),b=!0):b=!1;return b||ab(this.O,a)};h.u=function(){for(var a=[],b=this.L.length-1;0<=b;--b)a.push(this.L[b]);for(var c=this.O.length,b=0;b<c;++b)a.push(this.O[b]);return a};var ci=function(a,b){z.call(this);this.Xc=a||0;this.nb=b||10;if(this.Xc>this.nb)throw Error("[goog.structs.Pool] Min can not be greater than max");this.S=new bi;this.ca=new Fd;this.Ob=0;this.bc=null;this.Wa()};x(ci,z);h=ci.prototype;h.fb=function(){var a=ka();if(!(null!=this.bc&&a-this.bc<this.Ob)){for(var b;0<this.S.C()&&(b=this.S.Fa(),!this.ec(b));)this.Wa();!b&&this.C()<this.nb&&(b=this.Nb());b&&(this.bc=a,this.ca.add(b));return b}};
h.Gb=function(a){this.ca.remove(a);this.ec(a)&&this.C()<this.nb?this.S.enqueue(a):this.$a(a)};h.Wa=function(){for(var a=this.S;this.C()<this.Xc;)a.enqueue(this.Nb());for(;this.C()>this.nb&&0<this.S.C();)this.$a(a.Fa())};h.Nb=function(){return{}};h.$a=function(a){if("function"==typeof a.P)a.P();else for(var b in a)a[b]=null};h.ec=function(a){return"function"==typeof a.zd?a.zd():!0};h.contains=function(a){return this.S.contains(a)||this.ca.contains(a)};h.C=function(){return this.S.C()+this.ca.C()};
h.isEmpty=function(){return this.S.isEmpty()&&this.ca.isEmpty()};h.s=function(){ci.l.s.call(this);if(0<this.ca.C())throw Error("[goog.structs.Pool] Objects not released");delete this.ca;for(var a=this.S;!a.isEmpty();)this.$a(a.Fa());delete this.S};var di=function(a,b){this.Tc=a;this.pc=b};di.prototype.getKey=function(){return this.Tc};di.prototype.clone=function(){return new di(this.Tc,this.pc)};var ei=function(a){this.N=[];if(a)a:{var b;if(a instanceof ei){if(b=a.M(),a=a.u(),0>=this.C()){for(var c=this.N,d=0;d<b.length;d++)c.push(new di(b[d],a[d]));break a}}else b=pa(a),a=oa(a);for(d=0;d<b.length;d++)fi(this,b[d],a[d])}},fi=function(a,b,c){var d=a.N;d.push(new di(b,c));b=d.length-1;a=a.N;for(c=a[b];0<b;)if(d=b-1>>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};h=ei.prototype;
h.remove=function(){var a=this.N,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Za(a);else{a[0]=a.pop();for(var a=0,b=this.N,d=b.length,e=b[a];a<d>>1;){var f=2*a+1,g=2*a+2,f=g<d&&b[g].getKey()<b[f].getKey()?g:f;if(b[f].getKey()>e.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.pc}};h.u=function(){for(var a=this.N,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].pc);return b};h.M=function(){for(var a=this.N,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
h.$=function(a){return Va(this.N,function(b){return b.getKey()==a})};h.clone=function(){return new ei(this)};h.C=function(){return this.N.length};h.isEmpty=function(){return 0==this.N.length};h.clear=function(){Za(this.N)};var gi=function(){ei.call(this)};x(gi,ei);gi.prototype.enqueue=function(a,b){fi(this,a,b)};gi.prototype.Fa=function(){return this.remove()};var hi=function(a,b){this.Bc=void 0;this.tb=new gi;ci.call(this,a,b)};x(hi,ci);h=hi.prototype;h.fb=function(a,b){if(!a){var c=hi.l.fb.call(this);c&&this.Ob&&(this.Bc=k.setTimeout(u(this.hb,this),this.Ob));return c}this.tb.enqueue(m(b)?b:100,a);this.hb()};h.hb=function(){for(var a=this.tb;0<a.C();){var b=this.fb();if(b)a.Fa().apply(this,[b]);else break}};h.Gb=function(a){hi.l.Gb.call(this,a);this.hb()};h.Wa=function(){hi.l.Wa.call(this);this.hb()};
h.s=function(){hi.l.s.call(this);k.clearTimeout(this.Bc);this.tb.clear();this.tb=null};var Y=function(){bc.call(this);this.xb=new ii(0,4);this.ya=new Ad};x(Y,bc);w("ee.MapTileManager",Y);Y.Jc=function(){return Y.Pc?Y.Pc:Y.Pc=new Y};Y.prototype.send=function(a,b,c,d,e){if(this.ya.get(a))throw Error("[ee.MapTileManager] ID in use");b=new ji(a,b,d,u(this.hd,this),m(e)?e:1);this.ya.set(a,b);a=u(this.Gd,this,b);this.xb.fb(a,c);return b};Y.prototype.abort=function(a){if(a=this.ya.get(a))a.pa||(a.pa=!0,a.fa=new gb("abort")),this.hd(a)};
Y.prototype.Gd=function(a,b){if(a.ba||a.pa)ki(this,b);else{a.rd=b;b.setActive(!0);var c=new Zh;a.ba=c;if(!li(a))throw Error("Cannot dispatch first request!");}};Y.prototype.hd=function(a){this.ya.remove(a.X);a.ba&&(ki(this,a.rd),a.ba.P());a.Yb&&a.Yb(a.fa,a.gd)};var ki=function(a,b){b.setActive(!1);var c;c=a.xb;c.ca.remove(b)?(c.Gb(b),c=!0):c=!1;if(!c)throw Error("Object not released");};
Y.prototype.s=function(){Y.l.s.call(this);this.xb.P();this.xb=null;var a=this.ya;Sa(a.u(),function(a){a.P()});a.clear();this.ya=null};var ji=function(a,b,c,d,e){z.call(this);this.X=a;this.be=b;this.Pd=m(e)?e:1;this.Yb=c;this.la=d};x(ji,z);h=ji.prototype;h.tc=0;h.pa=!1;h.ba=null;h.rd=null;h.fa=null;h.gd=null;var mi=["load","abort","error"];ji.prototype.getUrl=function(){return this.be};
ji.prototype.Id=function(a){if(this.pa)this.la&&this.la(this);else switch(a.type){case "load":this.fa=a;this.la&&this.la(this);break;case "error":case "abort":li(this)||(this.fa=a,this.la&&this.la(this))}};ji.prototype.s=function(){ji.l.s.call(this);delete this.Yb;delete this.la};var li=function(a){if(a.tc>a.Pd)return!1;a.tc++;ai(a.ba,a.X);setTimeout(u(a.Yd,a),0);return!0};
ji.prototype.Yd=function(){if(!this.pa){var a=u(function(a){this.pa||((a=p(a)?a:a.src)&&(this.ba.La[this.X]={src:a,yc:m(void 0)?void 0:null}),Wb(this.ba,mi,u(this.Id,this)),this.ba.start())},this),b=this.getUrl();if(De(b).T.$("profiling")){var c=new B;c.Qa="blob";c.Oa("complete",u(function(){this.gd=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;var d;try{d=URL.createObjectURL(pe(c))}catch(e){}a(d||b)},this));c.mb("ready",u(c.P,c));c.send(b,"GET")}else a(b)}};
var ni=function(){this.K=!1};x(ni,z);ni.prototype.setActive=function(a){this.K=a};ni.prototype.Qc=function(){return this.K};var ii=function(a,b){hi.call(this,a,b)};x(ii,hi);ii.prototype.Nb=function(){return new ni};ii.prototype.$a=function(a){a.P()};ii.prototype.ec=function(a){return!a.aa&&!a.Qc()};var Z=function(a,b,c,d,e){bc.call(this);this.Od=b;this.qd=c;this.minZoom=d.minZoom||0;this.maxZoom=d.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=d.tileSize||new google.maps.Size(256,256);this.Rc=m(d.Rc)?d.Rc:!0;this.name=d.name;this.Ra=[];this.mc=new Fd;this.pd=new Fd;this.lc=0;this.url=a;this.fc=1;this.va=e||null};x(Z,bc);w("ee.MapLayerOverlay",Z);Z.prototype.vd=function(a){return Pb(this,"tileevent",a)};
Z.prototype.addTileCallback=Z.prototype.vd;Z.prototype.Wd=function(a){Yb(a)};Z.prototype.removeTileCallback=Z.prototype.Wd;
Z.prototype.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||0>a.y||a.y>=d)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;c=a.x%d;0>c&&(c+=d);b=[this.Od,b,c,a.y].join("/");a=[this.url,b].join("/")+"?token="+this.qd;this.va&&this.va.isEnabled()&&(a+="&profiling=1");b=[b,this.lc,this.qd].join("/");this.lc+=1;d=$c("div",{id:b});c=(new Date).getTime()/1E3;this.Ra.push(b);Y.Jc().send(b,a,c,u(this.Hd,this,d,b));this.dispatchEvent(new oi(this.Ra.length));return d};
Z.prototype.releaseTile=function(a){Y.Jc().abort(a.id);this.mc.remove(m(a.firstElementChild)?a.firstElementChild:cd(a.firstChild));""!==a.id&&(this.pd.remove(a.id),this.va&&this.va.le(a.id))};Z.prototype.setOpacity=function(a){this.fc=a;var b=this.mc.oa();zd(b,function(b){Vh(b,a)})};Z.prototype.getTile=Z.prototype.getTile;Z.prototype.setOpacity=Z.prototype.setOpacity;Z.prototype.releaseTile=Z.prototype.releaseTile;
Z.prototype.Hd=function(a,b,c,d){"error"==c.type?(ab(this.Ra,b),this.pd.add(b),this.dispatchEvent(c)):(ab(this.Ra,b),c.target&&"load"==c.type&&(c=c.target,this.mc.add(c),1!=this.fc&&Vh(c,this.fc),a.appendChild(c)),this.dispatchEvent(new oi(this.Ra.length)));this.va&&null!==d&&this.va.ie(b,d)};var oi=function(a){gb.call(this,"tileevent");this.count=a};x(oi,gb);(function(){k.Da={};var a="ee.Geometry.MultiLineString ee.Filter.prototype.gt ee.List ee.Filter.prototype.not_ends_with ee.data.getTileUrl ee.call ee.data.getTileBaseUrl ee.apply ee.data.getValue ee.Collection.prototype.sort ee.Feature ee.data.authenticate ee.ImageCollection.prototype.select ee.Filter.neq ee.ImageCollection.prototype.getMap ee.Filter.lt ee.data.getTableDownloadId ee.Image.prototype.expression ee.Filter.or ee.Dictionary ee.data.clearAuthToken ee.Filter.not_starts_with ee.Filter.ends_with ee.data.makeThumbUrl ee.Image.rgb ee.Feature.prototype.getMap ee.Image.prototype.rename ee.Deserializer.decode ee.Filter.prototype.contains ee.data.getAuthScopes ee.Geometry.prototype.serialize ee.Filter.prototype.lte ee.data.getInfo ee.Filter.gt ee.Collection.prototype.filter ee.Feature.LineString ee.Filter.and ee.Filter.prototype.ends_with ee.data.getMapId ee.Filter.contains ee.Filter.prototype.not ee.Feature.Rectangle ee.Image.cat ee.Filter.prototype.length ee.ComputedObject.prototype.toString ee.ApiFunction._apply ee.Filter.prototype.gte ee.Geometry.Polygon ee.TILE_SIZE ee.reset ee.Feature.prototype.getInfo ee.Geometry.MultiPoint ee.Function.prototype.apply ee.Collection.prototype.limit ee.data.setAuthToken ee.Filter.metadata ee.Filter.bounds ee.Filter.starts_with ee.Image.prototype.select ee.data.setAuthTokenRefresher ee.data.setDeadline ee.Feature.Polygon ee.Date ee.Geometry.prototype.toGeoJSON ee.Filter.not_contains ee.Element.prototype.set ee.data.getAuthToken ee.FeatureCollection.prototype.select ee.ComputedObject.prototype.aside ee.Terrain ee.Filter.not_ends_with ee.Collection.prototype.filterBounds ee.Filter ee.Filter.prototype.date ee.ComputedObject.prototype.evaluate ee.Function.prototype.call ee.Filter.prototype.lt ee.Collection.prototype.iterate ee.Filter.prototype.starts_with ee.FeatureCollection.prototype.getDownloadURL ee.ImageCollection.prototype.getInfo ee.Feature.MultiPoint ee.ComputedObject.prototype.getInfo ee.Collection.prototype.map ee.Feature.LinearRing ee.Filter.date ee.Filter.prototype.and ee.Geometry.Point ee.data.getList ee.FeatureCollection.prototype.getInfo ee.Filter.prototype.eq ee.Deserializer.fromJSON ee.ApiFunction.lookup ee.Serializer.toReadableJSON ee.Filter.inList ee.data.getDownloadId ee.Image.prototype.getMap ee.data.getThumbId ee.Filter.prototype.neq ee.Serializer.encode ee.ApiFunction._call ee.Filter.prototype.inList ee.Geometry.LinearRing ee.Feature.Point ee.Filter.prototype.not_starts_with ee.Geometry.MultiPolygon ee.initialize ee.data.getApiBaseUrl ee.Filter.prototype.not_contains ee.Image ee.Image.prototype.getThumbURL ee.Number ee.Filter.lte ee.data.getAuthClientId ee.String ee.Geometry.Rectangle ee.Algorithms ee.ComputedObject.prototype.serialize ee.data.authenticateViaPopup ee.FeatureCollection ee.Image.prototype.getInfo ee.ImageCollection ee.Serializer.toJSON ee.Image.prototype.getDownloadURL ee.Feature.MultiPolygon ee.Filter.gte ee.Filter.prototype.bounds ee.FeatureCollection.prototype.getMap ee.Collection.prototype.filterMetadata ee.data.makeDownloadUrl ee.Image.prototype.clip ee.data.getXsrfToken ee.Filter.eq ee.Geometry.prototype.toGeoJSONString ee.Feature.MultiLine ee.Geometry.LineString ee.Geometry ee.InitState ee.Collection.prototype.filterDate ee.data.makeTableDownloadUrl".split(" "),
b=[["coords","opt_proj","opt_geodesic","opt_maxError"],["var_args"],["list"],["var_args"],["mapid","x","y","z"],["func","var_args"],[],["func","namedArgs"],["params","opt_callback"],["property","opt_ascending"],["geometry","opt_properties"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["selectors","opt_names"],["name","value"],["opt_visParams","opt_callback"],["name","value"],["params","opt_callback"],["expression","opt_map"],["var_args"],["opt_dict"],[],["name","value"],
["name","value"],["id"],["r","g","b"],["opt_visParams","opt_callback"],["var_args"],["json"],["var_args"],[],[],["var_args"],["id","opt_callback"],["name","value"],["newFilter"],["coordinates"],["var_args"],["var_args"],["params","opt_callback"],["name","value"],[],["lon1","lat1","lon2","lat2"],["var_args"],[],[],["name","namedArgs"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],[],[],["opt_callback"],["coords","opt_proj"],["namedArgs"],["max","opt_property","opt_ascending"],
"clientId tokenType accessToken expiresIn opt_extraScopes opt_callback opt_updateAuthLibrary".split(" "),["name","operator","value"],["geometry","opt_errorMargin"],["name","value"],["var_args"],["refresher"],["milliseconds"],["coordinates"],["date","opt_tz"],[],["name","value"],["var_args"],[],["selectors","opt_names"],["func","var_args"],[],["name","value"],["geometry"],["opt_filter"],["var_args"],["callback"],["var_args"],["var_args"],["algorithm","opt_first"],["var_args"],["opt_format","opt_selectors",
"opt_filename","opt_callback"],["opt_callback"],["coordinates"],["opt_callback"],["algorithm","opt_dropNulls"],["coordinates"],["start","opt_end"],["var_args"],["coords","opt_proj"],["params","opt_callback"],["opt_callback"],["var_args"],["json"],["name"],["obj"],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["params","opt_callback"],["opt_visParams","opt_callback"],["params","opt_callback"],["var_args"],["obj","opt_isCompound"],["name","var_args"],["var_args"],["coords","opt_proj",
"opt_geodesic","opt_maxError"],["lon","lat"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["opt_baseurl","opt_tileurl","opt_successCallback","opt_errorCallback","opt_xsrfToken"],[],["var_args"],["opt_args"],["params","opt_callback"],["number"],["name","value"],[],["string"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],[],[],["opt_success","opt_error"],["args","opt_column"],["opt_callback"],["args"],["obj"],["params","opt_callback"],["coordinates"],
["name","value"],["var_args"],["opt_visParams","opt_callback"],["name","operator","value"],["id"],["geometry"],[],["name","value"],[],["coordinates"],["coords","opt_proj","opt_geodesic","opt_maxError"],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],[],["start","opt_end"],["id"]];Sa([$g,O.prototype.Kc,uh,O.prototype.$c,jf,Rh,ff,Sh,kf,R.prototype.sort,U,Ne,X.prototype.select,lg,X.prototype.getMap,mg,pf,W.prototype.Tb,rg,hh,Te,zg,Ag,mf,Ch,U.prototype.getMap,W.prototype.jd,eh,O.prototype.contains,
We,T.prototype.v,O.prototype.Wc,vf,og,R.prototype.filter,ph,qg,O.prototype.Cc,hf,wg,O.prototype.Y,oh,Dh,O.prototype.length,E.prototype.toString,Wf,O.prototype.Lc,ah,256,Ph,U.prototype.A,Wg,G.prototype.apply,R.prototype.limit,Pe,vg,ug,yg,W.prototype.select,Re,cf,sh,Ng,T.prototype.nc,xg,N.prototype.set,Ue,V.prototype.select,E.prototype.sc,Gh,Bg,R.prototype.Gc,O,O.prototype.zc,E.prototype.evaluate,G.prototype.call,O.prototype.Vc,R.prototype.Sc,O.prototype.od,V.prototype.ha,X.prototype.A,nh,E.prototype.A,
R.prototype.map,qh,sg,O.prototype.rc,Tg,wf,V.prototype.A,O.prototype.Dc,fh,Vf,Jf,tg,nf,W.prototype.getMap,lf,O.prototype.Yc,Hf,I,O.prototype.Oc,Zg,mh,O.prototype.ad,bh,Mh,ef,O.prototype.Zc,W,W.prototype.Xb,Eg,pg,Ve,S,Xg,Oh,E.prototype.v,Me,V,W.prototype.A,X,If,W.prototype.ha,th,ng,O.prototype.bounds,V.prototype.getMap,R.prototype.Vb,of,W.prototype.clip,gf,kg,T.prototype.oc,rh,Yg,T,Qh,R.prototype.Ub,qf],function(c,d){c&&(k.Da[c.toString()]={name:a[d],paramNames:b[d]})})})();})();
//@ sourceMappingURL=ee_api_js.sourcemap

File diff suppressed because one or more lines are too long

View File

@ -117,8 +117,8 @@ goog.LOAD_MODULE_USING_EVAL = !0;
goog.SEAL_MODULE_EXPORTS = goog.DEBUG;
goog.loadedModules_ = {};
goog.DEPENDENCIES_ENABLED = !1;
goog.ALWAYS_TRANSPILE = !1;
goog.NEVER_TRANSPILE = !1;
goog.TRANSPILE = "detect";
goog.TRANSPILER = "transpile.js";
goog.DEPENDENCIES_ENABLED && (goog.dependencies_ = {loadFlags:{}, nameToPath:{}, requires:{}, visited:{}, written:{}, deferred:{}}, goog.inHtmlDocument_ = function() {
var doc = goog.global.document;
return null != doc && "write" in doc;
@ -232,10 +232,10 @@ goog.DEPENDENCIES_ENABLED && (goog.dependencies_ = {loadFlags:{}, nameToPath:{},
}
return !1;
}, goog.needsTranspile_ = function(lang) {
if (goog.ALWAYS_TRANSPILE) {
if ("always" == goog.TRANSPILE) {
return !0;
}
if (goog.NEVER_TRANSPILE) {
if ("never" == goog.TRANSPILE) {
return !1;
}
if (!goog.transpiledLanguages_) {
@ -315,7 +315,7 @@ goog.transpile_ = function(code$$0, path$$0) {
jscomp || (goog.global.$jscomp = jscomp = {});
var transpile = jscomp.transpile;
if (!transpile) {
var transpilerPath = goog.basePath + "transpile.js", transpilerCode = goog.loadFileSync_(transpilerPath);
var transpilerPath = goog.basePath + goog.TRANSPILER, transpilerCode = goog.loadFileSync_(transpilerPath);
transpilerCode && (eval(transpilerCode + "\n//# sourceURL=" + transpilerPath), jscomp = goog.global.$jscomp, transpile = jscomp.transpile);
}
if (!transpile) {
@ -4334,6 +4334,68 @@ goog.html.SafeHtml.combineAttributes = function(fixedAttributes, defaultAttribut
goog.html.SafeHtml.DOCTYPE_HTML = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>", goog.i18n.bidi.Dir.NEUTRAL);
goog.html.SafeHtml.EMPTY = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("", goog.i18n.bidi.Dir.NEUTRAL);
goog.html.SafeHtml.BR = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>", goog.i18n.bidi.Dir.NEUTRAL);
goog.html.SafeScript = function() {
this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = "";
this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
};
goog.html.SafeScript.prototype.implementsGoogStringTypedString = !0;
goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
goog.html.SafeScript.fromConstant = function(script) {
var scriptString = goog.string.Const.unwrap(script);
return 0 === scriptString.length ? goog.html.SafeScript.EMPTY : goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(scriptString);
};
goog.html.SafeScript.prototype.getTypedStringValue = function() {
return this.privateDoNotAccessOrElseSafeScriptWrappedValue_;
};
goog.DEBUG && (goog.html.SafeScript.prototype.toString = function() {
return "SafeScript{" + this.privateDoNotAccessOrElseSafeScriptWrappedValue_ + "}";
});
goog.html.SafeScript.unwrap = function(safeScript) {
if (safeScript instanceof goog.html.SafeScript && safeScript.constructor === goog.html.SafeScript && safeScript.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
return safeScript.privateDoNotAccessOrElseSafeScriptWrappedValue_;
}
goog.asserts.fail("expected object of type SafeScript, got '" + safeScript + "' of type " + goog.typeOf(safeScript));
return "type_error:SafeScript";
};
goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse = function(script) {
return (new goog.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(script);
};
goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(script) {
this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = script;
return this;
};
goog.html.SafeScript.EMPTY = goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");
goog.html.uncheckedconversions = {};
goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract = function(justification, html, opt_dir) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(html, opt_dir || null);
};
goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract = function(justification, script) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmpty(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(script);
};
goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract = function(justification, style) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style);
};
goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract = function(justification, styleSheet) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheet);
};
goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract = function(justification, url) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);
};
goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract = function(justification, url) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(url);
};
goog.math = {};
goog.math.randomInt = function(a) {
return Math.floor(Math.random() * a);
@ -4814,6 +4876,10 @@ goog.dom.createTable_ = function(doc, rows, columns, fillWithNbsp) {
}
return table;
};
goog.dom.constHtmlToNode = function(var_args) {
var stringArray = goog.array.map(arguments, goog.string.Const.unwrap), safeHtml = goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."), stringArray.join(""));
return goog.dom.safeHtmlToNode(safeHtml);
};
goog.dom.safeHtmlToNode = function(html) {
return goog.dom.safeHtmlToNode_(document, html);
};
@ -5726,68 +5792,6 @@ goog.net.jsloader.Error = function(code, opt_message) {
this.code = code;
};
goog.inherits(goog.net.jsloader.Error, goog.debug.Error);
goog.html.SafeScript = function() {
this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = "";
this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
};
goog.html.SafeScript.prototype.implementsGoogStringTypedString = !0;
goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
goog.html.SafeScript.fromConstant = function(script) {
var scriptString = goog.string.Const.unwrap(script);
return 0 === scriptString.length ? goog.html.SafeScript.EMPTY : goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(scriptString);
};
goog.html.SafeScript.prototype.getTypedStringValue = function() {
return this.privateDoNotAccessOrElseSafeScriptWrappedValue_;
};
goog.DEBUG && (goog.html.SafeScript.prototype.toString = function() {
return "SafeScript{" + this.privateDoNotAccessOrElseSafeScriptWrappedValue_ + "}";
});
goog.html.SafeScript.unwrap = function(safeScript) {
if (safeScript instanceof goog.html.SafeScript && safeScript.constructor === goog.html.SafeScript && safeScript.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
return safeScript.privateDoNotAccessOrElseSafeScriptWrappedValue_;
}
goog.asserts.fail("expected object of type SafeScript, got '" + safeScript + "' of type " + goog.typeOf(safeScript));
return "type_error:SafeScript";
};
goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse = function(script) {
return (new goog.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(script);
};
goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(script) {
this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = script;
return this;
};
goog.html.SafeScript.EMPTY = goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");
goog.html.uncheckedconversions = {};
goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract = function(justification, html, opt_dir) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(html, opt_dir || null);
};
goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract = function(justification, script) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmpty(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(script);
};
goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract = function(justification, style) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style);
};
goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract = function(justification, styleSheet) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheet);
};
goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract = function(justification, url) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);
};
goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract = function(justification, url) {
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(url);
};
goog.structs = {};
goog.structs.Collection = function() {
};
@ -7584,7 +7588,7 @@ goog.net.XhrIo.prototype.send = function(url, opt_method, opt_content, opt_heade
this.xhr_.setRequestHeader(key, value);
}, this);
this.responseType_ && (this.xhr_.responseType = this.responseType_);
goog.object.containsKey(this.xhr_, "withCredentials") && (this.xhr_.withCredentials = this.withCredentials_);
"withCredentials" in this.xhr_ && this.xhr_.withCredentials !== this.withCredentials_ && (this.xhr_.withCredentials = this.withCredentials_);
try {
this.cleanUpTimeoutTimer_(), 0 < this.timeoutInterval_ && (this.useXhr2Timeout_ = goog.net.XhrIo.shouldUseXhr2Timeout_(this.xhr_), goog.log.fine(this.logger_, this.formatMsg_("Will abort after " + this.timeoutInterval_ + "ms if incomplete, xhr2 " + this.useXhr2Timeout_)), this.useXhr2Timeout_ ? (this.xhr_[goog.net.XhrIo.XHR2_TIMEOUT_] = this.timeoutInterval_, this.xhr_[goog.net.XhrIo.XHR2_ON_TIMEOUT_] = goog.bind(this.timeout_, this)) : this.timeoutId_ = goog.Timer.callOnce(this.timeout_, this.timeoutInterval_,
this)), goog.log.fine(this.logger_, this.formatMsg_("Sending request")), this.inSend_ = !0, this.xhr_.send(content), this.inSend_ = !1;
@ -8864,6 +8868,12 @@ ee.ComputedObject = function(func, args, opt_varName) {
};
goog.inherits(ee.ComputedObject, ee.Encodable);
goog.exportSymbol("ee.ComputedObject", ee.ComputedObject);
ee.ComputedObject.prototype.evaluate = function(callback) {
if (!callback || !goog.isFunction(callback)) {
throw Error("evaluate() requires a callback function.");
}
ee.data.getValue({json:this.serialize()}, callback);
};
ee.ComputedObject.prototype.getInfo = function(opt_callback) {
return ee.data.getValue({json:this.serialize()}, opt_callback);
};

View File

@ -85,11 +85,38 @@ goog.exportSymbol('ee.ComputedObject', ee.ComputedObject);
/**
* An imperative function that returns information about this object (usually
* the value) via a synchronous AJAX call.
* Asynchronously retrieves the value of this object from the server and
* passes it to the provided callback function.
*
* @param {function (?, string=)} callback A function of the form
* function(success, failure), called when the server returns an answer.
* If the request succeeded, the success argument contains the evaluated
* result. If the request failed, the failure argument will contains an
* error message.
* @export
*/
ee.ComputedObject.prototype.evaluate = function(callback) {
if (!callback || !goog.isFunction(callback)) {
throw Error('evaluate() requires a callback function.');
}
ee.data.getValue({
'json': this.serialize()
}, callback);
};
/**
* Retrieves the value of this object from the server.
*
* If no callback function is provided, the request is made synchronously. If
* a callback is provided, the request is made asynchronously.
*
* The asynchronous mode is preferred because the synchronous mode stops all
* other code (for example, the EE Code Editor UI) while waiting for the server.
* To make an asynchronous request, evaluate() is preferred over getInfo().
*
* @param {function (?, string=): ?=} opt_callback An optional
* callback. If not supplied, the call is made synchronously.
* callback. If not supplied, the call is made synchronously.
* @return {*} The computed value of this object.
* @export
*/

View File

@ -433,7 +433,8 @@ ee.data.getAlgorithms = function(opt_callback) {
/**
* Get a Map ID for a given asset
* @param {ee.data.ImageVisualizationParameters} params
* The visualization parameters. For Images and ImageCollections:
* The visualization parameters as a (client-side) JavaScript object.
* For Images and ImageCollections:
* - image (JSON string) The image to render.
* - version (number) Version number of image (or latest).
* - bands (comma-seprated strings) Comma-delimited list of
@ -1452,7 +1453,8 @@ ee.data.AbstractTaskConfig;
* driveFolder: (undefined|string),
* driveFileNamePrefix: (undefined|string),
* outputBucket: (undefined|string),
* outputPrefix: (undefined|string)
* outputPrefix: (undefined|string),
* pyramidingPolicy: (undefined|string)
* }}
*/
ee.data.ImageTaskConfig;

View File

@ -7,34 +7,34 @@
// See http://goo.gl/SdiwZH
// clang-format off
goog.addDependency('../../geo/gestalt/client/javascript/apifunction.js', ['ee.ApiFunction'], ['ee.ComputedObject', 'ee.Function', 'ee.Types', 'ee.data', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/apitestcase.js', ['ee.ApiTestCase', 'ee.ApiTestCase.BUILTIN_FUNCTIONS'], ['ee', 'ee.data', 'goog.json', 'goog.string', 'goog.testing.TestCase'], false);
goog.addDependency('../../geo/gestalt/client/javascript/arguments.js', ['ee.arguments'], ['ee.ComputedObject', 'goog.array', 'goog.asserts', 'goog.object', 'goog.string', 'goog.structs.Set'], false);
goog.addDependency('../../geo/gestalt/client/javascript/collection.js', ['ee.Collection'], ['ee.ApiFunction', 'ee.Element', 'ee.Filter', 'ee.arguments'], false);
goog.addDependency('../../geo/gestalt/client/javascript/computedobject.js', ['ee.ComputedObject'], ['ee.Encodable', 'ee.Serializer', 'ee.data', 'goog.array'], false);
goog.addDependency('../../geo/gestalt/client/javascript/customfunction.js', ['ee.CustomFunction'], ['ee.ComputedObject', 'ee.Function', 'ee.Number', 'ee.Serializer', 'ee.String', 'ee.Types', 'goog.array', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/data.js', ['ee.data', 'ee.data.AbstractTaskConfig', 'ee.data.AlgorithmArgument', 'ee.data.AlgorithmSignature', 'ee.data.AlgorithmsRegistry', 'ee.data.AssetAcl', 'ee.data.AssetAclUpdate', 'ee.data.AssetDescription', 'ee.data.AssetList', 'ee.data.AssetType', 'ee.data.AuthArgs', 'ee.data.AuthResponse', 'ee.data.Band', 'ee.data.BandDescription', 'ee.data.BandMapping', 'ee.data.DownloadId', 'ee.data.ExportType', 'ee.data.FeatureCollectionDescription', 'ee.data.FeatureVisualizationParameters', 'ee.data.FileSource', 'ee.data.FolderDescription', 'ee.data.GeoJSONFeature', 'ee.data.GeoJSONGeometry', 'ee.data.ImageCollectionDescription', 'ee.data.ImageDescription', 'ee.data.ImageTaskConfig', 'ee.data.ImageVisualizationParameters', 'ee.data.IngestionRequest', 'ee.data.MapId', 'ee.data.MapZoomRange', 'ee.data.MissingData', 'ee.data.PixelTypeDescription', 'ee.data.ProcessingResponse', 'ee.data.RawMapId', 'ee.data.ReductionPolicy', 'ee.data.ShortAssetDescription', 'ee.data.SystemTimeProperty', 'ee.data.TableTaskConfig', 'ee.data.TaskListResponse', 'ee.data.TaskStatus', 'ee.data.TaskUpdateActions', 'ee.data.ThumbnailId', 'ee.data.TilesTaskConfig', 'ee.data.Tileset', 'ee.data.VideoTaskConfig'], ['goog.Uri', 'goog.array', 'goog.async.Throttle', 'goog.functions', 'goog.json', 'goog.net.XhrIo', 'goog.net.XmlHttp', 'goog.net.jsloader', 'goog.object', 'goog.string'], false);
goog.addDependency('../../geo/gestalt/client/javascript/date.js', ['ee.Date'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Types', 'ee.arguments'], false);
goog.addDependency('../../geo/gestalt/client/javascript/deserializer.js', ['ee.Deserializer'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.CustomFunction', 'ee.Date', 'ee.Encodable', 'ee.Function', 'ee.Geometry', 'goog.array', 'goog.json', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/dictionary.js', ['ee.Dictionary'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Types'], false);
goog.addDependency('../../geo/gestalt/client/javascript/ee.js', ['ee', 'ee.Algorithms', 'ee.InitState'], ['ee.ApiFunction', 'ee.Collection', 'ee.ComputedObject', 'ee.CustomFunction', 'ee.Date', 'ee.Dictionary', 'ee.Element', 'ee.Encodable', 'ee.Feature', 'ee.FeatureCollection', 'ee.Filter', 'ee.Function', 'ee.Geometry', 'ee.Image', 'ee.ImageCollection', 'ee.List', 'ee.Number', 'ee.String', 'ee.Terrain', 'ee.Types', 'ee.data', 'goog.array', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/element.js', ['ee.Element'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Types', 'goog.array', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/encodable.js', ['ee.Encodable'], [], false);
goog.addDependency('../../geo/gestalt/client/javascript/feature.js', ['ee.Feature'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Element', 'ee.Geometry', 'ee.arguments', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/featurecollection.js', ['ee.FeatureCollection'], ['ee.ApiFunction', 'ee.Collection', 'ee.ComputedObject', 'ee.Feature', 'ee.Geometry', 'ee.List', 'ee.Types', 'ee.arguments', 'ee.data', 'goog.array'], false);
goog.addDependency('../../geo/gestalt/client/javascript/filter.js', ['ee.Filter'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.arguments', 'goog.array', 'goog.string'], false);
goog.addDependency('../../geo/gestalt/client/javascript/function.js', ['ee.Function', 'ee.Function.Signature'], ['ee.ComputedObject', 'ee.Encodable', 'ee.Serializer', 'ee.Types', 'goog.array', 'goog.functions', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/geometry.js', ['ee.Geometry', 'ee.Geometry.LineString', 'ee.Geometry.LinearRing', 'ee.Geometry.MultiLineString', 'ee.Geometry.MultiPoint', 'ee.Geometry.MultiPolygon', 'ee.Geometry.Point', 'ee.Geometry.Polygon', 'ee.Geometry.Rectangle'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Serializer', 'ee.Types', 'ee.arguments', 'goog.array', 'goog.json.Serializer', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/image.js', ['ee.Image'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Element', 'ee.Function', 'ee.Geometry', 'ee.Types', 'ee.arguments', 'ee.data', 'goog.array', 'goog.json', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/imagecollection.js', ['ee.ImageCollection'], ['ee.ApiFunction', 'ee.Collection', 'ee.ComputedObject', 'ee.Image', 'ee.List', 'ee.Types', 'ee.arguments', 'goog.array'], false);
goog.addDependency('../../geo/gestalt/client/javascript/list.js', ['ee.List'], ['ee.ApiFunction', 'ee.ComputedObject', 'goog.array'], false);
goog.addDependency('../../geo/gestalt/client/javascript/maplayeroverlay.js', ['ee.MapLayerOverlay', 'ee.TileEvent'], ['ee.MapTileManager', 'goog.array', 'goog.dom', 'goog.events', 'goog.events.Event', 'goog.events.EventTarget', 'goog.events.EventType', 'goog.iter', 'goog.net.EventType', 'goog.structs.Set', 'goog.style'], false);
goog.addDependency('../../geo/gestalt/client/javascript/maptilemanager.js', ['ee.MapTileManager'], ['ee.data', 'goog.Disposable', 'goog.Uri', 'goog.array', 'goog.events', 'goog.events.Event', 'goog.events.EventTarget', 'goog.events.EventType', 'goog.net.EventType', 'goog.net.ImageLoader', 'goog.net.XhrIo', 'goog.structs.Map', 'goog.structs.PriorityPool'], false);
goog.addDependency('../../geo/gestalt/client/javascript/number.js', ['ee.Number'], ['ee.ApiFunction', 'ee.ComputedObject'], false);
goog.addDependency('../../geo/gestalt/client/javascript/package.js', ['ee.Package'], ['ee.ApiFunction', 'ee.CustomFunction', 'ee.SavedFunction', 'ee.arguments', 'ee.data'], false);
goog.addDependency('../../geo/gestalt/client/javascript/profiler.js', ['ee.data.Profiler'], ['ee.ApiFunction', 'goog.async.Delay', 'goog.events.Event', 'goog.events.EventTarget', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/savedfunction.js', ['ee.SavedFunction'], ['ee.ApiFunction', 'ee.Function'], false);
goog.addDependency('../../geo/gestalt/client/javascript/serializer.js', ['ee.Serializer'], ['ee.Encodable', 'goog.array', 'goog.crypt.Md5', 'goog.json.Serializer', 'goog.object'], false);
goog.addDependency('../../geo/gestalt/client/javascript/string.js', ['ee.String'], ['ee.ApiFunction', 'ee.ComputedObject'], false);
goog.addDependency('../../geo/gestalt/client/javascript/terrain.js', ['ee.Terrain'], ['ee.ApiFunction'], false);
goog.addDependency('../../geo/gestalt/client/javascript/types.js', ['ee.Types'], ['ee.ComputedObject'], false);
goog.addDependency('../../geo/gestalt/client/javascript/apifunction.js', ['ee.ApiFunction'], ['ee.ComputedObject', 'ee.Function', 'ee.Types', 'ee.data', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/apitestcase.js', ['ee.ApiTestCase', 'ee.ApiTestCase.BUILTIN_FUNCTIONS'], ['ee', 'ee.data', 'goog.json', 'goog.string', 'goog.testing.TestCase'], {'lang': 'es5'});
goog.addDependency('../../geo/gestalt/client/javascript/arguments.js', ['ee.arguments'], ['ee.ComputedObject', 'goog.array', 'goog.asserts', 'goog.object', 'goog.string', 'goog.structs.Set'], {});
goog.addDependency('../../geo/gestalt/client/javascript/collection.js', ['ee.Collection'], ['ee.ApiFunction', 'ee.Element', 'ee.Filter', 'ee.arguments'], {});
goog.addDependency('../../geo/gestalt/client/javascript/computedobject.js', ['ee.ComputedObject'], ['ee.Encodable', 'ee.Serializer', 'ee.data', 'goog.array'], {});
goog.addDependency('../../geo/gestalt/client/javascript/customfunction.js', ['ee.CustomFunction'], ['ee.ComputedObject', 'ee.Function', 'ee.Number', 'ee.Serializer', 'ee.String', 'ee.Types', 'goog.array', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/data.js', ['ee.data', 'ee.data.AbstractTaskConfig', 'ee.data.AlgorithmArgument', 'ee.data.AlgorithmSignature', 'ee.data.AlgorithmsRegistry', 'ee.data.AssetAcl', 'ee.data.AssetAclUpdate', 'ee.data.AssetDescription', 'ee.data.AssetList', 'ee.data.AssetQuotaDetails', 'ee.data.AssetType', 'ee.data.AuthArgs', 'ee.data.AuthResponse', 'ee.data.Band', 'ee.data.BandDescription', 'ee.data.BandMapping', 'ee.data.DownloadId', 'ee.data.ExportType', 'ee.data.FeatureCollectionDescription', 'ee.data.FeatureVisualizationParameters', 'ee.data.FileSource', 'ee.data.FolderDescription', 'ee.data.GeoJSONFeature', 'ee.data.GeoJSONGeometry', 'ee.data.ImageCollectionDescription', 'ee.data.ImageDescription', 'ee.data.ImageTaskConfig', 'ee.data.ImageVisualizationParameters', 'ee.data.IngestionRequest', 'ee.data.MapId', 'ee.data.MapTaskConfig', 'ee.data.MapZoomRange', 'ee.data.MissingData', 'ee.data.PixelTypeDescription', 'ee.data.ProcessingResponse', 'ee.data.RawMapId', 'ee.data.ReductionPolicy', 'ee.data.ShortAssetDescription', 'ee.data.SystemTimeProperty', 'ee.data.TableTaskConfig', 'ee.data.TaskListResponse', 'ee.data.TaskStatus', 'ee.data.TaskUpdateActions', 'ee.data.ThumbnailId', 'ee.data.Tileset', 'ee.data.VideoTaskConfig'], ['goog.Uri', 'goog.array', 'goog.async.Throttle', 'goog.functions', 'goog.json', 'goog.net.XhrIo', 'goog.net.XmlHttp', 'goog.net.jsloader', 'goog.object', 'goog.string'], {});
goog.addDependency('../../geo/gestalt/client/javascript/date.js', ['ee.Date'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Types', 'ee.arguments'], {});
goog.addDependency('../../geo/gestalt/client/javascript/deserializer.js', ['ee.Deserializer'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.CustomFunction', 'ee.Date', 'ee.Encodable', 'ee.Function', 'ee.Geometry', 'goog.array', 'goog.json', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/dictionary.js', ['ee.Dictionary'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Types'], {});
goog.addDependency('../../geo/gestalt/client/javascript/ee.js', ['ee', 'ee.Algorithms', 'ee.InitState'], ['ee.ApiFunction', 'ee.Collection', 'ee.ComputedObject', 'ee.CustomFunction', 'ee.Date', 'ee.Dictionary', 'ee.Element', 'ee.Encodable', 'ee.Feature', 'ee.FeatureCollection', 'ee.Filter', 'ee.Function', 'ee.Geometry', 'ee.Image', 'ee.ImageCollection', 'ee.List', 'ee.Number', 'ee.String', 'ee.Terrain', 'ee.Types', 'ee.data', 'goog.array', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/element.js', ['ee.Element'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Types', 'goog.array', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/encodable.js', ['ee.Encodable'], [], {});
goog.addDependency('../../geo/gestalt/client/javascript/feature.js', ['ee.Feature'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Element', 'ee.Geometry', 'ee.arguments', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/featurecollection.js', ['ee.FeatureCollection'], ['ee.ApiFunction', 'ee.Collection', 'ee.ComputedObject', 'ee.Feature', 'ee.Geometry', 'ee.List', 'ee.Types', 'ee.arguments', 'ee.data', 'goog.array'], {});
goog.addDependency('../../geo/gestalt/client/javascript/filter.js', ['ee.Filter'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.arguments', 'goog.array', 'goog.string'], {});
goog.addDependency('../../geo/gestalt/client/javascript/function.js', ['ee.Function', 'ee.Function.Signature'], ['ee.ComputedObject', 'ee.Encodable', 'ee.Serializer', 'ee.Types', 'goog.array', 'goog.functions', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/geometry.js', ['ee.Geometry', 'ee.Geometry.LineString', 'ee.Geometry.LinearRing', 'ee.Geometry.MultiLineString', 'ee.Geometry.MultiPoint', 'ee.Geometry.MultiPolygon', 'ee.Geometry.Point', 'ee.Geometry.Polygon', 'ee.Geometry.Rectangle'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Serializer', 'ee.Types', 'ee.arguments', 'goog.array', 'goog.json.Serializer', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/image.js', ['ee.Image'], ['ee.ApiFunction', 'ee.ComputedObject', 'ee.Element', 'ee.Function', 'ee.Geometry', 'ee.Types', 'ee.arguments', 'ee.data', 'goog.array', 'goog.json', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/imagecollection.js', ['ee.ImageCollection'], ['ee.ApiFunction', 'ee.Collection', 'ee.ComputedObject', 'ee.Image', 'ee.List', 'ee.Types', 'ee.arguments', 'goog.array'], {});
goog.addDependency('../../geo/gestalt/client/javascript/list.js', ['ee.List'], ['ee.ApiFunction', 'ee.ComputedObject', 'goog.array'], {});
goog.addDependency('../../geo/gestalt/client/javascript/maplayeroverlay.js', ['ee.MapLayerOverlay', 'ee.TileEvent'], ['ee.MapTileManager', 'goog.array', 'goog.dom', 'goog.events', 'goog.events.Event', 'goog.events.EventTarget', 'goog.events.EventType', 'goog.iter', 'goog.net.EventType', 'goog.structs.Set', 'goog.style'], {});
goog.addDependency('../../geo/gestalt/client/javascript/maptilemanager.js', ['ee.MapTileManager'], ['ee.data', 'goog.Disposable', 'goog.Uri', 'goog.array', 'goog.events', 'goog.events.Event', 'goog.events.EventTarget', 'goog.events.EventType', 'goog.net.EventType', 'goog.net.ImageLoader', 'goog.net.XhrIo', 'goog.structs.Map', 'goog.structs.PriorityPool'], {});
goog.addDependency('../../geo/gestalt/client/javascript/number.js', ['ee.Number'], ['ee.ApiFunction', 'ee.ComputedObject'], {});
goog.addDependency('../../geo/gestalt/client/javascript/package.js', ['ee.Package'], ['ee.ApiFunction', 'ee.CustomFunction', 'ee.SavedFunction', 'ee.arguments', 'ee.data'], {});
goog.addDependency('../../geo/gestalt/client/javascript/profiler.js', ['ee.data.Profiler'], ['ee.ApiFunction', 'goog.async.Delay', 'goog.events.Event', 'goog.events.EventTarget', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/savedfunction.js', ['ee.SavedFunction'], ['ee.ApiFunction', 'ee.Function'], {});
goog.addDependency('../../geo/gestalt/client/javascript/serializer.js', ['ee.Serializer'], ['ee.Encodable', 'goog.array', 'goog.crypt.Md5', 'goog.json.Serializer', 'goog.object'], {});
goog.addDependency('../../geo/gestalt/client/javascript/string.js', ['ee.String'], ['ee.ApiFunction', 'ee.ComputedObject'], {});
goog.addDependency('../../geo/gestalt/client/javascript/terrain.js', ['ee.Terrain'], ['ee.ApiFunction'], {});
goog.addDependency('../../geo/gestalt/client/javascript/types.js', ['ee.Types'], ['ee.ComputedObject'], {});

View File

@ -1,3 +1,7 @@
/**
* @fileoverview Generated externs.
* @externs
*/
var ctor$$2;
ctor$$2.prototype.then;
var ee;
@ -105,6 +109,12 @@ ee.ComputedObject;
*/
ee.ComputedObject.prototype.aside = function(func, var_args) {
};
/**
* @param {!function (?, string=): ?} callback
* @return {undefined}
*/
ee.ComputedObject.prototype.evaluate = function(callback) {
};
/**
* @param {!function (?, string=): ?=} opt_callback
* @return {*}

View File

@ -126,6 +126,7 @@ ee.FeatureCollection.reset = function() {
* one parameter, 'color', containing an RGB color string is allowed. If
* vis_params isn't specified, then the color #000000 is used.
* @param {function(Object, string=)=} opt_callback An async callback.
* If not supplied, the call is made synchronously.
* @return {ee.data.MapId|undefined} An object containing a mapid string, an
* acess token, plus a Collection.draw image wrapping this collection. Or
* undefined if a callback was specified.

View File

@ -156,6 +156,7 @@ ee.Image.prototype.getInfo = function(opt_callback) {
* @param {ee.data.ImageVisualizationParameters=} opt_visParams
* The visualization parameters.
* @param {function(Object, string=)=} opt_callback An async callback.
* If not supplied, the call is made synchronously.
* @return {ee.data.MapId|undefined} An object containing a mapid string, an
* access token plus this object, or an error message. Or undefined if a
* callback was specified.

View File

@ -115,6 +115,7 @@ ee.ImageCollection.reset = function() {
*
* @param {Object?=} opt_visParams The visualization parameters.
* @param {function(Object, string=)=} opt_callback An async callback.
* If not supplied, the call is made synchronously.
* @return {ee.data.MapId|undefined} Returns a mapid and token, or undefined if
* a callback was specified.
* @export

100
python/cli/authenticate.py Normal file
View File

@ -0,0 +1,100 @@
#!/usr/bin/env python
"""Prompts the user to authorize OAuth2 access to Earth Engine account.
Stores credentials (refresh token) for later use.
"""
import errno
import json
import os
import urllib
import urllib2
import webbrowser
from ee import oauthinfo
# This URI prompts user to copy and paste a code after successful
# authorization.
_redirect_uri = 'urn:ietf:wg:oauth:2.0:oob'
class Authenticate(object):
"""Prompts the user to authorize OAuth2 access to Earth Engine account."""
@classmethod
def authenticate(cls):
# TODO(user): Add an additional, non-commandline flow for iPython
# notebook for added convenience, and to work in notebook environments where
# commandline isn't available.
# This implements the flow from:
# https://developers.google.com/accounts/docs/OAuth2ForDevices
auth_code = cls._request_authorization()
refresh_token = cls._request_token(auth_code)
cls._write_token(refresh_token)
@classmethod
def _request_authorization(cls):
"""Requests authorization from user."""
auth_request_params = {
'scope': oauthinfo.OAuthInfo.SCOPE,
'redirect_uri': _redirect_uri,
'response_type': 'code',
'client_id': oauthinfo.OAuthInfo.CLIENT_ID
}
auth_request_url = ('https://accounts.google.com/o/oauth2/auth?' +
urllib.urlencode(auth_request_params))
webbrowser.open_new(auth_request_url)
print """
Opening web browser to address %s
Please authorize access to your Earth Engine account, and paste
the resulting code below.
If the web browser does not start, please manually browse the the URL above.
""" % auth_request_url
auth_code = raw_input('Please enter authorization code: ').strip()
return auth_code
@classmethod
def _request_token(cls, auth_code):
"""Uses authorization code to request tokens."""
token_request_params = {
'code': auth_code,
'client_id': oauthinfo.OAuthInfo.CLIENT_ID,
'client_secret': oauthinfo.OAuthInfo.CLIENT_SECRET,
'redirect_uri': _redirect_uri,
'grant_type': 'authorization_code'
}
refresh_token = None
try:
response = urllib2.urlopen('https://accounts.google.com/o/oauth2/token',
urllib.urlencode(token_request_params)).read()
tokens = json.loads(response)
refresh_token = tokens['refresh_token']
except urllib2.HTTPError, e:
raise Exception('Problem requesting tokens. Please try again. %s %s' %
(e, e.read()))
return refresh_token
@classmethod
def _write_token(cls, refresh_token):
"""Writes refresh token to filesystem for later use."""
credentials_path = oauthinfo.OAuthInfo.credentials_path()
dirname = os.path.dirname(credentials_path)
try:
os.makedirs(dirname)
except OSError, e:
if e.errno != errno.EEXIST:
raise Exception('Error creating %s: %s' % (dirname, e))
json.dump({'refresh_token': refresh_token}, open(credentials_path, 'w'))
print '\nSuccessfully saved authorization to %s' % credentials_path

File diff suppressed because it is too large Load Diff

View File

@ -11,23 +11,28 @@ commands as in a typical terminal program.
"""
import argparse
import sys
import ee
import commands
import utils
COMMANDS = [
commands.AclCommand,
commands.AssetCommand,
commands.ConfigCommand,
commands.ExportCommand,
commands.ListCommand,
commands.RenameCommand,
commands.RmCommand,
commands.SetPropertiesCommand,
commands.TasksCommand,
commands.UploadCommand,
]
class CommandDispatcher(commands.Dispatcher):
name = 'main'
COMMANDS = [
commands.AuthenticateCommand,
commands.AclCommand,
commands.AssetCommand,
commands.CopyCommand,
commands.CreateCommand,
commands.ListCommand,
commands.MoveCommand,
commands.RmCommand,
commands.TaskCommand,
commands.UploadCommand,
]
def main():
@ -35,19 +40,28 @@ def main():
parser = argparse.ArgumentParser(
prog='earthengine', description='Earth Engine Command Line Interface.')
parser.add_argument(
'--ee-config', help='Path to the CLI configuration file.')
'--ee_config', help='Path to the earthengine configuration file. '
'Defaults to "~/%s".' % utils.DEFAULT_EE_CONFIG_FILE_RELATIVE)
dispatcher = CommandDispatcher(parser)
# Print the list of commands if the user supplied no arguments at all.
if len(sys.argv) == 1:
parser.print_help()
return
subparsers = parser.add_subparsers(title='Commands', dest='top_cmd')
command_objects = {}
for command in COMMANDS:
subparser = subparsers.add_parser(
command.name, description=command.__doc__, help=command.__doc__)
command_objects[command.name] = command(subparser)
args = parser.parse_args()
config = utils.CommandLineConfig(args.ee_config)
command_objects[args.top_cmd].run(args, config)
# Catch EEException errors, which wrap server-side Earth Engine
# errors, and print the error message without the irrelevant local
# stack trace. (Individual commands may also catch EEException if
# they want to be able to continue despite errors.)
try:
dispatcher.run(args, config)
except ee.EEException as e:
print e
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -18,8 +18,10 @@ from ee.oauthinfo import OAuthInfo
HOMEDIR = os.path.expanduser('~')
EE_CONFIG_FILE = 'EE_CONFIG_FILE'
DEFAULT_EE_CONFIG_FILE_RELATIVE = os.path.join(
'.config', 'earthengine', 'credentials')
DEFAULT_EE_CONFIG_FILE = os.path.join(
HOMEDIR, '.config', 'earthengine', 'credentials')
HOMEDIR, DEFAULT_EE_CONFIG_FILE_RELATIVE)
CONFIG_PARAMS = {
'url': 'https://earthengine.googleapis.com',

View File

@ -2,7 +2,7 @@
"""The EE Python library."""
__version__ = '0.1.82'
__version__ = '0.1.83'
# Using lowercase function naming to match the JavaScript names.
# pylint: disable=g-bad-name
@ -138,10 +138,9 @@ def _GetPersistentCredentials():
None, OAuthInfo.CLIENT_ID, OAuthInfo.CLIENT_SECRET, refresh_token,
None, 'https://accounts.google.com/o/oauth2/token', None)
except IOError:
script = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'authenticate.py')
raise EEException('Please authorize access to your Earth Engine account ' +
'by running\n\npython %s\n\nand then retry.' % script)
raise EEException('Please authorize access to your Earth Engine account '
'by running\n\nearthengine authenticate\n\nin your '
'command line, and then retry.')
def _ResetGeneratedClasses():

View File

@ -1,87 +0,0 @@
#!/usr/bin/env python
"""Script to prompt user to authorize OAuth2 access to Earth Engine account.
Stores credentials (refresh token) for later use
"""
import errno
import json
import os
import urllib
import urllib2
import webbrowser
from oauthinfo import OAuthInfo
def main():
# TODO(user): Add an additional, non-commandline flow for iPython notebook
# for added convenience, and to work in notebook environments where
# commandline isn't available.
# This implements the flow from:
# https://developers.google.com/accounts/docs/OAuth2ForDevices
### Request authorization from user
# This URI prompts user to copy and paste a code after successful
# authorization.
redirect_uri = 'urn:ietf:wg:oauth:2.0:oob'
auth_request_params = {
'scope': OAuthInfo.SCOPE,
'redirect_uri': redirect_uri,
'response_type': 'code',
'client_id': OAuthInfo.CLIENT_ID
}
auth_request_url = ('https://accounts.google.com/o/oauth2/auth?' +
urllib.urlencode(auth_request_params))
webbrowser.open_new(auth_request_url)
print """
Opening web browser to address %s
Please authorize access to your Earth Engine account, and paste
the resulting code below.
If the web browser does not start, please manually browse the the URL above.
""" % auth_request_url
auth_code = raw_input('Please enter authorization code: ').strip()
### Use authorization code to request tokens
token_request_params = {
'code': auth_code,
'client_id': OAuthInfo.CLIENT_ID,
'client_secret': OAuthInfo.CLIENT_SECRET,
'redirect_uri': redirect_uri,
'grant_type': 'authorization_code'
}
refresh_token = None
try:
response = urllib2.urlopen('https://accounts.google.com/o/oauth2/token',
urllib.urlencode(token_request_params)).read()
tokens = json.loads(response)
refresh_token = tokens['refresh_token']
except urllib2.HTTPError, e:
raise Exception('Problem requesting tokens. Please try again. %s %s' %
(e, e.read()))
### Write refresh token to filesystem for later use
credentials_path = OAuthInfo.credentials_path()
dirname = os.path.dirname(credentials_path)
try:
os.makedirs(dirname)
except OSError, e:
if e.errno != errno.EEXIST:
raise Exception('Error creating %s: %s' % (dirname, e))
json.dump({'refresh_token': refresh_token}, open(credentials_path, 'w'))
print '\nSuccessfully saved authorization to %s' % credentials_path
if __name__ == '__main__':
main()

View File

@ -60,6 +60,7 @@ class Task(object):
class ExportDestination(object):
DRIVE = 'DRIVE'
GCS = 'GOOGLE_CLOUD_STORAGE'
ASSET = 'ASSET'
def start(self):
"""Starts the task. No-op for started tasks."""
@ -188,7 +189,64 @@ class Export(object):
return _CreateTask(
Task.Type.EXPORT_IMAGE, image, description, config)
# Disable argument usage check; arguments are accessed using local().
# Disable argument usage check; arguments are accessed using locals().
# pylint: disable=unused-argument
@staticmethod
def toAsset(image, description='myExportImageTask', assetId=None,
pyramidingPolicy=None, dimensions=None, region=None,
scale=None, crs=None, crsTransform=None, maxPixels=None,
**kwargs):
"""Creates a task to export an EE Image to an EE Asset.
Args:
image: The image to be exported.
description: Human-readable name of the task.
assetId: The destination asset ID.
pyramidingPolicy: The pyramiding policy to apply to each band in the
image, a dictionary keyed by band name. Values must be
one of: "mean", "sample", "min", "max", or "mode".
Defaults to "mean". A special key, ".default", may be used to
change the default for all bands.
dimensions: The dimensions of the exported image. Takes either a
single positive integer as the maximum dimension or "WIDTHxHEIGHT"
where WIDTH and HEIGHT are each positive integers.
region: The lon,lat coordinates for a LinearRing or Polygon
specifying the region to export. Can be specified as a nested
lists of numbers or a serialized string. Defaults to the image's
region.
scale: The resolution in meters per pixel. Defaults to the
native resolution of the image assset unless a crsTransform
is specified.
crs: The coordinate reference system of the exported image's
projection. Defaults to the image's default projection.
crsTransform: A comma-separated string of 6 numbers describing
the affine transform of the coordinate reference system of the
exported image's projection, in the order: xScale, yShearing,
xShearing, yScale, xTranslation and yTranslation. Defaults to
the image's native CRS transform.
maxPixels: The maximum allowed number of pixels in the exported
image. The task will fail if the exported region covers more
pixels in the specified projection. Defaults to 100,000,000.
**kwargs: Holds other keyword arguments that may have been deprecated
such as 'crs_transform'.
Returns:
An unstarted Task that exports the image to Drive.
"""
# _CopyDictFilterNone must be called first because it copies locals to
# support deprecated arguments.
config = _CopyDictFilterNone(locals())
_ConvertToServerParams(config, 'image', Task.ExportDestination.ASSET)
if 'region' in config:
# Convert the region to a serialized form, if necessary.
config['region'] = _GetSerializedRegion(config.get('region'))
return _CreateTask(
Task.Type.EXPORT_IMAGE, image, description, config)
# Disable argument usage check; arguments are accessed using locals().
# pylint: disable=unused-argument
@staticmethod
def toCloudStorage(image, description='myExportImageTask',
@ -212,7 +270,7 @@ class Export(object):
lists of numbers or a serialized string. Defaults to the image's
region.
scale: The resolution in meters per pixel. Defaults to the
native resolution of the image assset unless a crs_transform
native resolution of the image assset unless a crsTransform
is specified.
crs: The coordinate reference system of the exported image's
projection. Defaults to the image's default projection.
@ -265,7 +323,7 @@ class Export(object):
lists of numbers or a serialized string. Defaults to the image's
region.
scale: The resolution in meters per pixel. Defaults to the
native resolution of the image assset unless a crs_transform
native resolution of the image assset unless a crsTransform
is specified.
crs: The coordinate reference system of the exported image's
projection. Defaults to the image's default projection.
@ -308,7 +366,7 @@ class Export(object):
"""Forbids class instantiation."""
raise AssertionError('This class cannot be instantiated.')
# Disable argument usage check; arguments are accessed using local().
# Disable argument usage check; arguments are accessed using locals().
# pylint: disable=unused-argument
@staticmethod
def toCloudStorage(image, description='myExportMapTask', bucket=None,
@ -408,7 +466,7 @@ class Export(object):
return _CreateTask(
Task.Type.EXPORT_TABLE, collection, description, config)
# Disable argument usage check; arguments are accessed using local().
# Disable argument usage check; arguments are accessed using locals().
# pylint: disable=unused-argument
@staticmethod
def toCloudStorage(collection, description='myExportTableTask',
@ -539,7 +597,7 @@ class Export(object):
return _CreateTask(
Task.Type.EXPORT_VIDEO, collection, description, config)
# Disable argument usage check; arguments are accessed using local().
# Disable argument usage check; arguments are accessed using locals().
# pylint: disable=unused-argument
@staticmethod
def toCloudStorage(collection, description='myExportVideoTask',
@ -746,5 +804,5 @@ def _ConvertToServerParams(configDict, eeElementKey, destination):
configDict['driveFileNamePrefix'] = configDict.pop('fileNamePrefix')
else:
del configDict['fileNamePrefix']
else:
elif destination is not Task.ExportDestination.ASSET:
raise ee_exception.EEException('Unknown export destination.')

View File

@ -50,6 +50,10 @@ DEFAULT_API_BASE_URL = 'https://earthengine.googleapis.com/api'
# The default base URL for media/tile calls.
DEFAULT_TILE_BASE_URL = 'https://earthengine.googleapis.com/'
# Asset types recognized by create_assets().
ASSET_TYPE_FOLDER = 'Folder'
ASSET_TYPE_IMAGE_COLL = 'ImageCollection'
def initialize(credentials=None, api_base_url=None, tile_base_url=None):
"""Initializes the data module, setting credentials and base URLs.
@ -176,8 +180,9 @@ def getMapId(params):
to map onto 00-FF.
gamma - (comma-separated numbers) Gamma correction
factor (or one per band)
palette - (comma-separated strings) List of CSS-style color
strings (single-band previews only).
palette - (comma-separated strings) A string of comma-separated
CSS-style color strings (single-band previews only). For example,
'FF0000,000000'.
format (string) Either 'jpg' (does not support transparency) or
'png' (supports transparency).
@ -495,7 +500,8 @@ def startProcessing(taskId, params):
taskId: ID for the task (obtained using newTaskId).
params: The object that describes the processing task; only fields
that are common for all processing types are documented below.
type (string) Either 'EXPORT_IMAGE' or 'EXPORT_FEATURES'.
type (string) Either 'EXPORT_IMAGE', 'EXPORT_FEATURES',
'EXPORT_VIDEO', or 'EXPORT_TILES'.
json (string) JSON description of the image.
Returns:
@ -712,17 +718,16 @@ def send_(path, params, opt_method='POST', opt_raw=False):
def create_assets(asset_ids, asset_type, mk_parents):
"""Creates the specified assets if they do not exist."""
asset = {'type': asset_type}
for asset_id in asset_ids:
if getInfo(asset_id):
print 'Asset %s already exists' % asset_id
continue
if mk_parents:
parts = asset_id.split('/')
path = ''
for part in parts:
for part in parts[:-1]:
path += part
if getInfo(path) is None:
createAsset(asset, path)
createAsset({'type': ASSET_TYPE_FOLDER}, path)
path += '/'
elif getInfo(asset_id) is None:
createAsset(asset, asset_id)
else:
print 'Asset %s already exists' % asset_id
createAsset({'type': asset_type}, asset_id)

View File

@ -157,6 +157,39 @@ class BatchTestCase(apitestcase.ApiTestCase):
},
task.config)
def testExportImageToAsset(self):
"""Verifies the Asset export task created by Export.image.toAsset()."""
config = dict(
image=ee.Image(1), assetId='user/foo/bar',
pyramidingPolicy={'B1': 'min'})
# Test keyed parameters.
task_keyed = ee.batch.Export.image.toAsset(
image=config['image'], assetId=config['assetId'],
pyramidingPolicy=config['pyramidingPolicy'])
self.assertEquals('TESTTASKID', task_keyed.id)
self.assertEquals(
{
'type': 'EXPORT_IMAGE',
'state': 'UNSUBMITTED',
'json': config['image'].serialize(),
'description': 'myExportImageTask',
'assetId': config['assetId'],
'pyramidingPolicy': config['pyramidingPolicy']
}, task_keyed.config)
task_ordered = ee.batch.Export.image.toAsset(
config['image'], 'TestDescription', config['assetId'], maxPixels=1000)
self.assertEquals(
{
'type': 'EXPORT_IMAGE',
'state': 'UNSUBMITTED',
'json': config['image'].serialize(),
'description': 'TestDescription',
'assetId': config['assetId'],
'maxPixels': 1000
}, task_ordered.config)
def testExportImageToCloudStorage(self):
"""Verifies the Cloud Storge export task created by Export.image()."""
region = ee.Geometry.Rectangle(1, 2, 3, 4)