@google/earthengine 0.1.413 → 0.1.414
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/browser.js +165 -161
- package/build/ee_api_js.js +273 -273
- package/build/ee_api_js_debug.js +143 -138
- package/build/ee_api_js_npm.js +165 -161
- package/build/main.js +165 -161
- package/package.json +1 -1
- package/src/apiclient.js +1 -1
- package/src/examples/UserInterface/PopulationExplorer.js +9 -3
package/build/ee_api_js.js
CHANGED
|
@@ -417,76 +417,76 @@ f){e.Xb=b?function(l){try{var m=b.call(d,l);g(m)}catch(p){f(p)}}:g;e.sc=c?functi
|
|
|
417
417
|
var fi=function(a,b,c){if(a.T==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.T=1;a:{var d=c,e=a.Dl,g=a.El;if(d instanceof hi){e!=null&&tb(e,"opt_onFulfilled should be a function.");g!=null&&tb(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");qi(d,ki(e||Vd,g||null,a));var f=!0}else if(ei(d))d.then(e,g,a),f=!0;else{if(u(d))try{var l=d.then;if(typeof l==="function"){ri(d,l,e,g,a);f=!0;break a}}catch(m){g.call(a,m);
|
|
418
418
|
f=!0;break a}f=!1}}f||(a.ia=c,a.T=b,a.X=null,pi(a),b!=3||c instanceof gi||si(a,c))}},ri=function(a,b,c,d,e){var g=!1,f=function(m){g||(g=!0,c.call(e,m))},l=function(m){g||(g=!0,d.call(e,m))};try{b.call(a,f,l)}catch(m){l(m)}},pi=function(a){a.jf||(a.jf=!0,ci(a.Uk,a))},ni=function(a){var b=null;a.fb&&(b=a.fb,a.fb=b.next,b.next=null);a.fb||(a.lc=null);b!=null&&E(b.Xb!=null);return b};hi.prototype.Uk=function(){for(var a;a=ni(this);)oi(this,a,this.T,this.ia);this.jf=!1};
|
|
419
419
|
var oi=function(a,b,c,d){if(c==3&&b.sc&&!b.sd)for(;a&&a.Md;a=a.X)a.Md=!1;if(b.Nb)b.Nb.X=null,ti(b,c,d);else try{b.sd?b.Xb.call(b.context):ti(b,c,d)}catch(e){ui.call(null,e)}ji.put(b)},ti=function(a,b,c){b==2?a.Xb.call(a.context,c):a.sc&&a.sc.call(a.context,c)},si=function(a,b){a.Md=!0;ci(function(){a.Md&&ui.call(null,b)})},ui=Rh,gi=function(a){lb.call(this,a)};y(gi,lb);gi.prototype.name="cancel";var vi=function(a,b,c){if(typeof a==="function")c&&(a=w(a,c));else if(a&&typeof a.handleEvent=="function")a=w(a.handleEvent,a);else throw Error("Invalid listener argument");return Number(b)>2147483647?-1:t.setTimeout(a,b||0)};var wi=function(a,b,c){H.call(this);this.dl=c!=null?a.bind(c):a;this.al=b;this.td=null;this.xc=!1;this.Zc=0;this.ec=null};r(wi,H);h=wi.prototype;h.nf=function(a){this.td=arguments;this.ec||this.Zc?this.xc=!0:xi(this)};h.stop=function(){this.ec&&(t.clearTimeout(this.ec),this.ec=null,this.xc=!1,this.td=null)};h.pause=function(){this.Zc++};h.resume=function(){this.Zc--;this.Zc||!this.xc||this.ec||(this.xc=!1,xi(this))};h.J=function(){H.prototype.J.call(this);this.stop()};
|
|
420
|
-
var xi=function(a){a.ec=vi(function(){a.ec=null;a.xc&&!a.Zc&&(a.xc=!1,xi(a))},a.al);var b=a.td;a.td=null;a.dl.apply(null,b)}
|
|
420
|
+
var xi=function(a){a.ec=vi(function(){a.ec=null;a.xc&&!a.Zc&&(a.xc=!1,xi(a))},a.al);var b=a.td;a.td=null;a.dl.apply(null,b)};/*
|
|
421
421
|
|
|
422
422
|
Copyright 2005, 2007 Bob Ippolito. All Rights Reserved.
|
|
423
423
|
Copyright The Closure Library Authors.
|
|
424
424
|
SPDX-License-Identifier: MIT
|
|
425
425
|
*/
|
|
426
|
-
var zi=function(a
|
|
426
|
+
var zi=function(a){var b=yi;this.ge=[];this.ai=b;this.mh=a||null;this.Nc=this.oc=!1;this.ia=void 0;this.ig=this.Og=this.Qe=!1;this.re=0;this.X=null;this.Re=0};zi.prototype.cancel=function(a){if(this.oc)this.ia instanceof zi&&this.ia.cancel();else{if(this.X){var b=this.X;delete this.X;a?b.cancel(a):(b.Re--,b.Re<=0&&b.cancel())}this.ai?this.ai.call(this.mh,this):this.ig=!0;this.oc||Ai(this,new Bi(this))}};zi.prototype.Zg=function(a,b){this.Qe=!1;Ci(this,a,b)};
|
|
427
427
|
var Ci=function(a,b,c){a.oc=!0;a.ia=c;a.Nc=!b;Di(a)},Fi=function(a){if(a.oc){if(!a.ig)throw new Ei(a);a.ig=!1}};zi.prototype.callback=function(a){Fi(this);Gi(a);Ci(this,!0,a)};var Ai=function(a,b){Fi(a);Gi(b);Ci(a,!1,b)},Gi=function(a){E(!(a instanceof zi),"An execution sequence may not be initiated with a blocking Deferred.")},Ji=function(a){var b=Hi();Ii(b,a,null)},Ii=function(a,b,c,d){E(!a.Og,"Blocking Deferreds can not be re-used");a.ge.push([b,c,d]);a.oc&&Di(a)};
|
|
428
428
|
zi.prototype.then=function(a,b,c){var d,e,g=new hi(function(f,l){e=f;d=l});Ii(this,e,function(f){f instanceof Bi?g.cancel():d(f);return Ki},this);return g.then(a,b,c)};zi.prototype.$goog_Thenable=!0;
|
|
429
429
|
var Li=function(a){return Zb(a.ge,function(b){return typeof b[1]==="function"})},Ki={},Di=function(a){if(a.re&&a.oc&&Li(a)){var b=a.re,c=Mi[b];c&&(t.clearTimeout(c.fa),delete Mi[b]);a.re=0}a.X&&(a.X.Re--,delete a.X);b=a.ia;for(var d=c=!1;a.ge.length&&!a.Qe;){var e=a.ge.shift(),g=e[0],f=e[1];e=e[2];if(g=a.Nc?f:g)try{var l=g.call(e||a.mh,b);l===Ki&&(l=void 0);l!==void 0&&(a.Nc=a.Nc&&(l==b||l instanceof Error),a.ia=b=l);if(ei(b)||typeof t.Promise==="function"&&b instanceof t.Promise)d=!0,a.Qe=!0}catch(m){b=
|
|
430
430
|
m,a.Nc=!0,Li(a)||(c=!0)}}a.ia=b;d&&(l=w(a.Zg,a,!0),d=w(a.Zg,a,!1),b instanceof zi?(Ii(b,l,d),b.Og=!0):b.then(l,d));c&&(b=new Ni(b),Mi[b.fa]=b,a.re=b.fa)},Ei=function(){lb.call(this)};y(Ei,lb);Ei.prototype.message="Deferred has already fired";Ei.prototype.name="AlreadyCalledError";var Bi=function(){lb.call(this)};y(Bi,lb);Bi.prototype.message="Deferred was canceled";Bi.prototype.name="CanceledError";var Ni=function(a){this.fa=t.setTimeout(w(this.Cl,this),0);this.Gd=a};
|
|
431
|
-
Ni.prototype.Cl=function(){E(Mi[this.fa],"Cannot throw an error that is not scheduled.");delete Mi[this.fa];throw this.Gd;};var Mi={};var Hi=function(){var a=Dh(Oi),b={},c=b.document||document,d=yb(a).toString(),e=(new Oh(c)).createElement("SCRIPT"),g={vi:e,ne:void 0},f=new zi(
|
|
432
|
-
d))};g=b.attributes||{};jb(g,{type:"text/javascript",charset:"UTF-8"});Hh(e,g);Fh(e,a);
|
|
433
|
-
b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);lb.call(this,c);this.code=a};y(
|
|
434
|
-
var
|
|
435
|
-
return}}switch(typeof b){case "string":
|
|
436
|
-
d||(d="\\u"+(c.charCodeAt(0)|65536).toString(16).slice(1),
|
|
437
|
-
h.send=function(a,b,c,d){if(this.s)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Td+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Td=a;this.Rc="";this.Mh=b;this.gf=!1;this.Ea=!0;this.s=new XMLHttpRequest;this.ve=this.Ri
|
|
438
|
-
!0,this.s.open(b,String(a),!0),this.Af=!1}catch(f){Hc(this.ba,
|
|
439
|
-
f.toLowerCase()});e=t.FormData&&a instanceof t.FormData;!bc(
|
|
440
|
-
f.message))}if("setAttributionReporting"in this.s&&this.Oe)try{this.s.setAttributionReporting(this.Oe)}catch(f){Hc(this.ba,
|
|
441
|
-
h.ne=function(){typeof va!="undefined"&&this.s&&(this.Rc="Timed out after "+this.ld+"ms, aborting",Hc(this.ba,
|
|
442
|
-
|
|
443
|
-
var
|
|
444
|
-
a.dispatchEvent("success");else{try{var g=a.tb()>2?a.s.statusText:""}catch(f){Hc(a.ba,"Can not get status: "+f.message),g=""}a.Rc=g+" ["+a.getStatus()+"]";
|
|
445
|
-
var
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
var
|
|
449
|
-
h.assets=function(){return new mh(this.M)};h.Na=function(){return new th(this.M)};h.value=function(){return new xh(this.M)};h.maps=function(){return new sh(this.M)};h.map=function(){return new rh(this.M)};h.image=function(){return new qh(this.M)};h.table=function(){return new uh(this.M)};h.video=function(){return new zh(this.M)};var
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
Ma(p,f[m]))});return b?b(l):l};return this.callback?(
|
|
454
|
-
|
|
455
|
-
var
|
|
456
|
-
b&&d.push("https://www.googleapis.com/auth/devstorage.read_write");a=d=d.concat(c);c=b=0;for(var e={};c<a.length;){var g=a[c++],f=u(g)?"o"+Ba(g):(typeof g).charAt(0)+g;Object.prototype.hasOwnProperty.call(e,f)||(e[f]=!0,a[b++]=g)}a.length=b;return d},
|
|
457
|
-
b,d)})},
|
|
458
|
-
(p="latest");m["x-goog-api-client"]="ee-js/"+p;p=
|
|
459
|
-
"?")?"&":"?",a+=v);e=a.startsWith("/")?
|
|
460
|
-
m.callback=function(A){A=A.target;if(A.getStatus()==429&&l<v)return l++,setTimeout(function(){
|
|
431
|
+
Ni.prototype.Cl=function(){E(Mi[this.fa],"Cannot throw an error that is not scheduled.");delete Mi[this.fa];throw this.Gd;};var Mi={};var Hi=function(){var a=Dh(Oi),b={},c=b.document||document,d=yb(a).toString(),e=(new Oh(c)).createElement("SCRIPT"),g={vi:e,ne:void 0},f=new zi(g),l=null,m=b.timeout!=null?b.timeout:5E3;m>0&&(l=window.setTimeout(function(){Pi(e,!0);Ai(f,new Qi(1,"Timeout reached for loading script "+d))},m),g.ne=l);e.onload=e.onreadystatechange=function(){e.readyState&&e.readyState!="loaded"&&e.readyState!="complete"||(Pi(e,b.Ll||!1,l),f.callback(null))};e.onerror=function(){Pi(e,!0,l);Ai(f,new Qi(0,"Error while loading script "+
|
|
432
|
+
d))};g=b.attributes||{};jb(g,{type:"text/javascript",charset:"UTF-8"});Hh(e,g);Fh(e,a);Ri(c).appendChild(e);return f},Ri=function(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&b.length!==0?b[0]:a.documentElement},yi=function(){if(this&&this.vi){var a=this.vi;a&&a.tagName=="SCRIPT"&&Pi(a,!0,this.ne)}},Pi=function(a,b,c){c!=null&&t.clearTimeout(c);a.onload=function(){};a.onerror=function(){};a.onreadystatechange=function(){};b&&window.setTimeout(function(){Mh(a)},0)},Qi=function(a,
|
|
433
|
+
b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);lb.call(this,c);this.code=a};y(Qi,lb);var Si=function(){this.de=void 0};Si.prototype.va=function(a){var b=[];Ti(this,a,b);return b.join("")};
|
|
434
|
+
var Ti=function(a,b,c){if(b==null)c.push("null");else{if(typeof b=="object"){if(Array.isArray(b)){var d=b;b=d.length;c.push("[");for(var e="",g=0;g<b;g++)c.push(e),e=d[g],Ti(a,a.de?a.de.call(d,String(g),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");g="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],typeof e!="function"&&(c.push(g),Ui(d,c),c.push(":"),Ti(a,a.de?a.de.call(b,d,e):e,c),g=","));c.push("}");
|
|
435
|
+
return}}switch(typeof b){case "string":Ui(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}},Vi={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Wi=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,Ui=function(a,b){b.push('"',a.replace(Wi,function(c){var d=Vi[c];
|
|
436
|
+
d||(d="\\u"+(c.charCodeAt(0)|65536).toString(16).slice(1),Vi[c]=d);return d}),'"')};var Xi=function(a){switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:return!0;default:return!1}};var Yi=function(){};Yi.prototype.Sg=null;var Zi=function(a){var b;(b=a.Sg)||(b=a.Sg={});return b};var $i,aj=function(){};y(aj,Yi);$i=new aj;var bj=function(a){J.call(this);this.headers=new Map;this.Ri=a||null;this.Ea=!1;this.ve=this.s=null;this.Rc=this.Mh=this.Td="";this.Tb=this.Af=this.Rd=this.gf=!1;this.ld=0;this.me=null;this.wc="";this.ql=this.Pi=!1;this.Oe=this.zg=null};y(bj,J);bj.prototype.ba=Dc(Ec(),"goog.net.XhrIo").fl;var cj=/^https?$/i,dj=["POST","PUT"],ej=[];h=bj.prototype;h.Pk=function(){this.dispose();cc(ej,this)};h.setTrustToken=function(a){this.zg=a};h.setAttributionReporting=function(a){this.Oe=a};
|
|
437
|
+
h.send=function(a,b,c,d){if(this.s)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Td+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Td=a;this.Rc="";this.Mh=b;this.gf=!1;this.Ea=!0;this.s=new XMLHttpRequest;this.ve=this.Ri?Zi(this.Ri):Zi($i);this.s.onreadystatechange=w(this.di,this);this.ql&&"onprogress"in this.s&&(this.s.onprogress=w(function(f){this.ci(f,!0)},this),this.s.upload&&(this.s.upload.onprogress=w(this.ci,this)));try{Hc(this.ba,fj(this,"Opening Xhr")),this.Af=
|
|
438
|
+
!0,this.s.open(b,String(a),!0),this.Af=!1}catch(f){Hc(this.ba,fj(this,"Error opening Xhr: "+f.message));this.Gd(5,f);return}a=c||"";c=new Map(this.headers);if(d)if(Object.getPrototypeOf(d)===Object.prototype)for(var e in d)c.set(e,d[e]);else if(typeof d.keys==="function"&&typeof d.get==="function"){e=q(d.keys());for(var g=e.next();!g.done;g=e.next())g=g.value,c.set(g,d.get(g))}else throw Error("Unknown input type for opt_headers: "+String(d));d=Array.from(c.keys()).find(function(f){return"content-type"==
|
|
439
|
+
f.toLowerCase()});e=t.FormData&&a instanceof t.FormData;!bc(dj,b)||d||e||c.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");b=q(c);for(d=b.next();!d.done;d=b.next())c=q(d.value),d=c.next().value,c=c.next().value,this.s.setRequestHeader(d,c);this.wc&&(this.s.responseType=this.wc);"withCredentials"in this.s&&this.s.withCredentials!==this.Pi&&(this.s.withCredentials=this.Pi);if("setTrustToken"in this.s&&this.zg)try{this.s.setTrustToken(this.zg)}catch(f){Hc(this.ba,fj(this,"Error SetTrustToken: "+
|
|
440
|
+
f.message))}if("setAttributionReporting"in this.s&&this.Oe)try{this.s.setAttributionReporting(this.Oe)}catch(f){Hc(this.ba,fj(this,"Error SetAttributionReporting: "+f.message))}try{gj(this),this.ld>0&&(Hc(this.ba,fj(this,"Will abort after "+this.ld+"ms if incomplete")),this.me=vi(this.ne,this.ld,this)),Hc(this.ba,fj(this,"Sending request")),this.Rd=!0,this.s.send(a),this.Rd=!1}catch(f){Hc(this.ba,fj(this,"Send error: "+f.message)),this.Gd(5,f)}};
|
|
441
|
+
h.ne=function(){typeof va!="undefined"&&this.s&&(this.Rc="Timed out after "+this.ld+"ms, aborting",Hc(this.ba,fj(this,this.Rc)),this.dispatchEvent("timeout"),this.abort(8))};h.Gd=function(a,b){this.Ea=!1;this.s&&(this.Tb=!0,this.s.abort(),this.Tb=!1);this.Rc=b;hj(this);ij(this)};var hj=function(a){a.gf||(a.gf=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
|
|
442
|
+
bj.prototype.abort=function(){this.s&&this.Ea&&(Hc(this.ba,fj(this,"Aborting")),this.Ea=!1,this.Tb=!0,this.s.abort(),this.Tb=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ij(this))};bj.prototype.J=function(){this.s&&(this.Ea&&(this.Ea=!1,this.Tb=!0,this.s.abort(),this.Tb=!1),ij(this,!0));bj.L.J.call(this)};bj.prototype.di=function(){this.Ra||(this.Af||this.Rd||this.Tb?jj(this):this.ml())};bj.prototype.ml=function(){jj(this)};
|
|
443
|
+
var jj=function(a){if(a.Ea&&typeof va!="undefined")if(a.ve[1]&&a.tb()==4&&a.getStatus()==2)Hc(a.ba,fj(a,"Local request error detected and ignored"));else if(a.Rd&&a.tb()==4)vi(a.di,0,a);else if(a.dispatchEvent("readystatechange"),a.tb()==4){Hc(a.ba,fj(a,"Request complete"));a.Ea=!1;try{var b=a.getStatus(),c;if(!(c=Xi(b))){var d;if(d=b===0){var e=String(a.Td).match(Pc)[1]||null;!e&&t.self&&t.self.location&&(e=t.self.location.protocol.slice(0,-1));d=!cj.test(e?e.toLowerCase():"")}c=d}if(c)a.dispatchEvent("complete"),
|
|
444
|
+
a.dispatchEvent("success");else{try{var g=a.tb()>2?a.s.statusText:""}catch(f){Hc(a.ba,"Can not get status: "+f.message),g=""}a.Rc=g+" ["+a.getStatus()+"]";hj(a)}}finally{ij(a)}}};bj.prototype.ci=function(a,b){E(a.type==="progress","goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(kj(a,"progress"));this.dispatchEvent(kj(a,b?"downloadprogress":"uploadprogress"))};
|
|
445
|
+
var kj=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},ij=function(a,b){if(a.s){gj(a);var c=a.s,d=a.ve[0]?function(){}:null;a.s=null;a.ve=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){Gc(a.ba,"Problem encountered resetting onreadystatechange: "+e.message)}}},gj=function(a){a.me&&(t.clearTimeout(a.me),a.me=null)};bj.prototype.isActive=function(){return!!this.s};bj.prototype.tb=function(){return this.s?this.s.readyState:0};
|
|
446
|
+
bj.prototype.getStatus=function(){try{return this.tb()>2?this.s.status:-1}catch(a){return-1}};var lj=function(a){try{if(!a.s)return null;if("response"in a.s)return a.s.response;switch(a.wc){case "":case "text":return a.s.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.s)return a.s.mozResponseArrayBuffer}Gc(a.ba,"Response type "+a.wc+" is not supported on this browser");return null}catch(b){return Hc(a.ba,"Can not get response: "+b.message),null}};
|
|
447
|
+
bj.prototype.getResponseHeader=function(a){if(this.s&&this.tb()==4)return a=this.s.getResponseHeader(a),a===null?void 0:a};bj.prototype.getAllResponseHeaders=function(){return this.s&&this.tb()>=2?this.s.getAllResponseHeaders()||"":""};
|
|
448
|
+
var mj=function(a){var b={};a=a.getAllResponseHeaders().split("\r\n");for(var c=0;c<a.length;c++)if(!/^[\s\xa0]*$/.test(a[c])){var d=Jc(a[c]),e=d[0];d=d[1];if(typeof d==="string"){d=d.trim();var g=b[e]||[];b[e]=g;g.push(d)}}return Ya(b,function(f){return f.join(", ")})},fj=function(a,b){return b+" ["+a.Mh+" "+a.Td+" "+a.getStatus()+"]"};var Oi=ha(["https://accounts.google.com/gsi/client"]),nj,K=function(a,b){oj();this.callback=a;this.M=new pj(!a,b)};K.prototype.pd=function(a){this.M.Qb=a;return this};K.prototype.handle=function(a){var b=this;if(a instanceof Promise){if(this.callback){var c=function(d,e){try{return b.callback(d,e)}catch(g){setTimeout(function(){throw g;},0)}};a.then(c,function(d){return c(void 0,d)})}}else a.then(function(d){a=d});return a};var qj=function(){return"projects/"+nj};h=K.prototype;h.Dc=function(){return new kh(this.M)};
|
|
449
|
+
h.assets=function(){return new mh(this.M)};h.Na=function(){return new th(this.M)};h.value=function(){return new xh(this.M)};h.maps=function(){return new sh(this.M)};h.map=function(){return new rh(this.M)};h.image=function(){return new qh(this.M)};h.table=function(){return new uh(this.M)};h.video=function(){return new zh(this.M)};var pj=function(a,b){this.sync=a=a===void 0?!1:a;this.Qb=void 0;this.si=b!=null?b:a?5:10};r(pj,ld);
|
|
450
|
+
pj.prototype.send=function(a,b){var c=this;hd(a);var d=a.path||"",e=sj()+d,g=tj(a.u||{}),f=a.body?JSON.stringify(a.body):void 0;if(this.sync){d=uj(e,g,void 0,a.B,f,this.si,this.Qb);d=b?Ma(b,d):d;var l=function(m){return{then:function(p){return l(p(m))}}};return l(d)}return(new Promise(function(m,p){uj(e,g,function(v,A){A?p(A):m(v)},a.B,f,c.si,c.Qb)})).then(function(m){return b?Ma(b,m):m})};var wj=function(a){K.call(this,a);this.M=new vj;this.Qb=void 0};r(wj,K);
|
|
451
|
+
wj.prototype.pd=function(a){this.Qb=a;return this};
|
|
452
|
+
wj.prototype.send=function(a,b){var c=this,d=sj()+"/batch",e=a.map(function(f){var l=q(f);f=l.next().value;var m=q(l.next().value);l=m.next().value;m.next();return"--batch_EARTHENGINE_batch\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nMIME-Version: 1.0\r\nContent-ID: <"+f+">\r\n\r\n"+l+"\r\n"}).join("")+"--batch_EARTHENGINE_batch--\r\n",g=function(f){var l={};a.forEach(function(m){var p=q(m);m=p.next().value;p=q(p.next().value);p.next();p=p.next().value;f[m]!=null&&(l[m]=
|
|
453
|
+
Ma(p,f[m]))});return b?b(l):l};return this.callback?(uj(d,null,function(f,l){return c.callback(l?f:g(f),l)},"multipart/mixed; boundary=batch_EARTHENGINE_batch",e,void 0,this.Qb),null):g(uj(d,null,void 0,"multipart/mixed; boundary=batch_EARTHENGINE_batch",e,void 0,this.Qb))};var vj=function(){};r(vj,ld);
|
|
454
|
+
vj.prototype.send=function(a,b){var c=[a.B+" "+a.path+" HTTP/1.1"];c.push("Content-Type: application/json; charset=utf-8");var d=xj();d!=null&&c.push("Authorization: "+d);a=a.body?JSON.stringify(a.body):"";return[c.join("\r\n")+"\r\n\r\n"+a,b]};
|
|
455
|
+
var yj=function(a,b,c){a=q(b.split("--"+a.split("; boundary=")[1]));for(b=a.next();!b.done;b=a.next())if(b=b.value.split("\r\n\r\n"),!(b.length<3)){var d=b[0].match(/\r\nContent-ID: <response-([^>]*)>/)[1],e=Number(b[1].match(/^HTTP\S*\s(\d+)\s/)[1]);c(d,e,b.slice(2).join("\r\n\r\n"))}},sj=function(){var a=zj.replace(/\/api$/,"");return"window"in t&&!a.match(/^https?:\/\/content-/)?a.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/,"$1content-$2"):a},Bj=function(a,b,c){var d=[];a&&(d=d.concat(Aj));
|
|
456
|
+
b&&d.push("https://www.googleapis.com/auth/devstorage.read_write");a=d=d.concat(c);c=b=0;for(var e={};c<a.length;){var g=a[c++],f=u(g)?"o"+Ba(g):(typeof g).charAt(0)+g;Object.prototype.hasOwnProperty.call(e,f)||(e[f]=!0,a[b++]=g)}a.length=b;return d},Hj=function(a,b,c){Cj&&Dj&&Cj({client_id:String(Dj),scope:Ej.join(" "),plugin_name:"earthengine"},function(d){if(d.error=="immediate_failed"&&c)c();else if("window"in t)try{Fj(function(){try{Gj(a,b,d)}catch(e){b(e.toString())}})}catch(e){b(e.toString())}else Gj(a,
|
|
457
|
+
b,d)})},xj=function(){Ij&&Date.now()-Ij>=0&&Jj();return Kj},Jj=function(){Ij=Kj=null},oj=function(a,b,c,d){a!=null?zj=a:Lj||(zj="https://earthengine.googleapis.com/api");b!=null?Mj=b:Lj||(Mj="https://earthengine.googleapis.com");c!==void 0&&(Nj=c);nj=d!=null?d:nj||"earthengine-legacy";Lj=!0},uj=function(a,b,c,d,e,g,f){oj();var l=Oj,m="application/x-www-form-urlencoded";e&&(m="application/json",d&&d.startsWith("multipart")&&(m=d,d="POST"));d=d||"POST";m={"Content-Type":m};var p="0.1.414";p==="0.1.414"&&
|
|
458
|
+
(p="latest");m["x-goog-api-client"]="ee-js/"+p;p=xj();if(p!=null)m.Authorization=p;else if(c&&Cj&&Dj)return Hj(function(){Pj(l,function(){uj(a,b,c,d)})}),null;b=b?b.clone():new Xc;Qj!=null&&b.add("key",Qj);l&&(m["X-Earth-Engine-Computation-Profiling"]="1");nj&&nj!=="earthengine-legacy"&&(m["X-Goog-User-Project"]=nj);b=Rj(b,a);Nj!=null&&(m["X-XSRF-Token"]=Nj);Sj!=null&&(m["X-Earth-Engine-App-ID-Token"]=Sj);p=e||null;var v=b?b.toString():"";d==="POST"&&e===void 0?p=v:/^[\s\xa0]*$/.test(v)||(a+=kb(a,
|
|
459
|
+
"?")?"&":"?",a+=v);e=a.startsWith("/")?zj+a:a;if(c)return Tj.push(Uj(e,c,d,p,m,g,f)),Vj.nf(),null;v=function(I,ea){this.setRequestHeader&&this.setRequestHeader(ea,I)};var A=0;for(g=g!=null?g:5;;){var C=new XMLHttpRequest;C.open(d,e,!1);Wa(m,v,C);C.send(p);if(C.status!=429||A>g)break;A++}return Wj(C.status,function(I){try{return C.getResponseHeader(I)}catch(ea){return null}},C.responseText,l,void 0,e,d,f)},Uj=function(a,b,c,d,e,g,f){var l=0,m={url:a,method:c,content:d,headers:e},p=Oj,v=g!=null?g:10;
|
|
460
|
+
m.callback=function(A){A=A.target;if(A.getStatus()==429&&l<v)return l++,setTimeout(function(){Tj.push(m);Vj.nf()},Math.min(12E4,Math.pow(2,l)*1E3)),null;var C=Wj,I=A.getStatus(),ea=w(A.getResponseHeader,A);try{var Z=A.s?A.s.responseText:""}catch(da){Hc(A.ba,"Can not get responseText: "+da.message),Z=""}return C(I,ea,Z,p,b,a,c,f)};return m},Pj=function(a,b){var c=Oj;try{Oj=a,b.call(void 0)}finally{Oj=c}},Wj=function(a,b,c,d,e,g,f,l){var m=d?b("X-Earth-Engine-Computation-Profile"):"";m&&d&&d(m);var p=
|
|
461
461
|
function(Z){try{var da=JSON.parse(Z);return!(u(da)&&"error"in da&&"message"in da.error)||l&&l(da)?{parsed:da}:da.error.message}catch(Jb){return"Invalid JSON: "+Z}},v=function(Z){if(Z===0)return"Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";if(Z<200||Z>=300)return"Server returned HTTP code: "+Z+" for "+f+" "+g},A,C;b=b("Content-Type")||"application/json";d=b.replace(/;.*/,"");if(d==="application/json"||d==="text/json")c=p(c),c.parsed?
|
|
462
|
-
C=c.parsed:A=c;else if(d==="multipart/mixed"){C={};var I=[];
|
|
463
|
-
b():Ji(b)},
|
|
464
|
-
e=a.content;a=a.headers;var g=
|
|
465
|
-
x("ee.api.FeatureViewLocation",Kf);var
|
|
466
|
-
var
|
|
467
|
-
case "AUTO":return"AUTO_JPEG_PNG";case "TIF":case "TIFF":case "GEOTIF":case "GEOTIFF":return"GEO_TIFF";case "TF_RECORD":case "TFRECORD":return"TF_RECORD_IMAGE";case "NUMPY":return"NPY";case "ZIPPED_TIF":case "ZIPPED_TIFF":case "ZIPPED_GEOTIF":case "ZIPPED_GEOTIFF":return"ZIPPED_GEO_TIFF";case "ZIPPED_TIF_PER_BAND":case "ZIPPED_TIFF_PER_BAND":case "ZIPPED_GEOTIF_PER_BAND":case "ZIPPED_GEOTIFF_PER_BAND":return"ZIPPED_GEO_TIFF_PER_BAND";default:return a}},
|
|
468
|
-
switch(a){case "TF_RECORD":case "TFRECORD":return"TF_RECORD_TABLE";case "JSON":case "GEOJSON":return"GEO_JSON";default:return a}},
|
|
469
|
-
"string"?c.split(","):c,c=!0);var d=[];if("gain"in a||"bias"in a){if("min"in a||"max"in a)throw Error("Gain and bias can't be specified with min and max");var e=b.Yc?b.Yc.length-1:255;d=
|
|
470
|
-
b:null},
|
|
462
|
+
C=c.parsed:A=c;else if(d==="multipart/mixed"){C={};var I=[];yj(b,c,function(Z,da,Jb){Jb=p(Jb);Jb.parsed&&(C[Z]=Jb.parsed);(da=(Jb.parsed?"":Jb)||v(da))&&I.push(Z+": "+da)});I.length&&(A=I.join("\n"))}else var ea="Response was unexpectedly not JSON, but "+d;A=A||v(a)||ea;if(e)return e(C,A),null;if(!A)return C;throw Error(A);},Fj=function(a){var b=function(){Cj||(Cj=function(c,d){t.google.accounts.oauth2.initTokenClient({client_id:c.client_id,callback:d,scope:c.scope}).requestAccessToken()});a()};u(t.default_gsi)?
|
|
463
|
+
b():Ji(b)},Gj=function(a,b,c){if(c.access_token){b=c.token_type+" "+c.access_token;if(c.expires_in||c.expires_in===0){c=c.expires_in*900;var d=setTimeout(Hj,c*.9);d.unref!==void 0&&d.unref();Ij=Date.now()+c}Kj=b;a&&a()}else b&&b(c.error||"Unknown error.")},tj=function(a){var b=new Xc;a=q(Object.entries(a));for(var c=a.next();!c.done;c=a.next()){var d=q(c.value);c=d.next().value;d=d.next().value;b.set(c,d)}return b},Tj=[],Vj=new wi(function(){var a=Tj.shift();if(a){var b=a.url,c=a.callback,d=a.method,
|
|
464
|
+
e=a.content;a=a.headers;var g=Xj,f=new bj;ej.push(f);c&&f.Wa("complete",c);f.Uc("ready",f.Pk);g&&(f.ld=Math.max(0,g));f.send(b,d,e,a)}Tj.length==0||Vj.nf()},350),zj=null,Mj=null,Nj=null,Sj=null,Rj=Wd,Kj=null,Ij=null,Dj=null,Ej=[],Cj=null,Aj=["https://www.googleapis.com/auth/earthengine","https://www.googleapis.com/auth/cloud-platform"],Qj=null,Lj=!1,Xj=0,Oj=null;x("ee.api.ListAssetsResponse",Lg);x("ee.api.EarthEngineAsset",Hf);x("ee.api.Operation",Og);x("ee.api.ListFeaturesResponse",Mg);
|
|
465
|
+
x("ee.api.FeatureViewLocation",Kf);var Yj=function(){};Yj.prototype.Ch=function(){return null};var Zj=function(){};x("ee.Encodable.SourceFrame",Zj);
|
|
466
|
+
var ak=function(a){if(a===void 0||a===null)a=Ha;return new gf({gb:a})},bk=function(a){return new gf({Oa:a})},ck=function(a){return new gf({Fa:new ff({values:a})})},dk=function(a){return new gf({Ga:new Ef({values:a})})},ek=function(a,b){return new gf({ya:new rg({functionName:a,arguments:b})})},fk=function(a,b){return new gf({ya:new rg({Ua:a,arguments:b})})},gk=function(a,b){return new gf({Ta:new qg({kc:a,body:b})})},hk=function(a){if(!a)return"AUTO_JPEG_PNG";a=a.toUpperCase();switch(a){case "JPG":return"JPEG";
|
|
467
|
+
case "AUTO":return"AUTO_JPEG_PNG";case "TIF":case "TIFF":case "GEOTIF":case "GEOTIFF":return"GEO_TIFF";case "TF_RECORD":case "TFRECORD":return"TF_RECORD_IMAGE";case "NUMPY":return"NPY";case "ZIPPED_TIF":case "ZIPPED_TIFF":case "ZIPPED_GEOTIF":case "ZIPPED_GEOTIFF":return"ZIPPED_GEO_TIFF";case "ZIPPED_TIF_PER_BAND":case "ZIPPED_TIFF_PER_BAND":case "ZIPPED_GEOTIF_PER_BAND":case "ZIPPED_GEOTIFF_PER_BAND":return"ZIPPED_GEO_TIFF_PER_BAND";default:return a}},ik=function(a){if(!a)return"CSV";a=a.toUpperCase();
|
|
468
|
+
switch(a){case "TF_RECORD":case "TFRECORD":return"TF_RECORD_TABLE";case "JSON":case "GEOJSON":return"GEO_JSON";default:return a}},jk=function(a){if(!a)return"VERTICAL";a=a.toUpperCase();if(a!=="HORIZONTAL"&&a!=="VERTICAL")throw Error('Orientation must be "horizontal" or "vertical"');return a},kk=function(a){if(!a)return[];if(typeof a==="string")return a.split(",");if(Array.isArray(a))return a;throw Error("Invalid band list "+a);},nk=function(a){var b=new Pf,c=!1;"palette"in a&&(c=a.palette,b.Yc=typeof c===
|
|
469
|
+
"string"?c.split(","):c,c=!0);var d=[];if("gain"in a||"bias"in a){if("min"in a||"max"in a)throw Error("Gain and bias can't be specified with min and max");var e=b.Yc?b.Yc.length-1:255;d=lk(a,"bias","gain").map(function(g){var f=-g.bias/g.gain;return{min:f,max:e/g.gain+f}})}else if("min"in a||"max"in a)d=lk(a,"min","max");d.length!==0&&(b.Uf=d.map(function(g){return new Ff(g)}),c=!0);a=mk(a.gamma);if(a.length>1)throw Error("Only one gamma value is supported");a.length===1&&(b.gamma=a[0],c=!0);return c?
|
|
470
|
+
b:null},mk=function(a){return a?a.split(",").map(Number):[]},lk=function(a,b,c){var d=mk(a[b]),e=mk(a[c]);if(d.length===0)return e.map(function(g){var f={};return f[b]=0,f[c]=g,f});if(e.length===0)return d.map(function(g){var f={};return f[b]=g,f[c]=1,f});if(d.length!==e.length)throw Error("Length of "+b+" and "+c+" must match.");return d.map(function(g,f){var l={};return l[b]=g,l[c]=e[f],l})},ok=function(a){var b=function(f){var l={};l.description=f.description||"";l.type=f.type||"";f.ud!=null&&
|
|
471
471
|
(l.name=f.ud);f.defaultValue!==void 0&&(l["default"]=f.defaultValue);f.optional!=null&&(l.optional=f.optional);return l},c=function(f){var l={};l.args=(f.arguments||[]).map(b);l.description=f.description||"";l.returns=f.ag||"";f.hidden!=null&&(l.hidden=f.hidden);f.preview&&(l.preview=f.preview);f.deprecated&&(l.deprecated=f.df);f.sourceCodeUri&&(l.sourceCodeUri=f.sourceCodeUri);return l},d={};a=q(a.Dc||[]);for(var e=a.next();!e.done;e=a.next()){e=e.value;var g=e.name.replace(/^algorithms\//,"");d[g]=
|
|
472
|
-
c(e)}return d},
|
|
473
|
-
a},
|
|
472
|
+
c(e)}return d},pk=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/.+/,qk=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/assets\/(.*)$/,rk=/^projects\/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+:)?[a-z][a-z0-9\-]{4,28}[a-z0-9])\/assets\/?$/,sk=function(a){return(a=pk.exec(a))?a[1]:"earthengine-legacy"},tk=function(a){return qk.exec(a)?a:/^(users|projects)\/.*/.exec(a)?"projects/earthengine-legacy/assets/"+a:"projects/earthengine-public/assets/"+
|
|
473
|
+
a},vk=function(a){return(a.assets||[]).map(uk)},wk=function(a){switch(a){case "ALGORITHM":return"Algorithm";case "FOLDER":return"Folder";case "IMAGE":return"Image";case "IMAGE_COLLECTION":return"ImageCollection";case "TABLE":return"Table";case "CLASSIFIER":return"Classifier";case "FEATURE_VIEW":return"FeatureView";default:return"Unknown"}},uk=function(a){var b=xk(wk(a.type),a.name),c=Object.assign({},a.properties||{});a.sizeBytes&&(c["system:asset_size"]=Number(a.sizeBytes));a.startTime&&(c["system:time_start"]=
|
|
474
474
|
Date.parse(a.startTime));a.endTime&&(c["system:time_end"]=Date.parse(a.endTime));a.geometry&&(c["system:footprint"]=a.geometry);typeof a.title==="string"?c["system:title"]=a.title:typeof c.title==="string"&&(c["system:title"]=c.title);typeof a.description==="string"?c["system:description"]=a.description:typeof c.description==="string"&&(c["system:description"]=c.description);a.updateTime&&(b.version=Date.parse(a.updateTime)*1E3);b.properties=c;a.bands&&(b.bands=a.bands.map(function(d){var e={id:d.id,
|
|
475
475
|
crs:d.grid.cf,dimensions:void 0,crs_transform:void 0};if(d.grid){if(d.grid.Kb!=null){var g=d.grid.Kb;e.crs_transform=[g.bg||0,g.gg||0,g.xg||0,g.hg||0,g.cg||0,g.yg||0]}d.grid.dimensions!=null&&(e.dimensions=[d.grid.dimensions.width,d.grid.dimensions.height])}d.dataType&&(g={type:"PixelType"},g.precision=(d.dataType.precision||"").toLowerCase(),d.dataType.dd&&(g.min=d.dataType.dd.min||0,g.max=d.dataType.dd.max),e.data_type=g);return e}));a.Hd&&(b.mapLocation=a.Hd);a.featureCount&&(b.featureCount=a.featureCount);
|
|
476
|
-
return b},
|
|
477
|
-
c(e)||e);a("system:description");typeof e!=="string"&&e!==null||d.description!=null||(d.description=c(e)||e);Object.entries(d).forEach(function(g){var f=q(g);g=f.next().value;f=f.next().value;d[g]=c(f)||f});b.properties=d;return b},
|
|
478
|
-
(new Date(a.starttime)).toISOString());a.endtime&&(b.endTime=(new Date(a.endtime)).toISOString());a.bbox&&(b.region=
|
|
479
|
-
[[0,1],[2,1],[2,3],[0,3],[0,1]].map(function(b){return a[b[0]]+","+a[b[1]]}).join("],[")+"]]]}"},
|
|
480
|
-
e.length&&(d.all_users_can_read=!0);return d},
|
|
481
|
-
hf:null})},
|
|
482
|
-
default:return"UNKNOWN"}},e=Ma(Sg,a.metadata||{});e.description!=null&&(b.description=e.description);e.state!=null&&(b.state=d(e.state));c("creation_timestamp_ms",e.bf);c("update_timestamp_ms",e.updateTime);c("start_timestamp_ms",e.startTime);b.attempt=e.attempt;a.done&&a.error!=null&&(b.error_message=a.error.message);a.name!=null&&(b.id=
|
|
483
|
-
{started:"OK"};a.name&&(b.taskId=
|
|
484
|
-
|
|
485
|
-
""}));return new Eg({mb:a.id||"",da:e})};a.fileBands.forEach(function(d){d.maskForAllBands?b.push(c(null)):d.maskForBands!=null&&b.push(c(d.maskForBands))});return b},
|
|
486
|
-
(b.endTime=(new Date(Number(d))).toISOString());b.properties=c}return b},
|
|
476
|
+
return b},yk=function(a){var b=new Hf,c=function(g){return g===null?Ha:void 0},d=Object.assign({},a),e;a=function(g){e=d[g];delete d[g];return e};a("system:asset_size")!==void 0&&(b.sizeBytes=c(e)||String(e));a("system:time_start")!==void 0&&(b.startTime=c(e)||(new Date(Number(e))).toISOString());a("system:time_end")!==void 0&&(b.endTime=c(e)||(new Date(Number(e))).toISOString());a("system:footprint")!==void 0&&(b.geometry=c(e)||e);a("system:title");typeof e!=="string"&&e!==null||d.title!=null||(d.title=
|
|
477
|
+
c(e)||e);a("system:description");typeof e!=="string"&&e!==null||d.description!=null||(d.description=c(e)||e);Object.entries(d).forEach(function(g){var f=q(g);g=f.next().value;f=f.next().value;d[g]=c(f)||f});b.properties=d;return b},xk=function(a,b){var c={};c.type=a;b!=null&&(a=b.split("/"),b=a[0]==="projects"&&a[2]==="assets"&&["earthengine-legacy","earthengine-public"].includes(a[1])?a.slice(3).join("/"):b,c.id=b);return c},Bk=function(a){var b={};a.num&&(b.pageSize=a.num);a.starttime&&(b.startTime=
|
|
478
|
+
(new Date(a.starttime)).toISOString());a.endtime&&(b.endTime=(new Date(a.endtime)).toISOString());a.bbox&&(b.region=zk(a.bbox));a.region&&(b.region=a.region);a.bbox&&a.region&&console.warn("Multiple request parameters converted to region");var c="id num starttime endtime bbox region".split(" ");a=q(Object.keys(a).filter(function(e){return!c.includes(e)}));for(var d=a.next();!d.done;d=a.next())console.warn("Unrecognized key "+d.value+" ignored");return Ak(b)},zk=function(a){return'{"type":"Polygon","coordinates":[[['+
|
|
479
|
+
[[0,1],[2,1],[2,3],[0,3],[0,1]].map(function(b){return a[b[0]]+","+a[b[1]]}).join("],[")+"]]]}"},Ck=function(a){var b={};(a.xd||[]).forEach(function(g){b[g.role]=g.Wb});var c=new Set,d=function(g){var f=g.replace(/^domain:|^group:|^serviceAccount:|^user:/,"");g.startsWith("group:")&&c.add(f);return f};a=b["roles/viewer"]||[];var e=a.filter(function(g){return g!=="allUsers"});d={owners:(b["roles/owner"]||[]).map(d),writers:(b["roles/editor"]||[]).map(d),readers:e.map(d)};c.size>0&&(d.groups=c);a.length!=
|
|
480
|
+
e.length&&(d.all_users_can_read=!0);return d},Dk=function(a){var b=function(d){return(a[d]||[]).map(function(e){if(e.includes(":"))return e;var g="user:";e.includes("@")?a.groups&&a.groups.has(e)?g="group:":e.match(/[@|\.]gserviceaccount\.com$/)&&(g="serviceAccount:"):g="domain:";return g+e})},c=a.all_users_can_read?["allUsers"]:[];b=[{role:"roles/owner",Wb:b("owners")},{role:"roles/viewer",Wb:b("readers").concat(c)},{role:"roles/editor",Wb:b("writers")}].map(function(d){return new nf(d)});return new bg({xd:b.filter(function(d){return d.Wb.length}),
|
|
481
|
+
hf:null})},Fk=function(a){var b=/^projects\/(.+)\/operations\/.+$/.exec(a);return"projects/"+(b?b[1]:"earthengine-legacy")+"/operations/"+Ek(a)},Ek=function(a){var b=/^.*operations\/(.*)$/.exec(a);return b?b[1]:a},Gk=function(a){var b={},c=function(g,f){f!=null&&(b[g]=Date.parse(f))},d=function(g){switch(g){case "PENDING":return"READY";case "RUNNING":return"RUNNING";case "CANCELLING":return"CANCEL_REQUESTED";case "SUCCEEDED":return"COMPLETED";case "CANCELLED":return"CANCELLED";case "FAILED":return"FAILED";
|
|
482
|
+
default:return"UNKNOWN"}},e=Ma(Sg,a.metadata||{});e.description!=null&&(b.description=e.description);e.state!=null&&(b.state=d(e.state));c("creation_timestamp_ms",e.bf);c("update_timestamp_ms",e.updateTime);c("start_timestamp_ms",e.startTime);b.attempt=e.attempt;a.done&&a.error!=null&&(b.error_message=a.error.message);a.name!=null&&(b.id=Ek(a.name),b.name=a.name);b.task_type=e.type||"UNKNOWN";b.output_url=e.ef;b.source_url=e.dg;e.vd!=null&&(b.batch_eecu_usage_seconds=e.vd);return b},Hk=function(a){var b=
|
|
483
|
+
{started:"OK"};a.name&&(b.taskId=Ek(a.name),b.name=a.name);a.error&&(b.note=a.error.message);return b},Ik=function(a){return a.primaryPath?[a.primaryPath].concat(ja(a.additionalPaths||[])):null},Lk=function(a){var b=function(g){var f=Ma(Gg,g);f.uris=Ik(g);return f},c=Ma(Cg,a);c.name=tk(a.id);c.tilesets=(a.tilesets||[]).map(function(g){var f=Ma(Jf,g);f.sources=(g.sources||[]).map(b);return f});c.bands=(a.bands||[]).map(function(g){var f=Ma(Dg,g);f.missingData=Jk(g.missingData);return f});c.missingData=
|
|
484
|
+
Jk(a.missingData);c.Kf=ic((a.tilesets||[]).map(Kk));c.pyramidingPolicy=a.pyramidingPolicy||null;if(a.properties){var d=Object.assign({},a.properties),e;a=function(g){e=d[g];delete d[g];return e};a("system:time_start")&&(c.startTime=(new Date(Number(e))).toISOString());a("system:time_end")&&(c.endTime=(new Date(Number(e))).toISOString());c.properties=d}return c},Kk=function(a){var b=[];if(!Array.isArray(a.fileBands))return b;var c=function(d){var e=[];d!=null&&Array.isArray(d.bandId)&&(e=d.bandId.map(function(g){return g||
|
|
485
|
+
""}));return new Eg({mb:a.id||"",da:e})};a.fileBands.forEach(function(d){d.maskForAllBands?b.push(c(null)):d.maskForBands!=null&&b.push(c(d.maskForBands))});return b},Mk=function(a){var b=Ma(Jg,a);b.name=tk(a.id);b.sources=(a.sources||[]).map(function(e){var g=Ma(eh,e);g.uris=Ik(e);e.maxError&&(g.Ub=e.maxError);return g});if(a.properties){var c=Object.assign({},a.properties),d;a=function(e){d=c[e];delete c[e];return d};a("system:time_start")&&(b.startTime=(new Date(Number(d))).toISOString());a("system:time_end")&&
|
|
486
|
+
(b.endTime=(new Date(Number(d))).toISOString());b.properties=c}return b},Jk=function(a){if(a==null)return null;var b=new Ag({values:[]});a.value!=null&&typeof a.value==="number"&&b.values.push(a.value);Array.isArray(a.values)&&a.values.map(function(c){typeof c==="number"&&b.values.push(c)});return b.values.length==0?null:b},Nk=function(a){var b=[];"startTime"in a&&(b.push('startTime >= "'+(new Date(a.startTime)).toISOString()+'"'),delete a.startTime);"endTime"in a&&(b.push('endTime < "'+(new Date(a.endTime)).toISOString()+
|
|
487
487
|
'"'),delete a.endTime);if("region"in a){var c=a.region;if(typeof c==="object")try{c=JSON.stringify(c)}catch(e){throw Error('Filter parameter "region" must be a GeoJSON or WKT string.');}else if(typeof c!=="string")throw Error('Filter parameter "region" must be a GeoJSON or WKT string.');c=c.replace(/"/g,"'");b.push('intersects("'+c+'")');delete a.region}if("properties"in a){if(!Array.isArray(a.properties)&&a.properties.some(function(e){return typeof e!=="string"}))throw Error('Filter parameter "properties" must be an array of strings');
|
|
488
|
-
c=q(a.properties);for(var d=c.next();!d.done;d=c.next())b.push(d.value.trim().replace(/^(properties\.)?/,"properties."));delete a.properties}return b.join(" AND ")},
|
|
489
|
-
var
|
|
488
|
+
c=q(a.properties);for(var d=c.next();!d.done;d=c.next())b.push(d.value.trim().replace(/^(properties\.)?/,"properties."));delete a.properties}return b.join(" AND ")},Ak=function(a){a=Object.assign({},a);var b=Nk(a);b&&(a.filter=a.filter?a.filter+" AND "+b:b);return a};var Ok=function(){this.blockSize=-1};var Pk=function(){this.blockSize=-1;this.blockSize=64;this.W=Array(4);this.Mk=Array(this.blockSize);this.qe=this.Ec=0;this.reset()};y(Pk,Ok);Pk.prototype.reset=function(){this.W[0]=1732584193;this.W[1]=4023233417;this.W[2]=2562383102;this.W[3]=271733878;this.qe=this.Ec=0};
|
|
489
|
+
var Qk=function(a,b,c){c||(c=0);var d=Array(16);if(typeof b==="string")for(var e=0;e<16;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;e<16;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.W[0];c=a.W[1];e=a.W[2];var g=a.W[3];var f=b+(g^c&(e^g))+d[0]+3614090360&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[1]+3905402710&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[2]+606105819&4294967295;e=g+(f<<17&4294967295|f>>>
|
|
490
490
|
15);f=c+(b^e&(g^b))+d[3]+3250441966&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[4]+4118548399&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[5]+1200080426&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[6]+2821735955&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[7]+4249261313&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[8]+1770035416&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[9]+2336552879&4294967295;g=b+(f<<12&4294967295|
|
|
491
491
|
f>>>20);f=e+(c^g&(b^c))+d[10]+4294925233&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[11]+2304563134&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[12]+1804603682&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[13]+4254626195&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[14]+2792965006&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[15]+1236535329&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(e^g&(c^e))+d[1]+4129170786&4294967295;b=c+(f<<
|
|
492
492
|
5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[6]+3225465664&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[11]+643717713&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[0]+3921069994&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(e^g&(c^e))+d[5]+3593408605&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[10]+38016083&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[15]+3634488961&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[4]+3889429448&4294967295;c=
|
|
@@ -496,229 +496,229 @@ f>>>21);f=e+(g^b^c)+d[7]+4139469664&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c
|
|
|
496
496
|
3873151461&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[15]+530742520&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[2]+3299628645&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(e^(c|~g))+d[0]+4096336452&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[7]+1126891415&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[14]+2878612391&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[5]+4237533241&4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[12]+1700485571&
|
|
497
497
|
4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[3]+2399980690&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[10]+4293915773&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[1]+2240044497&4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[8]+1873313359&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[15]+4264355552&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[6]+2734768916&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[13]+1309151649&
|
|
498
498
|
4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[4]+4149444226&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[11]+3174756917&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[2]+718787259&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[9]+3951481745&4294967295;a.W[0]=a.W[0]+b&4294967295;a.W[1]=a.W[1]+(e+(f<<21&4294967295|f>>>11))&4294967295;a.W[2]=a.W[2]+e&4294967295;a.W[3]=a.W[3]+g&4294967295};
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
var
|
|
502
|
-
|
|
503
|
-
Yb(a,function(e){return this.Fd(e)},this);else if(u(a)&&typeof a!=="function")c=Ya(a,function(e){if(typeof e!=="function")return this.Fd(e)},this),fb(c,this.qd),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.Sd){b
|
|
504
|
-
var
|
|
505
|
-
var
|
|
506
|
-
l.body!=null?{argumentNames:l.kc,body:c(b[l.body])}:f==="functionInvocationValue"&&l.Ua!=null?{arguments:Ya(l.arguments,c),functionReference:c(b[l.Ua])}:f==="constantValue"?l===Ha?null:l:c(l)):e[f]=c(l)}return e};return a.result&&c(b[a.result])};x("ee.Serializer.encodeCloudApiPretty",
|
|
507
|
-
var
|
|
508
|
-
if(b instanceof
|
|
509
|
-
b){if(b in a.Xf)return a.Xf[b];var c=String(a.kl++);a.Xf[b]=c;a.fi[c]=
|
|
510
|
-
A,c+3)});d=f.every(d)?
|
|
511
|
-
f[m]=
|
|
512
|
-
e.Oa!=null&&c(e.Oa)};c(a.ui);return b};var
|
|
513
|
-
d.ja=
|
|
499
|
+
Pk.prototype.update=function(a,b){b===void 0&&(b=a.length);for(var c=b-this.blockSize,d=this.Mk,e=this.Ec,g=0;g<b;){if(e==0)for(;g<=c;)Qk(this,a,g),g+=this.blockSize;if(typeof a==="string")for(;g<b;){if(d[e++]=a.charCodeAt(g++),e==this.blockSize){Qk(this,d);e=0;break}}else for(;g<b;)if(d[e++]=a[g++],e==this.blockSize){Qk(this,d);e=0;break}}this.Ec=e;this.qe+=b};
|
|
500
|
+
Pk.prototype.digest=function(){var a=Array((this.Ec<56?this.blockSize:this.blockSize*2)-this.Ec);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;var c=this.qe*8;for(b=a.length-8;b<a.length;++b)a[b]=c&255,c/=256;this.update(a);a=Array(16);for(b=c=0;b<4;++b)for(var d=0;d<32;d+=8)a[c++]=this.W[b]>>>d&255;return a};var Rk=function(a){this.qd="__ee_hash__";this.Sd=a!==!1;this.Xa=[];this.wa={};this.Bg=[];this.Od=new WeakMap;this.lg=new WeakMap;this.Oi=void 0};x("ee.Serializer",Rk);var Sk=new Si,Tk=new Pk,Vk=function(a,b){return Uk(new Rk(b!==void 0?b:!0),a)};x("ee.Serializer.encode",Vk);var Wk=function(a){return Sk.va(Vk(a))};x("ee.Serializer.toJSON",Wk);var Yk=function(a){return Xk(Vk(a,!1))};x("ee.Serializer.toReadableJSON",Yk);
|
|
501
|
+
var Xk=function(a){return"JSON"in t?t.JSON.stringify(a,null," "):Sk.va(a)},Uk=function(a,b){b=a.Fd(b);a.Sd&&(b=u(b)&&b.type=="ValueRef"&&a.Xa.length==1?a.Xa[0][1]:{type:"CompoundValue",scope:a.Xa,value:b},a.Xa=[],Wb(a.Bg,w(function(c){delete c[this.qd]},a)),a.Bg=[],a.wa={});return b};
|
|
502
|
+
Rk.prototype.Fd=function(a){if(a===void 0)throw Error("Can't encode an undefined value.");var b=u(a)?a[this.qd]:null;if(this.Sd&&b!=null&&this.wa[b])return{type:"ValueRef",value:this.wa[b]};if(a===null||typeof a==="boolean"||typeof a==="number"||typeof a==="string")return a;if(ya(a))return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof Yj){var c=a.encode(w(this.Fd,this));if(!(Array.isArray(c)||u(c)&&c.type!="ArgumentRef"))return c}else if(Array.isArray(a))c=
|
|
503
|
+
Yb(a,function(e){return this.Fd(e)},this);else if(u(a)&&typeof a!=="function")c=Ya(a,function(e){if(typeof e!=="function")return this.Fd(e)},this),fb(c,this.qd),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.Sd){b=Zk(c);if(this.wa[b])var d=this.wa[b];else d=String(this.Xa.length),this.Xa.push([d,c]),this.wa[b]=d;a[this.qd]=b;this.Bg.push(a);return{type:"ValueRef",value:d}}return c};
|
|
504
|
+
var Zk=function(a){Tk.reset();Tk.update(Sk.va(a));return Tk.digest().toString()},al=function(a){return Na($k(a),Ja,Ka,La)};x("ee.Serializer.encodeCloudApi",al);
|
|
505
|
+
var $k=function(a,b){return bl(new Rk(!0),a,b)},bl=function(a,b,c){a.Oi=c;return cl(a,b)},dl=function(a,b){var c={};b=b.values;for(var d in b){var e=a.lg.get(b[d]);c[d]=Object.assign({},e)}return c},el=function(a){a=cl(new Rk(!1),a);var b=a.values,c=function(d){if(!u(d))return d;var e=Array.isArray(d)?[]:{},g=d instanceof Object.getPrototypeOf(gf);d=q(Object.entries(g?d.h:d));for(var f=d.next();!f.done;f=d.next()){var l=q(f.value);f=l.next().value;l=l.next().value;g?l!==null&&(e[f]=f==="functionDefinitionValue"&&
|
|
506
|
+
l.body!=null?{argumentNames:l.kc,body:c(b[l.body])}:f==="functionInvocationValue"&&l.Ua!=null?{arguments:Ya(l.arguments,c),functionReference:c(b[l.Ua])}:f==="constantValue"?l===Ha?null:l:c(l)):e[f]=c(l)}return e};return a.result&&c(b[a.result])};x("ee.Serializer.encodeCloudApiPretty",el);var fl=function(a){return Sk.va(al(a))};x("ee.Serializer.toCloudApiJSON",fl);var gl=function(a){return Xk(el(a))};x("ee.Serializer.toReadableCloudApiJSON",gl);
|
|
507
|
+
var cl=function(a,b){try{var c=hl(a,b),d=new il(c,a.Xa,a.Sd,a.lg),e=jl(d,d.ui);return new xf({result:e,values:d.fi})}finally{a.Od=new WeakMap,a.wa={},a.Xa=[]}},hl=function(a,b){var c=function(f){var l=Zk(f);u(b)&&a.Od.set(b,l);if(a.wa[l])return a.wa[l];var m=String(a.Xa.length);a.Xa.push([m,f]);return a.wa[l]=m};if(u(b)&&a.wa[a.Od.get(b)])return a.wa[a.Od.get(b)];if(b===null||typeof b==="boolean"||typeof b==="string"||typeof b==="number")return c(ak(b));if(ya(b))return c(ek("Date",{value:ak(Math.floor(b.getTime()))}));
|
|
508
|
+
if(b instanceof Yj){var d=b.na(a),e=b.Ch();e!==null&&a.lg.set(d,e);return c(d)}if(Array.isArray(b))return c(ck(b.map(function(f){return bk(hl(a,f))})));if(u(b)&&typeof b!=="function"){var g={};Object.keys(b).sort().forEach(function(f){g[f]=bk(hl(a,b[f]))});return c(dk(g))}throw Error("Can't encode object: "+b);},il=function(a,b,c,d){var e=this;this.ui=a;this.values={};b.forEach(function(g){return e.values[g[0]]=g[1]});this.ni=c?kl(this):null;this.fi={};this.Xf={};this.kl=0;this.hd=d},jl=function(a,
|
|
509
|
+
b){if(b in a.Xf)return a.Xf[b];var c=String(a.kl++);a.Xf[b]=c;a.fi[c]=ll(a,a.values[b],0);return c},ll=function(a,b,c){var d=function(A){return A.gb!==null},e=function(A){return A===Ha?null:A},g=function(A,C){a.hd&&a.hd.has(A)&&!a.hd.has(C)&&a.hd.set(C,a.hd.get(A));return C};if(d(b)||b.Va!=null||b.pb!=null||b.Lb!=null)return b;if(b.Oa!=null){d=a.values[b.Oa];if(a.ni===null||c<50&&a.ni[b.Oa]===1)return d=ll(a,d,c),g(b,d);if(ml(d))return g(b,d);d=bk(jl(a,b.Oa));return g(b,d)}if(b.Fa!=null){var f=b.Fa.values.map(function(A){return ll(a,
|
|
510
|
+
A,c+3)});d=f.every(d)?ak(f.map(function(A){return e(A.gb)})):ck(f);return g(b,d)}if(b.Ga!=null){f={};for(var l={},m=q(Object.entries(b.Ga.values||{})),p=m.next();!p.done;p=m.next()){var v=q(p.value);p=v.next().value;v=v.next().value;f[p]=ll(a,v,c+3);l!==null&&d(f[p])?l[p]=e(f[p].gb):l=null}return l!==null?g(b,ak(l)):g(f,dk(f))}if(b.Ta!=null)return d=b.Ta,d=gk(d.kc||[],jl(a,d.body||"")),g(b,d);if(b.ya!=null){d=b.ya;f={};l=q(Object.keys(d.arguments||{}));for(m=l.next();!m.done;m=l.next())m=m.value,
|
|
511
|
+
f[m]=ll(a,d.arguments[m],c+3);d=d.functionName?ek(d.functionName,f):fk(jl(a,d.Ua||""),f);return g(b,d)}throw Error("Can't optimize value: "+b);},ml=function(a){var b=a.gb;return b!==null?b===Ha||typeof b==="number"||typeof b==="boolean":a.Lb!=null},kl=function(a){var b={},c=function(e){b[e]?b[e]++:(b[e]=1,d(a.values[e]))},d=function(e){e.Fa!=null?e.Fa.values.forEach(d):e.Ga!=null?Object.values(e.Ga.values).forEach(d):e.Ta!=null?c(e.Ta.body):e.ya!=null?(e=e.ya,e.Ua!=null&&c(e.Ua),Object.values(e.arguments).forEach(d)):
|
|
512
|
+
e.Oa!=null&&c(e.Oa)};c(a.ui);return b};var sl=function(a){if(a.element==null)throw Error('"element" not found in params '+a);var b=a.selectors||null;b!=null&&typeof b==="string"&&(b=b.split(","));b=new Yf({l:$k(a.element),description:L(a.description),oa:null,sa:null,Id:null,wd:null,selectors:b,Ub:M(a.maxErrorMeters),requestId:L(a.id),maxVertices:M(a.maxVertices),O:M(a.maxWorkers),priority:M(a.priority)});var c=nl(a);switch(c){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":var d=new ag({ja:null,ma:null,F:ik(a.fileFormat)});c==="GOOGLE_CLOUD_STORAGE"?
|
|
513
|
+
d.ja=ol(a):d.ma=pl(a);b.oa=d;break;case "ASSET":b.sa=new Zf({Ha:ql(a)});break;case "FEATURE_VIEW":c=new ig({name:tk(a.mapName)});d=a==null?null:new ng({Mf:M(a.maxFeaturesPerTile),rg:a.thinningStrategy});var e=a==null?null:new mg({Cg:rl(a.zOrderRanking),qg:rl(a.thinningRanking)});d=new jg({pg:d,Wf:e});c=new $f({kf:c,qc:d});b.Id=c;break;case "BIGQUERY":b.wd=new mf({Pe:new lf({table:L(a.table),overwrite:!!a.overwrite,append:!!a.append})});break;default:throw Error('Export destination "'+c+'" unknown');
|
|
514
514
|
}a.workloadTag&&(b.workloadTag=a.workloadTag);return b};function L(a){return a!=null?String(a):null}function M(a){return a!=null?Number(a):null}
|
|
515
|
-
var
|
|
516
|
-
a=a.tfrecordTensorDepths;if(a!=null)if(u(a)){var c={};Wa(a,function(d,e){if(typeof e!=="string"||typeof d!=="number")throw Error('"tensorDepths" option must be an object of type Object<string, number>');c[e]=d});b.ke=c}else throw Error('"tensorDepths" option needs to have the form Object<string, number>.');return b},
|
|
517
|
-
var d=a.tiffShardSize||a.shardSize;var e=!!a.tiffCloudOptimized;var g=!(!a.skipEmptyTiles&&!a.tiffSkipEmptyFiles),f=
|
|
518
|
-
c,d,e,g=M((b=a.endZoom)!=null?b:a.maxZoom);b=M((c=a.startZoom)!=null?c:a.minZoom);c=M(a.scale);var f=!((d=a.skipEmpty)!=null?!d:!a.skipEmptyTiles);d=L(a.mapsApiKey);var l=
|
|
515
|
+
var nl=function(a){var b="DRIVE";if(a==null)return b;a.outputBucket!=null||a.outputPrefix!=null?b="GOOGLE_CLOUD_STORAGE":a.assetId!=null?b="ASSET":a.mapName!=null&&(b="FEATURE_VIEW");a.table!=null&&(b="BIGQUERY");return b},ul=function(a){var b=new Bg({Xe:!!a.tfrecordCompressed,Vb:L(a.tfrecordMaxFileSize),eg:!!a.tfrecordSequenceData,Ve:!!a.tfrecordCollapseBands,Nf:M(a.tfrecordMaskedThreshold),defaultValue:M(a.tfrecordDefaultValue),bc:tl(a.tfrecordPatchDimensions),Jf:tl(a.tfrecordKernelSize),ke:null});
|
|
516
|
+
a=a.tfrecordTensorDepths;if(a!=null)if(u(a)){var c={};Wa(a,function(d,e){if(typeof e!=="string"||typeof d!=="number")throw Error('"tensorDepths" option must be an object of type Object<string, number>');c[e]=d});b.ke=c}else throw Error('"tensorDepths" option needs to have the form Object<string, number>.');return b},vl=function(a,b){var c=new Uf({ja:null,ma:null,Jd:null,le:null,F:hk(a.fileFormat)});if(c.F==="GEO_TIFF"){if(a.fileDimensions&&a.tiffFileDimensions)throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".');
|
|
517
|
+
var d=a.tiffShardSize||a.shardSize;var e=!!a.tiffCloudOptimized;var g=!(!a.skipEmptyTiles&&!a.tiffSkipEmptyFiles),f=tl(a.fileDimensions||a.tiffFileDimensions);d=M(d);var l=a.tiffNoData;l=l!=null?new tg({pf:Number(l)}):null;e=new sg({Ue:e,kg:g,bc:f,tileSize:d,Pf:l});c.Jd=e}else c.F==="TF_RECORD_IMAGE"&&(c.le=ul(a));b==="GOOGLE_CLOUD_STORAGE"?c.ja=ol(a):c.ma=pl(a);return c},wl=function(a,b){var c=new dg({ja:null,ma:null,F:"MP4"});b==="GOOGLE_CLOUD_STORAGE"?c.ja=ol(a):c.ma=pl(a);return c},xl=function(a){var b,
|
|
518
|
+
c,d,e,g=M((b=a.endZoom)!=null?b:a.maxZoom);b=M((c=a.startZoom)!=null?c:a.minZoom);c=M(a.scale);var f=!((d=a.skipEmpty)!=null?!d:!a.skipEmptyTiles);d=L(a.mapsApiKey);var l=tl((e=a.dimensions)!=null?e:a.tileDimensions);e=M(a.stride);var m=M(a.minTimeMachineZoomSubset);a=M(a.maxTimeMachineZoomSubset);a=m==null&&a==null?null:new gh({start:m!=null?m:0,end:a});return new Xf({ff:g,mg:b,scale:c,jg:f,If:d,dimensions:l,stride:e,Dg:a})},tl=function(a){if(a==null)return null;var b=new ug({height:0,width:0});
|
|
519
519
|
typeof a==="string"&&(a.indexOf("x")!==-1?a=a.split("x").map(Number):a.indexOf(",")!==-1&&(a=a.split(",").map(Number)));if(Array.isArray(a))if(a.length===2)b.height=a[0],b.width=a[1];else if(a.length===1)b.height=a[0],b.width=a[0];else throw Error("Unable to construct grid from dimensions: "+a);else if(typeof a!=="number"||isNaN(a))if(u(a)&&a.height!=null&&a.width!=null)b.height=a.height,b.width=a.width;else throw Error("Unable to construct grid from dimensions: "+a);else b.height=a,b.width=a;return b},
|
|
520
|
-
|
|
521
|
-
JSON.stringify(b)+". Rules should either be a comma-separated string or list of strings.");},
|
|
522
|
-
"ASCENDING";break;case "DESC":b.direction="DESCENDING";break;default:throw Error("Ranking rule direction '"+c+"' is invalid. Directions are: ASC, DESC.");}switch(a.trim()){case ".geometryType":b.ae=new Yg({});break;case ".minZoomLevel":b.be=new $g({});break;default:b.Zd=new Xg({attributeName:L(a)})}return b};var
|
|
523
|
-
var
|
|
524
|
-
x("ee.data.setExpressionAugmenter",function(a){
|
|
525
|
-
x("ee.data.setDeadline",function(a){
|
|
526
|
-
var
|
|
527
|
-
x("ee.data.getMapId",
|
|
528
|
-
var
|
|
529
|
-
d.name.split("/").pop();return{token:e,formatTileUrl:function(g,f,l){return
|
|
530
|
-
var
|
|
531
|
-
var
|
|
532
|
-
var
|
|
533
|
-
hc:
|
|
534
|
-
var
|
|
535
|
-
var
|
|
536
|
-
var
|
|
537
|
-
if(typeof a.bands==="string")try{a.bands=JSON.parse(a.bands)}catch(e){a.bands=
|
|
538
|
-
JSON.parse(a.crs_transform)}catch(e){}var c=
|
|
539
|
-
var
|
|
540
|
-
"",token:""}}))};x("ee.data.getTableDownloadId",
|
|
541
|
-
var
|
|
542
|
-
var
|
|
543
|
-
var
|
|
544
|
-
var
|
|
545
|
-
var
|
|
546
|
-
var
|
|
547
|
-
b));case "EXPORT_VIDEO_MAP":return b=
|
|
548
|
-
var
|
|
549
|
-
delete e[".default"]);c=new Tf({Ha:
|
|
550
|
-
oa:null,requestId:L(c.id),O:M(c.maxWorkers),priority:M(c.priority)});d.oa=
|
|
551
|
-
return c},
|
|
552
|
-
null)throw Error('"element" not found in params '+a);var c=
|
|
553
|
-
var
|
|
554
|
-
var
|
|
555
|
-
var
|
|
556
|
-
null?null:
|
|
557
|
-
x("ee.data.getAssetRoots",
|
|
558
|
-
var
|
|
520
|
+
ol=function(a){var b=null;a.writePublicTiles!=null&&(b=a.writePublicTiles?"PUBLIC":"DEFAULT_OBJECT_ACL");return new uf({Se:L(a.outputBucket),xa:L(a.outputPrefix),Te:a.bucketCorsUris||null,permissions:b})},pl=function(a){return new Gf({rf:L(a.driveFolder),xa:L(a.driveFileNamePrefix)})},ql=function(a){return new sf({name:tk(a.assetId)})},rl=function(a){if(!a)return null;var b=a;typeof a==="string"&&(a=a.split(","));if(Array.isArray(a))return new bh({Vf:(a||[]).map(yl)});throw Error("Unable to build ranking rule from rules: "+
|
|
521
|
+
JSON.stringify(b)+". Rules should either be a comma-separated string or list of strings.");},yl=function(a){var b=new ah({direction:null,Zd:null,be:null,ae:null});a=a.trim();a=a.match(/^([\S]+.*)\s+(ASC|DESC)$/);if(a==null)throw Error("Ranking rule format is invalid. Each rule should be defined by a rule type and a direction (ASC or DESC), separated by a space. Valid rule types are: .geometryType, .minZoomLevel, or a feature property name.");var c=q(a);c.next();a=c.next().value;c=c.next().value;switch(c.toUpperCase()){case "ASC":b.direction=
|
|
522
|
+
"ASCENDING";break;case "DESC":b.direction="DESCENDING";break;default:throw Error("Ranking rule direction '"+c+"' is invalid. Directions are: ASC, DESC.");}switch(a.trim()){case ".geometryType":b.ae=new Yg({});break;case ".minZoomLevel":b.be=new $g({});break;default:b.Zd=new Xg({attributeName:L(a)})}return b};var zl=[],Al=function(a){E(!Object.isSealed(a),"Cannot use getInstance() with a sealed constructor.");var b="Cf";if(a.Cf&&a.hasOwnProperty(b))return a.Cf;zl.push(a);var c=new a;a.Cf=c;E(a.hasOwnProperty(b),"Could not instantiate singleton.");return c};var Cl=function(a,b,c,d,e,g){d=Bj(!g,!1,d||[]);Dj=a;Ej=d;a===null?Jj():Fj(function(){Hj(b,c,e||Ea(Bl,b,c))})};x("ee.data.authenticateViaOauth",Cl);var Dl=function(a,b,c,d,e){Cl(a,b,c,d,e)};x("ee.data.authenticate",Dl);var Bl=function(a,b){t.google.accounts.oauth2.initTokenClient({client_id:Dj,callback:Ea(Gj,a,b),scope:Ej.join(" ")}).requestAccessToken()};x("ee.data.authenticateViaPopup",Bl);
|
|
523
|
+
var El=function(a,b,c,d,e){if("window"in t)throw Error("Use of private key authentication in the browser is insecure. Consider using OAuth, instead.");d=Bj(!e,!e,d||[]);Dj=a.client_email;Ej=d;var g=new google.auth.JWT(a.client_email,null,a.private_key,d,null);Cj=function(f,l){g.authorize(function(m,p){m?l({error:m}):l({access_token:p.access_token,token_type:p.token_type,expires_in:(p.expiry_date-Date.now())/1E3})})};Hj(b,c)};x("ee.data.authenticateViaPrivateKey",El);
|
|
524
|
+
x("ee.data.setExpressionAugmenter",function(a){Fl=a||Wd});var Fl=Wd;x("ee.data.setAuthToken",function(a,b,c,d,e,g,f,l){e=Bj(!l,!1,e||[]);Dj=a;Ej=e;Gj(void 0,void 0,{token_type:b,access_token:c,state:e.join(" "),expires_in:d});f===!1?g&&g():Fj(function(){g&&g()})});x("ee.data.refreshAuthToken",Hj);x("ee.data.setAuthTokenRefresher",function(a){Cj=a});x("ee.data.getAuthToken",xj);x("ee.data.clearAuthToken",Jj);x("ee.data.getAuthClientId",function(){return Dj});x("ee.data.getAuthScopes",function(){return Ej});
|
|
525
|
+
x("ee.data.setDeadline",function(a){Xj=a});x("ee.data.setParamAugmenter",function(a){Rj=a||Wd});
|
|
526
|
+
var Gl=function(a){a=new K(a);return a.handle(a.Dc().list(qj(),{prettyPrint:!1}).then(ok))},Jl=function(a,b){if(typeof a.image==="string")throw Error("Image as JSON string not supported.");if(a.version!==void 0)throw Error("Image version specification not supported.");a=new Of({name:null,l:Fl($k(a.image)),F:hk(a.format),da:kk(a.bands),hc:nk(a)});var c={fields:"name"},d=Hl();d&&(c.workloadTag=d);b=new K(b);return b.handle(b.maps().create(qj(),a,c).then(function(e){return Il(e.name,"")}))};
|
|
527
|
+
x("ee.data.getMapId",Jl);var Kl=function(a,b,c,d){if(!a.formatTileUrl){var e=Il(a.mapid,a.token,a.urlFormat);a.urlFormat=e.urlFormat;a.formatTileUrl=e.formatTileUrl}return a.formatTileUrl(b,c,d)};x("ee.data.getTileUrl",Kl);
|
|
528
|
+
var Il=function(a,b,c){var d=c===void 0?"":c;d||(oj(),c=Mj,d=b?c+"/map/"+a+"/{z}/{x}/{y}?token="+b:c+"/v1/"+a+"/tiles/{z}/{x}/{y}");return{mapid:a,token:b,formatTileUrl:function(e,g,f){var l=Math.pow(2,f);e%=l;e=String(e<0?e+l:e);return d.replace("{x}",e).replace("{y}",g).replace("{z}",f)},urlFormat:d}},Ll=function(a,b){var c=a.visParams?Fl($k(a.visParams)):null;a=new hg({name:null,Mb:a.assetId,mapName:a.mapName,Ag:c});b=new K(b);return b.handle((new oh(b.M)).create(qj(),a,{fields:["name"]}).then(function(d){var e=
|
|
529
|
+
d.name.split("/").pop();return{token:e,formatTileUrl:function(g,f,l){return Mj+"/v1/"+d.name+"/tiles/"+l+"/"+g+"/"+f},rawTilesKey:e.substring(0,e.lastIndexOf("-"))}}))};x("ee.data.getFeatureViewTilesKey",Ll);
|
|
530
|
+
var Ml=function(a,b,c){c=new K(c);var d=tk(a);a=c.handle;var e=c.assets();b=b===void 0?{}:b;var g=g===void 0?{}:g;e.j.C(d,RegExp("^projects/[^/]+/assets/.*$"));g=G(e.j,{body:null,B:"GET",D:"earthengine.projects.assets.listFeatures",path:"/"+e.m+"/"+d+":listFeatures",u:F(b,g),G:Mg});return a.call(c,g)};x("ee.data.listFeatures",Ml);
|
|
531
|
+
var Nl=function(a,b){var c=new Rk(!0);a=bl(c,a);var d={};c=dl(c,a);Object.keys(c).length&&(d={__source_code_nodes__:c});c={l:Fl(a,d)};if(a=Hl())c.workloadTag=a;b=new K(b);return b.handle(yh(b.value(),qj(),new wf(c)).then(function(e){return e.result}))};x("ee.data.computeValue",Nl);
|
|
532
|
+
var Ol=function(a,b){if(typeof a.image==="string")throw Error("Image as JSON string not supported.");if(a.version!==void 0)throw Error("Image version specification not supported.");if(a.region!==void 0)throw Error('"region" not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');if(a.dimensions!==void 0)throw Error('"dimensions" is not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');a=new fh({name:null,l:Fl($k(a.image)),F:hk(a.format),xa:a.name,da:kk(a.bands),
|
|
533
|
+
hc:nk(a),grid:null});var c={fields:"name"},d=Hl();d&&(c.workloadTag=d);b=new K(b);return b.handle((new wh(b.M)).create(qj(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};x("ee.data.getThumbId",Ol);
|
|
534
|
+
var Pl=function(a,b){var c=new eg({framesPerSecond:a.framesPerSecond||null,maxFrames:a.maxFrames||null,maxPixelsPerFrame:a.maxPixelsPerFrame||null});a=new jh({name:null,l:Fl($k(a.imageCollection)),F:hk(a.format),Pa:c,grid:null});c={fields:"name"};var d=Hl();d&&(c.workloadTag=d);b=new K(b);return b.handle((new Bh(b.M)).create(qj(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};x("ee.data.getVideoThumbId",Pl);
|
|
535
|
+
var Ql=function(a,b){a=new pg({name:null,l:Fl($k(a.imageCollection)),F:hk(a.format),orientation:jk(a.orientation),grid:null});var c={fields:"name"},d=Hl();d&&(c.workloadTag=d);b=new K(b);return b.handle((new ph(b.M)).create(qj(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};x("ee.data.getFilmstripThumbId",Ql);var Rl=function(a){return Mj+"/v1/"+a.thumbid+":getPixels"};x("ee.data.makeThumbUrl",Rl);
|
|
536
|
+
var Tl=function(a,b){a=Object.assign({},a);a.id&&(a.image=new N(a.id));if(typeof a.image==="string")throw Error("Image as serialized JSON string not supported.");if(!a.image)throw Error("Missing ID or image parameter.");a.filePerBand=a.filePerBand!==!1;a.format=a.format||(a.filePerBand?"ZIPPED_GEO_TIFF_PER_BAND":"ZIPPED_GEO_TIFF");if(a.region!=null&&(a.scale!=null||a.crs_transform!=null)&&a.dimensions!=null)throw Error("Cannot specify (bounding region, crs_transform/scale, dimensions) simultaneously.");
|
|
537
|
+
if(typeof a.bands==="string")try{a.bands=JSON.parse(a.bands)}catch(e){a.bands=kk(a.bands)}if(a.bands&&!Array.isArray(a.bands))throw Error("Bands parameter must be an array.");a.bands&&a.bands.every(function(e){return typeof e==="string"})&&(a.bands=a.bands.map(function(e){return{id:e}}));if(a.bands&&a.bands.some(function(e){return e.id==null}))throw Error("Each band dictionary must have an id.");typeof a.region==="string"&&(a.region=JSON.parse(a.region));if(typeof a.crs_transform==="string")try{a.crs_transform=
|
|
538
|
+
JSON.parse(a.crs_transform)}catch(e){}var c=Sl(a.image,a);a=new fh({name:null,l:Fl($k(c)),F:hk(a.format),xa:a.name,da:a.bands&&kk(a.bands.map(function(e){return e.id})),grid:null});c={fields:"name"};var d=Hl();d&&(c.workloadTag=d);b=new K(b);return b.handle((new wh(b.M)).create(qj(),a,c).then(function(e){return{docid:e.name,token:""}}))};x("ee.data.getDownloadId",Tl);var Ul=function(a){oj();return Mj+"/v1/"+a.docid+":getPixels"};x("ee.data.makeDownloadUrl",Ul);
|
|
539
|
+
var Vl=function(a,b){b=new K(b);var c=ik(a.format),d=Fl($k(a.table)),e=null;if(a.selectors!=null)if(typeof a.selectors==="string")e=a.selectors.split(",");else if(Array.isArray(a.selectors)&&a.selectors.every(function(g){return typeof g==="string"}))e=a.selectors;else throw Error("'selectors' parameter must be an array of strings.");a=new dh({name:null,l:d,F:c,selectors:e,filename:a.filename||null});c={fields:"name"};if(d=Hl())c.workloadTag=d;return b.handle((new vh(b.M)).create(qj(),a,c).then(function(g){return{docid:g.name||
|
|
540
|
+
"",token:""}}))};x("ee.data.getTableDownloadId",Vl);var Wl=function(a){return Mj+"/v1/"+a.docid+":getFeatures"};x("ee.data.makeTableDownloadUrl",Wl);var Xl=function(a,b){var c=function(d){return Math.floor(Math.random()*Math.pow(2,d*4)).toString(16).padStart(d,"0")};a=hc(a||1).map(function(){return[c(8),c(4),"4"+c(3),(8+Math.floor(Math.random()*4)).toString(16)+c(3),c(12)].join("-")});return b?b(a):a};x("ee.data.newTaskId",Xl);
|
|
541
|
+
var Yl=function(a){return a.name&&a.done&&a.error},$l=function(a,b){var c=Zl(a).map(Fk);if(c.length===1)return a=(new K(b)).pd(Yl),a.handle(a.Na().get(c[0]).then(function(e){return[Gk(e)]}));a=(new wj(b)).pd(Yl);var d=a.Na();return a.send(c.map(function(e){return[e,d.get(e)]}),function(e){return c.map(function(g){return Gk(e[g])})})};x("ee.data.getTaskStatus",$l);
|
|
542
|
+
var Zl=function(a){if(typeof a==="string")return[a];if(Array.isArray(a))return a;throw Error("Invalid value: expected a string or an array of strings.");},bm=function(a){return am(void 0,a)};x("ee.data.getTaskList",bm);var am=function(a,b){return b?(cm(a,function(c,d){return b(c?{tasks:c.map(Gk)}:null,d)}),null):{tasks:cm(a).map(Gk)}};x("ee.data.getTaskListWithLimit",am);
|
|
543
|
+
var cm=function(a,b){var c=[],d={pageSize:500},e=function(l){fc(c,l.Na||[]);!l.nextPageToken||a&&c.length>=a?b&&b(a?c.slice(0,a):c):(d.pageToken=l.nextPageToken,g.handle(f.list(qj(),d).then(e)));return null},g=new K(b?function(l,m){return m&&b(l,m)}:void 0),f=g.Na();g.handle(f.list(qj(),d).then(e));return b?null:a?c.slice(0,a):c};x("ee.data.listOperations",cm);
|
|
544
|
+
var dm=function(a,b){a=Zl(a).map(Fk);var c=new pf;if(a.length===1)b=new K(b),b.handle(b.Na().cancel(a[0],c));else{b=new wj(b);var d=b.Na();b.send(a.map(function(e){return[e,d.cancel(e,c)]}))}};x("ee.data.cancelOperation",dm);var em=function(a,b){var c=Zl(a).map(Fk);if(!Array.isArray(a))return a=(new K(b)).pd(Yl),a.handle(a.Na().get(c[0]));a=(new wj(b)).pd(Yl);var d=a.Na();return a.send(c.map(function(e){return[e,d.get(e)]}))};x("ee.data.getOperation",em);
|
|
545
|
+
var gm=function(a,b){return fm(a,"CANCEL",b)};x("ee.data.cancelTask",gm);var fm=function(a,b,c){if(!bb(hm,b))throw Error("Invalid action: "+b);a=Zl(a);a=a.map(Fk);dm(a,c);return null};x("ee.data.updateTask",fm);
|
|
546
|
+
var nm=function(a,b,c){b.id=a;var d=b.type;a=b.sourceUrl!=null?{__source_url__:b.sourceUrl}:{};if("workloadTag"in b)b.workloadTag||delete b.workloadTag;else{var e=Hl();e&&(b.workloadTag=e)}var g=new K(c);c=function(f){return g.handle(f.then(Hk))};switch(d){case "EXPORT_IMAGE":return b=im(b,a),c(g.image().Ka(qj(),b));case "EXPORT_FEATURES":return b=sl(b),b.l=Fl(b.l,a),c(g.table().Ka(qj(),b));case "EXPORT_VIDEO":return b=jm(b,a),c(g.video().Ka(qj(),b));case "EXPORT_TILES":return b=km(b,a),c(g.map().Ka(qj(),
|
|
547
|
+
b));case "EXPORT_VIDEO_MAP":return b=lm(b),c((new Ah(g.M)).Ka(qj(),b));case "EXPORT_CLASSIFIER":return b=mm(b,a),c((new nh(g.M)).Ka(qj(),b));default:throw Error("Unable to start processing for task of type "+d);}};x("ee.data.startProcessing",nm);
|
|
548
|
+
var im=function(a,b){var c=om(a);if(c.element==null)throw Error('"element" not found in params '+c);var d=new Sf({l:$k(c.element),description:L(c.description),oa:null,sa:null,grid:null,Of:L(c.maxPixels),requestId:L(c.id),O:M(c.maxWorkers),priority:M(c.priority)}),e=nl(c);switch(e){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":d.oa=vl(c,e);break;case "ASSET":e=c.pyramidingPolicy||{};try{e=JSON.parse(e)}catch(f){}var g="PYRAMIDING_POLICY_UNSPECIFIED";typeof e==="string"?(g=e,e={}):e[".default"]&&(g=e[".default"],
|
|
549
|
+
delete e[".default"]);c=new Tf({Ha:ql(c),pyramidingPolicy:g,Tf:eb(e)?null:e,tileSize:M(c.shardSize)});d.sa=c;break;default:throw Error('Export destination "'+e+'" unknown');}d.l=Fl(d.l,b);a.workloadTag&&(d.workloadTag=a.workloadTag);return d},jm=function(a,b){var c=pm(a);if(c.element==null)throw Error('"element" not found in params '+c);var d=new fg({l:$k(c.element),description:L(c.description),Pa:new eg({framesPerSecond:M(c.framesPerSecond),maxFrames:M(c.maxFrames),maxPixelsPerFrame:L(c.maxPixels)}),
|
|
550
|
+
oa:null,requestId:L(c.id),O:M(c.maxWorkers),priority:M(c.priority)});d.oa=wl(c,nl(c));d.l=Fl(d.l,b);a.workloadTag&&(d.workloadTag=a.workloadTag);return d},km=function(a,b){var c=a.scale;delete a.scale;var d=om(a);d.scale=c;if(d.element==null)throw Error('"element" not found in params '+d);c=new Wf({l:$k(d.element),description:L(d.description),dc:xl(d),cc:vl(d,"GOOGLE_CLOUD_STORAGE"),requestId:L(d.id),O:M(d.maxWorkers),priority:M(d.priority)});c.l=Fl(c.l,b);a.workloadTag&&(c.workloadTag=a.workloadTag);
|
|
551
|
+
return c},lm=function(a){var b=a.scale;delete a.scale;var c=pm(a);c.scale=b;if(c.element==null)throw Error('"element" not found in params '+c);b=new cg({l:$k(c.element),description:L(c.description),Pa:new eg({framesPerSecond:M(c.framesPerSecond),maxFrames:M(c.maxFrames),maxPixelsPerFrame:null}),dc:xl(c),cc:wl(c,"GOOGLE_CLOUD_STORAGE"),requestId:L(c.id),version:L(c.version),O:M(c.maxWorkers),priority:M(c.priority)});b.l=Fl(b.l);a.workloadTag&&(b.workloadTag=a.workloadTag);return b},mm=function(a,b){if(a.element==
|
|
552
|
+
null)throw Error('"element" not found in params '+a);var c=nl(a);if(c!="ASSET")throw Error('Export destination "'+c+'" unknown');c=new Rf({l:$k(a.element),description:L(a.description),requestId:L(a.id),sa:new rf({Ha:ql(a)}),O:M(a.maxWorkers),priority:M(a.priority)});c.l=Fl(c.l,b);a.workloadTag&&(c.workloadTag=a.workloadTag);return c},rm=function(a,b,c){b=Lk(b);var d=function(e){return e?Hk(e):null};return d(qm(a,b,c&&function(e,g){return c(d(e),g)}))};x("ee.data.startIngestion",rm);
|
|
553
|
+
var qm=function(a,b,c){b=new Hg({zf:b,requestId:a,overwrite:null,description:null});a=new K(c,a?void 0:0);return a.handle(a.image().import(qj(),b))},sm=function(a,b,c){b=new Ig({og:b,requestId:a,overwrite:null,description:null});a=new K(c,a?void 0:0);return a.handle(a.table().import(qj(),b))},tm=function(a,b,c){b=Mk(b);var d=function(e){return e?Hk(e):null};return d(sm(a,b,c&&function(e,g){return c(d(e),g)}))};x("ee.data.startTableIngestion",tm);
|
|
554
|
+
var um=function(a,b){b=new K(b);a=tk(a);return b.handle(b.assets().get(a,{prettyPrint:!1}).then(uk))};x("ee.data.getAsset",um);x("ee.data.getInfo",um);
|
|
555
|
+
var vm=function(a,b,c,d){b=b===void 0?{}:b;d=d===void 0?Wd:d;var e=Object.assign({},b),g=new K(c),f=(b=rk.test(a))?new lh(g.M):g.assets();a=b?"projects/"+sk(a):tk(a);var l=function(m){if(e.pageSize!=null||!m.nextPageToken)return m;var p=m.assets||[];e.pageToken=m.nextPageToken;m=f.Sc(a,e).then(function(v){v.assets=p.concat(v.assets);return v}).then(l);return c?m:g.handle(m)};return g.handle(f.Sc(a,e).then(l).then(d))},wm=function(a,b){var c=Bk(a);c.pageSize||(c.pageSize=1E3);return vm(a.id,c,b,function(d){return d==
|
|
556
|
+
null?null:vk(d)})};x("ee.data.getList",wm);var xm=function(a,b,c){b=b===void 0?{}:b;return vm(a,b,c)};x("ee.data.listAssets",xm);var ym=function(a,b,c){b=b===void 0?{}:b;b=Ak(b);return vm(a,b,c,function(d){if(d==null)return null;var e={};d.assets&&(e.images=d.assets);d.nextPageToken&&(e.nextPageToken=d.nextPageToken);return e})};x("ee.data.listImages",ym);var zm=function(a,b){b=new K(b);return b.handle((new lh(b.M)).Sc(a||qj()))};x("ee.data.listBuckets",zm);var Am=function(a){a=new K(a);return a.handle((new lh(a.M)).Sc(qj()).then(vk))};
|
|
557
|
+
x("ee.data.getAssetRoots",Am);var Bm=function(a,b){var c="projects/"+sk(a);a=c==="projects/earthengine-legacy"?a:void 0;var d=new Hf({type:"Folder"});b=new K(b);b.handle(b.assets().create(c,d,{assetId:a}).then(uk))};x("ee.data.createAssetHome",Bm);
|
|
558
|
+
var Cm=function(a,b,c,d,e){if(c)throw Error("Asset overwrite not supported.");if(typeof a==="string")throw Error("Asset cannot be specified as string.");b=a.name||b&&tk(b);if(!b)throw Error("Either asset name or opt_path must be specified.");c=b.indexOf("/assets/");if(c===-1)throw Error("Asset name must contain /assets/.");a=Object.assign({},a);a.tilestoreEntry&&!a.tilestoreLocation&&(a.tilestoreLocation=a.tilestoreEntry,delete a.tilestoreEntry);a.tilestoreLocation&&(a.tilestoreLocation=new Nf(a.tilestoreLocation));
|
|
559
559
|
a.gcsLocation&&!a.cloudStorageLocation&&(a.cloudStorageLocation=a.gcsLocation,delete a.gcsLocation);a.cloudStorageLocation&&(a.cloudStorageLocation=new vf(a.cloudStorageLocation));d&&!a.properties&&(a.properties=Object.assign({},d));d=q(["title","description"]);for(var g=d.next();!g.done;g=d.next())if(g=g.value,a[g]){var f={};a.properties=Object.assign((f[g]=a[g],f),a.properties||{});delete a[g]}a=new Hf(a);d=b.slice(0,c);b=b.slice(c+8);a.id=null;a.name=null;a:switch(c=a.type,c){case "ImageCollection":c=
|
|
560
|
-
"IMAGE_COLLECTION";break a;case "Folder":c="FOLDER"}a.type=c;e=new K(e);return e.handle(e.assets().create(d,a,{assetId:b}).then(
|
|
561
|
-
var
|
|
562
|
-
var
|
|
563
|
-
var
|
|
564
|
-
var
|
|
565
|
-
var
|
|
566
|
-
var
|
|
567
|
-
var
|
|
568
|
-
|
|
569
|
-
var
|
|
570
|
-
O.prototype.evaluate=O.prototype.evaluate;O.prototype.V=function(a){return
|
|
571
|
-
O.prototype.na=function(a){if(this.I===null&&this.args===null){a=this.U||a.Oi;if(!a)throw Error("A mapped function's arguments cannot be used in client-side operations");return new gf({Lb:a})}var b={},c;for(c in this.args)this.args[c]!==void 0&&(b[c]=
|
|
572
|
-
O.prototype.toString=function(){return"ee."+this.name()+"("+
|
|
573
|
-
var
|
|
574
|
-
typeof a!=="function"?(a=Object.getPrototypeOf(a),a!==null&&Object.getPrototypeOf(a)===null):!1},
|
|
575
|
-
var
|
|
576
|
-
0)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d}
|
|
577
|
-
|
|
578
|
-
d.push("Undocumented.")}return d.join("")};
|
|
579
|
-
var
|
|
580
|
-
var
|
|
581
|
-
f=p?a.prototype:a;l in f&&!f[l].signature||(f[l]=function(v){return
|
|
582
|
-
var l=new je(d);if(le(l,f).isEmpty())e[d[0]]=b[0];else{b=me(f,l);if(b.size!==0)throw Error("Unexpected arguments"+a+": "+Array.from(b.values()).join(", "));e=gb(g)}}b=new je(ab(e));c=me(new je(Xb(c,function(m){return m.lastIndexOf("opt_",0)!=0})),b);if(c.size!==0)throw Error("Missing required arguments"+a+": "+Array.from(c.values()).join(", "));return e},
|
|
583
|
-
"").match(b),a===null&&
|
|
584
|
-
S.prototype.set=function(a){var b;if(arguments.length<=1){var c=arguments[0];if(b=
|
|
585
|
-
2!=0)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)f=arguments[c],d=arguments[c+1],b=Q("Element.set",b,f,d)}return
|
|
586
|
-
O.call(this,null,null);this.nb=a.type;this.ah=a.coordinates!=null?hb(a.coordinates):null;this.Bh=a.geometries||null;if(b!=null)this.Zb=b;else if("crs"in a)if(u(a.crs)&&a.crs.type=="name"&&u(a.crs.properties)&&typeof a.crs.properties.name==="string")this.Zb=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new
|
|
587
|
-
x("ee.Geometry",T);var
|
|
588
|
-
T.MultiPoint=
|
|
589
|
-
var
|
|
590
|
-
d+"\u00b0");b=Math.max(b,-90);d=Math.min(d,90);c-a>=360?(a=-180,c=180):(a=
|
|
591
|
-
var
|
|
592
|
-
var
|
|
560
|
+
"IMAGE_COLLECTION";break a;case "Folder":c="FOLDER"}a.type=c;e=new K(e);return e.handle(e.assets().create(d,a,{assetId:b}).then(uk))};x("ee.data.createAsset",Cm);var Dm=function(a,b,c){return Cm({type:"Folder"},a,b,void 0,c)};x("ee.data.createFolder",Dm);var Em=function(a,b,c){a=tk(a);b=tk(b);b=new Qg({Pb:b});c=new K(c);c.handle(c.assets().move(a,b).then(uk))};x("ee.data.renameAsset",Em);
|
|
561
|
+
var Fm=function(a,b,c,d){a=tk(a);b=tk(b);c=new Af({Pb:b,overwrite:c!=null?c:null});d=new K(d);b=d.handle;var e=d.assets();var g=g===void 0?{}:g;var f=f===void 0?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));g=G(e.j,{body:c,B:"POST",D:"earthengine.projects.assets.copy",path:"/"+e.m+"/"+a+":copy",u:F(g,f),G:Hf});b.call(d,g.then(uk))};x("ee.data.copyAsset",Fm);var Gm=function(a,b){b=new K(b);b.handle(b.assets().delete(tk(a)))};x("ee.data.deleteAsset",Gm);
|
|
562
|
+
var Hm=function(a,b){a=tk(a);var c=new vg;b=new K(b);var d=b.handle,e=b.assets(),g={prettyPrint:!1};g=g===void 0?{}:g;var f=f===void 0?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));f=G(e.j,{body:c,B:"POST",D:"earthengine.projects.assets.getIamPolicy",path:"/"+e.m+"/"+a+":getIamPolicy",u:F(g,f),G:bg});return d.call(b,f.then(Ck))};x("ee.data.getAssetAcl",Hm);
|
|
563
|
+
var Im=function(a,b,c,d){b=new ih({Mb:b,updateMask:(c||[]).join(",")});d=new K(d);c=d.handle;var e=d.assets();a=tk(a);var g=g===void 0?{}:g;var f=f===void 0?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));g=G(e.j,{body:b,B:"PATCH",D:"earthengine.projects.assets.patch",path:"/"+e.m+"/"+a,u:F(g,f),G:Hf});return c.call(d,g.then(uk))};x("ee.data.updateAsset",Im);
|
|
564
|
+
var Jm=function(a,b,c){a=tk(a);b=Dk(b);b=new ch({jb:b});c=new K(c);var d=c.handle,e=c.assets(),g={prettyPrint:!1};g=g===void 0?{}:g;var f=f===void 0?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));f=G(e.j,{body:b,B:"POST",D:"earthengine.projects.assets.setIamPolicy",path:"/"+e.m+"/"+a+":setIamPolicy",u:F(g,f),G:bg});d.call(c,f)};x("ee.data.setAssetAcl",Jm);
|
|
565
|
+
var Km=function(a,b,c){var d=yk(b);b=Ia(d.i()).keys.filter(function(e){return e!=="properties"&&D(d,e)}).map(function(e){return e.replace(/([A-Z])/g,function(g,f){return"_"+f.toLowerCase()})}).concat(Object.keys(d.properties||{}).map(function(e){return'properties."'+e+'"'}));Im(a,d,b,c)};x("ee.data.setAssetProperties",Km);
|
|
566
|
+
var Lm=function(a,b){var c=tk(a);b=new K(b);var d=b.assets(),e=d.j.C;d.j.C=function(g,f){f.source==="^projects\\/[^/]+\\/assets\\/.+$"&&(f=RegExp("^projects/[^/]+/assets/.*$"));return e(g,f)};c=d.get(c,{prettyPrint:!1});return b.handle(c.then(function(g){if(!(g instanceof Hf&&g.quota))throw Error(a+" is not a root folder.");g=g.quota;return{asset_count:{usage:Number(g.Ne||0),limit:Number(g.Lf||0)},asset_size:{usage:Number(g.sizeBytes||0),limit:Number(g.Vb||0)}}}))};x("ee.data.getAssetRootQuota",Lm);
|
|
567
|
+
var Mm=function(){this.default=this.tag=""};Mm.prototype.get=function(){return this.tag};Mm.prototype.set=function(a){this.tag=this.validate(a)};Mm.prototype.reset=function(){this.tag=this.default};
|
|
568
|
+
Mm.prototype.validate=function(a){if(a==null||a==="")return"";a=String(a);if(!/^([a-z0-9]|[a-z0-9][-_a-z0-9]{0,61}[a-z0-9])$/g.test(a))throw Error('Invalid tag, "'+a+'". Tags must be 1-63 characters, beginning and ending with a lowercase alphanumeric character ([a-z0-9]) with dashes (-), underscores (_), and lowercase alphanumerics between.');return a};var Hl=function(){return Al(Mm).get()};x("ee.data.getWorkloadTag",Hl);var Nm=function(a){Al(Mm).set(a)};x("ee.data.setWorkloadTag",Nm);
|
|
569
|
+
var Om=function(a){var b=Al(Mm);b.default=b.validate(a);Al(Mm).set(a)};x("ee.data.setDefaultWorkloadTag",Om);var Pm=function(a){a&&(a=Al(Mm),a.default=a.validate(""));Al(Mm).reset()};x("ee.data.resetWorkloadTag",Pm);var hm={Gl:"CANCEL",Jl:"UPDATE"};var O=function(a,b,c){if(!(this instanceof O))return Qm(O,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.I=a;this.args=b;this.U=c||null;this.yl=null};y(O,Yj);x("ee.ComputedObject",O);O.prototype.Ch=function(){return this.yl};O.prototype.evaluate=function(a){if(!a||typeof a!=="function")throw Error("evaluate() requires a callback function.");Nl(this,a)};
|
|
570
|
+
O.prototype.evaluate=O.prototype.evaluate;O.prototype.V=function(a){return Nl(this,a)};O.prototype.getInfo=O.prototype.V;O.prototype.encode=function(a){if(this.I===null&&this.args===null)return{type:"ArgumentRef",value:this.U};var b={},c;for(c in this.args)this.args[c]!==void 0&&(b[c]=a(this.args[c]));b={type:"Invocation",arguments:b};a=a(this.I);b[typeof a==="string"?"functionName":"function"]=a;return b};
|
|
571
|
+
O.prototype.na=function(a){if(this.I===null&&this.args===null){a=this.U||a.Oi;if(!a)throw Error("A mapped function's arguments cannot be used in client-side operations");return new gf({Lb:a})}var b={},c;for(c in this.args)this.args[c]!==void 0&&(b[c]=bk(hl(a,this.args[c])));return typeof this.I==="string"?ek(String(this.I),b):this.I.Ed(a,b)};O.prototype.va=function(a){return(a===void 0?0:a)?Wk(this):fl(this)};O.prototype.serialize=O.prototype.va;
|
|
572
|
+
O.prototype.toString=function(){return"ee."+this.name()+"("+Yk(this)+")"};x("ee.ComputedObject.prototype.toString",O.prototype.toString);O.prototype.name=function(){return"ComputedObject"};O.prototype.Eg=function(a,b){var c=Array.from(arguments);c[0]=this;a.apply(t,c);return this};O.prototype.aside=O.prototype.Eg;
|
|
573
|
+
var Rm=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.I=b.I;a.args=b.args;a.U=b.U;return a},Qm=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Sm={},Tm=function(a,b){if(b==a)return!0;switch(a){case "Element":return b=="Element"||b=="Image"||b=="Feature"||b=="Collection"||b=="ImageCollection"||b=="FeatureCollection";case "FeatureCollection":case "Collection":return b=="Collection"||b=="ImageCollection"||b=="FeatureCollection";case "Object":return!0;default:return!1}},Um=function(a){return typeof a==="number"||a instanceof O&&a.name()=="Number"},Vm=function(a){return typeof a==="string"||a instanceof O&&a.name()=="String"},Wm=function(a){return u(a)&&
|
|
574
|
+
typeof a!=="function"?(a=Object.getPrototypeOf(a),a!==null&&Object.getPrototypeOf(a)===null):!1},Xm=function(a,b,c){c=c===void 0?!1:c;return a.length===1&&Wm(a[0])&&(a=b.args,c&&(a=a.slice(1)),a.length)?!(a.length===1||a[1].optional)||a[0].type!=="Dictionary":!1};var Ym=function(){if(!(this instanceof Ym))return new Ym};y(Ym,Yj);x("ee.Function",Ym);var Zm=Wd;Ym.prototype.call=function(a){return this.apply($m(this,Array.prototype.slice.call(arguments,0)))};Ym.prototype.call=Ym.prototype.call;Ym.prototype.apply=function(a){a=new O(this,an(this,a));return Zm(a,this.Z().returns)};Ym.prototype.apply=Ym.prototype.apply;
|
|
575
|
+
var bn=function(a,b,c){var d=b!==void 0,e=a.Z();if(Xm(c,e,d)){if(c=gb(c[0]),d){d=e.args[0].name;if(d in c)throw Error("Named args for "+e.name+" can't contain keyword "+d);c[d]=b}}else c=$m(a,d?[b].concat(c):c);return a.apply(c)},an=function(a,b){for(var c=a.Z().args,d={},e={},g=0;g<c.length;g++){var f=c[g].name;if(f in b&&b[f]!==void 0)d[f]=Zm(b[f],c[g].type);else if(!c[g].optional)throw Error("Required argument ("+f+") missing to function: "+a);e[f]=!0}c=[];for(var l in b)e[l]||c.push(l);if(c.length>
|
|
576
|
+
0)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},$m=function(a,b){var c=a.Z().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);a={};for(var d=0;d<b.length;d++)a[c[d].name]=b[d];return a};
|
|
577
|
+
Ym.prototype.toString=function(a,b){var c=this.Z(),d=[];d.push(a||c.name);d.push("(");d.push(Yb(c.args.slice(b?1:0),function(g){return g.name}).join(", "));d.push(")\n");d.push("\n");c.description?d.push(c.description):d.push("Undocumented.");d.push("\n");if(c.args.length)for(d.push("\nArgs:\n"),a=0;a<c.args.length;a++){b&&a==0?d.push(" this:"):d.push("\n ");var e=c.args[a];d.push(e.name);d.push(" (");d.push(e.type);e.optional&&d.push(", optional");d.push("): ");e.description?d.push(e.description):
|
|
578
|
+
d.push("Undocumented.")}return d.join("")};Ym.prototype.va=function(a){return(a===void 0?0:a)?Wk(this):fl(this)};var P=function(a,b){if(b===void 0)return cn(a);if(!(this instanceof P))return Qm(P,arguments);this.wb=hb(b);this.wb.name=a};y(P,Ym);x("ee.ApiFunction",P);var Q=function(a,b){return Ym.prototype.call.apply(cn(a),Array.prototype.slice.call(arguments,1))};x("ee.ApiFunction._call",Q);var dn=function(a,b){return cn(a).apply(b)};x("ee.ApiFunction._apply",dn);P.prototype.encode=function(){return this.wb.name};P.prototype.Ed=function(a,b){return ek(this.wb.name,b)};P.prototype.Z=function(){return this.wb};
|
|
579
|
+
var en=null,fn={},hn=function(){gn();return Ya(en,function(a){return a.Z()})},jn=function(){gn();return Xa(en,function(a,b){return!fn[b]})},cn=function(a){var b=kn(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};x("ee.ApiFunction.lookup",cn);
|
|
580
|
+
var kn=function(a){gn();return en[a]||null},gn=function(a,b){if(en)a&&a();else{var c=function(d,e){e?b&&b(Error(e)):(en=Ya(d,function(g,f){g.returns=g.returns.replace(/<.*>/,"");for(var l=0;l<g.args.length;l++)g.args[l].type=g.args[l].type.replace(/<.*>/,"");return new P(f,g)}),a&&a())};a?Gl(c):c(Gl())}},ln=function(a,b,c,d){gn();var e=d||"";Wa(en,function(g,f){var l=f.split(".");if(l.length==2&&l[0]==b){l=e+l[1];var m=g.Z();fn[f]=!0;var p=!1;m.args.length&&(f=m.args[0].type,p=f!="Object"&&Tm(f,c));
|
|
581
|
+
f=p?a.prototype:a;l in f&&!f[l].signature||(f[l]=function(v){return bn(g,p?this:void 0,Array.prototype.slice.call(arguments,0))},f[l].toString=w(g.toString,g,l,p),f[l].signature=m)}})},mn=function(a){var b=function(c){for(var d in c)typeof c[d]==="function"&&c[d].signature&&delete c[d]};b(a);b(a.prototype||{})};var R=function(a,b){var c=nn(a),d=Yb(c,function(m){return m.replace(/^opt_/,"")});a=(a=t.EXPORTED_FN_INFO?t.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},g=b[0],f=u(g)&&typeof g!=="function"&&!Array.isArray(g)&&Object.getPrototypeOf(g).constructor.name==="Object";if(b.length>1||!f){if(b.length>d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(g=0;g<b.length;g++)e[d[g]]=b[g]}else{f=new je(ab(g));
|
|
582
|
+
var l=new je(d);if(le(l,f).isEmpty())e[d[0]]=b[0];else{b=me(f,l);if(b.size!==0)throw Error("Unexpected arguments"+a+": "+Array.from(b.values()).join(", "));e=gb(g)}}b=new je(ab(e));c=me(new je(Xb(c,function(m){return m.lastIndexOf("opt_",0)!=0})),b);if(c.size!==0)throw Error("Missing required arguments"+a+": "+Array.from(c.values()).join(", "));return e},nn=function(a){var b=on,c=[];t.EXPORTED_FN_INFO?(a=t.EXPORTED_FN_INFO[a.toString()],u(a)||pn(),c=a.paramNames,Array.isArray(c)||pn()):(a=a.toString().replace(qn,
|
|
583
|
+
"").match(b),a===null&&pn(),c=(a[1].split(",")||[]).map(function(d){return d.replace(rn,"")}));return c},pn=function(){throw Error("Failed to locate function parameters.");},qn=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/mg,on=/^function[^\(]*\(([^\)]*)\)/m,rn=/=.*$/;var S=function(a,b,c){O.call(this,a,b,c);sn()};y(S,O);x("ee.Element",S);var tn=!1,sn=function(){tn||(ln(S,"Element","Element"),tn=!0)};S.prototype.name=function(){return"Element"};
|
|
584
|
+
S.prototype.set=function(a){var b;if(arguments.length<=1){var c=arguments[0];if(b=Wm(c))a:{b=ab(c);var d=["properties"];if(xa(b)&&xa(d)&&b.length==d.length){for(var e=b.length,g=0;g<e;g++)if(b[g]!==d[g]){b=!1;break a}b=!0}else b=!1}b&&u(c.properties)&&(c=c.properties);if(Wm(c)){b=this;for(var f in c)d=c[f],b=Q("Element.set",b,f,d)}else if(c instanceof O&&kn("Element.setMulti"))b=Q("Element.setMulti",this,c);else throw Error("When Element.set() is passed one argument, it must be a dictionary.");}else{if(arguments.length%
|
|
585
|
+
2!=0)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)f=arguments[c],d=arguments[c+1],b=Q("Element.set",b,f,d)}return Rm(this,b)};S.prototype.set=S.prototype.set;var T=function(a,b,c,d){if(!(this instanceof T))return Qm(T,arguments);if(typeof a!=="object"||!("type"in a)){var e=R(T,arguments);a=e.geoJson;b=e.proj;c=e.geodesic;d=e.evenOdd}un();e=b!=null||c!=null||d!=null;if(a instanceof O&&!(a instanceof T&&a.nb)){if(e)throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not supported. Use Geometry.transform().");O.call(this,a.I,a.args,a.U)}else{a instanceof T&&(a=a.encode());if(!vn(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));
|
|
586
|
+
O.call(this,null,null);this.nb=a.type;this.ah=a.coordinates!=null?hb(a.coordinates):null;this.Bh=a.geometries||null;if(b!=null)this.Zb=b;else if("crs"in a)if(u(a.crs)&&a.crs.type=="name"&&u(a.crs.properties)&&typeof a.crs.properties.name==="string")this.Zb=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new Si).va(a.crs));this.pc=c;this.pc===void 0&&"geodesic"in a&&(this.pc=!!a.geodesic);this.nc=d;this.nc===void 0&&"evenOdd"in a&&(this.nc=!!a.evenOdd)}};y(T,O);
|
|
587
|
+
x("ee.Geometry",T);var wn=!1,un=function(){wn||(ln(T,"Geometry","Geometry"),wn=!0)},xn=function(a,b){if(!(this instanceof xn))return yn(xn,arguments);var c=zn(xn,"Point",1,arguments);if(!(c instanceof O)){var d=c.coordinates;if(!Array.isArray(d)||d.length!=2)throw Error("The Geometry.Point constructor requires 2 coordinates.");}T.call(this,c)};y(xn,T);T.Point=xn;var An=function(a,b){if(!(this instanceof An))return yn(An,arguments);T.call(this,zn(An,"MultiPoint",2,arguments))};y(An,T);
|
|
588
|
+
T.MultiPoint=An;var Bn=function(a,b,c,d){if(!(this instanceof Bn))return yn(Bn,arguments);var e=zn(Bn,"Rectangle",2,arguments);if(!(e instanceof O)){var g=e.coordinates;if(g.length!=2)throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");var f=g[0][0],l=g[0][1],m=g[1][0];g=g[1][1];e.coordinates=[[[f,g],[f,l],[m,l],[m,g]]];e.type="Polygon"}T.call(this,e)};y(Bn,T);T.Rectangle=Bn;
|
|
589
|
+
var Cn=function(a,b,c,d){if(!(this instanceof Cn))return yn(Cn,arguments);var e=R(Cn,arguments);a=e.west;b=e.south;c=e.east;d=e.north;e=[a,b,c,d];if(Dn(e)){var g;return(g=new P("GeometryConstructors.BBox")).call.apply(g,ja(e))}if(!(a<Infinity))throw Error("Geometry.BBox: west must not be "+a);if(!(c>-Infinity))throw Error("Geometry.BBox: east must not be "+c);if(!(b<=90))throw Error("Geometry.BBox: south must be at most +90\u00b0, but was "+b+"\u00b0");if(!(d>=-90))throw Error("Geometry.BBox: north must be at least -90\u00b0, but was "+
|
|
590
|
+
d+"\u00b0");b=Math.max(b,-90);d=Math.min(d,90);c-a>=360?(a=-180,c=180):(a=En(a),c=En(c),c<a&&(c+=360));T.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]},void 0,!1,!0)};y(Cn,Bn);T.BBox=Cn;var En=function(a){a%=360;a>180?a-=360:a<-180&&(a+=360);return a},Fn=function(a,b,c,d){if(!(this instanceof Fn))return yn(Fn,arguments);T.call(this,zn(Fn,"LineString",2,arguments))};y(Fn,T);T.LineString=Fn;
|
|
591
|
+
var Gn=function(a,b,c,d){if(!(this instanceof Gn))return yn(Gn,arguments);T.call(this,zn(Gn,"LinearRing",2,arguments))};y(Gn,T);T.LinearRing=Gn;var Hn=function(a,b,c,d){if(!(this instanceof Hn))return yn(Hn,arguments);T.call(this,zn(Hn,"MultiLineString",3,arguments))};y(Hn,T);T.MultiLineString=Hn;var In=function(a,b,c,d,e){if(!(this instanceof In))return yn(In,arguments);T.call(this,zn(In,"Polygon",3,arguments))};y(In,T);T.Polygon=In;
|
|
592
|
+
var Jn=function(a,b,c,d,e){if(!(this instanceof Jn))return yn(Jn,arguments);T.call(this,zn(Jn,"MultiPolygon",4,arguments))};y(Jn,T);T.MultiPolygon=Jn;
|
|
593
593
|
T.prototype.encode=function(a){if(!this.nb){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return O.prototype.encode.call(this,a)}a={type:this.nb};this.nb=="GeometryCollection"?a.geometries=this.Bh:a.coordinates=this.ah;this.Zb!=null&&(a.crs={type:"name",properties:{name:this.Zb}});this.pc!=null&&(a.geodesic=this.pc);this.nc!=null&&(a.evenOdd=this.nc);return a};
|
|
594
|
-
T.prototype.oe=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return this.encode()};T.prototype.toGeoJSON=T.prototype.oe;T.prototype.wg=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return(new
|
|
594
|
+
T.prototype.oe=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return this.encode()};T.prototype.toGeoJSON=T.prototype.oe;T.prototype.wg=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return(new Si).va(this.oe())};T.prototype.toGeoJSONString=T.prototype.wg;T.prototype.va=function(a){return(a===void 0?0:a)?Wk(this):fl(this)};T.prototype.serialize=T.prototype.va;
|
|
595
595
|
T.prototype.toString=function(){return"ee.Geometry("+this.wg()+")"};
|
|
596
596
|
T.prototype.na=function(a){if(!this.nb){if(!a)throw Error("Must specify a serializer when encoding a computed geometry.");return O.prototype.na.call(this,a)}var b={},c="";this.nb==="GeometryCollection"?(b.geometries=this.Bh.map(function(e){return new T(e)}),c="GeometryConstructors.MultiGeometry"):(b.coordinates=this.ah,c="GeometryConstructors."+this.nb);this.Zb!=null&&(b.crs=typeof this.Zb==="string"?(new P("Projection")).call(this.Zb):this.Zb);var d=this.nb!=="Point"&&this.nb!=="MultiPoint";this.pc!=
|
|
597
597
|
null&&d&&(b.geodesic=this.pc);this.nc!=null&&(b.evenOdd=this.nc);return(new P(c)).apply(b).na(a)};
|
|
598
|
-
var
|
|
599
|
-
b)return-1;return b+1}for(c=0;c<a.length;c++)if(typeof a[c]!=="number")return-1;return a.length%2==0?1:-1},
|
|
600
|
-
"Rectangle","MultiPolygon"],b))&&a.evenOdd==null&&(a.evenOdd=!0);if(b&&a.geodesic===!1&&a.evenOdd===!1)throw Error("Planar interiors must be even/odd.");return a},
|
|
601
|
-
"number"})&&(b=
|
|
602
|
-
var
|
|
603
|
-
var
|
|
604
|
-
U.or=
|
|
605
|
-
U.prototype.name=function(){return"Filter"};var
|
|
606
|
-
V.prototype.mf=function(a,b,c){var d=R(V.prototype.mf,arguments);return this.filter(
|
|
607
|
-
V.prototype.limit=function(a,b,c){var d=R(V.prototype.limit,arguments);return
|
|
608
|
-
V.prototype.map=function(a,b){var c=this.elementType();return
|
|
609
|
-
c)throw Error('Can\'t specify both "id" and "system:index".');c=gb(c);c["system:index"]=a.id}S.call(this,new P("Feature"),{geometry:new T(a.geometry),metadata:c})}else S.call(this,new P("Feature"),{geometry:new T(a),metadata:b||null})};y(W,S);x("ee.Feature",W);var
|
|
610
|
-
W.prototype.S=function(a,b){var c=R(W.prototype.getMap,arguments);return Q("Collection",[this]).S(c.visParams,c.callback)};W.prototype.getMapId=W.prototype.S;W.prototype.getMap=W.prototype.S;W.prototype.getMap=W.prototype.getMap;W.prototype.name=function(){return"Feature"};var
|
|
611
|
-
f);break;case "dimensions_consumed":e=!0;break;case "bbox":d.geometry!=null&&console.warn("Multiple request parameters converted to region.");if(!(f instanceof
|
|
612
|
-
null&&console.warn("Multiple request parameters converted to region.");if(!(f instanceof T)){l=f;if(typeof f==="string")try{l=JSON.parse(f)}catch(m){throw Error('Region string "'+f+'" is not valid GeoJSON.');}if(Array.isArray(l))f=new
|
|
613
|
-
d):
|
|
614
|
-
0,e[0],e[1]],c,!1))}}else a=
|
|
615
|
-
b));c.image=a;return c},
|
|
616
|
-
var f=c(b);e=c(e);e=c(Object.assign(f,e));g=
|
|
617
|
-
a.args,a.U);else throw Error("Unrecognized argument type to convert to an Image: "+a);}else if(b==2){b=arguments[0];var c=arguments[1];if(
|
|
618
|
-
N.prototype.getInfo=N.prototype.V;N.prototype.S=function(a,b){var c=this,d=R(N.prototype.getMap,arguments),e=
|
|
619
|
-
N.prototype.rb=function(a,b){var c=R(N.prototype.rb,arguments),d=c.params?gb(c.params):{};d.image=this;if(c.callback){var e=c.callback;
|
|
620
|
-
N.prototype.vf=function(a,b){var c=R(N.prototype.vf,arguments);if(c.callback)this.Kd(c.params,function(d,e){var g="";if(e===void 0)try{g=
|
|
621
|
-
var
|
|
622
|
-
N.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(b.length>2||
|
|
623
|
-
N.prototype.l=function(a,b){var c=R(N.prototype.l,arguments),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(c.map){var g=c.map,f;for(f in g)d.push(f),e[f]=new N(g[f])}var l=Q("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d);c=new
|
|
624
|
-
N.prototype.expression=N.prototype.l;N.prototype.clip=function(a){try{a=new T(a)}catch(b){}return Q("Image.clip",this,a)};N.prototype.clip=N.prototype.clip;N.prototype.pi=function(a){var b=arguments.length!=1||
|
|
625
|
-
|
|
626
|
-
new P("Collection"),{features:a});else if(a&&typeof a==="object"&&a.type==="FeatureCollection")V.call(this,new P("Collection"),{features:a.features.map(function(d){return new W(d)})});else if(a instanceof O)V.call(this,a.I,a.args,a.U);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};y(X,V);x("ee.FeatureCollection",X);var
|
|
627
|
-
X.prototype.S=function(a,b){var c=R(X.prototype.S,arguments),d=
|
|
628
|
-
X.prototype.rb=function(a,b,c,d){var e=R(X.prototype.rb,arguments),g={table:this};e.format&&(g.format=e.format.toUpperCase());e.filename&&(g.filename=e.filename);e.selectors&&(g.selectors=e.selectors);if(e.callback)
|
|
629
|
-
X.prototype.select=function(a,b,c){if(
|
|
630
|
-
else if(a instanceof O)V.call(this,a.I,a.args,a.U);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};y(Y,V);x("ee.ImageCollection",Y);var
|
|
631
|
-
Y.prototype.wf=function(a,b){var c=R(Y.prototype.wf,arguments);return
|
|
632
|
-
var
|
|
633
|
-
if(m===void 0)try{p=
|
|
598
|
+
var vn=function(a){var b=a.type;if(b=="GeometryCollection"){b=a.geometries;if(!Array.isArray(b))return!1;for(a=0;a<b.length;a++)if(!vn(b[a]))return!1;return!0}a=a.coordinates;var c=Kn(a);return b=="Point"&&c==1||b=="MultiPoint"&&(c==2||a.length==0)||b=="LineString"&&c==2||b=="LinearRing"&&c==2||b=="MultiLineString"&&(c==3||a.length==0)||b=="Polygon"&&c==3||b=="MultiPolygon"&&(c==4||a.length==0)},Kn=function(a){if(!Array.isArray(a))return-1;if(Array.isArray(a[0])){for(var b=Kn(a[0]),c=1;c<a.length;c++)if(Kn(a[c])!=
|
|
599
|
+
b)return-1;return b+1}for(c=0;c<a.length;c++)if(typeof a[c]!=="number")return-1;return a.length%2==0?1:-1},Ln=function(a){if(typeof a[0]!=="number"||a.length==2)return a;if(a.length%2!=0)throw Error("Invalid number of coordinates: "+a.length);for(var b=[],c=0;c<a.length;c+=2)b.push([a[c],a[c+1]]);return b},zn=function(a,b,c,d){a=Mn(a,d);if(Dn(a.coordinates)||a.crs!=null||a.maxError!=null)return(new P("GeometryConstructors."+b)).apply(a);a.type=b;a.coordinates=Nn(c,a.coordinates);(b=bc(["Polygon",
|
|
600
|
+
"Rectangle","MultiPolygon"],b))&&a.evenOdd==null&&(a.evenOdd=!0);if(b&&a.geodesic===!1&&a.evenOdd===!1)throw Error("Planar interiors must be even/odd.");return a},Mn=function(a,b){if($b(b,Um))return{coordinates:ec(b)};a=R(a,b);a.coordinates=a.coords;delete a.coords;a.crs=a.proj;delete a.proj;return Xa(a,function(c){return c!=null})},Dn=function(a){return Array.isArray(a)?Zb(a,Dn):a instanceof O},Nn=function(a,b){if(a<1||a>4)throw Error("Unexpected nesting level.");$b(b,function(e){return typeof e===
|
|
601
|
+
"number"})&&(b=Ln(b));for(var c=b,d=0;Array.isArray(c);)c=c[0],d++;for(;d<a;)b=[b],d++;if(Kn(b)!=a)throw Error("Invalid geometry");for(c=b;Array.isArray(c)&&c.length==1;)c=c[0];return Array.isArray(c)&&c.length==0?[]:b},yn=function(a,b){var c=function(){};c.prototype=a.prototype;c=new c;a=a.apply(c,b);return a!==void 0?a:c};T.prototype.name=function(){return"Geometry"};var U=function(a){if(!(this instanceof U))return Qm(U,arguments);if(a instanceof U)return a;On();if(Array.isArray(a)){if(a.length==0)throw Error("Empty list specified for ee.Filter().");if(a.length==1)return new U(a[0]);O.call(this,new P("Filter.and"),{filters:a})}else if(a instanceof O)O.call(this,a.I,a.args,a.U);else if(a===void 0)O.call(this,null,null);else throw Error("Invalid argument specified for ee.Filter(): "+a);};y(U,O);x("ee.Filter",U);
|
|
602
|
+
var Pn=!1,On=function(){Pn||(ln(U,"Filter","Filter"),Pn=!0)},Qn={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};U.prototype.rc=function(){return Q("Filter.not",this)};U.prototype.not=U.prototype.rc;var Rn=function(a,b){var c=R(Rn,arguments);return Q("Filter.equals",c.name,c.value)};U.eq=Rn;var Sn=function(a,b){var c=R(Sn,arguments);return Rn(c.name,c.value).rc()};U.neq=Sn;
|
|
603
|
+
var Tn=function(a,b){var c=R(Tn,arguments);return Q("Filter.lessThan",c.name,c.value)};U.lt=Tn;var Un=function(a,b){var c=R(Un,arguments);return Tn(c.name,c.value).rc()};U.gte=Un;var Vn=function(a,b){var c=R(Vn,arguments);return Q("Filter.greaterThan",c.name,c.value)};U.gt=Vn;var Wn=function(a,b){var c=R(Wn,arguments);return Vn(c.name,c.value).rc()};U.lte=Wn;var Xn=function(a){return Q("Filter.and",Array.prototype.slice.call(arguments))};U.and=Xn;var Yn=function(a){return Q("Filter.or",Array.prototype.slice.call(arguments))};
|
|
604
|
+
U.or=Yn;var Zn=function(a,b){var c=R(Zn,arguments);c=Q("DateRange",c.start,c.end);return dn("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};U.date=Zn;var $n=function(a,b,c,d){var e=R($n,arguments);return dn("Filter.listContains",{leftField:e.rightField,rightValue:e.leftValue,rightField:e.leftField,leftValue:e.rightValue})};U.inList=$n;var ao=function(a,b){return dn("Filter.intersects",{leftField:".all",rightValue:Q("Feature",a),maxError:b})};U.bounds=ao;
|
|
605
|
+
U.prototype.name=function(){return"Filter"};var bo=function(a,b,c){b=b.toLowerCase();var d=!1;b.lastIndexOf("not_",0)==0&&(d=!0,b=b.substring(4));if(!(b in Qn))throw Error("Unknown filtering operator: "+b);a=Q("Filter."+Qn[b],a,c);return d?a.rc():a};U.metadata=bo;var V=function(a,b,c){S.call(this,a,b,c);co()};y(V,S);x("ee.Collection",V);var eo=!1,co=function(){eo||(ln(V,"Collection","Collection"),ln(V,"AggregateFeatureCollection","Collection","aggregate_"),eo=!0)};V.prototype.filter=function(a){a=R(V.prototype.filter,arguments).filter;if(!a)throw Error("Empty filters.");return Rm(this,Q("Collection.filter",this,a))};V.prototype.filter=V.prototype.filter;
|
|
606
|
+
V.prototype.mf=function(a,b,c){var d=R(V.prototype.mf,arguments);return this.filter(bo(d.name,d.operator,d.value))};V.prototype.filterMetadata=V.prototype.mf;V.prototype.vh=function(a){return this.filter(ao(a))};V.prototype.filterBounds=V.prototype.vh;V.prototype.lf=function(a,b){var c=R(V.prototype.lf,arguments);return this.filter(Zn(c.start,c.end))};V.prototype.filterDate=V.prototype.lf;
|
|
607
|
+
V.prototype.limit=function(a,b,c){var d=R(V.prototype.limit,arguments);return Rm(this,Q("Collection.limit",this,d.max,d.property,d.ascending))};V.prototype.limit=V.prototype.limit;V.prototype.sort=function(a,b){var c=R(V.prototype.sort,arguments);return Rm(this,Q("Collection.limit",this,void 0,c.property,c.ascending))};V.prototype.sort=V.prototype.sort;V.prototype.name=function(){return"Collection"};V.prototype.elementType=function(){return S};
|
|
608
|
+
V.prototype.map=function(a,b){var c=this.elementType();return Rm(this,Q("Collection.map",this,function(d){return a(new c(d))},b))};V.prototype.map=V.prototype.map;V.prototype.Kh=function(a,b){b=b!==void 0?b:null;var c=this.elementType();return Q("Collection.iterate",this,function(d,e){return a(new c(d),e)},b)};V.prototype.iterate=V.prototype.Kh;var W=function(a,b){if(!(this instanceof W))return Qm(W,arguments);if(a instanceof W){if(b)throw Error("Can't create Feature out of a Feature and properties.");return a}if(arguments.length>2)throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");fo();if(a instanceof T||a===null)S.call(this,new P("Feature"),{geometry:a,metadata:b||null});else if(a instanceof O)S.call(this,a.I,a.args,a.U);else if(a.type=="Feature"){var c=a.properties||{};if("id"in a){if("system:index"in
|
|
609
|
+
c)throw Error('Can\'t specify both "id" and "system:index".');c=gb(c);c["system:index"]=a.id}S.call(this,new P("Feature"),{geometry:new T(a.geometry),metadata:c})}else S.call(this,new P("Feature"),{geometry:new T(a),metadata:b||null})};y(W,S);x("ee.Feature",W);var go=!1,fo=function(){go||(ln(W,"Feature","Feature"),go=!0)};W.prototype.V=function(a){return W.L.V.call(this,a)};W.prototype.getInfo=W.prototype.V;
|
|
610
|
+
W.prototype.S=function(a,b){var c=R(W.prototype.getMap,arguments);return Q("Collection",[this]).S(c.visParams,c.callback)};W.prototype.getMapId=W.prototype.S;W.prototype.getMap=W.prototype.S;W.prototype.getMap=W.prototype.getMap;W.prototype.name=function(){return"Feature"};var om=function(a){var b={},c=ho(a.element,a);c=io(c,a,b);b.element=c;return b},pm=function(a){var b={},c=a.element.map(function(d){d=ho(d,a);return io(d,a,b)});b.element=c;return b},io=function(a,b,c){var d={},e=!1,g=["maxDimension","width","height","scale"];Wa(b,function(f,l){if(f!=null)switch(l){case "dimensions":l=typeof f==="string"?f.split("x").map(Number):Array.isArray(f)?f:typeof f==="number"?[f]:[];if(l.length===1)d.maxDimension=l[0];else if(l.length===2)d.width=l[0],d.height=l[1];else throw Error("Invalid dimensions "+
|
|
611
|
+
f);break;case "dimensions_consumed":e=!0;break;case "bbox":d.geometry!=null&&console.warn("Multiple request parameters converted to region.");if(!(f instanceof Bn)){l=f;if(typeof f==="string")try{l=JSON.parse(f)}catch(m){l=f.split(/\s*,\s*/).map(Number)}if(Array.isArray(l)){if(l.some(isNaN))throw Error("Invalid bbox `{bboxArray}`, please specify a list of numbers.");f=new Bn(l,null,!1)}else throw Error('Invalid bbox "{bbox}" type, must be of type Array<number>');}d.geometry=f;break;case "region":d.geometry!=
|
|
612
|
+
null&&console.warn("Multiple request parameters converted to region.");if(!(f instanceof T)){l=f;if(typeof f==="string")try{l=JSON.parse(f)}catch(m){throw Error('Region string "'+f+'" is not valid GeoJSON.');}if(Array.isArray(l))f=new In(l,null,!1);else if(u(l))f=new T(l,null,!1);else throw Error("Region {region} was not convertible to an ee.Geometry.");}d.geometry=f;break;case "scale":d.scale=Number(f);break;default:c[l]=f}});eb(d)||(d.input=a,a=g.some(function(f){return f in d})||e?dn("Image.clipToBoundsAndScale",
|
|
613
|
+
d):dn("Image.clip",d));return a},ho=function(a,b){var c=b.crs||"",d=b.crsTransform||b.crs_transform;d!=null&&(d=jo(d));if(!c&&!d)return a;if(d&&!c)throw Error('Must specify "crs" if "crsTransform" is specified.');if(d){if(a=dn("Image.reproject",{image:a,crs:c,crsTransform:d}),b.dimensions!=null&&b.scale==null&&b.region==null){var e=b.dimensions;typeof e==="string"&&(e=e.split("x").map(Number));e.length===2&&(delete b.dimensions,b.dimensions_consumed=!0,c=(new P("Projection")).call(c,d),b.region=new Bn([0,
|
|
614
|
+
0,e[0],e[1]],c,!1))}}else a=dn("Image.setDefaultProjection",{image:a,crs:c,crsTransform:[1,0,0,0,-1,0]});return a},jo=function(a){if(typeof a==="string")try{a=JSON.parse(a)}catch(b){}if(Array.isArray(a)){if(a.length===6&&$b(a,function(b){return typeof b==="number"}))return a;throw Error("Invalid argument, crs transform must be a list of 6 numbers.");}throw Error("Invalid argument, crs transform was not a string or array.");},lo=function(a,b){var c={};b=ko(b,c);eb(b)||(b.image=a,a=dn("Image.visualize",
|
|
615
|
+
b));c.image=a;return c},ko=function(a,b){var c="bands gain bias min max gamma palette opacity forceRgbOutput".split(" "),d={};Wa(a,function(e,g){bc(c,g)?d[g]=e:b[g]=e});return d},Sl=function(a,b){b=Object.assign({},b);var c=function(e){var g={};["crs","crs_transform","dimensions","region"].forEach(function(f){f in e&&(g[f]=e[f])});e.scale!=null&&e.dimensions==null&&(g.scale=e.scale);return g},d=function(e){var g=e.id;if(g===void 0)throw Error("Each band dictionary must have an id.");g=a.select(g);
|
|
616
|
+
var f=c(b);e=c(e);e=c(Object.assign(f,e));g=ho(g,e);return g=io(g,e,{})};b.format==="ZIPPED_GEO_TIFF_PER_BAND"&&b.bands&&b.bands.length?(d=b.bands.map(d),a=d.reduce(function(e,g){return Q("Image.addBands",e,g,null,!0)},d.shift())):(d=c(b),a=ho(a,d),a=io(a,d,{}));return a};var N=function(a){if(!(this instanceof N))return Qm(N,arguments);if(a instanceof N)return a;mo();var b=arguments.length;if(b==0||b==1&&a===void 0)S.call(this,new P("Image.mask"),{image:new N(0),mask:new N(0)});else if(b==1)if(Um(a))S.call(this,new P("Image.constant"),{value:a});else if(Vm(a))S.call(this,new P("Image.load"),{id:a});else{if(Array.isArray(a))return no(Yb(a,function(d){return new N(d)}));if(a instanceof O)a.name()=="Array"?S.call(this,new P("Image.constant"),{value:a}):S.call(this,a.I,
|
|
617
|
+
a.args,a.U);else throw Error("Unrecognized argument type to convert to an Image: "+a);}else if(b==2){b=arguments[0];var c=arguments[1];if(Vm(b)&&Um(c))S.call(this,new P("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)");};y(N,S);x("ee.Image",N);var oo=!1,mo=function(){oo||(ln(N,"Image","Image"),oo=!0)};N.prototype.V=function(a){return N.L.V.call(this,a)};
|
|
618
|
+
N.prototype.getInfo=N.prototype.V;N.prototype.S=function(a,b){var c=this,d=R(N.prototype.getMap,arguments),e=lo(this,d.visParams);if(d.callback){var g=d.callback;Jl(e,function(f,l){f=f?Object.assign(f,{image:c}):void 0;g(f,l)})}else return d=Jl(e),d.image=this,d};N.prototype.getMapId=N.prototype.S;N.prototype.getMap=N.prototype.S;N.prototype.getMap=N.prototype.getMap;
|
|
619
|
+
N.prototype.rb=function(a,b){var c=R(N.prototype.rb,arguments),d=c.params?gb(c.params):{};d.image=this;if(c.callback){var e=c.callback;Tl(d,function(g,f){g?e(Ul(g)):e(null,f)})}else return Ul(Tl(d))};N.prototype.getDownloadURL=N.prototype.rb;N.prototype.Kd=function(a,b){var c=R(N.prototype.rb,arguments),d=c.params?gb(c.params):{},e={},g=ho(this,d);g=io(g,d,e);d=lo(g,e);return c.callback?(Ol(d,c.callback),null):Ol(d)};N.prototype.getThumbId=N.prototype.Kd;
|
|
620
|
+
N.prototype.vf=function(a,b){var c=R(N.prototype.vf,arguments);if(c.callback)this.Kd(c.params,function(d,e){var g="";if(e===void 0)try{g=Rl(d)}catch(f){e=String(f.message)}c.callback(g,e)});else return Rl(this.Kd(c.params))};N.prototype.getThumbURL=N.prototype.vf;var po=function(a,b,c){var d=R(po,arguments);return no([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};N.rgb=po;var qo=function(a){return no(Array.prototype.slice.call(arguments),null)};N.cat=qo;
|
|
621
|
+
var no=function(a,b){if(a.length==0)return Q("Image.constant",[]);for(var c=new N(a[0]),d=1;d<a.length;d++)c=Q("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
622
|
+
N.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(b.length>2||Vm(b[0])||Um(b[0])){for(var d=0;d<b.length;d++)if(!(Vm(b[d])||Um(b[d])||b[d]instanceof O))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return dn("Image.select",c)};N.prototype.select=N.prototype.select;
|
|
623
|
+
N.prototype.l=function(a,b){var c=R(N.prototype.l,arguments),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(c.map){var g=c.map,f;for(f in g)d.push(f),e[f]=new N(g[f])}var l=Q("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d);c=new Ym;c.encode=function(m){return l.encode(m)};c.Ed=function(m,p){return fk(hl(m,l),p)};c.Z=function(){return{name:"",args:Yb(d,function(m){return{name:m,type:"Image",optional:!1}},this),returns:"Image"}};return c.apply(e)};
|
|
624
|
+
N.prototype.expression=N.prototype.l;N.prototype.clip=function(a){try{a=new T(a)}catch(b){}return Q("Image.clip",this,a)};N.prototype.clip=N.prototype.clip;N.prototype.pi=function(a){var b=arguments.length!=1||Vm(arguments[0])?Array.from(arguments):arguments[0];return Q("Image.rename",this,b)};N.prototype.rename=N.prototype.pi;N.prototype.name=function(){return"Image"};var ro=function(a){if(this instanceof ro){if(arguments.length>1)throw Error("ee.List() only accepts 1 argument.");if(a instanceof ro)return a}else return Qm(ro,arguments);so();if(Array.isArray(a))O.call(this,null,null),this.Tc=a;else if(a instanceof O)O.call(this,a.I,a.args,a.U),this.Tc=null;else throw Error("Invalid argument specified for ee.List(): "+a);};y(ro,O);x("ee.List",ro);var to=!1,so=function(){to||(ln(ro,"List","List"),to=!0)};
|
|
625
|
+
ro.prototype.encode=function(a){return Array.isArray(this.Tc)?Yb(this.Tc,function(b){return a(b)}):ro.L.encode.call(this,a)};ro.prototype.na=function(a){return Array.isArray(this.Tc)?bk(hl(a,this.Tc)):ro.L.na.call(this,a)};ro.prototype.name=function(){return"List"};var X=function(a,b){if(!(this instanceof X))return Qm(X,arguments);if(a instanceof X)return a;if(arguments.length>2)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");uo();a instanceof T&&(a=new W(a));a instanceof W&&(a=[a]);if(Vm(a)){var c={tableId:a};b&&(c.geometryColumn=b);V.call(this,new P("Collection.loadTable"),c)}else if(Array.isArray(a))V.call(this,new P("Collection"),{features:Yb(a,function(d){return new W(d)})});else if(a instanceof ro)V.call(this,
|
|
626
|
+
new P("Collection"),{features:a});else if(a&&typeof a==="object"&&a.type==="FeatureCollection")V.call(this,new P("Collection"),{features:a.features.map(function(d){return new W(d)})});else if(a instanceof O)V.call(this,a.I,a.args,a.U);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};y(X,V);x("ee.FeatureCollection",X);var vo=!1,uo=function(){vo||(ln(X,"FeatureCollection","FeatureCollection"),vo=!0)};
|
|
627
|
+
X.prototype.S=function(a,b){var c=R(X.prototype.S,arguments),d=dn("Collection.draw",{collection:this,color:(c.visParams||{}).color||"000000"});if(c.callback)d.S(void 0,c.callback);else return d.S()};X.prototype.getMapId=X.prototype.S;X.prototype.getMap=X.prototype.S;X.prototype.getMap=X.prototype.getMap;X.prototype.V=function(a){return X.L.V.call(this,a)};X.prototype.getInfo=X.prototype.V;
|
|
628
|
+
X.prototype.rb=function(a,b,c,d){var e=R(X.prototype.rb,arguments),g={table:this};e.format&&(g.format=e.format.toUpperCase());e.filename&&(g.filename=e.filename);e.selectors&&(g.selectors=e.selectors);if(e.callback)Vl(g,function(f,l){f?e.callback(Wl(f)):e.callback(null,l)});else return Wl(Vl(g))};X.prototype.getDownloadURL=X.prototype.rb;
|
|
629
|
+
X.prototype.select=function(a,b,c){if(Vm(a)){var d=Array.prototype.slice.call(arguments);return this.map(function(g){return g.select(d)})}var e=R(X.prototype.select,arguments);return this.map(function(g){return g.select(e)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"FeatureCollection"};X.prototype.elementType=function(){return W};var Y=function(a){if(!(this instanceof Y))return Qm(Y,arguments);if(a instanceof Y)return a;if(arguments.length!=1)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");wo();a instanceof N&&(a=[a]);if(Vm(a))V.call(this,new P("ImageCollection.load"),{id:a});else if(Array.isArray(a))V.call(this,new P("ImageCollection.fromImages"),{images:Yb(a,function(b){return new N(b)})});else if(a instanceof ro)V.call(this,new P("ImageCollection.fromImages"),{images:a});
|
|
630
|
+
else if(a instanceof O)V.call(this,a.I,a.args,a.U);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};y(Y,V);x("ee.ImageCollection",Y);var xo=!1,wo=function(){xo||(ln(Y,"ImageCollection","ImageCollection"),ln(Y,"reduce","ImageCollection"),xo=!0)};Y.prototype.tf=function(a,b){var c=R(Y.prototype.tf,arguments);return yo(this,c,["png","jpg","jpeg"],"filmstrip")};Y.prototype.getFilmstripThumbURL=Y.prototype.tf;
|
|
631
|
+
Y.prototype.wf=function(a,b){var c=R(Y.prototype.wf,arguments);return yo(this,c,["gif"],"video")};Y.prototype.getVideoThumbURL=Y.prototype.wf;
|
|
632
|
+
var yo=function(a,b,c,d){var e={};a=a.map(function(l){l=ho(l,b.params);return io(l,b.params,e)});var g={},f=ko(e,g);g.imageCollection=a.map(function(l){f.image=l;return dn("Image.visualize",f)});b.params.dimensions!=null&&(g.dimensions=b.params.dimensions);if(g.format){if(!Zb(c,function(l){return l.toLowerCase()==g.format.toLowerCase()}))throw Error("Invalid format specified.");}else g.format=c[0];c=Ol;switch(d){case "video":c=Pl;break;case "filmstrip":c=Ql}if(b.callback)c(g,function(l,m){var p="";
|
|
633
|
+
if(m===void 0)try{p=Rl(l)}catch(v){m=String(v.message)}b.callback(p,m)});else return Rl(c(g))};Y.prototype.S=function(a,b){var c=R(Y.prototype.S,arguments),d=Q("ImageCollection.mosaic",this);if(c.callback)d.S(c.visParams,c.callback);else return d.S(c.visParams)};Y.prototype.getMapId=Y.prototype.S;Y.prototype.getMap=Y.prototype.S;Y.prototype.getMap=Y.prototype.getMap;Y.prototype.V=function(a){return Y.L.V.call(this,a)};Y.prototype.getInfo=Y.prototype.V;
|
|
634
634
|
Y.prototype.select=function(a,b){var c=arguments;return this.map(function(d){return d.select.apply(d,c)})};Y.prototype.select=Y.prototype.select;Y.prototype.Ff=function(a,b,c,d){var e=R(Y.prototype.Ff,arguments);return this.map(function(g){return Q("Image.linkCollection",g,e.imageCollection,e.linkedBands,e.linkedProperties,e.matchPropertyName)})};Y.prototype.linkCollection=Y.prototype.Ff;Y.prototype.first=function(){return new N(Q("Collection.first",this))};Y.prototype.first=Y.prototype.first;
|
|
635
|
-
Y.prototype.name=function(){return"ImageCollection"};Y.prototype.elementType=function(){return N};var
|
|
636
|
-
|
|
637
|
-
var
|
|
638
|
-
x("module$contents$ee$batch_Export.table.toCloudStorage",
|
|
639
|
-
x("module$contents$ee$batch_Export.table.toFeatureView",
|
|
640
|
-
var
|
|
641
|
-
x("module$contents$ee$batch_Export.classifier.toAsset",
|
|
642
|
-
var
|
|
643
|
-
null&&(e.fileFormat="GeoTIFF");a=e.fileFormat;a==null&&(a="GEO_TIFF");a=a.toUpperCase();switch(a){case "TIFF":case "TIF":case "GEO_TIFF":case "GEOTIFF":a="GEO_TIFF";break;case "TF_RECORD":case "TF_RECORD_IMAGE":case "TFRECORD":a="TF_RECORD_IMAGE";break;default:throw Error("Invalid file format "+a+". Supported formats are: 'GEOTIFF', 'TFRECORD'.");}e.fileFormat=a;e.formatOptions!=null&&(a=
|
|
644
|
-
delete e.crsTransform);break;case "EXPORT_TILES":b=
|
|
645
|
-
(a="CSV");a=a.toUpperCase();switch(a){case "CSV":a="CSV";break;case "JSON":case "GEOJSON":case "GEO_JSON":a="GEO_JSON";break;case "KML":a="KML";break;case "KMZ":a="KMZ";break;case "SHP":a="SHP";break;case "TF_RECORD":case "TF_RECORD_TABLE":case "TFRECORD":a="TF_RECORD_TABLE";break;default:throw Error("Invalid file format "+a+". Supported formats are: 'CSV', 'GeoJSON', 'KML', 'KMZ', 'SHP', and 'TFRecord'.");}e.fileFormat=a;e=
|
|
646
|
-
(e.crs_transform=e.crsTransform,delete e.crsTransform);break;case "EXPORT_VIDEO_MAP":e=
|
|
647
|
-
}if(!(u(b)&&"type"in b))try{new
|
|
648
|
-
a.assetId||"";break;case "FEATURE_VIEW":a.mapName=a.mapName||"";break;case "BIGQUERY":a.table=a.table||"";break;default:b=wa(a.folder);if(!bc(["string","undefined"],b))throw Error('Error: toDrive "folder" parameter must be a string, but is of type '+b+".");a.driveFolder=a.folder||"";a.driveFileNamePrefix=a.fileNamePrefix||"";delete a.folder;delete a.fileNamePrefix}return a},
|
|
649
|
-
|
|
650
|
-
if(Object.keys(a).some(function(m){return c!==null&&m in c}))throw Error("Parameter specified at least twice: once in config, and once in config format options.");a=
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
var
|
|
656
|
-
"Number":c==String?"String":c==Array?"Array":c==Date?"Date":"Object"}})};return new
|
|
657
|
-
d.length;e++){var g=d[e],f=c+e;b[g].U=f;a.args[g].name=f}return a};var
|
|
658
|
-
a);O.call(this,d,e,g)};y(
|
|
659
|
-
var
|
|
660
|
-
a);return new
|
|
661
|
-
case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}},
|
|
662
|
-
e)};return new O(new c,b)}throw Error("Invalid function value");},
|
|
663
|
-
var
|
|
664
|
-
null?
|
|
665
|
-
|
|
666
|
-
var
|
|
667
|
-
x("ee.InitState.LOADING","loading");x("ee.InitState.READY","ready");var
|
|
668
|
-
var
|
|
669
|
-
|
|
670
|
-
g=e.length==1;if(g&&e[0]instanceof d)return e[0];if(!(this instanceof d))return
|
|
671
|
-
|
|
672
|
-
a:new X(a);case "ImageCollection":return new Y(a);case "Filter":return new U(a);case "Algorithm":if(typeof a==="string")return new P(a);if(typeof a==="function"){b=a.length;c=[];for(var d=0;d<b;d++)c[d]="Object";return
|
|
673
|
-
default:if(b in c){d=
|
|
674
|
-
var
|
|
675
|
-
x("ee.FloatTileOverlay",
|
|
676
|
-
var
|
|
677
|
-
|
|
678
|
-
var
|
|
679
|
-
h.mc=function(a){this.dispatchEvent(new
|
|
680
|
-
h.Lc=function(){return
|
|
681
|
-
h.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||a.y<0||a.y>=d)return c.createElement("div");var e=a.x%d;e<0&&(e+=d);d=new google.maps.Point(e,a.y);a=[a.x,a.y,b,this.xb++].join("-");e=this.sg.getUniqueId();a=[a,e].join("-");b=this.dh(d,b,c,a);b.tileSize=this.tileSize;
|
|
682
|
-
var
|
|
683
|
-
|
|
684
|
-
r(
|
|
685
|
-
var
|
|
686
|
-
!1);a.Ya.Uc("ready",Ea(md,a.Ya));a.Ca&&a.Ca.endsWith("&profiling=1")&&(a.Ca=a.Ca.replace("&profiling=1",""),a.Ya.headers.set("X-Earth-Engine-Computation-Profiling","1"));a.Ya.send(a.Ca,"GET")};h=
|
|
687
|
-
h.gd=function(a){var b=function(c){try{if(c=JSON.parse(c),c.error&&c.error.message)return c.error.message}catch(d){}return c};this.ti>=this.il?(this.Sk=b(a),
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
var
|
|
694
|
-
|
|
695
|
-
var
|
|
696
|
-
h.remove=function(a){var b=this.La;var c=Vb(b,a);c>=0?(dc(b,c),b=!0):b=!1;return b||cc(this.Qa,a)};h.aa=function(){for(var a=[],b=this.La.length-1;b>=0;--b)a.push(this.La[b]);var c=this.Qa.length;for(b=0;b<c;++b)a.push(this.Qa[b]);return a};var
|
|
697
|
-
var
|
|
698
|
-
h.contains=function(a){return this.Sa.contains(a)||this.ub.contains(a)};h.R=function(){return this.Sa.R()+this.ub.R()};h.isEmpty=function(){return this.Sa.isEmpty()&&this.ub.isEmpty()};h.J=function(){
|
|
635
|
+
Y.prototype.name=function(){return"ImageCollection"};Y.prototype.elementType=function(){return N};var zo=function(a){this.Ye=a;this.id=null},Bo=function(a){var b={element:Ao(a)};Object.assign(b,a);b=Xa(b,function(c){return c!=null});return new zo(b)};zo.prototype.start=function(a,b){var c=this;E(this.Ye,"Task config must be specified for tasks to be started.");this.id=this.id||Xl(1)[0];sb(this.id,"Failed to obtain task ID.");if(a)nm(this.id,this.Ye,function(e,g){if(g)b(g);else{var f;c.id=(f=e.taskId)!=null?f:null;a()}});else{var d;this.id=(d=nm(this.id,this.Ye).taskId)!=null?d:null}};
|
|
636
|
+
zo.prototype.start=zo.prototype.start;var Co=function(a,b,c,d,e,g,f,l,m,p,v,A){var C=R(Co,arguments);C=Do(C,"ASSET","EXPORT_IMAGE");return Bo(C)};x("module$contents$ee$batch_Export.image.toAsset",Co);var Eo=function(a,b,c,d,e,g,f,l,m,p,v,A,C,I,ea,Z){var da=R(Eo,arguments);da=Do(da,"GOOGLE_CLOUD_STORAGE","EXPORT_IMAGE");return Bo(da)};x("module$contents$ee$batch_Export.image.toCloudStorage",Eo);
|
|
637
|
+
var Fo=function(a,b,c,d,e,g,f,l,m,p,v,A,C,I,ea,Z){var da=R(Fo,arguments);da=Do(da,"DRIVE","EXPORT_IMAGE");return Bo(da)};x("module$contents$ee$batch_Export.image.toDrive",Fo);var Go=function(a,b,c,d,e,g,f,l,m,p,v,A,C,I){var ea=R(Go,arguments);ea=Do(ea,"GOOGLE_CLOUD_STORAGE","EXPORT_TILES");return Bo(ea)};x("module$contents$ee$batch_Export.map.toCloudStorage",Go);var Ho=function(a,b,c,d,e,g,f,l){var m=R(Ho,arguments);m=Do(m,"GOOGLE_CLOUD_STORAGE","EXPORT_FEATURES");return Bo(m)};
|
|
638
|
+
x("module$contents$ee$batch_Export.table.toCloudStorage",Ho);var Io=function(a,b,c,d,e,g,f,l){var m=R(Io,arguments);m.type="EXPORT_FEATURES";m=Do(m,"DRIVE","EXPORT_FEATURES");return Bo(m)};x("module$contents$ee$batch_Export.table.toDrive",Io);var Jo=function(a,b,c,d,e){var g=R(Jo,arguments);g=Do(g,"ASSET","EXPORT_FEATURES");return Bo(g)};x("module$contents$ee$batch_Export.table.toAsset",Jo);var Ko=function(a,b,c,d,e,g,f,l){var m=R(Ko,arguments);m=Do(m,"FEATURE_VIEW","EXPORT_FEATURES");return Bo(m)};
|
|
639
|
+
x("module$contents$ee$batch_Export.table.toFeatureView",Ko);var Lo=function(a,b,c,d,e,g,f,l){var m=R(Lo,arguments);m=Do(m,"BIGQUERY","EXPORT_FEATURES");return Bo(m)};x("module$contents$ee$batch_Export.table.toBigQuery",Lo);var Mo=function(a,b,c,d,e,g,f,l,m,p,v,A,C){var I=R(Mo,arguments);I=Do(I,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO");return Bo(I)};x("module$contents$ee$batch_Export.video.toCloudStorage",Mo);
|
|
640
|
+
var No=function(a,b,c,d,e,g,f,l,m,p,v,A,C){var I=R(No,arguments);I=Do(I,"DRIVE","EXPORT_VIDEO");return Bo(I)};x("module$contents$ee$batch_Export.video.toDrive",No);var Oo=function(a,b,c,d,e,g,f,l,m,p,v,A,C,I,ea,Z,da,Jb,Nq,Oq,Pq){var rj=R(Oo,arguments);rj=Do(rj,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO_MAP");return Bo(rj)};x("module$contents$ee$batch_Export.videoMap.toCloudStorage",Oo);var Po=function(a,b,c,d){var e=R(Po,arguments);e=Do(e,"ASSET","EXPORT_CLASSIFIER");return Bo(e)};
|
|
641
|
+
x("module$contents$ee$batch_Export.classifier.toAsset",Po);
|
|
642
|
+
var Ao=function(a){var b=function(d){return d in a},c=Qo.find(b);E(ac(Qo,b)===1,'Expected a single "image", "collection" or "classifier" key.');b=a[c];if(!(b instanceof N||b instanceof X||b instanceof Y||b instanceof S||b instanceof O))throw Error("Unknown element type provided: "+typeof b+". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection, ee.Element or ee.ComputedObject.");delete a[c];return b},Do=function(a,b,c){var d=d===void 0?!0:d;var e={type:c};Object.assign(e,a);switch(c){case "EXPORT_IMAGE":e.fileFormat==
|
|
643
|
+
null&&(e.fileFormat="GeoTIFF");a=e.fileFormat;a==null&&(a="GEO_TIFF");a=a.toUpperCase();switch(a){case "TIFF":case "TIF":case "GEO_TIFF":case "GEOTIFF":a="GEO_TIFF";break;case "TF_RECORD":case "TF_RECORD_IMAGE":case "TFRECORD":a="TF_RECORD_IMAGE";break;default:throw Error("Invalid file format "+a+". Supported formats are: 'GEOTIFF', 'TFRECORD'.");}e.fileFormat=a;e.formatOptions!=null&&(a=Ro(e,a),delete e.formatOptions,Object.assign(e,a));e=So(e,b);e.crsTransform!=null&&(e.crs_transform=e.crsTransform,
|
|
644
|
+
delete e.crsTransform);break;case "EXPORT_TILES":b=So(e,b);e=b.fileFormat;e==null&&(e="AUTO_JPEG_PNG");e=e.toUpperCase();switch(e){case "AUTO":case "AUTO_JPEG_PNG":case "AUTO_JPG_PNG":e="AUTO_JPEG_PNG";break;case "JPG":case "JPEG":e="JPEG";break;case "PNG":e="PNG";break;default:throw Error("Invalid file format "+e+". Supported formats are: 'AUTO', 'PNG', and 'JPEG'.");}b.fileFormat=e;e=b;break;case "EXPORT_FEATURES":Array.isArray(e.selectors)&&(e.selectors=e.selectors.join());a=e.fileFormat;a==null&&
|
|
645
|
+
(a="CSV");a=a.toUpperCase();switch(a){case "CSV":a="CSV";break;case "JSON":case "GEOJSON":case "GEO_JSON":a="GEO_JSON";break;case "KML":a="KML";break;case "KMZ":a="KMZ";break;case "SHP":a="SHP";break;case "TF_RECORD":case "TF_RECORD_TABLE":case "TFRECORD":a="TF_RECORD_TABLE";break;default:throw Error("Invalid file format "+a+". Supported formats are: 'CSV', 'GeoJSON', 'KML', 'KMZ', 'SHP', and 'TFRecord'.");}e.fileFormat=a;e=So(e,b);break;case "EXPORT_VIDEO":e=To(e);e=So(e,b);e.crsTransform!=null&&
|
|
646
|
+
(e.crs_transform=e.crsTransform,delete e.crsTransform);break;case "EXPORT_VIDEO_MAP":e=To(e);e.version=e.version||"V1";e.stride=e.stride||1;e.tileDimensions={width:e.tileWidth||256,height:e.tileHeight||256};e=So(e,b);break;case "EXPORT_CLASSIFIER":e=So(e,b);break;default:throw Error("Unknown export type: "+e.type);}if(d&&e.region!=null){d=e;b=e.region;if(b instanceof T)b=b.oe();else if(typeof b==="string")try{b=ub(JSON.parse(b))}catch(g){throw Error("Invalid format for region property. Region must be GeoJSON LinearRing or Polygon specified as actual coordinates or serialized as a string. See Export documentation.");
|
|
647
|
+
}if(!(u(b)&&"type"in b))try{new Fn(b)}catch(g){try{new In(b)}catch(f){throw Error("Invalid format for region property. Region must be GeoJSON LinearRing or Polygon specified as actual coordinates or serialized as a string. See Export documentation.");}}b=JSON.stringify(b);d.region=b}return e},So=function(a,b){switch(b){case "GOOGLE_CLOUD_STORAGE":a.outputBucket=a.bucket||"";a.outputPrefix=a.fileNamePrefix||a.path||"";delete a.fileNamePrefix;delete a.path;delete a.bucket;break;case "ASSET":a.assetId=
|
|
648
|
+
a.assetId||"";break;case "FEATURE_VIEW":a.mapName=a.mapName||"";break;case "BIGQUERY":a.table=a.table||"";break;default:b=wa(a.folder);if(!bc(["string","undefined"],b))throw Error('Error: toDrive "folder" parameter must be a string, but is of type '+b+".");a.driveFolder=a.folder||"";a.driveFileNamePrefix=a.fileNamePrefix||"";delete a.folder;delete a.fileNamePrefix}return a},Uo={GEO_TIFF:["cloudOptimized","fileDimensions","noData","shardSize"],TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")},
|
|
649
|
+
Vo={GEO_TIFF:"tiff",TF_RECORD_IMAGE:"tfrecord"},To=function(a){a.videoOptions=a.framesPerSecond||5;a.maxFrames=a.maxFrames||1E3;a.maxPixels=a.maxPixels||1E8;var b=a.fileFormat;b==null&&(b="MP4");b=b.toUpperCase();switch(b){case "MP4":b="MP4";break;case "GIF":case "JIF":b="GIF";break;case "VP9":case "WEBM":b="VP9";break;default:throw Error("Invalid file format "+b+". Supported formats are: 'MP4', 'GIF', and 'WEBM'.");}a.fileFormat=b;return a},Ro=function(a,b){var c=a.formatOptions;if(c==null)return{};
|
|
650
|
+
if(Object.keys(a).some(function(m){return c!==null&&m in c}))throw Error("Parameter specified at least twice: once in config, and once in config format options.");a=Vo[b];for(var d=Uo[b],e={},g=q(Object.entries(c)),f=g.next();!f.done;f=g.next()){var l=q(f.value);f=l.next().value;l=l.next().value;if(!bc(d,f))throw Error('"'+f+'" is not a valid option, the image format "'+b+'""may have the following options: '+(d.join(", ")+'".'));e[a+f[0].toUpperCase()+f.substring(1)]=Array.isArray(l)?l.join():l}return e},
|
|
651
|
+
Qo=["image","collection","classifier"];var Wo=function(a){if(!(this instanceof Wo))return Qm(Wo,arguments);if(a instanceof Wo)return a;Xo();if(typeof a==="number")O.call(this,null,null),this.Wc=a;else if(a instanceof O)O.call(this,a.I,a.args,a.U),this.Wc=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};y(Wo,O);x("ee.Number",Wo);var Yo=!1,Xo=function(){Yo||(ln(Wo,"Number","Number"),Yo=!0)};Wo.prototype.encode=function(a){return typeof this.Wc==="number"?this.Wc:Wo.L.encode.call(this,a)};
|
|
652
|
+
Wo.prototype.na=function(a){return typeof this.Wc==="number"?bk(hl(a,this.Wc)):Wo.L.na.call(this,a)};Wo.prototype.name=function(){return"Number"};var Zo=function(a){if(!(this instanceof Zo))return Qm(Zo,arguments);if(a instanceof Zo)return a;$o();if(typeof a==="string")O.call(this,null,null),this.jd=a;else if(a instanceof O)this.jd=null,a.I&&a.I.Z().returns=="String"?O.call(this,a.I,a.args,a.U):O.call(this,new P("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};y(Zo,O);x("ee.String",Zo);var ap=!1,$o=function(){ap||(ln(Zo,"String","String"),ap=!0)};
|
|
653
|
+
Zo.prototype.encode=function(a){return typeof this.jd==="string"?this.jd:Zo.L.encode.call(this,a)};Zo.prototype.na=function(a){return typeof this.jd==="string"?bk(hl(a,this.jd)):Zo.L.na.call(this,a)};Zo.prototype.name=function(){return"String"};var bp=function(a,b){if(!(this instanceof bp))return Qm(bp,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var g=d[e],f=g.type;c.push(cp(f in Sm?Sm[f]:null,g.name))}if(b.apply(null,c)===void 0)throw Error("User-defined methods must return a value.");this.wb=dp(a,c,b);this.Pg=b.apply(null,c)};y(bp,Ym);x("ee.CustomFunction",bp);bp.prototype.encode=function(a){return{type:"Function",argumentNames:Yb(this.wb.args,function(b){return b.name}),body:a(this.Pg)}};
|
|
654
|
+
bp.prototype.na=function(a){return gk(this.wb.args.map(function(b){return b.name}),hl(a,this.Pg))};bp.prototype.Ed=function(a,b){return fk(hl(a,this),b)};bp.prototype.Z=function(){return this.wb};
|
|
655
|
+
var cp=function(a,b){a=a||Object;if(!(a.prototype instanceof O))if(a&&a!=Object)if(a==String)a=Zo;else if(a==Number)a=Wo;else if(a==Array)a=t.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=O;var c=function(d){this.args=this.I=null;this.U=d};c.prototype=a.prototype;return new c(b)},ep=function(a,b){b={name:"",returns:"Object",args:Yb(b,function(c){return{name:null,type:typeof c==="string"?c:c.prototype instanceof O?c.prototype.name.call(null):c==Number?
|
|
656
|
+
"Number":c==String?"String":c==Array?"Array":c==Date?"Date":"Object"}})};return new bp(b,a)},dp=function(a,b,c){for(var d=[],e=0;e<b.length;e++)b[e].U===null&&d.push(e);if(d.length===0)return a;c="_MAPPING_VAR_"+function(l){var m=function(v){return v.map(p).reduce(function(A,C){return A+C},0)},p=function(v){return v.Ta?1:v.Fa?m(v.Fa.values):v.Ga?m(Object.values(v.Ga.values)):v.ya?m(Object.values(v.ya.arguments)):0};return m(Object.values(l.values))}($k(c.apply(null,b),"<unbound>"))+"_";for(e=0;e<
|
|
657
|
+
d.length;e++){var g=d[e],f=c+e;b[g].U=f;a.args[g].name=f}return a};var fp=function(a,b){if(!(this instanceof fp))return Qm(fp,arguments);if(a instanceof fp)return a;gp();var c=R(fp,arguments);a=c.date;c=c.tz;var d=new P("Date"),e={},g=null;if(Vm(a)){if(e.value=a,c)if(Vm(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(Um(a))e.value=a;else if(ya(a))e.value=Math.floor(a.getTime());else if(a instanceof O)a.I&&a.I.Z().returns=="Date"?(d=a.I,e=a.args,g=a.U):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
658
|
+
a);O.call(this,d,e,g)};y(fp,O);x("ee.Date",fp);var hp=!1,gp=function(){hp||(ln(fp,"Date","Date"),hp=!0)};fp.prototype.name=function(){return"Date"};x("ee.Deserializer",function(){});var jp=function(a){return ip(JSON.parse(a))};x("ee.Deserializer.fromJSON",jp);var ip=function(a){if("result"in a&&"values"in a)return kp(a);var b={};if(u(a)&&a.type==="CompoundValue"){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],g=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=lp(g,b)}a=a.value}return lp(a,b)};x("ee.Deserializer.decode",ip);
|
|
659
|
+
var lp=function(a,b){if(a===null||typeof a==="number"||typeof a==="boolean"||typeof a==="string")return a;if(Array.isArray(a))return Yb(a,function(e){return lp(e,b)});if(!u(a)||typeof a==="function")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":a=a.value;if(typeof a!=="string")throw Error("Invalid variable name: "+a);return cp(Object,a);case "Date":a=a.value;if(typeof a!=="number")throw Error("Invalid date value: "+
|
|
660
|
+
a);return new fp(a/1E3);case "Bytes":return mp(new gf({pb:a}),a);case "Invocation":return c="functionName"in a?cn(a.functionName):lp(a["function"],b),a=Ya(a.arguments,function(e){return lp(e,b)}),np(c,a);case "Dictionary":return Ya(a.value,function(e){return lp(e,b)});case "Function":var d=lp(a.body,b);a={name:"",args:Yb(a.argumentNames,function(e){return{name:e,type:"Object",optional:!1}}),returns:"Object"};return new bp(a,function(){return d});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new T(a);
|
|
661
|
+
case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}},mp=function(a,b){var c=function(){};r(c,Yj);c.prototype.encode=function(){return b};c.prototype.na=function(){return a};return new c},np=function(a,b){if(a instanceof Ym)return a.apply(b);if(a instanceof O){var c=function(){return Ym.apply(this,arguments)||this};r(c,Ym);c.prototype.encode=function(d){return a.encode(d)};c.prototype.Ed=function(d,e){return fk(hl(d,a),
|
|
662
|
+
e)};return new O(new c,b)}throw Error("Invalid function value");},op=function(a){return kp(JSON.parse(a))};x("ee.Deserializer.fromCloudApiJSON",op);
|
|
663
|
+
var kp=function(a){var b=Ma(xf,a),c={},d=function(f,l){if(!(f in c)){if(!(f in b.values))throw Error("Cannot find "+l+" "+f);c[f]=e(b.values[f])}return c[f]},e=function(f){if(f.gb!==null)f=f.gb;else if(f.Fa!==null)f=f.Fa.values.map(e);else if(f.Ga!==null)f=Ya(f.Ga.values,e);else if(f.Lb!==null)f=cp(Object,f.Lb);else if(f.Ta!==null)f=g(f.Ta);else if(f.ya!==null){var l=f.ya;f=l.Ua?d(l.Ua,"function"):cn(l.functionName);l=Ya(l.arguments,e);f=np(f,l)}else f=f.pb!==null?mp(new gf({pb:f.pb}),f.pb):f.Va!==
|
|
664
|
+
null?mp(new gf({Va:f.Va}),f.Va):f.Oa!==null?d(f.Oa,"reference"):null;return f},g=function(f){var l=d(f.body,"function body");f={args:f.kc.map(function(m){return{name:m,type:"Object",optional:!1}}),name:"",returns:"Object"};return new bp(f,function(){return l})};return d(b.result,"result value")};x("ee.Deserializer.decodeCloudApi",kp);var pp=function(a){if(!(this instanceof pp))return Qm(pp,arguments);if(a instanceof pp)return a;qp();Wm(a)?(O.call(this,null,null),this.Ic=a):(a instanceof O&&a.I&&a.I.Z().returns=="Dictionary"?O.call(this,a.I,a.args,a.U):O.call(this,new P("Dictionary"),{input:a},null),this.Ic=null)};y(pp,O);x("ee.Dictionary",pp);var rp=!1,qp=function(){rp||(ln(pp,"Dictionary","Dictionary"),rp=!0)};pp.prototype.encode=function(a){return this.Ic!==null?a(this.Ic):pp.L.encode.call(this,a)};
|
|
665
|
+
pp.prototype.na=function(a){return this.Ic!==null?bk(hl(a,this.Ic)):pp.L.na.call(this,a)};pp.prototype.name=function(){return"Dictionary"};var sp={};x("ee.Terrain",sp);sp.Bf=!1;sp.initialize=function(){sp.Bf||(ln(sp,"Terrain","Terrain"),sp.Bf=!0)};sp.reset=function(){mn(sp);sp.Bf=!1};var yp=function(a,b,c,d,e,g){if(tp!="ready"||a||b){var f=c!=null;if(d)if(f)up.push(d);else throw Error("Can't pass an error callback without a success callback.");if(tp=="loading"&&f)vp.push(c);else if(tp="loading",oj(a,b,e,g),f)vp.push(c),gn(wp,xp);else try{gn(),wp()}catch(l){throw xp(l),l;}}else c&&c()};x("ee.initialize",yp);
|
|
666
|
+
var Bp=function(){tp="not_ready";Nj=Mj=zj=null;Lj=!1;en=null;fn={};mn(fp);hp=!1;mn(pp);rp=!1;mn(S);tn=!1;mn(N);oo=!1;mn(W);go=!1;mn(V);eo=!1;mn(Y);xo=!1;mn(X);vo=!1;mn(U);Pn=!1;mn(T);wn=!1;mn(ro);to=!1;mn(Wo);Yo=!1;mn(Zo);ap=!1;sp.reset();for(var a=t.ee,b=0;b<zp.length;b++){var c=zp[b];mn(a[c]);delete a[c]}zp=[];Sm=a;a=Ap;for(var d in a)delete a[d]};x("ee.reset",Bp);var Cp={Hl:"not_ready",LOADING:"loading",Il:"ready"};x("ee.InitState",Cp);x("ee.InitState.NOT_READY","not_ready");
|
|
667
|
+
x("ee.InitState.LOADING","loading");x("ee.InitState.READY","ready");var tp="not_ready",vp=[],up=[];x("ee.TILE_SIZE",256);var zp=[],Ap={};x("ee.Algorithms",Ap);var Dp=function(a,b){typeof a==="string"&&(a=new P(a));return Ym.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))};x("ee.call",Dp);var Ep=function(a,b){typeof a==="string"&&(a=new P(a));return a.apply(b)};x("ee.apply",Ep);
|
|
668
|
+
var wp=function(){if(tp=="loading"){try{gp();qp();sn();mo();fo();co();wo();uo();On();un();so();Xo();$o();sp.initialize();var a=hn(),b={},c={},d;for(d in a){var e=void 0;e=d.indexOf(".")!=-1?d.slice(0,d.indexOf(".")):d;b[e]=!0;var g=a[d].returns.replace(/<.*>/,"");c[g]=!0}var f=t.ee,l;for(l in b)l in c&&!(l in f)&&(f[l]=Fp(l),zp.push(l),a[l]?(f[l].signature=a[l],f[l].signature.isConstructor=!0,fn[l]=!0):f[l].signature={});Sm=f;Gp()}catch(m){xp(m);return}tp="ready";for(up=[];vp.length>0;)vp.shift()()}},
|
|
669
|
+
xp=function(a){if(tp=="loading")for(tp="not_ready",vp=[];up.length>0;)up.shift()(a)},Gp=function(){var a=jn();ab(a).sort().forEach(function(b){var c=a[b],d=c.Z();if(!d.hidden){b=b.split(".");var e=Ap;for(e.signature={};b.length>1;){var g=b[0];g in e||(e[g]={signature:{}});e=e[g];b=gc(b,1)}g=function(f){return bn(c,void 0,Array.prototype.slice.call(arguments,0))};g.signature=d;g.toString=w(c.toString,c);e[b[0]]=g}})},Fp=function(a){var b=function(c){var d=t.ee[a],e=Array.prototype.slice.call(arguments),
|
|
670
|
+
g=e.length==1;if(g&&e[0]instanceof d)return e[0];if(!(this instanceof d))return Qm(d,e);d=kn(a);var f=!(e[0]instanceof O),l=!1;d&&(g?f?l=!0:e[0].I&&e[0].I.Z().returns==d.Z().returns||(l=!0):l=!0);if(l)e=Xm(e,d.Z())?e[0]:$m(d,e),O.call(this,d,an(d,e));else{if(!g)throw Error("Too many arguments for ee."+a+"(): "+e);if(f)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];O.call(this,e.I,e.args,e.U)}};y(b,O);b.prototype.name=function(){return a};ln(b,a,a);return b};
|
|
671
|
+
Zm=function(a,b){if(a===null)return null;if(a!==void 0){var c=t.ee;switch(b){case "Image":return new N(a);case "Feature":return a instanceof V?Q("Feature",Q("Collection.geometry",a)):new W(a);case "Element":if(a instanceof S)return a;if(a instanceof T)return new W(a);if(a instanceof O)return new S(a.I,a.args,a.U);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof X?Q("Collection.geometry",a):new T(a);case "FeatureCollection":case "Collection":return a instanceof V?
|
|
672
|
+
a:new X(a);case "ImageCollection":return new Y(a);case "Filter":return new U(a);case "Algorithm":if(typeof a==="string")return new P(a);if(typeof a==="function"){b=a.length;c=[];for(var d=0;d<b;d++)c[d]="Object";return ep(a,c)}if(a instanceof Yj)return a;throw Error("Argument is not a function: "+a);case "String":return Vm(a)||a instanceof Zo||a instanceof O?new Zo(a):a;case "Dictionary":return Wm(a)?a:new pp(a);case "List":return new ro(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new Wo(a);
|
|
673
|
+
default:if(b in c){d=kn(b);if(a instanceof c[b])return a;if(d)return new c[b](a);if(typeof a==="string"){if(a in c[b])return c[b][a].call();throw Error("Unknown algorithm: "+b+"."+a);}return new c[b](a)}return a}}};var Hp=function(a,b,c){oe.call(this,a,b,c);this.tileSize=new google.maps.Size(256,256);this.yh=new fe;this.xh=new fe};r(Hp,oe);Hp.prototype.getTile=function(a,b){var c=pe(this,a,b);b=[this.url,c].join("/")+"?token="+this.token;c=[c,this.xb,this.token].join("/");this.zb.push(c);this.xb+=1;var d=Jh("DIV");Ip(this,b,a,c,d);Jp(this);return d};
|
|
674
|
+
var Ip=function(a,b,c,d,e){var g=new XMLHttpRequest;g.open("GET",b,!0);g.responseType="arraybuffer";g.onreadystatechange=w(function(){if(g.readyState===XMLHttpRequest.DONE&&g.status===200){var f=g.response;if(f)f=new Float32Array(f),this.yh.set(c,f),this.xh.set(c,e),cc(this.zb,d),Jp(this);else throw this.tg.add(d),Error("Unable to request floating point array buffers.");}},a);g.send()},Jp=function(a){a.dispatchEvent(new qe(a.zb.length))};Hp.prototype.J=function(){this.xh=this.yh=null;oe.prototype.J.call(this)};
|
|
675
|
+
x("ee.FloatTileOverlay",Hp);var Kp=function(){this.ie=new Map};Kp.prototype.clear=function(){this.ie.clear()};var Lp=function(a,b){a.ie.has(b)||a.ie.set(b,{throttleCount:0,errorCount:0,tileLatencies:[]});return a.ie.get(b)};var Mp=function(a){H.call(this);this.Sb=a;this.K={}};y(Mp,H);var Np=[];Mp.prototype.Wa=function(a,b,c,d){Array.isArray(b)||(b&&(Np[0]=b.toString()),b=Np);for(var e=0;e<b.length;e++){var g=Hd(a,b[e],c||this.handleEvent,d||!1,this.Sb||this);if(!g)break;this.K[g.key]=g}return this};Mp.prototype.Uc=function(a,b,c,d){return Op(this,a,b,c,d)};
|
|
676
|
+
var Op=function(a,b,c,d,e,g){if(Array.isArray(c))for(var f=0;f<c.length;f++)Op(a,b,c[f],d,e,g);else{b=Gd(b,c,d||a.handleEvent,e,g||a.Sb||a);if(!b)return a;a.K[b.key]=b}return a};Mp.prototype.se=function(a,b,c,d,e){if(Array.isArray(b))for(var g=0;g<b.length;g++)this.se(a,b[g],c,d,e);else c=c||this.handleEvent,d=u(d)?!!d.capture:!!d,e=e||this.Sb||this,c=Id(c),d=!!d,b=wd(a)?a.Kc(b,c,d,e):a?(a=Kd(a))?a.Kc(b,c,d,e):null:null,b&&(Pd(b),delete this.K[b.key])};
|
|
677
|
+
Mp.prototype.ed=function(){Wa(this.K,function(a,b){this.K.hasOwnProperty(b)&&Pd(a)},this);this.K={}};Mp.prototype.J=function(){Mp.L.J.call(this);this.ed()};Mp.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var Qp=function(a,b){a.name!==void 0?(this.name=a.name,this.code=db[a.name]):(this.code=a=rb(a.code),this.name=Pp(a));lb.call(this,Ic("%s %s",this.name,b))};y(Qp,lb);
|
|
678
|
+
var Pp=function(a){var b=cb(function(c){return a==c});if(b===void 0)throw Error("Invalid code: "+a);return b},Rp={},db=(Rp.AbortError=3,Rp.EncodingError=5,Rp.InvalidModificationError=9,Rp.InvalidStateError=7,Rp.NotFoundError=1,Rp.NotReadableError=4,Rp.NoModificationAllowedError=6,Rp.PathExistsError=12,Rp.QuotaExceededError=10,Rp.SecurityError=2,Rp.SyntaxError=8,Rp.TypeMismatchError=11,Rp);var Sp=function(a,b){nd.call(this,a.type,b);this.Ja=a};y(Sp,nd);var Tp=function(){J.call(this);this.ca=new FileReader;this.ca.onloadstart=w(this.mc,this);this.ca.onprogress=w(this.mc,this);this.ca.onload=w(this.mc,this);this.ca.onabort=w(this.mc,this);this.ca.onerror=w(this.mc,this);this.ca.onloadend=w(this.mc,this)};y(Tp,J);h=Tp.prototype;h.abort=function(){try{this.ca.abort()}catch(a){throw new Qp(a,"aborting read");}};h.tb=function(){return this.ca.readyState};h.getError=function(){return this.ca.error&&new Qp(this.ca.error,"reading file")};
|
|
679
|
+
h.mc=function(a){this.dispatchEvent(new Sp(a,this))};h.J=function(){Tp.L.J.call(this);delete this.ca};h.readAsBinaryString=function(a){this.ca.readAsBinaryString(a)};h.readAsArrayBuffer=function(a){this.ca.readAsArrayBuffer(a)};h.readAsText=function(a,b){this.ca.readAsText(a,b)};var Up=function(a,b){E(a);a=a.style;"opacity"in a?a.opacity=b:"MozOpacity"in a?a.MozOpacity=b:"filter"in a&&(a.filter=b===""?"":"alpha(opacity="+Number(b)*100+")")};var Vp=function(a,b){J.call(this);b=b||{};this.minZoom=b.minZoom||0;this.maxZoom=b.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=b.tileSize||new google.maps.Size(256,256);this.name=b.name;this.opacity="opacity"in b?b.opacity:1;this.he=new Kp(a.getUniqueId());this.yb=new fe;this.xb=0;this.sg=a;this.ib=new Mp(this);this.radius=0};r(Vp,J);h=Vp.prototype;h.Me=function(a){return Hd(this,"tile-load",a)};h.Zf=function(a){Pd(a)};
|
|
680
|
+
h.Lc=function(){return Wp(this,"throttled")+Wp(this,"loading")+Wp(this,"new")};h.setOpacity=function(a){this.opacity=a;this.yb.forEach(function(b){Up(b.la,this.opacity)},this)};h.getStats=function(){return this.he};
|
|
681
|
+
h.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||a.y<0||a.y>=d)return c.createElement("div");var e=a.x%d;e<0&&(e+=d);d=new google.maps.Point(e,a.y);a=[a.x,a.y,b,this.xb++].join("-");e=this.sg.getUniqueId();a=[a,e].join("-");b=this.dh(d,b,c,a);b.tileSize=this.tileSize;Up(b.la,this.opacity);this.yb.set(a,b);Xp(this,b);this.dispatchEvent(new Yp(this.Lc()));this.sg.Gf(b,(new Date).getTime()/1E3);return b.la};h.releaseTile=function(a){var b=this.yb.get(a.id);this.yb.remove(a.id);b&&(b.abort(),md(b))};
|
|
682
|
+
var Xp=function(a,b){a.ib.Wa(b,"status-changed",function(){switch(b.getStatus()){case "loaded":var c=b.el,d=(new Date).getTime();Lp(this.he,b.zoom).tileLatencies.push(d-c);this.dispatchEvent(new Zp(this.Lc()));break;case "throttled":Lp(this.he,b.zoom).throttleCount++;this.dispatchEvent(new $p(b.Ca));break;case "failed":Lp(this.he,b.zoom).errorCount++;this.dispatchEvent(new aq(b.Ca,b.Sk));break;case "aborted":this.dispatchEvent(new bq(this.Lc()))}})};
|
|
683
|
+
Vp.prototype.J=function(){J.prototype.J.call(this);this.yb.forEach(md);this.yb.clear();this.yb=null;md(this.ib);this.sg=this.ib=null};var Wp=function(a,b){return ac(a.yb.aa(),function(c){return c.getStatus()==b})};x("ee.layers.AbstractOverlay",Vp);Vp.prototype.removeTileCallback=Vp.prototype.Zf;Vp.prototype.addTileCallback=Vp.prototype.Me;var Zp=function(){nd.call(this,"tile-load")};r(Zp,nd);var Yp=function(){nd.call(this,"tile-start")};r(Yp,nd);var $p=function(){nd.call(this,"tile-throttle")};
|
|
684
|
+
r($p,nd);var aq=function(a,b){nd.call(this,"tile-fail");this.errorMessage=b};r(aq,nd);var bq=function(){nd.call(this,"tile-abort")};r(bq,nd);var cq=function(a,b,c,d){J.call(this);this.qb=a;this.zoom=b;this.la=c.createElement("div");this.la.id=d;this.il=5;this.ce=function(){};this.je="new";this.ti=0;this.Df=!1};r(cq,J);cq.prototype.getDiv=function(){return this.la};
|
|
685
|
+
var eq=function(a){if(!a.Df&&a.getStatus()=="loading")throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");dq(a,"loading");a.el=(new Date).getTime();a.Ya=new bj;a.Ya.wc="blob";a.Ya.Wa("complete",function(){var b=lj(a.Ya),c=a.Ya.getStatus();c==429&&dq(a,"throttled");if(Xi(c)){var d={};Wa(mj(a.Ya),function(g,f){d[f.toLowerCase()]=g});a.zl=d;a.Ai=b;a.Jc()}else if(b){var e=new Tp;e.Wa("loadend",function(){a.gd(e.ca.result)});e.readAsText(b)}else a.gd("Failed to load tile.")},
|
|
686
|
+
!1);a.Ya.Uc("ready",Ea(md,a.Ya));a.Ca&&a.Ca.endsWith("&profiling=1")&&(a.Ca=a.Ca.replace("&profiling=1",""),a.Ya.headers.set("X-Earth-Engine-Computation-Profiling","1"));a.Ya.send(a.Ca,"GET")};h=cq.prototype;h.Jc=function(){this.ce(this);dq(this,"loaded")};h.Fc=function(){md(this.Ya)};
|
|
687
|
+
h.gd=function(a){var b=function(c){try{if(c=JSON.parse(c),c.error&&c.error.message)return c.error.message}catch(d){}return c};this.ti>=this.il?(this.Sk=b(a),dq(this,"failed")):(this.Fc(),setTimeout(w(function(){this.Ra||(this.Df=!0,eq(this),this.Df=!1)},this),1E3*Math.pow(2,this.ti++)))};h.abort=function(){this.Fc();this.getStatus()!="aborted"&&this.getStatus()!="removed"&&dq(this,this.je in fq?"removed":"aborted")};h.getStatus=function(){return this.je};var dq=function(a,b){a.je=b;a.dispatchEvent("status-changed")};
|
|
688
|
+
cq.prototype.J=function(){J.prototype.J.call(this);this.Fc();this.la.remove();this.ce=null};var fq={aborted:!0,failed:!0,loaded:!0,removed:!0};var gq=function(){H.call(this)};r(gq,H);var hq=function(a,b){Vp.call(this,a,b);this.Rg=new fe;this.ph=new fe};r(hq,Vp);hq.prototype.dh=function(a,b,c,d){var e=new iq(a,b,c,d);this.ib.Wa(e,"status-changed",function(){e.getStatus()=="loaded"&&(this.Rg.set(a,new Float32Array(e.yd)),this.ph.set(a,e.la))});return e};hq.prototype.J=function(){Vp.prototype.J.call(this);this.ph=this.Rg=null};x("ee.layers.BinaryOverlay",hq);var iq=function(a,b,c,d){cq.call(this,a,b,c,d)};r(iq,cq);
|
|
689
|
+
iq.prototype.Jc=function(){var a=new Tp;a.Wa("loadend",function(){this.yd=a.ca.result;cq.prototype.Jc.call(this)},void 0,this);a.readAsArrayBuffer(this.Ai)};var jq=function(a){J.call(this);this.Pc={};this.Oc={};this.Sb=new Mp(this);this.X=a;this.We=!1};y(jq,J);var kq=["load","abort","error"],lq=function(a,b,c){if(c=typeof c==="string"?c:c.src)a.We=!1,a.Pc[b]={src:c,bh:null}},mq=function(a,b){delete a.Pc[b];var c=a.Oc[b];c&&(delete a.Oc[b],a.Sb.se(c,kq,a.bi))};
|
|
690
|
+
jq.prototype.start=function(){var a=this.Pc;ab(a).forEach(function(b){var c=a[b];if(c&&(delete a[b],!this.Ra)){if(this.X){var d=this.X;d=(d?new Oh(Nh(d)):mb||(mb=new Oh)).Qk("IMG")}else d=new Image;c.bh&&(d.crossOrigin=c.bh);this.Sb.Wa(d,kq,this.bi);this.Oc[b]=d;d.id=b;d.src=c.src}},this)};
|
|
691
|
+
jq.prototype.bi=function(a){var b=a.currentTarget;if(b){if(a.type=="readystatechange")if(b.readyState=="complete")a.type="load";else return;typeof b.naturalWidth=="undefined"&&(a.type=="load"?(b.naturalWidth=b.width,b.naturalHeight=b.height):(b.naturalWidth=0,b.naturalHeight=0));mq(this,b.id);this.dispatchEvent({type:a.type,target:b});!this.Ra&&eb(this.Oc)&&eb(this.Pc)&&!this.We&&(this.We=!0,this.dispatchEvent("complete"))}};jq.prototype.J=function(){delete this.Pc;delete this.Oc;md(this.Sb);jq.L.J.call(this)};var nq=function(a,b){Vp.call(this,a,b)};r(nq,Vp);nq.prototype.dh=function(a,b,c,d){return new oq(a,b,c,d)};x("ee.layers.ImageOverlay",nq);var oq=function(a,b,c,d){cq.call(this,a,b,c,d);this.ce=pq;this.Fh=this.ga=this.Qd=null;this.Xc=""};r(oq,cq);
|
|
692
|
+
oq.prototype.Jc=function(){try{var a=Rb(this.Ai);this.Xc=Qb(a);var b=this.Xc!==Pb.toString()?this.Xc:this.Ca}catch(c){b=this.Ca}this.ga=new jq;lq(this.ga,this.la.id+"-image",b);this.Fh=Gd(this.ga,qq,function(c){c.type=="load"?(this.Qd=c.target,cq.prototype.Jc.call(this)):this.gd()},void 0,this);this.ga.start()};oq.prototype.Fc=function(){cq.prototype.Fc.call(this);this.ga&&(Pd(this.Fh),md(this.ga))};oq.prototype.J=function(){cq.prototype.J.call(this);this.Xc&&URL.revokeObjectURL(this.Xc)};
|
|
693
|
+
var pq=function(a){a.la.appendChild(a.Qd)},qq=["load","abort","error"];var rq=function(a){for(var b=arguments[0],c=1;c<arguments.length;c++){var d=arguments[c];if(d.lastIndexOf("/",0)==0)b=d;else{var e;(e=b=="")||(e=b.length-1,e=e>=0&&b.indexOf("/",e)==e);b=e?b+d:b+("/"+d)}}return b};var sq=function(a,b,c,d){H.call(this);this.Qg=a;this.Yb=b;this.ng=d||"";this.Wd=c};r(sq,gq);sq.prototype.Gf=function(a){if(a.zoom<=this.Wd)a.Ca=this.Ld(a.qb,a.zoom);else{var b=a.zoom-this.Wd,c=Math.pow(2,b);c=new google.maps.Point(Math.floor(a.qb.x/c),Math.floor(a.qb.y/c));a.Ca=this.Ld(c,a.zoom-b);a.ce=Ea(tq,this.Wd)}var d=w(a.gd,a);a.gd=w(function(e){e&&(e.includes("The specified key does not exist.")||e.includes("AccessDenied"))?dq(a,"loaded"):d(e)},a);eq(a)};
|
|
694
|
+
sq.prototype.getUniqueId=function(){return[this.Qg,this.Yb,this.Wd,this.ng].join("-")};sq.prototype.Ld=function(a,b){a=rq("https://storage.googleapis.com",this.Qg,this.Yb,String(b),String(a.x),String(a.y));this.ng&&(a+=this.ng);return a};
|
|
695
|
+
var tq=function(a,b){if(!b.Qd)throw Error("Tile must have an image element to be rendered.");a=Math.pow(2,b.zoom-a);var c=b.tileSize.width,d=b.la.ownerDocument.createElement("canvas");d.setAttribute("width",c);d.setAttribute("height",c);b.la.appendChild(d);d=d.getContext("2d");d.imageSmoothingEnabled=!1;d.mozImageSmoothingEnabled=!1;d.webkitImageSmoothingEnabled=!1;d.drawImage(b.Qd,c/a*(b.qb.x%a),c/a*(b.qb.y%a),c/a,c/a,0,0,c,c)};x("ee.layers.CloudStorageTileSource",sq);var uq=function(){this.La=[];this.Qa=[]};h=uq.prototype;h.enqueue=function(a){this.Qa.push(a)};h.Hc=function(){this.La.length===0&&(this.La=this.Qa,this.La.reverse(),this.Qa=[]);return this.La.pop()};h.R=function(){return this.La.length+this.Qa.length};h.isEmpty=function(){return this.La.length===0&&this.Qa.length===0};h.clear=function(){this.La=[];this.Qa=[]};h.contains=function(a){return bc(this.La,a)||bc(this.Qa,a)};
|
|
696
|
+
h.remove=function(a){var b=this.La;var c=Vb(b,a);c>=0?(dc(b,c),b=!0):b=!1;return b||cc(this.Qa,a)};h.aa=function(){for(var a=[],b=this.La.length-1;b>=0;--b)a.push(this.La[b]);var c=this.Qa.length;for(b=0;b<c;++b)a.push(this.Qa[b]);return a};var vq=function(a,b){H.call(this);this.Th=a||0;this.Vd=b||10;if(this.Th>this.Vd)throw Error("[goog.structs.Pool] Min can not be greater than max");this.Sa=new uq;this.ub=new je;this.delay=0;this.Ef=null;this.rd()};y(vq,H);vq.prototype.Mc=function(){var a=Date.now();if(!(this.Ef!=null&&a-this.Ef<this.delay)){for(var b;this.Sa.R()>0&&(b=this.Sa.Hc(),!this.Qf(b));)this.rd();!b&&this.R()<this.Vd&&(b=this.Ze());b&&(this.Ef=a,this.ub.add(b));return b}};
|
|
697
|
+
var wq=function(a,b){return a.ub.remove(b)?(a.Le(b),!0):!1};h=vq.prototype;h.Le=function(a){this.ub.remove(a);this.Qf(a)&&this.R()<this.Vd?this.Sa.enqueue(a):this.Cd(a)};h.rd=function(){for(var a=this.Sa;this.R()<this.Th;)a.enqueue(this.Ze());for(;this.R()>this.Vd&&this.Sa.R()>0;)this.Cd(a.Hc())};h.Ze=function(){return{}};h.Cd=function(a){if(typeof a.dispose=="function")a.dispose();else for(var b in a)a[b]=null};h.Qf=function(a){return typeof a.Nk=="function"?a.Nk():!0};
|
|
698
|
+
h.contains=function(a){return this.Sa.contains(a)||this.ub.contains(a)};h.R=function(){return this.Sa.R()+this.ub.R()};h.isEmpty=function(){return this.Sa.isEmpty()&&this.ub.isEmpty()};h.J=function(){vq.L.J.call(this);if(this.ub.R()>0)throw Error("[goog.structs.Pool] Objects not released");delete this.ub;for(var a=this.Sa;!a.isEmpty();)this.Cd(a.Hc());delete this.Sa};var xq=function(a,b){this.Lh=a;this.te=b};xq.prototype.getKey=function(){return this.Lh};xq.prototype.clone=function(){return new xq(this.Lh,this.te)};var yq=function(a){this.Aa=[];if(a)a:{if(a instanceof yq){var b=a.sb();a=a.aa();if(this.R()<=0){for(var c=this.Aa,d=0;d<b.length;d++)c.push(new xq(b[d],a[d]));break a}}else b=ab(a),a=$a(a);for(c=0;c<b.length;c++)zq(this,b[c],a[c])}},zq=function(a,b,c){var d=a.Aa;d.push(new xq(b,c));b=d.length-1;a=a.Aa;for(c=a[b];b>0;)if(d=b-1>>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};h=yq.prototype;
|
|
699
699
|
h.remove=function(){var a=this.Aa,b=a.length,c=a[0];if(!(b<=0)){if(b==1)a.length=0;else{a[0]=a.pop();a=0;b=this.Aa;for(var d=b.length,e=b[a];a<d>>1;){var g=a*2+1,f=a*2+2;g=f<d&&b[f].getKey()<b[g].getKey()?f:g;if(b[g].getKey()>e.getKey())break;b[a]=b[g];a=g}b[a]=e}return c.te}};h.aa=function(){for(var a=this.Aa,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].te);return b};h.sb=function(){for(var a=this.Aa,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
|
|
700
|
-
h.Gc=function(a){return this.Aa.some(function(b){return b.te==a})};h.Ob=function(a){return this.Aa.some(function(b){return b.getKey()==a})};h.clone=function(){return new
|
|
701
|
-
h.J=function(){
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
h.Xk=function(a){if(this.jc)this.ac&&this.ac(this);else switch(a.type){case "load":this.Ja=a;this.ac&&this.ac(this);break;case "error":case "abort":this.retry()||(this.Ja=a,this.ac&&this.ac(this))}};h.J=function(){H.prototype.J.call(this);delete this.yf;delete this.ac};h.retry=function(){if(this.Ig>this.jl)return!1;this.Ig++;
|
|
706
|
-
h.Al=function(){if(!this.jc){var a=w(function(d){this.jc||(
|
|
707
|
-
h.Li=null;h.Ja=null;h.ki=null;var
|
|
708
|
-
h.getTile=function(a,b,c){if(b<this.minZoom||a.y<0||a.y>=1<<b)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;b=pe(this,a,b);a=[this.url,b].join("/")+"?token="+this.token;this.ua&&this.ua.isEnabled()&&(a+="&profiling=1");b=[b,this.xb,this.token].join("/");this.xb+=1;c=Jh("DIV",{id:b});var d=(new Date).getTime()/1E3;this.zb.push(b);
|
|
709
|
-
h.releaseTile=function(a){
|
|
710
|
-
h.Wk=function(a,b,c,d){c.type=="error"?(cc(this.zb,b),this.tg.add(b),this.dispatchEvent(c)):(cc(this.zb,b),c.target&&c.type=="load"&&(c=c.target,this.ug.add(c),this.Rf!=1&&
|
|
711
|
-
c=[["name","
|
|
712
|
-
"collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames opt_priority".split(" "),"collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "),
|
|
713
|
-
"collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "),"image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_priority".split(" "),"image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris opt_priority".split(" "),
|
|
714
|
-
"collection opt_description
|
|
715
|
-
"
|
|
716
|
-
"opt_callback"],["
|
|
717
|
-
|
|
718
|
-
["
|
|
719
|
-
|
|
720
|
-
["
|
|
721
|
-
"
|
|
722
|
-
Ho,Po,
|
|
723
|
-
|
|
724
|
-
|
|
700
|
+
h.Gc=function(a){return this.Aa.some(function(b){return b.te==a})};h.Ob=function(a){return this.Aa.some(function(b){return b.getKey()==a})};h.clone=function(){return new yq(this)};h.R=function(){return this.Aa.length};h.isEmpty=function(){return this.Aa.length===0};h.clear=function(){this.Aa.length=0};var Aq=function(){yq.apply(this,arguments)};r(Aq,yq);Aq.prototype.enqueue=function(a,b){zq(this,a,b)};Aq.prototype.Hc=function(){return this.remove()};var Bq=function(a,b){this.nh=void 0;this.fe=new Aq;vq.call(this,a,b)};y(Bq,vq);h=Bq.prototype;h.Mc=function(a,b){if(!a)return(a=Bq.L.Mc.call(this))&&this.delay&&(this.nh=t.setTimeout(w(this.Nd,this),this.delay)),a;this.fe.enqueue(b!==void 0?b:100,a);this.Nd()};h.Nd=function(){for(var a=this.fe;a.R()>0;){var b=this.Mc();if(b)a.Hc().apply(this,[b]);else break}};h.Le=function(a){Bq.L.Le.call(this,a);this.Nd()};h.rd=function(){Bq.L.rd.call(this);this.Nd()};
|
|
701
|
+
h.J=function(){Bq.L.J.call(this);t.clearTimeout(this.nh);this.fe.clear();this.fe=null};var Cq=function(a,b){H.call(this);this.Hf=a;this.ua=b||null};r(Cq,gq);Cq.prototype.Gf=function(a,b){var c=this,d=Hd(a,"status-changed",function(){switch(a.getStatus()){case "loaded":var e=a.zl["x-earth-engine-computation-profile"];this.ua&&e&&this.ua.Kk(a.la.id,e);break;case "failed":case "aborted":this.ua&&a.la.id!==""&&this.ua.rl(a.la.id),Pd(d)}},void 0,this);a.Ca=this.Ld(a.qb,a.zoom);Dq().Mc(function(e){c.xf(a,e)},b)};Cq.prototype.getUniqueId=function(){return this.Hf.mapid+"-"+this.Hf.token};
|
|
702
|
+
Cq.prototype.xf=function(a,b){var c=Dq();if(a.Ra||a.getStatus()=="aborted")wq(c,b);else{var d=Hd(a,"status-changed",function(){a.je in fq&&(Pd(d),wq(c,b))});eq(a)}};Cq.prototype.Ld=function(a,b){a=Kl(this.Hf,a.x,a.y,b);return this.ua&&this.ua.isEnabled()?a+"&profiling=1":a};var Dq=function(){Eq||(Eq=new Bq(0,4));return Eq};x("ee.layers.EarthEngineTileSource",Cq);var Eq=null;var Fq=function(a){H.call(this);this.Ji=a};r(Fq,gq);Fq.prototype.Gf=function(a){a.Ca=this.Ji.formatTileUrl(a.qb.x,a.qb.y,a.zoom);eq(a)};Fq.prototype.getUniqueId=function(){return this.Ji.token};x("ee.layers.FeatureViewTileSource",Fq);var Hq=function(){J.call(this);this.pe=new Gq(0,60);this.vc=new fe};r(Hq,J);Hq.prototype.send=function(a,b,c,d,e){if(this.vc.get(a))throw Error("[ee.MapTileManager] ID in use");b=new Iq(a,b,d,w(this.oi,this),e!==void 0?e:1);this.vc.set(a,b);a=w(this.xf,this,b);this.pe.Mc(a,c);return b};Hq.prototype.abort=function(a){if(a=this.vc.get(a))a.jc||(a.jc=!0,a.Ja=new nd("abort")),this.oi(a)};
|
|
703
|
+
Hq.prototype.xf=function(a,b){if(a.ga||a.jc)Jq(this,b);else if(a.Li=b,b.setActive(!0),b=new jq,a.ga=b,!a.retry())throw Error("Cannot dispatch first request!");};Hq.prototype.oi=function(a){this.vc.remove(a.getId());a.ga&&(Jq(this,a.Li),a.ga.dispose());a.yf&&a.yf(a.Ja,a.ki)};var Jq=function(a,b){b.setActive(!1);if(!wq(a.pe,b))throw Error("Object not released");};
|
|
704
|
+
Hq.prototype.J=function(){J.prototype.J.call(this);this.pe.dispose();this.pe=null;var a=this.vc;Wb(a.aa(),function(b){b.dispose()});a.clear();this.vc=null};x("ee.MapTileManager",Hq);var Iq=function(a,b,c,d,e){H.call(this);this.fa=a;this.Fl=b;this.jl=e!==void 0?e:1;this.yf=c;this.ac=d};r(Iq,H);h=Iq.prototype;h.getId=function(){return this.fa};h.getUrl=function(){return this.Fl};
|
|
705
|
+
h.Xk=function(a){if(this.jc)this.ac&&this.ac(this);else switch(a.type){case "load":this.Ja=a;this.ac&&this.ac(this);break;case "error":case "abort":this.retry()||(this.Ja=a,this.ac&&this.ac(this))}};h.J=function(){H.prototype.J.call(this);delete this.yf;delete this.ac};h.retry=function(){if(this.Ig>this.jl)return!1;this.Ig++;mq(this.ga,this.fa);setTimeout(w(this.Al,this),0);return!0};
|
|
706
|
+
h.Al=function(){if(!this.jc){var a=w(function(d){this.jc||(lq(this.ga,this.fa,d),Gd(this.ga,Kq,w(this.Xk,this)),this.ga.start())},this),b=this.getUrl();if(dd(b).Ba.Ob("profiling")){var c=new bj;c.wc="blob";c.Wa("complete",w(function(){this.ki=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(c.getStatus()>=200&&c.getStatus()<300)try{var d=Qb(Rb(lj(c)));var e=d!==Pb.toString()}catch(g){}a(e?d:b)},this));c.Uc("ready",w(c.dispose,c));c.send(b,"GET")}else a(b)}};h.Ig=0;h.jc=!1;h.ga=null;
|
|
707
|
+
h.Li=null;h.Ja=null;h.ki=null;var Kq=["load","abort","error"],Lq=function(){H.call(this);this.Ea=!1};r(Lq,H);Lq.prototype.setActive=function(a){this.Ea=a};Lq.prototype.isActive=function(){return this.Ea};var Gq=function(a,b){Bq.call(this,a,b)};r(Gq,Bq);Gq.prototype.Ze=function(){return new Lq};Gq.prototype.Cd=function(a){a.dispose()};Gq.prototype.Qf=function(a){return!a.Ra&&!a.isActive()};var Mq=function(a,b,c,d,e){oe.call(this,a,b,c,d,e);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.name=d.name;this.ug=new je;this.Rf=1;this.ua=e||null};r(Mq,oe);h=Mq.prototype;h.Me=function(a){return Hd(this,"tileevent",a)};h.Zf=function(a){Pd(a)};
|
|
708
|
+
h.getTile=function(a,b,c){if(b<this.minZoom||a.y<0||a.y>=1<<b)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;b=pe(this,a,b);a=[this.url,b].join("/")+"?token="+this.token;this.ua&&this.ua.isEnabled()&&(a+="&profiling=1");b=[b,this.xb,this.token].join("/");this.xb+=1;c=Jh("DIV",{id:b});var d=(new Date).getTime()/1E3;this.zb.push(b);Al(Hq).send(b,a,d,w(this.Wk,this,c,b));Jp(this);return c};h.Lc=function(){return this.zb.length};
|
|
709
|
+
h.releaseTile=function(a){Al(Hq).abort(a.id);if(a.firstElementChild!==void 0)var b=a.firstElementChild;else for(b=a.firstChild;b&&b.nodeType!=1;)b=b.nextSibling;this.ug.remove(b);a.id!==""&&(this.tg.remove(a.id),this.ua&&this.ua.rl(a.id))};h.setOpacity=function(a){this.Rf=a;var b=this.ug.Da();$d(b,function(c){Up(c,a)})};
|
|
710
|
+
h.Wk=function(a,b,c,d){c.type=="error"?(cc(this.zb,b),this.tg.add(b),this.dispatchEvent(c)):(cc(this.zb,b),c.target&&c.type=="load"&&(c=c.target,this.ug.add(c),this.Rf!=1&&Up(c,this.Rf),a.appendChild(c)),Jp(this));this.ua&&d!==null&&this.ua.Kk(b,d)};x("ee.MapLayerOverlay",Mq);Mq.prototype.removeTileCallback=Mq.prototype.Zf;Mq.prototype.addTileCallback=Mq.prototype.Me;Mq.prototype.getTile=Mq.prototype.getTile;Mq.prototype.setOpacity=Mq.prototype.setOpacity;Mq.prototype.releaseTile=Mq.prototype.releaseTile;(function(){var a={},b="ee.ApiFunction._call ee.ApiFunction._apply ee.ApiFunction.lookup ee.batch.Export.table.toBigQuery ee.batch.Export.image.toCloudStorage ee.batch.Export.video.toCloudStorage ee.batch.Export.table.toFeatureView ee.batch.Export.video.toDrive ee.batch.Export.table.toDrive ee.batch.Export.image.toDrive ee.batch.Export.table.toCloudStorage ee.batch.Export.table.toAsset ee.batch.Export.classifier.toAsset ee.batch.Export.image.toAsset ee.batch.Export.map.toCloudStorage ee.batch.Export.videoMap.toCloudStorage ee.Collection.prototype.map ee.Collection.prototype.iterate ee.Collection.prototype.limit ee.Collection.prototype.filterDate ee.Collection.prototype.sort ee.Collection.prototype.filterMetadata ee.Collection.prototype.filterBounds ee.Collection.prototype.filter ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.serialize ee.data.computeValue ee.data.getInfo ee.data.createAsset ee.data.getThumbId ee.data.setDefaultWorkloadTag ee.data.cancelTask ee.data.resetWorkloadTag ee.data.getVideoThumbId ee.data.getFilmstripThumbId ee.data.getTaskStatus ee.data.updateAsset ee.data.updateTask ee.data.getList ee.data.startIngestion ee.data.startProcessing ee.data.createFolder ee.data.makeThumbUrl ee.data.setAssetAcl ee.data.authenticateViaOauth ee.data.listAssets ee.data.renameAsset ee.data.getMapId ee.data.getTaskList ee.data.setAssetProperties ee.data.getTableDownloadId ee.data.makeTableDownloadUrl ee.data.copyAsset ee.data.authenticate ee.data.getTileUrl ee.data.listBuckets ee.data.getTaskListWithLimit ee.data.listOperations ee.data.startTableIngestion ee.data.deleteAsset ee.data.getAssetRootQuota ee.data.cancelOperation ee.data.setWorkloadTag ee.data.getDownloadId ee.data.makeDownloadUrl ee.data.listImages ee.data.getWorkloadTag ee.data.getAssetAcl ee.data.authenticateViaPopup ee.data.getFeatureViewTilesKey ee.data.listFeatures ee.data.getAsset ee.data.getAssetRoots ee.data.getOperation ee.data.authenticateViaPrivateKey ee.data.createAssetHome ee.data.newTaskId ee.Date ee.Deserializer.fromJSON ee.Deserializer.decodeCloudApi ee.Deserializer.fromCloudApiJSON ee.Deserializer.decode ee.Dictionary ee.call ee.reset ee.initialize ee.Algorithms ee.apply ee.InitState ee.TILE_SIZE ee.Element.prototype.set ee.Encodable.SourceFrame ee.Feature.prototype.getInfo ee.Feature.prototype.getMapId ee.Feature.prototype.getMap ee.Feature ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.getMap ee.FeatureCollection.prototype.select ee.FeatureCollection ee.FeatureCollection.prototype.getMapId ee.Filter.eq ee.Filter.date ee.Filter ee.Filter.metadata ee.Filter.bounds ee.Filter.and ee.Filter.prototype.not ee.Filter.gt ee.Filter.inList ee.Filter.lt ee.Filter.neq ee.Filter.or ee.Filter.lte ee.Filter.gte ee.Function.prototype.apply ee.Function.prototype.call ee.Geometry.MultiPolygon ee.Geometry.prototype.serialize ee.Geometry.MultiPoint ee.Geometry.Rectangle ee.Geometry.LineString ee.Geometry.BBox ee.Geometry.prototype.toGeoJSON ee.Geometry.Polygon ee.Geometry.LinearRing ee.Geometry ee.Geometry.MultiLineString ee.Geometry.Point ee.Geometry.prototype.toGeoJSONString ee.Image.prototype.getThumbURL ee.Image.cat ee.Image.prototype.expression ee.Image.prototype.rename ee.Image.prototype.clip ee.Image ee.Image.prototype.getMap ee.Image.prototype.select ee.Image.prototype.getInfo ee.Image.prototype.getMapId ee.Image.rgb ee.Image.prototype.getDownloadURL ee.Image.prototype.getThumbId ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.select ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.linkCollection ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection.prototype.getMapId ee.ImageCollection ee.ImageCollection.prototype.first ee.List ee.Number ee.Serializer.encode ee.Serializer.toCloudApiJSON ee.Serializer.encodeCloudApi ee.Serializer.toJSON ee.Serializer.toReadableCloudApiJSON ee.Serializer.toReadableJSON ee.Serializer.encodeCloudApiPretty ee.String ee.Terrain".split(" "),
|
|
711
|
+
c=[["name","var_args"],["name","namedArgs"],["name"],"collection opt_description opt_table opt_overwrite opt_append opt_selectors opt_maxVertices opt_priority".split(" "),"image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions opt_priority".split(" "),"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames opt_priority".split(" "),
|
|
712
|
+
"collection opt_description opt_assetId opt_maxFeaturesPerTile opt_thinningStrategy opt_thinningRanking opt_zOrderRanking opt_priority".split(" "),"collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames opt_priority".split(" "),"collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "),"image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions opt_priority".split(" "),
|
|
713
|
+
"collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "),["collection","opt_description","opt_assetId","opt_maxVertices","opt_priority"],["classifier","opt_description","opt_assetId","opt_priority"],"image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_priority".split(" "),"image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris opt_priority".split(" "),
|
|
714
|
+
"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris opt_priority".split(" "),["algorithm","opt_dropNulls"],["algorithm","opt_first"],["max","opt_property","opt_ascending"],["start","opt_end"],["property","opt_ascending"],["name",
|
|
715
|
+
"operator","value"],["geometry"],["filter"],["callback"],["func","var_args"],["opt_callback"],["legacy"],["obj","opt_callback"],["id","opt_callback"],["value","opt_path","opt_force","opt_properties","opt_callback"],["params","opt_callback"],["tag"],["taskId","opt_callback"],["opt_resetDefault"],["params","opt_callback"],["params","opt_callback"],["taskId","opt_callback"],["assetId","asset","updateFields","opt_callback"],["taskId","action","opt_callback"],["params","opt_callback"],["taskId","request",
|
|
716
|
+
"opt_callback"],["taskId","params","opt_callback"],["path","opt_force","opt_callback"],["id"],["assetId","aclUpdate","opt_callback"],"clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "),["parent","opt_params","opt_callback"],["sourceId","destinationId","opt_callback"],["params","opt_callback"],["opt_callback"],["assetId","properties","opt_callback"],["params","opt_callback"],["id"],["sourceId","destinationId","opt_overwrite","opt_callback"],["clientId",
|
|
717
|
+
"success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["id","x","y","z"],["project","opt_callback"],["opt_limit","opt_callback"],["opt_limit","opt_callback"],["taskId","request","opt_callback"],["assetId","opt_callback"],["rootId","opt_callback"],["operationName","opt_callback"],["tag"],["params","opt_callback"],["id"],["parent","opt_params","opt_callback"],[],["assetId","opt_callback"],["opt_success","opt_error"],["params","opt_callback"],["asset","params","opt_callback"],["id","opt_callback"],
|
|
718
|
+
["opt_callback"],["operationName","opt_callback"],["privateKey","opt_success","opt_error","opt_extraScopes","opt_suppressDefaultScopes"],["requestedId","opt_callback"],["opt_count","opt_callback"],["date","opt_tz"],["json"],["json"],["json"],["json"],["opt_dict"],["func","var_args"],[],"opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "),[],["func","namedArgs"],[],[],["var_args"],[],["opt_callback"],["opt_visParams","opt_callback"],["opt_visParams",
|
|
719
|
+
"opt_callback"],["geometry","opt_properties"],["opt_format","opt_selectors","opt_filename","opt_callback"],["opt_callback"],["opt_visParams","opt_callback"],["propertySelectors","opt_newProperties","opt_retainGeometry"],["args","opt_column"],["opt_visParams","opt_callback"],["name","value"],["start","opt_end"],["opt_filter"],["name","operator","value"],["geometry","opt_errorMargin"],["var_args"],[],["name","value"],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["name","value"],
|
|
720
|
+
["name","value"],["var_args"],["name","value"],["name","value"],["namedArgs"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["legacy"],["coords","opt_proj"],["coords","opt_proj","opt_geodesic","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_maxError"],["west","south","east","north"],[],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_maxError"],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],["coords",
|
|
721
|
+
"opt_proj","opt_geodesic","opt_maxError"],["coords","opt_proj"],[],["params","opt_callback"],["var_args"],["expression","opt_map"],["var_args"],["geometry"],["opt_args"],["opt_visParams","opt_callback"],["var_args"],["opt_callback"],["opt_visParams","opt_callback"],["r","g","b"],["params","opt_callback"],["params","opt_callback"],["opt_visParams","opt_callback"],["opt_callback"],["selectors","opt_names"],["params","opt_callback"],["imageCollection","opt_linkedBands","opt_linkedProperties","opt_matchPropertyName"],
|
|
722
|
+
["params","opt_callback"],["opt_visParams","opt_callback"],["args"],[],["list"],["number"],["obj","opt_isCompound"],["obj"],["obj"],["obj"],["obj"],["obj"],["obj"],["string"],[]];[Q,dn,cn,Lo,Eo,Mo,Ko,No,Io,Fo,Ho,Jo,Po,Co,Go,Oo,V.prototype.map,V.prototype.Kh,V.prototype.limit,V.prototype.lf,V.prototype.sort,V.prototype.mf,V.prototype.vh,V.prototype.filter,O.prototype.evaluate,O.prototype.Eg,O.prototype.V,O.prototype.va,Nl,um,Cm,Ol,Om,gm,Pm,Pl,Ql,$l,Im,fm,wm,rm,nm,Dm,Rl,Jm,Cl,xm,Em,Jl,bm,Km,Vl,Wl,Fm,
|
|
723
|
+
Dl,Kl,zm,am,cm,tm,Gm,Lm,dm,Nm,Tl,Ul,ym,Hl,Hm,Bl,Ll,Ml,um,Am,em,El,Bm,Xl,fp,jp,kp,op,ip,pp,Dp,Bp,yp,Ap,Ep,Cp,256,S.prototype.set,Zj,W.prototype.V,W.prototype.S,W.prototype.getMap,W,X.prototype.rb,X.prototype.V,X.prototype.getMap,X.prototype.select,X,X.prototype.S,Rn,Zn,U,bo,ao,Xn,U.prototype.rc,Vn,$n,Tn,Sn,Yn,Wn,Un,Ym.prototype.apply,Ym.prototype.call,Jn,T.prototype.va,An,Bn,Fn,Cn,T.prototype.oe,In,Gn,T,Hn,xn,T.prototype.wg,N.prototype.vf,qo,N.prototype.l,N.prototype.pi,N.prototype.clip,N,N.prototype.getMap,
|
|
724
|
+
N.prototype.select,N.prototype.V,N.prototype.S,po,N.prototype.rb,N.prototype.Kd,Y.prototype.getMap,Y.prototype.V,Y.prototype.select,Y.prototype.wf,Y.prototype.Ff,Y.prototype.tf,Y.prototype.S,Y,Y.prototype.first,ro,Wo,Vk,fl,al,Wk,gl,Yk,el,Zo,sp].forEach(function(d,e){d&&(a[d.toString()]={name:b[e],paramNames:c[e]})});t.EXPORTED_FN_INFO=a})();}).call(this);
|