mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
346 lines
176 KiB
JavaScript
346 lines
176 KiB
JavaScript
(function(){var h,aa=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},k=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}},ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,da=function(a,b){if(b){var c=ca;a=a.split(".");
|
|
for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}};da("Array.prototype.find",function(a){return a?a:function(a,c){a:{var b=this;b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(a.call(c,g,f,b)){a=g;break a}}a=void 0}return a}});
|
|
var ea=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};da("String.prototype.repeat",function(a){return a?a:function(a){var b=ea(this,null,"repeat");if(0>a||1342177279<a)throw new RangeError("Invalid count value");a|=0;for(var d="";a;)if(a&1&&(d+=b),a>>>=1)b+=b;return d}});
|
|
var fa=function(){fa=function(){};ca.Symbol||(ca.Symbol=ha)},ha=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}(),ja=function(){fa();var a=ca.Symbol.iterator;a||(a=ca.Symbol.iterator=ca.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&ba(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(aa(this))}});ja=function(){}},ia=function(a){ja();a={next:a};a[ca.Symbol.iterator]=function(){return this};return a},ka=function(a,b){ja();a instanceof String&&
|
|
(a+="");var c=0,d={next:function(){if(c<a.length){var e=c++;return{value:b(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};da("Object.is",function(a){return a?a:function(a,c){return a===c?0!==a||1/a===1/c:a!==a&&c!==c}});
|
|
da("Array.prototype.includes",function(a){return a?a:function(a,c){var b=this;b instanceof String&&(b=String(b));var e=b.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=b[c];if(f===a||Object.is(f,a))return!0}return!1}});da("String.prototype.includes",function(a){return a?a:function(a,c){return-1!==ea(this,a,"includes").indexOf(a,c||0)}});var la=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};
|
|
da("Object.entries",function(a){return a?a:function(a){var b=[],d;for(d in a)la(a,d)&&b.push([d,a[d]]);return b}});da("Array.prototype.values",function(a){return a?a:function(){return ka(this,function(a,c){return c})}});da("Object.values",function(a){return a?a:function(a){var b=[],d;for(d in a)la(a,d)&&b.push(a[d]);return b}});
|
|
da("Promise",function(a){function b(){this.sa=null}function c(a){return a instanceof e?a:new e(function(b){b(a)})}if(a)return a;b.prototype.pd=function(a){if(null==this.sa){this.sa=[];var b=this;this.qd(function(){b.Ie()})}this.sa.push(a)};var d=ca.setTimeout;b.prototype.qd=function(a){d(a,0)};b.prototype.Ie=function(){for(;this.sa&&this.sa.length;){var a=this.sa;this.sa=[];for(var b=0;b<a.length;++b){var c=a[b];a[b]=null;try{c()}catch(E){this.ze(E)}}}this.sa=null};b.prototype.ze=function(a){this.qd(function(){throw a;
|
|
})};var e=function(a){this.C=0;this.T=void 0;this.Ya=[];var b=this.Dc();try{a(b.resolve,b.reject)}catch(v){b.reject(v)}};e.prototype.Dc=function(){function a(a){return function(d){c||(c=!0,a.call(b,d))}}var b=this,c=!1;return{resolve:a(this.ef),reject:a(this.cd)}};e.prototype.ef=function(a){if(a===this)this.cd(new TypeError("A Promise cannot resolve to itself"));else if(a instanceof e)this.gf(a);else{a:switch(typeof a){case "object":var b=null!=a;break a;case "function":b=!0;break a;default:b=!1}b?
|
|
this.df(a):this.Ld(a)}};e.prototype.df=function(a){var b=void 0;try{b=a.then}catch(v){this.cd(v);return}"function"==typeof b?this.hf(b,a):this.Ld(a)};e.prototype.cd=function(a){this.pe(2,a)};e.prototype.Ld=function(a){this.pe(1,a)};e.prototype.pe=function(a,b){if(0!=this.C)throw Error("Cannot settle("+a+", "+b+"): Promise already settled in state"+this.C);this.C=a;this.T=b;this.Ke()};e.prototype.Ke=function(){if(null!=this.Ya){for(var a=0;a<this.Ya.length;++a)f.pd(this.Ya[a]);this.Ya=null}};var f=
|
|
new b;e.prototype.gf=function(a){var b=this.Dc();a.Jb(b.resolve,b.reject)};e.prototype.hf=function(a,b){var c=this.Dc();try{a.call(b,c.resolve,c.reject)}catch(E){c.reject(E)}};e.prototype.then=function(a,b){function c(a,b){return"function"==typeof a?function(b){try{d(a(b))}catch(La){f(La)}}:b}var d,f,g=new e(function(a,b){d=a;f=b});this.Jb(c(a,d),c(b,f));return g};e.prototype["catch"]=function(a){return this.then(void 0,a)};e.prototype.Jb=function(a,b){function c(){switch(d.C){case 1:a(d.T);break;
|
|
case 2:b(d.T);break;default:throw Error("Unexpected state: "+d.C);}}var d=this;null==this.Ya?f.pd(c):this.Ya.push(c)};e.resolve=c;e.reject=function(a){return new e(function(b,c){c(a)})};e.race=function(a){return new e(function(b,d){for(var e=k(a),f=e.next();!f.done;f=e.next())c(f.value).Jb(b,d)})};e.all=function(a){var b=k(a),d=b.next();return d.done?c([]):new e(function(a,e){function f(b){return function(c){g[b]=c;l--;0==l&&a(g)}}var g=[],l=0;do g.push(void 0),l++,c(d.value).Jb(f(g.length-1),e),
|
|
d=b.next();while(!d.done)})};return e});var ma="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)la(d,e)&&(a[e]=d[e])}return a};da("Object.assign",function(a){return a||ma});da("String.prototype.padStart",function(a){return a?a:function(a,c){var b=ea(this,null,"padStart");a-=b.length;c=void 0!==c?String(c):" ";return(0<a&&c?c.repeat(Math.ceil(a/c.length)).substring(0,a):"")+b}});
|
|
da("WeakMap",function(a){function b(){}function c(a){la(a,e)||ba(a,e,{value:new b})}function d(a){var d=Object[a];d&&(Object[a]=function(a){if(a instanceof b)return a;c(a);return d(a)})}if(function(){if(!a||!Object.seal)return!1;try{var b=Object.seal({}),c=Object.seal({}),d=new a([[b,2],[c,3]]);if(2!=d.get(b)||3!=d.get(c))return!1;d["delete"](b);d.set(c,4);return!d.has(b)&&4==d.get(c)}catch(Q){return!1}}())return a;var e="$jscomp_hidden_"+Math.random();d("freeze");d("preventExtensions");d("seal");
|
|
var f=0,g=function(a){this.J=(f+=Math.random()+1).toString();if(a){a=k(a);for(var b;!(b=a.next()).done;)b=b.value,this.set(b[0],b[1])}};g.prototype.set=function(a,b){c(a);if(!la(a,e))throw Error("WeakMap key fail: "+a);a[e][this.J]=b;return this};g.prototype.get=function(a){return la(a,e)?a[e][this.J]:void 0};g.prototype.has=function(a){return la(a,e)&&la(a[e],this.J)};g.prototype["delete"]=function(a){return la(a,e)&&la(a[e],this.J)?delete a[e][this.J]:!1};return g});
|
|
da("Map",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var b=Object.seal({x:4}),c=new a(k([[b,"s"]]));if("s"!=c.get(b)||1!=c.size||c.get({x:4})||c.set({x:4},"t")!=c||2!=c.size)return!1;var d=c.entries(),e=d.next();if(e.done||e.value[0]!=b||"s"!=e.value[1])return!1;e=d.next();return e.done||4!=e.value[0].x||"t"!=e.value[1]||!d.next().done?!1:!0}catch(sa){return!1}}())return a;ja();var b=new WeakMap,c=function(a){this.jb={};
|
|
this.M=f();this.size=0;if(a){a=k(a);for(var b;!(b=a.next()).done;)b=b.value,this.set(b[0],b[1])}};c.prototype.set=function(a,b){a=0===a?0:a;var c=d(this,a);c.list||(c.list=this.jb[c.id]=[]);c.I?c.I.value=b:(c.I={next:this.M,pa:this.M.pa,head:this.M,key:a,value:b},c.list.push(c.I),this.M.pa.next=c.I,this.M.pa=c.I,this.size++);return this};c.prototype["delete"]=function(a){a=d(this,a);return a.I&&a.list?(a.list.splice(a.index,1),a.list.length||delete this.jb[a.id],a.I.pa.next=a.I.next,a.I.next.pa=a.I.pa,
|
|
a.I.head=null,this.size--,!0):!1};c.prototype.clear=function(){this.jb={};this.M=this.M.pa=f();this.size=0};c.prototype.has=function(a){return!!d(this,a).I};c.prototype.get=function(a){return(a=d(this,a).I)&&a.value};c.prototype.entries=function(){return e(this,function(a){return[a.key,a.value]})};c.prototype.keys=function(){return e(this,function(a){return a.key})};c.prototype.values=function(){return e(this,function(a){return a.value})};c.prototype.forEach=function(a,b){for(var c=this.entries(),
|
|
d;!(d=c.next()).done;)d=d.value,a.call(b,d[1],d[0],this)};c.prototype[Symbol.iterator]=c.prototype.entries;var d=function(a,c){var d=c&&typeof c;"object"==d||"function"==d?b.has(c)?d=b.get(c):(d=""+ ++g,b.set(c,d)):d="p_"+c;var e=a.jb[d];if(e&&la(a.jb,d))for(a=0;a<e.length;a++){var f=e[a];if(c!==c&&f.key!==f.key||c===f.key)return{id:d,list:e,index:a,I:f}}return{id:d,list:e,index:-1,I:void 0}},e=function(a,b){var c=a.M;return ia(function(){if(c){for(;c.head!=a.M;)c=c.pa;for(;c.next!=c.head;)return c=
|
|
c.next,{done:!1,value:b(c)};c=null}return{done:!0,value:void 0}})},f=function(){var a={};return a.pa=a.next=a.head=a},g=0;return c});
|
|
var na=na||{},m=this,n=function(a){return void 0!==a},p=function(a){return"string"==typeof a},oa=function(a){return"boolean"==typeof a},q=function(a){return"number"==typeof a},pa=/^[\w+/_-]+[=]{0,2}$/,ra=null,ta=function(a){a=a.split(".");for(var b=m,c=0;c<a.length;c++)if(b=b[a[c]],null==b)return null;return b},ua=function(){},va=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==
|
|
c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},wa=function(a){return null!=a},r=function(a){return"array"==va(a)},xa=
|
|
function(a){var b=va(a);return"array"==b||"object"==b&&"number"==typeof a.length},ya=function(a){return t(a)&&"function"==typeof a.getFullYear},u=function(a){return"function"==va(a)},t=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},za="closure_uid_"+(1E9*Math.random()>>>0),Aa=0,Ba=function(a,b,c){return a.call.apply(a.bind,arguments)},Ca=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);
|
|
Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},w=function(a,b,c){w=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Ba:Ca;return w.apply(null,arguments)},Da=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}},Ea=Date.now||function(){return+new Date},x=function(a,b){a=a.split(".");var c=m;a[0]in c||"undefined"==typeof c.execScript||
|
|
c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&n(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}},y=function(a,b){function c(){}c.prototype=b.prototype;a.f=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.wf=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var z=function(){this.ea=this.ea;this.Yb=this.Yb};z.prototype.ea=!1;z.prototype.da=function(){this.ea||(this.ea=!0,this.h())};z.prototype.h=function(){if(this.Yb)for(;this.Yb.length;)this.Yb.shift()()};var Fa=function(a){a&&"function"==typeof a.da&&a.da()};var A=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Ha=!1;this.ke=!0};A.prototype.stopPropagation=function(){this.Ha=!0};A.prototype.preventDefault=function(){this.defaultPrevented=!0;this.ke=!1};var Ga=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,Ga);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};y(Ga,Error);Ga.prototype.name="CustomError";var Ha;var Ia=function(a,b){a=a.split("%s");for(var c="",d=a.length-1,e=0;e<d;e++)c+=a[e]+(e<b.length?b[e]:"%s");Ga.call(this,c+a[d])};y(Ia,Ga);Ia.prototype.name="AssertionError";
|
|
var Ja=function(a,b,c,d){var e="Assertion failed";if(c){e+=": "+c;var f=d}else a&&(e+=": "+a,f=b);throw new Ia(""+e,f||[]);},B=function(a,b,c){a||Ja("",null,b,Array.prototype.slice.call(arguments,2));return a},Ka=function(a,b){throw new Ia("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Ma=function(a,b,c){q(a)||Ja("Expected number but got %s: %s.",[va(a),a],b,Array.prototype.slice.call(arguments,2));return a},Na=function(a,b,c){p(a)||Ja("Expected string but got %s: %s.",[va(a),
|
|
a],b,Array.prototype.slice.call(arguments,2))},Oa=function(a,b,c){u(a)||Ja("Expected function but got %s: %s.",[va(a),a],b,Array.prototype.slice.call(arguments,2))},Pa=function(a,b,c){t(a)||Ja("Expected object but got %s: %s.",[va(a),a],b,Array.prototype.slice.call(arguments,2));return a};var Qa=Array.prototype.indexOf?function(a,b){B(null!=a.length);return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(p(a))return p(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Ra=Array.prototype.lastIndexOf?function(a,b){B(null!=a.length);return Array.prototype.lastIndexOf.call(a,b,a.length-1)}:function(a,b){var c=a.length-1;0>c&&(c=Math.max(0,a.length+c));if(p(a))return p(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in
|
|
a&&a[c]===b)return c;return-1},Sa=Array.prototype.forEach?function(a,b,c){B(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Ta=Array.prototype.filter?function(a,b){B(null!=a.length);return Array.prototype.filter.call(a,b,void 0)}:function(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var l=f[g];b.call(void 0,l,g,a)&&(d[e++]=l)}return d},Ua=Array.prototype.map?function(a,
|
|
b,c){B(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=p(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},Va=Array.prototype.some?function(a,b){B(null!=a.length);return Array.prototype.some.call(a,b,void 0)}:function(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1},Wa=Array.prototype.every?function(a,b,c){B(null!=a.length);return Array.prototype.every.call(a,
|
|
b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0},Xa=function(a,b){var c=0;Sa(a,function(a,e,f){b.call(void 0,a,e,f)&&++c},void 0);return c},Za=function(a){a:{var b=Ya;for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:p(a)?a.charAt(b):a[b]},$a=function(a,b){return 0<=Qa(a,b)},ab=function(a){if(!r(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},cb=
|
|
function(a,b){b=Qa(a,b);var c;(c=0<=b)&&bb(a,b);return c},bb=function(a,b){B(null!=a.length);Array.prototype.splice.call(a,b,1)},db=function(a){return Array.prototype.concat.apply([],arguments)},eb=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]},fb=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(xa(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var g=0;g<f;g++)a[e+g]=d[g]}else a.push(d)}},gb=function(a,b,c){B(null!=a.length);
|
|
return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},hb=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++];var f=e;f=t(f)?"o"+(f[za]||(f[za]=++Aa)):(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c},ib=function(a){var b=[];if(0>a-0)return[];for(var c=0;c<a;c+=1)b.push(c);return b};var jb=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]},kb=/&/g,lb=/</g,mb=/>/g,nb=/"/g,ob=/'/g,pb=/\x00/g,qb=/[\x00&<>"']/,rb=function(a,b){return a<b?-1:a>b?1:0};var sb;a:{var tb=m.navigator;if(tb){var ub=tb.userAgent;if(ub){sb=ub;break a}}sb=""}var vb=function(a){return-1!=sb.indexOf(a)};var wb=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},xb=function(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c},yb=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},zb=function(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1},Ab=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},Bb=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},Cb=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1},Eb=function(a){var b=
|
|
Db,c;for(c in b)if(a.call(void 0,b[c],c,b))return c},Fb=function(a){for(var b in a)return!1;return!0},Gb=function(a,b){b in a&&delete a[b]},Hb=function(a){var b={},c;for(c in a)b[c]=a[c];return b},Ib=function(a){var b=va(a);if("object"==b||"array"==b){if(u(a.clone))return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=Ib(a[c]);return b}return a},Jb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Kb=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=
|
|
arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<Jb.length;f++)c=Jb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var Lb=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},Mb=function(a){qb.test(a)&&(-1!=a.indexOf("&")&&(a=a.replace(kb,"&")),-1!=a.indexOf("<")&&(a=a.replace(lb,"<")),-1!=a.indexOf(">")&&(a=a.replace(mb,">")),-1!=a.indexOf('"')&&(a=a.replace(nb,""")),-1!=a.indexOf("'")&&(a=a.replace(ob,"'")),-1!=a.indexOf("\x00")&&(a=a.replace(pb,"�")));return a},Nb=function(a){var b=1;a=
|
|
a.split(":");for(var c=[];0<b&&a.length;)c.push(a.shift()),b--;a.length&&c.push(a.join(":"));return c};var Ob=function(a){Ob[" "](a);return a};Ob[" "]=ua;var Qb=function(a,b){var c=Pb;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var Rb=vb("Opera"),Sb=vb("Trident")||vb("MSIE"),Tb=vb("Edge"),Ub=vb("Gecko")&&!(-1!=sb.toLowerCase().indexOf("webkit")&&!vb("Edge"))&&!(vb("Trident")||vb("MSIE"))&&!vb("Edge"),Vb=-1!=sb.toLowerCase().indexOf("webkit")&&!vb("Edge"),Wb=function(){var a=m.document;return a?a.documentMode:void 0},Xb;
|
|
a:{var Yb="",Zb=function(){var a=sb;if(Ub)return/rv:([^\);]+)(\)|;)/.exec(a);if(Tb)return/Edge\/([\d\.]+)/.exec(a);if(Sb)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Vb)return/WebKit\/(\S+)/.exec(a);if(Rb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Zb&&(Yb=Zb?Zb[1]:"");if(Sb){var $b=Wb();if(null!=$b&&$b>parseFloat(Yb)){Xb=String($b);break a}}Xb=Yb}
|
|
var ac=Xb,Pb={},bc=function(a){return Qb(a,function(){for(var b=0,c=jb(String(ac)).split("."),d=jb(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",l=d[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""];if(0==g[0].length&&0==l[0].length)break;b=rb(0==g[1].length?0:parseInt(g[1],10),0==l[1].length?0:parseInt(l[1],10))||rb(0==g[2].length,0==l[2].length)||rb(g[2],l[2]);g=g[3];l=l[3]}while(0==b)}return 0<=b})},cc;var dc=m.document;
|
|
cc=dc&&Sb?Wb()||("CSS1Compat"==dc.compatMode?parseInt(ac,10):5):void 0;var ec=Object.freeze||function(a){return a};var fc=!Sb||9<=Number(cc),gc=Sb&&!bc("9"),hc=function(){if(!m.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{m.addEventListener("test",ua,b),m.removeEventListener("test",ua,b)}catch(c){}return a}();var ic=function(a,b){A.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.$=null;a&&this.init(a,b)};y(ic,A);var jc=ec({2:"touch",3:"pen",4:"mouse"});
|
|
ic.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(Ub){a:{try{Ob(b.nodeName);var e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=
|
|
d.screenY||0):(this.offsetX=Vb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=Vb||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=
|
|
a.pointerId||0;this.pointerType=p(a.pointerType)?a.pointerType:jc[a.pointerType]||"";this.state=a.state;this.$=a;a.defaultPrevented&&this.preventDefault()};ic.prototype.stopPropagation=function(){ic.f.stopPropagation.call(this);this.$.stopPropagation?this.$.stopPropagation():this.$.cancelBubble=!0};
|
|
ic.prototype.preventDefault=function(){ic.f.preventDefault.call(this);var a=this.$;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,gc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var kc="closure_listenable_"+(1E6*Math.random()|0),lc=function(a){return!(!a||!a[kc])},mc=0;var nc=function(a,b,c,d,e){this.listener=a;this.bc=null;this.src=b;this.type=c;this.capture=!!d;this.na=e;this.key=++mc;this.$a=this.Ib=!1},oc=function(a){a.$a=!0;a.listener=null;a.bc=null;a.src=null;a.na=null};var pc=function(a){this.src=a;this.G={};this.Eb=0};pc.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.G[f];a||(a=this.G[f]=[],this.Eb++);var g=qc(a,b,d,e);-1<g?(b=a[g],c||(b.Ib=!1)):(b=new nc(b,this.src,f,!!d,e),b.Ib=c,a.push(b));return b};pc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.G))return!1;var e=this.G[a];b=qc(e,b,c,d);return-1<b?(oc(e[b]),bb(e,b),0==e.length&&(delete this.G[a],this.Eb--),!0):!1};
|
|
var rc=function(a,b){var c=b.type;c in a.G&&cb(a.G[c],b)&&(oc(b),0==a.G[c].length&&(delete a.G[c],a.Eb--))};pc.prototype.Ab=function(a){a=a&&a.toString();var b=0,c;for(c in this.G)if(!a||c==a){for(var d=this.G[c],e=0;e<d.length;e++)++b,oc(d[e]);delete this.G[c];this.Eb--}};pc.prototype.nb=function(a,b,c,d){a=this.G[a.toString()];var e=-1;a&&(e=qc(a,b,c,d));return-1<e?a[e]:null};
|
|
pc.prototype.hasListener=function(a,b){var c=n(a),d=c?a.toString():"",e=n(b);return zb(this.G,function(a){for(var f=0;f<a.length;++f)if(!(c&&a[f].type!=d||e&&a[f].capture!=b))return!0;return!1})};var qc=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.$a&&f.listener==b&&f.capture==!!c&&f.na==d)return e}return-1};var sc="closure_lm_"+(1E6*Math.random()|0),tc={},uc=0,wc=function(a,b,c,d,e){if(d&&d.once)return vc(a,b,c,d,e);if(r(b)){for(var f=0;f<b.length;f++)wc(a,b[f],c,d,e);return null}c=xc(c);return lc(a)?a.ga(b,c,t(d)?!!d.capture:!!d,e):yc(a,b,c,!1,d,e)},yc=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=t(e)?!!e.capture:!!e,l=zc(a);l||(a[sc]=l=new pc(a));c=l.add(b,c,d,g,f);if(c.bc)return c;d=Ac();c.bc=d;d.src=a;d.listener=c;if(a.addEventListener)hc||(e=g),void 0===e&&(e=!1),a.addEventListener(b.toString(),
|
|
d,e);else if(a.attachEvent)a.attachEvent(Bc(b.toString()),d);else if(a.addListener&&a.removeListener)B("change"===b,"MediaQueryList only has a change event"),a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");uc++;return c},Ac=function(){var a=Cc,b=fc?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},vc=function(a,b,c,d,e){if(r(b)){for(var f=0;f<b.length;f++)vc(a,b[f],c,d,e);return null}c=xc(c);return lc(a)?
|
|
a.wb(b,c,t(d)?!!d.capture:!!d,e):yc(a,b,c,!0,d,e)},Dc=function(a,b,c,d,e){if(r(b))for(var f=0;f<b.length;f++)Dc(a,b[f],c,d,e);else d=t(d)?!!d.capture:!!d,c=xc(c),lc(a)?a.nc(b,c,d,e):a&&(a=zc(a))&&(b=a.nb(b,c,d,e))&&Ec(b)},Ec=function(a){if(!q(a)&&a&&!a.$a){var b=a.src;if(lc(b))rc(b.Z,a);else{var c=a.type,d=a.bc;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(Bc(c),d):b.addListener&&b.removeListener&&b.removeListener(d);uc--;(c=zc(b))?(rc(c,a),0==c.Eb&&(c.src=
|
|
null,b[sc]=null)):oc(a)}}},Bc=function(a){return a in tc?tc[a]:tc[a]="on"+a},Gc=function(a,b,c,d){var e=!0;if(a=zc(a))if(b=a.G[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.$a&&(f=Fc(f,d),e=e&&!1!==f)}return e},Fc=function(a,b){var c=a.listener,d=a.na||a.src;a.Ib&&Ec(a);return c.call(d,b)},Cc=function(a,b){if(a.$a)return!0;if(!fc){var c=b||ta("window.event");b=new ic(c,this);var d=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){a:{var e=!1;if(0==c.keyCode)try{c.keyCode=
|
|
-1;break a}catch(g){e=!0}if(e||void 0==c.returnValue)c.returnValue=!0}c=[];for(e=b.currentTarget;e;e=e.parentNode)c.push(e);a=a.type;for(e=c.length-1;!b.Ha&&0<=e;e--){b.currentTarget=c[e];var f=Gc(c[e],a,!0,b);d=d&&f}for(e=0;!b.Ha&&e<c.length;e++)b.currentTarget=c[e],f=Gc(c[e],a,!1,b),d=d&&f}return d}return Fc(a,new ic(b,this))},zc=function(a){a=a[sc];return a instanceof pc?a:null},Hc="__closure_events_fn_"+(1E9*Math.random()>>>0),xc=function(a){B(a,"Listener can not be null.");if(u(a))return a;B(a.handleEvent,
|
|
"An object listener must have handleEvent method.");a[Hc]||(a[Hc]=function(b){return a.handleEvent(b)});return a[Hc]};var C=function(){z.call(this);this.Z=new pc(this);this.xe=this;this.ad=null};y(C,z);C.prototype[kc]=!0;h=C.prototype;h.addEventListener=function(a,b,c,d){wc(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){Dc(this,a,b,c,d)};
|
|
h.dispatchEvent=function(a){Ic(this);var b=this.ad;if(b){var c=[];for(var d=1;b;b=b.ad)c.push(b),B(1E3>++d,"infinite loop")}b=this.xe;d=a.type||a;if(p(a))a=new A(a,b);else if(a instanceof A)a.target=a.target||b;else{var e=a;a=new A(d,b);Kb(a,e)}e=!0;if(c)for(var f=c.length-1;!a.Ha&&0<=f;f--){var g=a.currentTarget=c[f];e=Kc(g,d,!0,a)&&e}a.Ha||(g=a.currentTarget=b,e=Kc(g,d,!0,a)&&e,a.Ha||(e=Kc(g,d,!1,a)&&e));if(c)for(f=0;!a.Ha&&f<c.length;f++)g=a.currentTarget=c[f],e=Kc(g,d,!1,a)&&e;return e};
|
|
h.h=function(){C.f.h.call(this);this.Z&&this.Z.Ab(void 0);this.ad=null};h.ga=function(a,b,c,d){Ic(this);return this.Z.add(String(a),b,!1,c,d)};h.wb=function(a,b,c,d){return this.Z.add(String(a),b,!0,c,d)};h.nc=function(a,b,c,d){this.Z.remove(String(a),b,c,d)};var Kc=function(a,b,c,d){b=a.Z.G[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.$a&&g.capture==c){var l=g.listener,v=g.na||g.src;g.Ib&&rc(a.Z,g);e=!1!==l.call(v,d)&&e}}return e&&0!=d.ke};
|
|
C.prototype.nb=function(a,b,c,d){return this.Z.nb(String(a),b,c,d)};C.prototype.hasListener=function(a,b){return this.Z.hasListener(n(a)?String(a):void 0,b)};var Ic=function(a){B(a.Z,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var Lc=function(a){return a};var Mc="StopIteration"in m?m.StopIteration:{message:"StopIteration",stack:""},Nc=function(){};Nc.prototype.next=function(){throw Mc;};Nc.prototype.Oa=function(){return this};
|
|
var Oc=function(a){if(a instanceof Nc)return a;if("function"==typeof a.Oa)return a.Oa(!1);if(xa(a)){var b=0,c=new Nc;c.next=function(){for(;;){if(b>=a.length)throw Mc;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},Pc=function(a,b){if(xa(a))try{Sa(a,b,void 0)}catch(c){if(c!==Mc)throw c;}else{a=Oc(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==Mc)throw c;}}};var D=function(a,b){this.s={};this.j=[];this.Fb=this.l=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};h=D.prototype;h.m=function(){return this.l};h.w=function(){Qc(this);for(var a=[],b=0;b<this.j.length;b++)a.push(this.s[this.j[b]]);return a};h.ba=function(){Qc(this);return this.j.concat()};h.ta=function(a){return Rc(this.s,a)};
|
|
h.ib=function(a){for(var b=0;b<this.j.length;b++){var c=this.j[b];if(Rc(this.s,c)&&this.s[c]==a)return!0}return!1};h.equals=function(a,b){if(this===a)return!0;if(this.l!=a.m())return!1;b=b||Sc;Qc(this);for(var c,d=0;c=this.j[d];d++)if(!b(this.get(c),a.get(c)))return!1;return!0};var Sc=function(a,b){return a===b};D.prototype.isEmpty=function(){return 0==this.l};D.prototype.clear=function(){this.s={};this.Fb=this.l=this.j.length=0};
|
|
D.prototype.remove=function(a){return Rc(this.s,a)?(delete this.s[a],this.l--,this.Fb++,this.j.length>2*this.l&&Qc(this),!0):!1};var Qc=function(a){if(a.l!=a.j.length){for(var b=0,c=0;b<a.j.length;){var d=a.j[b];Rc(a.s,d)&&(a.j[c++]=d);b++}a.j.length=c}if(a.l!=a.j.length){var e={};for(c=b=0;b<a.j.length;)d=a.j[b],Rc(e,d)||(a.j[c++]=d,e[d]=1),b++;a.j.length=c}};h=D.prototype;h.get=function(a,b){return Rc(this.s,a)?this.s[a]:b};
|
|
h.set=function(a,b){Rc(this.s,a)||(this.l++,this.j.push(a),this.Fb++);this.s[a]=b};h.addAll=function(a){if(a instanceof D)for(var b=a.ba(),c=0;c<b.length;c++)this.set(b[c],a.get(b[c]));else for(b in a)this.set(b,a[b])};h.forEach=function(a,b){for(var c=this.ba(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};h.clone=function(){return new D(this)};
|
|
h.Oa=function(a){Qc(this);var b=0,c=this.Fb,d=this,e=new Nc;e.next=function(){if(c!=d.Fb)throw Error("The map has changed since the iterator was created");if(b>=d.j.length)throw Mc;var e=d.j[b++];return a?e:d.s[e]};return e};var Rc=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Tc=function(a){if(a.m&&"function"==typeof a.m)a=a.m();else if(xa(a)||p(a))a=a.length;else{var b=0,c;for(c in a)b++;a=b}return a},Uc=function(a){if(a.w&&"function"==typeof a.w)return a.w();if(p(a))return a.split("");if(xa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Ab(a)},Vc=function(a){if(a.ba&&"function"==typeof a.ba)return a.ba();if(!a.w||"function"!=typeof a.w){if(xa(a)||p(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return Bb(a)}},Wc=function(a,b,
|
|
c){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,c);else if(xa(a)||p(a))Sa(a,b,c);else for(var d=Vc(a),e=Uc(a),f=e.length,g=0;g<f;g++)b.call(c,e[g],d&&d[g],a)},Xc=function(a,b){if("function"==typeof a.every)return a.every(b,void 0);if(xa(a)||p(a))return Wa(a,b,void 0);for(var c=Vc(a),d=Uc(a),e=d.length,f=0;f<e;f++)if(!b.call(void 0,d[f],c&&c[f],a))return!1;return!0};var Yc=function(a){this.s=new D;a&&this.addAll(a)},Zc=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[za]||(a[za]=++Aa)):b.substr(0,1)+a};h=Yc.prototype;h.m=function(){return this.s.m()};h.add=function(a){this.s.set(Zc(a),a)};h.addAll=function(a){a=Uc(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};h.Ab=function(a){a=Uc(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};h.remove=function(a){return this.s.remove(Zc(a))};h.clear=function(){this.s.clear()};h.isEmpty=function(){return this.s.isEmpty()};
|
|
h.contains=function(a){return this.s.ta(Zc(a))};var $c=function(a,b){var c=new Yc;b=Uc(b);for(var d=0;d<b.length;d++){var e=b[d];a.contains(e)&&c.add(e)}return c},ad=function(a,b){a=a.clone();a.Ab(b);return a};Yc.prototype.w=function(){return this.s.w()};Yc.prototype.clone=function(){return new Yc(this)};Yc.prototype.equals=function(a){return this.m()==Tc(a)&&bd(this,a)};
|
|
var bd=function(a,b){var c=Tc(b);if(a.m()>c)return!1;!(b instanceof Yc)&&5<c&&(b=new Yc(b));return Xc(a,function(a){var c=b;return c.contains&&"function"==typeof c.contains?c.contains(a):c.ib&&"function"==typeof c.ib?c.ib(a):xa(c)||p(c)?$a(c,a):Cb(c,a)})};Yc.prototype.Oa=function(){return this.s.Oa(!1)};var cd=function(a,b,c){C.call(this);this.Ue=b;this.token=c;this.za=[];this.ld=new Yc;this.xa=0;this.url=a};y(cd,C);x("ee.AbstractOverlay",cd);var dd=function(a,b,c){var d=1<<c,e=b.x%d;0>e&&(e+=d);return[a.Ue,c,e,b.y].join("/")};cd.prototype.Mc=function(){return this.za.length};var ed=function(a){A.call(this,"tileevent");this.count=a};y(ed,A);var fd={kind:"discovery#restDescription",name:"earthengine",version:"v1",rootUrl:"https://earthengine.googleapis.com/",servicePath:"",batchPath:"batch",id:"earthengine:v1",parameters:{"$.xgafv":{location:"query",required:!1},access_token:{location:"query",required:!1},alt:{location:"query",required:!1},callback:{location:"query",required:!1},fields:{location:"query",required:!1},key:{location:"query",required:!1},oauth_token:{location:"query",required:!1},prettyPrint:{location:"query",required:!1},
|
|
quotaUser:{location:"query",required:!1},uploadType:{location:"query",required:!1},upload_protocol:{location:"query",required:!1}},resources:{algorithms:{methods:{list:{id:"earthengine.algorithms.list",path:"v1/algorithms",httpMethod:"GET"}}},assets:{methods:{copy:{id:"earthengine.assets.copy",path:"v1/{+sourceName}:copy",httpMethod:"POST",request:{$ref:"CopyAssetRequest"},parameters:{sourceName:{location:"path",required:!0}}},create:{id:"earthengine.assets.create",path:"v1/assets",httpMethod:"POST",
|
|
request:{$ref:"EarthEngineAsset"},parameters:{parent:{location:"query",required:!1},assetId:{location:"query",required:!1},overwrite:{location:"query",required:!1}}},"delete":{id:"earthengine.assets.delete",path:"v1/{+name}",httpMethod:"DELETE",parameters:{name:{location:"path",required:!0}}},get:{id:"earthengine.assets.get",path:"v1/{+name}",httpMethod:"GET",parameters:{name:{location:"path",required:!0},path:{location:"query",required:!1}}},getPixels:{id:"earthengine.assets.getPixels",path:"v1/{+name}:getPixels",
|
|
httpMethod:"POST",request:{$ref:"GetPixelsRequest"},parameters:{name:{location:"path",required:!0}}},ingestImage:{id:"earthengine.assets.ingestImage",path:"v1/assets:ingestImage",httpMethod:"POST",request:{$ref:"IngestImageRequest"}},ingestTable:{id:"earthengine.assets.ingestTable",path:"v1/assets:ingestTable",httpMethod:"POST",request:{$ref:"IngestTableRequest"}},list:{id:"earthengine.assets.list",path:"v1/{+name}:list",httpMethod:"GET",parameters:{name:{location:"path",required:!0},parentPath:{location:"query",
|
|
required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1}}},listFeatures:{id:"earthengine.assets.listFeatures",path:"v1/{+name}:listFeatures",httpMethod:"GET",parameters:{name:{location:"path",required:!0},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1},region:{location:"query",required:!1},filter:{location:"query",required:!1}}},listImages:{id:"earthengine.assets.listImages",path:"v1/{+name}:listImages",httpMethod:"GET",parameters:{name:{location:"path",
|
|
required:!0},parentPath:{location:"query",required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1},startTime:{location:"query",required:!1},endTime:{location:"query",required:!1},region:{location:"query",required:!1},filter:{location:"query",required:!1},view:{location:"query",required:!1}}},move:{id:"earthengine.assets.move",path:"v1/{+sourceName}:move",httpMethod:"POST",request:{$ref:"MoveAssetRequest"},parameters:{sourceName:{location:"path",required:!0}}},
|
|
patch:{id:"earthengine.assets.patch",path:"v1/{+name}",httpMethod:"PATCH",request:{$ref:"UpdateAssetRequest"},parameters:{name:{location:"path",required:!0}}}}},filmstripThumbnails:{methods:{create:{id:"earthengine.filmstripThumbnails.create",path:"v1/filmstripThumbnails",httpMethod:"POST",request:{$ref:"FilmstripThumbnail"},parameters:{parent:{location:"query",required:!1}}},getPixels:{id:"earthengine.filmstripThumbnails.getPixels",path:"v1/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",
|
|
required:!0}}}}},image:{methods:{compute:{id:"earthengine.image.compute",path:"v1/image:compute",httpMethod:"POST",request:{$ref:"ComputeImageRequest"}},"export":{id:"earthengine.image.export",path:"v1/image:export",httpMethod:"POST",request:{$ref:"ExportImageRequest"}},ingest:{id:"earthengine.image.ingest",path:"v1/image:ingest",httpMethod:"POST",request:{$ref:"IngestImageRequest"}}}},map:{methods:{"export":{id:"earthengine.map.export",path:"v1/map:export",httpMethod:"POST",request:{$ref:"ExportMapRequest"}}}},
|
|
maps:{methods:{create:{id:"earthengine.maps.create",path:"v1/maps",httpMethod:"POST",request:{$ref:"EarthEngineMap"},parameters:{parent:{location:"query",required:!1}}}},resources:{tiles:{methods:{get:{id:"earthengine.maps.tiles.get",path:"v1/{+parent}/tiles/{zoom}/{x}/{y}",httpMethod:"GET",parameters:{parent:{location:"path",required:!0},zoom:{location:"path",required:!0},x:{location:"path",required:!0},y:{location:"path",required:!0}}}}}}},operations:{methods:{cancel:{id:"earthengine.operations.cancel",
|
|
path:"v1/{+name}:cancel",httpMethod:"POST",request:{$ref:"CancelOperationRequest"},parameters:{name:{location:"path",required:!0}}},"delete":{id:"earthengine.operations.delete",path:"v1/{+name}",httpMethod:"DELETE",parameters:{name:{location:"path",required:!0}}},get:{id:"earthengine.operations.get",path:"v1/{+name}",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}},list:{id:"earthengine.operations.list",path:"v1/{+name}",httpMethod:"GET",parameters:{name:{location:"path",required:!0},
|
|
filter:{location:"query",required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1}}}}},projects:{methods:{},resources:{assets:{methods:{copy:{id:"earthengine.projects.assets.copy",path:"v1/{+sourceName}:copy",httpMethod:"POST",request:{$ref:"CopyAssetRequest"},parameters:{sourceName:{location:"path",required:!0}}},create:{id:"earthengine.projects.assets.create",path:"v1/{+parent}/assets",httpMethod:"POST",request:{$ref:"EarthEngineAsset"},parameters:{parent:{location:"path",
|
|
required:!0},assetId:{location:"query",required:!1},overwrite:{location:"query",required:!1}}},"delete":{id:"earthengine.projects.assets.delete",path:"v1/{+name}",httpMethod:"DELETE",parameters:{name:{location:"path",required:!0}}},get:{id:"earthengine.projects.assets.get",path:"v1/{+name}",httpMethod:"GET",parameters:{name:{location:"path",required:!0},path:{location:"query",required:!1}}},getIamPolicy:{id:"earthengine.projects.assets.getIamPolicy",path:"v1/{+resource}:getIamPolicy",httpMethod:"POST",
|
|
request:{$ref:"GetIamPolicyRequest"},parameters:{resource:{location:"path",required:!0}}},getPixels:{id:"earthengine.projects.assets.getPixels",path:"v1/{+name}:getPixels",httpMethod:"POST",request:{$ref:"GetPixelsRequest"},parameters:{name:{location:"path",required:!0}}},list:{id:"earthengine.projects.assets.list",path:"v1/{+name}:list",httpMethod:"GET",parameters:{name:{location:"path",required:!0},parentPath:{location:"query",required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query",
|
|
required:!1}}},listFeatures:{id:"earthengine.projects.assets.listFeatures",path:"v1/{+name}:listFeatures",httpMethod:"GET",parameters:{name:{location:"path",required:!0},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1},region:{location:"query",required:!1},filter:{location:"query",required:!1}}},listImages:{id:"earthengine.projects.assets.listImages",path:"v1/{+name}:listImages",httpMethod:"GET",parameters:{name:{location:"path",required:!0},parentPath:{location:"query",
|
|
required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1},startTime:{location:"query",required:!1},endTime:{location:"query",required:!1},region:{location:"query",required:!1},filter:{location:"query",required:!1},view:{location:"query",required:!1}}},move:{id:"earthengine.projects.assets.move",path:"v1/{+sourceName}:move",httpMethod:"POST",request:{$ref:"MoveAssetRequest"},parameters:{sourceName:{location:"path",required:!0}}},patch:{id:"earthengine.projects.assets.patch",
|
|
path:"v1/{+name}",httpMethod:"PATCH",request:{$ref:"UpdateAssetRequest"},parameters:{name:{location:"path",required:!0}}},setIamPolicy:{id:"earthengine.projects.assets.setIamPolicy",path:"v1/{+resource}:setIamPolicy",httpMethod:"POST",request:{$ref:"SetIamPolicyRequest"},parameters:{resource:{location:"path",required:!0}}},testIamPermissions:{id:"earthengine.projects.assets.testIamPermissions",path:"v1/{+resource}:testIamPermissions",httpMethod:"POST",request:{$ref:"TestIamPermissionsRequest"},parameters:{resource:{location:"path",
|
|
required:!0}}}}},filmstripThumbnails:{methods:{create:{id:"earthengine.projects.filmstripThumbnails.create",path:"v1/{+parent}/filmstripThumbnails",httpMethod:"POST",request:{$ref:"FilmstripThumbnail"},parameters:{parent:{location:"path",required:!0}}},getPixels:{id:"earthengine.projects.filmstripThumbnails.getPixels",path:"v1/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}}}},maps:{methods:{create:{id:"earthengine.projects.maps.create",path:"v1/{+parent}/maps",
|
|
httpMethod:"POST",request:{$ref:"EarthEngineMap"},parameters:{parent:{location:"path",required:!0}}}},resources:{tiles:{methods:{get:{id:"earthengine.projects.maps.tiles.get",path:"v1/{+parent}/tiles/{zoom}/{x}/{y}",httpMethod:"GET",parameters:{parent:{location:"path",required:!0},zoom:{location:"path",required:!0},x:{location:"path",required:!0},y:{location:"path",required:!0}}}}}}},thumbnails:{methods:{create:{id:"earthengine.projects.thumbnails.create",path:"v1/{+parent}/thumbnails",httpMethod:"POST",
|
|
request:{$ref:"Thumbnail"},parameters:{parent:{location:"path",required:!0}}},getPixels:{id:"earthengine.projects.thumbnails.getPixels",path:"v1/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}}}},videoThumbnails:{methods:{create:{id:"earthengine.projects.videoThumbnails.create",path:"v1/{+parent}/videoThumbnails",httpMethod:"POST",request:{$ref:"VideoThumbnail"},parameters:{parent:{location:"path",required:!0}}},getPixels:{id:"earthengine.projects.videoThumbnails.getPixels",
|
|
path:"v1/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}}}}}},table:{methods:{compute:{id:"earthengine.table.compute",path:"v1/table:compute",httpMethod:"POST",request:{$ref:"ComputeTableRequest"}},"export":{id:"earthengine.table.export",path:"v1/table:export",httpMethod:"POST",request:{$ref:"ExportTableRequest"}},ingest:{id:"earthengine.table.ingest",path:"v1/table:ingest",httpMethod:"POST",request:{$ref:"IngestTableRequest"}}}},thumbnails:{methods:{create:{id:"earthengine.thumbnails.create",
|
|
path:"v1/thumbnails",httpMethod:"POST",request:{$ref:"Thumbnail"},parameters:{parent:{location:"query",required:!1}}},getPixels:{id:"earthengine.thumbnails.getPixels",path:"v1/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}}}},v1:{methods:{computeImage:{id:"earthengine.computeImage",path:"v1:computeImage",httpMethod:"POST",request:{$ref:"ComputeImageRequest"}},computeTable:{id:"earthengine.computeTable",path:"v1:computeTable",httpMethod:"POST",request:{$ref:"ComputeTableRequest"}},
|
|
computeValue:{id:"earthengine.computeValue",path:"v1:computeValue",httpMethod:"POST",request:{$ref:"ComputeValueRequest"}},exportImage:{id:"earthengine.exportImage",path:"v1:exportImage",httpMethod:"POST",request:{$ref:"ExportImageRequest"}},exportMap:{id:"earthengine.exportMap",path:"v1:exportMap",httpMethod:"POST",request:{$ref:"ExportMapRequest"}},exportTable:{id:"earthengine.exportTable",path:"v1:exportTable",httpMethod:"POST",request:{$ref:"ExportTableRequest"}},exportVideo:{id:"earthengine.exportVideo",
|
|
path:"v1:exportVideo",httpMethod:"POST",request:{$ref:"ExportVideoRequest"}},exportVideoMap:{id:"earthengine.exportVideoMap",path:"v1:exportVideoMap",httpMethod:"POST",request:{$ref:"ExportVideoMapRequest"}},ingestImage:{id:"earthengine.ingestImage",path:"v1:ingestImage",httpMethod:"POST",request:{$ref:"IngestImageRequest"}},ingestTable:{id:"earthengine.ingestTable",path:"v1:ingestTable",httpMethod:"POST",request:{$ref:"IngestTableRequest"}},listBuckets:{id:"earthengine.listBuckets",path:"v1:listBuckets",
|
|
httpMethod:"GET"}}},value:{methods:{compute:{id:"earthengine.value.compute",path:"v1/value:compute",httpMethod:"POST",request:{$ref:"ComputeValueRequest"}}}},video:{methods:{"export":{id:"earthengine.video.export",path:"v1/video:export",httpMethod:"POST",request:{$ref:"ExportVideoRequest"}}}},videoMap:{methods:{"export":{id:"earthengine.videoMap.export",path:"v1/videoMap:export",httpMethod:"POST",request:{$ref:"ExportVideoMapRequest"}}}},videoThumbnails:{methods:{create:{id:"earthengine.videoThumbnails.create",
|
|
path:"v1/videoThumbnails",httpMethod:"POST",request:{$ref:"VideoThumbnail"},parameters:{parent:{location:"query",required:!1}}},getPixels:{id:"earthengine.videoThumbnails.getPixels",path:"v1/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}}}}},methods:{}};var gd=function(){},hd=function(a){return{constantValue:a}},id=function(a){return{valueReference:a}},jd=function(a,b){return{functionInvocationValue:{functionName:a,arguments:b}}},kd=function(a,b){return{functionInvocationValue:{arguments:b,functionReference:a}}},ld=function(a,b){return{functionDefinitionValue:{argumentNames:a,body:b}}},md=function(a){if(!a)return"AUTO_PNG_JPEG";a=a.toUpperCase();switch(a){case "JPG":return"JPEG";case "AUTO":return"AUTO_PNG_JPEG";case "GEOTIFF":return"GEO_TIFF";case "TFRECORD":return"TF_RECORD_IMAGE";
|
|
default:return a}},nd=function(a){if(!a)return[];if(p(a))return a.split(",");if(r(a))return a;throw Error("Invalid band list "+a);},qd=function(a){var b={};if("palette"in a){var c=a.palette;b.paletteColors=p(c)?c.split(","):c}c=[];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 d=b.paletteColors?b.paletteColors.length-1:255;c=od(a,"bias","gain").map(function(a){var b=-a.bias/a.gain;return{min:b,max:d/a.gain+b}})}else if("min"in
|
|
a||"max"in a)c=od(a,"min","max");0!==c.length&&(b.ranges=c);a=pd(a.gamma);if(1<a.length)throw Error("Only one gamma value is supported");1===a.length&&(b.gamma={value:a[0]});return Fb(b)?null:b},pd=function(a){return a?a.split(",").map(Number):[]},od=function(a,b,c){var d=pd(a[b]),e=pd(a[c]);if(0===d.length)return e.map(function(a){var d={};return d[b]=0,d[c]=a,d});if(0===e.length)return d.map(function(a){var d={};return d[b]=a,d[c]=1,d});if(d.length!==e.length)throw Error("Length of "+b+" and "+
|
|
c+" must match.");return d.map(function(a,d){var f={};return f[b]=a,f[c]=e[d],f})},rd=function(a){var b=function(a){var b={};b.description=a.description||"";b.type=a.type||"";null!=a.argumentName&&(b.name=a.argumentName);void 0!==a.defaultValue&&(b["default"]=a.defaultValue);null!=a.optional&&(b.optional=a.optional);return b},c=function(a){var c={};c.args=(a.arguments||[]).map(b);c.description=a.description||"";c.returns=a.returnType||"";null!=a.hidden&&(c.hidden=a.hidden);a.deprecated&&(c.deprecated=
|
|
a.deprecationReason);return c},d={};a=k(a.algorithms||[]);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.name.replace(/^algorithms\//,"");d[f]=c(e)}return d},sd=function(a){return/^projects\/[a-z][a-z0-9\-]{4,28}[a-z0-9]\/assets\/.*/.exec(a)?a:/^(users|projects)\/.*/.exec(a)?"projects/earthengine-legacy/assets/"+a:"projects/earthengine-public/assets/"+a},td=function(a){switch(a){case "ImageCollection":return"IMAGE_COLLECTION";case "Folder":return"FOLDER";default:return a}},ud=function(a){var b=
|
|
{};a.id&&(b.name=sd(a.id));a.num&&(b.pageSize=a.num);var c=["id","num"];a=k(Object.keys(a).filter(function(a){return!c.includes(a)}));for(var d=a.next();!d.done;d=a.next())console.warn("Unrecognized key "+d.value+" ignored");return b},wd=function(a){return(a.assets||[]).map(vd)},xd=function(a){return(a.assets||[]).map(vd)},yd=function(a){return(a.buckets||[]).map(vd)},vd=function(a){var b={type:function(a){switch(a){case "IMAGE":return"Image";case "IMAGE_COLLECTION":return"ImageCollection";case "FOLDER":return"Folder";
|
|
case "TABLE":return"Table";default:return"Unknown"}}[a.type]};null!=a.path&&(b.id=a.path);return b},Ad=function(a){var b={};a.id&&(b.name=sd(a.id));a.num&&(b.pageSize=a.num);a.starttime&&(b.startTime=(new Date(a.starttime)).toISOString());a.endtime&&(b.endTime=(new Date(a.endtime)).toISOString());a.bbox&&(b.region=zd(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=k(Object.keys(a).filter(function(a){return!c.includes(a)}));
|
|
for(var d=a.next();!d.done;d=a.next())console.warn("Unrecognized key "+d.value+" ignored");return b},zd=function(a){return'{"type":"Polygon","coordinates":[[['+[[0,1],[2,1],[2,3],[0,3],[0,1]].map(function(b){return a[b[0]]+","+a[b[1]]}).join("],[")+"]]]}"},Bd=function(a){var b={};(a.bindings||[]).forEach(function(a){b[a.role]=a.members});var c=function(a){return a.replace(/^group:|^user:/,"")};a=b["roles/viewer"]||[];var d=a.filter(function(a){return"allUsers"!==a});c={owners:(b["roles/owner"]||[]).map(c),
|
|
writers:(b["roles/editor"]||[]).map(c),readers:d.map(c)};a.length!=d.length&&(c.all_users_can_read=!0);return c},Cd=function(a){return{bindings:[{role:"roles/owner",members:a.owners||[]},{role:"roles/viewer",members:(a.readers||[]).concat(a.all_users_can_read?["allUsers"]:[])},{role:"roles/editor",members:a.writers||[]}].filter(function(a){return a.members.length}),etag:null}},Dd=function(a){var b={},c=function(a,c){null!=c&&(b[a]=Date.parse(c))},d=function(a){switch(a){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";default:return"UNKNOWN"}},e=a.metadata;null!=e.description&&(b.description=e.description);null!=e.state&&(b.state=d(e.state));c("creation_timestamp_ms",e.createTime);c("update_timestamp_ms",e.updateTime);c("start_timestamp_ms",e.startTime);a.done&&null!=a.error&&(b.error_message=a.error.message);null!=a.name&&(b.id=a.name.replace(/^operations\//,
|
|
""));b.task_type="UNKNOWN";return b};var Ed=function(){this.ka=-1};var Fd=function(){this.ka=-1;this.ka=64;this.F=Array(4);this.Ae=Array(this.ka);this.lc=this.gb=0;this.reset()};y(Fd,Ed);Fd.prototype.reset=function(){this.F[0]=1732584193;this.F[1]=4023233417;this.F[2]=2562383102;this.F[3]=271733878;this.lc=this.gb=0};
|
|
var Gd=function(a,b,c){c||(c=0);var d=Array(16);if(p(b))for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.F[0];c=a.F[1];e=a.F[2];var f=a.F[3];var g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&
|
|
(f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>>20);g=
|
|
e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295|
|
|
g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295|
|
|
g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295|
|
|
g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^
|
|
b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295;
|
|
f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+
|
|
(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295;
|
|
c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.F[0]=a.F[0]+b&4294967295;a.F[1]=a.F[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.F[2]=a.F[2]+e&4294967295;a.F[3]=a.F[3]+f&4294967295};
|
|
Fd.prototype.update=function(a,b){n(b)||(b=a.length);for(var c=b-this.ka,d=this.Ae,e=this.gb,f=0;f<b;){if(0==e)for(;f<=c;)Gd(this,a,f),f+=this.ka;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.ka){Gd(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.ka){Gd(this,d);e=0;break}}this.gb=e;this.lc+=b};
|
|
Fd.prototype.digest=function(){var a=Array((56>this.gb?this.ka:2*this.ka)-this.gb);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;var c=8*this.lc;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;4>b;++b)for(var d=0;32>d;d+=8)a[c++]=this.F[b]>>>d&255;return a};var Id=function(a){return(new Hd(void 0)).B(a)},Hd=function(a){this.dc=a};Hd.prototype.B=function(a){var b=[];Jd(this,a,b);return b.join("")};
|
|
var Jd=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(r(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],Jd(a,a.dc?a.dc.call(d,String(f),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),Kd(d,c),c.push(":"),Jd(a,a.dc?a.dc.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":Kd(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);}}},Ld={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Md=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,Kd=function(a,b){b.push('"',a.replace(Md,function(a){var b=Ld[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),
|
|
Ld[a]=b);return b}),'"')};var Nd=function(a){this.ra="__ee_hash__";this.Tb=!1!==a;this.ha=[];this.U={};this.fb=[]};x("ee.Serializer",Nd);var Od=new Hd,Pd=new Fd,Rd=function(a,b){return Qd(new Nd(n(b)?b:!0),a)};x("ee.Serializer.encode",Rd);var Sd=function(a){return Od.B(Rd(a))};x("ee.Serializer.toJSON",Sd);var Ud=function(a){return Td(Rd(a,!1))};x("ee.Serializer.toReadableJSON",Ud);
|
|
var Td=function(a){return"JSON"in m?m.JSON.stringify(a,null," "):Od.B(a)},Qd=function(a,b){b=a.Mb(b);a.Tb&&(b=t(b)&&"ValueRef"==b.type&&1==a.ha.length?a.ha[0][1]:{type:"CompoundValue",scope:a.ha,value:b},a.ha=[],Sa(a.fb,w(function(a){delete a[this.ra]},a)),a.fb=[],a.U={});return b};
|
|
Nd.prototype.Mb=function(a){if(!n(a))throw Error("Can't encode an undefined value.");var b=t(a)?a[this.ra]:null;if(this.Tb&&null!=b&&this.U[b])return{type:"ValueRef",value:this.U[b]};if(null===a||oa(a)||q(a)||p(a))return a;if(ya(a))return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof gd){var c=a.encode(w(this.Mb,this));if(!(r(c)||t(c)&&"ArgumentRef"!=c.type))return c}else if(r(a))c=Ua(a,function(a){return this.Mb(a)},this);else if(t(a)&&!u(a))c=yb(a,
|
|
function(a){if(!u(a))return this.Mb(a)},this),Gb(c,this.ra),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.Tb){b=Vd(c);if(this.U[b])var d=this.U[b];else d=String(this.ha.length),this.ha.push([d,c]),this.U[b]=d;a[this.ra]=b;this.fb.push(a);return{type:"ValueRef",value:d}}return c};var Vd=function(a){Pd.reset();Pd.update(Od.B(a));return Pd.digest().toString()},Xd=function(a){return Wd(new Nd(!0),a)};x("ee.Serializer.encodeCloudApi",Xd);
|
|
var Yd=function(a){a=Wd(new Nd(!1),a);var b=a.values,c=function(a){if(!t(a))return a;var d=r(a)?[]:{};a=k(Object.entries(a));for(var f=a.next();!f.done;f=a.next()){var g=k(f.value);f=g.next().value;g=g.next().value;d[f]="functionDefinitionValue"===f&&null!=g.body?{argumentNames:g.argumentNames,body:c(b[g.body])}:"functionInvocationValue"===f&&null!=g.functionReference?{arguments:g.arguments.map(c),functionReference:c(b[g.functionReference])}:"constantValue"===f?g:c(g)}return d};return c(b[a.result])};
|
|
x("ee.Serializer.encodeCloudApiPretty",Yd);var Zd=function(a){return Td(Yd(a))};x("ee.Serializer.toReadableCloudApiJSON",Zd);
|
|
var Wd=function(a,b){try{var c=$d(a,b);return ae(new be(c,a.ha,a.Tb))}finally{a.fb.forEach(function(b){return delete b[a.ra]}),a.fb=[],a.U={},a.ha=[]}},$d=function(a,b){var c=function(c){var d=Vd(c);if(a.U[d])return a.U[d];var e=String(a.ha.length);a.ha.push([e,c]);a.U[d]=e;t(b)&&(b[a.ra]=d,a.fb.push(b));return e};if(t(b)&&a.U[b[a.ra]])return a.U[b[a.ra]];if(null===b||oa(b)||p(b)||q(b))return c(hd(b));if(ya(b))return c(jd("Date",{value:hd(Math.floor(b.getTime()))}));if(b instanceof gd)return c(b.P(function(b){return $d(a,
|
|
b)}));if(r(b))return c({arrayValue:{values:b.map(function(b){return id($d(a,b))})}});if(t(b)&&!u(b)){var d={};Object.keys(b).sort().forEach(function(c){d[c]=id($d(a,b[c]))});return c({dictionaryValue:{values:d}})}throw Error("Can't encode object: "+b);},be=function(a,b,c){var d=this;this.le=a;this.values={};b.forEach(function(a){return d.values[a[0]]=a[1]});this.ge=c?ce(this):null;this.de={};this.bd={};this.Xe=0},ae=function(a){return{result:de(a,a.le),values:a.de}},de=function(a,b){if(b in a.bd)return a.bd[b];
|
|
var c=String(a.Xe++);a.bd[b]=c;a.de[c]=fe(a,a.values[b]);return c},fe=function(a,b){var c=function(a){return void 0!==a.constantValue};if(c(b)||null!=b.integerValue||null!=b.bytesValue||null!=b.argumentReference)return b;if(null!=b.valueReference)return c=a.values[b.valueReference],null===a.ge||1===a.ge[b.valueReference]?fe(a,c):ge(c)?c:id(de(a,b.valueReference));if(null!=b.arrayValue){var d=b.arrayValue.values.map(function(b){return fe(a,b)});return d.every(c)?hd(d.map(function(a){return a.constantValue})):
|
|
{arrayValue:{values:d}}}if(null!=b.dictionaryValue){d={};var e={};b=k(Object.entries(b.dictionaryValue.values||{}));for(var f=b.next();!f.done;f=b.next()){var g=k(f.value);f=g.next().value;g=g.next().value;d[f]=fe(a,g);null!==e&&c(d[f])?e[f]=d[f].constantValue:e=null}return null!==e?hd(e):{dictionaryValue:{values:d}}}if(null!=b.functionDefinitionValue)return c=b.functionDefinitionValue,ld(c.argumentNames||[],de(a,c.body||""));if(null!=b.functionInvocationValue){c=b.functionInvocationValue;d={};e=
|
|
k(Object.keys(c.arguments||{}));for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=fe(a,c.arguments[b]);return c.functionName?jd(c.functionName,d):kd(de(a,c.functionReference||""),d)}throw Error("Can't optimize value: "+b);},ge=function(a){var b=a.constantValue;return void 0!==b?null===b||q(b)||oa(b):null!=a.argumentReference},ce=function(a){var b={},c=function(c){b[c]?b[c]++:(b[c]=1,d(a.values[c]))},d=function(a){null!=a.arrayValue?a.arrayValue.values.forEach(d):null!=a.dictionaryValue?Object.values(a.dictionaryValue.values).forEach(d):
|
|
null!=a.functionDefinitionValue?c(a.functionDefinitionValue.body):null!=a.functionInvocationValue?(a=a.functionInvocationValue,null!=a.functionReference&&c(a.functionReference),Object.values(a.arguments).forEach(d)):null!=a.valueReference&&c(a.valueReference)};c(a.le);return b};Object.freeze&&Object.freeze([]);var he=function(a,b){this.Re=100;this.Ge=a;this.cf=b;this.Xb=0;this.M=null};he.prototype.get=function(){if(0<this.Xb){this.Xb--;var a=this.M;this.M=a.next;a.next=null}else a=this.Ge();return a};he.prototype.put=function(a){this.cf(a);this.Xb<this.Re&&(this.Xb++,a.next=this.M,this.M=a)};var ie=function(a){m.setTimeout(function(){throw a;},0)},je,ke=function(){var a=m.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!vb("Presto")&&(a=function(){var a=document.createElement("IFRAME");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow;a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host;
|
|
a=w(function(a){if(("*"==d||a.origin==d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!vb("Trident")&&!vb("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(n(c.next)){c=c.next;var a=c.xd;c.xd=null;a()}};return function(a){d.next={xd:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?
|
|
function(a){var b=document.createElement("SCRIPT");b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){m.setTimeout(a,0)}};var le=function(){this.qc=this.Na=null},ne=new he(function(){return new me},function(a){a.reset()});le.prototype.add=function(a,b){var c=ne.get();c.set(a,b);this.qc?this.qc.next=c:(B(!this.Na),this.Na=c);this.qc=c};le.prototype.remove=function(){var a=null;this.Na&&(a=this.Na,this.Na=this.Na.next,this.Na||(this.qc=null),a.next=null);return a};var me=function(){this.next=this.scope=this.Kc=null};me.prototype.set=function(a,b){this.Kc=a;this.scope=b;this.next=null};
|
|
me.prototype.reset=function(){this.next=this.scope=this.Kc=null};var se=function(a,b){oe||pe();qe||(oe(),qe=!0);re.add(a,b)},oe,pe=function(){if(m.Promise&&m.Promise.resolve){var a=m.Promise.resolve(void 0);oe=function(){a.then(te)}}else oe=function(){var a=te;!u(m.setImmediate)||m.Window&&m.Window.prototype&&!vb("Edge")&&m.Window.prototype.setImmediate==m.setImmediate?(je||(je=ke()),je(a)):m.setImmediate(a)}},qe=!1,re=new le,te=function(){for(var a;a=re.remove();){try{a.Kc.call(a.scope)}catch(b){ie(b)}ne.put(a)}qe=!1};var ue=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var xe=function(a){this.C=0;this.T=void 0;this.Qa=this.la=this.u=null;this.Pb=this.Gc=!1;if(a!=ua)try{var b=this;a.call(void 0,function(a){ve(b,2,a)},function(a){if(!(a instanceof we))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(d){}ve(b,3,a)})}catch(c){ve(this,3,c)}},ye=function(){this.next=this.context=this.Xa=this.Fa=this.Aa=null;this.Hb=!1};ye.prototype.reset=function(){this.context=this.Xa=this.Fa=this.Aa=null;this.Hb=!1};
|
|
var ze=new he(function(){return new ye},function(a){a.reset()}),Ae=function(a,b,c){var d=ze.get();d.Fa=a;d.Xa=b;d.context=c;return d};xe.prototype.then=function(a,b,c){null!=a&&Oa(a,"opt_onFulfilled should be a function.");null!=b&&Oa(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return Be(this,u(a)?a:null,u(b)?b:null,c)};xe.prototype.$goog_Thenable=!0;
|
|
xe.prototype.cancel=function(a){0==this.C&&se(function(){var b=new we(a);Ce(this,b)},this)};
|
|
var Ce=function(a,b){if(0==a.C)if(a.u){var c=a.u;if(c.la){for(var d=0,e=null,f=null,g=c.la;g&&(g.Hb||(d++,g.Aa==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.C&&1==d?Ce(c,b):(f?(d=f,B(c.la),B(null!=d),d.next==c.Qa&&(c.Qa=d),d.next=d.next.next):De(c),Ee(c,e,3,b)))}a.u=null}else ve(a,3,b)},Ge=function(a,b){a.la||2!=a.C&&3!=a.C||Fe(a);B(null!=b.Fa);a.Qa?a.Qa.next=b:a.la=b;a.Qa=b},Be=function(a,b,c,d){var e=Ae(null,null,null);e.Aa=new xe(function(a,g){e.Fa=b?function(c){try{var e=b.call(d,c);a(e)}catch(E){g(E)}}:
|
|
a;e.Xa=c?function(b){try{var e=c.call(d,b);!n(e)&&b instanceof we?g(b):a(e)}catch(E){g(E)}}:g});e.Aa.u=a;Ge(a,e);return e.Aa};xe.prototype.mf=function(a){B(1==this.C);this.C=0;ve(this,2,a)};xe.prototype.nf=function(a){B(1==this.C);this.C=0;ve(this,3,a)};
|
|
var ve=function(a,b,c){if(0==a.C){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.C=1;a:{var d=c,e=a.mf,f=a.nf;if(d instanceof xe){null!=e&&Oa(e,"opt_onFulfilled should be a function.");null!=f&&Oa(f,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");Ge(d,Ae(e||ua,f||null,a));var g=!0}else if(ue(d))d.then(e,f,a),g=!0;else{if(t(d))try{var l=d.then;if(u(l)){He(d,l,e,f,a);g=!0;break a}}catch(v){f.call(a,v);g=!0;break a}g=!1}}g||
|
|
(a.T=c,a.C=b,a.u=null,Fe(a),3!=b||c instanceof we||Ie(a,c))}},He=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},l=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,l)}catch(v){l(v)}},Fe=function(a){a.Gc||(a.Gc=!0,se(a.Je,a))},De=function(a){var b=null;a.la&&(b=a.la,a.la=b.next,b.next=null);a.la||(a.Qa=null);null!=b&&B(null!=b.Fa);return b};xe.prototype.Je=function(){for(var a;a=De(this);)Ee(this,a,this.C,this.T);this.Gc=!1};
|
|
var Ee=function(a,b,c,d){if(3==c&&b.Xa&&!b.Hb)for(;a&&a.Pb;a=a.u)a.Pb=!1;if(b.Aa)b.Aa.u=null,Je(b,c,d);else try{b.Hb?b.Fa.call(b.context):Je(b,c,d)}catch(e){Ke.call(null,e)}ze.put(b)},Je=function(a,b,c){2==b?a.Fa.call(a.context,c):a.Xa&&a.Xa.call(a.context,c)},Ie=function(a,b){a.Pb=!0;se(function(){a.Pb&&Ke.call(null,b)})},Ke=ie,we=function(a){Ga.call(this,a)};y(we,Ga);we.prototype.name="cancel";var Le=function(a,b,c){if(u(a))c&&(a=w(a,c));else if(a&&"function"==typeof a.handleEvent)a=w(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:m.setTimeout(a,b||0)};var Me=function(a,b,c){z.call(this);this.Se=null!=c?w(a,c):a;this.Oe=b;this.Ce=w(this.Ze,this);this.wc=[]};y(Me,z);h=Me.prototype;h.cb=!1;h.zb=0;h.Ka=null;h.Jc=function(a){this.wc=arguments;this.Ka||this.zb?this.cb=!0:Ne(this)};h.stop=function(){this.Ka&&(m.clearTimeout(this.Ka),this.Ka=null,this.cb=!1,this.wc=[])};h.pause=function(){this.zb++};h.resume=function(){this.zb--;this.zb||!this.cb||this.Ka||(this.cb=!1,Ne(this))};h.h=function(){Me.f.h.call(this);this.stop()};
|
|
h.Ze=function(){this.Ka=null;this.cb&&!this.zb&&(this.cb=!1,Ne(this))};var Ne=function(a){a.Ka=Le(a.Ce,a.Oe);a.Se.apply(null,a.wc)};var Qe=function(a,b){this.hd=a===Oe&&b||"";this.ve=Pe};Qe.prototype.Sc=!0;Qe.prototype.Pc=function(){return this.hd};Qe.prototype.toString=function(){return"Const{"+this.hd+"}"};var Re=function(a){if(a instanceof Qe&&a.constructor===Qe&&a.ve===Pe)return a.hd;Ka("expected object of type Const, got '"+a+"'");return"type_error:Const"},Pe={},Oe={};var Te=function(){this.ac="";this.we=Se};Te.prototype.Sc=!0;Te.prototype.Pc=function(){return this.ac};Te.prototype.toString=function(){return"TrustedResourceUrl{"+this.ac+"}"};
|
|
var Ue=function(a){if(a instanceof Te&&a.constructor===Te&&a.we===Se)return a.ac;Ka("expected object of type TrustedResourceUrl, got '"+a+"' of type "+va(a));return"type_error:TrustedResourceUrl"},Ze=function(a){var b=Re(Ve);if(!We.test(b))throw Error("Invalid TrustedResourceUrl format: "+b);var c=b.replace(Xe,function(c,e){if(!Object.prototype.hasOwnProperty.call(a,e))throw Error('Found marker, "'+e+'", in format string, "'+b+'", but no valid label mapping found in args: '+JSON.stringify(a));c=a[e];
|
|
return c instanceof Qe?Re(c):encodeURIComponent(String(c))});return Ye(c)},Xe=/%{(\w+)}/g,We=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Se={},Ye=function(a){var b=new Te;b.ac=a;return b};var $e=!Sb||9<=Number(cc),af=!Ub&&!Sb||Sb&&9<=Number(cc)||Ub&&bc("1.9.1");var cf=function(){this.$b="";this.ue=bf};cf.prototype.Sc=!0;cf.prototype.Pc=function(){return this.$b};cf.prototype.toString=function(){return"SafeUrl{"+this.$b+"}"};
|
|
var df=function(a){if(a instanceof cf&&a.constructor===cf&&a.ue===bf)return a.$b;Ka("expected object of type SafeUrl, got '"+a+"' of type "+va(a));return"type_error:SafeUrl"},ef=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))$/i,gf=function(a){if(ef.test(a.type)){var b=n(m.URL)&&n(m.URL.createObjectURL)?m.URL:n(m.webkitURL)&&n(m.webkitURL.createObjectURL)?m.webkitURL:
|
|
n(m.createObjectURL)?m:null;if(null==b)throw Error("This browser doesn't seem to support blob URLs");a=b.createObjectURL(a)}else a="about:invalid#zClosurez";return ff(a)},bf={},ff=function(a){var b=new cf;b.$b=a;return b};ff("about:blank");var hf=function(a,b){var c=(c=a&&a.ownerDocument)&&(c.defaultView||c.parentWindow)||m;if("undefined"!=typeof c.HTMLScriptElement&&"undefined"!=typeof c.Location&&"undefined"!=typeof c.Element){c=a&&(a instanceof c.HTMLScriptElement||!(a instanceof c.Location||a instanceof c.Element));var d=t(a)?a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a):void 0===a?"undefined":null===a?"null":typeof a;B(c,"Argument is not a %s (or a non-Element, non-Location mock); got: %s","HTMLScriptElement",
|
|
d)}a.src=Ue(b);if(null===ra)b:{b=m.document;if((b=b.querySelector&&b.querySelector("script[nonce]"))&&(b=b.nonce||b.getAttribute("nonce"))&&pa.test(b)){ra=b;break b}ra=""}b=ra;b&&a.setAttribute("nonce",b)};var kf=function(a,b){wb(b,function(b,d){b&&"object"==typeof b&&b.Sc&&(b=b.Pc());"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:jf.hasOwnProperty(d)?a.setAttribute(jf[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},jf={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",
|
|
width:"width"},mf=function(a,b,c){return lf(document,arguments)},lf=function(a,b){var c=String(b[0]),d=b[1];if(!$e&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',Mb(d.name),'"');if(d.type){c.push(' type="',Mb(d.type),'"');var e={};Kb(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(p(d)?c.className=d:r(d)?c.className=d.join(" "):kf(c,d));2<b.length&&nf(a,c,b,2);return c},nf=function(a,b,c,d){function e(c){c&&b.appendChild(p(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var f=
|
|
c[d];!xa(f)||t(f)&&0<f.nodeType?e(f):Sa(of(f)?eb(f):f,e)}},pf=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null},qf=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},rf=function(a){B(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},of=function(a){if(a&&"number"==typeof a.length){if(t(a))return"function"==typeof a.item||"string"==typeof a.item;if(u(a))return"function"==typeof a.item}return!1},sf=function(a){this.Lb=a||m.document||
|
|
document};h=sf.prototype;h.getElementsByTagName=function(a,b){return(b||this.Lb).getElementsByTagName(String(a))};h.Fe=function(a,b,c){return lf(this.Lb,arguments)};h.createElement=function(a){return this.Lb.createElement(String(a))};h.createTextNode=function(a){return this.Lb.createTextNode(String(a))};h.appendChild=function(a,b){B(null!=a&&null!=b,"goog.dom.appendChild expects non-null arguments");a.appendChild(b)};h.append=function(a,b){nf(rf(a),a,arguments,1)};
|
|
h.canHaveChildren=function(a){if(1!=a.nodeType)return!1;switch(a.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};h.removeNode=pf;
|
|
h.Nd=function(){return af&&void 0!=(void 0).children?(void 0).children:Ta((void 0).childNodes,function(a){return 1==a.nodeType})};h.contains=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};/*
|
|
Portions of this code are from MochiKit, received by
|
|
The Closure Authors under the MIT license. All other code is Copyright
|
|
2005-2009 The Closure Authors. All Rights Reserved.
|
|
*/
|
|
var uf=function(a){var b=tf;this.fc=[];this.$d=b;this.Cd=a||null;this.qb=this.Ua=!1;this.T=void 0;this.fd=this.sd=this.xc=!1;this.mc=0;this.u=null;this.yc=0};uf.prototype.cancel=function(a){if(this.Ua)this.T instanceof uf&&this.T.cancel();else{if(this.u){var b=this.u;delete this.u;a?b.cancel(a):(b.yc--,0>=b.yc&&b.cancel())}this.$d?this.$d.call(this.Cd,this):this.fd=!0;this.Ua||vf(this,new wf(this))}};uf.prototype.yd=function(a,b){this.xc=!1;xf(this,a,b)};
|
|
var xf=function(a,b,c){a.Ua=!0;a.T=c;a.qb=!b;yf(a)},Af=function(a){if(a.Ua){if(!a.fd)throw new zf(a);a.fd=!1}};uf.prototype.callback=function(a){Af(this);Bf(a);xf(this,!0,a)};var vf=function(a,b){Af(a);Bf(b);xf(a,!1,b)},Bf=function(a){B(!(a instanceof uf),"An execution sequence may not be initiated with a blocking Deferred.")},Cf=function(a,b,c){B(!a.sd,"Blocking Deferreds can not be re-used");a.fc.push([b,c,void 0]);a.Ua&&yf(a)};
|
|
uf.prototype.then=function(a,b,c){var d,e,f=new xe(function(a,b){d=a;e=b});Cf(this,d,function(a){a instanceof wf?f.cancel():e(a)});return f.then(a,b,c)};uf.prototype.$goog_Thenable=!0;
|
|
var Df=function(a){return Va(a.fc,function(a){return u(a[1])})},yf=function(a){if(a.mc&&a.Ua&&Df(a)){var b=a.mc,c=Ef[b];c&&(m.clearTimeout(c.J),delete Ef[b]);a.mc=0}a.u&&(a.u.yc--,delete a.u);b=a.T;for(var d=c=!1;a.fc.length&&!a.xc;){var e=a.fc.shift(),f=e[0],g=e[1];e=e[2];if(f=a.qb?g:f)try{var l=f.call(e||a.Cd,b);n(l)&&(a.qb=a.qb&&(l==b||l instanceof Error),a.T=b=l);if(ue(b)||"function"===typeof m.Promise&&b instanceof m.Promise)d=!0,a.xc=!0}catch(v){b=v,a.qb=!0,Df(a)||(c=!0)}}a.T=b;d&&(l=w(a.yd,
|
|
a,!0),d=w(a.yd,a,!1),b instanceof uf?(Cf(b,l,d),b.sd=!0):b.then(l,d));c&&(b=new Ff(b),Ef[b.J]=b,a.mc=b.J)},zf=function(){Ga.call(this)};y(zf,Ga);zf.prototype.message="Deferred has already fired";zf.prototype.name="AlreadyCalledError";var wf=function(){Ga.call(this)};y(wf,Ga);wf.prototype.message="Deferred was canceled";wf.prototype.name="CanceledError";var Ff=function(a){this.J=m.setTimeout(w(this.lf,this),0);this.Nb=a};
|
|
Ff.prototype.lf=function(){B(Ef[this.J],"Cannot throw an error that is not scheduled.");delete Ef[this.J];throw this.Nb;};var Ef={};var Jf=function(a){var b={},c=b.document||document,d=Ue(a),e=document.createElement("SCRIPT"),f={me:e,Db:void 0},g=new uf(f),l=null,v=null!=b.timeout?b.timeout:5E3;0<v&&(l=window.setTimeout(function(){Gf(e,!0);vf(g,new Hf(1,"Timeout reached for loading script "+d))},v),f.Db=l);e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(Gf(e,b.xf||!1,l),g.callback(null))};e.onerror=function(){Gf(e,!0,l);vf(g,new Hf(0,"Error while loading script "+d))};
|
|
f=b.attributes||{};Kb(f,{type:"text/javascript",charset:"UTF-8"});kf(e,f);hf(e,a);If(c).appendChild(e)},If=function(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&0!=b.length?b[0]:a.documentElement},tf=function(){if(this&&this.me){var a=this.me;a&&"SCRIPT"==a.tagName&&Gf(a,!0,this.Db)}},Gf=function(a,b,c){null!=c&&m.clearTimeout(c);a.onload=ua;a.onerror=ua;a.onreadystatechange=ua;b&&window.setTimeout(function(){pf(a)},0)},Hf=function(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=
|
|
": "+b);Ga.call(this,c);this.code=a};y(Hf,Ga);var Kf=function(a,b,c){this.reset(a,b,c,void 0,void 0)};Kf.prototype.Fd=null;var Lf=0;Kf.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Lf++;d||Ea();this.ub=a;delete this.Fd};Kf.prototype.oe=function(a){this.ub=a};var Mf=function(a){this.Zd=a;this.Qd=this.zc=this.ub=this.u=null},Nf=function(a,b){this.name=a;this.value=b};Nf.prototype.toString=function(){return this.name};var Of=new Nf("SEVERE",1E3),Pf=new Nf("INFO",800),Qf=new Nf("CONFIG",700),Rf=new Nf("FINE",500);Mf.prototype.getName=function(){return this.Zd};Mf.prototype.getParent=function(){return this.u};Mf.prototype.Nd=function(){this.zc||(this.zc={});return this.zc};Mf.prototype.oe=function(a){this.ub=a};
|
|
var Sf=function(a){if(a.ub)return a.ub;if(a.u)return Sf(a.u);Ka("Root logger has no level set.");return null};Mf.prototype.log=function(a,b,c){if(a.value>=Sf(this).value)for(u(b)&&(b=b()),a=new Kf(a,String(b),this.Zd),c&&(a.Fd=c),c=this;c;){var d=c,e=a;if(d.Qd)for(var f=0;b=d.Qd[f];f++)b(e);c=c.getParent()}};Mf.prototype.info=function(a,b){this.log(Pf,a,b)};
|
|
var Tf={},Uf=null,Vf=function(a){Uf||(Uf=new Mf(""),Tf[""]=Uf,Uf.oe(Qf));var b;if(!(b=Tf[a])){b=new Mf(a);var c=a.lastIndexOf("."),d=a.substr(c+1);c=Vf(a.substr(0,c));c.Nd()[d]=b;b.u=c;Tf[a]=b}return b};var Wf=function(a,b){a&&a.log(Rf,b,void 0)};var Xf=function(a){switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:return!0;default:return!1}};var Yf=function(){};Yf.prototype.wd=null;Yf.prototype.pb=function(){var a;(a=this.wd)||(a={},Zf(this)&&(a[0]=!0,a[1]=!0),a=this.wd=a);return a};var $f=function(a,b){this.qf=a;this.$e=b};y($f,Yf);$f.prototype.Bc=function(){return this.qf()};$f.prototype.pb=function(){return this.$e()};var ag=function(){return ag.Gd.Bc()};ag.te=!1;ag.pb=function(){return ag.Gd.pb()};ag.yf=function(a,b){ag.ne(new $f(B(a),B(b)))};ag.ne=function(a){ag.Gd=a};var bg=function(){};y(bg,Yf);bg.prototype.Bc=function(){var a=Zf(this);return a?new ActiveXObject(a):new XMLHttpRequest};
|
|
var Zf=function(a){if(ag.te)return"";if(!a.Rd&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.Rd=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Rd};ag.ne(new bg);var cg=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,dg=function(a,b){if(a){a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),e=null;if(0<=d){var f=a[c].substring(0,d);e=a[c].substring(d+1)}else f=a[c];b(f,e?decodeURIComponent(e.replace(/\+/g," ")):"")}}};var F=function(a){C.call(this);this.headers=new D;this.sc=a||null;this.Y=!1;this.rc=this.a=null;this.tb=this.Wd=this.Ub="";this.Ea=this.Tc=this.Sb=this.Fc=!1;this.eb=0;this.ic=null;this.bb="";this.oc=this.af=this.se=!1};y(F,C);var eg=F.prototype,fg=Vf("goog.net.XhrIo");eg.N=fg;var gg=/^https?$/i,hg=["POST","PUT"],ig=[];F.prototype.Ee=function(){this.da();cb(ig,this)};
|
|
F.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Ub+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Ub=a;this.tb="";this.Wd=b;this.Fc=!1;this.Y=!0;this.a=this.sc?this.sc.Bc():ag();this.rc=this.sc?this.sc.pb():ag.pb();this.a.onreadystatechange=w(this.ce,this);this.af&&"onprogress"in this.a&&(this.a.onprogress=w(function(a){this.be(a,!0)},this),this.a.upload&&(this.a.upload.onprogress=w(this.be,this)));try{Wf(this.N,jg(this,"Opening Xhr")),
|
|
this.Tc=!0,this.a.open(b,String(a),!0),this.Tc=!1}catch(f){Wf(this.N,jg(this,"Error opening Xhr: "+f.message));this.Nb(5,f);return}a=c||"";var e=this.headers.clone();d&&Wc(d,function(a,b){e.set(b,a)});d=Za(e.ba());c=m.FormData&&a instanceof m.FormData;!$a(hg,b)||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");e.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.bb&&(this.a.responseType=this.bb);"withCredentials"in this.a&&this.a.withCredentials!==this.se&&
|
|
(this.a.withCredentials=this.se);try{kg(this),0<this.eb&&(this.oc=lg(this.a),Wf(this.N,jg(this,"Will abort after "+this.eb+"ms if incomplete, xhr2 "+this.oc)),this.oc?(this.a.timeout=this.eb,this.a.ontimeout=w(this.Db,this)):this.ic=Le(this.Db,this.eb,this)),Wf(this.N,jg(this,"Sending request")),this.Sb=!0,this.a.send(a),this.Sb=!1}catch(f){Wf(this.N,jg(this,"Send error: "+f.message)),this.Nb(5,f)}};
|
|
var lg=function(a){return Sb&&bc(9)&&q(a.timeout)&&n(a.ontimeout)},Ya=function(a){return"content-type"==a.toLowerCase()};F.prototype.Db=function(){"undefined"!=typeof na&&this.a&&(this.tb="Timed out after "+this.eb+"ms, aborting",Wf(this.N,jg(this,this.tb)),this.dispatchEvent("timeout"),this.abort(8))};F.prototype.Nb=function(a,b){this.Y=!1;this.a&&(this.Ea=!0,this.a.abort(),this.Ea=!1);this.tb=b;mg(this);ng(this)};var mg=function(a){a.Fc||(a.Fc=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
|
|
F.prototype.abort=function(){this.a&&this.Y&&(Wf(this.N,jg(this,"Aborting")),this.Y=!1,this.Ea=!0,this.a.abort(),this.Ea=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ng(this))};F.prototype.h=function(){this.a&&(this.Y&&(this.Y=!1,this.Ea=!0,this.a.abort(),this.Ea=!1),ng(this,!0));F.f.h.call(this)};F.prototype.ce=function(){this.ea||(this.Tc||this.Sb||this.Ea?og(this):this.Ye())};F.prototype.Ye=function(){og(this)};
|
|
var og=function(a){if(a.Y&&"undefined"!=typeof na)if(a.rc[1]&&4==a.ua()&&2==a.getStatus())Wf(a.N,jg(a,"Local request error detected and ignored"));else if(a.Sb&&4==a.ua())Le(a.ce,0,a);else if(a.dispatchEvent("readystatechange"),4==a.ua()){Wf(a.N,jg(a,"Request complete"));a.Y=!1;try{var b=a.getStatus(),c;if(!(c=Xf(b))){var d;if(d=0===b){var e=String(a.Ub).match(cg)[1]||null;if(!e&&m.self&&m.self.location){var f=m.self.location.protocol;e=f.substr(0,f.length-1)}d=!gg.test(e?e.toLowerCase():"")}c=d}if(c)a.dispatchEvent("complete"),
|
|
a.dispatchEvent("success");else{try{var g=2<a.ua()?a.a.statusText:""}catch(l){Wf(a.N,"Can not get status: "+l.message),g=""}a.tb=g+" ["+a.getStatus()+"]";mg(a)}}finally{ng(a)}}};F.prototype.be=function(a,b){B("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(pg(a,"progress"));this.dispatchEvent(pg(a,b?"downloadprogress":"uploadprogress"))};
|
|
var pg=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},ng=function(a,b){if(a.a){kg(a);var c=a.a,d=a.rc[0]?ua:null;a.a=null;a.rc=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(a=a.N)&&a.log(Of,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},kg=function(a){a.a&&a.oc&&(a.a.ontimeout=null);a.ic&&(m.clearTimeout(a.ic),a.ic=null)};F.prototype.Td=function(){return!!this.a};
|
|
F.prototype.ua=function(){return this.a?this.a.readyState:0};F.prototype.getStatus=function(){try{return 2<this.ua()?this.a.status:-1}catch(a){return-1}};
|
|
var qg=function(a){try{if(!a.a)return null;if("response"in a.a)return a.a.response;switch(a.bb){case "":case "text":return a.a.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.a)return a.a.mozResponseArrayBuffer}var b=a.N;b&&b.log(Of,"Response type "+a.bb+" is not supported on this browser",void 0);return null}catch(c){return Wf(a.N,"Can not get response: "+c.message),null}};
|
|
F.prototype.getResponseHeader=function(a){if(this.a&&4==this.ua())return a=this.a.getResponseHeader(a),null===a?void 0:a};F.prototype.getAllResponseHeaders=function(){return this.a&&4==this.ua()?this.a.getAllResponseHeaders()||"":""};
|
|
var rg=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=Nb(a[c]),e=d[0];d=d[1];if(p(d)){d=d.trim();var f=b[e]||[];b[e]=f;f.push(d)}}return yb(b,function(a){return a.join(", ")})},jg=function(a,b){return b+" ["+a.Wd+" "+a.Ub+" "+a.getStatus()+"]"};var sg=function(a,b){this.ma=this.Ma=this.wa="";this.Za=null;this.Ba=this.oa="";this.V=this.Pe=!1;if(a instanceof sg){this.V=n(b)?b:a.V;tg(this,a.wa);var c=a.Ma;ug(this);this.Ma=c;c=a.ma;ug(this);this.ma=c;vg(this,a.Za);this.setPath(a.getPath());wg(this,a.X.clone());a=a.Ba;ug(this);this.Ba=a}else a&&(c=String(a).match(cg))?(this.V=!!b,tg(this,c[1]||"",!0),a=c[2]||"",ug(this),this.Ma=xg(a),a=c[3]||"",ug(this),this.ma=xg(a,!0),vg(this,c[4]),this.setPath(c[5]||"",!0),wg(this,c[6]||"",!0),a=c[7]||"",
|
|
ug(this),this.Ba=xg(a)):(this.V=!!b,this.X=new yg(null,this.V))};
|
|
sg.prototype.toString=function(){var a=[],b=this.wa;b&&a.push(zg(b,Ag,!0),":");var c=this.ma;if(c||"file"==b)a.push("//"),(b=this.Ma)&&a.push(zg(b,Ag,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.Za,null!=c&&a.push(":",String(c));if(c=this.getPath())this.ma&&"/"!=c.charAt(0)&&a.push("/"),a.push(zg(c,"/"==c.charAt(0)?Bg:Cg,!0));(c=this.X.toString())&&a.push("?",c);(c=this.Ba)&&a.push("#",zg(c,Dg));return a.join("")};
|
|
sg.prototype.resolve=function(a){var b=this.clone(),c=!!a.wa;c?tg(b,a.wa):c=!!a.Ma;if(c){var d=a.Ma;ug(b);b.Ma=d}else c=!!a.ma;c?(d=a.ma,ug(b),b.ma=d):c=null!=a.Za;d=a.getPath();if(c)vg(b,a.Za);else if(c=!!a.oa){if("/"!=d.charAt(0))if(this.ma&&!this.oa)d="/"+d;else{var e=b.getPath().lastIndexOf("/");-1!=e&&(d=b.getPath().substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){d=0==e.lastIndexOf("/",0);e=e.split("/");for(var f=[],g=0;g<e.length;){var l=e[g++];
|
|
"."==l?d&&g==e.length&&f.push(""):".."==l?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),d&&g==e.length&&f.push("")):(f.push(l),d=!0)}d=f.join("/")}else d=e}c?b.setPath(d):c=""!==a.X.toString();c?wg(b,a.X.clone()):c=!!a.Ba;c&&(a=a.Ba,ug(b),b.Ba=a);return b};sg.prototype.clone=function(){return new sg(this)};var tg=function(a,b,c){ug(a);a.wa=c?xg(b,!0):b;a.wa&&(a.wa=a.wa.replace(/:$/,""))},vg=function(a,b){ug(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Za=b}else a.Za=null};
|
|
sg.prototype.getPath=function(){return this.oa};sg.prototype.setPath=function(a,b){ug(this);this.oa=b?xg(a,!0):a;return this};var wg=function(a,b,c){ug(a);b instanceof yg?(a.X=b,a.X.ed(a.V)):(c||(b=zg(b,Eg)),a.X=new yg(b,a.V))};sg.prototype.getQuery=function(){return this.X.toString()};sg.prototype.removeParameter=function(a){ug(this);this.X.remove(a);return this};var ug=function(a){if(a.Pe)throw Error("Tried to modify a read-only Uri");};sg.prototype.ed=function(a){this.V=a;this.X&&this.X.ed(a)};
|
|
var Fg=function(a){return a instanceof sg?a.clone():new sg(a,void 0)},xg=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},zg=function(a,b,c){return p(a)?(a=encodeURI(a).replace(b,Gg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},Gg=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},Ag=/[#\/\?@]/g,Cg=/[#\?:]/g,Bg=/[#\?]/g,Eg=/[#\?@]/g,Dg=/#/g,yg=function(a,b){this.l=this.o=null;this.R=a||null;this.V=!!b},Hg=function(a){a.o||
|
|
(a.o=new D,a.l=0,a.R&&dg(a.R,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=yg.prototype;h.m=function(){Hg(this);return this.l};h.add=function(a,b){Hg(this);this.R=null;a=Ig(this,a);var c=this.o.get(a);c||this.o.set(a,c=[]);c.push(b);this.l=Ma(this.l)+1;return this};h.remove=function(a){Hg(this);a=Ig(this,a);return this.o.ta(a)?(this.R=null,this.l=Ma(this.l)-this.o.get(a).length,this.o.remove(a)):!1};h.clear=function(){this.o=this.R=null;this.l=0};
|
|
h.isEmpty=function(){Hg(this);return 0==this.l};h.ta=function(a){Hg(this);a=Ig(this,a);return this.o.ta(a)};h.ib=function(a){var b=this.w();return $a(b,a)};h.forEach=function(a,b){Hg(this);this.o.forEach(function(c,d){Sa(c,function(c){a.call(b,c,d,this)},this)},this)};h.ba=function(){Hg(this);for(var a=this.o.w(),b=this.o.ba(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};
|
|
h.w=function(a){Hg(this);var b=[];if(p(a))this.ta(a)&&(b=db(b,this.o.get(Ig(this,a))));else{a=this.o.w();for(var c=0;c<a.length;c++)b=db(b,a[c])}return b};h.set=function(a,b){Hg(this);this.R=null;a=Ig(this,a);this.ta(a)&&(this.l=Ma(this.l)-this.o.get(a).length);this.o.set(a,[b]);this.l=Ma(this.l)+1;return this};h.get=function(a,b){if(!a)return b;a=this.w(a);return 0<a.length?String(a[0]):b};
|
|
h.setValues=function(a,b){this.remove(a);0<b.length&&(this.R=null,this.o.set(Ig(this,a),eb(b)),this.l=Ma(this.l)+b.length)};h.toString=function(){if(this.R)return this.R;if(!this.o)return"";for(var a=[],b=this.o.ba(),c=0;c<b.length;c++){var d=b[c],e=encodeURIComponent(String(d));d=this.w(d);for(var f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}}return this.R=a.join("&")};
|
|
h.clone=function(){var a=new yg;a.R=this.R;this.o&&(a.o=this.o.clone(),a.l=this.l);return a};var Ig=function(a,b){b=String(b);a.V&&(b=b.toLowerCase());return b};yg.prototype.ed=function(a){a&&!this.V&&(Hg(this),this.R=null,this.o.forEach(function(a,c){var b=c.toLowerCase();c!=b&&(this.remove(c),this.setValues(b,a))},this));this.V=a};yg.prototype.extend=function(a){for(var b=0;b<arguments.length;b++)Wc(arguments[b],function(a,b){this.add(b,a)},this)};var Pg=function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];d&&(fb(f,d),hb(f));Jg=a;Kg=f;null===a?Lg=null:Mg(function(){Ng(b,c,e||Da(Og,b,c))})};x("ee.data.authenticateViaOauth",Pg);var Qg=function(a,b,c,d,e){Pg(a,b,c,d,e)};x("ee.data.authenticate",Qg);var Og=function(a,b){m.gapi.auth.authorize({client_id:Jg,immediate:!1,scope:Kg.join(" ")},Da(Rg,a,b))};x("ee.data.authenticateViaPopup",Og);
|
|
var Tg=function(a,b,c,d){if("undefined"===typeof process)throw Error("Use of private key authentication in the browser is insecure. Consider using OAuth, instead.");var e=["https://www.googleapis.com/auth/earthengine","https://www.googleapis.com/auth/devstorage.read_write"];d&&(fb(e,d),hb(e));Jg=a.client_email;Kg=e;var f=new googleapis.auth.JWT(a.client_email,null,a.private_key,e,null);Sg=function(a,b){f.authorize(function(a,c){a?b({error:a}):b({access_token:c.access_token,token_type:c.token_type,
|
|
expires_in:(c.expiry_date-Date.now())/1E3})})};Ng(b,c)};x("ee.data.authenticateViaPrivateKey",Tg);var Ug=[],Wg=function(a){Vg=a};x("ee.data.setApiKey",Wg);Ug.push("setApiKey");var Xg=function(a){if(a&&!ta("gapi"))throw Error('Cloud API requires <script src="https://apis.google.com/js/api.js">');G=a};x("ee.data.setCloudApiEnabled",Xg);Ug.push("setCloudApiEnabled");var Yg=function(){return G};x("ee.data.getCloudApiEnabled",Yg);Ug.push("getCloudApiEnabled");
|
|
var Zg=function(a,b,c,d,e,f,g){var l=["https://www.googleapis.com/auth/earthengine"];e&&(fb(l,e),hb(l));Jg=a;Kg=l;var v={token_type:b,access_token:c,state:l.join(" "),expires_in:d};Rg(void 0,void 0,v);!1===g?f&&f():Mg(function(){m.gapi.auth.setToken(v);f&&f()})};x("ee.data.setAuthToken",Zg);var Ng=function(a,b,c){Sg&&Jg&&Sg({client_id:String(Jg),immediate:!0,scope:Kg.join(" ")},function(d){"immediate_failed"==d.error&&c?c():Rg(a,b,d)})},$g=function(a){Sg=a};x("ee.data.setAuthTokenRefresher",$g);
|
|
var ch=function(){ah&&0<=Ea()-ah&&bh();return Lg};x("ee.data.getAuthToken",ch);var bh=function(){ah=Lg=null};x("ee.data.clearAuthToken",bh);var dh=function(){return Jg};x("ee.data.getAuthClientId",dh);var eh=function(){return Kg};x("ee.data.getAuthScopes",eh);
|
|
var lh=function(a,b,c){null!=a?fh=a:gh||(fh="https://earthengine.googleapis.com/api");null!=b?hh=b:gh||(hh="https://earthengine.googleapis.com");n(c)&&(ih=c);!G||jh&&null==a||(jh=new Promise(function(a,b){gapi.load("client",{callback:function(){var b=Object.assign({},fd,{rootUrl:fh.replace(/\/api$/,"")});gapi.client.init({apiKey:Vg,discoveryDocs:[b]}).then(function(){kh=!0;gapi.client.earthengine.v1=gapi.client.earthengine;a()})},onerror:b})}));gh=!0},H=function(a,b,c){lh();if(c){var d=function(a){return mh(a.status,
|
|
function(b){return a.headers[b.toLowerCase()]},a.body,null,c,b||Lc)};jh.then(function(){a().then(d,d)});return null}if(!kh)throw Error("Cloud API not ready");var e=nh(function(){a().then(function(){return null},function(){return null})});return mh(e.status,function(a){try{return e.getResponseHeader(a)}catch(g){return null}},e.responseText,null,void 0,b||Lc)},nh=function(a){if(XMLHttpRequest.prototype.tc)throw Error("Cannot initialize synchronous request mode");var b=function(){this.ja=new this.tc;
|
|
XMLHttpRequest.Qe=this.ja};b.prototype.open=function(a,b,e,f,g){this.ja.open(a,b,!1,f,g)};b.prototype.send=function(a){this.ja.send(a)};b.prototype.abort=function(){this.ja.abort()};b.prototype.overrideMimeType=function(a){this.ja.overrideMimeType(a)};b.prototype.setRequestHeader=function(a,b){this.ja.setRequestHeader(a,b)};b.prototype.getResponseHeader=function(a){return this.ja.getResponseHeader(a)};b.prototype.getAllResponseHeaders=function(){return this.ja.getAllResponseHeaders()};"onabort onerror onload onloadstart onloadend onprogress onreadystatechange readyState responseText responseType responseXML status statusText upload withCredentials DONE UNSENT HEADERS_RECEIVED LOADING OPENED".split(" ").forEach(function(a){return Object.defineProperty(b.prototype,
|
|
a,{get:function(){return this.ja[a]},set:function(b){this.ja[a]=b}})});b.prototype.tc=XMLHttpRequest;XMLHttpRequest=b;try{return a(),XMLHttpRequest.Qe}finally{XMLHttpRequest=XMLHttpRequest.prototype.tc}},ph=function(a){oh=a};x("ee.data.setDeadline",ph);x("ee.data.setParamAugmenter",function(a){qh=a||Lc});var rh=function(){return fh};x("ee.data.getApiBaseUrl",rh);var sh=function(){return hh};x("ee.data.getTileBaseUrl",sh);var th=function(){return ih};x("ee.data.getXsrfToken",th);
|
|
var uh=function(a){if(G)return H(function(){return gapi.client.earthengine.algorithms.list({Zb:!1})},rd,a);var b=I("/algorithms",null,a,"GET");return a?null:b},wh=function(a,b){if(G){if(p(a.image))throw Error("Image as JSON string not supported.");if(n(a.version))throw Error("Image version specification not supported.");var c={name:null,expression:Xd(a.image),fileFormat:md(a.format),bandIds:nd(a.bands),visualizationOptions:qd(a)},d=["name"];return H(function(){return gapi.client.earthengine.maps.create({Hd:d},
|
|
c)},function(a){return vh(a.name,"","/v1/{}/tiles",Vg?"?key="+Vg:"")},b)}a=Hb(a);p(a.image)||(a.image=a.image.B());var e=function(a){return vh(a.mapid,a.token,"/map/{}","?token={}")};return b?(I("/mapid",J(a),function(a,c){return b(a&&e(a),c)}),null):e(I("/mapid",J(a)))};x("ee.data.getMapId",wh);var xh=function(a,b,c,d){return a.formatTileUrl(b,c,d)};x("ee.data.getTileUrl",xh);
|
|
var vh=function(a,b,c,d){c=hh+c.replace("{}",a);d=d.replace("{}",b);return{mapid:a,token:b,formatTileUrl:function(a,b,g){var e=Math.pow(2,g);a%=e;0>a&&(a+=e);return[c,g,a,b].join("/")+d}}},yh=function(a,b){a=Hb(a);return I("/value",J(a),b)};x("ee.data.getValue",yh);
|
|
var zh=function(a,b){if(G){var c=Xd(a);return H(function(){return gapi.client.earthengine.value.compute({expression:c})},function(a){return a.result},b)}a={json:Sd(a)};return I("/value",J(a),b)},Ah=function(a,b){if(G){if(p(a.image))throw Error("Image as JSON string not supported.");if(n(a.version))throw Error("Image version specification not supported.");if(n(a.region))throw Error('"region" not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');var c={name:null,expression:Xd(a.image),
|
|
fileFormat:md(a.format),bandIds:nd(a.bands),visualizationOptions:qd(a),grid:null},d=["name"];return H(function(){return gapi.client.earthengine.thumbnails.create({Hd:d},c)},function(a){return{thumbid:a.name,token:""}},b)}a=Hb(a);p(a.image)||(a.image=a.image.B());r(a.dimensions)&&(a.dimensions=a.dimensions.join("x"));a=J(a).add("getid","1");return I("/thumb",a,b)};x("ee.data.getThumbId",Ah);
|
|
var Bh=function(a){return G?hh+"/v1/"+a.thumbid+":getPixels"+(Vg?"?key="+Vg:""):hh+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};x("ee.data.makeThumbUrl",Bh);var Ch=function(a,b){a=Hb(a);return I("/download",J(a),b)};x("ee.data.getDownloadId",Ch);var Dh=function(a){return hh+"/api/download?docid="+a.docid+"&token="+a.token};x("ee.data.makeDownloadUrl",Dh);var Eh=function(a,b){a=Hb(a);return I("/table",J(a),b)};x("ee.data.getTableDownloadId",Eh);
|
|
var Fh=function(a){return hh+"/api/table?docid="+a.docid+"&token="+a.token};x("ee.data.makeTableDownloadUrl",Fh);var Hh=function(a,b,c){var d=Gh;try{return Gh=a,b.call(c)}finally{Gh=d}};x("ee.data.withProfiling",Hh);
|
|
var Ih=function(a,b){if(G){var c=function(a){return Math.floor(Math.random()*Math.pow(2,4*a)).toString(16).padStart(a,"0")};a=ib(a||1).map(function(){return[c(8),c(4),"4"+c(3),(8+Math.floor(4*Math.random())).toString(16)+c(3),c(12)].join("-")});return b?b(a):a}var d={};q(a)&&(d.count=a);return I("/newtaskid",J(d),b)};x("ee.data.newTaskId",Ih);
|
|
x("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!r(a))throw Error("Invalid taskId: expected a string or an array of strings.");return G?H(function(){if(1===a.length)return gapi.client.earthengine.operations.get({name:"operations/"+a[0]});var b=gapi.client.newBatch();a.forEach(function(a){b.add(gapi.client.earthengine.operations.get({name:"operations/"+a}),{id:a})});return b},function(b){return 1===a.length?Dd(b):a.map(function(a){return Dd(b[a])})},b):I("/taskstatus?q="+a.join(),null,
|
|
b,"GET")});x("ee.data.getTaskList",function(a){return Jh(void 0,a)});
|
|
var Jh=function(a,b){function c(b){var c={pagesize:500};a&&(c.pagesize=Math.min(c.pagesize,a-e.tasks.length));b&&(c.pagetoken=b);return c}function d(b,f){I("/tasklist",J(c(f)),function(c,f){f?b(e,f):(fb(e.tasks,c.tasks),!c.next_page_token||a&&e.tasks.length>=a?b(e):d(b,c.next_page_token))},"GET")}if(G)return b?(Kh(a,function(a,c){return b(a?{tasks:a.map(Dd)}:null,c)}),null):{tasks:Kh(a).map(Dd)};var e={tasks:[]};if(b)return d(b),null;for(var f="";;){var g=I("/tasklist",J(c(f)),void 0,"GET");fb(e.tasks,
|
|
g.tasks);f=g.next_page_token;if(!g.next_page_token||a&&e.tasks.length>=a)break}return e};x("ee.data.getTaskListWithLimit",Jh);var Kh=function(a,b){var c=[],d={name:"operations",pageSize:500,filter:null,pageToken:null},e=function(){return gapi.client.earthengine.operations.list(d)},f=b?function(){return 0}:void 0,g=function(l){fb(c,l.operations||[]);!l.nextPageToken||a&&c.length>=a?b&&b(a?c.slice(0,a):c):(d.pageToken=l.nextPageToken,H(e,g,f));return null};H(e,g,f);return b?null:a?c.slice(0,a):c};
|
|
x("ee.data.cancelTask",function(a,b){return Lh(a,"CANCEL",b)});
|
|
var Lh=function(a,b,c){if(p(a))a=[a];else if(!r(a))throw Error("Invalid taskId: expected a string or an array of strings.");if(!Cb(Mh,b))throw Error("Invalid action: "+b);return G?H(function(){if(1===a.length)return gapi.client.earthengine.operations.cancel({name:"operations/"+a[0]});var b=gapi.client.newBatch();a.forEach(function(a){b.add(gapi.client.earthengine.operations.cancel({name:"operations/"+a}),{id:a})});return b},null,c):I("/updatetask",J({id:a,action:b}),c,"POST")};
|
|
x("ee.data.updateTask",Lh);var Nh=function(a,b,c){b=Hb(b);null!=b.element&&(b.json=b.element.B(),delete b.element);b.id=a;return I("/processingrequest",J(b),c)};x("ee.data.startProcessing",Nh);x("ee.data.startIngestion",function(a,b,c){a={id:a,request:Id(b)};return I("/ingestionrequest",J(a),c)});x("ee.data.startTableIngestion",function(a,b,c){a={id:a,tableRequest:Id(b)};return I("/ingestionrequest",J(a),c)});
|
|
var Oh=function(a,b){if(G){var c={name:sd(a),Zb:!1};return H(function(){return gapi.client.earthengine.assets.get(c)},null,b)}return I("/info",(new yg).add("id",a),b)};x("ee.data.getAsset",Oh);Ug.push("getAsset");x("ee.data.getInfo",Oh);
|
|
var Ph=function(a,b){if(G){if(Object.keys(a).every(function(a){return"id"===a||"num"===a})){var c=ud(a);return H(function(){return gapi.client.earthengine.assets.list(c)},wd,b)}var d=Ad(a);return H(function(){return gapi.client.earthengine.assets.listImages({Hd:"assets(type,path)"},d)},xd,b)}a=J(a);return I("/list",a,b)};x("ee.data.getList",Ph);var Qh=function(a,b){return H(function(){return gapi.client.earthengine.assets.list(a)},null,b)};x("ee.data.listAssets",Qh);Ug.push("listAssets");
|
|
var Rh=function(a,b){return H(function(){return gapi.client.earthengine.assets.listImages(a)},null,b)};x("ee.data.listImages",Rh);Ug.push("listImages");var Sh=function(a){return H(function(){return gapi.client.earthengine.v1.listBuckets({})},null,a)};x("ee.data.listBuckets",Sh);Ug.push("listBuckets");x("ee.data.getAssetRoots",function(a){return G?H(function(){return gapi.client.earthengine.v1.listBuckets({})},yd,a):I("/buckets",null,a,"GET")});
|
|
x("ee.data.createAssetHome",function(a,b){if(G){var c={type:"Folder",name:sd(a)};H(function(){return gapi.client.earthengine.assets.create(c)},null,b)}else a=J({id:a}),I("/createbucket",a,b)});
|
|
x("ee.data.createAsset",function(a,b,c,d,e){if(G){if(c)throw Error("Asset overwrite not supported.");if(p(a))throw Error("Asset cannot be specified as string.");b=a.name||b&&sd(b);if(!b)throw Error("Either asset name or opt_path must be specified.");var f=b.indexOf("/assets/");if(-1===f)throw Error("Asset name must contain /assets/.");a=Object.assign({},a);delete a.name;d&&!a.properties&&(a.properties=d);a.type=td(a.type);var g={asset:a,parent:b.slice(0,f),assetId:b.slice(f+8),overwrite:c||!1};return H(function(){return gapi.client.earthengine.assets.create(g)},
|
|
null,e)}p(a)||(a=Id(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;void 0!=d&&(a.properties=Id(d));return I("/create",J(a),e)});x("ee.data.createFolder",function(a,b,c){if(G){var d={type:"Folder",name:sd(a)};return H(function(){return gapi.client.earthengine.assets.create(d)},null,c)}return I("/createfolder",J({id:a,force:b||!1}),c)});
|
|
x("ee.data.renameAsset",function(a,b,c){if(G){var d={sourceName:sd(a),destinationName:sd(b),sourcePath:null,destinationPath:null};H(function(){return gapi.client.earthengine.assets.move(d)},null,c)}else I("/rename",J({sourceId:a,destinationId:b}),c)});
|
|
x("ee.data.copyAsset",function(a,b,c){if(G){var d={sourceName:sd(a),destinationName:sd(b),overwrite:!1,sourcePath:null,destinationPath:null,bandIds:null};H(function(){return gapi.client.earthengine.assets.copy(d)},null,c)}else I("/copy",J({sourceId:a,destinationId:b}),c)});x("ee.data.deleteAsset",function(a,b){if(G){var c={name:sd(a)};H(function(){return gapi.client.earthengine.assets["delete"](c)},null,b)}else I("/delete",J({id:a}),b)});
|
|
x("ee.data.getAssetAcl",function(a,b){if(G){var c={ff:sd(a),Zb:!1};return H(function(){return gapi.client.earthengine.projects.assets.getIamPolicy(c)},Bd,b)}return I("/getacl",J({id:a}),b,"GET")});x("ee.data.setAssetAcl",function(a,b,c){if(G){var d={ff:sd(a),policy:Cd(b),Zb:!1};H(function(){return gapi.client.earthengine.projects.assets.setIamPolicy(d)},null,c)}else a={id:a,value:Id(b)},I("/setacl",J(a),c)});
|
|
x("ee.data.setAssetProperties",function(a,b,c){if(G){var d=Object.keys(b).map(function(a){return"properties."+a}),e={name:sd(a),asset:{properties:b},updateMask:{paths:d}};H(function(){return gapi.client.earthengine.assets.patch(e)},null,c)}else a={id:a,properties:Id(b)},I("/setproperties",J(a),c)});
|
|
x("ee.data.getAssetRootQuota",function(a,b){if(G){var c={name:sd(a),Zb:!1};return H(function(){return gapi.client.earthengine.assets.get(c)},function(b){if(!b.quota)throw Error(a+" is not a root folder.");var c=function(a){return Number(b.quota[a]||0)};return{assetCount:{usage:c("assetCount"),limit:c("maxAssetCount")},vf:{usage:c("sizeBytes"),limit:c("maxSizeBytes")}}},b)}return I("/quota",J({id:a}),b,"GET")});
|
|
var Mh={rf:"CANCEL",uf:"UPDATE"},I=function(a,b,c,d){lh();var e=Gh,f={"Content-Type":"application/x-www-form-urlencoded"},g=ch();if(null!=g)f.Authorization=g;else if(c&&Sg&&Jg)return Ng(function(){Hh(e,function(){I(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new yg;e&&b.add("profiling","1");null!=Vg&&b.add("key",Vg);b=qh(b,a);null!=ih&&(f["X-XSRF-Token"]=ih);var l=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(l)||(a+=-1!=a.indexOf("?")?"&":"?",a+=l,l=null);var v=fh+a;if(c)return Th.push(Uh(v,c,g,
|
|
l,f)),Vh.Jc(),null;for(var E=function(a,b){this.setRequestHeader&&this.setRequestHeader(b,a)},Q,sa=0;;){Q=ag();Q.open(g,v,!1);wb(f,E,Q);Q.send(l);if(429!=Q.status||5<sa)break;sa++}return mh(Q.status,function(a){try{return Q.getResponseHeader(a)}catch(Jc){return null}},Q.responseText,e)},Uh=function(a,b,c,d,e){var f=0,g={url:a,method:c,content:d,headers:e},l=Gh;g.callback=function(a){a=a.target;if(429==a.getStatus()&&10>f)return f++,setTimeout(function(){Th.push(g);Vh.Jc()},Math.min(12E4,1E3*Math.pow(2,
|
|
f))),null;var c=mh,d=a.getStatus(),e=w(a.getResponseHeader,a);try{var v=a.a?a.a.responseText:""}catch(Jc){Wf(a.N,"Can not get responseText: "+Jc.message),v=""}return c(d,e,v,l,b)};return g},mh=function(a,b,c,d,e,f){f=void 0===f?function(a){return a.data}:f;var g=b("X-Earth-Engine-Computation-Profile");g&&d&&d(g);b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==b||"text/json"==b)try{var l=JSON.parse(c);var v=f(l)}catch(Q){var E="Invalid JSON: "+c}else E="Response was unexpectedly not JSON, but "+
|
|
b;if(t(l))"error"in l&&"message"in l.error?E=l.error.message:void 0===v&&(E="Malformed response: "+c);else if(0===a)E="Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";else if(200>a||300<=a)E="Server returned HTTP code: "+a;if(e)return e(v,E),null;if(!E)return v;throw Error(E);},Mg=function(a){var b=function(){m.gapi.config.update("client/cors",!0);Sg||(Sg=m.gapi.auth.authorize);a()};if(t(m.gapi)&&t(m.gapi.auth)&&u(m.gapi.auth.authorize))b();
|
|
else{for(var c=Ea().toString(36);c in m;)c+="_";m[c]=function(){delete m[c];b()};Jf(Ze({onload:c}))}},Rg=function(a,b,c){if(c.access_token){b=c.token_type+" "+c.access_token;if(c.expires_in||0===c.expires_in)c=900*c.expires_in,setTimeout(Ng,.9*c),ah=Ea()+c;Lg=b;a&&a()}else b&&b(c.error||"Unknown error.")},J=function(a){var b=new yg;a=k(Object.entries(a));for(var c=a.next();!c.done;c=a.next()){var d=k(c.value);c=d.next().value;d=d.next().value;b.set(c,d)}return b},Th=[],Vh=new Me(function(){var a=
|
|
Th.shift();if(a){var b=a.url,c=a.callback,d=a.method,e=a.content;a=a.headers;var f=oh,g=new F;ig.push(g);c&&g.ga("complete",c);g.wb("ready",g.Ee);f&&(g.eb=Math.max(0,f));g.send(b,d,e,a)}0==Th.length||Vh.Jc()},350),fh=null,hh=null,ih=null,qh=Lc,Lg=null,ah=null,Jg=null,Kg=[],Sg=null,Ve=new Qe(Oe,"https://apis.google.com/js/client.js?onload=%{onload}"),Vg=null,G=!1,jh=null,kh=!1,gh=!1,oh=0,Gh=null;var K=function(a,b,c){if(!(this instanceof K))return Wh(K,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.A=c||null};y(K,gd);x("ee.ComputedObject",K);K.prototype.evaluate=function(a){if(!a||!u(a))throw Error("evaluate() requires a callback function.");zh(this,a)};K.prototype.evaluate=K.prototype.evaluate;
|
|
K.prototype.D=function(a){return zh(this,a)};K.prototype.getInfo=K.prototype.D;K.prototype.encode=function(a){if(null===this.i&&null===this.args)return{type:"ArgumentRef",value:this.A};var b={},c;for(c in this.args)n(this.args[c])&&(b[c]=a(this.args[c]));b={type:"Invocation",arguments:b};a=a(this.i);b[p(a)?"functionName":"function"]=a;return b};
|
|
K.prototype.P=function(a){if(null===this.i&&null===this.args)return{argumentReference:this.A||"uninitializedVar"};var b={},c;for(c in this.args)n(this.args[c])&&(b[c]=id(a(this.args[c])));return p(this.i)?jd(String(this.i),b):this.i.Ec(a,b)};K.prototype.B=function(){return Sd(this)};K.prototype.serialize=K.prototype.B;K.prototype.toString=function(){return"ee."+this.name()+"("+Ud(this)+")"};x("ee.ComputedObject.prototype.toString",K.prototype.toString);K.prototype.name=function(){return"ComputedObject"};
|
|
K.prototype.od=function(a,b){var c=eb(arguments);c[0]=this;a.apply(m,c);return this};K.prototype.aside=K.prototype.od;var Xh=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.A=b.A;return a},Wh=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Yh={},Zh=function(a){return a.prototype instanceof K?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},$h=function(a,b){if(b==a)return!0;switch(a){case "Element":return"Element"==b||"Image"==b||"Feature"==b||"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "FeatureCollection":case "Collection":return"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "Object":return!0;default:return!1}},ai=function(a){return q(a)||
|
|
a instanceof K&&"Number"==a.name()},bi=function(a){return p(a)||a instanceof K&&"String"==a.name()},ci=function(a){return t(a)&&!u(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var L=function(){if(!(this instanceof L))return new L};y(L,gd);x("ee.Function",L);var di=Lc;L.prototype.call=function(a){return this.apply(ei(this,Array.prototype.slice.call(arguments,0)))};L.prototype.call=L.prototype.call;L.prototype.apply=function(a){a=new K(this,fi(this,a));return di(a,this.L().returns)};L.prototype.apply=L.prototype.apply;
|
|
var gi=function(a,b,c){var d=n(b),e=a.L(),f=!1;if(1==c.length&&ci(c[0])){var g=e.args;d&&(g=g.slice(1));g.length&&(f=!((1==g.length||g[1].optional)&&"Dictionary"==g[0].type))}if(f){if(c=Hb(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=ei(a,d?[b].concat(c):c);return a.apply(c)},fi=function(a,b){for(var c=a.L().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&n(b[g]))d[g]=di(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+
|
|
g+") missing to function: "+a);e[g]=!0}c=[];for(var l in b)e[l]||c.push(l);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},ei=function(a,b){var c=a.L().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};
|
|
L.prototype.toString=function(a,b){var c=this.L(),d=[];d.push(a||c.name);d.push("(");d.push(Ua(c.args.slice(b?1:0),function(a){return a.name}).join(", "));d.push(")\n");d.push("\n");c.description?d.push(c.description):d.push("Undocumented.");d.push("\n");if(c.args.length)for(d.push("\nArgs:\n"),a=0;a<c.args.length;a++){b&&0==a?d.push(" this:"):d.push("\n ");var e=c.args[a];d.push(e.name);d.push(" (");d.push(e.type);e.optional&&d.push(", optional");d.push("): ");e.description?d.push(e.description):
|
|
d.push("Undocumented.")}return d.join("")};L.prototype.B=function(){return Sd(this)};var M=function(a,b){if(!n(b))return hi(a);if(!(this instanceof M))return Wh(M,arguments);this.ia=Ib(b);this.ia.name=a};y(M,L);x("ee.ApiFunction",M);var N=function(a,b){return L.prototype.call.apply(hi(a),Array.prototype.slice.call(arguments,1))};x("ee.ApiFunction._call",N);var ii=function(a,b){return hi(a).apply(b)};x("ee.ApiFunction._apply",ii);M.prototype.encode=function(){return this.ia.name};M.prototype.Ec=function(a,b){return jd(this.ia.name,b)};M.prototype.L=function(){return this.ia};
|
|
var ji=null,ki={},mi=function(){li();return yb(ji,function(a){return a.L()})},ni=function(){li();return xb(ji,function(a,b){return!ki[b]})},hi=function(a){var b=oi(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};x("ee.ApiFunction.lookup",hi);
|
|
var oi=function(a){li();return ji[a]||null},li=function(a,b){if(ji)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(ji=yb(c,function(a,b){a.returns=a.returns.replace(/<.*>/,"");for(var c=0;c<a.args.length;c++)a.args[c].type=a.args[c].type.replace(/<.*>/,"");return new M(b,a)}),a&&a())};a?uh(c):c(uh())}},O=function(a,b,c,d){li();var e=d||"";wb(ji,function(d,g){var f=g.split(".");if(2==f.length&&f[0]==b){f=e+f[1];var v=d.L();ki[g]=!0;var E=!1;v.args.length&&(g=v.args[0].type,E="Object"!=g&&$h(g,c));
|
|
g=E?a.prototype:a;f in g&&!g[f].signature||(g[f]=function(a){return gi(d,E?this:void 0,Array.prototype.slice.call(arguments,0))},g[f].toString=w(d.toString,d,f,E),g[f].signature=v)}})},pi=function(a){var b=function(a){for(var b in a)u(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype||{})};var P=function(a,b){var c=qi(a),d=Ua(c,function(a){return a.replace(/^opt_/,"")});a=(a=m.EXPORTED_FN_INFO?m.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},f=b[0],g=t(f)&&!u(f)&&!r(f)&&!(f instanceof K);if(1<b.length||!g){if(b.length>d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(f=0;f<b.length;f++)e[d[f]]=b[f]}else{g=new Yc(Bb(f));var l=new Yc(d);if($c(l,g).isEmpty())e[d[0]]=b[0];else{b=
|
|
ad(g,l);if(!b.isEmpty())throw Error("Unexpected arguments"+a+": "+b.w().join(", "));e=Hb(f)}}b=new Yc(Bb(e));c=ad(new Yc(Ta(c,function(a){return 0!=a.lastIndexOf("opt_",0)})),b);if(!c.isEmpty())throw Error("Missing required arguments"+a+": "+c.w().join(", "));return e},qi=function(a){var b=ri,c=[];m.EXPORTED_FN_INFO?(a=m.EXPORTED_FN_INFO[a.toString()],t(a)||si(),c=a.paramNames,r(c)||si()):(a=a.toString().replace(ti,"").match(b),null===a&&si(),c=(a[1].split(",")||[]).map(function(a){return a.replace(ui,
|
|
"")}));return c},si=function(){throw Error("Failed to locate function parameters.");},ti=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/mg,ri=/^function[^\(]*\(([^\)]*)\)/m,ui=/=.*$/;var R=function(a,b,c){K.call(this,a,b,c);vi()};y(R,K);x("ee.Element",R);var wi=!1,vi=function(){wi||(O(R,"Element","Element"),wi=!0)};R.prototype.name=function(){return"Element"};
|
|
R.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=ci(c))a:{b=Bb(c);var d=["properties"];if(xa(b)&&xa(d)&&b.length==d.length){for(var e=b.length,f=0;f<e;f++)if(b[f]!==d[f]){b=!1;break a}b=!0}else b=!1}b&&t(c.properties)&&(c=c.properties);if(ci(c)){b=this;for(var g in c)d=c[g],b=N("Element.set",b,g,d)}else if(c instanceof K&&oi("Element.setMulti"))b=N("Element.setMulti",this,c);else throw Error("When Element.set() is passed one argument, it must be a dictionary.");}else{if(0!=
|
|
arguments.length%2)throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");b=this;for(c=0;c<arguments.length;c+=2)g=arguments[c],d=arguments[c+1],b=N("Element.set",b,g,d)}return Xh(this,b)};R.prototype.set=R.prototype.set;var S=function(a,b,c,d){if(!(this instanceof S))return Wh(S,arguments);if(!("type"in a)){var e=P(S,arguments);a=e.geoJson;b=e.proj;c=e.geodesic;d=e.evenOdd}xi();e=null!=b||null!=c||null!=d;if(a instanceof K&&!(a instanceof S&&a.La)){if(e)throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not supported. Use Geometry.transform().");K.call(this,a.i,a.args,a.A)}else{a instanceof S&&(a=a.encode());if(!yi(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));K.call(this,
|
|
null,null);this.La=a.type;this.zd=null!=a.coordinates?Ib(a.coordinates):null;this.Md=a.geometries||null;if(null!=b)this.Ga=b;else if("crs"in a)if(t(a.crs)&&"name"==a.crs.type&&t(a.crs.properties)&&p(a.crs.properties.name))this.Ga=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new Hd).B(a.crs));this.Va=c;!n(this.Va)&&"geodesic"in a&&(this.Va=!!a.geodesic);this.Ta=d;!n(this.Ta)&&"evenOdd"in a&&(this.Ta=!!a.evenOdd)}};y(S,K);x("ee.Geometry",S);
|
|
var zi=!1,xi=function(){zi||(O(S,"Geometry","Geometry"),zi=!0)},Ai=function(a,b){if(!(this instanceof Ai))return Bi(Ai,arguments);var c=Ci(Ai,"Point",1,arguments);if(!(c instanceof K)){var d=c.coordinates;if(!r(d)||2!=d.length)throw Error("The Geometry.Point constructor requires 2 coordinates.");}S.call(this,c)};y(Ai,S);S.Point=Ai;var Di=function(a,b){if(!(this instanceof Di))return Bi(Di,arguments);S.call(this,Ci(Di,"MultiPoint",2,arguments))};y(Di,S);S.MultiPoint=Di;
|
|
var Ei=function(a,b,c,d){if(!(this instanceof Ei))return Bi(Ei,arguments);var e=Ci(Ei,"Rectangle",2,arguments);if(!(e instanceof K)){var f=e.coordinates;if(2!=f.length)throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");var g=f[0][0],l=f[0][1],v=f[1][0];f=f[1][1];e.coordinates=[[[g,f],[g,l],[v,l],[v,f]]];e.type="Polygon"}S.call(this,e)};y(Ei,S);S.Rectangle=Ei;
|
|
var Fi=function(a,b,c,d){if(!(this instanceof Fi))return Bi(Fi,arguments);S.call(this,Ci(Fi,"LineString",2,arguments))};y(Fi,S);S.LineString=Fi;var Gi=function(a,b,c,d){if(!(this instanceof Gi))return Bi(Gi,arguments);S.call(this,Ci(Gi,"LinearRing",2,arguments))};y(Gi,S);S.LinearRing=Gi;var Hi=function(a,b,c,d){if(!(this instanceof Hi))return Bi(Hi,arguments);S.call(this,Ci(Hi,"MultiLineString",3,arguments))};y(Hi,S);S.MultiLineString=Hi;
|
|
var Ii=function(a,b,c,d,e){if(!(this instanceof Ii))return Bi(Ii,arguments);S.call(this,Ci(Ii,"Polygon",3,arguments))};y(Ii,S);S.Polygon=Ii;var Ji=function(a,b,c,d,e){if(!(this instanceof Ji))return Bi(Ji,arguments);S.call(this,Ci(Ji,"MultiPolygon",4,arguments))};y(Ji,S);S.MultiPolygon=Ji;
|
|
S.prototype.encode=function(a){if(!this.La){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return K.prototype.encode.call(this,a)}a={type:this.La};"GeometryCollection"==this.La?a.geometries=this.Md:a.coordinates=this.zd;null!=this.Ga&&(a.crs={type:"name",properties:{name:this.Ga}});null!=this.Va&&(a.geodesic=this.Va);null!=this.Ta&&(a.evenOdd=this.Ta);return a};
|
|
S.prototype.jc=function(){if(this.i)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};S.prototype.toGeoJSON=S.prototype.jc;S.prototype.nd=function(){if(this.i)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new Hd).B(this.jc())};S.prototype.toGeoJSONString=S.prototype.nd;S.prototype.B=function(){return Sd(this)};S.prototype.serialize=S.prototype.B;
|
|
S.prototype.toString=function(){return"ee.Geometry("+this.nd()+")"};S.prototype.P=function(a){if(!this.La){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return K.prototype.P.call(this,a)}var b="GeometryConstructors."+this.La,c={};"GeometryCollection"===this.La?c.geometries=this.Md:c.coordinates=this.zd;null!=this.Ga&&(c.crs=p(this.Ga)?(new M("Projection")).call(this.Ga):this.Ga);null!=this.Va&&(c.geodesic=this.Va);null!=this.Ta&&(c.evenOdd=this.Ta);return(new M(b)).apply(c).P(a)};
|
|
var yi=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!r(b))return!1;for(a=0;a<b.length;a++)if(!yi(b[a]))return!1;return!0}a=a.coordinates;var c=Ki(a);return"Point"==b&&1==c||"MultiPoint"==b&&(2==c||0==a.length)||"LineString"==b&&2==c||"LinearRing"==b&&2==c||"MultiLineString"==b&&(3==c||0==a.length)||"Polygon"==b&&3==c||"MultiPolygon"==b&&(4==c||0==a.length)},Ki=function(a){if(!r(a))return-1;if(r(a[0])){for(var b=Ki(a[0]),c=1;c<a.length;c++)if(Ki(a[c])!=b)return-1;return b+
|
|
1}for(c=0;c<a.length;c++)if(!q(a[c]))return-1;return 0==a.length%2?1:-1},Ci=function(a,b,c,d){Wa(d,ai)?a={coordinates:eb(d)}:(a=P(a,d),a.coordinates=a.coords,delete a.coords,a.crs=a.proj,delete a.proj,a=xb(a,wa));if(Li(a.coordinates)||null!=a.crs||null!=a.maxError)return(new M("GeometryConstructors."+b)).apply(a);a.type=b;d=a.coordinates;if(1>c||4<c)throw Error("Unexpected nesting level.");if(Wa(d,q)&&q(d[0])&&2!=d.length){if(0!=d.length%2)throw Error("Invalid number of coordinates: "+d.length);for(var e=
|
|
[],f=0;f<d.length;f+=2)e.push([d[f],d[f+1]]);d=e}e=d;for(f=0;r(e);)e=e[0],f++;for(;f<c;)d=[d],f++;if(Ki(d)!=c)throw Error("Invalid geometry");for(e=d;r(e)&&1==e.length;)e=e[0];c=r(e)&&0==e.length?[]:d;a.coordinates=c;(b=$a(["Polygon","Rectangle","MultiPolygon"],b))&&null==a.evenOdd&&(a.evenOdd=!0);if(b&&!1===a.geodesic&&!1===a.evenOdd)throw Error("Planar interiors must be even/odd.");return a},Li=function(a){return r(a)?Va(a,Li):a instanceof K},Bi=function(a,b){var c=function(){};c.prototype=a.prototype;
|
|
c=new c;a=a.apply(c,b);return void 0!==a?a:c};S.prototype.name=function(){return"Geometry"};var T=function(a){if(!(this instanceof T))return Wh(T,arguments);if(a instanceof T)return a;Mi();if(r(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new T(a[0]);K.call(this,new M("Filter.and"),{filters:a})}else if(a instanceof K)K.call(this,a.i,a.args,a.A);else{if(n(a))throw Error("Invalid argument specified for ee.Filter(): "+a);K.call(this,null,null)}};y(T,K);x("ee.Filter",T);
|
|
var Ni=!1,Mi=function(){Ni||(O(T,"Filter","Filter"),Ni=!0)},Oi={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};T.prototype.Wa=function(){return N("Filter.not",this)};T.prototype.not=T.prototype.Wa;var Pi=function(a,b){var c=P(Pi,arguments);return N("Filter.equals",c.name,c.value)};T.eq=Pi;var Qi=function(a,b){var c=P(Qi,arguments);return Pi(c.name,c.value).Wa()};T.neq=Qi;
|
|
var Ri=function(a,b){var c=P(Ri,arguments);return N("Filter.lessThan",c.name,c.value)};T.lt=Ri;var Si=function(a,b){var c=P(Si,arguments);return Ri(c.name,c.value).Wa()};T.gte=Si;var Ti=function(a,b){var c=P(Ti,arguments);return N("Filter.greaterThan",c.name,c.value)};T.gt=Ti;var Ui=function(a,b){var c=P(Ui,arguments);return Ti(c.name,c.value).Wa()};T.lte=Ui;var Vi=function(a){return N("Filter.and",Array.prototype.slice.call(arguments))};T.and=Vi;var Wi=function(a){return N("Filter.or",Array.prototype.slice.call(arguments))};
|
|
T.or=Wi;var Xi=function(a,b){var c=P(Xi,arguments);c=N("DateRange",c.start,c.end);return ii("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};T.date=Xi;var Yi=function(a,b,c,d){var e=P(Yi,arguments);return ii("Filter.listContains",{leftField:e.rightField,rightValue:e.leftValue,rightField:e.leftField,leftValue:e.rightValue})};T.inList=Yi;var Zi=function(a,b){return ii("Filter.intersects",{leftField:".all",rightValue:N("Feature",a),maxError:b})};T.bounds=Zi;
|
|
T.prototype.name=function(){return"Filter"};var $i=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in Oi))throw Error("Unknown filtering operator: "+b);a=N("Filter."+Oi[b],a,c);return d?a.Wa():a};T.metadata=$i;var U=function(a,b,c){R.call(this,a,b,c);aj()};y(U,R);x("ee.Collection",U);var bj=!1,aj=function(){bj||(O(U,"Collection","Collection"),O(U,"AggregateFeatureCollection","Collection","aggregate_"),bj=!0)};U.prototype.filter=function(a){a=P(U.prototype.filter,arguments).filter;if(!a)throw Error("Empty filters.");return Xh(this,N("Collection.filter",this,a))};U.prototype.filter=U.prototype.filter;
|
|
U.prototype.Ic=function(a,b,c){var d=P(U.prototype.Ic,arguments);return this.filter($i(d.name,d.operator,d.value))};U.prototype.filterMetadata=U.prototype.Ic;U.prototype.Id=function(a){return this.filter(Zi(a))};U.prototype.filterBounds=U.prototype.Id;U.prototype.Hc=function(a,b){var c=P(U.prototype.Hc,arguments);return this.filter(Xi(c.start,c.end))};U.prototype.filterDate=U.prototype.Hc;
|
|
U.prototype.limit=function(a,b,c){var d=P(U.prototype.limit,arguments);return Xh(this,N("Collection.limit",this,d.max,d.property,d.ascending))};U.prototype.limit=U.prototype.limit;U.prototype.sort=function(a,b){var c=P(U.prototype.sort,arguments);return Xh(this,N("Collection.limit",this,void 0,c.property,c.ascending))};U.prototype.sort=U.prototype.sort;U.prototype.name=function(){return"Collection"};U.prototype.elementType=function(){return R};
|
|
U.prototype.map=function(a,b){var c=this.elementType();return Xh(this,N("Collection.map",this,function(b){return a(new c(b))},b))};U.prototype.map=U.prototype.map;U.prototype.Ud=function(a,b){b=n(b)?b:null;var c=this.elementType();return N("Collection.iterate",this,function(b,e){return a(new c(b),e)},b)};U.prototype.iterate=U.prototype.Ud;var V=function(a,b){if(!(this instanceof V))return Wh(V,arguments);if(a instanceof V){if(b)throw Error("Can't create Feature out of a Feature and properties.");return a}if(2<arguments.length)throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");cj();if(a instanceof S||null===a)R.call(this,new M("Feature"),{geometry:a,metadata:b||null});else if(a instanceof K)R.call(this,a.i,a.args,a.A);else if("Feature"==a.type){var c=a.properties||{};if("id"in a){if("system:index"in
|
|
c)throw Error('Can\'t specify both "id" and "system:index".');c=Hb(c);c["system:index"]=a.id}R.call(this,new M("Feature"),{geometry:new S(a.geometry),metadata:c})}else R.call(this,new M("Feature"),{geometry:new S(a),metadata:b||null})};y(V,R);x("ee.Feature",V);var dj=!1,cj=function(){dj||(O(V,"Feature","Feature"),dj=!0)};V.prototype.D=function(a){return V.f.D.call(this,a)};V.prototype.getInfo=V.prototype.D;
|
|
V.prototype.getMap=function(a,b){var c=P(V.prototype.getMap,arguments);return N("Collection",[this]).getMap(c.visParams,c.callback)};V.prototype.getMap=V.prototype.getMap;V.prototype.name=function(){return"Feature"};var ej=function(a,b,c){var d={};wb(b,function(a,b){switch(b){case "dimensions":b=p(a)?a.split("x").map(Number):r(a)?a:q(a)?[a]:[];if(1===b.length)d.maxDimension=b[0];else if(2===b.length)d.width=b[0],d.height=b[1];else throw Error("Invalid dimensions "+a);break;case "region":a=p(a)?JSON.parse(a):a;d.geometry=new S(a);break;case "scale":d.scale=a;default:c[b]=a}});Fb(d)||(d.input=a,a=ii("Image.clipToBoundsAndScale",d));return a},gj=function(a,b){var c={};b=fj(b,c);Fb(b)||(b.image=a,a=ii("Image.visualize",
|
|
b));c.image=a;return c},fj=function(a,b){var c="bands gain bias min max gamma palette opacity forceRgbOutput".split(" "),d={};wb(a,function(a,f){$a(c,f)?d[f]=a:b[f]=a});return d};var W=function(a){if(!(this instanceof W))return Wh(W,arguments);if(a instanceof W)return a;hj();var b=arguments.length;if(0==b||1==b&&!n(a))R.call(this,new M("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(ai(a))R.call(this,new M("Image.constant"),{value:a});else if(bi(a))R.call(this,new M("Image.load"),{id:a});else{if(r(a))return ij(Ua(a,function(a){return new W(a)}));if(a instanceof K)"Array"==a.name()?R.call(this,new M("Image.constant"),{value:a}):R.call(this,a.i,a.args,a.A);else throw Error("Unrecognized argument type to convert to an Image: "+
|
|
a);}else if(2==b){b=arguments[0];var c=arguments[1];if(bi(b)&&ai(c))R.call(this,new M("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(W,R);x("ee.Image",W);var kj=!1,hj=function(){kj||(O(W,"Image","Image"),O(W,"Window","Image","focal_"),kj=!0)};W.prototype.D=function(a){return W.f.D.call(this,a)};W.prototype.getInfo=W.prototype.D;
|
|
W.prototype.getMap=function(a,b){var c=this,d=P(W.prototype.getMap,arguments),e=gj(this,d.visParams);if(d.callback){var f=d.callback;wh(e,function(a,b){a=a?Object.assign(a,{image:c}):void 0;f(a,b)})}else return d=wh(e),d.image=this,d};W.prototype.getMap=W.prototype.getMap;W.prototype.Ca=function(a,b){var c=P(W.prototype.Ca,arguments),d=c.params?Hb(c.params):{};d.image=this.B();if(c.callback){var e=c.callback;Ch(d,function(a,b){a?e(Dh(a)):e(null,b)})}else return Dh(Ch(d))};
|
|
W.prototype.getDownloadURL=W.prototype.Ca;W.prototype.Nc=function(a,b){var c=P(W.prototype.Nc,arguments);if(G){var d={};var e=ej(this,c.params,d);d=gj(e,d)}else if(d=gj(this,c.params),d.region)if(r(d.region)||ci(d.region))d.region=Id(d.region);else if(!p(d.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(c.callback)Ah(d,function(a,b){var d="";if(!n(b))try{d=Bh(a)}catch(v){b=String(v.message)}c.callback(d,b)});else return Bh(Ah(d))};W.prototype.getThumbURL=W.prototype.Nc;
|
|
var lj=function(a,b,c){var d=P(lj,arguments);return ij([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};W.rgb=lj;var mj=function(a){return ij(Array.prototype.slice.call(arguments),null)};W.cat=mj;var ij=function(a,b){if(0==a.length)return N("Image.constant",[]);for(var c=new W(a[0]),d=1;d<a.length;d++)c=N("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
W.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||bi(b[0])||ai(b[0])){for(var d=0;d<b.length;d++)if(!(bi(b[d])||ai(b[d])||b[d]instanceof K))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return ii("Image.select",c)};W.prototype.select=W.prototype.select;
|
|
W.prototype.expression=function(a,b){var c=P(W.prototype.expression,arguments),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(c.map){var f=c.map,g;for(g in f)d.push(g),e[g]=new W(f[g])}var l=N("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d);c=new L;c.encode=function(a){return l.encode(a)};c.Ec=function(a,b){return kd(a(l),b)};c.L=function(){return{name:"",args:Ua(d,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return c.apply(e)};
|
|
W.prototype.expression=W.prototype.expression;W.prototype.clip=function(a){try{a=new S(a)}catch(b){}return N("Image.clip",this,a)};W.prototype.clip=W.prototype.clip;W.prototype.ie=function(a){var b=1!=arguments.length||bi(arguments[0])?eb(arguments):arguments[0];return N("Image.rename",this,b)};W.prototype.rename=W.prototype.ie;W.prototype.name=function(){return"Image"};var nj=function(a){if(this instanceof nj){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof nj)return a}else return Wh(nj,arguments);oj();if(r(a))K.call(this,null,null),this.vb=a;else if(a instanceof K)K.call(this,a.i,a.args,a.A),this.vb=null;else throw Error("Invalid argument specified for ee.List(): "+a);};y(nj,K);x("ee.List",nj);var pj=!1,oj=function(){pj||(O(nj,"List","List"),pj=!0)};
|
|
nj.prototype.encode=function(a){return r(this.vb)?Ua(this.vb,function(b){return a(b)}):nj.f.encode.call(this,a)};nj.prototype.P=function(a){return r(this.vb)?id(a(this.vb)):nj.f.P.call(this,a)};nj.prototype.name=function(){return"List"};var X=function(a,b){if(!(this instanceof X))return Wh(X,arguments);if(a instanceof X)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");qj();a instanceof S&&(a=new V(a));a instanceof V&&(a=[a]);if(bi(a)){var c={tableId:a};b&&(c.geometryColumn=b);U.call(this,new M("Collection.loadTable"),c)}else if(r(a))U.call(this,new M("Collection"),{features:Ua(a,function(a){return new V(a)})});else if(a instanceof nj)U.call(this,
|
|
new M("Collection"),{features:a});else if(a instanceof K)U.call(this,a.i,a.args,a.A);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};y(X,U);x("ee.FeatureCollection",X);var rj=!1,qj=function(){rj||(O(X,"FeatureCollection","FeatureCollection"),rj=!0)};X.prototype.getMap=function(a,b){var c=P(X.prototype.getMap,arguments),d=ii("Collection.draw",{collection:this,color:(c.visParams||{}).color||"000000"});if(c.callback)d.getMap(void 0,c.callback);else return d.getMap()};
|
|
X.prototype.getMap=X.prototype.getMap;X.prototype.D=function(a){return X.f.D.call(this,a)};X.prototype.getInfo=X.prototype.D;X.prototype.Ca=function(a,b,c,d){var e=P(X.prototype.Ca,arguments),f={};f.table=this.B();e.format&&(f.format=e.format.toUpperCase());e.filename&&(f.filename=e.filename);if(e.selectors){var g=e.selectors;xa(g)&&(g=g.join(","));f.selectors=g}if(e.callback)Eh(f,function(a,b){a?e.callback(Fh(a)):e.callback(null,b)});else return Fh(Eh(f))};X.prototype.getDownloadURL=X.prototype.Ca;
|
|
X.prototype.select=function(a,b,c){if(bi(a)){var d=Array.prototype.slice.call(arguments);return this.map(function(a){return a.select(d)})}var e=P(X.prototype.select,arguments);return this.map(function(a){return a.select(e)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"FeatureCollection"};X.prototype.elementType=function(){return V};var Y=function(a){if(!(this instanceof Y))return Wh(Y,arguments);if(a instanceof Y)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");sj();a instanceof W&&(a=[a]);if(bi(a))U.call(this,new M("ImageCollection.load"),{id:a});else if(r(a))U.call(this,new M("ImageCollection.fromImages"),{images:Ua(a,function(a){return new W(a)})});else if(a instanceof nj)U.call(this,new M("ImageCollection.fromImages"),{images:a});else if(a instanceof
|
|
K)U.call(this,a.i,a.args,a.A);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};y(Y,U);x("ee.ImageCollection",Y);var tj=!1,sj=function(){tj||(O(Y,"ImageCollection","ImageCollection"),O(Y,"reduce","ImageCollection"),tj=!0)};Y.prototype.Oc=function(a,b){var c=P(Y.prototype.Oc,arguments);return uj(this,c,["png","jpg","jpeg"])};Y.prototype.getTiledThumbURL=Y.prototype.Oc;Y.prototype.Lc=function(a,b){var c=P(Y.prototype.Lc,arguments);return uj(this,c,["gif"])};
|
|
Y.prototype.getAnimatedThumbURL=Y.prototype.Lc;var uj=function(a,b,c){var d={};a=a.map(function(a){return ej(a,b.params,d)});var e={},f=fj(d,e);a=a.map(function(a){f.image=a;return ii("Image.visualize",f)});e.image=a.B();if(e.format){if(!Va(c,function(a){return a.toLowerCase()==e.format.toLowerCase()}))throw Error("Invalid format specified.");}else e.format=c[0];if(b.callback)Ah(e,function(a,c){var d="";if(!n(c))try{d=Bh(a)}catch(E){c=String(E.message)}b.callback(d,c)});else return Bh(Ah(e))};
|
|
Y.prototype.getMap=function(a,b){var c=P(Y.prototype.getMap,arguments),d=N("ImageCollection.mosaic",this);if(c.callback)d.getMap(c.visParams,c.callback);else return d.getMap(c.visParams)};Y.prototype.getMap=Y.prototype.getMap;Y.prototype.D=function(a){return Y.f.D.call(this,a)};Y.prototype.getInfo=Y.prototype.D;Y.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};Y.prototype.select=Y.prototype.select;
|
|
Y.prototype.first=function(){return new W(N("Collection.first",this))};Y.prototype.first=Y.prototype.first;Y.prototype.name=function(){return"ImageCollection"};Y.prototype.elementType=function(){return W};var vj=function(a){this.Ac=a;this.id=null},xj=function(a){var b={element:wj(a)};Object.assign(b,a);b=xb(b,wa);return new vj(b)};vj.prototype.start=function(a,b){var c=this;B(this.Ac,"Task config must be specified for tasks to be started.");if(a){var d=function(){Na(c.id);Nh(c.id,c.Ac,function(c,d){d?b(d):a()})};this.id?d():Ih(1,function(a){(a=a&&a[0])?(c.id=a,d()):b("Failed to obtain task ID.")})}else this.id=this.id||Ih(1)[0],Na(this.id,"Failed to obtain task ID."),Nh(this.id,this.Ac)};
|
|
vj.prototype.start=vj.prototype.start;var yj=function(a,b,c,d,e,f,g,l,v,E){var Q=P(yj,arguments);Q=zj(Q,"ASSET","EXPORT_IMAGE");return xj(Q)};x("ee.batch.Export.image.toAsset",yj);var Aj=function(a,b,c,d,e,f,g,l,v,E,Q,sa,qa,Jc,jj){var La=P(Aj,arguments);La=zj(La,"GOOGLE_CLOUD_STORAGE","EXPORT_IMAGE");return xj(La)};x("ee.batch.Export.image.toCloudStorage",Aj);var Bj=function(a,b,c,d,e,f,g,l,v,E,Q,sa,qa,Jc,jj){var La=P(Bj,arguments);La=zj(La,"DRIVE","EXPORT_IMAGE");return xj(La)};
|
|
x("ee.batch.Export.image.toDrive",Bj);var Cj=function(a,b,c,d,e,f,g,l,v,E,Q,sa){var qa=P(Cj,arguments);qa=zj(qa,"GOOGLE_CLOUD_STORAGE","EXPORT_TILES");return xj(qa)};x("ee.batch.Export.map.toCloudStorage",Cj);var Dj=function(a,b,c,d,e,f){var g=P(Dj,arguments);g=zj(g,"GOOGLE_CLOUD_STORAGE","EXPORT_FEATURES");return xj(g)};x("ee.batch.Export.table.toCloudStorage",Dj);var Ej=function(a,b,c,d,e,f){var g=P(Ej,arguments);g.type="EXPORT_FEATURES";g=zj(g,"DRIVE","EXPORT_FEATURES");return xj(g)};
|
|
x("ee.batch.Export.table.toDrive",Ej);var Fj=function(a,b,c){var d=P(Fj,arguments);d=zj(d,"ASSET","EXPORT_FEATURES");return xj(d)};x("ee.batch.Export.table.toAsset",Fj);var Gj=function(a,b,c,d,e,f,g,l,v,E,Q,sa){var qa=P(Gj,arguments);qa=zj(qa,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO");return xj(qa)};x("ee.batch.Export.video.toCloudStorage",Gj);var Hj=function(a,b,c,d,e,f,g,l,v,E,Q,sa){var qa=P(Hj,arguments);qa=zj(qa,"DRIVE","EXPORT_VIDEO");return xj(qa)};x("ee.batch.Export.video.toDrive",Hj);
|
|
var Ij=function(a,b,c,d,e,f,g,l,v,E,Q){var sa=P(Ij,arguments);sa=zj(sa,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO_MAP");return xj(sa)};x("ee.batch.Export.videoMap.toCloudStorage",Ij);
|
|
var wj=function(a){var b=function(b){return b in a},c=Jj.find(b);B(1===Xa(Jj,b),'Expected a single "image" or "collection" key.');b=a[c];if(!(b instanceof W||b instanceof X||b instanceof Y||b instanceof R))throw Error("Unknown element type provided: "+typeof b+". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection or ee.Element.");delete a[c];return b},zj=function(a,b,c){var d=void 0===d?!0:d;var e={type:c};Object.assign(e,a);switch(c){case "EXPORT_IMAGE":a=e.fileFormat;null!=a||(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'.");}null!=e.formatOptions&&(a=Kj(e,a),delete e.formatOptions,Object.assign(e,a));b=Lj(e,b);null!=b.crsTransform&&(b.crs_transform=b.crsTransform,delete b.crsTransform);e=b;break;case "EXPORT_TILES":e=b=Lj(e,b);break;case "EXPORT_FEATURES":r(e.selectors)&&
|
|
(e.selectors=e.selectors.join());e=Lj(e,b);break;case "EXPORT_VIDEO":e=Mj(e);e=Lj(e,b);null!=e.crsTransform&&(e.crs_transform=e.crsTransform,delete e.crsTransform);break;case "EXPORT_VIDEO_MAP":e=Mj(e);e=Lj(e,b);break;default:throw Error("Unknown export type: "+e.type);}if(d&&null!=e.region){d=e;b=e.region;if(b instanceof S)b=b.jc();else if(p(b))try{b=Pa(JSON.parse(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.");
|
|
}if(!(t(b)&&"type"in b))try{new Fi(b)}catch(f){try{new Ii(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.");}}b=Id(b);d.region=b}return e},Lj=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=a.assetId||
|
|
"";break;default:b=va(a.folder);if(!$a(["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},Nj={GEO_TIFF:["cloudOptimized","fileDimensions"],TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")},Oj={GEO_TIFF:"tiff",TF_RECORD_IMAGE:"tfrecord"},
|
|
Mj=function(a){a.videoOptions=a.framesPerSecond||5;a.maxFrames=a.maxFrames||1E3;a.maxPixels=a.maxPixels||1E8;a.fileFormat="MP4";return a},Kj=function(a,b){var c=a.formatOptions;if(null==c)return{};if(Object.keys(a).some(function(a){return null!==c&&a in c}))throw Error("Parameter specified at least twice: once in config, and once in config format options.");a=Oj[b];for(var d=Nj[b],e={},f=k(Object.entries(c)),g=f.next();!g.done;g=f.next()){var l=k(g.value);g=l.next().value;l=l.next().value;if(!$a(d,
|
|
g))throw Error('"'+g+'" is not a valid option, the image format "'+b+'"'+('"may have the following options: '+d.join(", ")+'".'));g=a+g[0].toUpperCase()+g.substring(1);r(l)?e[g]=l.join():e[g]=l}return e},Jj=["image","collection"];var Pj=function(a){if(!(this instanceof Pj))return Wh(Pj,arguments);if(a instanceof Pj)return a;Qj();if(q(a))K.call(this,null,null),this.xb=a;else if(a instanceof K)K.call(this,a.i,a.args,a.A),this.xb=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};y(Pj,K);x("ee.Number",Pj);var Rj=!1,Qj=function(){Rj||(O(Pj,"Number","Number"),Rj=!0)};Pj.prototype.encode=function(a){return q(this.xb)?this.xb:Pj.f.encode.call(this,a)};
|
|
Pj.prototype.P=function(a){return q(this.xb)?id(a(this.xb)):Pj.f.P.call(this,a)};Pj.prototype.name=function(){return"Number"};var Sj=function(a){if(!(this instanceof Sj))return Wh(Sj,arguments);if(a instanceof Sj)return a;Tj();if(p(a))K.call(this,null,null),this.Cb=a;else if(a instanceof K)this.Cb=null,a.i&&"String"==a.i.L().returns?K.call(this,a.i,a.args,a.A):K.call(this,new M("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};y(Sj,K);x("ee.String",Sj);var Uj=!1,Tj=function(){Uj||(O(Sj,"String","String"),Uj=!0)};
|
|
Sj.prototype.encode=function(a){return p(this.Cb)?this.Cb:Sj.f.encode.call(this,a)};Sj.prototype.P=function(a){return p(this.Cb)?id(a(this.Cb)):Sj.f.P.call(this,a)};Sj.prototype.name=function(){return"String"};var Vj=function(a,b){if(!(this instanceof Vj))return Wh(Vj,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(Wj(g in Yh?Yh[g]:null,f.name))}if(!n(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.ia=Xj(a,c,b);this.td=b.apply(null,c)};y(Vj,L);x("ee.CustomFunction",Vj);Vj.prototype.encode=function(a){return{type:"Function",argumentNames:Ua(this.ia.args,function(a){return a.name}),body:a(this.td)}};
|
|
Vj.prototype.P=function(a){return ld(this.ia.args.map(function(a){return a.name}),a(this.td))};Vj.prototype.Ec=function(a,b){return kd(a(this),b)};Vj.prototype.L=function(){return this.ia};
|
|
var Wj=function(a,b){a=a||Object;if(!(a.prototype instanceof K))if(a&&a!=Object)if(a==String)a=Sj;else if(a==Number)a=Pj;else if(a==Array)a=m.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=K;var c=function(a){this.args=this.i=null;this.A=a};c.prototype=a.prototype;return new c(b)},Yj=function(a,b){b=Ua(b,function(a){return{name:null,type:p(a)?a:Zh(a)}});b={name:"",returns:p("Object")?"Object":Zh("Object"),args:b};return new Vj(b,a)},Xj=function(a,b,
|
|
c){for(var d=[],e=0;e<b.length;e++)null===b[e].A&&d.push(e);if(0==d.length)return a;var f=function(a){var b=0;t(a)&&!u(a)&&("Function"==a.type&&b++,wb(a,function(a){b+=f(a)}));return b};e=Rd(c.apply(null,b));c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],l=c+e;b[g].A=l;a.args[g].name=l}return a};var Zj=function(a,b){if(!(this instanceof Zj))return Wh(Zj,arguments);if(a instanceof Zj)return a;ak();var c=P(Zj,arguments);a=c.date;c=c.tz;var d=new M("Date"),e={},f=null;if(bi(a)){if(e.value=a,c)if(bi(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(ai(a))e.value=a;else if(ya(a))e.value=Math.floor(a.getTime());else if(a instanceof K)a.i&&"Date"==a.i.L().returns?(d=a.i,e=a.args,f=a.A):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);K.call(this,d,e,f)};y(Zj,K);x("ee.Date",Zj);var bk=!1,ak=function(){bk||(O(Zj,"Date","Date"),bk=!0)};Zj.prototype.name=function(){return"Date"};x("ee.Deserializer",function(){});var dk=function(a){return ck(JSON.parse(a))};x("ee.Deserializer.fromJSON",dk);var ck=function(a){var b={};if(t(a)&&"CompoundValue"==a.type){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],f=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=ek(f,b)}a=a.value}return ek(a,b)};x("ee.Deserializer.decode",ck);
|
|
var ek=function(a,b){if(null===a||q(a)||oa(a)||p(a))return a;if(r(a))return Ua(a,function(a){return ek(a,b)});if(!t(a)||u(a))throw Error("Cannot decode object: "+a);var c=a.type;switch(c){case "ValueRef":if(a.value in b)return b[a.value];throw Error("Unknown ValueRef: "+a);case "ArgumentRef":c=a.value;if(!p(c))throw Error("Invalid variable name: "+c);return Wj(Object,c);case "Date":c=a.value;if(!q(c))throw Error("Invalid date value: "+c);return new Zj(c/1E3);case "Bytes":return c=new gd,c.encode=
|
|
function(){return a},c;case "Invocation":c="functionName"in a?hi(a.functionName):ek(a["function"],b);var d=yb(a.arguments,function(a){return ek(a,b)});if(c instanceof L)return c.apply(d);if(c instanceof K)return new K(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return yb(a.value,function(a){return ek(a,b)});case "Function":var e=ek(a.body,b);c={name:"",args:Ua(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new Vj(c,
|
|
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new S(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var fk=function(a){if(!(this instanceof fk))return Wh(fk,arguments);if(a instanceof fk)return a;gk();ci(a)?(K.call(this,null,null),this.lb=a):(a instanceof K&&a.i&&"Dictionary"==a.i.L().returns?K.call(this,a.i,a.args,a.A):K.call(this,new M("Dictionary"),{input:a},null),this.lb=null)};y(fk,K);x("ee.Dictionary",fk);var hk=!1,gk=function(){hk||(O(fk,"Dictionary","Dictionary"),hk=!0)};fk.prototype.encode=function(a){return null===this.lb?fk.f.encode.call(this,a):a(this.lb)};
|
|
fk.prototype.P=function(a){return null===this.lb?fk.f.P.call(this,a):id(a(this.lb))};fk.prototype.name=function(){return"Dictionary"};var ik={};x("ee.Terrain",ik);ik.Uc=!1;ik.Ne=function(){ik.Uc||(O(ik,"Terrain","Terrain"),ik.Uc=!0)};ik.reset=function(){pi(ik);ik.Uc=!1};var ok=function(a,b,c,d,e){if("ready"!=jk||a||b){var f=null!=c;if(d)if(f)kk.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==jk&&f)lk.push(c);else if(jk="loading",lh(a,b,e),f)lk.push(c),li(mk,nk);else try{li(),mk()}catch(g){throw nk(g),g;}}else c&&c()};x("ee.initialize",ok);
|
|
var rk=function(){jk="not_ready";jh=ih=hh=fh=null;kh=!1;ta("gapi")&&gapi.client&&delete gapi.client.earthengine;gh=!1;ji=null;ki={};pi(Zj);bk=!1;pi(fk);hk=!1;pi(R);wi=!1;pi(W);kj=!1;pi(V);dj=!1;pi(U);bj=!1;pi(Y);tj=!1;pi(X);rj=!1;pi(T);Ni=!1;pi(S);zi=!1;pi(nj);pj=!1;pi(Pj);Rj=!1;pi(Sj);Uj=!1;ik.reset();for(var a=m.ee,b=0;b<pk.length;b++){var c=pk[b];pi(a[c]);delete a[c]}pk=[];Yh=a;a=qk;for(var d in a)delete a[d]};x("ee.reset",rk);var sk={sf:"not_ready",LOADING:"loading",tf:"ready"};
|
|
x("ee.InitState",sk);x("ee.InitState.NOT_READY","not_ready");x("ee.InitState.LOADING","loading");x("ee.InitState.READY","ready");var jk="not_ready",lk=[],kk=[];x("ee.TILE_SIZE",256);var pk=[],qk={};x("ee.Algorithms",qk);var tk=function(a,b){p(a)&&(a=new M(a));return L.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))};x("ee.call",tk);var uk=function(a,b){p(a)&&(a=new M(a));return a.apply(b)};x("ee.apply",uk);
|
|
var mk=function(){if("loading"==jk){try{ak();gk();vi();hj();cj();aj();sj();qj();Mi();xi();oj();Qj();Tj();ik.Ne();var a=mi(),b={},c={},d;for(d in a){b[-1!=d.indexOf(".")?d.slice(0,d.indexOf(".")):d]=!0;var e=a[d].returns.replace(/<.*>/,"");c[e]=!0}var f=m.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=vk(g),pk.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,ki[g]=!0):f[g].signature={});Yh=f;wk()}catch(l){nk(l);return}jk="ready";for(kk=[];0<lk.length;)lk.shift()()}},nk=function(a){if("loading"==
|
|
jk)for(jk="not_ready",lk=[];0<kk.length;)kk.shift()(a)},wk=function(){var a=ni();Bb(a).sort().forEach(function(b){var c=a[b],d=c.L();if(!d.hidden){b=b.split(".");var e=qk;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=gb(b,1)}f=function(a){return gi(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=w(c.toString,c);e[b[0]]=f}})},vk=function(a){var b=function(b){var c=m.ee[a],e=Array.prototype.slice.call(arguments),f=1==e.length;if(f&&e[0]instanceof
|
|
c)return e[0];if(!(this instanceof c))return Wh(c,e);c=oi(a);var g=!(e[0]instanceof K),l=!1;c&&(f?g?l=!0:e[0].i!=c&&(l=!0):l=!0);if(l)K.call(this,c,fi(c,ei(c,e)));else{if(!f)throw Error("Too many arguments for ee."+a+"(): "+e);if(g)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];K.call(this,e.i,e.args,e.A)}};y(b,K);b.prototype.name=function(){return a};O(b,a,a);return b};
|
|
di=function(a,b){if(null===a)return null;if(n(a)){var c=m.ee;switch(b){case "Image":return new W(a);case "Feature":return a instanceof U?N("Feature",N("Collection.geometry",a)):new V(a);case "Element":if(a instanceof R)return a;if(a instanceof S)return new V(a);if(a instanceof K)return new R(a.i,a.args,a.A);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof X?N("Collection.geometry",a):new S(a);case "FeatureCollection":case "Collection":return a instanceof U?a:new X(a);
|
|
case "ImageCollection":return new Y(a);case "Filter":return new T(a);case "Algorithm":if(p(a))return new M(a);if(u(a)){b=a.length;c=[];for(var d=0;d<b;d++)c[d]="Object";return Yj(a,c)}if(a instanceof gd)return a;throw Error("Argument is not a function: "+a);case "String":return bi(a)||a instanceof Sj||a instanceof K?new Sj(a):a;case "Dictionary":return ci(a)?a:new fk(a);case "List":return new nj(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new Pj(a);default:if(b in
|
|
c){d=oi(b);if(a instanceof c[b])return a;if(d)return new c[b](a);if(p(a)){if(a in c[b])return c[b][a].call();throw Error("Unknown algorithm: "+b+"."+a);}return new c[b](a)}return a}}};var xk=function(a,b,c){cd.call(this,a,b,c);this.tileSize=new google.maps.Size(256,256);this.Kd=new D;this.Jd=new D};y(xk,cd);x("ee.FloatTileOverlay",xk);xk.prototype.getTile=function(a,b){var c=dd(this,a,b);b=[this.url,c].join("/")+"?token="+this.token;c=[c,this.xa,this.token].join("/");this.za.push(c);this.xa+=1;var d=mf("DIV");yk(this,b,a,c,d);zk(this);return d};
|
|
var yk=function(a,b,c,d,e){var f=ag();f.open("GET",b,!0);f.responseType="arraybuffer";f.onreadystatechange=w(function(){if(f.readyState===XMLHttpRequest.DONE&&200===f.status){var a=f.response;if(a)a=new Float32Array(a),this.Kd.set(c,a),this.Jd.set(c,e),cb(this.za,d),zk(this);else throw this.ld.add(d),Error("Unable to request floating point array buffers.");}},a);f.send()},zk=function(a){a.dispatchEvent(new ed(a.za.length))};xk.prototype.h=function(){this.Jd=this.Kd=null;xk.f.h.call(this)};var Ak=function(){this.hc=new Map};Ak.prototype.clear=function(){this.hc.clear()};var Bk=function(a,b){a.hc.has(b)||a.hc.set(b,{throttleCount:0,errorCount:0,tileLatencies:[]});return a.hc.get(b)};var Ck=function(a){z.call(this);this.Da=a;this.j={}};y(Ck,z);var Dk=[];Ck.prototype.ga=function(a,b,c,d){r(b)||(b&&(Dk[0]=b.toString()),b=Dk);for(var e=0;e<b.length;e++){var f=wc(a,b[e],c||this.handleEvent,d||!1,this.Da||this);if(!f)break;this.j[f.key]=f}return this};Ck.prototype.wb=function(a,b,c,d){return Ek(this,a,b,c,d)};var Ek=function(a,b,c,d,e,f){if(r(c))for(var g=0;g<c.length;g++)Ek(a,b,c[g],d,e,f);else{b=vc(b,c,d||a.handleEvent,e,f||a.Da||a);if(!b)return a;a.j[b.key]=b}return a};
|
|
Ck.prototype.nc=function(a,b,c,d,e){if(r(b))for(var f=0;f<b.length;f++)this.nc(a,b[f],c,d,e);else c=c||this.handleEvent,d=t(d)?!!d.capture:!!d,e=e||this.Da||this,c=xc(c),d=!!d,b=lc(a)?a.nb(b,c,d,e):a?(a=zc(a))?a.nb(b,c,d,e):null:null,b&&(Ec(b),delete this.j[b.key])};Ck.prototype.Ab=function(){wb(this.j,function(a,b){this.j.hasOwnProperty(b)&&Ec(a)},this);this.j={}};Ck.prototype.h=function(){Ck.f.h.call(this);this.Ab()};
|
|
Ck.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var Gk=function(a,b){n(a.name)?(this.name=a.name,this.code=Db[a.name]):(this.code=Ma(a.code),this.name=Fk(a.code));Ga.call(this,Lb("%s %s",this.name,b))};y(Gk,Ga);var Fk=function(a){var b=Eb(function(b){return a==b});if(!n(b))throw Error("Invalid code: "+a);return b},Db={AbortError:3,EncodingError:5,InvalidModificationError:9,InvalidStateError:7,NotFoundError:1,NotReadableError:4,NoModificationAllowedError:6,PathExistsError:12,QuotaExceededError:10,SecurityError:2,SyntaxError:8,TypeMismatchError:11};var Hk=function(a,b){A.call(this,a.type,b);this.$=a};y(Hk,A);var Ik=function(){C.call(this);this.H=new FileReader;this.H.onloadstart=w(this.Sa,this);this.H.onprogress=w(this.Sa,this);this.H.onload=w(this.Sa,this);this.H.onabort=w(this.Sa,this);this.H.onerror=w(this.Sa,this);this.H.onloadend=w(this.Sa,this)};y(Ik,C);h=Ik.prototype;h.abort=function(){try{this.H.abort()}catch(a){throw new Gk(a,"aborting read");}};h.ua=function(){return this.H.readyState};h.getError=function(){return this.H.error&&new Gk(this.H.error,"reading file")};
|
|
h.Sa=function(a){this.dispatchEvent(new Hk(a,this))};h.h=function(){Ik.f.h.call(this);delete this.H};h.readAsBinaryString=function(a){this.H.readAsBinaryString(a)};h.readAsArrayBuffer=function(a){this.H.readAsArrayBuffer(a)};h.readAsText=function(a,b){this.H.readAsText(a,b)};var Jk=function(a,b){B(a);a=a.style;"opacity"in a?a.opacity=b:"MozOpacity"in a?a.MozOpacity=b:"filter"in a&&(a.filter=""===b?"":"alpha(opacity="+100*Number(b)+")")};var Kk=function(a,b){C.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.gc=new Ak;this.ya=new D;this.xa=0;this.kd=a;this.na=new Ck(this);this.alt=this.radius=this.projection=void 0};y(Kk,C);x("ee.layers.AbstractOverlay",Kk);
|
|
Kk.prototype.vc=function(a){return wc(this,"tile-load",a)};Kk.prototype.addTileCallback=Kk.prototype.vc;Kk.prototype.dd=function(a){Ec(a)};Kk.prototype.removeTileCallback=Kk.prototype.dd;h=Kk.prototype;h.Mc=function(){return Lk(this,"throttled")+Lk(this,"loading")+Lk(this,"new")};h.setOpacity=function(a){this.opacity=a;this.ya.forEach(function(a){Jk(a.O,this.opacity)},this)};h.getStats=function(){return this.gc};
|
|
h.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||0>a.y||a.y>=d)return c.createElement("div");var e=a.x%d;0>e&&(e+=d);d=new google.maps.Point(e,a.y);a=[[a.x,a.y,b,this.xa++].join("-"),this.kd.Pd()].join("-");b=this.Bd(d,b,c,a);b.tileSize=this.tileSize;Jk(b.O,this.opacity);this.ya.set(a,b);Mk(this,b);this.kd.Xd(b,(new Date).getTime()/1E3);return b.O};h.releaseTile=function(a){var b=this.ya.get(a.id);this.ya.remove(a.id);b&&(b.abort(),Fa(b))};
|
|
var Mk=function(a,b){a.na.ga(b,"status-changed",function(){switch(b.getStatus()){case "loaded":var a=b.Te,d=(new Date).getTime();Bk(this.gc,b.zoom).tileLatencies.push(d-a);this.dispatchEvent(new Nk(this.Mc()));break;case "throttled":Bk(this.gc,b.zoom).throttleCount++;this.dispatchEvent(new Ok(b.Ja));break;case "failed":Bk(this.gc,b.zoom).errorCount++,this.dispatchEvent(new Pk(b.Ja,b.He))}})};
|
|
Kk.prototype.h=function(){Kk.f.h.call(this);this.ya.forEach(Fa);this.ya.clear();this.ya=null;Fa(this.na);this.kd=this.na=null};var Lk=function(a,b){return Xa(a.ya.w(),function(a){return a.getStatus()==b})},Nk=function(){A.call(this,"tile-load")};y(Nk,A);var Ok=function(){A.call(this,"tile-throttle")};y(Ok,A);var Pk=function(a,b){A.call(this,"tile-fail");this.errorMessage=b};y(Pk,A);
|
|
var Qk=function(a,b,c,d){C.call(this);this.Ra=a;this.zoom=b;this.O=c.createElement("div");this.O.id=d;this.Ve=5;this.cc=function(){};this.gd="new";this.je=0;this.Wc=!1};y(Qk,C);
|
|
var Sk=function(a){if(!a.Wc&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");Rk(a,"loading");a.Te=(new Date).getTime();a.qa=new F;a.qa.bb="blob";a.qa.ga("complete",function(){var a=qg(this.qa),c=this.qa.getStatus();429==c&&Rk(this,"throttled");if(Xf(c)){var d={};wb(rg(this.qa),function(a,b){d[b.toLowerCase()]=a});this.jf=d;this.qe=a;this.mb()}else if(a){var e=new Ik;e.ga("loadend",function(){this.Bb(e.H.result)},void 0,this);e.readAsText(a)}else this.Bb("Failed to load tile.")},
|
|
!1,a);a.qa.wb("ready",Da(Fa,a.qa));a.qa.send(a.Ja,"GET")};h=Qk.prototype;h.mb=function(){this.cc(this);Rk(this,"loaded")};h.hb=function(){Fa(this.qa)};h.Bb=function(a){var b=function(a){try{if(a=JSON.parse(a),a.error&&a.error.message)return a.error.message}catch(d){}return a};this.je>=this.Ve?(this.He=b(a),Rk(this,"failed")):(this.hb(),setTimeout(w(function(){this.ea||(this.Wc=!0,Sk(this),this.Wc=!1)},this),1E3*Math.pow(2,this.je++)))};h.abort=function(){this.hb();Rk(this,"aborted")};
|
|
h.getStatus=function(){return this.gd};var Rk=function(a,b){a.gd=b;a.dispatchEvent("status-changed")},Tk={aborted:!0,failed:!0,loaded:!0};Qk.prototype.h=function(){Qk.f.h.call(this);this.hb();this.O.remove();this.cc=null};var Uk=function(){z.call(this)};y(Uk,z);var Vk=function(a,b){Kk.call(this,a,b);this.vd=new D;this.Ed=new D};y(Vk,Kk);x("ee.layers.BinaryOverlay",Vk);Vk.prototype.Bd=function(a,b,c,d){var e=new Wk(a,b,c,d);this.na.ga(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.vd.set(a,new Float32Array(e.Be)),this.Ed.set(a,e.O))});return e};Vk.prototype.h=function(){Vk.f.h.call(this);this.Ed=this.vd=null};var Wk=function(a,b,c,d){Qk.call(this,a,b,c,d)};y(Wk,Qk);
|
|
Wk.prototype.mb=function(){var a=new Ik;a.ga("loadend",function(){this.Be=a.H.result;Qk.prototype.mb.call(this)},void 0,this);a.readAsArrayBuffer(this.qe)};var Xk=function(a){C.call(this);this.sb={};this.rb={};this.Da=new Ck(this);this.u=a};y(Xk,C);var Yk=[Sb&&!bc("11")?"readystatechange":"load","abort","error"],Zk=function(a,b,c){(c=p(c)?c:c.src)&&(a.sb[b]={src:c,Ad:n(void 0)?void 0:null})},$k=function(a,b){delete a.sb[b];var c=a.rb[b];c&&(delete a.rb[b],a.Da.nc(c,Yk,a.ae),Fb(a.rb)&&Fb(a.sb)&&a.dispatchEvent("complete"))};
|
|
Xk.prototype.start=function(){var a=this.sb;Sa(Bb(a),function(b){var c=a[b];if(c&&(delete a[b],!this.ea)){if(this.u){var d=this.u;d=(d?new sf(rf(d)):Ha||(Ha=new sf)).Fe("IMG")}else d=new Image;c.Ad&&(d.crossOrigin=c.Ad);this.Da.ga(d,Yk,this.ae);this.rb[b]=d;d.id=b;d.src=c.src}},this)};
|
|
Xk.prototype.ae=function(a){var b=a.currentTarget;if(b){if("readystatechange"==a.type)if("complete"==b.readyState)a.type="load";else return;"undefined"==typeof b.naturalWidth&&("load"==a.type?(b.naturalWidth=b.width,b.naturalHeight=b.height):(b.naturalWidth=0,b.naturalHeight=0));this.dispatchEvent({type:a.type,target:b});this.ea||$k(this,b.id)}};Xk.prototype.h=function(){delete this.sb;delete this.rb;Fa(this.Da);Xk.f.h.call(this)};var al=function(a,b){Kk.call(this,a,b)};y(al,Kk);x("ee.layers.ImageOverlay",al);al.prototype.Bd=function(a,b,c,d){return new bl(a,b,c,d)};var bl=function(a,b,c,d){Qk.call(this,a,b,c,d);this.cc=cl;this.Sd=this.K=this.Rb=null;this.yb=""};y(bl,Qk);
|
|
bl.prototype.mb=function(){try{var a=gf(this.qe);this.yb=df(a);var b="about:invalid#zClosurez"!==this.yb?this.yb:this.Ja}catch(c){b=this.Ja}this.K=new Xk;Zk(this.K,this.O.id+"-image",b);this.Sd=vc(this.K,dl,function(a){"load"==a.type?(this.Rb=a.target,Qk.prototype.mb.call(this)):this.Bb()},void 0,this);this.K.start()};bl.prototype.hb=function(){bl.f.hb.call(this);this.K&&(Ec(this.Sd),Fa(this.K))};bl.prototype.h=function(){bl.f.h.call(this);this.yb&&URL.revokeObjectURL(this.yb)};
|
|
var dl=["load","abort","error"],cl=function(a){a.O.appendChild(a.Rb)};var el=function(a){for(var b=arguments[0],c=1;c<arguments.length;c++){var d=arguments[c];if(0==d.lastIndexOf("/",0))b=d;else{var e;(e=""==b)||(e=b.length-1,e=0<=e&&b.indexOf("/",e)==e);b=e?b+d:b+("/"+d)}}return b};var fl=function(a,b,c,d){z.call(this);this.ud=a;this.oa=b;this.jd=d||"";this.Wb=c};y(fl,Uk);x("ee.layers.CloudStorageTileSource",fl);fl.prototype.Xd=function(a){if(a.zoom<=this.Wb)a.Ja=this.Ob(a.Ra,a.zoom);else{var b=a.zoom-this.Wb,c=Math.pow(2,b);c=new google.maps.Point(Math.floor(a.Ra.x/c),Math.floor(a.Ra.y/c));a.Ja=this.Ob(c,a.zoom-b);a.cc=Da(gl,this.Wb)}var d=w(a.Bb,a);a.Bb=w(function(b){b&&(b.includes("The specified key does not exist.")||b.includes("AccessDenied"))?Rk(a,"loaded"):d(b)},a);Sk(a)};
|
|
fl.prototype.Pd=function(){return[this.ud,this.oa,this.Wb,this.jd].join("-")};fl.prototype.Ob=function(a,b){a=el("https://storage.googleapis.com",this.ud,this.oa,String(b),String(a.x),String(a.y));this.jd&&(a+=this.jd);return a};
|
|
var gl=function(a,b){if(!b.Rb)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.O.ownerDocument.createElement("canvas");d.setAttribute("width",c);d.setAttribute("height",c);b.O.appendChild(d);d=d.getContext("2d");d.imageSmoothingEnabled=!1;d.mozImageSmoothingEnabled=!1;d.webkitImageSmoothingEnabled=!1;d.drawImage(b.Rb,c/a*(b.Ra.x%a),c/a*(b.Ra.y%a),c/a,c/a,0,0,c,c)};var hl=function(){this.aa=[];this.ca=[]};h=hl.prototype;h.enqueue=function(a){this.ca.push(a)};h.kb=function(){0==this.aa.length&&(this.aa=this.ca,this.aa.reverse(),this.ca=[]);return this.aa.pop()};h.m=function(){return this.aa.length+this.ca.length};h.isEmpty=function(){return 0==this.aa.length&&0==this.ca.length};h.clear=function(){this.aa=[];this.ca=[]};h.contains=function(a){return $a(this.aa,a)||$a(this.ca,a)};
|
|
h.remove=function(a){var b=this.aa;var c=Ra(b,a);0<=c?(bb(b,c),b=!0):b=!1;return b||cb(this.ca,a)};h.w=function(){for(var a=[],b=this.aa.length-1;0<=b;--b)a.push(this.aa[b]);var c=this.ca.length;for(b=0;b<c;++b)a.push(this.ca[b]);return a};var il=function(a,b){z.call(this);this.Yd=a||0;this.Vb=b||10;if(this.Yd>this.Vb)throw Error("[goog.structs.Pool] Min can not be greater than max");this.fa=new hl;this.va=new Yc;this.delay=0;this.Xc=null;this.Gb()};y(il,z);il.prototype.ob=function(){var a=Ea();if(!(null!=this.Xc&&a-this.Xc<this.delay)){for(var b;0<this.fa.m()&&(b=this.fa.kb(),!this.Zc(b));)this.Gb();!b&&this.m()<this.Vb&&(b=this.Cc());b&&(this.Xc=a,this.va.add(b));return b}};
|
|
var jl=function(a,b){return a.va.remove(b)?(a.uc(b),!0):!1};h=il.prototype;h.uc=function(a){this.va.remove(a);this.Zc(a)&&this.m()<this.Vb?this.fa.enqueue(a):this.Kb(a)};h.Gb=function(){for(var a=this.fa;this.m()<this.Yd;)a.enqueue(this.Cc());for(;this.m()>this.Vb&&0<this.fa.m();)this.Kb(a.kb())};h.Cc=function(){return{}};h.Kb=function(a){if("function"==typeof a.da)a.da();else for(var b in a)a[b]=null};h.Zc=function(a){return"function"==typeof a.De?a.De():!0};
|
|
h.contains=function(a){return this.fa.contains(a)||this.va.contains(a)};h.m=function(){return this.fa.m()+this.va.m()};h.isEmpty=function(){return this.fa.isEmpty()&&this.va.isEmpty()};h.h=function(){il.f.h.call(this);if(0<this.va.m())throw Error("[goog.structs.Pool] Objects not released");delete this.va;for(var a=this.fa;!a.isEmpty();)this.Kb(a.kb());delete this.fa};var kl=function(a,b){this.Vd=a;this.pc=b};kl.prototype.getKey=function(){return this.Vd};kl.prototype.clone=function(){return new kl(this.Vd,this.pc)};var ll=function(a){this.W=[];if(a)a:{if(a instanceof ll){var b=a.ba();a=a.w();if(0>=this.m()){for(var c=this.W,d=0;d<b.length;d++)c.push(new kl(b[d],a[d]));break a}}else b=Bb(a),a=Ab(a);for(d=0;d<b.length;d++)ml(this,b[d],a[d])}},ml=function(a,b,c){var d=a.W;d.push(new kl(b,c));b=d.length-1;a=a.W;for(c=a[b];0<b;)if(d=b-1>>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};h=ll.prototype;
|
|
h.remove=function(){var a=this.W,b=a.length,c=a[0];if(!(0>=b)){if(1==b)ab(a);else{a[0]=a.pop();a=0;b=this.W;for(var d=b.length,e=b[a];a<d>>1;){var f=2*a+1,g=2*a+2;f=g<d&&b[g].getKey()<b[f].getKey()?g:f;if(b[f].getKey()>e.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.pc}};h.w=function(){for(var a=this.W,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].pc);return b};h.ba=function(){for(var a=this.W,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
|
|
h.ib=function(a){return Va(this.W,function(b){return b.pc==a})};h.ta=function(a){return Va(this.W,function(b){return b.getKey()==a})};h.clone=function(){return new ll(this)};h.m=function(){return this.W.length};h.isEmpty=function(){return 0==this.W.length};h.clear=function(){ab(this.W)};var nl=function(){ll.call(this)};y(nl,ll);nl.prototype.enqueue=function(a,b){ml(this,a,b)};nl.prototype.kb=function(){return this.remove()};var ol=function(a,b){this.Dd=void 0;this.ec=new nl;il.call(this,a,b)};y(ol,il);h=ol.prototype;h.ob=function(a,b){if(!a)return(a=ol.f.ob.call(this))&&this.delay&&(this.Dd=m.setTimeout(w(this.Qb,this),this.delay)),a;this.ec.enqueue(n(b)?b:100,a);this.Qb()};h.Qb=function(){for(var a=this.ec;0<a.m();){var b=this.ob();if(b)a.kb().apply(this,[b]);else break}};h.uc=function(a){ol.f.uc.call(this,a);this.Qb()};h.Gb=function(){ol.f.Gb.call(this);this.Qb()};
|
|
h.h=function(){ol.f.h.call(this);m.clearTimeout(this.Dd);this.ec.clear();this.ec=null};var pl=function(a,b){z.call(this);this.Yc=a;this.S=b||null};y(pl,Uk);x("ee.layers.EarthEngineTileSource",pl);pl.prototype.Xd=function(a,b){var c=wc(a,"status-changed",function(){switch(a.getStatus()){case "loaded":var b=a.jf["x-earth-engine-computation-profile"];this.S&&b&&this.S.ye(a.O.id,b);break;case "failed":case "aborted":this.S&&""!==a.O.id&&this.S.bf(a.O.id),Ec(c)}},void 0,this);a.Ja=this.Ob(a.Ra,a.zoom);var d=w(this.Qc,this,a);ql().ob(d,b)};
|
|
pl.prototype.Pd=function(){return this.Yc.mapid+"-"+this.Yc.token};pl.prototype.Qc=function(a,b){var c=ql();if(a.ea||"aborted"==a.getStatus())jl(c,b);else{var d=wc(a,"status-changed",function(){a.gd in Tk&&(Ec(d),jl(c,b))});Sk(a)}};pl.prototype.Ob=function(a,b){a=this.Yc.formatTileUrl(a.x,a.y,b);return this.S&&this.S.isEnabled()?a+"&profiling=1":a};var ql=function(){rl||(rl=new ol(0,4));return rl},rl=null;var tl=function(){C.call(this);this.kc=new sl(0,60);this.ab=new D};y(tl,C);x("ee.MapTileManager",tl);tl.Vc=void 0;tl.Od=function(){return tl.Vc?tl.Vc:tl.Vc=new tl};tl.prototype.send=function(a,b,c,d,e){if(this.ab.get(a))throw Error("[ee.MapTileManager] ID in use");b=new ul(a,b,d,w(this.he,this),n(e)?e:1);this.ab.set(a,b);a=w(this.Qc,this,b);this.kc.ob(a,c);return b};tl.prototype.abort=function(a){if(a=this.ab.get(a))a.Pa||(a.Pa=!0,a.$=new A("abort")),this.he(a)};
|
|
tl.prototype.Qc=function(a,b){if(a.K||a.Pa)vl(this,b);else if(a.setToken(b),b.setActive(!0),b=new Xk,a.K=b,!wl(a))throw Error("Cannot dispatch first request!");};tl.prototype.he=function(a){this.ab.remove(a.getId());a.K&&(vl(this,a.getToken()),a.K.da());a.Rc&&a.Rc(a.$,a.fe)};var vl=function(a,b){b.setActive(!1);if(!jl(a.kc,b))throw Error("Object not released");};tl.prototype.h=function(){tl.f.h.call(this);this.kc.da();this.kc=null;var a=this.ab;Sa(a.w(),function(a){a.da()});a.clear();this.ab=null};
|
|
var ul=function(a,b,c,d,e){z.call(this);this.J=a;this.pf=b;this.We=n(e)?e:1;this.Rc=c;this.Ia=d};y(ul,z);h=ul.prototype;h.rd=0;h.Pa=!1;h.K=null;h.re=null;h.$=null;h.fe=null;var xl=["load","abort","error"];h=ul.prototype;h.getToken=function(){return this.re};h.setToken=function(a){this.re=a};h.getId=function(){return this.J};h.getUrl=function(){return this.pf};
|
|
h.Me=function(a){if(this.Pa)this.Ia&&this.Ia(this);else switch(a.type){case "load":this.$=a;this.Ia&&this.Ia(this);break;case "error":case "abort":wl(this)||(this.$=a,this.Ia&&this.Ia(this))}};h.h=function(){ul.f.h.call(this);delete this.Rc;delete this.Ia};var wl=function(a){if(a.rd>a.We)return!1;a.rd++;$k(a.K,a.J);setTimeout(w(a.kf,a),0);return!0};
|
|
ul.prototype.kf=function(){if(!this.Pa){var a=w(function(a){this.Pa||(Zk(this.K,this.J,a),vc(this.K,xl,w(this.Me,this)),this.K.start())},this),b=this.getUrl();if(Fg(b).X.ta("profiling")){var c=new F;c.bb="blob";c.ga("complete",w(function(){this.fe=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(200<=c.getStatus()&&300>c.getStatus())try{var d=df(gf(qg(c)));var e="about:invalid#zClosurez"!==d}catch(f){}a(e?d:b)},this));c.wb("ready",w(c.da,c));c.send(b,"GET")}else a(b)}};
|
|
var yl=function(){this.Y=!1};y(yl,z);yl.prototype.setActive=function(a){this.Y=a};yl.prototype.Td=function(){return this.Y};var sl=function(a,b){ol.call(this,a,b)};y(sl,ol);sl.prototype.Cc=function(){return new yl};sl.prototype.Kb=function(a){a.da()};sl.prototype.Zc=function(a){return!a.ea&&!a.Td()};var Z=function(a,b,c,d,e){cd.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.md=new Yc;this.$c=1;this.S=e||null};y(Z,cd);x("ee.MapLayerOverlay",Z);Z.prototype.vc=function(a){return wc(this,"tileevent",a)};Z.prototype.addTileCallback=Z.prototype.vc;Z.prototype.dd=function(a){Ec(a)};
|
|
Z.prototype.removeTileCallback=Z.prototype.dd;Z.prototype.getTile=function(a,b,c){if(b<this.minZoom||0>a.y||a.y>=1<<b)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;b=dd(this,a,b);a=[this.url,b].join("/")+"?token="+this.token;this.S&&this.S.isEnabled()&&(a+="&profiling=1");b=[b,this.xa,this.token].join("/");this.xa+=1;c=mf("DIV",{id:b});var d=(new Date).getTime()/1E3;this.za.push(b);tl.Od().send(b,a,d,w(this.Le,this,c,b));zk(this);return c};Z.prototype.Mc=function(){return this.za.length};
|
|
Z.prototype.releaseTile=function(a){tl.Od().abort(a.id);this.md.remove(n(a.firstElementChild)?a.firstElementChild:qf(a.firstChild));""!==a.id&&(this.ld.remove(a.id),this.S&&this.S.bf(a.id))};Z.prototype.setOpacity=function(a){this.$c=a;var b=this.md.Oa();Pc(b,function(b){Jk(b,a)})};Z.prototype.getTile=Z.prototype.getTile;Z.prototype.setOpacity=Z.prototype.setOpacity;Z.prototype.releaseTile=Z.prototype.releaseTile;
|
|
Z.prototype.Le=function(a,b,c,d){"error"==c.type?(cb(this.za,b),this.ld.add(b),this.dispatchEvent(c)):(cb(this.za,b),c.target&&"load"==c.type&&(c=c.target,this.md.add(c),1!=this.$c&&Jk(c,this.$c),a.appendChild(c)),zk(this));this.S&&null!==d&&this.S.ye(b,d)};var zl=function(a,b){if(!(this instanceof zl))return new zl(a,b);this.oa=a;this.ia=b};y(zl,L);x("ee.SavedFunction",zl);zl.prototype.encode=function(a){return N("LoadAlgorithmById",this.oa).encode(a)};zl.prototype.L=function(){return this.ia};(function(){var a={},b="ee.data.getTileUrl ee.Geometry.MultiPoint ee.batch.Export.video.toDrive ee.Terrain ee.Geometry.Polygon ee.ImageCollection.prototype.getAnimatedThumbURL ee.Filter.gte ee.Filter.inList ee.data.makeTableDownloadUrl ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.getInfo ee.data.clearAuthToken ee.data.getAuthToken ee.Serializer.encode ee.Serializer.toReadableJSON ee.Filter.and ee.batch.Export.videoMap.toCloudStorage ee.data.getDownloadId ee.Feature ee.Algorithms ee.batch.Export.map.toCloudStorage ee.data.getThumbId ee.call ee.Collection.prototype.filterDate ee.data.authenticateViaPrivateKey ee.ComputedObject.prototype.aside ee.Dictionary ee.batch.Export.image.toAsset ee.Image.prototype.clip ee.Geometry ee.Element.prototype.set ee.data.getValue ee.Feature.prototype.getInfo ee.data.setApiKey ee.ApiFunction._call ee.Image.prototype.getMap ee.ImageCollection.prototype.getTiledThumbURL ee.data.makeDownloadUrl ee.Filter ee.ComputedObject.prototype.getInfo ee.ImageCollection.prototype.first ee.Collection.prototype.map ee.Deserializer.decode ee.TILE_SIZE ee.data.authenticateViaPopup ee.Collection.prototype.limit ee.data.authenticate ee.Image ee.data.listBuckets ee.data.authenticateViaOauth ee.Serializer.encodeCloudApiPretty ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.evaluate ee.Serializer.toReadableCloudApiJSON ee.data.getInfo ee.batch.Export.image.toCloudStorage ee.data.setAuthToken ee.String ee.ImageCollection ee.Filter.bounds ee.Geometry.Point ee.Collection.prototype.filterMetadata ee.Image.prototype.expression ee.batch.Export.image.toDrive ee.data.getTileBaseUrl ee.Image.prototype.getInfo ee.Geometry.MultiLineString ee.Filter.neq ee.batch.Export.table.toAsset ee.data.getApiBaseUrl ee.data.getCloudApiEnabled ee.Geometry.prototype.toGeoJSONString ee.Feature.prototype.getMap ee.FeatureCollection ee.Collection.prototype.filterBounds ee.data.getAuthClientId ee.data.getAuthScopes ee.reset ee.Filter.lte ee.initialize ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.getDownloadURL ee.Date ee.Image.cat ee.Image.prototype.rename ee.Geometry.LineString ee.Filter.gt ee.batch.Export.table.toCloudStorage ee.batch.Export.video.toCloudStorage ee.data.getXsrfToken ee.Filter.metadata ee.Function.prototype.call ee.FeatureCollection.prototype.getMap ee.Collection.prototype.sort ee.Geometry.MultiPolygon ee.data.setAuthTokenRefresher ee.data.listImages ee.Filter.or ee.Collection.prototype.iterate ee.apply ee.Serializer.toJSON ee.data.getList ee.ImageCollection.prototype.select ee.Deserializer.fromJSON ee.List ee.Image.rgb ee.data.makeThumbUrl ee.InitState ee.data.getAsset ee.Collection.prototype.filter ee.Function.prototype.apply ee.Image.prototype.getDownloadURL ee.data.setCloudApiEnabled ee.Filter.eq ee.data.getMapId ee.data.setDeadline ee.Geometry.Rectangle ee.Geometry.prototype.serialize ee.ApiFunction.lookup ee.ApiFunction._apply ee.Geometry.LinearRing ee.Image.prototype.getThumbURL ee.Geometry.prototype.toGeoJSON ee.batch.Export.table.toDrive ee.data.listAssets ee.data.getTableDownloadId ee.Serializer.encodeCloudApi ee.Filter.date ee.Filter.prototype.not ee.FeatureCollection.prototype.select ee.Filter.lt ee.Number ee.Image.prototype.select".split(" "),
|
|
c=[["mapid","x","y","z"],["coords","opt_proj"],"collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "),[],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["params","opt_callback"],["name","value"],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["id"],["opt_visParams","opt_callback"],["opt_callback"],[],[],["obj","opt_isCompound"],["obj"],
|
|
["var_args"],"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles".split(" "),["params","opt_callback"],["geometry","opt_properties"],[],"image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey".split(" "),["params","opt_callback"],["func","var_args"],["start","opt_end"],["privateKey","opt_success",
|
|
"opt_error","opt_extraScopes"],["func","var_args"],["opt_dict"],"image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels".split(" "),["geometry"],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],["var_args"],["params","opt_callback"],["opt_callback"],["apiKey"],["name","var_args"],["opt_visParams","opt_callback"],["params","opt_callback"],["id"],["opt_filter"],["opt_callback"],[],["algorithm","opt_dropNulls"],["json"],[],
|
|
["opt_success","opt_error"],["max","opt_property","opt_ascending"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["opt_args"],["opt_callback"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["obj"],[],["callback"],["obj"],["id","opt_callback"],"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".split(" "),
|
|
"clientId tokenType accessToken expiresIn opt_extraScopes opt_callback opt_updateAuthLibrary".split(" "),["string"],["args"],["geometry","opt_errorMargin"],["coords","opt_proj"],["name","operator","value"],["expression","opt_map"],"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".split(" "),[],["opt_callback"],["coords","opt_proj","opt_geodesic",
|
|
"opt_maxError"],["name","value"],["collection","opt_description","opt_assetId"],[],[],[],["opt_visParams","opt_callback"],["args","opt_column"],["geometry"],[],[],[],["name","value"],["opt_baseurl","opt_tileurl","opt_successCallback","opt_errorCallback","opt_xsrfToken"],["opt_callback"],["opt_format","opt_selectors","opt_filename","opt_callback"],["date","opt_tz"],["var_args"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError"],["name","value"],"collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors".split(" "),
|
|
"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "),[],["name","operator","value"],["var_args"],["opt_visParams","opt_callback"],["property","opt_ascending"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["refresher"],["body","opt_callback"],["var_args"],["algorithm","opt_first"],["func","namedArgs"],["obj"],["params","opt_callback"],["selectors","opt_names"],
|
|
["json"],["list"],["r","g","b"],["id"],[],["id","opt_callback"],["filter"],["namedArgs"],["params","opt_callback"],["enable"],["name","value"],["params","opt_callback"],["milliseconds"],["coords","opt_proj","opt_geodesic","opt_evenOdd"],[],["name"],["name","namedArgs"],["coords","opt_proj","opt_geodesic","opt_maxError"],["params","opt_callback"],[],"collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors".split(" "),["body","opt_callback"],["params","opt_callback"],["obj"],
|
|
["start","opt_end"],[],["propertySelectors","opt_newProperties","opt_retainGeometry"],["name","value"],["number"],["var_args"]];[xh,Di,Hj,ik,Ii,Y.prototype.Lc,Si,Yi,Fh,Y.prototype.getMap,Y.prototype.D,bh,ch,Rd,Ud,Vi,Ij,Ch,V,qk,Cj,Ah,tk,U.prototype.Hc,Tg,K.prototype.od,fk,yj,W.prototype.clip,S,R.prototype.set,yh,V.prototype.D,Wg,N,W.prototype.getMap,Y.prototype.Oc,Dh,T,K.prototype.D,Y.prototype.first,U.prototype.map,ck,256,Og,U.prototype.limit,Qg,W,Sh,Pg,Yd,K.prototype.B,K.prototype.evaluate,Zd,Oh,
|
|
Aj,Zg,Sj,Y,Zi,Ai,U.prototype.Ic,W.prototype.expression,Bj,sh,W.prototype.D,Hi,Qi,Fj,rh,Yg,S.prototype.nd,V.prototype.getMap,X,U.prototype.Id,dh,eh,rk,Ui,ok,X.prototype.D,X.prototype.Ca,Zj,mj,W.prototype.ie,Fi,Ti,Dj,Gj,th,$i,L.prototype.call,X.prototype.getMap,U.prototype.sort,Ji,$g,Rh,Wi,U.prototype.Ud,uk,Sd,Ph,Y.prototype.select,dk,nj,lj,Bh,sk,Oh,U.prototype.filter,L.prototype.apply,W.prototype.Ca,Xg,Pi,wh,ph,Ei,S.prototype.B,hi,ii,Gi,W.prototype.Nc,S.prototype.jc,Ej,Qh,Eh,Xd,Xi,T.prototype.Wa,X.prototype.select,
|
|
Ri,Pj,W.prototype.select].forEach(function(d,e){d&&(a[d.toString()]={name:b[e],paramNames:c[e]})});m.EXPORTED_FN_INFO=a})();}).call(this);
|