mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
200 lines
101 KiB
JavaScript
200 lines
101 KiB
JavaScript
(function() {var h,aa=aa||{},l=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},n=function(a){return"array"==ca(a)},da=function(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},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},ea="closure_uid_"+
|
|
(1E9*Math.random()>>>0),fa=0,ga=function(a,b,c){return a.call.apply(a.bind,arguments)},ha=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")?ga:ha;return u.apply(null,arguments)},
|
|
ia=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)}},ja=Date.now||function(){return+new Date},v=function(a,b){var c=a.split("."),d=l;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&m(b)?d[e]=b:d=d[e]?d[e]:d[e]={}},w=function(a,b){function c(){}c.prototype=b.prototype;a.l=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Vd=function(a,c,f){for(var g=
|
|
Array(arguments.length-2),k=2;k<arguments.length;k++)g[k-2]=arguments[k];return b.prototype[c].apply(a,g)}};var ka=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},na=function(a){var b=la,c={},d;for(d in b)a.call(void 0,b[d],d,b)&&(c[d]=b[d]);return c},oa=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},pa=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},qa=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},ra=function(a){return null!==a&&"withCredentials"in a},sa=function(a){for(var b in a)return!1;return!0},ta=function(a,b){b in a&&delete a[b]},ua=function(a){var b=
|
|
{},c;for(c in a)b[c]=a[c];return b},va=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]=va(a[c]);return b}return a},wa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),xa=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<wa.length;f++)c=wa[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var x=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,x);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};w(x,Error);x.prototype.name="CustomError";var ya;var za=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},Ba=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ja=function(a){if(!Ca.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Da,"&"));-1!=a.indexOf("<")&&(a=a.replace(Ea,"<"));-1!=a.indexOf(">")&&(a=a.replace(Fa,">"));-1!=a.indexOf('"')&&(a=a.replace(Ga,"""));-1!=a.indexOf("'")&&
|
|
(a=a.replace(Ha,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(Ia,"�"));return a},Da=/&/g,Ea=/</g,Fa=/>/g,Ga=/"/g,Ha=/'/g,Ia=/\x00/g,Ca=/[\x00&<>"']/,Ka=function(a,b){return a<b?-1:a>b?1:0};var La=function(a,b){b.unshift(a);x.call(this,za.apply(null,b));b.shift()};w(La,x);La.prototype.name="AssertionError";
|
|
var Ma=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 La(""+e,f||[]);},y=function(a,b,c){a||Ma("",null,b,Array.prototype.slice.call(arguments,2));return a},Na=function(a,b){throw new La("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Oa=function(a,b,c){r(a)||Ma("Expected function but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var Pa=Array.prototype.indexOf?function(a,b,c){y(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Qa=Array.prototype.lastIndexOf?function(a,b,c){y(null!=a.length);return Array.prototype.lastIndexOf.call(a,b,null==c?a.length-1:c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if(p(a))return p(b)&&1==
|
|
b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1},Ra=Array.prototype.forEach?function(a,b,c){y(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Sa=Array.prototype.filter?function(a,b,c){y(null!=a.length);return Array.prototype.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=p(a)?a.split(""):a,k=0;k<d;k++)if(k in g){var D=g[k];b.call(c,D,k,a)&&(e[f++]=
|
|
D)}return e},Ta=Array.prototype.map?function(a,b,c){y(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=p(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},Ua=Array.prototype.some?function(a,b,c){y(null!=a.length);return Array.prototype.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1},Va=Array.prototype.every?function(a,b,c){y(null!=a.length);
|
|
return Array.prototype.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0},Xa=function(a){var b;a:{b=Wa;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]},Ya=function(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},$a=function(a,b){var c=Pa(a,b),d;(d=0<=c)&&Za(a,c);return d},Za=function(a,b){y(null!=a.length);
|
|
Array.prototype.splice.call(a,b,1)},ab=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)},bb=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[]},cb=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(da(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var g=0;g<f;g++)a[e+g]=d[g]}else a.push(d)}},db=function(a,b,c){y(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,
|
|
b,c)},eb=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],f;f=e;f=t(f)?"o"+(f[ea]||(f[ea]=++fa)):(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c};var fb=function(a){return a};var gb=function(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},hb=function(a){return eval("("+a+")")},kb=function(a){return(new jb(void 0)).w(a)},jb=function(a){this.lb=a};
|
|
jb.prototype.w=function(a){var b=[];lb(this,a,b);return b.join("")};
|
|
var lb=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],lb(a,a.lb?a.lb.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),mb(d,c),c.push(":"),lb(a,a.lb?a.lb.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":mb(b,
|
|
c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}},nb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},ob=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,mb=function(a,b){b.push('"',a.replace(ob,function(a){var b=nb[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),
|
|
nb[a]=b);return b}),'"')};var pb;a:{var qb=l.navigator;if(qb){var rb=qb.userAgent;if(rb){pb=rb;break a}}pb=""}var z=function(a){return-1!=pb.indexOf(a)};var sb=z("Opera")||z("OPR"),A=z("Trident")||z("MSIE"),tb=z("Edge"),ub=z("Gecko")&&!(-1!=pb.toLowerCase().indexOf("webkit")&&!z("Edge"))&&!(z("Trident")||z("MSIE"))&&!z("Edge"),vb=-1!=pb.toLowerCase().indexOf("webkit")&&!z("Edge"),wb=function(){var a=pb;if(ub)return/rv\:([^\);]+)(\)|;)/.exec(a);if(tb)return/Edge\/([\d\.]+)/.exec(a);if(A)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(vb)return/WebKit\/(\S+)/.exec(a)},xb=function(){var a=l.document;return a?a.documentMode:void 0},yb=function(){if(sb&&
|
|
l.opera){var a;var b=l.opera.version;try{a=b()}catch(c){a=b}return a}a="";(b=wb())&&(a=b?b[1]:"");return A&&(b=xb(),b>parseFloat(a))?String(b):a}(),zb={},Ab=function(a){var b;if(!(b=zb[a])){b=0;for(var c=Ba(String(yb)).split("."),d=Ba(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",k=d[f]||"",D=RegExp("(\\d*)(\\D*)","g"),ma=RegExp("(\\d*)(\\D*)","g");do{var U=D.exec(g)||["","",""],ib=ma.exec(k)||["","",""];if(0==U[0].length&&0==ib[0].length)break;b=Ka(0==U[1].length?
|
|
0:parseInt(U[1],10),0==ib[1].length?0:parseInt(ib[1],10))||Ka(0==U[2].length,0==ib[2].length)||Ka(U[2],ib[2])}while(0==b)}b=zb[a]=0<=b}return b},Bb=l.document,Cb=Bb&&A?xb()||("CSS1Compat"==Bb.compatMode?parseInt(yb,10):5):void 0;var Db=!A||9<=Cb,Eb=!ub&&!A||A&&9<=Cb||ub&&Ab("1.9.1");A&&Ab("9");var Gb=function(a,b){ka(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:Fb.hasOwnProperty(d)?a.setAttribute(Fb[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},Fb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Ib=function(a,b,c){return Hb(document,
|
|
arguments)},Hb=function(a,b){var c=b[0],d=b[1];if(!Db&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',Ja(d.name),'"');if(d.type){c.push(' type="',Ja(d.type),'"');var e={};xa(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(" "):Gb(c,d));2<b.length&&Jb(a,c,b);return c},Jb=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];!da(f)||t(f)&&0<f.nodeType?d(f):Ra(Kb(f)?
|
|
bb(f):f,d)}},Lb=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},Mb=function(a){y(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},Kb=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},Nb=function(a){this.Gb=a||l.document||document};h=Nb.prototype;h.Vc=function(a,b,c){return Hb(this.Gb,arguments)};h.createElement=function(a){return this.Gb.createElement(a)};
|
|
h.createTextNode=function(a){return this.Gb.createTextNode(String(a))};h.appendChild=function(a,b){a.appendChild(b)};h.nc=function(a){return Eb&&void 0!=a.children?a.children:Sa(a.childNodes,function(a){return 1==a.nodeType})};h.contains=function(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};var Ob=function(a,b,c){this.qd=c;this.Wc=a;this.Gd=b;this.gb=0;this.ab=null};Ob.prototype.get=function(){var a;0<this.gb?(this.gb--,a=this.ab,this.ab=a.next,a.next=null):a=this.Wc();return a};Ob.prototype.put=function(a){this.Gd(a);this.gb<this.qd&&(this.gb++,a.next=this.ab,this.ab=a)};var Pb=function(a){l.setTimeout(function(){throw a;},0)},Qb,Rb=function(){var a=l.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!z("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&&!z("Trident")&&!z("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(m(c.next)){c=c.next;var a=c.gc;c.gc=null;a()}};return function(a){d.next={gc: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){l.setTimeout(a,0)}};var Sb=function(){this.vb=this.ka=null},Ub=new Ob(function(){return new Tb},function(a){a.reset()},100);Sb.prototype.add=function(a,b){var c=Ub.get();c.set(a,b);this.vb?this.vb.next=c:(y(!this.ka),this.ka=c);this.vb=c};Sb.prototype.remove=function(){var a=null;this.ka&&(a=this.ka,this.ka=this.ka.next,this.ka||(this.vb=null),a.next=null);return a};var Tb=function(){this.next=this.scope=this.Jb=null};Tb.prototype.set=function(a,b){this.Jb=a;this.scope=b;this.next=null};
|
|
Tb.prototype.reset=function(){this.next=this.scope=this.Jb=null};var Zb=function(a,b){Vb||Wb();Xb||(Vb(),Xb=!0);Yb.add(a,b)},Vb,Wb=function(){if(l.Promise&&l.Promise.resolve){var a=l.Promise.resolve(void 0);Vb=function(){a.then($b)}}else Vb=function(){var a=$b;!r(l.setImmediate)||l.Window&&l.Window.prototype&&l.Window.prototype.setImmediate==l.setImmediate?(Qb||(Qb=Rb()),Qb(a)):l.setImmediate(a)}},Xb=!1,Yb=new Sb,$b=function(){for(var a=null;a=Yb.remove();){try{a.Jb.call(a.scope)}catch(b){Pb(b)}Ub.put(a)}Xb=!1};var ac=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},bc=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var ec=function(a,b){this.F=0;this.W=void 0;this.ma=this.T=this.h=null;this.Ya=this.Ib=!1;if(a!=ba)try{var c=this;a.call(b,function(a){cc(c,2,a)},function(a){if(!(a instanceof dc))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}cc(c,3,a)})}catch(d){cc(this,3,d)}},fc=function(){this.next=this.context=this.pa=this.ha=this.ca=null;this.Ra=!1};fc.prototype.reset=function(){this.context=this.pa=this.ha=this.ca=null;this.Ra=!1};
|
|
var gc=new Ob(function(){return new fc},function(a){a.reset()},100),hc=function(a,b,c){var d=gc.get();d.ha=a;d.pa=b;d.context=c;return d};ec.prototype.then=function(a,b,c){null!=a&&Oa(a,"opt_onFulfilled should be a function.");null!=b&&Oa(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return ic(this,r(a)?a:null,r(b)?b:null,c)};ac(ec);ec.prototype.cancel=function(a){0==this.F&&Zb(function(){var b=new dc(a);jc(this,b)},this)};
|
|
var jc=function(a,b){if(0==a.F)if(a.h){var c=a.h;if(c.T){for(var d=0,e=null,f=null,g=c.T;g&&(g.Ra||(d++,g.ca==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.F&&1==d?jc(c,b):(f?(d=f,y(c.T),y(null!=d),d.next==c.ma&&(c.ma=d),d.next=d.next.next):kc(c),lc(c,e,3,b)))}a.h=null}else cc(a,3,b)},nc=function(a,b){a.T||2!=a.F&&3!=a.F||mc(a);y(null!=b.ha);a.ma?a.ma.next=b:a.T=b;a.ma=b},ic=function(a,b,c,d){var e=hc(null,null,null);e.ca=new ec(function(a,g){e.ha=b?function(c){try{var e=b.call(d,c);a(e)}catch(ma){g(ma)}}:
|
|
a;e.pa=c?function(b){try{var e=c.call(d,b);!m(e)&&b instanceof dc?g(b):a(e)}catch(ma){g(ma)}}:g});e.ca.h=a;nc(a,e);return e.ca};ec.prototype.Ld=function(a){y(1==this.F);this.F=0;cc(this,2,a)};ec.prototype.Md=function(a){y(1==this.F);this.F=0;cc(this,3,a)};
|
|
var cc=function(a,b,c){if(0==a.F){a==c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.F=1;var d;a:{var e=c,f=a.Ld,g=a.Md;if(e instanceof ec)null!=f&&Oa(f,"opt_onFulfilled should be a function."),null!=g&&Oa(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),nc(e,hc(f||ba,g||null,a)),d=!0;else if(bc(e))e.then(f,g,a),d=!0;else{if(t(e))try{var k=e.then;if(r(k)){oc(e,k,f,g,a);d=!0;break a}}catch(D){g.call(a,D);d=!0;break a}d=!1}}d||
|
|
(a.W=c,a.F=b,a.h=null,mc(a),3!=b||c instanceof dc||pc(a,c))}},oc=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},k=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,k)}catch(D){k(D)}},mc=function(a){a.Ib||(a.Ib=!0,Zb(a.$c,a))},kc=function(a){var b=null;a.T&&(b=a.T,a.T=b.next,b.next=null);a.T||(a.ma=null);null!=b&&y(null!=b.ha);return b};ec.prototype.$c=function(){for(var a=null;a=kc(this);)lc(this,a,this.F,this.W);this.Ib=!1};
|
|
var lc=function(a,b,c,d){if(3==c&&b.pa&&!b.Ra)for(;a&&a.Ya;a=a.h)a.Ya=!1;if(b.ca)b.ca.h=null,qc(b,c,d);else try{b.Ra?b.ha.call(b.context):qc(b,c,d)}catch(e){rc.call(null,e)}gc.put(b)},qc=function(a,b,c){2==b?a.ha.call(a.context,c):a.pa&&a.pa.call(a.context,c)},pc=function(a,b){a.Ya=!0;Zb(function(){a.Ya&&rc.call(null,b)})},rc=Pb,dc=function(a){x.call(this,a)};w(dc,x);dc.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 sc=function(a,b){this.nb=[];this.xc=a;this.jc=b||null;this.Ea=this.oa=!1;this.W=void 0;this.Yb=this.ec=this.zb=!1;this.sb=0;this.h=null;this.Ab=0};sc.prototype.cancel=function(a){if(this.oa)this.W instanceof sc&&this.W.cancel();else{if(this.h){var b=this.h;delete this.h;a?b.cancel(a):(b.Ab--,0>=b.Ab&&b.cancel())}this.xc?this.xc.call(this.jc,this):this.Yb=!0;this.oa||tc(this,new uc)}};sc.prototype.hc=function(a,b){this.zb=!1;vc(this,a,b)};
|
|
var vc=function(a,b,c){a.oa=!0;a.W=c;a.Ea=!b;wc(a)},yc=function(a){if(a.oa){if(!a.Yb)throw new xc;a.Yb=!1}},tc=function(a,b){yc(a);zc(b);vc(a,!1,b)},zc=function(a){y(!(a instanceof sc),"An execution sequence may not be initiated with a blocking Deferred.")},Ac=function(a,b,c){y(!a.ec,"Blocking Deferreds can not be re-used");a.nb.push([b,c,void 0]);a.oa&&wc(a)};
|
|
sc.prototype.then=function(a,b,c){var d,e,f=new ec(function(a,b){d=a;e=b});Ac(this,d,function(a){a instanceof uc?f.cancel():e(a)});return f.then(a,b,c)};ac(sc);
|
|
var Bc=function(a){return Ua(a.nb,function(a){return r(a[1])})},wc=function(a){if(a.sb&&a.oa&&Bc(a)){var b=a.sb,c=Cc[b];c&&(l.clearTimeout(c.V),delete Cc[b]);a.sb=0}a.h&&(a.h.Ab--,delete a.h);for(var b=a.W,d=c=!1;a.nb.length&&!a.zb;){var e=a.nb.shift(),f=e[0],g=e[1],e=e[2];if(f=a.Ea?g:f)try{var k=f.call(e||a.jc,b);m(k)&&(a.Ea=a.Ea&&(k==b||k instanceof Error),a.W=b=k);if(bc(b)||"function"===typeof l.Promise&&b instanceof l.Promise)d=!0,a.zb=!0}catch(D){b=D,a.Ea=!0,Bc(a)||(c=!0)}}a.W=b;d&&(k=u(a.hc,
|
|
a,!0),d=u(a.hc,a,!1),b instanceof sc?(Ac(b,k,d),b.ec=!0):b.then(k,d));c&&(b=new Dc(b),Cc[b.V]=b,a.sb=b.V)},xc=function(){x.call(this)};w(xc,x);xc.prototype.message="Deferred has already fired";xc.prototype.name="AlreadyCalledError";var uc=function(){x.call(this)};w(uc,x);uc.prototype.message="Deferred was canceled";uc.prototype.name="CanceledError";var Dc=function(a){this.V=l.setTimeout(u(this.Jd,this),0);this.Wa=a};
|
|
Dc.prototype.Jd=function(){y(Cc[this.V],"Cannot throw an error that is not scheduled.");delete Cc[this.V];throw this.Wa;};var Cc={};var Ic=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={Ec:d,Ma:void 0},f=new sc(Ec,e),g=null,k=null!=b.timeout?b.timeout:5E3;0<k&&(g=window.setTimeout(function(){Fc(d,!0);tc(f,new Gc(1,"Timeout reached for loading script "+a))},k),e.Ma=g);d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(Fc(d,b.Wd||!1,g),yc(f),zc(null),vc(f,!0,null))};d.onerror=function(){Fc(d,!0,g);tc(f,new Gc(0,"Error while loading script "+
|
|
a))};e=b.attributes||{};xa(e,{type:"text/javascript",charset:"UTF-8",src:a});Gb(d,e);Hc(c).appendChild(d)},Hc=function(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement},Ec=function(){if(this&&this.Ec){var a=this.Ec;a&&"SCRIPT"==a.tagName&&Fc(a,!0,this.Ma)}},Fc=function(a,b,c){null!=c&&l.clearTimeout(c);a.onload=ba;a.onerror=ba;a.onreadystatechange=ba;b&&window.setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},0)},Gc=function(a,b){var c="Jsloader error (code #"+
|
|
a+")";b&&(c+=": "+b);x.call(this,c);this.code=a};w(Gc,x);var Jc=function(){this.Y=this.Y;this.hb=this.hb};Jc.prototype.Y=!1;Jc.prototype.N=function(){this.Y||(this.Y=!0,this.s())};Jc.prototype.s=function(){if(this.hb)for(;this.hb.length;)this.hb.shift()()};var Kc=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.sa=!1;this.Dc=!0};Kc.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Dc=!1};var Lc=function(a){Lc[" "](a);return a};Lc[" "]=ba;var Mc=!A||9<=Cb,Nc=A&&!Ab("9");!vb||Ab("528");ub&&Ab("1.9b")||A&&Ab("8")||sb&&Ab("9.5")||vb&&Ab("528");ub&&!Ab("8")||A&&Ab("9");var Oc=function(a,b){Kc.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.da=this.state=null;if(a){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;if(e){if(ub){var f;a:{try{Lc(e.nodeName);f=!0;break a}catch(g){}f=
|
|
!1}f||(e=null)}}else"mouseover"==c?e=a.fromElement:"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;null===d?(this.offsetX=vb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=vb||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||
|
|
0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.da=a;a.defaultPrevented&&this.preventDefault()}};w(Oc,Kc);
|
|
Oc.prototype.preventDefault=function(){Oc.l.preventDefault.call(this);var a=this.da;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Nc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Pc="closure_listenable_"+(1E6*Math.random()|0),Qc=function(a){return!(!a||!a[Pc])},Rc=0;var Sc=function(a,b,c,d,e){this.listener=a;this.jb=null;this.src=b;this.type=c;this.Ta=!!d;this.$a=e;this.key=++Rc;this.ta=this.Sa=!1},Tc=function(a){a.ta=!0;a.listener=null;a.jb=null;a.src=null;a.$a=null};var Uc=function(a){this.src=a;this.A={};this.Na=0};Uc.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.A[f];a||(a=this.A[f]=[],this.Na++);var g=Vc(a,b,d,e);-1<g?(b=a[g],c||(b.Sa=!1)):(b=new Sc(b,this.src,f,!!d,e),b.Sa=c,a.push(b));return b};Uc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.A))return!1;var e=this.A[a];b=Vc(e,b,c,d);return-1<b?(Tc(e[b]),Za(e,b),0==e.length&&(delete this.A[a],this.Na--),!0):!1};
|
|
var Wc=function(a,b){var c=b.type;c in a.A&&$a(a.A[c],b)&&(Tc(b),0==a.A[c].length&&(delete a.A[c],a.Na--))};Uc.prototype.kb=function(a){a=a&&a.toString();var b=0,c;for(c in this.A)if(!a||c==a){for(var d=this.A[c],e=0;e<d.length;e++)++b,Tc(d[e]);delete this.A[c];this.Na--}return b};Uc.prototype.Ca=function(a,b,c,d){a=this.A[a.toString()];var e=-1;a&&(e=Vc(a,b,c,d));return-1<e?a[e]:null};var Vc=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.ta&&f.listener==b&&f.Ta==!!c&&f.$a==d)return e}return-1};var Xc="closure_lm_"+(1E6*Math.random()|0),Yc={},Zc=0,$c=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)$c(a,b[f],c,d,e);return null}c=ad(c);return Qc(a)?a.Ja(b,c,d,e):bd(a,b,c,!1,d,e)},bd=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e,k=cd(a);k||(a[Xc]=k=new Uc(a));c=k.add(b,c,d,e,f);if(c.jb)return c;d=dd();c.jb=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent(ed(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
|
|
Zc++;return c},dd=function(){var a=fd,b=Mc?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},gd=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)gd(a,b[f],c,d,e);return null}c=ad(c);return Qc(a)?a.eb(b,c,d,e):bd(a,b,c,!0,d,e)},hd=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)hd(a,b[f],c,d,e);else c=ad(c),Qc(a)?a.tb(b,c,d,e):a&&(a=cd(a))&&(b=a.Ca(b,c,!!d,e))&&id(b)},id=function(a){if(!q(a)&&a&&!a.ta){var b=a.src;if(Qc(b))Wc(b.O,
|
|
a);else{var c=a.type,d=a.jb;b.removeEventListener?b.removeEventListener(c,d,a.Ta):b.detachEvent&&b.detachEvent(ed(c),d);Zc--;(c=cd(b))?(Wc(c,a),0==c.Na&&(c.src=null,b[Xc]=null)):Tc(a)}}},ed=function(a){return a in Yc?Yc[a]:Yc[a]="on"+a},kd=function(a,b,c,d){var e=!0;if(a=cd(a))if(b=a.A[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.Ta==c&&!f.ta&&(f=jd(f,d),e=e&&!1!==f)}return e},jd=function(a,b){var c=a.listener,d=a.$a||a.src;a.Sa&&id(a);return c.call(d,b)},fd=function(a,b){if(a.ta)return!0;
|
|
if(!Mc){var c;if(!(c=b))a:{c=["window","event"];for(var d=l,e;e=c.shift();)if(null!=d[e])d=d[e];else{c=null;break a}c=d}e=c;c=new Oc(e,this);d=!0;if(!(0>e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(D){f=!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var f=a.type,g=e.length-1;!c.sa&&0<=g;g--){c.currentTarget=e[g];var k=kd(e[g],f,!0,c),d=d&&k}for(g=0;!c.sa&&g<e.length;g++)c.currentTarget=e[g],
|
|
k=kd(e[g],f,!1,c),d=d&&k}return d}return jd(a,new Oc(b,this))},cd=function(a){a=a[Xc];return a instanceof Uc?a:null},ld="__closure_events_fn_"+(1E9*Math.random()>>>0),ad=function(a){y(a,"Listener can not be null.");if(r(a))return a;y(a.handleEvent,"An object listener must have handleEvent method.");a[ld]||(a[ld]=function(b){return a.handleEvent(b)});return a[ld]};var B=function(){Jc.call(this);this.O=new Uc(this);this.Mc=this;this.Vb=null};w(B,Jc);B.prototype[Pc]=!0;h=B.prototype;h.addEventListener=function(a,b,c,d){$c(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){hd(this,a,b,c,d)};
|
|
h.dispatchEvent=function(a){md(this);var b,c=this.Vb;if(c){b=[];for(var d=1;c;c=c.Vb)b.push(c),y(1E3>++d,"infinite loop")}c=this.Mc;d=a.type||a;if(p(a))a=new Kc(a,c);else if(a instanceof Kc)a.target=a.target||c;else{var e=a;a=new Kc(d,c);xa(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.sa&&0<=g;g--)f=a.currentTarget=b[g],e=nd(f,d,!0,a)&&e;a.sa||(f=a.currentTarget=c,e=nd(f,d,!0,a)&&e,a.sa||(e=nd(f,d,!1,a)&&e));if(b)for(g=0;!a.sa&&g<b.length;g++)f=a.currentTarget=b[g],e=nd(f,d,!1,a)&&e;return e};
|
|
h.s=function(){B.l.s.call(this);this.O&&this.O.kb(void 0);this.Vb=null};h.Ja=function(a,b,c,d){md(this);return this.O.add(String(a),b,!1,c,d)};h.eb=function(a,b,c,d){return this.O.add(String(a),b,!0,c,d)};h.tb=function(a,b,c,d){return this.O.remove(String(a),b,c,d)};var nd=function(a,b,c,d){b=a.O.A[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.ta&&g.Ta==c){var k=g.listener,D=g.$a||g.src;g.Sa&&Wc(a.O,g);e=!1!==k.call(D,d)&&e}}return e&&0!=d.Dc};
|
|
B.prototype.Ca=function(a,b,c,d){return this.O.Ca(String(a),b,c,d)};var md=function(a){y(a.O,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var od="StopIteration"in l?l.StopIteration:{message:"StopIteration",stack:""},pd=function(){};pd.prototype.next=function(){throw od;};pd.prototype.la=function(){return this};
|
|
var qd=function(a){if(a instanceof pd)return a;if("function"==typeof a.la)return a.la(!1);if(da(a)){var b=0,c=new pd;c.next=function(){for(;;){if(b>=a.length)throw od;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},rd=function(a,b){if(da(a))try{Ra(a,b,void 0)}catch(c){if(c!==od)throw c;}else{a=qd(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==od)throw c;}}};var sd=function(a,b){this.j={};this.c=[];this.Oa=this.f=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};h=sd.prototype;h.u=function(){return this.f};h.v=function(){td(this);for(var a=[],b=0;b<this.c.length;b++)a.push(this.j[this.c[b]]);return a};h.K=function(){td(this);return this.c.concat()};h.X=function(a){return ud(this.j,a)};h.isEmpty=function(){return 0==this.f};
|
|
h.clear=function(){this.j={};this.Oa=this.f=this.c.length=0};h.remove=function(a){return ud(this.j,a)?(delete this.j[a],this.f--,this.Oa++,this.c.length>2*this.f&&td(this),!0):!1};var td=function(a){if(a.f!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];ud(a.j,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.f!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],ud(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}};h=sd.prototype;h.get=function(a,b){return ud(this.j,a)?this.j[a]:b};
|
|
h.set=function(a,b){ud(this.j,a)||(this.f++,this.c.push(a),this.Oa++);this.j[a]=b};h.addAll=function(a){var b;a instanceof sd?(b=a.K(),a=a.v()):(b=qa(a),a=pa(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.K(),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 sd(this)};
|
|
h.la=function(a){td(this);var b=0,c=this.Oa,d=this,e=new pd;e.next=function(){if(c!=d.Oa)throw Error("The map has changed since the iterator was created");if(b>=d.c.length)throw od;var e=d.c[b++];return a?e:d.j[e]};return e};var ud=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var vd=function(a){if(a.v&&"function"==typeof a.v)return a.v();if(p(a))return a.split("");if(da(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return pa(a)},wd=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if(da(a)||p(a))Ra(a,b,void 0);else{var c;if(a.K&&"function"==typeof a.K)c=a.K();else if(a.v&&"function"==typeof a.v)c=void 0;else if(da(a)||p(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=qa(a);for(var d=vd(a),e=d.length,f=0;f<e;f++)b.call(void 0,
|
|
d[f],c&&c[f],a)}};var xd=function(a){this.j=new sd;a&&this.addAll(a)},yd=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ea]||(a[ea]=++fa)):b.substr(0,1)+a};h=xd.prototype;h.u=function(){return this.j.u()};h.add=function(a){this.j.set(yd(a),a)};h.addAll=function(a){a=vd(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};h.kb=function(a){a=vd(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};h.remove=function(a){return this.j.remove(yd(a))};h.clear=function(){this.j.clear()};h.isEmpty=function(){return this.j.isEmpty()};
|
|
h.contains=function(a){return this.j.X(yd(a))};h.v=function(){return this.j.v()};h.clone=function(){return new xd(this)};h.la=function(){return this.j.la(!1)};var zd=function(a,b,c,d,e){this.reset(a,b,c,d,e)};zd.prototype.lc=null;var Ad=0;zd.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Ad++;d||ja();this.Ia=a;this.vd=b;delete this.lc};zd.prototype.Gc=function(a){this.Ia=a};var Bd=function(a){this.wd=a;this.pc=this.Bb=this.Ia=this.h=null},Cd=function(a,b){this.name=a;this.value=b};Cd.prototype.toString=function(){return this.name};var Dd=new Cd("SEVERE",1E3),Ed=new Cd("CONFIG",700),Fd=new Cd("FINE",500);Bd.prototype.getParent=function(){return this.h};Bd.prototype.nc=function(){this.Bb||(this.Bb={});return this.Bb};Bd.prototype.Gc=function(a){this.Ia=a};var Gd=function(a){if(a.Ia)return a.Ia;if(a.h)return Gd(a.h);Na("Root logger has no level set.");return null};
|
|
Bd.prototype.log=function(a,b,c){if(a.value>=Gd(this).value)for(r(b)&&(b=b()),a=new zd(a,String(b),this.wd),c&&(a.lc=c),c="log:"+a.vd,l.console&&(l.console.timeStamp?l.console.timeStamp(c):l.console.markTimeline&&l.console.markTimeline(c)),l.msWriteProfilerMark&&l.msWriteProfilerMark(c),c=this;c;){b=c;var d=a;if(b.pc)for(var e=0,f=void 0;f=b.pc[e];e++)f(d);c=c.getParent()}};
|
|
var Hd={},Id=null,Jd=function(a){Id||(Id=new Bd(""),Hd[""]=Id,Id.Gc(Ed));var b;if(!(b=Hd[a])){b=new Bd(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Jd(a.substr(0,c));c.nc()[d]=b;b.h=c;Hd[a]=b}return b};var Kd=function(a,b){a&&a.log(Fd,b,void 0)};var Ld=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<b?-1:l.setTimeout(a,b||0)};var Md=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Nd=function(a,b){if(a)for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,g=null;0<=e?(f=c[d].substring(0,e),g=c[d].substring(e+1)):f=c[d];b(f,g?decodeURIComponent(g.replace(/\+/g," ")):"")}};var Od=function(){};Od.prototype.fc=null;Od.prototype.Da=function(){var a;(a=this.fc)||(a={},Pd(this)&&(a[0]=!0,a[1]=!0),a=this.fc=a);return a};var Qd=function(a,b){this.Pd=a;this.Cd=b};w(Qd,Od);Qd.prototype.Cb=function(){return this.Pd()};Qd.prototype.Da=function(){return this.Cd()};var C=function(){return C.mc.Cb()};C.Lc=!1;C.Da=function(){return C.mc.Da()};C.Yd=function(a,b){C.Fc(new Qd(y(a),y(b)))};C.Fc=function(a){C.mc=a};var Rd=function(){};w(Rd,Od);Rd.prototype.Cb=function(){var a=Pd(this);return a?new ActiveXObject(a):new XMLHttpRequest};
|
|
var Pd=function(a){if(C.Lc)return"";if(!a.qc&&"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.qc=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.qc};C.Fc(new Rd);var E=function(a){B.call(this);this.headers=new sd;this.xb=a||null;this.J=!1;this.wb=this.a=null;this.Ha=this.vc=this.cb="";this.ga=this.Nb=this.bb=this.Hb=!1;this.xa=0;this.ob=null;this.Ka="";this.ub=this.Dd=this.Od=!1};w(E,B);var Sd=E.prototype,Td=Jd("goog.net.XhrIo");Sd.B=Td;var Ud=/^https?$/i,Vd=["POST","PUT"],Wd=[],Yd=function(a,b,c,d,e){var f=Xd,g=new E;Wd.push(g);b&&g.Ja("complete",b);g.eb("ready",g.Tc);f&&(g.xa=Math.max(0,f));g.send(a,c,d,e)};E.prototype.Tc=function(){this.N();$a(Wd,this)};
|
|
E.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.cb+"; newUri="+a);b=b?b.toUpperCase():"GET";this.cb=a;this.Ha="";this.vc=b;this.Hb=!1;this.J=!0;this.a=this.xb?this.xb.Cb():C();this.wb=this.xb?this.xb.Da():C.Da();this.a.onreadystatechange=u(this.Ac,this);this.Dd&&"onprogress"in this.a&&(this.a.onprogress=u(function(a){this.zc(a,!0)},this),this.a.upload&&(this.a.upload.onprogress=u(this.zc,this)));try{Kd(this.B,Zd(this,"Opening Xhr")),
|
|
this.Nb=!0,this.a.open(b,String(a),!0),this.Nb=!1}catch(f){Kd(this.B,Zd(this,"Error opening Xhr: "+f.message));this.Wa(5,f);return}a=c||"";var e=this.headers.clone();d&&wd(d,function(a,b){e.set(b,a)});d=Xa(e.K());c=l.FormData&&a instanceof l.FormData;!(0<=Pa(Vd,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.Ka&&(this.a.responseType=this.Ka);ra(this.a)&&(this.a.withCredentials=this.Od);try{$d(this),
|
|
0<this.xa&&(this.ub=ae(this.a),Kd(this.B,Zd(this,"Will abort after "+this.xa+"ms if incomplete, xhr2 "+this.ub)),this.ub?(this.a.timeout=this.xa,this.a.ontimeout=u(this.Ma,this)):this.ob=Ld(this.Ma,this.xa,this)),Kd(this.B,Zd(this,"Sending request")),this.bb=!0,this.a.send(a),this.bb=!1}catch(f){Kd(this.B,Zd(this,"Send error: "+f.message)),this.Wa(5,f)}};var ae=function(a){return A&&Ab(9)&&q(a.timeout)&&m(a.ontimeout)},Wa=function(a){return"content-type"==a.toLowerCase()};
|
|
E.prototype.Ma=function(){"undefined"!=typeof aa&&this.a&&(this.Ha="Timed out after "+this.xa+"ms, aborting",Kd(this.B,Zd(this,this.Ha)),this.dispatchEvent("timeout"),this.abort(8))};E.prototype.Wa=function(a,b){this.J=!1;this.a&&(this.ga=!0,this.a.abort(),this.ga=!1);this.Ha=b;be(this);ce(this)};var be=function(a){a.Hb||(a.Hb=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
|
|
E.prototype.abort=function(){this.a&&this.J&&(Kd(this.B,Zd(this,"Aborting")),this.J=!1,this.ga=!0,this.a.abort(),this.ga=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ce(this))};E.prototype.s=function(){this.a&&(this.J&&(this.J=!1,this.ga=!0,this.a.abort(),this.ga=!1),ce(this,!0));E.l.s.call(this)};E.prototype.Ac=function(){this.Y||(this.Nb||this.bb||this.ga?de(this):this.Bd())};E.prototype.Bd=function(){de(this)};
|
|
var de=function(a){if(a.J&&"undefined"!=typeof aa)if(a.wb[1]&&4==fe(a)&&2==a.getStatus())Kd(a.B,Zd(a,"Local request error detected and ignored"));else if(a.bb&&4==fe(a))Ld(a.Ac,0,a);else if(a.dispatchEvent("readystatechange"),4==fe(a)){Kd(a.B,Zd(a,"Request complete"));a.J=!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.cb).match(Md)[1]||null;if(!f&&l.self&&l.self.location)var g=
|
|
l.self.location.protocol,f=g.substr(0,g.length-1);e=!Ud.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var k;try{k=2<fe(a)?a.a.statusText:""}catch(D){Kd(a.B,"Can not get status: "+D.message),k=""}a.Ha=k+" ["+a.getStatus()+"]";be(a)}}finally{ce(a)}}};
|
|
E.prototype.zc=function(a,b){y("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(ge(a,"progress"));this.dispatchEvent(ge(a,b?"downloadprogress":"uploadprogress"))};
|
|
var ge=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},ce=function(a,b){if(a.a){$d(a);var c=a.a,d=a.wb[0]?ba:null;a.a=null;a.wb=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.B)&&c.log(Dd,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},$d=function(a){a.a&&a.ub&&(a.a.ontimeout=null);q(a.ob)&&(l.clearTimeout(a.ob),a.ob=null)};E.prototype.sc=function(){return!!this.a};
|
|
var fe=function(a){return a.a?a.a.readyState:0};E.prototype.getStatus=function(){try{return 2<fe(this)?this.a.status:-1}catch(a){return-1}};
|
|
var he=function(a){try{if(!a.a)return null;if("response"in a.a)return a.a.response;switch(a.Ka){case "":case "text":return a.a.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.a)return a.a.mozResponseArrayBuffer}var b=a.B;b&&b.log(Dd,"Response type "+a.Ka+" is not supported on this browser",void 0);return null}catch(c){return Kd(a.B,"Can not get response: "+c.message),null}};E.prototype.getResponseHeader=function(a){return this.a&&4==fe(this)?this.a.getResponseHeader(a):void 0};
|
|
var Zd=function(a,b){return b+" ["+a.vc+" "+a.cb+" "+a.getStatus()+"]"};var ie=function(a,b){this.U=this.ja=this.ba="";this.qa=null;this.ea=this.ib="";this.I=this.od=!1;var c;if(a instanceof ie)this.I=m(b)?b:a.I,je(this,a.ba),c=a.ja,ke(this),this.ja=c,c=a.U,ke(this),this.U=c,le(this,a.qa),this.setPath(a.getPath()),me(this,a.R.clone()),c=a.ea,ke(this),this.ea=c;else if(a&&(c=String(a).match(Md))){this.I=!!b;je(this,c[1]||"",!0);var d=c[2]||"";ke(this);this.ja=ne(d);d=c[3]||"";ke(this);this.U=ne(d,!0);le(this,c[4]);this.setPath(c[5]||"",!0);me(this,c[6]||"",!0);c=c[7]||
|
|
"";ke(this);this.ea=ne(c)}else this.I=!!b,this.R=new oe(null,0,this.I)};
|
|
ie.prototype.toString=function(){var a=[],b=this.ba;b&&a.push(pe(b,qe,!0),":");var c=this.U;if(c||"file"==b)a.push("//"),(b=this.ja)&&a.push(pe(b,qe,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.qa,null!=c&&a.push(":",String(c));if(c=this.getPath())this.U&&"/"!=c.charAt(0)&&a.push("/"),a.push(pe(c,"/"==c.charAt(0)?re:se,!0));(c=this.R.toString())&&a.push("?",c);(c=this.ea)&&a.push("#",pe(c,te));return a.join("")};
|
|
ie.prototype.resolve=function(a){var b=this.clone(),c=!!a.ba;c?je(b,a.ba):c=!!a.ja;if(c){var d=a.ja;ke(b);b.ja=d}else c=!!a.U;c?(d=a.U,ke(b),b.U=d):c=null!=a.qa;d=a.getPath();if(c)le(b,a.qa);else if(c=!!a.ib){if("/"!=d.charAt(0))if(this.U&&!this.ib)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 k=e[g++];"."==
|
|
k?d&&g==e.length&&f.push(""):".."==k?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),d&&g==e.length&&f.push("")):(f.push(k),d=!0)}d=f.join("/")}else d=e}c?b.setPath(d):c=""!==a.R.toString();c?me(b,ne(a.R.toString())):c=!!a.ea;c&&(a=a.ea,ke(b),b.ea=a);return b};ie.prototype.clone=function(){return new ie(this)};
|
|
var je=function(a,b,c){ke(a);a.ba=c?ne(b,!0):b;a.ba&&(a.ba=a.ba.replace(/:$/,""))},le=function(a,b){ke(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.qa=b}else a.qa=null};ie.prototype.getPath=function(){return this.ib};ie.prototype.setPath=function(a,b){ke(this);this.ib=b?ne(a,!0):a;return this};
|
|
var me=function(a,b,c){ke(a);b instanceof oe?(a.R=b,a.R.Xb(a.I)):(c||(b=pe(b,ue)),a.R=new oe(b,0,a.I))},ve=function(a){return a.R},ke=function(a){if(a.od)throw Error("Tried to modify a read-only Uri");};ie.prototype.Xb=function(a){this.I=a;this.R&&this.R.Xb(a);return this};
|
|
var we=function(a){return a instanceof ie?a.clone():new ie(a,void 0)},ne=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},pe=function(a,b,c){return p(a)?(a=encodeURI(a).replace(b,xe),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},xe=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},qe=/[#\/\?@]/g,se=/[\#\?:]/g,re=/[\#\?]/g,ue=/[\#\?@]/g,te=/#/g,oe=function(a,b,c){this.f=this.g=null;this.C=a||null;this.I=!!c},ye=function(a){a.g||
|
|
(a.g=new sd,a.f=0,a.C&&Nd(a.C,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=oe.prototype;h.u=function(){ye(this);return this.f};h.add=function(a,b){ye(this);this.C=null;a=ze(this,a);var c=this.g.get(a);c||this.g.set(a,c=[]);c.push(b);this.f++;return this};h.remove=function(a){ye(this);a=ze(this,a);return this.g.X(a)?(this.C=null,this.f-=this.g.get(a).length,this.g.remove(a)):!1};h.clear=function(){this.g=this.C=null;this.f=0};h.isEmpty=function(){ye(this);return 0==this.f};
|
|
h.X=function(a){ye(this);a=ze(this,a);return this.g.X(a)};h.K=function(){ye(this);for(var a=this.g.v(),b=this.g.K(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};h.v=function(a){ye(this);var b=[];if(p(a))this.X(a)&&(b=ab(b,this.g.get(ze(this,a))));else{a=this.g.v();for(var c=0;c<a.length;c++)b=ab(b,a[c])}return b};h.set=function(a,b){ye(this);this.C=null;a=ze(this,a);this.X(a)&&(this.f-=this.g.get(a).length);this.g.set(a,[b]);this.f++;return this};
|
|
h.get=function(a,b){var c=a?this.v(a):[];return 0<c.length?String(c[0]):b};h.setValues=function(a,b){this.remove(a);0<b.length&&(this.C=null,this.g.set(ze(this,a),bb(b)),this.f+=b.length)};h.toString=function(){if(this.C)return this.C;if(!this.g)return"";for(var a=[],b=this.g.K(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.v(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.C=a.join("&")};
|
|
h.clone=function(){var a=new oe;a.C=this.C;this.g&&(a.g=this.g.clone(),a.f=this.f);return a};var ze=function(a,b){var c=String(b);a.I&&(c=c.toLowerCase());return c};oe.prototype.Xb=function(a){a&&!this.I&&(ye(this),this.C=null,this.g.forEach(function(a,c){var d=c.toLowerCase();c!=d&&(this.remove(c),this.setValues(d,a))},this));this.I=a};v("ee.data.authenticate",function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];d&&(cb(f,d),eb(f));Ae=a;Be=f;null===a?Ce=null:De(function(){Ee(b,c,e||ia(Fe,b,c))})});var Fe=function(a,b){l.gapi.auth.authorize({client_id:Ae,immediate:!1,scope:Be.join(" ")},ia(Ge,a,b))};v("ee.data.authenticateViaPopup",Fe);
|
|
v("ee.data.setAuthToken",function(a,b,c,d,e,f,g){var k=["https://www.googleapis.com/auth/earthengine"];e&&(cb(k,e),eb(k));Ae=a;Be=k;var D={token_type:b,access_token:c,state:k.join(" "),expires_in:d};Ge(void 0,void 0,D);!1===g?f&&f():De(function(){l.gapi.auth.setToken(D);f&&f()})});var Ee=function(a,b,c){p(Ae)&&He&&He({client_id:Ae,immediate:!0,scope:Be.join(" ")},function(d){"immediate_failed"==d.error&&c?c():Ge(a,b,d)})};v("ee.data.setAuthTokenRefresher",function(a){He=a});
|
|
v("ee.data.getAuthToken",function(){return Ce});v("ee.data.clearAuthToken",function(){Ce=null});v("ee.data.getAuthClientId",function(){return Ae});v("ee.data.getAuthScopes",function(){return Be});var Me=function(a,b,c){null!=a?Ie=a:Je||(Ie="https://earthengine.googleapis.com/api");null!=b?Ke=b:Je||(Ke="https://earthengine.googleapis.com");m(c)&&(Le=c);Je=!0};v("ee.data.setDeadline",function(a){Xd=a});v("ee.data.setParamAugmenter",function(a){Ne=a||fb});v("ee.data.getApiBaseUrl",function(){return Ie});
|
|
v("ee.data.getTileBaseUrl",function(){return Ke});v("ee.data.getXsrfToken",function(){return Le});var Oe=function(a,b){a=ua(a);return F("/mapid",G(a),b)};v("ee.data.getMapId",Oe);v("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[Ke,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});var Pe=function(a,b){a=ua(a);return F("/value",G(a),b)};v("ee.data.getValue",Pe);
|
|
var Qe=function(a,b){a=ua(a);n(a.size)&&(a.size=a.size.join("x"));var c=G(a).add("getid","1");return F("/thumb",c,b)};v("ee.data.getThumbId",Qe);var Re=function(a){return Ke+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};v("ee.data.makeThumbUrl",Re);var Se=function(a,b){a=ua(a);return F("/download",G(a),b)};v("ee.data.getDownloadId",Se);var Te=function(a){return Ke+"/api/download?docid="+a.docid+"&token="+a.token};v("ee.data.makeDownloadUrl",Te);
|
|
var Ue=function(a,b){a=ua(a);return F("/table",G(a),b)};v("ee.data.getTableDownloadId",Ue);var Ve=function(a){return Ke+"/api/table?docid="+a.docid+"&token="+a.token};v("ee.data.makeTableDownloadUrl",Ve);v("ee.data.withProfiling",function(a,b,c){var d=We;try{return We=a,b.call(c)}finally{We=d}});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 Xe(a,"CANCEL",b)});
|
|
var Xe=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=Ye;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",Xe);v("ee.data.prepareValue",function(a,b,c){b=ua(b);b.tid=a;return F("/prepare",G(b),c)});v("ee.data.startProcessing",function(a,b,c){b=ua(b);b.id=a;return F("/processingrequest",G(b),c)});
|
|
v("ee.data.startIngestion",function(a,b,c){a={id:a,request:kb(b)};return F("/ingestionrequest",G(a),c)});v("ee.data.getInfo",function(a,b){return F("/info",(new oe).add("id",a),b)});v("ee.data.getList",function(a,b){var c=G(a);return F("/list",c,b)});v("ee.data.getAssetRoots",function(a){return F("/buckets",null,a,"GET")});v("ee.data.createAssetHome",function(a,b){var c=G({id:a});F("/createbucket",c,b)});
|
|
v("ee.data.createAsset",function(a,b,c,d){p(a)||(a=kb(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.getAssetAcl",function(a,b){return F("/getacl",G({id:a}),b,"GET")});v("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:kb(b)};F("/setacl",G(a),c)});
|
|
var Ye={Qd:"CANCEL",Td:"UPDATE"},F=function(a,b,c,d){Me();d=d||"POST";var e={"Content-Type":"application/x-www-form-urlencoded"};null!=Ce&&(e.Authorization=Ce);b=b?b.clone():new oe;var f;We&&(b.add("profiling","1"),f=We);b=Ne(b,a);null!=Le&&(e["X-XSRF-Token"]=Le);var g=function(a,b,c,d){var e=b("X-Earth-Engine-Computation-Profile");e&&f&&f(e);var g,k,Aa;b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==b||"text/json"==b)try{g=hb(c),k=g.data}catch(wh){Aa="Invalid JSON: "+
|
|
c}else Aa="Response was unexpectedly not JSON, but "+b;if(t(g))"error"in g&&"message"in g.error?Aa=g.error.message:"data"in g||(Aa="Malformed response: "+c);else if(200>a||300<=a)Aa="Server returned HTTP code: "+a;if(d)return d(k,Aa),null;if(!Aa)return k;throw Error(Aa);};b=b?b.toString():"";"GET"!=d||/^[\s\xa0]*$/.test(b)||(a+=-1!=a.indexOf("?")?"&":"?",a+=b,b=null);a=Ie+a;if(c)return Yd(a,function(a){a=a.target;var b=a.getStatus(),d=u(a.getResponseHeader,a),e;try{e=a.a?a.a.responseText:""}catch(f){Kd(a.B,
|
|
"Can not get responseText: "+f.message),e=""}return g(b,d,e,c)},d,b,e),null;var k=C();k.open(d,a,!1);ka(e,function(a,b){k.setRequestHeader(b,a)});k.send(b);return g(k.status,function(a){try{return k.getResponseHeader(a)}catch(b){return null}},k.responseText,null)},De=function(a){var b=function(){l.gapi.config.update("client/cors",!0);He||(He=l.gapi.auth.authorize);a()};if(t(l.gapi)&&t(l.gapi.auth)&&r(l.gapi.auth.authorize))b();else{for(var c=ja().toString(36);c in l;)c+="_";l[c]=function(){delete l[c];
|
|
b()};Ic("https://apis.google.com/js/client.js?onload="+c)}},Ge=function(a,b,c){if(c.access_token){var d=c.token_type+" "+c.access_token;isFinite(c.expires_in)&&(b=1E3*c.expires_in,setTimeout(Ee,.5*b),setTimeout(function(){Ce==d&&(Ce=null)},.95*b));Ce=d;a&&a()}else b&&b(c.error||"Unknown error.")},G=function(a){var b=new oe,c;for(c in a)b.set(c,a[c]);return b},Ie=null,Ke=null,Le=null,Ne=fb,Ce=null,Ae=null,Be=[],He=null,Je=!1,Xd=0,We=null;var Ze=function(){};var $e=function(){this.S=-1};var af=function(){this.S=-1;this.S=64;this.o=Array(4);this.Qc=Array(this.S);this.qb=this.za=0;this.reset()};w(af,$e);af.prototype.reset=function(){this.o[0]=1732584193;this.o[1]=4023233417;this.o[2]=2562383102;this.o[3]=271733878;this.qb=this.za=0};
|
|
var bf=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.o[0];c=a.o[1];var e=a.o[2],f=a.o[3],g=0,g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&
|
|
(f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>>20);g=
|
|
e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295|
|
|
g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295|
|
|
g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295|
|
|
g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^
|
|
b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295;
|
|
f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+
|
|
(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295;
|
|
c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.o[0]=a.o[0]+b&4294967295;a.o[1]=a.o[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.o[2]=a.o[2]+e&4294967295;a.o[3]=a.o[3]+f&4294967295};
|
|
af.prototype.update=function(a,b){m(b)||(b=a.length);for(var c=b-this.S,d=this.Qc,e=this.za,f=0;f<b;){if(0==e)for(;f<=c;)bf(this,a,f),f+=this.S;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.S){bf(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.S){bf(this,d);e=0;break}}this.za=e;this.qb+=b};
|
|
af.prototype.digest=function(){var a=Array((56>this.za?this.S:2*this.S)-this.za);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;for(var c=8*this.qb,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.o[b]>>>d&255;return a};var cf=function(a){this.Pa="__ee_hash__";this.Pb=!1!==a;this.va=[];this.na={};this.cc=[]};v("ee.Serializer",cf);var df=new jb,ef=new af,gf=function(a,b){return ff(new cf(m(b)?b:!0),a)};v("ee.Serializer.encode",gf);var hf=function(a){return df.w(gf(a))};v("ee.Serializer.toJSON",hf);var jf=function(a){a=ff(new cf(!1),a);return"JSON"in l?l.JSON.stringify(a,null," "):df.w(a)};v("ee.Serializer.toReadableJSON",jf);
|
|
var ff=function(a,b){var c=a.Va(b);a.Pb&&(c=t(c)&&"ValueRef"==c.type&&1==a.va.length?a.va[0][1]:{type:"CompoundValue",scope:a.va,value:c},a.va=[],Ra(a.cc,u(function(a){delete a[this.Pa]},a)),a.cc=[],a.na={});return c};
|
|
cf.prototype.Va=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b,c=t(a)?a[this.Pa]:null;if(this.Pb&&null!=c&&this.na[c])return{type:"ValueRef",value:this.na[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 Ze){if(b=a.encode(u(this.Va,this)),!(n(b)||t(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Ta(a,function(a){return this.Va(a)},
|
|
this);else if(t(a)&&!r(a))b=oa(a,function(a){if(!r(a))return this.Va(a)},this),ta(b,this.Pa),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.Pb){ef.reset();ef.update(df.w(b));var c=ef.digest().toString(),d;this.na[c]?d=this.na[c]:(d=String(this.va.length),this.va.push([d,b]),this.na[c]=d);a[this.Pa]=c;this.cc.push(a);return{type:"ValueRef",value:d}}return b};var H=function(a,b,c){if(!(this instanceof H))return I(H,arguments);if(c&&(a||b))throw Error('When "opt_varName" is specified, "func" and "args" must be null.');if(a&&!b)throw Error('When "func" is specified, "args" must not be null.');this.b=a;this.i=b;this.m=c||null};w(H,Ze);v("ee.ComputedObject",H);H.prototype.D=function(a){return Pe({json:this.w()},a)};H.prototype.getInfo=H.prototype.D;
|
|
H.prototype.encode=function(a){if(null===this.b&&null===this.i)return{type:"ArgumentRef",value:this.m};var b={},c;for(c in this.i)m(this.i[c])&&(b[c]=a(this.i[c]));b={type:"Invocation",arguments:b};a=a(this.b);b[p(a)?"functionName":"function"]=a;return b};H.prototype.w=function(){return hf(this)};H.prototype.serialize=H.prototype.w;H.prototype.toString=function(){return"ee."+this.name()+"("+jf(this)+")"};H.prototype.toString=H.prototype.toString;H.prototype.name=function(){return"ComputedObject"};
|
|
H.prototype.Pc=function(a,b){var c=bb(arguments);c[0]=this;a.apply(l,c);return this};H.prototype.aside=H.prototype.Pc;var kf=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;c=new c;c.b=b.b;c.i=b.i;c.m=b.m;return c},I=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var lf={},mf=function(a){return a.prototype instanceof H?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},nf=function(a,b){if(b==a)return!0;switch(a){case "Element":return"Element"==b||"Image"==b||"Feature"==b||"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "FeatureCollection":case "Collection":return"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "Object":return!0;default:return!1}},of=function(a){return q(a)||
|
|
a instanceof H&&"Number"==a.name()},pf=function(a){return p(a)||a instanceof H&&"String"==a.name()},qf=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};w(J,Ze);v("ee.Function",J);var rf=fb;J.prototype.call=function(a){return this.apply(sf(this,Array.prototype.slice.call(arguments,0)))};J.prototype.call=J.prototype.call;J.prototype.apply=function(a){a=new H(this,tf(this,a));return rf(a,this.H().returns)};J.prototype.apply=J.prototype.apply;
|
|
var uf=function(a,b,c){var d=m(b),e=a.H(),f=!1;if(1==c.length&&qf(c[0])){var g=e.args;d&&(g=g.slice(1));g.length&&(f=!((1==g.length||g[1].optional)&&"Dictionary"==g[0].type))}if(f){if(c=ua(c[0]),d){d=e.args[0].name;if(d in c)throw Error("Named args for "+e.name+" can't contain keyword "+d);c[d]=b}}else c=sf(a,d?[b].concat(c):c);return a.apply(c)},tf=function(a,b){for(var c=a.H().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&m(b[g]))d[g]=rf(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+
|
|
g+") missing to function: "+a);e[g]=!0}var c=[],k;for(k in b)e[k]||c.push(k);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},sf=function(a,b){var c=a.H().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);for(var d={},e=0;e<b.length;e++)d[c[e].name]=b[e];return d};
|
|
J.prototype.toString=function(a,b){var c=this.H(),d=[];d.push(a||c.name);d.push("(");d.push(Ta(c.args.slice(b?1:0),function(a){return a.name}).join(", "));d.push(")\n");d.push("\n");c.description?d.push(c.description):d.push("Undocumented.");d.push("\n");if(c.args.length){d.push("\nArgs:\n");for(var e=0;e<c.args.length;e++){b&&0==e?d.push(" this:"):d.push("\n ");var f=c.args[e];d.push(f.name);d.push(" (");d.push(f.type);f.optional&&d.push(", optional");d.push("): ");f.description?d.push(f.description):
|
|
d.push("Undocumented.")}}return d.join("")};J.prototype.w=function(){return hf(this)};var K=function(a,b){if(!m(b))return vf(a);if(!(this instanceof K))return I(K,arguments);this.wa=va(b);this.wa.name=a};w(K,J);v("ee.ApiFunction",K);var L=function(a,b){return J.prototype.call.apply(vf(a),Array.prototype.slice.call(arguments,1))};v("ee.ApiFunction._call",L);var wf=function(a,b){return vf(a).apply(b)};v("ee.ApiFunction._apply",wf);K.prototype.encode=function(){return this.wa.name};K.prototype.H=function(){return this.wa};
|
|
var la=null,xf={},zf=function(){yf();return oa(la,function(a){return a.H()})},Af=function(){yf();return na(function(a,b){return!xf[b]})},vf=function(a){var b=Bf(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};v("ee.ApiFunction.lookup",vf);
|
|
var Bf=function(a){yf();return la[a]||null},yf=function(a,b){if(la)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(la=oa(c,function(a,b){a.returns=a.returns.replace(/<.*>/,"");for(var c=0;c<a.args.length;c++)a.args[c].type=a.args[c].type.replace(/<.*>/,"");return new K(b,a)}),a&&a())};a?F("/algorithms",null,c,"GET"):c(F("/algorithms",null,void 0,"GET"))}},M=function(a,b,c,d){yf();var e=d||"";ka(la,function(d,g){var k=g.split(".");if(2==k.length&&k[0]==b){var k=e+k[1],D=d.H();xf[g]=!0;var ma=!1;
|
|
if(D.args.length)var U=D.args[0].type,ma="Object"!=U&&nf(U,c);U=ma?a.prototype:a;k in U&&!U[k].signature||(U[k]=function(a){return uf(d,ma?this:void 0,Array.prototype.slice.call(arguments,0))},U[k].toString=u(d.toString,d,k,ma),U[k].signature=D)}})},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,c){H.call(this,a,b,c);Cf()};w(O,H);v("ee.Element",O);var Df=!1,Cf=function(){Df||(M(O,"Element","Element"),Df=!0)};O.prototype.name=function(){return"Element"};
|
|
O.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=qf(c))a:{b=qa(c);var d=["properties"];if(da(b)&&da(d)&&b.length==d.length){for(var e=b.length,f=0;f<e;f++)if(b[f]!==d[f]){b=!1;break a}b=!0}else b=!1}b&&t(c.properties)&&(c=c.properties);if(qf(c)){b=this;for(var g in c)d=c[g],b=L("Element.set",b,g,d)}else if(c instanceof H&&Bf("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 kf(this,b)};O.prototype.set=O.prototype.set;var P=function(a){if(!(this instanceof P))return I(P,arguments);if(a instanceof P)return a;Ef();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new P(a[0]);H.call(this,new K("Filter.and"),{filters:a});this.Ba=a}else if(a instanceof H)H.call(this,a.b,a.i,a.m),this.Ba=[a];else{if(m(a))throw Error("Invalid argument specified for ee.Filter(): "+a);H.call(this,null,null);this.Ba=[]}};w(P,H);v("ee.Filter",P);
|
|
var Ff=!1,Ef=function(){Ff||(M(P,"Filter","Filter"),Ff=!0)},Gf={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};P.prototype.length=function(){return this.Ba.length};P.prototype.length=P.prototype.length;var Q=function(a,b){var c=a.Ba.slice(0);b instanceof P?cb(c,b.Ba):b instanceof Array?cb(c,b):c.push(b);return new P(c)};P.prototype.aa=function(){return L("Filter.not",this)};P.prototype.not=P.prototype.aa;
|
|
var Hf=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in Gf))throw Error("Unknown filtering operator: "+b);a=L("Filter."+Gf[b],a,c);return d?a.aa():a};P.metadata=Hf;var If=function(a,b){return L("Filter.equals",a,b)};P.eq=If;var Jf=function(a,b){return If(a,b).aa()};P.neq=Jf;var Kf=function(a,b){return L("Filter.lessThan",a,b)};P.lt=Kf;var Lf=function(a,b){return Kf(a,b).aa()};P.gte=Lf;var Mf=function(a,b){return L("Filter.greaterThan",a,b)};
|
|
P.gt=Mf;var Nf=function(a,b){return Mf(a,b).aa()};P.lte=Nf;var Of=function(a,b){return L("Filter.stringContains",a,b)};P.contains=Of;var Pf=function(a,b){return Of(a,b).aa()};P.not_contains=Pf;var Qf=function(a,b){return L("Filter.stringStartsWith",a,b)};P.starts_with=Qf;var Rf=function(a,b){return Qf(a,b).aa()};P.not_starts_with=Rf;var Sf=function(a,b){return L("Filter.stringEndsWith",a,b)};P.ends_with=Sf;var Tf=function(a,b){return Sf(a,b).aa()};P.not_ends_with=Tf;
|
|
var Uf=function(a){return L("Filter.and",Array.prototype.slice.call(arguments))};P.and=Uf;P.or=function(a){return L("Filter.or",Array.prototype.slice.call(arguments))};var Vf=function(a,b){var c=L("DateRange",a,b);return wf("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};P.date=Vf;var Wf=function(a,b,c,d){return wf("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};P.inList=Wf;
|
|
var Xf=function(a,b){return wf("Filter.intersects",{leftField:".all",rightValue:L("Feature",a),maxError:b})};P.bounds=Xf;P.prototype.Zc=function(a){return Q(this,If.apply(null,[].slice.call(arguments)))};P.prototype.eq=P.prototype.Zc;P.prototype.xd=function(a){return Q(this,Jf.apply(null,[].slice.call(arguments)))};P.prototype.neq=P.prototype.xd;P.prototype.rd=function(a){return Q(this,Kf.apply(null,[].slice.call(arguments)))};P.prototype.lt=P.prototype.rd;
|
|
P.prototype.hd=function(a){return Q(this,Lf.apply(null,[].slice.call(arguments)))};P.prototype.gte=P.prototype.hd;P.prototype.gd=function(a){return Q(this,Mf.apply(null,[].slice.call(arguments)))};P.prototype.gt=P.prototype.gd;P.prototype.sd=function(a){return Q(this,Nf.apply(null,[].slice.call(arguments)))};P.prototype.lte=P.prototype.sd;P.prototype.contains=function(a){return Q(this,Of.apply(null,[].slice.call(arguments)))};P.prototype.contains=P.prototype.contains;
|
|
P.prototype.yd=function(a){return Q(this,Pf.apply(null,[].slice.call(arguments)))};P.prototype.not_contains=P.prototype.yd;P.prototype.Id=function(a){return Q(this,Qf.apply(null,[].slice.call(arguments)))};P.prototype.starts_with=P.prototype.Id;P.prototype.Ad=function(a){return Q(this,Rf.apply(null,[].slice.call(arguments)))};P.prototype.not_starts_with=P.prototype.Ad;P.prototype.Yc=function(a){return Q(this,Sf.apply(null,[].slice.call(arguments)))};P.prototype.ends_with=P.prototype.Yc;
|
|
P.prototype.zd=function(a){return Q(this,Tf.apply(null,[].slice.call(arguments)))};P.prototype.not_ends_with=P.prototype.zd;P.prototype.Oc=function(a){return Q(this,Uf.apply(null,[].slice.call(arguments)))};P.prototype.and=P.prototype.Oc;P.prototype.Xc=function(a){return Q(this,Vf.apply(null,[].slice.call(arguments)))};P.prototype.date=P.prototype.Xc;P.prototype.md=function(a){return Q(this,Wf.apply(null,[].slice.call(arguments)))};P.prototype.inList=P.prototype.md;
|
|
P.prototype.bounds=function(a){return Q(this,Xf.apply(null,[].slice.call(arguments)))};P.prototype.bounds=P.prototype.bounds;P.prototype.name=function(){return"Filter"};var R=function(a,b,c){O.call(this,a,b,c);Yf()};w(R,O);v("ee.Collection",R);var Zf=!1,Yf=function(){Zf||(M(R,"Collection","Collection"),M(R,"AggregateFeatureCollection","Collection","aggregate_"),Zf=!0)};R.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return kf(this,L("Collection.filter",this,a))};R.prototype.filter=R.prototype.filter;R.prototype.dd=function(a,b,c){return this.filter(Hf(a,b,c))};R.prototype.filterMetadata=R.prototype.dd;R.prototype.bd=function(a){return this.filter(Xf(a))};
|
|
R.prototype.filterBounds=R.prototype.bd;R.prototype.cd=function(a,b){return this.filter(Vf(a,b))};R.prototype.filterDate=R.prototype.cd;R.prototype.limit=function(a,b,c){return kf(this,L("Collection.limit",this,a,b,c))};R.prototype.limit=R.prototype.limit;R.prototype.sort=function(a,b){return kf(this,L("Collection.limit",this,void 0,a,b))};R.prototype.sort=R.prototype.sort;R.prototype.name=function(){return"Collection"};R.prototype.elementType=function(){return O};
|
|
R.prototype.map=function(a,b){var c=this.elementType();return kf(this,L("Collection.map",this,function(b){return a(new c(b))},b))};R.prototype.map=R.prototype.map;R.prototype.pd=function(a,b){var c=m(b)?b:null,d=this.elementType();return L("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};R.prototype.iterate=R.prototype.pd;var $f=function(a){if(!(this instanceof $f))return I($f,arguments);if(a instanceof $f)return a;ag();if(q(a))H.call(this,null,null),this.Sb=a;else if(a instanceof H)H.call(this,a.b,a.i,a.m),this.Sb=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};w($f,H);v("ee.Number",$f);var bg=!1,ag=function(){bg||(M($f,"Number","Number"),bg=!0)};$f.prototype.encode=function(a){return q(this.Sb)?this.Sb:$f.l.encode.call(this,a)};$f.prototype.name=function(){return"Number"};var cg=function(a){if(!(this instanceof cg))return I(cg,arguments);if(a instanceof cg)return a;dg();if(p(a))H.call(this,null,null),this.Zb=a;else if(a instanceof H)this.Zb=null,a.b&&"String"==a.b.H().returns?H.call(this,a.b,a.i,a.m):H.call(this,new K("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};w(cg,H);v("ee.String",cg);var eg=!1,dg=function(){eg||(M(cg,"String","String"),eg=!0)};
|
|
cg.prototype.encode=function(a){return p(this.Zb)?this.Zb:cg.l.encode.call(this,a)};cg.prototype.name=function(){return"String"};var fg=function(a,b){if(!(this instanceof fg))return I(fg,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(gg(g in lf?lf[g]:null,f.name))}if(!m(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.wa=hg(a,c,b);this.Rc=b.apply(null,c)};w(fg,J);v("ee.CustomFunction",fg);fg.prototype.encode=function(a){return{type:"Function",argumentNames:Ta(this.wa.args,function(a){return a.name}),body:a(this.Rc)}};fg.prototype.H=function(){return this.wa};
|
|
var gg=function(a,b){a=a||Object;if(!(a.prototype instanceof H))if(a&&a!=Object)if(a==String)a=cg;else if(a==Number)a=$f;else if(a==Array)a=l.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=H;var c=function(){};c.prototype=a.prototype;c=new c;c.b=null;c.i=null;c.m=b;return c},ig=function(a,b){var c=Ta(b,function(a){return{name:null,type:p(a)?a:mf(a)}}),c={name:"",returns:p("Object")?"Object":mf("Object"),args:c};return new fg(c,a)},hg=function(a,b,c){for(var d=
|
|
[],e=0;e<b.length;e++)null===b[e].m&&d.push(e);if(0==d.length)return a;var f=function(a){var b=0;t(a)&&!r(a)&&("Function"==a.type&&b++,ka(a,function(a){b+=f(a)}));return b},e=gf(c.apply(null,b));c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],k=c+e;b[g].m=k;a.args[g].name=k}return a};var jg=function(a,b){if(!(this instanceof jg))return I(jg,arguments);if(a instanceof jg)return a;kg();var c=new K("Date"),d={},e=null;if(pf(a)){if(d.value=a,b)if(pf(b))d.timeZone=b;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+b);}else if(of(a))d.value=a;else if(t(a)&&"function"==typeof a.getFullYear)d.value=Math.floor(a.getTime());else if(a instanceof H)a.b&&"Date"==a.b.H().returns?(c=a.b,d=a.i,e=a.m):d.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);H.call(this,c,d,e)};w(jg,H);v("ee.Date",jg);var lg=!1,kg=function(){lg||(M(jg,"Date","Date"),lg=!0)};jg.prototype.name=function(){return"Date"};var S=function(a,b,c){if(!(this instanceof S))return I(S,arguments);mg();var d=null!=b||null!=c;if(a instanceof H&&!(a instanceof S&&a.rb)){if(d)throw Error("Setting the CRS or geodesic on a computed Geometry is not suported. Use Geometry.transform().");H.call(this,a.b,a.i,a.m)}else{a instanceof S&&(a=a.encode());if(3<arguments.length)throw Error("The Geometry constructor takes at most 3 arguments ("+arguments.length+" given)");if(!ng(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));
|
|
H.call(this,null,null);this.rb=a.type;this.Uc=a.coordinates||null;this.ed=a.geometries||null;if(null!=b)this.Wb=b;else if("crs"in a)if(t(a.crs)&&"name"==a.crs.type&&t(a.crs.properties)&&p(a.crs.properties.name))this.Wb=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new jb).w(a.crs));this.Kb=c;!m(c)&&"geodesic"in a&&(this.Kb=Boolean(a.geodesic))}};w(S,H);v("ee.Geometry",S);
|
|
var og=!1,mg=function(){og||(M(S,"Geometry","Geometry"),og=!0)},pg=function(a,b){if(!(this instanceof pg))return qg(pg,arguments);var c=rg("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)};w(pg,S);S.Point=pg;var sg=function(a,b){if(!(this instanceof sg))return qg(sg,arguments);S.call(this,rg("MultiPoint",2,arguments))};w(sg,S);S.MultiPoint=sg;
|
|
var tg=function(a,b,c,d){if(!(this instanceof tg))return qg(tg,arguments);var e=rg("Rectangle",2,arguments);if(!(e instanceof H)){var f=e.coordinates;if(2!=f.length)throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");var g=f[0][0],k=f[0][1],D=f[1][0],f=f[1][1];e.coordinates=[[[g,f],[g,k],[D,k],[D,f]]];e.type="Polygon"}S.call(this,e)};w(tg,S);S.Rectangle=tg;var ug=function(a,b,c,d){if(!(this instanceof ug))return qg(ug,arguments);S.call(this,rg("LineString",2,arguments))};
|
|
w(ug,S);S.LineString=ug;var vg=function(a,b,c,d){if(!(this instanceof vg))return qg(vg,arguments);S.call(this,rg("LinearRing",2,arguments))};w(vg,S);S.LinearRing=vg;var wg=function(a,b,c,d){if(!(this instanceof wg))return qg(wg,arguments);S.call(this,rg("MultiLineString",3,arguments))};w(wg,S);S.MultiLineString=wg;var xg=function(a,b,c,d){if(!(this instanceof xg))return qg(xg,arguments);S.call(this,rg("Polygon",3,arguments))};w(xg,S);S.Polygon=xg;
|
|
var yg=function(a,b,c,d){if(!(this instanceof yg))return qg(yg,arguments);S.call(this,rg("MultiPolygon",4,arguments))};w(yg,S);S.MultiPolygon=yg;
|
|
S.prototype.encode=function(a){if(!this.rb){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return H.prototype.encode.call(this,a)}a={type:this.rb};"GeometryCollection"==this.rb?a.geometries=this.ed:a.coordinates=this.Uc;null!=this.Wb&&(a.crs={type:"name",properties:{name:this.Wb}});null!=this.Kb&&(a.geodesic=this.Kb);return a};S.prototype.Ic=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};
|
|
S.prototype.toGeoJSON=S.prototype.Ic;S.prototype.Jc=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new jb).w(this.Ic())};S.prototype.toGeoJSONString=S.prototype.Jc;S.prototype.w=function(){return hf(this)};S.prototype.serialize=S.prototype.w;S.prototype.toString=function(){return"ee.Geometry("+this.Jc()+")"};
|
|
var ng=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(!ng(b[a]))return!1;return!0}a=a.coordinates;var c=zg(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)},zg=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=zg(a[0]),c=1;c<a.length;c++)if(zg(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},rg=function(a,b,c){var d={},e=["coordinates","crs","geodesic","maxError"];if(Va(c,of))d.coordinates=bb(c);else{if(c.length>e.length)throw Error("Geometry constructor given extra arguments.");for(var f=0;f<e.length;f++)null!=c[f]&&(d[e[f]]=c[f])}if(Ag(d.coordinates)||null!=d.crs||null!=d.geodesic||null!=d.maxError)return(new K("GeometryConstructors."+a)).apply(d);d.type=a;a=d.coordinates;if(1>b||4<b)throw Error("Unexpected nesting level.");
|
|
if(Va(a,q)&&q(a[0])&&2!=a.length){if(0!=a.length%2)throw Error("Invalid number of coordinates: "+a.length);c=[];for(e=0;e<a.length;e+=2)c.push([a[e],a[e+1]]);a=c}c=a;for(e=0;n(c);)c=c[0],e++;for(;e<b;)a=[a],e++;if(zg(a)!=b)throw Error("Invalid geometry");for(c=a;n(c)&&1==c.length;)c=c[0];b=n(c)&&0==c.length?[]:a;d.coordinates=b;return d},Ag=function(a){return n(a)?Ua(a,Ag):a instanceof H},qg=function(a,b){var c=function(){};c.prototype=a.prototype;var c=new c,d=a.apply(c,b);return void 0!==d?d:c};
|
|
S.prototype.name=function(){return"Geometry"};v("ee.Deserializer",function(){});v("ee.Deserializer.fromJSON",function(a){return Bg(gb(a))});var Bg=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]=Cg(f,b)}a=a.value}return Cg(a,b)};v("ee.Deserializer.decode",Bg);
|
|
var Cg=function(a,b){if(null===a||q(a)||"boolean"==typeof a||p(a))return a;if(n(a))return Ta(a,function(a){return Cg(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 gg(Object,c);case "Date":c=a.value;if(!q(c))throw Error("Invalid date value: "+c);return new jg(c/1E3);case "Bytes":return c=new Ze,
|
|
c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?vf(a.functionName):Cg(a["function"],b),d=oa(a.arguments,function(a){return Cg(a,b)});if(c instanceof J)return c.apply(d);if(c instanceof H)return new H(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return oa(a.value,function(a){return Cg(a,b)});case "Function":var e=Cg(a.body,b),c={name:"",args:Ta(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new fg(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 Dg=function(a){if(!(this instanceof Dg))return I(Dg,arguments);if(a instanceof Dg)return a;Eg();if(qf(a))H.call(this,null,null),this.Fb=a;else if(a instanceof H)H.call(this,a.b,a.i,a.m),this.Fb=null;else throw Error("Invalid argument specified for ee.Dictionary(): "+a);};w(Dg,H);v("ee.Dictionary",Dg);var Fg=!1,Eg=function(){Fg||(M(Dg,"Dictionary","Dictionary"),Fg=!0)};Dg.prototype.encode=function(a){return null===this.Fb?Dg.l.encode.call(this,a):a(this.Fb)};Dg.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)");Gg();if(a instanceof S||null===a)O.call(this,new K("Feature"),{geometry:a,metadata:b||null});else if(a instanceof H)O.call(this,a.b,a.i,a.m);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=ua(c);c["system:index"]=a.id}O.call(this,new K("Feature"),{geometry:new S(a.geometry),metadata:c})}else O.call(this,new K("Feature"),{geometry:new S(a),metadata:b||null})};w(T,O);v("ee.Feature",T);var Hg=!1,Gg=function(){Hg||(M(T,"Feature","Feature"),Hg=!0)};T.prototype.D=function(a){return T.l.D.call(this,a)};T.prototype.getInfo=T.prototype.D;T.prototype.getMap=function(a,b){return L("Collection",[this]).getMap(a,b)};
|
|
T.prototype.getMap=T.prototype.getMap;T.Point=function(a,b){return pg.apply(null,arguments)};T.MultiPoint=function(a){return sg.apply(null,arguments)};T.Rectangle=function(a,b,c,d){return new tg([a,b,c,d])};T.LineString=function(a){return ug.apply(null,arguments)};T.LinearRing=function(a){return vg.apply(null,arguments)};T.MultiLine=function(a){return wg.apply(null,arguments)};T.Polygon=function(a){return xg.apply(null,arguments)};T.MultiPolygon=function(a){return yg.apply(null,arguments)};
|
|
T.prototype.name=function(){return"Feature"};var Ig=function(a){if(this instanceof Ig){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof Ig)return a}else return I(Ig,arguments);Jg();if(n(a))H.call(this,null,null),this.Rb=a;else if(a instanceof H)H.call(this,a.b,a.i,a.m),this.Rb=null;else throw Error("Invalid argument specified for ee.List(): "+a);};w(Ig,H);v("ee.List",Ig);var Kg=!1,Jg=function(){Kg||(M(Ig,"List","List"),Kg=!0)};
|
|
Ig.prototype.encode=function(a){return n(this.Rb)?Ta(this.Rb,function(b){return a(b)}):Ig.l.encode.call(this,a)};Ig.prototype.name=function(){return"List"};var V=function(a,b){if(!(this instanceof V))return I(V,arguments);if(a instanceof V)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");Lg();a instanceof S&&(a=new T(a));a instanceof T&&(a=[a]);if(of(a)||pf(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:Ta(a,function(a){return new T(a)})});else if(a instanceof Ig)R.call(this,
|
|
new K("Collection"),{features:a});else if(a instanceof H)R.call(this,a.b,a.i,a.m);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};w(V,R);v("ee.FeatureCollection",V);var Mg=!1,Lg=function(){Mg||(M(V,"FeatureCollection","FeatureCollection"),Mg=!0)};V.prototype.getMap=function(a,b){var c=wf("Collection.draw",{collection:this,color:(a||{}).color||"000000"});if(b)c.getMap(null,b);else return c.getMap()};V.prototype.getMap=V.prototype.getMap;
|
|
V.prototype.D=function(a){return V.l.D.call(this,a)};V.prototype.getInfo=V.prototype.D;V.prototype.Lb=function(a,b,c,d){var e={};e.table=this.w();a&&(e.format=a.toUpperCase());c&&(e.filename=c);b&&(da(b)&&(b=b.join(",")),e.selectors=b);if(d)Ue(e,function(a,b){a?d(Ve(a)):d(null,b)});else return Ve(Ue(e))};V.prototype.getDownloadURL=V.prototype.Lb;V.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};V.prototype.select=V.prototype.select;
|
|
V.prototype.name=function(){return"FeatureCollection"};V.prototype.elementType=function(){return T};var W=function(a){if(!(this instanceof W))return I(W,arguments);if(a instanceof W)return a;Ng();var b=arguments.length;if(0==b||1==b&&!m(a))O.call(this,new K("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(of(a))O.call(this,new K("Image.constant"),{value:a});else if(pf(a))O.call(this,new K("Image.load"),{id:a});else{if(n(a))return Og(Ta(a,function(a){return new W(a)}));if(a instanceof H)"Array"==a.name()?O.call(this,new K("Image.constant"),{value:a}):O.call(this,a.b,a.i,a.m);else throw Error("Unrecognized argument type to convert to an Image: "+
|
|
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(pf(b)&&of(c))O.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)");};w(W,O);v("ee.Image",W);var Pg=!1,Ng=function(){Pg||(M(W,"Image","Image"),M(W,"Window","Image","focal_"),Pg=!0)};W.prototype.D=function(a){return W.l.D.call(this,a)};W.prototype.getInfo=W.prototype.D;
|
|
W.prototype.getMap=function(a,b){var c=a?ua(a):{};c.image=this.w();if(b)Oe(c,u(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=Oe(c),c.image=this,c};W.prototype.getMap=W.prototype.getMap;W.prototype.Lb=function(a,b){var c=a?ua(a):{};c.image=this.w();if(b)Se(c,function(a,c){a?b(Te(a)):b(null,c)});else return Te(Se(c))};W.prototype.getDownloadURL=W.prototype.Lb;
|
|
W.prototype.fd=function(a,b){var c=a?ua(a):{};c.image=this.w();if(c.region)if(n(c.region)||qf(c.region))c.region=kb(c.region);else if(!p(c.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(b)Qe(c,function(a,c){var f="";if(!m(c))try{f=Re(a)}catch(g){c=String(g.message)}b(f,c)});else return Re(Qe(c))};W.prototype.getThumbURL=W.prototype.fd;W.rgb=function(a,b,c){return Og([a,b,c],["vis-red","vis-green","vis-blue"])};
|
|
W.cat=function(a){return Og(Array.prototype.slice.call(arguments),null)};var Og=function(a,b){if(0==a.length)return L("Image.constant",[]);for(var c=new W(a[0]),d=1;d<a.length;d++)c=L("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
W.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||pf(b[0])||of(b[0])){for(var d=0;d<b.length;d++)if(!(pf(b[d])||of(b[d])||b[d]instanceof H))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return wf("Image.select",c)};W.prototype.select=W.prototype.select;
|
|
W.prototype.ad=function(a,b){var c=["DEFAULT_EXPRESSION_IMAGE"],d={DEFAULT_EXPRESSION_IMAGE:this};if(b)for(var e in b)c.push(e),d[e]=new W(b[e]);var f=L("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE",c);e=new J;e.encode=function(a){return f.encode(a)};e.H=function(){return{name:"",args:Ta(c,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return e.apply(d)};W.prototype.expression=W.prototype.ad;
|
|
W.prototype.clip=function(a){try{a=new S(a)}catch(b){}return L("Image.clip",this,a)};W.prototype.clip=W.prototype.clip;W.prototype.Fd=function(a){var b;b=1!=arguments.length||pf(arguments[0])?bb(arguments):arguments[0];return L("Image.rename",this,b)};W.prototype.rename=W.prototype.Fd;W.prototype.name=function(){return"Image"};var X=function(a){if(!(this instanceof X))return I(X,arguments);if(a instanceof X)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");Qg();a instanceof W&&(a=[a]);if(pf(a))R.call(this,new K("ImageCollection.load"),{id:a});else if(n(a))R.call(this,new K("ImageCollection.fromImages"),{images:Ta(a,function(a){return new W(a)})});else if(a instanceof Ig)R.call(this,new K("ImageCollection.fromImages"),{images:a});else if(a instanceof
|
|
H)R.call(this,a.b,a.i,a.m);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};w(X,R);v("ee.ImageCollection",X);var Rg=!1,Qg=function(){Rg||(M(X,"ImageCollection","ImageCollection"),M(X,"reduce","ImageCollection"),Rg=!0)};X.prototype.getMap=function(a,b){var c=L("ImageCollection.mosaic",this);if(b)c.getMap(a,b);else return c.getMap(a)};X.prototype.getMap=X.prototype.getMap;X.prototype.D=function(a){return X.l.D.call(this,a)};X.prototype.getInfo=X.prototype.D;
|
|
X.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"ImageCollection"};X.prototype.elementType=function(){return W};var Sg={};v("ee.Terrain",Sg);Sg.Ob=!1;Sg.nd=function(){Sg.Ob||(M(Sg,"Terrain","Terrain"),Sg.Ob=!0)};Sg.reset=function(){N(Sg);Sg.Ob=!1};v("ee.initialize",function(a,b,c,d,e){if("ready"!=Tg||a||b){var f=null!=c;if(d)if(f)Ug.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Tg&&f)Vg.push(c);else if(Tg="loading",Me(a,b,e),f)Vg.push(c),yf(Wg,Xg);else try{yf(),Wg()}catch(g){throw Xg(g),g;}}else c&&c()});
|
|
v("ee.reset",function(){Tg="not_ready";Le=Ke=Ie=null;Je=!1;la=null;xf={};N(jg);lg=!1;N(Dg);Fg=!1;N(O);Df=!1;N(W);Pg=!1;N(T);Hg=!1;N(R);Zf=!1;N(X);Rg=!1;N(V);Mg=!1;N(P);Ff=!1;N(S);og=!1;N(Ig);Kg=!1;N($f);bg=!1;N(cg);eg=!1;Sg.reset();for(var a=l.ee,b=0;b<Yg.length;b++){var c=Yg[b];N(a[c]);delete a[c]}Yg=[];lf=a;var a=Zg,d;for(d in a)delete a[d]});v("ee.InitState",{Rd:"not_ready",LOADING:"loading",Sd:"ready"});v("ee.InitState.NOT_READY","not_ready");v("ee.InitState.LOADING","loading");
|
|
v("ee.InitState.READY","ready");var Tg="not_ready",Vg=[],Ug=[];v("ee.TILE_SIZE",256);var Yg=[],Zg={};v("ee.Algorithms",Zg);v("ee.call",function(a,b){p(a)&&(a=new K(a));return J.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))});v("ee.apply",function(a,b){p(a)&&(a=new K(a));return a.apply(b)});
|
|
var Wg=function(){if("loading"==Tg){try{kg();Eg();Cf();Ng();Gg();Yf();Qg();Lg();Ef();mg();Jg();ag();dg();Sg.nd();var a=zf(),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=l.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=$g(g),Yg.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,xf[g]=!0):f[g].signature={});lf=f;ah()}catch(k){Xg(k);return}Tg="ready";for(Ug=[];0<Vg.length;)Vg.shift()()}},Xg=function(a){if("loading"==
|
|
Tg)for(Tg="not_ready",Vg=[];0<Ug.length;)Ug.shift()(a)},ah=function(){var a=Af();qa(a).sort().forEach(function(b){var c=a[b],d=c.H();if(!d.hidden){b=b.split(".");var e=Zg;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=db(b,1)}f=function(a){return uf(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=u(c.toString,c);e[b[0]]=f}})},$g=function(a){var b=function(b){var d=l.ee[a],e=Array.prototype.slice.call(arguments),f=1==e.length;if(f&&e[0]instanceof
|
|
d)return e[0];if(!(this instanceof d))return I(d,e);var d=Bf(a),g=!(e[0]instanceof H),k=!1;d&&(f?g?k=!0:e[0].b!=d&&(k=!0):k=!0);if(k)H.call(this,d,tf(d,sf(d,e)));else{if(!f)throw Error("Too many arguments for ee."+a+"(): "+e);if(g)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];H.call(this,e.b,e.i,e.m)}};w(b,H);b.prototype.name=function(){return a};M(b,a,a);return b},rf=function(a,b){if(null===a)return null;if(m(a)){var c=l.ee;switch(b){case "Image":return new W(a);
|
|
case "Feature":return a instanceof R?L("Feature",L("Collection.geometry",a)):new T(a);case "Element":if(a instanceof O)return a;if(a instanceof S)return new T(a);if(a instanceof H)return new O(a.b,a.i,a.m);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof V?L("Collection.geometry",a):new S(a);case "FeatureCollection":case "Collection":return a instanceof R?a:new V(a);case "ImageCollection":return new X(a);case "Filter":return new P(a);case "Algorithm":if(p(a))return new K(a);
|
|
if(r(a)){for(var c=a.length,d=[],e=0;e<c;e++)d[e]="Object";return ig(a,d)}if(a instanceof Ze)return a;throw Error("Argument is not a function: "+a);case "String":return pf(a)||a instanceof cg||a instanceof H?new cg(a):a;case "Dictionary":return qf(a)?a:new Dg(a);case "List":return new Ig(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new $f(a);default:if(b in c){d=Bf(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 bh=function(a,b){var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity="+100*b+")")};var ch=function(a){Jc.call(this);this.fa=a;this.c={}};w(ch,Jc);var dh=[];ch.prototype.Ja=function(a,b,c,d){n(b)||(b&&(dh[0]=b.toString()),b=dh);for(var e=0;e<b.length;e++){var f=$c(a,b[e],c||this.handleEvent,d||!1,this.fa||this);if(!f)break;this.c[f.key]=f}return this};ch.prototype.eb=function(a,b,c,d){return eh(this,a,b,c,d)};var eh=function(a,b,c,d,e,f){if(n(c))for(var g=0;g<c.length;g++)eh(a,b,c[g],d,e,f);else{b=gd(b,c,d||a.handleEvent,e,f||a.fa||a);if(!b)return a;a.c[b.key]=b}return a};
|
|
ch.prototype.tb=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)this.tb(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.fa||this,c=ad(c),d=!!d,b=Qc(a)?a.Ca(b,c,d,e):a?(a=cd(a))?a.Ca(b,c,d,e):null:null,b&&(id(b),delete this.c[b.key]);return this};ch.prototype.kb=function(){ka(this.c,function(a,b){this.c.hasOwnProperty(b)&&id(a)},this);this.c={}};ch.prototype.s=function(){ch.l.s.call(this);this.kb()};
|
|
ch.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var fh=function(a){B.call(this);this.Ga={};this.Fa={};this.fa=new ch(this);this.h=a};w(fh,B);var gh=[A&&!Ab("11")?"readystatechange":"load","abort","error"],hh=function(a,b){delete a.Ga[b];var c=a.Fa[b];c&&(delete a.Fa[b],a.fa.tb(c,gh,a.yc),sa(a.Fa)&&sa(a.Ga)&&a.dispatchEvent("complete"))};
|
|
fh.prototype.start=function(){var a=this.Ga;Ra(qa(a),function(b){var c=a[b];if(c&&(delete a[b],!this.Y)){var d;this.h?(d=this.h,d=(d?new Nb(Mb(d)):ya||(ya=new Nb)).Vc("IMG")):d=new Image;c.ic&&(d.crossOrigin=c.ic);this.fa.Ja(d,gh,this.yc);this.Fa[b]=d;d.id=b;d.src=c.src}},this)};
|
|
fh.prototype.yc=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.Y||hh(this,b.id)}};fh.prototype.s=function(){delete this.Ga;delete this.Fa;var a=this.fa;a&&"function"==typeof a.N&&a.N();fh.l.s.call(this)};var ih=function(){this.G=[];this.M=[]};h=ih.prototype;h.enqueue=function(a){this.M.push(a)};h.Aa=function(){0==this.G.length&&(this.G=this.M,this.G.reverse(),this.M=[]);return this.G.pop()};h.u=function(){return this.G.length+this.M.length};h.isEmpty=function(){return 0==this.G.length&&0==this.M.length};h.clear=function(){this.G=[];this.M=[]};h.contains=function(a){return 0<=Pa(this.G,a)||0<=Pa(this.M,a)};h.remove=function(a){var b=Qa(this.G,a);if(0>b)return $a(this.M,a);Za(this.G,b);return!0};
|
|
h.v=function(){for(var a=[],b=this.G.length-1;0<=b;--b)a.push(this.G[b]);for(var c=this.M.length,b=0;b<c;++b)a.push(this.M[b]);return a};var jh=function(a,b){Jc.call(this);this.wc=a||0;this.fb=b||10;if(this.wc>this.fb)throw Error("[goog.structs.Pool] Min can not be greater than max");this.P=new ih;this.$=new xd;this.Eb=0;this.Qb=null;this.Qa()};w(jh,Jc);h=jh.prototype;h.Xa=function(){var a=ja();if(!(null!=this.Qb&&a-this.Qb<this.Eb)){for(var b;0<this.P.u()&&(b=this.P.Aa(),!this.Tb(b));)this.Qa();!b&&this.u()<this.fb&&(b=this.Db());b&&(this.Qb=a,this.$.add(b));return b}};
|
|
h.yb=function(a){this.$.remove(a);this.Tb(a)&&this.u()<this.fb?this.P.enqueue(a):this.Ua(a)};h.Qa=function(){for(var a=this.P;this.u()<this.wc;)a.enqueue(this.Db());for(;this.u()>this.fb&&0<this.P.u();)this.Ua(a.Aa())};h.Db=function(){return{}};h.Ua=function(a){if("function"==typeof a.N)a.N();else for(var b in a)a[b]=null};h.Tb=function(a){return"function"==typeof a.Sc?a.Sc():!0};h.contains=function(a){return this.P.contains(a)||this.$.contains(a)};h.u=function(){return this.P.u()+this.$.u()};
|
|
h.isEmpty=function(){return this.P.isEmpty()&&this.$.isEmpty()};h.s=function(){jh.l.s.call(this);if(0<this.$.u())throw Error("[goog.structs.Pool] Objects not released");delete this.$;for(var a=this.P;!a.isEmpty();)this.Ua(a.Aa());delete this.P};var kh=function(a,b){this.uc=a;this.bc=b};kh.prototype.getKey=function(){return this.uc};kh.prototype.clone=function(){return new kh(this.uc,this.bc)};var lh=function(a){this.L=[];if(a)a:{var b,c;if(a instanceof lh){if(b=a.K(),c=a.v(),0>=a.u()){a=this.L;for(var d=0;d<b.length;d++)a.push(new kh(b[d],c[d]));break a}}else b=qa(a),c=pa(a);for(d=0;d<b.length;d++)mh(this,b[d],c[d])}},mh=function(a,b,c){var d=a.L;d.push(new kh(b,c));b=d.length-1;a=a.L;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=lh.prototype;
|
|
h.remove=function(){var a=this.L,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Ya(a);else{a[0]=a.pop();for(var a=0,b=this.L,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.bc}};h.v=function(){for(var a=this.L,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].bc);return b};h.K=function(){for(var a=this.L,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
|
|
h.X=function(a){return Ua(this.L,function(b){return b.getKey()==a})};h.clone=function(){return new lh(this)};h.u=function(){return this.L.length};h.isEmpty=function(){return 0==this.L.length};h.clear=function(){Ya(this.L)};var nh=function(){lh.call(this)};w(nh,lh);nh.prototype.enqueue=function(a,b){mh(this,a,b)};nh.prototype.Aa=function(){return this.remove()};var oh=function(a,b){this.kc=void 0;this.mb=new nh;jh.call(this,a,b)};w(oh,jh);h=oh.prototype;h.Xa=function(a,b){if(!a){var c=oh.l.Xa.call(this);c&&this.Eb&&(this.kc=l.setTimeout(u(this.Za,this),this.Eb));return c}this.mb.enqueue(m(b)?b:100,a);this.Za()};h.Za=function(){for(var a=this.mb;0<a.u();){var b=this.Xa();if(b)a.Aa().apply(this,[b]);else break}};h.yb=function(a){oh.l.yb.call(this,a);this.Za()};h.Qa=function(){oh.l.Qa.call(this);this.Za()};
|
|
h.s=function(){oh.l.s.call(this);l.clearTimeout(this.kc);this.mb.clear();this.mb=null};var Y=function(){B.call(this);this.pb=new ph(0,4);this.ua=new sd};w(Y,B);v("ee.MapTileManager",Y);Y.oc=function(){return Y.rc?Y.rc:Y.rc=new Y};Y.prototype.send=function(a,b,c,d,e){if(this.ua.get(a))throw Error("[ee.MapTileManager] ID in use");b=new qh(a,b,d,u(this.Cc,this),m(e)?e:1);this.ua.set(a,b);a=u(this.jd,this,b);this.pb.Xa(a,c);return b};Y.prototype.abort=function(a){if(a=this.ua.get(a))a.ya||(a.ya=!0,a.da=new Kc("abort")),this.Cc(a)};
|
|
Y.prototype.jd=function(a,b){if(a.Z||a.ya)rh(this,b);else{a.Kc=b;b.setActive(!0);var c=new fh;a.Z=c;if(!sh(a))throw Error("Cannot dispatch first request!");}};Y.prototype.Cc=function(a){this.ua.remove(a.V);a.Z&&(rh(this,a.Kc),a.Z.N());a.Mb&&a.Mb(a.da,a.Bc)};var rh=function(a,b){b.setActive(!1);var c;c=a.pb;c.$.remove(b)?(c.yb(b),c=!0):c=!1;if(!c)throw Error("Object not released");};
|
|
Y.prototype.s=function(){Y.l.s.call(this);this.pb.N();this.pb=null;var a=this.ua;Ra(a.v(),function(a){a.N()});a.clear();this.ua=null};var qh=function(a,b,c,d,e){Jc.call(this);this.V=a;this.Nd=b;this.ud=m(e)?e:1;this.Mb=c;this.ia=d};w(qh,Jc);h=qh.prototype;h.dc=0;h.ya=!1;h.Z=null;h.Kc=null;h.da=null;h.Bc=null;var th=["load","abort","error"];qh.prototype.getUrl=function(){return this.Nd};
|
|
qh.prototype.ld=function(a){if(this.ya)this.ia&&this.ia(this);else switch(a.type){case "load":this.da=a;this.ia&&this.ia(this);break;case "error":case "abort":sh(this)||(this.da=a,this.ia&&this.ia(this))}};qh.prototype.s=function(){qh.l.s.call(this);delete this.Mb;delete this.ia};var sh=function(a){if(a.dc>a.ud)return!1;a.dc++;hh(a.Z,a.V);setTimeout(u(a.Hd,a),0);return!0};
|
|
qh.prototype.Hd=function(){if(!this.ya){var a=u(function(a){(a=p(a)?a:a.src)&&(this.Z.Ga[this.V]={src:a,ic:m(void 0)?void 0:null});gd(this.Z,th,u(this.ld,this));this.Z.start()},this),b=this.getUrl();if(ve(we(b)).X("profiling")){var c=new E;c.Ka="blob";c.Ja("complete",u(function(){this.Bc=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;var d;try{d=URL.createObjectURL(he(c))}catch(e){}a(d||b)},this));c.eb("ready",u(c.N,c));c.send(b,"GET")}else a(b)}};var uh=function(){this.J=!1};
|
|
w(uh,Jc);uh.prototype.setActive=function(a){this.J=a};uh.prototype.sc=function(){return this.J};var ph=function(a,b){oh.call(this,a,b)};w(ph,oh);ph.prototype.Db=function(){return new uh};ph.prototype.Ua=function(a){a.N()};ph.prototype.Tb=function(a){return!a.Y&&!a.sc()};var Z=function(a,b,c,d,e){B.call(this);this.td=b;this.Kd=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.tc=m(d.tc)?d.tc:!0;this.name=d.name;this.La=[];this.ac=new xd;this.Hc=new xd;this.$b=0;this.url=a;this.Ub=1;this.ra=e||null};w(Z,B);v("ee.MapLayerOverlay",Z);Z.prototype.Nc=function(a){return $c(this,"tileevent",a)};
|
|
Z.prototype.addTileCallback=Z.prototype.Nc;Z.prototype.Ed=function(a){id(a)};Z.prototype.removeTileCallback=Z.prototype.Ed;
|
|
Z.prototype.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||0>a.y||a.y>=d)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;c=a.x%d;0>c&&(c+=d);b=[this.td,b,c,a.y].join("/");a=[this.url,b].join("/")+"?token="+this.Kd;this.ra&&this.ra.isEnabled()&&(a+="&profiling=1&no-cache=1");b=b+"/"+this.$b;this.$b+=1;d=Ib("div",{id:b});c=(new Date).getTime()/1E3;this.La.push(b);Y.oc().send(b,a,c,u(this.kd,this,d,b));this.dispatchEvent(new vh(this.La.length));return d};
|
|
Z.prototype.releaseTile=function(a){Y.oc().abort(a.id);this.ac.remove(m(a.firstElementChild)?a.firstElementChild:Lb(a.firstChild));this.Hc.remove(a.id);this.ra&&this.ra.Xd(a.id)};Z.prototype.setOpacity=function(a){this.Ub=a;var b=this.ac.la();rd(b,function(b){bh(b,a)})};Z.prototype.getTile=Z.prototype.getTile;Z.prototype.setOpacity=Z.prototype.setOpacity;Z.prototype.releaseTile=Z.prototype.releaseTile;
|
|
Z.prototype.kd=function(a,b,c,d){"error"==c.type?($a(this.La,b),this.Hc.add(b),this.dispatchEvent(c)):($a(this.La,b),c.target&&"load"==c.type&&(c=c.target,this.ac.add(c),1!=this.Ub&&bh(c,this.Ub),a.appendChild(c)),this.dispatchEvent(new vh(this.La.length)));this.ra&&null!==d&&this.ra.Ud(b,d)};var vh=function(a){Kc.call(this,"tileevent");this.count=a};w(vh,Kc);})();
|
|
//@ sourceMappingURL=ee_api_js.sourcemap
|