mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
222 lines
118 KiB
JavaScript
222 lines
118 KiB
JavaScript
(function(){var h,aa=aa||{},k=this,m=function(a){return void 0!==a},ba=function(){},ca=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=
|
|
typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},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},v=function(a,b){a=a.split(".");var c=k;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&m(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}},x=function(a,b){function c(){}c.prototype=b.prototype;a.j=b.prototype;a.prototype=
|
|
new c;a.prototype.constructor=a;a.Ee=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var y=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,y);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};x(y,Error);y.prototype.name="CustomError";var la;var ma=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")},na=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},va=function(a){if(!oa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(pa,"&"));-1!=a.indexOf("<")&&(a=a.replace(qa,"<"));-1!=a.indexOf(">")&&(a=a.replace(ra,">"));-1!=a.indexOf('"')&&(a=a.replace(sa,"""));-1!=a.indexOf("'")&&
|
|
(a=a.replace(ta,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(ua,"�"));return a},pa=/&/g,qa=/</g,ra=/>/g,sa=/"/g,ta=/'/g,ua=/\x00/g,oa=/[\x00&<>"']/,wa=function(a,b){return a<b?-1:a>b?1:0};var xa=function(a,b){b.unshift(a);y.call(this,ma.apply(null,b));b.shift()};x(xa,y);xa.prototype.name="AssertionError";
|
|
var ya=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 xa(""+e,f||[]);},z=function(a,b,c){a||ya("",null,b,Array.prototype.slice.call(arguments,2));return a},za=function(a,b){throw new xa("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Aa=function(a,b,c){q(a)||ya("Expected number but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2));return a},Ba=function(a,b,c){r(a)||ya("Expected function but got %s: %s.",[ca(a),
|
|
a],b,Array.prototype.slice.call(arguments,2))},Ca=function(a,b,c){t(a)||ya("Expected object but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))},Da=function(a,b,c){n(a)||ya("Expected array but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var Ea=Array.prototype.indexOf?function(a,b,c){z(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},Fa=Array.prototype.lastIndexOf?function(a,b,c){z(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},Ha=Array.prototype.forEach?function(a,b,c){z(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)},Ia=Array.prototype.filter?function(a,b,c){z(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 w=g[l];b.call(c,w,l,a)&&(e[f++]=
|
|
w)}return e},Ja=Array.prototype.map?function(a,b,c){z(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},Ka=Array.prototype.some?function(a,b,c){z(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},La=Array.prototype.every?function(a,b,c){z(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},Ma=function(a,b){var c=0;Ha(a,function(a,e,f){b.call(void 0,a,e,f)&&++c},void 0);return c},Oa=function(a){var b;a:{b=Na;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]},Pa=function(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},
|
|
Ra=function(a,b){b=Ea(a,b);var c;(c=0<=b)&&Qa(a,b);return c},Qa=function(a,b){z(null!=a.length);Array.prototype.splice.call(a,b,1)},Sa=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)},Ta=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[]},Ua=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)}},Va=function(a,b,
|
|
c){z(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},Wa=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 A=function(){this.aa=this.aa;this.Eb=this.Eb};A.prototype.aa=!1;A.prototype.T=function(){this.aa||(this.aa=!0,this.c())};A.prototype.c=function(){if(this.Eb)for(;this.Eb.length;)this.Eb.shift()()};var Xa=function(a){a&&"function"==typeof a.T&&a.T()};var B=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Ja=!1;this.Hd=!0};B.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Hd=!1};var Ya=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},Za=function(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c},$a=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},ab=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},bb=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},db=function(a){var b=cb,c;for(c in b)if(a.call(void 0,b[c],c,b))return c},eb=function(a){for(var b in a)return!1;return!0},fb=function(a,b){b in a&&delete a[b]},
|
|
gb=function(a){var b={},c;for(c in a)b[c]=a[c];return b},hb=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]=hb(a[c]);return b}return a},ib="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),jb=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<ib.length;f++)c=ib[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var kb=function(a){kb[" "](a);return a};kb[" "]=ba;var mb=function(a,b){var c=lb;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var nb;a:{var ob=k.navigator;if(ob){var pb=ob.userAgent;if(pb){nb=pb;break a}}nb=""}var C=function(a){return-1!=nb.indexOf(a)};var qb=C("Opera"),rb=C("Trident")||C("MSIE"),sb=C("Edge"),tb=C("Gecko")&&!(-1!=nb.toLowerCase().indexOf("webkit")&&!C("Edge"))&&!(C("Trident")||C("MSIE"))&&!C("Edge"),ub=-1!=nb.toLowerCase().indexOf("webkit")&&!C("Edge"),vb=function(){var a=k.document;return a?a.documentMode:void 0},wb;
|
|
a:{var xb="",yb=function(){var a=nb;if(tb)return/rv\:([^\);]+)(\)|;)/.exec(a);if(sb)return/Edge\/([\d\.]+)/.exec(a);if(rb)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(ub)return/WebKit\/(\S+)/.exec(a);if(qb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();yb&&(xb=yb?yb[1]:"");if(rb){var zb=vb();if(null!=zb&&zb>parseFloat(xb)){wb=String(zb);break a}}wb=xb}
|
|
var Ab=wb,lb={},Bb=function(a){return mb(a,function(){for(var b=0,c=na(String(Ab)).split("."),d=na(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",l=d[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""];if(0==g[0].length&&0==l[0].length)break;b=wa(0==g[1].length?0:parseInt(g[1],10),0==l[1].length?0:parseInt(l[1],10))||wa(0==g[2].length,0==l[2].length)||wa(g[2],l[2]);g=g[3];l=l[3]}while(0==b)}return 0<=b})},Cb;var Db=k.document;
|
|
Cb=Db&&rb?vb()||("CSS1Compat"==Db.compatMode?parseInt(Ab,10):5):void 0;var Eb=!rb||9<=Number(Cb),Fb=rb&&!Bb("9");!ub||Bb("528");tb&&Bb("1.9b")||rb&&Bb("8")||qb&&Bb("9.5")||ub&&Bb("528");tb&&!Bb("8")||rb&&Bb("9");var Gb=function(a,b){B.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.ia=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;if(b=a.relatedTarget){if(tb){var e;a:{try{kb(b.nodeName);e=
|
|
!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;null===d?(this.offsetX=ub||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=ub||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.key=a.key||"";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.ia=a;a.defaultPrevented&&this.preventDefault()}};x(Gb,B);
|
|
Gb.prototype.preventDefault=function(){Gb.j.preventDefault.call(this);var a=this.ia;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Fb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Hb="closure_listenable_"+(1E6*Math.random()|0),Ib=function(a){return!(!a||!a[Hb])},Jb=0;var Kb=function(a,b,c,d,e){this.listener=a;this.Fb=null;this.src=b;this.type=c;this.capture=!!d;this.ca=e;this.key=++Jb;this.Ka=this.mb=!1},Lb=function(a){a.Ka=!0;a.listener=null;a.Fb=null;a.src=null;a.ca=null};var Mb=function(a){this.src=a;this.D={};this.hb=0};Mb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.D[f];a||(a=this.D[f]=[],this.hb++);var g=Nb(a,b,d,e);-1<g?(b=a[g],c||(b.mb=!1)):(b=new Kb(b,this.src,f,!!d,e),b.mb=c,a.push(b));return b};Mb.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.D))return!1;var e=this.D[a];b=Nb(e,b,c,d);return-1<b?(Lb(e[b]),Qa(e,b),0==e.length&&(delete this.D[a],this.hb--),!0):!1};
|
|
var Ob=function(a,b){var c=b.type;c in a.D&&Ra(a.D[c],b)&&(Lb(b),0==a.D[c].length&&(delete a.D[c],a.hb--))};Mb.prototype.cb=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,Lb(d[e]);delete this.D[c];this.hb--}return b};Mb.prototype.Ua=function(a,b,c,d){a=this.D[a.toString()];var e=-1;a&&(e=Nb(a,b,c,d));return-1<e?a[e]:null};var Nb=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.Ka&&f.listener==b&&f.capture==!!c&&f.ca==d)return e}return-1};var Pb="closure_lm_"+(1E6*Math.random()|0),Qb={},Rb=0,Sb=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)Sb(a,b[f],c,d,e);return null}c=Tb(c);return Ib(a)?a.X(b,c,d,e):Ub(a,b,c,!1,d,e)},Ub=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e,l=Vb(a);l||(a[Pb]=l=new Mb(a));c=l.add(b,c,d,e,f);if(c.Fb)return c;d=Wb();c.Fb=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent(Xb(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
|
|
Rb++;return c},Wb=function(){var a=Yb,b=Eb?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},Zb=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)Zb(a,b[f],c,d,e);return null}c=Tb(c);return Ib(a)?a.bb(b,c,d,e):Ub(a,b,c,!0,d,e)},$b=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)$b(a,b[f],c,d,e);else c=Tb(c),Ib(a)?a.Sb(b,c,d,e):a&&(a=Vb(a))&&(b=a.Ua(b,c,!!d,e))&&ac(b)},ac=function(a){if(!q(a)&&a&&!a.Ka){var b=a.src;if(Ib(b))Ob(b.U,
|
|
a);else{var c=a.type,d=a.Fb;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(Xb(c),d);Rb--;(c=Vb(b))?(Ob(c,a),0==c.hb&&(c.src=null,b[Pb]=null)):Lb(a)}}},Xb=function(a){return a in Qb?Qb[a]:Qb[a]="on"+a},cc=function(a,b,c,d){var e=!0;if(a=Vb(a))if(b=a.D[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.Ka&&(f=bc(f,d),e=e&&!1!==f)}return e},bc=function(a,b){var c=a.listener,d=a.ca||a.src;a.mb&&ac(a);return c.call(d,b)},Yb=function(a,
|
|
b){if(a.Ka)return!0;if(!Eb){if(!b)a:{b=["window","event"];for(var c=k,d;d=b.shift();)if(null!=c[d])c=c[d];else{b=null;break a}b=c}d=b;b=new Gb(d,this);c=!0;if(!(0>d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.Ja&&0<=e;e--){b.currentTarget=d[e];var f=cc(d[e],a,!0,b),c=c&&f}for(e=0;!b.Ja&&e<d.length;e++)b.currentTarget=
|
|
d[e],f=cc(d[e],a,!1,b),c=c&&f}return c}return bc(a,new Gb(b,this))},Vb=function(a){a=a[Pb];return a instanceof Mb?a:null},dc="__closure_events_fn_"+(1E9*Math.random()>>>0),Tb=function(a){z(a,"Listener can not be null.");if(r(a))return a;z(a.handleEvent,"An object listener must have handleEvent method.");a[dc]||(a[dc]=function(b){return a.handleEvent(b)});return a[dc]};var ec=function(a){A.call(this);this.ta=a;this.i={}};x(ec,A);var fc=[];ec.prototype.X=function(a,b,c,d){n(b)||(b&&(fc[0]=b.toString()),b=fc);for(var e=0;e<b.length;e++){var f=Sb(a,b[e],c||this.handleEvent,d||!1,this.ta||this);if(!f)break;this.i[f.key]=f}return this};ec.prototype.bb=function(a,b,c,d){return gc(this,a,b,c,d)};var gc=function(a,b,c,d,e,f){if(n(c))for(var g=0;g<c.length;g++)gc(a,b,c[g],d,e,f);else{b=Zb(b,c,d||a.handleEvent,e,f||a.ta||a);if(!b)return a;a.i[b.key]=b}return a};
|
|
ec.prototype.Sb=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)this.Sb(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.ta||this,c=Tb(c),d=!!d,b=Ib(a)?a.Ua(b,c,d,e):a?(a=Vb(a))?a.Ua(b,c,d,e):null:null,b&&(ac(b),delete this.i[b.key]);return this};ec.prototype.cb=function(){Ya(this.i,function(a,b){this.i.hasOwnProperty(b)&&ac(a)},this);this.i={}};ec.prototype.c=function(){ec.j.c.call(this);this.cb()};
|
|
ec.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var D=function(){A.call(this);this.U=new Mb(this);this.Pd=this;this.Cc=null};x(D,A);D.prototype[Hb]=!0;h=D.prototype;h.addEventListener=function(a,b,c,d){Sb(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){$b(this,a,b,c,d)};
|
|
h.dispatchEvent=function(a){hc(this);var b,c=this.Cc;if(c){b=[];for(var d=1;c;c=c.Cc)b.push(c),z(1E3>++d,"infinite loop")}c=this.Pd;d=a.type||a;if(p(a))a=new B(a,c);else if(a instanceof B)a.target=a.target||c;else{var e=a;a=new B(d,c);jb(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Ja&&0<=g;g--)f=a.currentTarget=b[g],e=ic(f,d,!0,a)&&e;a.Ja||(f=a.currentTarget=c,e=ic(f,d,!0,a)&&e,a.Ja||(e=ic(f,d,!1,a)&&e));if(b)for(g=0;!a.Ja&&g<b.length;g++)f=a.currentTarget=b[g],e=ic(f,d,!1,a)&&e;return e};
|
|
h.c=function(){D.j.c.call(this);this.U&&this.U.cb(void 0);this.Cc=null};h.X=function(a,b,c,d){hc(this);return this.U.add(String(a),b,!1,c,d)};h.bb=function(a,b,c,d){return this.U.add(String(a),b,!0,c,d)};h.Sb=function(a,b,c,d){return this.U.remove(String(a),b,c,d)};var ic=function(a,b,c,d){b=a.U.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.Ka&&g.capture==c){var l=g.listener,w=g.ca||g.src;g.mb&&Ob(a.U,g);e=!1!==l.call(w,d)&&e}}return e&&0!=d.Hd};
|
|
D.prototype.Ua=function(a,b,c,d){return this.U.Ua(String(a),b,c,d)};var hc=function(a){z(a.U,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var jc=function(a,b,c){this.he=c;this.Zd=a;this.te=b;this.Db=0;this.wb=null};jc.prototype.get=function(){var a;0<this.Db?(this.Db--,a=this.wb,this.wb=a.next,a.next=null):a=this.Zd();return a};jc.prototype.put=function(a){this.te(a);this.Db<this.he&&(this.Db++,a.next=this.wb,this.wb=a)};var kc=function(a){return a};var lc=function(a){k.setTimeout(function(){throw a;},0)},mc,nc=function(){var a=k.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!C("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&&!C("Trident")&&!C("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(m(c.next)){c=c.next;var a=c.Zc;c.Zc=null;a()}};return function(a){d.next={Zc: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 oc=function(){this.Ub=this.ya=null},qc=new jc(function(){return new pc},function(a){a.reset()},100);oc.prototype.add=function(a,b){var c=qc.get();c.set(a,b);this.Ub?this.Ub.next=c:(z(!this.ya),this.ya=c);this.Ub=c};oc.prototype.remove=function(){var a=null;this.ya&&(a=this.ya,this.ya=this.ya.next,this.ya||(this.Ub=null),a.next=null);return a};var pc=function(){this.next=this.scope=this.nc=null};pc.prototype.set=function(a,b){this.nc=a;this.scope=b;this.next=null};
|
|
pc.prototype.reset=function(){this.next=this.scope=this.nc=null};var vc=function(a,b){rc||sc();tc||(rc(),tc=!0);uc.add(a,b)},rc,sc=function(){if(-1!=String(k.Promise).indexOf("[native code]")){var a=k.Promise.resolve(void 0);rc=function(){a.then(wc)}}else rc=function(){var a=wc;!r(k.setImmediate)||k.Window&&k.Window.prototype&&!C("Edge")&&k.Window.prototype.setImmediate==k.setImmediate?(mc||(mc=nc()),mc(a)):k.setImmediate(a)}},tc=!1,uc=new oc,wc=function(){for(var a;a=uc.remove();){try{a.nc.call(a.scope)}catch(b){lc(b)}qc.put(a)}tc=!1};var xc=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},yc=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var Bc=function(a,b){this.L=0;this.fa=void 0;this.Ba=this.$=this.m=null;this.ub=this.ic=!1;if(a!=ba)try{var c=this;a.call(b,function(a){zc(c,2,a)},function(a){if(!(a instanceof Ac))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(e){}zc(c,3,a)})}catch(d){zc(this,3,d)}},Cc=function(){this.next=this.context=this.Ha=this.va=this.qa=null;this.lb=!1};Cc.prototype.reset=function(){this.context=this.Ha=this.va=this.qa=null;this.lb=!1};
|
|
var Dc=new jc(function(){return new Cc},function(a){a.reset()},100),Ec=function(a,b,c){var d=Dc.get();d.va=a;d.Ha=b;d.context=c;return d};Bc.prototype.then=function(a,b,c){null!=a&&Ba(a,"opt_onFulfilled should be a function.");null!=b&&Ba(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return Fc(this,r(a)?a:null,r(b)?b:null,c)};xc(Bc);Bc.prototype.cancel=function(a){0==this.L&&vc(function(){var b=new Ac(a);Gc(this,b)},this)};
|
|
var Gc=function(a,b){if(0==a.L)if(a.m){var c=a.m;if(c.$){for(var d=0,e=null,f=null,g=c.$;g&&(g.lb||(d++,g.qa==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.L&&1==d?Gc(c,b):(f?(d=f,z(c.$),z(null!=d),d.next==c.Ba&&(c.Ba=d),d.next=d.next.next):Hc(c),Ic(c,e,3,b)))}a.m=null}else zc(a,3,b)},Kc=function(a,b){a.$||2!=a.L&&3!=a.L||Jc(a);z(null!=b.va);a.Ba?a.Ba.next=b:a.$=b;a.Ba=b},Fc=function(a,b,c,d){var e=Ec(null,null,null);e.qa=new Bc(function(a,g){e.va=b?function(c){try{var e=b.call(d,c);a(e)}catch(Z){g(Z)}}:
|
|
a;e.Ha=c?function(b){try{var e=c.call(d,b);!m(e)&&b instanceof Ac?g(b):a(e)}catch(Z){g(Z)}}:g});e.qa.m=a;Kc(a,e);return e.qa};Bc.prototype.xe=function(a){z(1==this.L);this.L=0;zc(this,2,a)};Bc.prototype.ye=function(a){z(1==this.L);this.L=0;zc(this,3,a)};
|
|
var zc=function(a,b,c){if(0==a.L){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.L=1;var d;a:{var e=c,f=a.xe,g=a.ye;if(e instanceof Bc)null!=f&&Ba(f,"opt_onFulfilled should be a function."),null!=g&&Ba(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),Kc(e,Ec(f||ba,g||null,a)),d=!0;else if(yc(e))e.then(f,g,a),d=!0;else{if(t(e))try{var l=e.then;if(r(l)){Lc(e,l,f,g,a);d=!0;break a}}catch(w){g.call(a,w);d=!0;break a}d=
|
|
!1}}d||(a.fa=c,a.L=b,a.m=null,Jc(a),3!=b||c instanceof Ac||Mc(a,c))}},Lc=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(w){l(w)}},Jc=function(a){a.ic||(a.ic=!0,vc(a.$d,a))},Hc=function(a){var b=null;a.$&&(b=a.$,a.$=b.next,b.next=null);a.$||(a.Ba=null);null!=b&&z(null!=b.va);return b};Bc.prototype.$d=function(){for(var a;a=Hc(this);)Ic(this,a,this.L,this.fa);this.ic=!1};
|
|
var Ic=function(a,b,c,d){if(3==c&&b.Ha&&!b.lb)for(;a&&a.ub;a=a.m)a.ub=!1;if(b.qa)b.qa.m=null,Nc(b,c,d);else try{b.lb?b.va.call(b.context):Nc(b,c,d)}catch(e){Oc.call(null,e)}Dc.put(b)},Nc=function(a,b,c){2==b?a.va.call(a.context,c):a.Ha&&a.Ha.call(a.context,c)},Mc=function(a,b){a.ub=!0;vc(function(){a.ub&&Oc.call(null,b)})},Oc=lc,Ac=function(a){y.call(this,a)};x(Ac,y);Ac.prototype.name="cancel";/*
|
|
Portions of this code are from MochiKit, received by
|
|
The Closure Authors under the MIT license. All other code is Copyright
|
|
2005-2009 The Closure Authors. All Rights Reserved.
|
|
*/
|
|
var Pc=function(a,b){this.Jb=[];this.yd=a;this.cd=b||null;this.Xa=this.Fa=!1;this.fa=void 0;this.Hc=this.Vc=this.$b=!1;this.Rb=0;this.m=null;this.ac=0};Pc.prototype.cancel=function(a){if(this.Fa)this.fa instanceof Pc&&this.fa.cancel();else{if(this.m){var b=this.m;delete this.m;a?b.cancel(a):(b.ac--,0>=b.ac&&b.cancel())}this.yd?this.yd.call(this.cd,this):this.Hc=!0;this.Fa||Qc(this,new Rc)}};Pc.prototype.$c=function(a,b){this.$b=!1;Sc(this,a,b)};
|
|
var Sc=function(a,b,c){a.Fa=!0;a.fa=c;a.Xa=!b;Tc(a)},Vc=function(a){if(a.Fa){if(!a.Hc)throw new Uc;a.Hc=!1}};Pc.prototype.bc=function(a){Vc(this);Wc(a);Sc(this,!0,a)};var Qc=function(a,b){Vc(a);Wc(b);Sc(a,!1,b)},Wc=function(a){z(!(a instanceof Pc),"An execution sequence may not be initiated with a blocking Deferred.")},Xc=function(a,b,c){z(!a.Vc,"Blocking Deferreds can not be re-used");a.Jb.push([b,c,void 0]);a.Fa&&Tc(a)};
|
|
Pc.prototype.then=function(a,b,c){var d,e,f=new Bc(function(a,b){d=a;e=b});Xc(this,d,function(a){a instanceof Rc?f.cancel():e(a)});return f.then(a,b,c)};xc(Pc);
|
|
var Yc=function(a){return Ka(a.Jb,function(a){return r(a[1])})},Tc=function(a){if(a.Rb&&a.Fa&&Yc(a)){var b=a.Rb,c=Zc[b];c&&(k.clearTimeout(c.da),delete Zc[b]);a.Rb=0}a.m&&(a.m.ac--,delete a.m);for(var b=a.fa,d=c=!1;a.Jb.length&&!a.$b;){var e=a.Jb.shift(),f=e[0],g=e[1],e=e[2];if(f=a.Xa?g:f)try{var l=f.call(e||a.cd,b);m(l)&&(a.Xa=a.Xa&&(l==b||l instanceof Error),a.fa=b=l);if(yc(b)||"function"===typeof k.Promise&&b instanceof k.Promise)d=!0,a.$b=!0}catch(w){b=w,a.Xa=!0,Yc(a)||(c=!0)}}a.fa=b;d&&(l=u(a.$c,
|
|
a,!0),d=u(a.$c,a,!1),b instanceof Pc?(Xc(b,l,d),b.Vc=!0):b.then(l,d));c&&(b=new $c(b),Zc[b.da]=b,a.Rb=b.da)},Uc=function(){y.call(this)};x(Uc,y);Uc.prototype.message="Deferred has already fired";Uc.prototype.name="AlreadyCalledError";var Rc=function(){y.call(this)};x(Rc,y);Rc.prototype.message="Deferred was canceled";Rc.prototype.name="CanceledError";var $c=function(a){this.da=k.setTimeout(u(this.we,this),0);this.qb=a};
|
|
$c.prototype.we=function(){z(Zc[this.da],"Cannot throw an error that is not scheduled.");delete Zc[this.da];throw this.qb;};var Zc={};var bd=function(a,b){m(a.name)?(this.name=a.name,this.code=cb[a.name]):(this.code=a.code,this.name=ad(a.code));y.call(this,ma("%s %s",this.name,b))};x(bd,y);var ad=function(a){var b=db(function(b){return a==b});if(!m(b))throw Error("Invalid code: "+a);return b},cb={AbortError:3,EncodingError:5,InvalidModificationError:9,InvalidStateError:7,NotFoundError:1,NotReadableError:4,NoModificationAllowedError:6,PathExistsError:12,QuotaExceededError:10,SecurityError:2,SyntaxError:8,TypeMismatchError:11};var cd=function(a,b){B.call(this,a.type,b);this.ia=a};x(cd,B);var dd=function(){D.call(this);this.K=new FileReader;this.K.onloadstart=u(this.Da,this);this.K.onprogress=u(this.Da,this);this.K.onload=u(this.Da,this);this.K.onabort=u(this.Da,this);this.K.onerror=u(this.Da,this);this.K.onloadend=u(this.Da,this)};x(dd,D);h=dd.prototype;h.abort=function(){try{this.K.abort()}catch(a){throw new bd(a,"aborting read");}};h.ja=function(){return this.K.readyState};h.Da=function(a){this.dispatchEvent(new cd(a,this))};h.c=function(){dd.j.c.call(this);delete this.K};
|
|
h.readAsArrayBuffer=function(a){this.K.readAsArrayBuffer(a)};h.readAsText=function(a,b){this.K.readAsText(a,b)};var fd=function(){this.Dc="";this.Od=ed};fd.prototype.toString=function(){return"TrustedResourceUrl{"+this.Dc+"}"};var ed={};var gd="StopIteration"in k?k.StopIteration:{message:"StopIteration",stack:""},hd=function(){};hd.prototype.next=function(){throw gd;};hd.prototype.za=function(){return this};
|
|
var id=function(a){if(a instanceof hd)return a;if("function"==typeof a.za)return a.za(!1);if(ea(a)){var b=0,c=new hd;c.next=function(){for(;;){if(b>=a.length)throw gd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},jd=function(a,b){if(ea(a))try{Ha(a,b,void 0)}catch(c){if(c!==gd)throw c;}else{a=id(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==gd)throw c;}}};var kd=function(a,b){this.u={};this.i=[];this.ib=this.h=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=kd.prototype;h.B=function(){return this.h};h.s=function(){ld(this);for(var a=[],b=0;b<this.i.length;b++)a.push(this.u[this.i[b]]);return a};h.P=function(){ld(this);return this.i.concat()};h.ha=function(a){return md(this.u,a)};h.isEmpty=function(){return 0==this.h};
|
|
h.clear=function(){this.u={};this.ib=this.h=this.i.length=0};h.remove=function(a){return md(this.u,a)?(delete this.u[a],this.h--,this.ib++,this.i.length>2*this.h&&ld(this),!0):!1};var ld=function(a){if(a.h!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];md(a.u,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.h!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],md(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}};h=kd.prototype;h.get=function(a,b){return md(this.u,a)?this.u[a]:b};
|
|
h.set=function(a,b){md(this.u,a)||(this.h++,this.i.push(a),this.ib++);this.u[a]=b};h.addAll=function(a){var b;a instanceof kd?(b=a.P(),a=a.s()):(b=bb(a),a=ab(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.P(),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 kd(this)};
|
|
h.za=function(a){ld(this);var b=0,c=this.ib,d=this,e=new hd;e.next=function(){if(c!=d.ib)throw Error("The map has changed since the iterator was created");if(b>=d.i.length)throw gd;var e=d.i[b++];return a?e:d.u[e]};return e};var md=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var nd=function(a){if(a.s&&"function"==typeof a.s)return a.s();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 ab(a)},od=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if(ea(a)||p(a))Ha(a,b,void 0);else{var c;if(a.P&&"function"==typeof a.P)c=a.P();else if(a.s&&"function"==typeof a.s)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=bb(a);for(var d=nd(a),e=d.length,f=0;f<e;f++)b.call(void 0,
|
|
d[f],c&&c[f],a)}};var pd=function(a){this.u=new kd;a&&this.addAll(a)},qd=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[fa]||(a[fa]=++ga)):b.substr(0,1)+a};h=pd.prototype;h.B=function(){return this.u.B()};h.add=function(a){this.u.set(qd(a),a)};h.addAll=function(a){a=nd(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};h.cb=function(a){a=nd(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};h.remove=function(a){return this.u.remove(qd(a))};h.clear=function(){this.u.clear()};h.isEmpty=function(){return this.u.isEmpty()};
|
|
h.contains=function(a){return this.u.ha(qd(a))};var rd=function(a,b){var c=new pd;b=nd(b);for(var d=0;d<b.length;d++){var e=b[d];a.contains(e)&&c.add(e)}return c},sd=function(a,b){a=a.clone();a.cb(b);return a};pd.prototype.s=function(){return this.u.s()};pd.prototype.clone=function(){return new pd(this)};pd.prototype.za=function(){return this.u.za(!1)};var td=function(a,b,c,d,e){this.reset(a,b,c,d,e)};td.prototype.fd=null;var ud=0;td.prototype.reset=function(a,b,c,d,e){"number"==typeof e||ud++;d||ka();this.ab=a;this.me=b;delete this.fd};td.prototype.Kd=function(a){this.ab=a};var vd=function(a){this.ne=a;this.od=this.cc=this.ab=this.m=null},wd=function(a,b){this.name=a;this.value=b};wd.prototype.toString=function(){return this.name};var xd=new wd("SEVERE",1E3),yd=new wd("CONFIG",700),zd=new wd("FINE",500);vd.prototype.getParent=function(){return this.m};vd.prototype.ld=function(){this.cc||(this.cc={});return this.cc};vd.prototype.Kd=function(a){this.ab=a};var Ad=function(a){if(a.ab)return a.ab;if(a.m)return Ad(a.m);za("Root logger has no level set.");return null};
|
|
vd.prototype.log=function(a,b,c){if(a.value>=Ad(this).value)for(r(b)&&(b=b()),a=new td(a,String(b),this.ne),c&&(a.fd=c),c="log:"+a.me,k.console&&(k.console.timeStamp?k.console.timeStamp(c):k.console.markTimeline&&k.console.markTimeline(c)),k.msWriteProfilerMark&&k.msWriteProfilerMark(c),c=this;c;){var d=c,e=a;if(d.od)for(var f=0;b=d.od[f];f++)b(e);c=c.getParent()}};
|
|
var Bd={},Cd=null,Dd=function(a){Cd||(Cd=new vd(""),Bd[""]=Cd,Cd.Kd(yd));var b;if(!(b=Bd[a])){b=new vd(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Dd(a.substr(0,c));c.ld()[d]=b;b.m=c;Bd[a]=b}return b};var Ed=function(a,b){a&&a.log(zd,b,void 0)};var Fd=function(a){return/^\s*$/.test(a)?!1:/^[\],:{}\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,""))},Gd=function(a){a=String(a);if(Fd(a))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},Hd=function(a){try{return eval("("+a+")")}catch(b){throw b;}},Jd=function(a){return(new Id(void 0)).v(a)},
|
|
Id=function(a){this.Hb=a};Id.prototype.v=function(a){var b=[];Kd(this,a,b);return b.join("")};
|
|
var Kd=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],Kd(a,a.Hb?a.Hb.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),Ld(d,c),c.push(":"),Kd(a,a.Hb?a.Hb.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":Ld(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);}}},Md={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Nd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,Ld=function(a,b){b.push('"',a.replace(Nd,function(a){var b=Md[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),
|
|
Md[a]=b);return b}),'"')};var Od=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 Pd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,Qd=function(a,b){if(a){a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),e,f=null;0<=d?(e=a[c].substring(0,d),f=a[c].substring(d+1)):e=a[c];b(e,f?decodeURIComponent(f.replace(/\+/g," ")):"")}}};var Rd=function(){};Rd.prototype.Yc=null;Rd.prototype.Wa=function(){var a;(a=this.Yc)||(a={},Sd(this)&&(a[0]=!0,a[1]=!0),a=this.Yc=a);return a};var Td=function(a,b){this.ze=a;this.qe=b};x(Td,Rd);Td.prototype.dc=function(){return this.ze()};Td.prototype.Wa=function(){return this.qe()};var Ud=function(){return Ud.gd.dc()};Ud.Nd=!1;Ud.Wa=function(){return Ud.gd.Wa()};Ud.Ge=function(a,b){Ud.Jd(new Td(z(a),z(b)))};Ud.Jd=function(a){Ud.gd=a};var Vd=function(){};x(Vd,Rd);Vd.prototype.dc=function(){var a=Sd(this);return a?new ActiveXObject(a):new XMLHttpRequest};
|
|
var Sd=function(a){if(Ud.Nd)return"";if(!a.pd&&"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.pd=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.pd};Ud.Jd(new Vd);var E=function(a){D.call(this);this.headers=new kd;this.Wb=a||null;this.N=!1;this.Vb=this.a=null;this.$a=this.ud=this.Ab="";this.ua=this.sc=this.yb=this.hc=!1;this.Oa=0;this.Mb=null;this.Ma="";this.Tb=this.re=this.Md=!1};x(E,D);var Wd=E.prototype,Xd=Dd("goog.net.XhrIo");Wd.G=Xd;var Yd=/^https?$/i,Zd=["POST","PUT"],$d=[];E.prototype.Wd=function(){this.T();Ra($d,this)};
|
|
E.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Ab+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Ab=a;this.$a="";this.ud=b;this.hc=!1;this.N=!0;this.a=this.Wb?this.Wb.dc():Ud();this.Vb=this.Wb?this.Wb.Wa():Ud.Wa();this.a.onreadystatechange=u(this.Bd,this);this.re&&"onprogress"in this.a&&(this.a.onprogress=u(function(a){this.Ad(a,!0)},this),this.a.upload&&(this.a.upload.onprogress=u(this.Ad,this)));try{Ed(this.G,ae(this,"Opening Xhr")),
|
|
this.sc=!0,this.a.open(b,String(a),!0),this.sc=!1}catch(f){Ed(this.G,ae(this,"Error opening Xhr: "+f.message));this.qb(5,f);return}a=c||"";var e=this.headers.clone();d&&od(d,function(a,b){e.set(b,a)});d=Oa(e.P());c=k.FormData&&a instanceof k.FormData;!(0<=Ea(Zd,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.Ma&&(this.a.responseType=this.Ma);"withCredentials"in this.a&&this.a.withCredentials!==this.Md&&
|
|
(this.a.withCredentials=this.Md);try{be(this),0<this.Oa&&(this.Tb=ce(this.a),Ed(this.G,ae(this,"Will abort after "+this.Oa+"ms if incomplete, xhr2 "+this.Tb)),this.Tb?(this.a.timeout=this.Oa,this.a.ontimeout=u(this.fb,this)):this.Mb=Od(this.fb,this.Oa,this)),Ed(this.G,ae(this,"Sending request")),this.yb=!0,this.a.send(a),this.yb=!1}catch(f){Ed(this.G,ae(this,"Send error: "+f.message)),this.qb(5,f)}};
|
|
var ce=function(a){return rb&&Bb(9)&&q(a.timeout)&&m(a.ontimeout)},Na=function(a){return"content-type"==a.toLowerCase()};E.prototype.fb=function(){"undefined"!=typeof aa&&this.a&&(this.$a="Timed out after "+this.Oa+"ms, aborting",Ed(this.G,ae(this,this.$a)),this.dispatchEvent("timeout"),this.abort(8))};E.prototype.qb=function(a,b){this.N=!1;this.a&&(this.ua=!0,this.a.abort(),this.ua=!1);this.$a=b;de(this);fe(this)};var de=function(a){a.hc||(a.hc=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
|
|
E.prototype.abort=function(){this.a&&this.N&&(Ed(this.G,ae(this,"Aborting")),this.N=!1,this.ua=!0,this.a.abort(),this.ua=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),fe(this))};E.prototype.c=function(){this.a&&(this.N&&(this.N=!1,this.ua=!0,this.a.abort(),this.ua=!1),fe(this,!0));E.j.c.call(this)};E.prototype.Bd=function(){this.aa||(this.sc||this.yb||this.ua?ge(this):this.oe())};E.prototype.oe=function(){ge(this)};
|
|
var ge=function(a){if(a.N&&"undefined"!=typeof aa)if(a.Vb[1]&&4==a.ja()&&2==a.getStatus())Ed(a.G,ae(a,"Local request error detected and ignored"));else if(a.yb&&4==a.ja())Od(a.Bd,0,a);else if(a.dispatchEvent("readystatechange"),4==a.ja()){Ed(a.G,ae(a,"Request complete"));a.N=!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.Ab).match(Pd)[1]||null;if(!f&&k.self&&k.self.location)var g=
|
|
k.self.location.protocol,f=g.substr(0,g.length-1);e=!Yd.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var l;try{l=2<a.ja()?a.a.statusText:""}catch(w){Ed(a.G,"Can not get status: "+w.message),l=""}a.$a=l+" ["+a.getStatus()+"]";de(a)}}finally{fe(a)}}};
|
|
E.prototype.Ad=function(a,b){z("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(he(a,"progress"));this.dispatchEvent(he(a,b?"downloadprogress":"uploadprogress"))};
|
|
var he=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},fe=function(a,b){if(a.a){be(a);var c=a.a,d=a.Vb[0]?ba:null;a.a=null;a.Vb=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(a=a.G)&&a.log(xd,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},be=function(a){a.a&&a.Tb&&(a.a.ontimeout=null);q(a.Mb)&&(k.clearTimeout(a.Mb),a.Mb=null)};E.prototype.rd=function(){return!!this.a};
|
|
E.prototype.ja=function(){return this.a?this.a.readyState:0};E.prototype.getStatus=function(){try{return 2<this.ja()?this.a.status:-1}catch(a){return-1}};
|
|
var ie=function(a){try{if(!a.a)return null;if("response"in a.a)return a.a.response;switch(a.Ma){case "":case "text":return a.a.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.a)return a.a.mozResponseArrayBuffer}var b=a.G;b&&b.log(xd,"Response type "+a.Ma+" is not supported on this browser",void 0);return null}catch(c){return Ed(a.G,"Can not get response: "+c.message),null}};
|
|
E.prototype.getResponseHeader=function(a){if(this.a&&4==this.ja())return a=this.a.getResponseHeader(a),null===a?void 0:a};E.prototype.getAllResponseHeaders=function(){return this.a&&4==this.ja()?this.a.getAllResponseHeaders():""};
|
|
var je=function(a){var b={};a=a.getAllResponseHeaders().split("\r\n");for(var c=0;c<a.length;c++)if(!/^[\s\xa0]*$/.test(a[c])){var d;d=2;for(var e=a[c].split(": "),f=[];0<d&&e.length;)f.push(e.shift()),d--;e.length&&f.push(e.join(": "));d=f;b[d[0]]=b[d[0]]?b[d[0]]+(", "+d[1]):d[1]}return b},ae=function(a,b){return b+" ["+a.ud+" "+a.Ab+" "+a.getStatus()+"]"};var ke=!rb||9<=Number(Cb),le=!tb&&!rb||rb&&9<=Number(Cb)||tb&&Bb("1.9.1");rb&&Bb("9");var ne=function(a,b){Ya(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:me.hasOwnProperty(d)?a.setAttribute(me[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},me={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"},pe=function(a,
|
|
b,c){return oe(document,arguments)},oe=function(a,b){var c=String(b[0]),d=b[1];if(!ke&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',va(d.name),'"');if(d.type){c.push(' type="',va(d.type),'"');var e={};jb(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(" "):ne(c,d));2<b.length&&qe(a,c,b);return c},qe=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):Ha(re(f)?Ta(f):f,d)}},se=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},te=function(a){z(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},re=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},ue=function(a){this.ob=a||k.document||document};h=ue.prototype;h.getElementsByTagName=function(a,b){return(b||this.ob).getElementsByTagName(String(a))};
|
|
h.Yd=function(a,b,c){return oe(this.ob,arguments)};h.createElement=function(a){return this.ob.createElement(String(a))};h.createTextNode=function(a){return this.ob.createTextNode(String(a))};h.appendChild=function(a,b){a.appendChild(b)};h.ld=function(a){return le&&void 0!=a.children?a.children:Ia(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};var ve=function(a,b){z(a);a=a.style;"opacity"in a?a.opacity=b:"MozOpacity"in a?a.MozOpacity=b:"filter"in a&&(a.filter=""===b?"":"alpha(opacity="+100*Number(b)+")")};var we=function(a,b){D.call(this);b=b||{};this.minZoom=b.minZoom||0;this.maxZoom=b.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=b.tileSize||new google.maps.Size(256,256);this.zb="isPng"in b?b.zb:!0;this.name=b.name;this.opacity="opacity"in b?b.opacity:1;this.oa=new kd;this.na=0;this.Lc=a;this.ca=new ec(this);this.alt=this.radius=this.projection=void 0};x(we,D);v("ee.layers.AbstractOverlay",we);
|
|
we.prototype.Yb=function(a){return Sb(this,"tile-load",a)};we.prototype.addTileCallback=we.prototype.Yb;we.prototype.Fc=function(a){ac(a)};we.prototype.removeTileCallback=we.prototype.Fc;h=we.prototype;h.oc=function(){return xe(this,"loading")+xe(this,"new")};h.setOpacity=function(a){this.opacity=a;this.oa.forEach(function(a){ve(a.H,this.opacity)},this)};
|
|
h.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||0>a.y||a.y>=d)return c.createElement("div");var e=a.x%d;0>e&&(e+=d);d=new google.maps.Point(e,a.y);a=[[a.x,a.y,b,this.na].join("-"),this.Lc.nd()].join("-");var f=this.bd(d,b,c,a);f.tileSize=this.tileSize;ve(f.H,this.opacity);this.oa.set(a,f);this.ca.X(f,"status-changed",function(){"loaded"==f.getStatus()&&this.dispatchEvent(new ye(this.oc()));"failed"==f.getStatus()&&this.dispatchEvent(new ze)});this.Lc.vd(f,(new Date).getTime()/1E3);return f.H};
|
|
h.releaseTile=function(a){var b=this.oa.get(a.id);this.oa.remove(a.id);b&&(b.abort(),Xa(b))};h.c=function(){we.j.c.call(this);this.oa.forEach(Xa);this.oa.clear();this.oa=null;Xa(this.ca);this.Lc=this.ca=null};var xe=function(a,b){return Ma(a.oa.s(),function(a){return a.getStatus()==b})},ye=function(){B.call(this,"tile-load")};x(ye,B);var ze=function(){B.call(this,"tile-fail")};x(ze,B);
|
|
var Ae=function(a,b,c,d){D.call(this);this.Ca=a;this.zoom=b;this.H=c.createElement("div");this.H.id=d;this.ke=1;this.Gb=function(){};this.Ic="new";this.Gd=0;this.wc=!1};x(Ae,D);
|
|
var Ce=function(a){if(!a.wc&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");Be(a,"loading");a.Z=new E;a.Z.Ma="blob";a.Z.X("complete",function(){var a=ie(this.Z);if(200<=this.Z.getStatus()&&300>this.Z.getStatus())this.ue=je(this.Z),this.Ld=a,this.Ta();else if(a){var c=new dd;c.X("loadend",function(){this.eb(c.K.result)},void 0,this);c.readAsText(a)}else this.eb("Failed to load tile.")},!1,a);a.Z.bb("ready",ja(Xa,a.Z));a.Z.send(a.Lb,
|
|
"GET")};h=Ae.prototype;h.Ta=function(){this.Gb(this);Be(this,"loaded")};h.Ra=function(){Xa(this.Z)};h.eb=function(){this.Gd>=this.ke?Be(this,"failed"):(this.Gd++,this.wc=!0,this.Ra(),Ce(this),this.wc=!1)};h.abort=function(){this.Ra();Be(this,"aborted")};h.getStatus=function(){return this.Ic};var Be=function(a,b){a.Ic=b;a.dispatchEvent("status-changed")},De={aborted:!0,failed:!0,loaded:!0};Ae.prototype.c=function(){Ae.j.c.call(this);this.Ra();this.H.remove();this.Gb=null};var Ee=function(){A.call(this)};x(Ee,A);var Fe=function(a,b){we.call(this,a,b);this.Xc=new kd;this.ed=new kd};x(Fe,we);v("ee.layers.BinaryOverlay",Fe);Fe.prototype.bd=function(a,b,c,d){var e=new Ge(a,b,c,d);this.ca.X(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.Xc.set(a,new Float32Array(e.Td)),this.ed.set(a,e.H))});return e};Fe.prototype.c=function(){Fe.j.c.call(this);this.ed=this.Xc=null};var Ge=function(a,b,c,d){Ae.call(this,a,b,c,d)};x(Ge,Ae);
|
|
Ge.prototype.Ta=function(){var a=new dd;a.X("loadend",function(){this.Td=a.K.result;Ae.prototype.Ta.call(this)},void 0,this);a.readAsArrayBuffer(this.Ld)};var He=function(a){for(var b=arguments[0],c=1;c<arguments.length;c++){var d=arguments[c];if(0==d.lastIndexOf("/",0))b=d;else{var e;(e=""==b)||(e=b.length-1,e=0<=e&&b.indexOf("/",e)==e);b=e?b+d:b+("/"+d)}}return b};var Ie=function(a,b,c,d){A.call(this);this.Wc=a;this.ea=b;this.Kc=d||"";this.Cb=c};x(Ie,Ee);v("ee.layers.CloudStorageTileSource",Ie);Ie.prototype.vd=function(a){if(a.zoom<=this.Cb)a.Lb=this.tb(a.Ca,a.zoom);else{var b=a.zoom-this.Cb,c=Math.pow(2,b),c=new google.maps.Point(Math.floor(a.Ca.x/c),Math.floor(a.Ca.y/c));a.Lb=this.tb(c,a.zoom-b);a.Gb=ja(Je,this.Cb)}var d=u(a.eb,a);a.eb=u(function(b){b&&-1!=b.indexOf("The specified key does not exist.")?Be(a,"loaded"):d(b)},a);Ce(a)};
|
|
Ie.prototype.nd=function(){return[this.Wc,this.ea,this.Cb,this.Kc].join("-")};Ie.prototype.tb=function(a,b){a=He("https://storage.googleapis.com",this.Wc,this.ea,String(b),String(a.x),String(a.y));this.Kc&&(a+=this.Kc);return a};
|
|
var Je=function(a,b){if(!b.xb)throw Error("Tile must have an image element to be rendered.");a=Math.pow(2,b.zoom-a);var c=b.tileSize.width,d=b.H.ownerDocument.createElement("canvas");d.setAttribute("width",c);d.setAttribute("height",c);b.H.appendChild(d);d=d.getContext("2d");d.imageSmoothingEnabled=!1;d.mozImageSmoothingEnabled=!1;d.webkitImageSmoothingEnabled=!1;d.drawImage(b.xb,c/a*(b.Ca.x%a),c/a*(b.Ca.y%a),c/a,c/a,0,0,c,c)};var Ke=function(a,b,c){A.call(this);this.ie=null!=c?u(a,c):a;this.fe=b;this.Ud=u(this.pe,this);this.Zb=[]};x(Ke,A);h=Ke.prototype;h.Kb=!1;h.Cd=0;h.Pa=null;h.mc=function(a){this.Zb=arguments;this.Pa||this.Cd?this.Kb=!0:Le(this)};h.stop=function(){this.Pa&&(k.clearTimeout(this.Pa),this.Pa=null,this.Kb=!1,this.Zb=[])};h.c=function(){Ke.j.c.call(this);this.stop()};h.pe=function(){this.Pa=null;this.Kb&&!this.Cd&&(this.Kb=!1,Le(this))};var Le=function(a){a.Pa=Od(a.Ud,a.fe);a.ie.apply(null,a.Zb)};var Ne=function(a){var b=new fd;b.Dc=a;Me(b)},Me=function(a){var b={},c=b.document||document,d;a instanceof fd&&a.constructor===fd&&a.Od===ed?d=a.Dc:(za("expected object of type TrustedResourceUrl, got '"+a+"' of type "+ca(a)),d="type_error:TrustedResourceUrl");var e=document.createElement("SCRIPT");a={Id:e,fb:void 0};var f=new Pc(Oe,a),g=null,l=null!=b.timeout?b.timeout:5E3;0<l&&(g=window.setTimeout(function(){Pe(e,!0);Qc(f,new Qe(1,"Timeout reached for loading script "+d))},l),a.fb=g);e.onload=
|
|
e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(Pe(e,b.Fe||!1,g),f.bc(null))};e.onerror=function(){Pe(e,!0,g);Qc(f,new Qe(0,"Error while loading script "+d))};a=b.attributes||{};jb(a,{type:"text/javascript",charset:"UTF-8",src:d});ne(e,a);Re(c).appendChild(e)},Re=function(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&0!=b.length?b[0]:a.documentElement},Oe=function(){if(this&&this.Id){var a=this.Id;a&&"SCRIPT"==a.tagName&&Pe(a,!0,this.fb)}},
|
|
Pe=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)},Qe=function(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);y.call(this,c);this.code=a};x(Qe,y);var Se=function(a,b){this.ba=this.xa=this.la="";this.Ia=null;this.ra=this.ea="";this.M=this.ge=!1;var c;a instanceof Se?(this.M=m(b)?b:a.M,Te(this,a.la),c=a.xa,Ue(this),this.xa=c,c=a.ba,Ue(this),this.ba=c,Ve(this,a.Ia),this.setPath(a.getPath()),We(this,a.Y.clone()),a=a.ra,Ue(this),this.ra=a):a&&(c=String(a).match(Pd))?(this.M=!!b,Te(this,c[1]||"",!0),a=c[2]||"",Ue(this),this.xa=Xe(a),a=c[3]||"",Ue(this),this.ba=Xe(a,!0),Ve(this,c[4]),this.setPath(c[5]||"",!0),We(this,c[6]||"",!0),a=c[7]||"",Ue(this),
|
|
this.ra=Xe(a)):(this.M=!!b,this.Y=new Ye(null,0,this.M))};
|
|
Se.prototype.toString=function(){var a=[],b=this.la;b&&a.push(Ze(b,$e,!0),":");var c=this.ba;if(c||"file"==b)a.push("//"),(b=this.xa)&&a.push(Ze(b,$e,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.Ia,null!=c&&a.push(":",String(c));if(c=this.getPath())this.ba&&"/"!=c.charAt(0)&&a.push("/"),a.push(Ze(c,"/"==c.charAt(0)?af:bf,!0));(c=this.Y.toString())&&a.push("?",c);(c=this.ra)&&a.push("#",Ze(c,cf));return a.join("")};
|
|
Se.prototype.resolve=function(a){var b=this.clone(),c=!!a.la;c?Te(b,a.la):c=!!a.xa;if(c){var d=a.xa;Ue(b);b.xa=d}else c=!!a.ba;c?(d=a.ba,Ue(b),b.ba=d):c=null!=a.Ia;d=a.getPath();if(c)Ve(b,a.Ia);else if(c=!!a.ea){if("/"!=d.charAt(0))if(this.ba&&!this.ea)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.Y.toString();c?We(b,a.Y.clone()):c=!!a.ra;c&&(a=a.ra,Ue(b),b.ra=a);return b};Se.prototype.clone=function(){return new Se(this)};var Te=function(a,b,c){Ue(a);a.la=c?Xe(b,!0):b;a.la&&(a.la=a.la.replace(/:$/,""))},Ve=function(a,b){Ue(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ia=b}else a.Ia=null};
|
|
Se.prototype.getPath=function(){return this.ea};Se.prototype.setPath=function(a,b){Ue(this);this.ea=b?Xe(a,!0):a;return this};var We=function(a,b,c){Ue(a);b instanceof Ye?(a.Y=b,a.Y.Gc(a.M)):(c||(b=Ze(b,df)),a.Y=new Ye(b,0,a.M))},Ue=function(a){if(a.ge)throw Error("Tried to modify a read-only Uri");};Se.prototype.Gc=function(a){this.M=a;this.Y&&this.Y.Gc(a);return this};
|
|
var ef=function(a){return a instanceof Se?a.clone():new Se(a,void 0)},Xe=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},Ze=function(a,b,c){return p(a)?(a=encodeURI(a).replace(b,ff),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},ff=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},$e=/[#\/\?@]/g,bf=/[\#\?:]/g,af=/[\#\?]/g,df=/[\#\?@]/g,cf=/#/g,Ye=function(a,b,c){this.h=this.l=null;this.I=a||null;this.M=!!c},gf=function(a){a.l||
|
|
(a.l=new kd,a.h=0,a.I&&Qd(a.I,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=Ye.prototype;h.B=function(){gf(this);return this.h};h.add=function(a,b){gf(this);this.I=null;a=hf(this,a);var c=this.l.get(a);c||this.l.set(a,c=[]);c.push(b);this.h=Aa(this.h)+1;return this};h.remove=function(a){gf(this);a=hf(this,a);return this.l.ha(a)?(this.I=null,this.h=Aa(this.h)-this.l.get(a).length,this.l.remove(a)):!1};h.clear=function(){this.l=this.I=null;this.h=0};
|
|
h.isEmpty=function(){gf(this);return 0==this.h};h.ha=function(a){gf(this);a=hf(this,a);return this.l.ha(a)};h.P=function(){gf(this);for(var a=this.l.s(),b=this.l.P(),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.s=function(a){gf(this);var b=[];if(p(a))this.ha(a)&&(b=Sa(b,this.l.get(hf(this,a))));else{a=this.l.s();for(var c=0;c<a.length;c++)b=Sa(b,a[c])}return b};
|
|
h.set=function(a,b){gf(this);this.I=null;a=hf(this,a);this.ha(a)&&(this.h=Aa(this.h)-this.l.get(a).length);this.l.set(a,[b]);this.h=Aa(this.h)+1;return this};h.get=function(a,b){a=a?this.s(a):[];return 0<a.length?String(a[0]):b};h.setValues=function(a,b){this.remove(a);0<b.length&&(this.I=null,this.l.set(hf(this,a),Ta(b)),this.h=Aa(this.h)+b.length)};
|
|
h.toString=function(){if(this.I)return this.I;if(!this.l)return"";for(var a=[],b=this.l.P(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.s(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.I=a.join("&")};h.clone=function(){var a=new Ye;a.I=this.I;this.l&&(a.l=this.l.clone(),a.h=this.h);return a};var hf=function(a,b){b=String(b);a.M&&(b=b.toLowerCase());return b};
|
|
Ye.prototype.Gc=function(a){a&&!this.M&&(gf(this),this.I=null,this.l.forEach(function(a,c){var b=c.toLowerCase();c!=b&&(this.remove(c),this.setValues(b,a))},this));this.M=a};var pf=function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];d&&(Ua(f,d),Wa(f));jf=a;kf=f;null===a?lf=null:mf(function(){nf(b,c,e||ja(of,b,c))})};v("ee.data.authenticate",pf);var of=function(a,b){k.gapi.auth.authorize({client_id:jf,immediate:!1,scope:kf.join(" ")},ja(qf,a,b))};v("ee.data.authenticateViaPopup",of);
|
|
var rf=function(a,b,c,d,e,f,g){var l=["https://www.googleapis.com/auth/earthengine"];e&&(Ua(l,e),Wa(l));jf=a;kf=l;var w={token_type:b,access_token:c,state:l.join(" "),expires_in:d};qf(void 0,void 0,w);!1===g?f&&f():mf(function(){k.gapi.auth.setToken(w);f&&f()})};v("ee.data.setAuthToken",rf);var nf=function(a,b,c){sf&&jf&&sf({client_id:String(jf),immediate:!0,scope:kf.join(" ")},function(d){"immediate_failed"==d.error&&c?c():qf(a,b,d)})},tf=function(a){sf=a};v("ee.data.setAuthTokenRefresher",tf);
|
|
var wf=function(){uf&&0<=ka()-uf&&vf();return lf};v("ee.data.getAuthToken",wf);var vf=function(){uf=lf=null};v("ee.data.clearAuthToken",vf);var xf=function(){return jf};v("ee.data.getAuthClientId",xf);var yf=function(){return kf};v("ee.data.getAuthScopes",yf);var Df=function(a,b,c){null!=a?zf=a:Af||(zf="https://earthengine.googleapis.com/api");null!=b?Bf=b:Af||(Bf="https://earthengine.googleapis.com");m(c)&&(Cf=c);Af=!0},Ff=function(a){Ef=a};v("ee.data.setDeadline",Ff);
|
|
v("ee.data.setParamAugmenter",function(a){Gf=a||kc});var Hf=function(){return zf};v("ee.data.getApiBaseUrl",Hf);var If=function(){return Bf};v("ee.data.getTileBaseUrl",If);var Jf=function(){return Cf};v("ee.data.getXsrfToken",Jf);var Kf=function(a,b){a=gb(a);return F("/mapid",G(a),b)};v("ee.data.getMapId",Kf);var Lf=function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[Bf,"map",a.mapid,d,b,c].join("/")+"?token="+a.token};v("ee.data.getTileUrl",Lf);
|
|
var Mf=function(a,b){a=gb(a);return F("/value",G(a),b)};v("ee.data.getValue",Mf);var Nf=function(a,b){a=gb(a);n(a.dimensions)&&(a.dimensions=a.dimensions.join("x"));a=G(a).add("getid","1");return F("/thumb",a,b)};v("ee.data.getThumbId",Nf);var Of=function(a){return Bf+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};v("ee.data.makeThumbUrl",Of);var Pf=function(a,b){a=gb(a);return F("/download",G(a),b)};v("ee.data.getDownloadId",Pf);
|
|
var Qf=function(a){return Bf+"/api/download?docid="+a.docid+"&token="+a.token};v("ee.data.makeDownloadUrl",Qf);var Rf=function(a,b){a=gb(a);return F("/table",G(a),b)};v("ee.data.getTableDownloadId",Rf);var Sf=function(a){return Bf+"/api/table?docid="+a.docid+"&token="+a.token};v("ee.data.makeTableDownloadUrl",Sf);var Uf=function(a,b,c){var d=Tf;try{return Tf=a,b.call(c)}finally{Tf=d}};v("ee.data.withProfiling",Uf);
|
|
v("ee.data.newTaskId",function(a,b){var c={};q(a)&&(c.count=a);return F("/newtaskid",G(c),b)});v("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 F("/taskstatus?q="+a.join(),null,b,"GET")});v("ee.data.getTaskList",function(a){return F("/tasklist",null,a,"GET")});v("ee.data.cancelTask",function(a,b){return Vf(a,"CANCEL",b)});
|
|
var Vf=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=Wf;for(var e in d)if(d[e]==b){d=!0;break a}d=!1}if(!d)throw Error("Invalid action: "+b);return F("/updatetask",G({id:a,action:b}),c,"POST")};v("ee.data.updateTask",Vf);v("ee.data.startProcessing",function(a,b,c){b=gb(b);b.id=a;return F("/processingrequest",G(b),c)});
|
|
v("ee.data.startIngestion",function(a,b,c){a={id:a,request:Jd(b)};return F("/ingestionrequest",G(a),c)});v("ee.data.startTableIngestion",function(a,b,c){a={id:a,tableRequest:Jd(b)};return F("/ingestionrequest",G(a),c)});var Xf=function(a,b){return F("/info",(new Ye).add("id",a),b)};v("ee.data.getInfo",Xf);var Yf=function(a,b){a=G(a);return F("/list",a,b)};v("ee.data.getList",Yf);v("ee.data.getAssetRoots",function(a){return F("/buckets",null,a,"GET")});
|
|
v("ee.data.createAssetHome",function(a,b){a=G({id:a});F("/createbucket",a,b)});v("ee.data.createAsset",function(a,b,c,d){p(a)||(a=Jd(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return F("/create",G(a),d)});v("ee.data.createFolder",function(a,b,c){return F("/createfolder",G({id:a,force:b||!1}),c)});v("ee.data.renameAsset",function(a,b,c){F("/rename",G({sourceId:a,destinationId:b}),c)});v("ee.data.copyAsset",function(a,b,c){F("/copy",G({sourceId:a,destinationId:b}),c)});
|
|
v("ee.data.deleteAsset",function(a,b){F("/delete",G({id:a}),b)});v("ee.data.getAssetAcl",function(a,b){return F("/getacl",G({id:a}),b,"GET")});v("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:Jd(b)};F("/setacl",G(a),c)});v("ee.data.setAssetProperties",function(a,b,c){a={id:a,properties:Jd(b)};F("/setproperties",G(a),c)});v("ee.data.getAssetRootQuota",function(a,b){return F("/quota",G({id:a}),b,"GET")});
|
|
var Wf={Ae:"CANCEL",De:"UPDATE"},F=function(a,b,c,d){Df();var e=Tf,f={"Content-Type":"application/x-www-form-urlencoded"},g=wf();if(null!=g)f.Authorization=g;else if(c&&sf&&jf)return nf(function(){Uf(e,function(){F(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new Ye;e&&b.add("profiling","1");b=Gf(b,a);null!=Cf&&(f["X-XSRF-Token"]=Cf);var l=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(l)||(a+=-1!=a.indexOf("?")?"&":"?",a+=l,l=null);var w=zf+a;if(c)return Zf.push($f(w,c,g,l,f)),ag.mc(),null;for(var Z=
|
|
function(a,b){this.setRequestHeader&&this.setRequestHeader(b,a)},Ga,ug=0;;){Ga=Ud();Ga.open(g,w,!1);Ya(f,Z,Ga);Ga.send(l);if(429!=Ga.status||5<ug)break;ug++}return bg(Ga.status,function(a){try{return Ga.getResponseHeader(a)}catch(Ti){return null}},Ga.responseText,e)},$f=function(a,b,c,d,e){var f=0,g={url:a,method:c,content:d,headers:e},l=Tf;g.bc=function(a){a=a.target;if(429==a.getStatus()&&10>f)return f++,setTimeout(function(){Zf.push(g);ag.mc()},Math.min(12E4,1E3*Math.pow(2,f))),null;var c=a.getStatus(),
|
|
d=u(a.getResponseHeader,a),e;try{e=a.a?a.a.responseText:""}catch(Di){Ed(a.G,"Can not get responseText: "+Di.message),e=""}return bg(c,d,e,l,b)};return g},bg=function(a,b,c,d,e){var f=b("X-Earth-Engine-Computation-Profile");f&&d&&d(f);var g,l,w;b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==b||"text/json"==b)try{g=Hd(c),l=g.data}catch(Z){w="Invalid JSON: "+c}else w="Response was unexpectedly not JSON, but "+b;if(t(g))"error"in g&&"message"in g.error?w=g.error.message:
|
|
"data"in g||(w="Malformed response: "+c);else if(0===a)w="Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";else if(200>a||300<=a)w="Server returned HTTP code: "+a;if(e)return e(l,w),null;if(!w)return l;throw Error(w);},mf=function(a){var b=function(){k.gapi.config.update("client/cors",!0);sf||(sf=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()};Ne("https://apis.google.com/js/client.js?onload="+c)}},qf=function(a,b,c){c.access_token?(b=c.token_type+" "+c.access_token,isFinite(c.expires_in)&&(c=900*c.expires_in,setTimeout(nf,.9*c),uf=ka()+c),lf=b,a&&a()):b&&b(c.error||"Unknown error.")},G=function(a){var b=new Ye,c;for(c in a)b.set(c,a[c]);return b},Zf=[],ag=new Ke(function(){var a=Zf.shift();if(a){var b=a.url,c=a.bc,d=a.method,e=a.content,a=a.headers,f=Ef,g=new E;$d.push(g);c&&g.X("complete",c);g.bb("ready",g.Wd);
|
|
f&&(g.Oa=Math.max(0,f));g.send(b,d,e,a)}0==Zf.length||ag.mc()},350),zf=null,Bf=null,Cf=null,Gf=kc,lf=null,uf=null,jf=null,kf=[],sf=null,Af=!1,Ef=0,Tf=null;var cg=function(){this.O=[];this.S=[]};h=cg.prototype;h.enqueue=function(a){this.S.push(a)};h.Sa=function(){0==this.O.length&&(this.O=this.S,this.O.reverse(),this.S=[]);return this.O.pop()};h.B=function(){return this.O.length+this.S.length};h.isEmpty=function(){return 0==this.O.length&&0==this.S.length};h.clear=function(){this.O=[];this.S=[]};h.contains=function(a){return 0<=Ea(this.O,a)||0<=Ea(this.S,a)};
|
|
h.remove=function(a){var b;b=this.O;var c=Fa(b,a);0<=c?(Qa(b,c),b=!0):b=!1;return b||Ra(this.S,a)};h.s=function(){for(var a=[],b=this.O.length-1;0<=b;--b)a.push(this.O[b]);for(var c=this.S.length,b=0;b<c;++b)a.push(this.S[b]);return a};var dg=function(a,b){A.call(this);this.xd=a||0;this.Bb=b||10;if(this.xd>this.Bb)throw Error("[goog.structs.Pool] Min can not be greater than max");this.V=new cg;this.ka=new pd;this.fc=0;this.xc=null;this.kb()};x(dg,A);dg.prototype.Va=function(){var a=ka();if(!(null!=this.xc&&a-this.xc<this.fc)){for(var b;0<this.V.B()&&(b=this.V.Sa(),!this.Ac(b));)this.kb();!b&&this.B()<this.Bb&&(b=this.ec());b&&(this.xc=a,this.ka.add(b));return b}};var eg=function(a,b){return a.ka.remove(b)?(a.Xb(b),!0):!1};h=dg.prototype;
|
|
h.Xb=function(a){this.ka.remove(a);this.Ac(a)&&this.B()<this.Bb?this.V.enqueue(a):this.nb(a)};h.kb=function(){for(var a=this.V;this.B()<this.xd;)a.enqueue(this.ec());for(;this.B()>this.Bb&&0<this.V.B();)this.nb(a.Sa())};h.ec=function(){return{}};h.nb=function(a){if("function"==typeof a.T)a.T();else for(var b in a)a[b]=null};h.Ac=function(a){return"function"==typeof a.Vd?a.Vd():!0};h.contains=function(a){return this.V.contains(a)||this.ka.contains(a)};h.B=function(){return this.V.B()+this.ka.B()};
|
|
h.isEmpty=function(){return this.V.isEmpty()&&this.ka.isEmpty()};h.c=function(){dg.j.c.call(this);if(0<this.ka.B())throw Error("[goog.structs.Pool] Objects not released");delete this.ka;for(var a=this.V;!a.isEmpty();)this.nb(a.Sa());delete this.V};var fg=function(a,b){this.td=a;this.Rc=b};fg.prototype.getKey=function(){return this.td};fg.prototype.clone=function(){return new fg(this.td,this.Rc)};var gg=function(a){this.R=[];if(a)a:{var b;if(a instanceof gg){if(b=a.P(),a=a.s(),0>=this.B()){for(var c=this.R,d=0;d<b.length;d++)c.push(new fg(b[d],a[d]));break a}}else b=bb(a),a=ab(a);for(d=0;d<b.length;d++)hg(this,b[d],a[d])}},hg=function(a,b,c){var d=a.R;d.push(new fg(b,c));b=d.length-1;a=a.R;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=gg.prototype;
|
|
h.remove=function(){var a=this.R,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Pa(a);else{a[0]=a.pop();for(var a=0,b=this.R,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.Rc}};h.s=function(){for(var a=this.R,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].Rc);return b};h.P=function(){for(var a=this.R,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
|
|
h.ha=function(a){return Ka(this.R,function(b){return b.getKey()==a})};h.clone=function(){return new gg(this)};h.B=function(){return this.R.length};h.isEmpty=function(){return 0==this.R.length};h.clear=function(){Pa(this.R)};var ig=function(){gg.call(this)};x(ig,gg);ig.prototype.enqueue=function(a,b){hg(this,a,b)};ig.prototype.Sa=function(){return this.remove()};var jg=function(a,b){this.dd=void 0;this.Ib=new ig;dg.call(this,a,b)};x(jg,dg);h=jg.prototype;h.Va=function(a,b){if(!a)return(a=jg.j.Va.call(this))&&this.fc&&(this.dd=k.setTimeout(u(this.vb,this),this.fc)),a;this.Ib.enqueue(m(b)?b:100,a);this.vb()};h.vb=function(){for(var a=this.Ib;0<a.B();){var b=this.Va();if(b)a.Sa().apply(this,[b]);else break}};h.Xb=function(a){jg.j.Xb.call(this,a);this.vb()};h.kb=function(){jg.j.kb.call(this);this.vb()};
|
|
h.c=function(){jg.j.c.call(this);k.clearTimeout(this.dd);this.Ib.clear();this.Ib=null};var kg=function(a,b,c,d){A.call(this);this.Qc=a;this.wd=b;this.gb=c;this.J=d||null};x(kg,Ee);v("ee.layers.EarthEngineTileSource",kg);kg.prototype.vd=function(a,b){var c=Sb(a,"status-changed",function(){switch(a.getStatus()){case "loaded":var b=a.ue["x-earth-engine-computation-profile"];this.J&&b&&this.J.Qd(a.H.id,b);break;case "failed":case "aborted":this.J&&""!==a.H.id&&this.J.se(a.H.id),ac(c)}},void 0,this);a.Lb=this.tb(a.Ca,a.zoom);var d=u(this.qc,this,a);lg().Va(d,b)};
|
|
kg.prototype.nd=function(){return[this.wd,this.gb].join("-")};kg.prototype.qc=function(a,b){var c=lg();if(a.aa||"aborted"==a.getStatus())eg(c,b);else{var d=Sb(a,"status-changed",function(){a.Ic in De&&(ac(d),eg(c,b))});Ce(a)}};kg.prototype.tb=function(a,b){a=[this.Qc,this.wd,b,a.x,a.y].join("/");a+="?token="+this.gb;this.J&&this.J.isEnabled()&&(a+="&profiling=1");return a};var lg=function(){mg||(mg=new jg(0,4));return mg},mg=null;var ng=function(a){D.call(this);this.Za={};this.Ya={};this.ta=new ec(this);this.m=a};x(ng,D);var og=[rb&&!Bb("11")?"readystatechange":"load","abort","error"],pg=function(a,b,c){(c=p(c)?c:c.src)&&(a.Za[b]={src:c,ad:m(void 0)?void 0:null})},qg=function(a,b){delete a.Za[b];var c=a.Ya[b];c&&(delete a.Ya[b],a.ta.Sb(c,og,a.zd),eb(a.Ya)&&eb(a.Za)&&a.dispatchEvent("complete"))};
|
|
ng.prototype.start=function(){var a=this.Za;Ha(bb(a),function(b){var c=a[b];if(c&&(delete a[b],!this.aa)){var d;this.m?(d=this.m,d=(d?new ue(te(d)):la||(la=new ue)).Yd("IMG")):d=new Image;c.ad&&(d.crossOrigin=c.ad);this.ta.X(d,og,this.zd);this.Ya[b]=d;d.id=b;d.src=c.src}},this)};
|
|
ng.prototype.zd=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||qg(this,b.id)}};ng.prototype.c=function(){delete this.Za;delete this.Ya;Xa(this.ta);ng.j.c.call(this)};var rg=function(a,b){we.call(this,a,b)};x(rg,we);v("ee.layers.ImageOverlay",rg);rg.prototype.bd=function(a,b,c,d){return new sg(a,b,c,d)};var sg=function(a,b,c,d){Ae.call(this,a,b,c,d);this.Gb=tg;this.qd=this.C=this.xb=null};x(sg,Ae);sg.prototype.Ta=function(){var a;try{a=URL.createObjectURL(this.Ld)}catch(b){a=this.Lb}this.C=new ng;pg(this.C,this.H.id+"-image",a);this.qd=Zb(this.C,vg,function(a){"load"==a.type?(this.xb=a.target,Ae.prototype.Ta.call(this)):this.eb()},void 0,this);this.C.start()};
|
|
sg.prototype.Ra=function(){sg.j.Ra.call(this);this.C&&(ac(this.qd),Xa(this.C))};var vg=["load","abort","error"],tg=function(a){a.H.appendChild(a.xb)};var wg=function(a,b,c){D.call(this);this.je=b;this.Nb=c;this.pa=[];this.Mc=new pd;this.na=0;this.url=a};x(wg,D);v("ee.AbstractOverlay",wg);var xg=function(a,b,c){var d=1<<c,e=b.x%d;0>e&&(e+=d);return[a.je,c,e,b.y].join("/")};wg.prototype.oc=function(){return this.pa.length};var yg=function(a){B.call(this,"tileevent");this.count=a};x(yg,B);var zg=function(){};var Ag=function(){this.ga=-1};var Bg=function(){this.ga=64;this.A=Array(4);this.Rd=Array(this.ga);this.Pb=this.Qa=0;this.reset()};x(Bg,Ag);Bg.prototype.reset=function(){this.A[0]=1732584193;this.A[1]=4023233417;this.A[2]=2562383102;this.A[3]=271733878;this.Pb=this.Qa=0};
|
|
var Cg=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.A[0];c=a.A[1];var e=a.A[2],f=a.A[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|
|
|
g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295|
|
|
g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^
|
|
b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295;
|
|
f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+
|
|
(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295;
|
|
c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.A[0]=a.A[0]+b&4294967295;a.A[1]=a.A[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.A[2]=a.A[2]+e&4294967295;a.A[3]=a.A[3]+f&4294967295};
|
|
Bg.prototype.update=function(a,b){m(b)||(b=a.length);for(var c=b-this.ga,d=this.Rd,e=this.Qa,f=0;f<b;){if(0==e)for(;f<=c;)Cg(this,a,f),f+=this.ga;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.ga){Cg(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.ga){Cg(this,d);e=0;break}}this.Qa=e;this.Pb+=b};
|
|
Bg.prototype.digest=function(){var a=Array((56>this.Qa?this.ga:2*this.ga)-this.Qa);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;for(var c=8*this.Pb,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.A[b]>>>d&255;return a};var Dg=function(a){this.jb="__ee_hash__";this.vc=!1!==a;this.Na=[];this.Ea={};this.Sc=[]};v("ee.Serializer",Dg);var Eg=new Id,Fg=new Bg,Hg=function(a,b){return Gg(new Dg(m(b)?b:!0),a)};v("ee.Serializer.encode",Hg);var Ig=function(a){return Eg.v(Hg(a))};v("ee.Serializer.toJSON",Ig);var Jg=function(a){a=Gg(new Dg(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Eg.v(a)};v("ee.Serializer.toReadableJSON",Jg);
|
|
var Gg=function(a,b){b=a.pb(b);a.vc&&(b=t(b)&&"ValueRef"==b.type&&1==a.Na.length?a.Na[0][1]:{type:"CompoundValue",scope:a.Na,value:b},a.Na=[],Ha(a.Sc,u(function(a){delete a[this.jb]},a)),a.Sc=[],a.Ea={});return b};
|
|
Dg.prototype.pb=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b,c=t(a)?a[this.jb]:null;if(this.vc&&null!=c&&this.Ea[c])return{type:"ValueRef",value:this.Ea[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 zg){if(b=a.encode(u(this.pb,this)),!(n(b)||t(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Ja(a,function(a){return this.pb(a)},
|
|
this);else if(t(a)&&!r(a))b=$a(a,function(a){if(!r(a))return this.pb(a)},this),fb(b,this.jb),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.vc){Fg.reset();Fg.update(Eg.v(b));var c=Fg.digest().toString(),d;this.Ea[c]?d=this.Ea[c]:(d=String(this.Na.length),this.Na.push([d,b]),this.Ea[c]=d);a[this.jb]=c;this.Sc.push(a);return{type:"ValueRef",value:d}}return b};var H=function(a,b,c){if(!(this instanceof H))return I(H,arguments);if(c&&(a||b))throw Error('When "opt_varName" is specified, "func" and "args" must be null.');if(a&&!b)throw Error('When "func" is specified, "args" must not be null.');this.f=a;this.o=b;this.w=c||null};x(H,zg);v("ee.ComputedObject",H);H.prototype.evaluate=function(a){if(!a||!r(a))throw Error("evaluate() requires a callback function.");Mf({json:this.v()},a)};H.prototype.evaluate=H.prototype.evaluate;
|
|
H.prototype.W=function(a){return Mf({json:this.v()},a)};H.prototype.getInfo=H.prototype.W;H.prototype.encode=function(a){if(null===this.f&&null===this.o)return{type:"ArgumentRef",value:this.w};var b={},c;for(c in this.o)m(this.o[c])&&(b[c]=a(this.o[c]));b={type:"Invocation",arguments:b};a=a(this.f);b[p(a)?"functionName":"function"]=a;return b};H.prototype.v=function(){return Ig(this)};H.prototype.serialize=H.prototype.v;H.prototype.toString=function(){return"ee."+this.name()+"("+Jg(this)+")"};
|
|
v("ee.ComputedObject.prototype.toString",H.prototype.toString);H.prototype.name=function(){return"ComputedObject"};H.prototype.Tc=function(a,b){var c=Ta(arguments);c[0]=this;a.apply(k,c);return this};H.prototype.aside=H.prototype.Tc;var Kg=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.f=b.f;a.o=b.o;a.w=b.w;return a},I=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Lg={},Mg=function(a){return a.prototype instanceof H?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},Ng=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}},Og=function(a){return q(a)||
|
|
a instanceof H&&"Number"==a.name()},Pg=function(a){return p(a)||a instanceof H&&"String"==a.name()},Qg=function(a){return t(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var J=function(){if(!(this instanceof J))return new J};x(J,zg);v("ee.Function",J);var Rg=kc;J.prototype.call=function(a){return this.apply(Sg(this,Array.prototype.slice.call(arguments,0)))};J.prototype.call=J.prototype.call;J.prototype.apply=function(a){a=new H(this,Tg(this,a));return Rg(a,this.F().returns)};J.prototype.apply=J.prototype.apply;
|
|
var Ug=function(a,b,c){var d=m(b),e=a.F(),f=!1;if(1==c.length&&Qg(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=gb(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=Sg(a,d?[b].concat(c):c);return a.apply(c)},Tg=function(a,b){for(var c=a.F().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&m(b[g]))d[g]=Rg(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},Sg=function(a,b){var c=a.F().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);a={};for(var d=0;d<b.length;d++)a[c[d].name]=b[d];return a};
|
|
J.prototype.toString=function(a,b){var c=this.F(),d=[];d.push(a||c.name);d.push("(");d.push(Ja(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)for(d.push("\nArgs:\n"),a=0;a<c.args.length;a++){b&&0==a?d.push(" this:"):d.push("\n ");var e=c.args[a];d.push(e.name);d.push(" (");d.push(e.type);e.optional&&d.push(", optional");d.push("): ");e.description?d.push(e.description):
|
|
d.push("Undocumented.")}return d.join("")};J.prototype.v=function(){return Ig(this)};var K=function(a,b){if(!m(b))return Vg(a);if(!(this instanceof K))return I(K,arguments);this.ma=hb(b);this.ma.name=a};x(K,J);v("ee.ApiFunction",K);var L=function(a,b){return J.prototype.call.apply(Vg(a),Array.prototype.slice.call(arguments,1))};v("ee.ApiFunction._call",L);var Wg=function(a,b){return Vg(a).apply(b)};v("ee.ApiFunction._apply",Wg);K.prototype.encode=function(){return this.ma.name};K.prototype.F=function(){return this.ma};
|
|
var Xg=null,Yg={},$g=function(){Zg();return $a(Xg,function(a){return a.F()})},ah=function(){Zg();return Za(Xg,function(a,b){return!Yg[b]})},Vg=function(a){var b=bh(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};v("ee.ApiFunction.lookup",Vg);
|
|
var bh=function(a){Zg();return Xg[a]||null},Zg=function(a,b){if(Xg)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(Xg=$a(c,function(a,b){a.returns=a.returns.replace(/<.*>/,"");for(var c=0;c<a.args.length;c++)a.args[c].type=a.args[c].type.replace(/<.*>/,"");return new K(b,a)}),a&&a())};a?F("/algorithms",null,c,"GET"):c(F("/algorithms",null,void 0,"GET"))}},M=function(a,b,c,d){Zg();var e=d||"";Ya(Xg,function(d,g){var f=g.split(".");if(2==f.length&&f[0]==b){var f=e+f[1],w=d.F();Yg[g]=!0;var Z=!1;w.args.length&&
|
|
(g=w.args[0].type,Z="Object"!=g&&Ng(g,c));g=Z?a.prototype:a;f in g&&!g[f].signature||(g[f]=function(a){return Ug(d,Z?this:void 0,Array.prototype.slice.call(arguments,0))},g[f].toString=u(d.toString,d,f,Z),g[f].signature=w)}})},N=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 O=function(a,b){var c=ch(a),d=Ja(c,function(a){return a.replace(/^opt_/,"")});a=(a=k.EXPORTED_FN_INFO?k.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},f=b[0],g=t(f)&&!r(f)&&!n(f)&&!(f instanceof H);if(1<b.length||!g){if(b.length>d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(f=0;f<b.length;f++)e[d[f]]=b[f]}else{var g=new pd(bb(f)),l=new pd(d);if(rd(l,g).isEmpty())e[d[0]]=b[0];else{b=
|
|
sd(g,l);if(!b.isEmpty())throw Error("Unexpected arguments"+a+": "+b.s().join(", "));e=gb(f)}}b=new pd(bb(e));c=sd(new pd(Ia(c,function(a){return 0!=a.lastIndexOf("opt_",0)})),b);if(!c.isEmpty())throw Error("Missing required arguments"+a+": "+c.s().join(", "));return e},ch=function(a){k.EXPORTED_FN_INFO?(a=k.EXPORTED_FN_INFO[a.toString()],Ca(a),a=a.paramNames,Da(a)):a=a.toString().replace(dh,"").match(eh)[1].split(",")||[];return a},dh=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/mg,eh=/^function\s*[^\(]*\(\s*([^\)]*)\)/m;var P=function(a,b,c){H.call(this,a,b,c);fh()};x(P,H);v("ee.Element",P);var gh=!1,fh=function(){gh||(M(P,"Element","Element"),gh=!0)};P.prototype.name=function(){return"Element"};
|
|
P.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=Qg(c))a:{b=bb(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(Qg(c)){b=this;for(var g in c)d=c[g],b=L("Element.set",b,g,d)}else if(c instanceof H&&bh("Element.setMulti"))b=L("Element.setMulti",this,c);else throw Error("When Element.set() is passed one argument, it must be a dictionary.");}else{if(0!=
|
|
arguments.length%2)throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");b=this;for(c=0;c<arguments.length;c+=2)g=arguments[c],d=arguments[c+1],b=L("Element.set",b,g,d)}return Kg(this,b)};P.prototype.set=P.prototype.set;var Q=function(a){if(!(this instanceof Q))return I(Q,arguments);if(a instanceof Q)return a;hh();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new Q(a[0]);H.call(this,new K("Filter.and"),{filters:a})}else if(a instanceof H)H.call(this,a.f,a.o,a.w);else{if(m(a))throw Error("Invalid argument specified for ee.Filter(): "+a);H.call(this,null,null)}};x(Q,H);v("ee.Filter",Q);
|
|
var ih=!1,hh=function(){ih||(M(Q,"Filter","Filter"),ih=!0)},jh={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};Q.prototype.Ga=function(){return L("Filter.not",this)};Q.prototype.not=Q.prototype.Ga;var kh=function(a,b){var c=O(kh,arguments);return L("Filter.equals",c.name,c.value)};Q.eq=kh;var lh=function(a,b){var c=O(lh,arguments);return kh(c.name,c.value).Ga()};Q.neq=lh;
|
|
var mh=function(a,b){var c=O(mh,arguments);return L("Filter.lessThan",c.name,c.value)};Q.lt=mh;var nh=function(a,b){var c=O(nh,arguments);return mh(c.name,c.value).Ga()};Q.gte=nh;var oh=function(a,b){var c=O(oh,arguments);return L("Filter.greaterThan",c.name,c.value)};Q.gt=oh;var ph=function(a,b){var c=O(ph,arguments);return oh(c.name,c.value).Ga()};Q.lte=ph;var qh=function(a){return L("Filter.and",Array.prototype.slice.call(arguments))};Q.and=qh;var rh=function(a){return L("Filter.or",Array.prototype.slice.call(arguments))};
|
|
Q.or=rh;var sh=function(a,b){var c=O(sh,arguments),c=L("DateRange",c.start,c.end);return Wg("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};Q.date=sh;var th=function(a,b,c,d){var e=O(th,arguments);return Wg("Filter.listContains",{leftField:e.rightField,rightValue:e.leftValue,rightField:e.leftField,leftValue:e.rightValue})};Q.inList=th;var uh=function(a,b){return Wg("Filter.intersects",{leftField:".all",rightValue:L("Feature",a),maxError:b})};Q.bounds=uh;
|
|
Q.prototype.name=function(){return"Filter"};var vh=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in jh))throw Error("Unknown filtering operator: "+b);a=L("Filter."+jh[b],a,c);return d?a.Ga():a};Q.metadata=vh;var R=function(a,b,c){P.call(this,a,b,c);wh()};x(R,P);v("ee.Collection",R);var xh=!1,wh=function(){xh||(M(R,"Collection","Collection"),M(R,"AggregateFeatureCollection","Collection","aggregate_"),xh=!0)};R.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Kg(this,L("Collection.filter",this,a))};R.prototype.filter=R.prototype.filter;R.prototype.lc=function(a,b,c){var d=O(R.prototype.lc,arguments);return this.filter(vh(d.name,d.operator,d.value))};R.prototype.filterMetadata=R.prototype.lc;
|
|
R.prototype.hd=function(a){return this.filter(uh(a))};R.prototype.filterBounds=R.prototype.hd;R.prototype.kc=function(a,b){var c=O(R.prototype.kc,arguments);return this.filter(sh(c.start,c.end))};R.prototype.filterDate=R.prototype.kc;R.prototype.limit=function(a,b,c){var d=O(R.prototype.limit,arguments);return Kg(this,L("Collection.limit",this,d.max,d.property,d.ascending))};R.prototype.limit=R.prototype.limit;
|
|
R.prototype.sort=function(a,b){var c=O(R.prototype.sort,arguments);return Kg(this,L("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 P};R.prototype.map=function(a,b){var c=this.elementType();return Kg(this,L("Collection.map",this,function(b){return a(new c(b))},b))};R.prototype.map=R.prototype.map;
|
|
R.prototype.sd=function(a,b){b=m(b)?b:null;var c=this.elementType();return L("Collection.iterate",this,function(b,e){return a(new c(b),e)},b)};R.prototype.iterate=R.prototype.sd;var yh=function(a){if(!(this instanceof yh))return I(yh,arguments);if(a instanceof yh)return a;zh();if(q(a))H.call(this,null,null),this.zc=a;else if(a instanceof H)H.call(this,a.f,a.o,a.w),this.zc=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};x(yh,H);v("ee.Number",yh);var Ah=!1,zh=function(){Ah||(M(yh,"Number","Number"),Ah=!0)};yh.prototype.encode=function(a){return q(this.zc)?this.zc:yh.j.encode.call(this,a)};yh.prototype.name=function(){return"Number"};var Bh=function(a){if(!(this instanceof Bh))return I(Bh,arguments);if(a instanceof Bh)return a;Ch();if(p(a))H.call(this,null,null),this.Jc=a;else if(a instanceof H)this.Jc=null,a.f&&"String"==a.f.F().returns?H.call(this,a.f,a.o,a.w):H.call(this,new K("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};x(Bh,H);v("ee.String",Bh);var Dh=!1,Ch=function(){Dh||(M(Bh,"String","String"),Dh=!0)};
|
|
Bh.prototype.encode=function(a){return p(this.Jc)?this.Jc:Bh.j.encode.call(this,a)};Bh.prototype.name=function(){return"String"};var Eh=function(a,b){if(!(this instanceof Eh))return I(Eh,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(Fh(g in Lg?Lg[g]:null,f.name))}if(!m(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.ma=Gh(a,c,b);this.Sd=b.apply(null,c)};x(Eh,J);v("ee.CustomFunction",Eh);Eh.prototype.encode=function(a){return{type:"Function",argumentNames:Ja(this.ma.args,function(a){return a.name}),body:a(this.Sd)}};Eh.prototype.F=function(){return this.ma};
|
|
var Fh=function(a,b){a=a||Object;if(!(a.prototype instanceof H))if(a&&a!=Object)if(a==String)a=Bh;else if(a==Number)a=yh;else if(a==Array)a=k.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=H;var c=function(){};c.prototype=a.prototype;a=new c;a.f=null;a.o=null;a.w=b;return a},Hh=function(a,b){b=Ja(b,function(a){return{name:null,type:p(a)?a:Mg(a)}});b={name:"",returns:p("Object")?"Object":Mg("Object"),args:b};return new Eh(b,a)},Gh=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++,Ya(a,function(a){b+=f(a)}));return b},e=Hg(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 Ih=function(a,b){if(!(this instanceof Ih))return I(Ih,arguments);if(a instanceof Ih)return a;Jh();var c=O(Ih,arguments);a=c.date;var c=c.tz,d=new K("Date"),e={},f=null;if(Pg(a)){if(e.value=a,c)if(Pg(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(Og(a))e.value=a;else if(t(a)&&"function"==typeof a.getFullYear)e.value=Math.floor(a.getTime());else if(a instanceof H)a.f&&"Date"==a.f.F().returns?(d=a.f,e=a.o,f=a.w):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);H.call(this,d,e,f)};x(Ih,H);v("ee.Date",Ih);var Kh=!1,Jh=function(){Kh||(M(Ih,"Date","Date"),Kh=!0)};Ih.prototype.name=function(){return"Date"};var S=function(a,b,c,d){if(!(this instanceof S))return I(S,arguments);if(!("type"in a)){var e=O(S,arguments);a=e.geoJson;b=e.proj;c=e.geodesic;d=e.evenOdd}Lh();e=null!=b||null!=c||null!=d;if(a instanceof H&&!(a instanceof S&&a.Qb)){if(e)throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not supported. Use Geometry.transform().");H.call(this,a.f,a.o,a.w)}else{a instanceof S&&(a=a.encode());if(!Mh(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));H.call(this,
|
|
null,null);this.Qb=a.type;this.Xd=null!=a.coordinates?hb(a.coordinates):null;this.ae=a.geometries||null;if(null!=b)this.Ec=b;else if("crs"in a)if(t(a.crs)&&"name"==a.crs.type&&t(a.crs.properties)&&p(a.crs.properties.name))this.Ec=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new Id).v(a.crs));this.sb=c;!m(this.sb)&&"geodesic"in a&&(this.sb=!!a.geodesic);this.rb=d;!m(this.rb)&&"evenOdd"in a&&(this.rb=!!a.evenOdd)}};x(S,H);v("ee.Geometry",S);
|
|
var Nh=!1,Lh=function(){Nh||(M(S,"Geometry","Geometry"),Nh=!0)},Oh=function(a,b){if(!(this instanceof Oh))return Ph(Oh,arguments);var c=Qh(Oh,"Point",1,arguments);if(!(c instanceof H)){var d=c.coordinates;if(!n(d)||2!=d.length)throw Error("The Geometry.Point constructor requires 2 coordinates.");}S.call(this,c)};x(Oh,S);S.Point=Oh;var Rh=function(a,b){if(!(this instanceof Rh))return Ph(Rh,arguments);S.call(this,Qh(Rh,"MultiPoint",2,arguments))};x(Rh,S);S.MultiPoint=Rh;
|
|
var Sh=function(a,b,c,d,e){if(!(this instanceof Sh))return Ph(Sh,arguments);var f=Qh(Sh,"Rectangle",2,arguments);if(!(f instanceof H)){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],w=g[0][1],Z=g[1][0],g=g[1][1];f.coordinates=[[[l,g],[l,w],[Z,w],[Z,g]]];f.type="Polygon"}S.call(this,f)};x(Sh,S);S.Rectangle=Sh;
|
|
var Th=function(a,b,c,d){if(!(this instanceof Th))return Ph(Th,arguments);S.call(this,Qh(Th,"LineString",2,arguments))};x(Th,S);S.LineString=Th;var Uh=function(a,b,c,d){if(!(this instanceof Uh))return Ph(Uh,arguments);S.call(this,Qh(Uh,"LinearRing",2,arguments))};x(Uh,S);S.LinearRing=Uh;var Vh=function(a,b,c,d){if(!(this instanceof Vh))return Ph(Vh,arguments);S.call(this,Qh(Vh,"MultiLineString",3,arguments))};x(Vh,S);S.MultiLineString=Vh;
|
|
var Wh=function(a,b,c,d,e){if(!(this instanceof Wh))return Ph(Wh,arguments);S.call(this,Qh(Wh,"Polygon",3,arguments))};x(Wh,S);S.Polygon=Wh;var Xh=function(a,b,c,d,e){if(!(this instanceof Xh))return Ph(Xh,arguments);S.call(this,Qh(Xh,"MultiPolygon",4,arguments))};x(Xh,S);S.MultiPolygon=Xh;
|
|
S.prototype.encode=function(a){if(!this.Qb){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return H.prototype.encode.call(this,a)}a={type:this.Qb};"GeometryCollection"==this.Qb?a.geometries=this.ae:a.coordinates=this.Xd;null!=this.Ec&&(a.crs={type:"name",properties:{name:this.Ec}});null!=this.sb&&(a.geodesic=this.sb);null!=this.rb&&(a.evenOdd=this.rb);return a};
|
|
S.prototype.Oc=function(){if(this.f)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};S.prototype.toGeoJSON=S.prototype.Oc;S.prototype.Pc=function(){if(this.f)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new Id).v(this.Oc())};S.prototype.toGeoJSONString=S.prototype.Pc;S.prototype.v=function(){return Ig(this)};S.prototype.serialize=S.prototype.v;
|
|
S.prototype.toString=function(){return"ee.Geometry("+this.Pc()+")"};
|
|
var Mh=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(!Mh(b[a]))return!1;return!0}a=a.coordinates;var c=Yh(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)},Yh=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=Yh(a[0]),c=1;c<a.length;c++)if(Yh(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},Qh=function(a,b,c,d){La(d,Og)?a={coordinates:Ta(d)}:(a=O(a,d),a.coordinates=a.coords,delete a.coords,a.crs=a.proj,delete a.proj,a=Za(a,da));if(Zh(a.coordinates)||null!=a.crs||null!=a.maxError)return(new K("GeometryConstructors."+b)).apply(a);a.type=b;d=a.coordinates;if(1>c||4<c)throw Error("Unexpected nesting level.");if(La(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(Yh(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;(b=0<=Ea(["Polygon","Rectangle","MultiPolygon"],b))&&null==a.evenOdd&&(a.evenOdd=!0);if(b&&!1===a.geodesic&&!1===a.evenOdd)throw Error("Planar interiors must be even/odd.");return a},Zh=function(a){return n(a)?Ka(a,Zh):a instanceof H},Ph=function(a,b){var c=function(){};c.prototype=a.prototype;
|
|
c=new c;a=a.apply(c,b);return void 0!==a?a:c};S.prototype.name=function(){return"Geometry"};v("ee.Deserializer",function(){});var ai=function(a){return $h(Gd(a))};v("ee.Deserializer.fromJSON",ai);var $h=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]=bi(f,b)}a=a.value}return bi(a,b)};v("ee.Deserializer.decode",$h);
|
|
var bi=function(a,b){if(null===a||q(a)||"boolean"==typeof a||p(a))return a;if(n(a))return Ja(a,function(a){return bi(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 Fh(Object,c);case "Date":c=a.value;if(!q(c))throw Error("Invalid date value: "+c);return new Ih(c/1E3);case "Bytes":return c=new zg,
|
|
c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?Vg(a.functionName):bi(a["function"],b),d=$a(a.arguments,function(a){return bi(a,b)});if(c instanceof J)return c.apply(d);if(c instanceof H)return new H(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return $a(a.value,function(a){return bi(a,b)});case "Function":var e=bi(a.body,b),c={name:"",args:Ja(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new Eh(c,
|
|
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new S(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var ci=function(a){if(!(this instanceof ci))return I(ci,arguments);if(a instanceof ci)return a;di();Qg(a)?(H.call(this,null,null),this.gc=a):(a instanceof H&&a.f&&"Dictionary"==a.f.F().returns?H.call(this,a.f,a.o,a.w):H.call(this,new K("Dictionary"),{input:a},null),this.gc=null)};x(ci,H);v("ee.Dictionary",ci);var ei=!1,di=function(){ei||(M(ci,"Dictionary","Dictionary"),ei=!0)};ci.prototype.encode=function(a){return null===this.gc?ci.j.encode.call(this,a):a(this.gc)};ci.prototype.name=function(){return"Dictionary"};var T=function(a,b){if(!(this instanceof T))return I(T,arguments);if(a instanceof T){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)");fi();if(a instanceof S||null===a)P.call(this,new K("Feature"),{geometry:a,metadata:b||null});else if(a instanceof H)P.call(this,a.f,a.o,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=gb(c);c["system:index"]=a.id}P.call(this,new K("Feature"),{geometry:new S(a.geometry),metadata:c})}else P.call(this,new K("Feature"),{geometry:new S(a),metadata:b||null})};x(T,P);v("ee.Feature",T);var gi=!1,fi=function(){gi||(M(T,"Feature","Feature"),gi=!0)};T.prototype.getInfo=T.prototype.W;T.prototype.getMap=function(a,b){var c=O(T.prototype.getMap,arguments);return L("Collection",[this]).getMap(c.visParams,c.callback)};
|
|
T.prototype.getMap=T.prototype.getMap;T.prototype.name=function(){return"Feature"};var hi=function(a){if(this instanceof hi){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof hi)return a}else return I(hi,arguments);ii();if(n(a))H.call(this,null,null),this.yc=a;else if(a instanceof H)H.call(this,a.f,a.o,a.w),this.yc=null;else throw Error("Invalid argument specified for ee.List(): "+a);};x(hi,H);v("ee.List",hi);var ji=!1,ii=function(){ji||(M(hi,"List","List"),ji=!0)};
|
|
hi.prototype.encode=function(a){return n(this.yc)?Ja(this.yc,function(b){return a(b)}):hi.j.encode.call(this,a)};hi.prototype.name=function(){return"List"};var U=function(a,b){if(!(this instanceof U))return I(U,arguments);if(a instanceof U)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");ki();a instanceof S&&(a=new T(a));a instanceof T&&(a=[a]);if(Og(a)||Pg(a)){var c={tableId:a};b&&(c.geometryColumn=b);R.call(this,new K("Collection.loadTable"),c)}else if(n(a))R.call(this,new K("Collection"),{features:Ja(a,function(a){return new T(a)})});else if(a instanceof hi)R.call(this,
|
|
new K("Collection"),{features:a});else if(a instanceof H)R.call(this,a.f,a.o,a.w);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};x(U,R);v("ee.FeatureCollection",U);var li=!1,ki=function(){li||(M(U,"FeatureCollection","FeatureCollection"),li=!0)};U.prototype.getMap=function(a,b){var c=O(U.prototype.getMap,arguments),d=Wg("Collection.draw",{collection:this,color:(c.visParams||{}).color||"000000"});if(c.callback)d.getMap(null,c.callback);else return d.getMap()};
|
|
U.prototype.getMap=U.prototype.getMap;U.prototype.getInfo=U.prototype.W;U.prototype.sa=function(a,b,c,d){var e=O(U.prototype.sa,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)Rf(f,function(a,b){a?e.callback(Sf(a)):e.callback(null,b)});else return Sf(Rf(f))};U.prototype.getDownloadURL=U.prototype.sa;
|
|
U.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};U.prototype.select=U.prototype.select;U.prototype.name=function(){return"FeatureCollection"};U.prototype.elementType=function(){return T};var V=function(a){if(!(this instanceof V))return I(V,arguments);if(a instanceof V)return a;mi();var b=arguments.length;if(0==b||1==b&&!m(a))P.call(this,new K("Image.mask"),{image:new V(0),mask:new V(0)});else if(1==b)if(Og(a))P.call(this,new K("Image.constant"),{value:a});else if(Pg(a))P.call(this,new K("Image.load"),{id:a});else{if(n(a))return ni(Ja(a,function(a){return new V(a)}));if(a instanceof H)"Array"==a.name()?P.call(this,new K("Image.constant"),{value:a}):P.call(this,a.f,a.o,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(Pg(b)&&Og(c))P.call(this,new K("Image.load"),{id:b,version:c});else throw Error("Unrecognized argument types to convert to an Image: "+arguments);}else throw Error("The Image constructor takes at most 2 arguments ("+b+" given)");};x(V,P);v("ee.Image",V);var oi=!1,mi=function(){oi||(M(V,"Image","Image"),M(V,"Window","Image","focal_"),oi=!0)};V.prototype.getInfo=V.prototype.W;
|
|
V.prototype.getMap=function(a,b){var c=O(V.prototype.getMap,arguments),d=c.visParams?gb(c.visParams):{};d.image=this.v();if(c.callback)Kf(d,u(function(a,b){a&&(a.image=this);c.callback(a,b)},this));else return d=Kf(d),d.image=this,d};V.prototype.getMap=V.prototype.getMap;V.prototype.sa=function(a,b){var c=O(V.prototype.sa,arguments),d=c.params?gb(c.params):{};d.image=this.v();if(c.callback){var e=c.callback;Pf(d,function(a,b){a?e(Qf(a)):e(null,b)})}else return Qf(Pf(d))};
|
|
V.prototype.getDownloadURL=V.prototype.sa;V.prototype.pc=function(a,b){var c=O(V.prototype.pc,arguments),d=c.params?gb(c.params):{};d.image=this.v();if(d.region)if(n(d.region)||Qg(d.region))d.region=Jd(d.region);else if(!p(d.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(c.callback)Nf(d,function(a,b){var d="";if(!m(b))try{d=Of(a)}catch(l){b=String(l.message)}c.callback(d,b)});else return Of(Nf(d))};V.prototype.getThumbURL=V.prototype.pc;
|
|
var pi=function(a,b,c){var d=O(pi,arguments);return ni([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};V.rgb=pi;var qi=function(a){return ni(Array.prototype.slice.call(arguments),null)};V.cat=qi;var ni=function(a,b){if(0==a.length)return L("Image.constant",[]);for(var c=new V(a[0]),d=1;d<a.length;d++)c=L("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
V.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||Pg(b[0])||Og(b[0])){for(var d=0;d<b.length;d++)if(!(Pg(b[d])||Og(b[d])||b[d]instanceof H))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return Wg("Image.select",c)};V.prototype.select=V.prototype.select;
|
|
V.prototype.jc=function(a,b){var c=O(V.prototype.jc,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 V(f[g])}var l=L("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d),c=new J;c.encode=function(a){return l.encode(a)};c.F=function(){return{name:"",args:Ja(d,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return c.apply(e)};V.prototype.expression=V.prototype.jc;
|
|
V.prototype.clip=function(a){try{a=new S(a)}catch(b){}return L("Image.clip",this,a)};V.prototype.clip=V.prototype.clip;V.prototype.Fd=function(a){var b;b=1!=arguments.length||Pg(arguments[0])?Ta(arguments):arguments[0];return L("Image.rename",this,b)};V.prototype.rename=V.prototype.Fd;V.prototype.name=function(){return"Image"};var W=function(a){if(!(this instanceof W))return I(W,arguments);if(a instanceof W)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");ri();a instanceof V&&(a=[a]);if(Pg(a))R.call(this,new K("ImageCollection.load"),{id:a});else if(n(a))R.call(this,new K("ImageCollection.fromImages"),{images:Ja(a,function(a){return new V(a)})});else if(a instanceof hi)R.call(this,new K("ImageCollection.fromImages"),{images:a});else if(a instanceof
|
|
H)R.call(this,a.f,a.o,a.w);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};x(W,R);v("ee.ImageCollection",W);var si=!1,ri=function(){si||(M(W,"ImageCollection","ImageCollection"),M(W,"reduce","ImageCollection"),si=!0)};W.prototype.getMap=function(a,b){var c=O(W.prototype.getMap,arguments),d=L("ImageCollection.mosaic",this);if(c.callback)d.getMap(c.visParams,c.callback);else return d.getMap(c.visParams)};W.prototype.getMap=W.prototype.getMap;
|
|
W.prototype.getInfo=W.prototype.W;W.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};W.prototype.select=W.prototype.select;W.prototype.name=function(){return"ImageCollection"};W.prototype.elementType=function(){return V};var ti={};v("ee.Terrain",ti);ti.tc=!1;ti.de=function(){ti.tc||(M(ti,"Terrain","Terrain"),ti.tc=!0)};ti.reset=function(){N(ti);ti.tc=!1};var zi=function(a,b,c,d,e){if("ready"!=ui||a||b){var f=null!=c;if(d)if(f)vi.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==ui&&f)wi.push(c);else if(ui="loading",Df(a,b,e),f)wi.push(c),Zg(xi,yi);else try{Zg(),xi()}catch(g){throw yi(g),g;}}else c&&c()};v("ee.initialize",zi);
|
|
var Ci=function(){ui="not_ready";Cf=Bf=zf=null;Af=!1;Xg=null;Yg={};N(Ih);Kh=!1;N(ci);ei=!1;N(P);gh=!1;N(V);oi=!1;N(T);gi=!1;N(R);xh=!1;N(W);si=!1;N(U);li=!1;N(Q);ih=!1;N(S);Nh=!1;N(hi);ji=!1;N(yh);Ah=!1;N(Bh);Dh=!1;ti.reset();for(var a=k.ee,b=0;b<Ai.length;b++){var c=Ai[b];N(a[c]);delete a[c]}Ai=[];Lg=a;var a=Bi,d;for(d in a)delete a[d]};v("ee.reset",Ci);var Ei={Be:"not_ready",LOADING:"loading",Ce:"ready"};v("ee.InitState",Ei);v("ee.InitState.NOT_READY","not_ready");v("ee.InitState.LOADING","loading");
|
|
v("ee.InitState.READY","ready");var ui="not_ready",wi=[],vi=[];v("ee.TILE_SIZE",256);var Ai=[],Bi={};v("ee.Algorithms",Bi);var Fi=function(a,b){p(a)&&(a=new K(a));return J.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))};v("ee.call",Fi);var Gi=function(a,b){p(a)&&(a=new K(a));return a.apply(b)};v("ee.apply",Gi);
|
|
var xi=function(){if("loading"==ui){try{Jh();di();fh();mi();fi();wh();ri();ki();hh();Lh();ii();zh();Ch();ti.de();var a=$g(),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]=Hi(g),Ai.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Yg[g]=!0):f[g].signature={});Lg=f;Ii()}catch(l){yi(l);return}ui="ready";for(vi=[];0<wi.length;)wi.shift()()}},yi=function(a){if("loading"==
|
|
ui)for(ui="not_ready",wi=[];0<vi.length;)vi.shift()(a)},Ii=function(){var a=ah();bb(a).sort().forEach(function(b){var c=a[b],d=c.F();if(!d.hidden){b=b.split(".");var e=Bi;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=Va(b,1)}f=function(a){return Ug(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=u(c.toString,c);e[b[0]]=f}})},Hi=function(a){var b=function(b){var c=k.ee[a],e=Array.prototype.slice.call(arguments),f=1==e.length;if(f&&e[0]instanceof
|
|
c)return e[0];if(!(this instanceof c))return I(c,e);var c=bh(a),g=!(e[0]instanceof H),l=!1;c&&(f?g?l=!0:e[0].f!=c&&(l=!0):l=!0);if(l)H.call(this,c,Tg(c,Sg(c,e)));else{if(!f)throw Error("Too many arguments for ee."+a+"(): "+e);if(g)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];H.call(this,e.f,e.o,e.w)}};x(b,H);b.prototype.name=function(){return a};M(b,a,a);return b},Rg=function(a,b){if(null===a)return null;if(m(a)){var c=k.ee;switch(b){case "Image":return new V(a);
|
|
case "Feature":return a instanceof R?L("Feature",L("Collection.geometry",a)):new T(a);case "Element":if(a instanceof P)return a;if(a instanceof S)return new T(a);if(a instanceof H)return new P(a.f,a.o,a.w);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof U?L("Collection.geometry",a):new S(a);case "FeatureCollection":case "Collection":return a instanceof R?a:new U(a);case "ImageCollection":return new W(a);case "Filter":return new Q(a);case "Algorithm":if(p(a))return new K(a);
|
|
if(r(a)){b=a.length;for(var c=[],d=0;d<b;d++)c[d]="Object";return Hh(a,c)}if(a instanceof zg)return a;throw Error("Argument is not a function: "+a);case "String":return Pg(a)||a instanceof Bh||a instanceof H?new Bh(a):a;case "Dictionary":return Qg(a)?a:new ci(a);case "List":return new hi(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new yh(a);default:if(b in c){d=bh(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 Ji=function(a,b,c){wg.call(this,a,b,c);this.tileSize=new google.maps.Size(256,256);this.kd=new kd;this.jd=new kd};x(Ji,wg);v("ee.FloatTileOverlay",Ji);Ji.prototype.getTile=function(a,b){var c=xg(this,a,b);b=[this.url,c].join("/")+"?token="+this.Nb;c=[c,this.na,this.Nb].join("/");this.pa.push(c);this.na+=1;var d=pe("DIV");Ki(this,b,a,c,d);Li(this);return d};
|
|
var Ki=function(a,b,c,d,e){var f=Ud();f.open("GET",b,!0);f.responseType="arraybuffer";f.onreadystatechange=u(function(){if(f.readyState===XMLHttpRequest.DONE&&200===f.status){var a=f.response;if(a)a=new Float32Array(a),this.kd.set(c,a),this.jd.set(c,e),Ra(this.pa,d),Li(this);else throw this.Mc.add(d),Error("Unable to request floating point array buffers.");}},a);f.send()},Li=function(a){a.dispatchEvent(new yg(a.pa.length))};Ji.prototype.c=function(){this.jd=this.kd=null;Ji.j.c.call(this)};var X=function(){D.call(this);this.Ob=new Mi(0,4);this.La=new kd};x(X,D);v("ee.MapTileManager",X);X.uc=void 0;X.md=function(){return X.uc?X.uc:X.uc=new X};X.prototype.send=function(a,b,c,d,e){if(this.La.get(a))throw Error("[ee.MapTileManager] ID in use");b=new Ni(a,b,d,u(this.Ed,this),m(e)?e:1);this.La.set(a,b);a=u(this.qc,this,b);this.Ob.Va(a,c);return b};X.prototype.abort=function(a){if(a=this.La.get(a))a.Aa||(a.Aa=!0,a.ia=new B("abort")),this.Ed(a)};
|
|
X.prototype.qc=function(a,b){if(a.C||a.Aa)Oi(this,b);else if(a.gb=b,b.setActive(!0),b=new ng,a.C=b,!Pi(a))throw Error("Cannot dispatch first request!");};X.prototype.Ed=function(a){this.La.remove(a.getId());a.C&&(Oi(this,a.gb),a.C.T());a.rc&&a.rc(a.ia,a.Dd)};var Oi=function(a,b){b.setActive(!1);if(!eg(a.Ob,b))throw Error("Object not released");};X.prototype.c=function(){X.j.c.call(this);this.Ob.T();this.Ob=null;var a=this.La;Ha(a.s(),function(a){a.T()});a.clear();this.La=null};
|
|
var Ni=function(a,b,c,d,e){A.call(this);this.da=a;this.Qc=b;this.le=m(e)?e:1;this.rc=c;this.wa=d};x(Ni,A);h=Ni.prototype;h.Uc=0;h.Aa=!1;h.C=null;h.gb=null;h.ia=null;h.Dd=null;var Qi=["load","abort","error"];Ni.prototype.getId=function(){return this.da};Ni.prototype.getUrl=function(){return this.Qc};Ni.prototype.ce=function(a){if(this.Aa)this.wa&&this.wa(this);else switch(a.type){case "load":this.ia=a;this.wa&&this.wa(this);break;case "error":case "abort":Pi(this)||(this.ia=a,this.wa&&this.wa(this))}};
|
|
Ni.prototype.c=function(){Ni.j.c.call(this);delete this.rc;delete this.wa};var Pi=function(a){if(a.Uc>a.le)return!1;a.Uc++;qg(a.C,a.da);setTimeout(u(a.ve,a),0);return!0};
|
|
Ni.prototype.ve=function(){if(!this.Aa){var a=u(function(a){this.Aa||(pg(this.C,this.da,a),Zb(this.C,Qi,u(this.ce,this)),this.C.start())},this),b=this.getUrl();if(ef(b).Y.ha("profiling")){var c=new E;c.Ma="blob";c.X("complete",u(function(){this.Dd=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;var d;if(200<=c.getStatus()&&300>c.getStatus())try{d=URL.createObjectURL(ie(c))}catch(e){}a(d||b)},this));c.bb("ready",u(c.T,c));c.send(b,"GET")}else a(b)}};var Ri=function(){this.N=!1};
|
|
x(Ri,A);Ri.prototype.setActive=function(a){this.N=a};Ri.prototype.rd=function(){return this.N};var Mi=function(a,b){jg.call(this,a,b)};x(Mi,jg);Mi.prototype.ec=function(){return new Ri};Mi.prototype.nb=function(a){a.T()};Mi.prototype.Ac=function(a){return!a.aa&&!a.rd()};var Y=function(a,b,c,d,e){wg.call(this,a,b,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.zb=m(d.zb)?d.zb:!0;this.name=d.name;this.Nc=new pd;this.Bc=1;this.J=e||null};x(Y,wg);v("ee.MapLayerOverlay",Y);Y.prototype.Yb=function(a){return Sb(this,"tileevent",a)};Y.prototype.addTileCallback=Y.prototype.Yb;Y.prototype.Fc=function(a){ac(a)};
|
|
Y.prototype.removeTileCallback=Y.prototype.Fc;Y.prototype.getTile=function(a,b,c){if(b<this.minZoom||0>a.y||a.y>=1<<b)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;b=xg(this,a,b);a=[this.url,b].join("/")+"?token="+this.Nb;this.J&&this.J.isEnabled()&&(a+="&profiling=1");b=[b,this.na,this.Nb].join("/");this.na+=1;c=pe("DIV",{id:b});var d=(new Date).getTime()/1E3;this.pa.push(b);X.md().send(b,a,d,u(this.be,this,c,b));Li(this);return c};Y.prototype.oc=function(){return this.pa.length};
|
|
Y.prototype.releaseTile=function(a){X.md().abort(a.id);this.Nc.remove(m(a.firstElementChild)?a.firstElementChild:se(a.firstChild));""!==a.id&&(this.Mc.remove(a.id),this.J&&this.J.se(a.id))};Y.prototype.setOpacity=function(a){this.Bc=a;var b=this.Nc.za();jd(b,function(b){ve(b,a)})};Y.prototype.getTile=Y.prototype.getTile;Y.prototype.setOpacity=Y.prototype.setOpacity;Y.prototype.releaseTile=Y.prototype.releaseTile;
|
|
Y.prototype.be=function(a,b,c,d){"error"==c.type?(Ra(this.pa,b),this.Mc.add(b),this.dispatchEvent(c)):(Ra(this.pa,b),c.target&&"load"==c.type&&(c=c.target,this.Nc.add(c),1!=this.Bc&&ve(c,this.Bc),a.appendChild(c)),Li(this));this.J&&null!==d&&this.J.Qd(b,d)};var Si=function(a,b){if(!(this instanceof Si))return new Si(a,b);this.ea=a;this.ma=b};x(Si,J);v("ee.SavedFunction",Si);Si.prototype.encode=function(a){return L("LoadAlgorithmById",this.ea).encode(a)};Si.prototype.F=function(){return this.ma};(function(){var a={},b="ee.Image.prototype.getThumbURL ee.Image.cat ee.data.getApiBaseUrl ee.data.getXsrfToken ee.Collection.prototype.sort ee.ComputedObject.prototype.serialize ee.Serializer.toJSON ee.data.makeTableDownloadUrl ee.Filter.metadata ee.Image.prototype.expression ee.Filter.or ee.ApiFunction._apply ee.data.getTileBaseUrl ee.data.setDeadline ee.Geometry.prototype.serialize ee.data.getAuthToken ee.FeatureCollection.prototype.getDownloadURL ee.Filter.gt ee.Feature.prototype.getMap ee.Collection.prototype.map ee.data.authenticateViaPopup ee.Image.rgb ee.Image ee.Image.prototype.getMap ee.Serializer.toReadableJSON ee.Deserializer.decode ee.Collection.prototype.iterate ee.ApiFunction.lookup ee.Filter.lt ee.call ee.Deserializer.fromJSON ee.data.setAuthTokenRefresher ee.data.getThumbId ee.Filter.and ee.data.getTileUrl ee.ImageCollection.prototype.getMap ee.InitState ee.data.getValue ee.data.getInfo ee.Filter.gte ee.Number ee.ImageCollection.prototype.getInfo ee.Filter ee.TILE_SIZE ee.initialize ee.Filter.prototype.not ee.data.getMapId ee.Image.prototype.select ee.FeatureCollection.prototype.select ee.Image.prototype.clip ee.data.makeThumbUrl ee.ImageCollection ee.Geometry.Polygon ee.Geometry.LineString ee.Function.prototype.apply ee.Geometry.LinearRing ee.Collection.prototype.filterDate ee.Collection.prototype.filterMetadata ee.Geometry.prototype.toGeoJSONString ee.Algorithms ee.ComputedObject.prototype.aside ee.ImageCollection.prototype.select ee.data.authenticate ee.Collection.prototype.filter ee.Geometry.prototype.toGeoJSON ee.Feature ee.Date ee.Function.prototype.call ee.Geometry ee.FeatureCollection.prototype.getMap ee.Filter.inList ee.data.makeDownloadUrl ee.Terrain ee.Dictionary ee.List ee.Filter.date ee.Serializer.encode ee.reset ee.ComputedObject.prototype.evaluate ee.data.clearAuthToken ee.Collection.prototype.filterBounds ee.Element.prototype.set ee.Geometry.Point ee.Filter.lte ee.data.getList ee.data.getTableDownloadId ee.Image.prototype.rename ee.ComputedObject.prototype.getInfo ee.Geometry.MultiPolygon ee.data.getAuthScopes ee.data.getDownloadId ee.Image.prototype.getDownloadURL ee.Collection.prototype.limit ee.FeatureCollection ee.Filter.neq ee.Feature.prototype.getInfo ee.Geometry.Rectangle ee.Image.prototype.getInfo ee.Filter.bounds ee.Filter.eq ee.apply ee.ApiFunction._call ee.Geometry.MultiPoint ee.data.getAuthClientId ee.Geometry.MultiLineString ee.String ee.FeatureCollection.prototype.getInfo ee.data.setAuthToken".split(" "),
|
|
c=[["params","opt_callback"],["var_args"],[],[],["property","opt_ascending"],[],["obj"],["id"],["name","operator","value"],["expression","opt_map"],["var_args"],["name","namedArgs"],[],["milliseconds"],[],[],["opt_format","opt_selectors","opt_filename","opt_callback"],["name","value"],["opt_visParams","opt_callback"],["algorithm","opt_dropNulls"],["opt_success","opt_error"],["r","g","b"],["opt_args"],["opt_visParams","opt_callback"],["obj"],["json"],["algorithm","opt_first"],["name"],["name","value"],
|
|
["func","var_args"],["json"],["refresher"],["params","opt_callback"],["var_args"],["mapid","x","y","z"],["opt_visParams","opt_callback"],[],["params","opt_callback"],["id","opt_callback"],["name","value"],["number"],["opt_callback"],["opt_filter"],[],["opt_baseurl","opt_tileurl","opt_successCallback","opt_errorCallback","opt_xsrfToken"],[],["params","opt_callback"],["var_args"],["selectors","opt_names"],["geometry"],["id"],["args"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],
|
|
["coords","opt_proj","opt_geodesic","opt_maxError"],["namedArgs"],["coords","opt_proj","opt_geodesic","opt_maxError"],["start","opt_end"],["name","operator","value"],[],[],["func","var_args"],["selectors","opt_names"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["newFilter"],[],["geometry","opt_properties"],["date","opt_tz"],["var_args"],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],["opt_visParams","opt_callback"],["opt_leftField","opt_rightValue","opt_rightField",
|
|
"opt_leftValue"],["id"],[],["opt_dict"],["list"],["start","opt_end"],["obj","opt_isCompound"],[],["callback"],[],["geometry"],["var_args"],["coords","opt_proj"],["name","value"],["params","opt_callback"],["params","opt_callback"],["var_args"],["opt_callback"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],[],["params","opt_callback"],["params","opt_callback"],["max","opt_property","opt_ascending"],["args","opt_column"],["name","value"],["opt_callback"],["coords","opt_proj","opt_geodesic",
|
|
"opt_maxError","opt_evenOdd"],["opt_callback"],["geometry","opt_errorMargin"],["name","value"],["func","namedArgs"],["name","var_args"],["coords","opt_proj"],[],["coords","opt_proj","opt_geodesic","opt_maxError"],["string"],["opt_callback"],"clientId tokenType accessToken expiresIn opt_extraScopes opt_callback opt_updateAuthLibrary".split(" ")];[V.prototype.pc,qi,Hf,Jf,R.prototype.sort,H.prototype.v,Ig,Sf,vh,V.prototype.jc,rh,Wg,If,Ff,S.prototype.v,wf,U.prototype.sa,oh,T.prototype.getMap,R.prototype.map,
|
|
of,pi,V,V.prototype.getMap,Jg,$h,R.prototype.sd,Vg,mh,Fi,ai,tf,Nf,qh,Lf,W.prototype.getMap,Ei,Mf,Xf,nh,yh,W.prototype.W,Q,256,zi,Q.prototype.Ga,Kf,V.prototype.select,U.prototype.select,V.prototype.clip,Of,W,Wh,Th,J.prototype.apply,Uh,R.prototype.kc,R.prototype.lc,S.prototype.Pc,Bi,H.prototype.Tc,W.prototype.select,pf,R.prototype.filter,S.prototype.Oc,T,Ih,J.prototype.call,S,U.prototype.getMap,th,Qf,ti,ci,hi,sh,Hg,Ci,H.prototype.evaluate,vf,R.prototype.hd,P.prototype.set,Oh,ph,Yf,Rf,V.prototype.Fd,
|
|
H.prototype.W,Xh,yf,Pf,V.prototype.sa,R.prototype.limit,U,lh,T.prototype.W,Sh,V.prototype.W,uh,kh,Gi,L,Rh,xf,Vh,Bh,U.prototype.W,rf].forEach(function(d,e){d&&(a[d.toString()]={name:b[e],paramNames:c[e]})});k.EXPORTED_FN_INFO=a})();}).call(this);
|