(function(){var h,aa=aa||{},k=this,m=function(a){return void 0!==a},ba=function(){},ca=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!= typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},da=function(a){return null!=a},n=function(a){return"array"==ca(a)},ea=function(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},q=function(a){return"number"==typeof a},r=function(a){return"function"==ca(a)},t=function(a){var b=typeof a;return"object"==b&&null!=a|| "function"==b},fa="closure_uid_"+(1E9*Math.random()>>>0),ga=0,ha=function(a,b,c){return a.call.apply(a.bind,arguments)},ia=function(a,b,c){if(!a)throw Error();if(2")&&(a=a.replace(sa,">"));-1!=a.indexOf('"')&&(a=a.replace(ta,"""));-1!=a.indexOf("'")&& (a=a.replace(ua,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(va,"�"));return a},qa=/&/g,ra=//g,ta=/"/g,ua=/'/g,va=/\x00/g,pa=/[\x00&<>"']/,xa=function(a,b){return ab?1:0};var ya=function(a,b){b.unshift(a);y.call(this,ma.apply(null,b));b.shift()};x(ya,y);ya.prototype.name="AssertionError"; var za=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);throw new ya(""+e,f||[]);},z=function(a,b,c){a||za("",null,b,Array.prototype.slice.call(arguments,2));return a},Aa=function(a,b){throw new ya("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Ba=function(a,b,c){q(a)||za("Expected number but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2));return a},Ca=function(a,b,c){r(a)||za("Expected function but got %s: %s.",[ca(a), a],b,Array.prototype.slice.call(arguments,2))},Da=function(a,b,c){t(a)||za("Expected object but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))},Ea=function(a,b,c){n(a)||za("Expected array but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var Fa=Array.prototype.indexOf?function(a,b,c){z(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;cc&&(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},Ia=Array.prototype.forEach?function(a,b,c){z(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;fb?null:p(a)?a.charAt(b):a[b]},Qa=function(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}, Sa=function(a,b){b=Fa(a,b);var c;(c=0<=b)&&Ra(a,b);return c},Ra=function(a,b){z(null!=a.length);Array.prototype.splice.call(a,b,1)},Ta=function(a){return Array.prototype.concat.apply([],arguments)},Ua=function(a){var b=a.length;if(0=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},Xa=function(a){for(var b={},c=0,d=0;dparseFloat(yb)){xb=String(Ab);break a}}xb=yb} var Bb=xb,mb={},Cb=function(a){return nb(a,function(){for(var b=0,c=na(String(Bb)).split("."),d=na(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f=a.keyCode)a.keyCode=-1}catch(b){}};var Ib="closure_listenable_"+(1E6*Math.random()|0),Jb=function(a){return!(!a||!a[Ib])},Kb=0;var Lb=function(a,b,c,d,e){this.listener=a;this.Fb=null;this.src=b;this.type=c;this.capture=!!d;this.ca=e;this.key=++Kb;this.Ka=this.mb=!1},Mb=function(a){a.Ka=!0;a.listener=null;a.Fb=null;a.src=null;a.ca=null};var Nb=function(a){this.src=a;this.D={};this.hb=0};Nb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.D[f];a||(a=this.D[f]=[],this.hb++);var g=Ob(a,b,d,e);-1d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.Ja&&0<=e;e--){b.currentTarget=d[e];var f=dc(d[e],a,!0,b),c=c&&f}for(e=0;!b.Ja&&e>>0),Ub=function(a){z(a,"Listener can not be null.");if(r(a))return a;z(a.handleEvent,"An object listener must have handleEvent method.");a[ec]||(a[ec]=function(b){return a.handleEvent(b)});return a[ec]};var fc=function(a){A.call(this);this.ta=a;this.i={}};x(fc,A);var gc=[];fc.prototype.X=function(a,b,c,d){n(b)||(b&&(gc[0]=b.toString()),b=gc);for(var e=0;e++d,"infinite loop")}c=this.Pd;d=a.type||a;if(p(a))a=new B(a,c);else if(a instanceof B)a.target=a.target||c;else{var e=a;a=new B(d,c);kb(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Ja&&0<=g;g--)f=a.currentTarget=b[g],e=jc(f,d,!0,a)&&e;a.Ja||(f=a.currentTarget=c,e=jc(f,d,!0,a)&&e,a.Ja||(e=jc(f,d,!1,a)&&e));if(b)for(g=0;!a.Ja&&g=b.ac&&b.cancel())}this.yd?this.yd.call(this.cd,this):this.Hc=!0;this.Fa||Rc(this,new Sc)}};Qc.prototype.$c=function(a,b){this.$b=!1;Tc(this,a,b)}; var Tc=function(a,b,c){a.Fa=!0;a.fa=c;a.Xa=!b;Uc(a)},Wc=function(a){if(a.Fa){if(!a.Hc)throw new Vc;a.Hc=!1}};Qc.prototype.bc=function(a){Wc(this);Xc(a);Tc(this,!0,a)};var Rc=function(a,b){Wc(a);Xc(b);Tc(a,!1,b)},Xc=function(a){z(!(a instanceof Qc),"An execution sequence may not be initiated with a blocking Deferred.")},Yc=function(a,b,c){z(!a.Vc,"Blocking Deferreds can not be re-used");a.Jb.push([b,c,void 0]);a.Fa&&Uc(a)}; Qc.prototype.then=function(a,b,c){var d,e,f=new Cc(function(a,b){d=a;e=b});Yc(this,d,function(a){a instanceof Sc?f.cancel():e(a)});return f.then(a,b,c)};yc(Qc); var Zc=function(a){return La(a.Jb,function(a){return r(a[1])})},Uc=function(a){if(a.Rb&&a.Fa&&Zc(a)){var b=a.Rb,c=$c[b];c&&(k.clearTimeout(c.da),delete $c[b]);a.Rb=0}a.m&&(a.m.ac--,delete a.m);for(var b=a.fa,d=c=!1;a.Jb.length&&!a.$b;){var e=a.Jb.shift(),f=e[0],g=e[1],e=e[2];if(f=a.Xa?g:f)try{var l=f.call(e||a.cd,b);m(l)&&(a.Xa=a.Xa&&(l==b||l instanceof Error),a.fa=b=l);if(zc(b)||"function"===typeof k.Promise&&b instanceof k.Promise)d=!0,a.$b=!0}catch(w){b=w,a.Xa=!0,Zc(a)||(c=!0)}}a.fa=b;d&&(l=u(a.$c, a,!0),d=u(a.$c,a,!1),b instanceof Qc?(Yc(b,l,d),b.Vc=!0):b.then(l,d));c&&(b=new ad(b),$c[b.da]=b,a.Rb=b.da)},Vc=function(){y.call(this)};x(Vc,y);Vc.prototype.message="Deferred has already fired";Vc.prototype.name="AlreadyCalledError";var Sc=function(){y.call(this)};x(Sc,y);Sc.prototype.message="Deferred was canceled";Sc.prototype.name="CanceledError";var ad=function(a){this.da=k.setTimeout(u(this.we,this),0);this.qb=a}; ad.prototype.we=function(){z($c[this.da],"Cannot throw an error that is not scheduled.");delete $c[this.da];throw this.qb;};var $c={};var cd=function(a,b){m(a.name)?(this.name=a.name,this.code=db[a.name]):(this.code=Ba(a.code),this.name=bd(a.code));y.call(this,ma("%s %s",this.name,b))};x(cd,y);var bd=function(a){var b=eb(function(b){return a==b});if(!m(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 dd=function(a,b){B.call(this,a.type,b);this.ia=a};x(dd,B);var ed=function(){D.call(this);this.K=new FileReader;this.K.onloadstart=u(this.Da,this);this.K.onprogress=u(this.Da,this);this.K.onload=u(this.Da,this);this.K.onabort=u(this.Da,this);this.K.onerror=u(this.Da,this);this.K.onloadend=u(this.Da,this)};x(ed,D);h=ed.prototype;h.abort=function(){try{this.K.abort()}catch(a){throw new cd(a,"aborting read");}};h.ja=function(){return this.K.readyState};h.Da=function(a){this.dispatchEvent(new dd(a,this))};h.c=function(){ed.j.c.call(this);delete this.K}; h.readAsArrayBuffer=function(a){this.K.readAsArrayBuffer(a)};h.readAsText=function(a,b){this.K.readAsText(a,b)};var fd=function(a){return/^\s*$/.test(a)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))},gd=function(a){a=String(a);if(fd(a))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},hd=function(a){return eval("("+a+")")},jd=function(a){return(new id(void 0)).v(a)}, id=function(a){this.Hb=a};id.prototype.v=function(a){var b=[];kd(this,a,b);return b.join("")}; var kd=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(n(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f=a.length)throw qd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},td=function(a,b){if(ea(a))try{Ia(a,b,void 0)}catch(c){if(c!==qd)throw c;}else{a=sd(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==qd)throw c;}}};var ud=function(a,b){this.u={};this.i=[];this.ib=this.h=0;var c=arguments.length;if(12*this.h&&vd(this),!0):!1};var vd=function(a){if(a.h!=a.i.length){for(var b=0,c=0;b=d.i.length)throw qd;var e=d.i[b++];return a?e:d.u[e]};return e};var wd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var xd=function(a){if(a.s&&"function"==typeof a.s)return a.s();if(p(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d=Kd(this).value)for(r(b)&&(b=b()),a=new Dd(a,String(b),this.ne),c&&(a.fd=c),c="log:"+a.me,k.console&&(k.console.timeStamp?k.console.timeStamp(c):k.console.markTimeline&&k.console.markTimeline(c)),k.msWriteProfilerMark&&k.msWriteProfilerMark(c),c=this;c;){var d=c,e=a;if(d.od)for(var f=0;b=d.od[f];f++)b(e);c=c.getParent()}}; var Ld={},Md=null,Nd=function(a){Md||(Md=new Fd(""),Ld[""]=Md,Md.Kd(Id));var b;if(!(b=Ld[a])){b=new Fd(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Nd(a.substr(0,c));c.ld()[d]=b;b.m=c;Ld[a]=b}return b};var Od=function(a,b){a&&a.log(Jd,b,void 0)};var Pd=function(a,b,c){if(r(a))c&&(a=u(a,c));else if(a&&"function"==typeof a.handleEvent)a=u(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647");c=c.join("")}c=a.createElement(c);d&&(p(d)?c.className=d:n(d)?c.className=d.join(" "):ne(c,d));2a.y||a.y>=d)return c.createElement("div");var e=a.x%d;0>e&&(e+=d);d=new google.maps.Point(e,a.y);a=[[a.x,a.y,b,this.na].join("-"),this.Lc.nd()].join("-");var f=this.bd(d,b,c,a);f.tileSize=this.tileSize;ve(f.H,this.opacity);this.oa.set(a,f);this.ca.X(f,"status-changed",function(){"loaded"==f.getStatus()&&this.dispatchEvent(new ye(this.oc()));"failed"==f.getStatus()&&this.dispatchEvent(new ze)});this.Lc.vd(f,(new Date).getTime()/1E3);return f.H}; h.releaseTile=function(a){var b=this.oa.get(a.id);this.oa.remove(a.id);b&&(b.abort(),Ya(b))};h.c=function(){we.j.c.call(this);this.oa.forEach(Ya);this.oa.clear();this.oa=null;Ya(this.ca);this.Lc=this.ca=null};var xe=function(a,b){return Na(a.oa.s(),function(a){return a.getStatus()==b})},ye=function(){B.call(this,"tile-load")};x(ye,B);var ze=function(){B.call(this,"tile-fail")};x(ze,B); var Ae=function(a,b,c,d){D.call(this);this.Ca=a;this.zoom=b;this.H=c.createElement("div");this.H.id=d;this.ke=1;this.Gb=function(){};this.Ic="new";this.Gd=0;this.wc=!1};x(Ae,D); var Ce=function(a){if(!a.wc&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");Be(a,"loading");a.Z=new F;a.Z.Ma="blob";a.Z.X("complete",function(){var a=ie(this.Z);if(200<=this.Z.getStatus()&&300>this.Z.getStatus())this.ue=je(this.Z),this.Ld=a,this.Ta();else if(a){var c=new ed;c.X("loadend",function(){this.eb(c.K.result)},void 0,this);c.readAsText(a)}else this.eb("Failed to load tile.")},!1,a);a.Z.bb("ready",ja(Ya,a.Z));a.Z.send(a.Lb, "GET")};h=Ae.prototype;h.Ta=function(){this.Gb(this);Be(this,"loaded")};h.Ra=function(){Ya(this.Z)};h.eb=function(){this.Gd>=this.ke?Be(this,"failed"):(this.Gd++,this.wc=!0,this.Ra(),Ce(this),this.wc=!1)};h.abort=function(){this.Ra();Be(this,"aborted")};h.getStatus=function(){return this.Ic};var Be=function(a,b){a.Ic=b;a.dispatchEvent("status-changed")},De={aborted:!0,failed:!0,loaded:!0};Ae.prototype.c=function(){Ae.j.c.call(this);this.Ra();this.H.remove();this.Gb=null};var Ee=function(){A.call(this)};x(Ee,A);var Fe=function(a,b){we.call(this,a,b);this.Xc=new ud;this.ed=new ud};x(Fe,we);v("ee.layers.BinaryOverlay",Fe);Fe.prototype.bd=function(a,b,c,d){var e=new Ge(a,b,c,d);this.ca.X(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.Xc.set(a,new Float32Array(e.Td)),this.ed.set(a,e.H))});return e};Fe.prototype.c=function(){Fe.j.c.call(this);this.ed=this.Xc=null};var Ge=function(a,b,c,d){Ae.call(this,a,b,c,d)};x(Ge,Ae); Ge.prototype.Ta=function(){var a=new ed;a.X("loadend",function(){this.Td=a.K.result;Ae.prototype.Ta.call(this)},void 0,this);a.readAsArrayBuffer(this.Ld)};var He=function(a){for(var b=arguments[0],c=1;cb)throw Error("Bad port number "+b);a.Ia=b}else a.Ia=null}; Se.prototype.getPath=function(){return this.ea};Se.prototype.setPath=function(a,b){Ue(this);this.ea=b?Xe(a,!0):a;return this};var We=function(a,b,c){Ue(a);b instanceof Ye?(a.Y=b,a.Y.Gc(a.M)):(c||(b=Ze(b,df)),a.Y=new Ye(b,0,a.M))},Ue=function(a){if(a.ge)throw Error("Tried to modify a read-only Uri");};Se.prototype.Gc=function(a){this.M=a;this.Y&&this.Y.Gc(a);return this}; var ef=function(a){return a instanceof Se?a.clone():new Se(a,void 0)},Xe=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},Ze=function(a,b,c){return p(a)?(a=encodeURI(a).replace(b,ff),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},ff=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},$e=/[#\/\?@]/g,bf=/[\#\?:]/g,af=/[\#\?]/g,df=/[\#\?@]/g,cf=/#/g,Ye=function(a,b,c){this.h=this.l=null;this.I=a||null;this.M=!!c},gf=function(a){a.l|| (a.l=new ud,a.h=0,a.I&&Rd(a.I,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=Ye.prototype;h.B=function(){gf(this);return this.h};h.add=function(a,b){gf(this);this.I=null;a=hf(this,a);var c=this.l.get(a);c||this.l.set(a,c=[]);c.push(b);this.h=Ba(this.h)+1;return this};h.remove=function(a){gf(this);a=hf(this,a);return this.l.ha(a)?(this.I=null,this.h=Ba(this.h)-this.l.get(a).length,this.l.remove(a)):!1};h.clear=function(){this.l=this.I=null;this.h=0}; h.isEmpty=function(){gf(this);return 0==this.h};h.ha=function(a){gf(this);a=hf(this,a);return this.l.ha(a)};h.P=function(){gf(this);for(var a=this.l.s(),b=this.l.P(),c=[],d=0;db&&(b+=e);return[Bf,"map",a.mapid,d,b,c].join("/")+"?token="+a.token};v("ee.data.getTileUrl",Lf); var Mf=function(a,b){a=hb(a);return G("/value",H(a),b)};v("ee.data.getValue",Mf);var Nf=function(a,b){a=hb(a);n(a.dimensions)&&(a.dimensions=a.dimensions.join("x"));a=H(a).add("getid","1");return G("/thumb",a,b)};v("ee.data.getThumbId",Nf);var Of=function(a){return Bf+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};v("ee.data.makeThumbUrl",Of);var Pf=function(a,b){a=hb(a);return G("/download",H(a),b)};v("ee.data.getDownloadId",Pf); var Qf=function(a){return Bf+"/api/download?docid="+a.docid+"&token="+a.token};v("ee.data.makeDownloadUrl",Qf);var Rf=function(a,b){a=hb(a);return G("/table",H(a),b)};v("ee.data.getTableDownloadId",Rf);var Sf=function(a){return Bf+"/api/table?docid="+a.docid+"&token="+a.token};v("ee.data.makeTableDownloadUrl",Sf);var Uf=function(a,b,c){var d=Tf;try{return Tf=a,b.call(c)}finally{Tf=d}};v("ee.data.withProfiling",Uf); v("ee.data.newTaskId",function(a,b){var c={};q(a)&&(c.count=a);return G("/newtaskid",H(c),b)});v("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");return G("/taskstatus?q="+a.join(),null,b,"GET")});v("ee.data.getTaskList",function(a){return G("/tasklist",null,a,"GET")});v("ee.data.cancelTask",function(a,b){return Vf(a,"CANCEL",b)}); var Vf=function(a,b,c){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");var d;a:{d=Wf;for(var e in d)if(d[e]==b){d=!0;break a}d=!1}if(!d)throw Error("Invalid action: "+b);return G("/updatetask",H({id:a,action:b}),c,"POST")};v("ee.data.updateTask",Vf);v("ee.data.startProcessing",function(a,b,c){b=hb(b);b.id=a;return G("/processingrequest",H(b),c)}); v("ee.data.startIngestion",function(a,b,c){a={id:a,request:jd(b)};return G("/ingestionrequest",H(a),c)});v("ee.data.startTableIngestion",function(a,b,c){a={id:a,tableRequest:jd(b)};return G("/ingestionrequest",H(a),c)});var Xf=function(a,b){return G("/info",(new Ye).add("id",a),b)};v("ee.data.getInfo",Xf);var Yf=function(a,b){a=H(a);return G("/list",a,b)};v("ee.data.getList",Yf);v("ee.data.getAssetRoots",function(a){return G("/buckets",null,a,"GET")}); v("ee.data.createAssetHome",function(a,b){a=H({id:a});G("/createbucket",a,b)});v("ee.data.createAsset",function(a,b,c,d){p(a)||(a=jd(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return G("/create",H(a),d)});v("ee.data.createFolder",function(a,b,c){return G("/createfolder",H({id:a,force:b||!1}),c)});v("ee.data.renameAsset",function(a,b,c){G("/rename",H({sourceId:a,destinationId:b}),c)});v("ee.data.copyAsset",function(a,b,c){G("/copy",H({sourceId:a,destinationId:b}),c)}); v("ee.data.deleteAsset",function(a,b){G("/delete",H({id:a}),b)});v("ee.data.getAssetAcl",function(a,b){return G("/getacl",H({id:a}),b,"GET")});v("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:jd(b)};G("/setacl",H(a),c)});v("ee.data.setAssetProperties",function(a,b,c){a={id:a,properties:jd(b)};G("/setproperties",H(a),c)});v("ee.data.getAssetRootQuota",function(a,b){return G("/quota",H({id:a}),b,"GET")}); var Wf={Ae:"CANCEL",De:"UPDATE"},G=function(a,b,c,d){Df();var e=Tf,f={"Content-Type":"application/x-www-form-urlencoded"},g=wf();if(null!=g)f.Authorization=g;else if(c&&sf&&jf)return nf(function(){Uf(e,function(){G(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new Ye;e&&b.add("profiling","1");b=Gf(b,a);null!=Cf&&(f["X-XSRF-Token"]=Cf);var l=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(l)||(a+=-1!=a.indexOf("?")?"&":"?",a+=l,l=null);var w=zf+a;if(c)return Zf.push($f(w,c,g,l,f)),ag.mc(),null;for(var oa= function(a,b){this.setRequestHeader&&this.setRequestHeader(b,a)},Ga,ug=0;;){Ga=E();Ga.open(g,w,!1);Za(f,oa,Ga);Ga.send(l);if(429!=Ga.status||5f)return f++,setTimeout(function(){Zf.push(g);ag.mc()},Math.min(12E4,1E3*Math.pow(2,f))),null;var c=a.getStatus(), d=u(a.getResponseHeader,a),e;try{e=a.a?a.a.responseText:""}catch(Di){Od(a.G,"Can not get responseText: "+Di.message),e=""}return bg(c,d,e,l,b)};return g},bg=function(a,b,c,d,e){var f=b("X-Earth-Engine-Computation-Profile");f&&d&&d(f);var g,l,w;b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==b||"text/json"==b)try{g=hd(c),l=g.data}catch(oa){w="Invalid JSON: "+c}else w="Response was unexpectedly not JSON, but "+b;if(t(g))"error"in g&&"message"in g.error?w=g.error.message: "data"in g||(w="Malformed response: "+c);else if(0===a)w="Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";else if(200>a||300<=a)w="Server returned HTTP code: "+a;if(e)return e(l,w),null;if(!w)return l;throw Error(w);},mf=function(a){var b=function(){k.gapi.config.update("client/cors",!0);sf||(sf=k.gapi.auth.authorize);a()};if(t(k.gapi)&&t(k.gapi.auth)&&r(k.gapi.auth.authorize))b();else{for(var c=ka().toString(36);c in k;)c+="_";k[c]= function(){delete k[c];b()};Ne("https://apis.google.com/js/client.js?onload="+c)}},qf=function(a,b,c){c.access_token?(b=c.token_type+" "+c.access_token,isFinite(c.expires_in)&&(c=900*c.expires_in,setTimeout(nf,.9*c),uf=ka()+c),lf=b,a&&a()):b&&b(c.error||"Unknown error.")},H=function(a){var b=new Ye,c;for(c in a)b.set(c,a[c]);return b},Zf=[],ag=new Ke(function(){var a=Zf.shift();if(a){var b=a.url,c=a.bc,d=a.method,e=a.content,a=a.headers,f=Ef,g=new F;$d.push(g);c&&g.X("complete",c);g.bb("ready",g.Wd); f&&(g.Oa=Math.max(0,f));g.send(b,d,e,a)}0==Zf.length||ag.mc()},350),zf=null,Bf=null,Cf=null,Gf=lc,lf=null,uf=null,jf=null,kf=[],sf=null,Af=!1,Ef=0,Tf=null;var cg=function(){this.O=[];this.S=[]};h=cg.prototype;h.enqueue=function(a){this.S.push(a)};h.Sa=function(){0==this.O.length&&(this.O=this.S,this.O.reverse(),this.S=[]);return this.O.pop()};h.B=function(){return this.O.length+this.S.length};h.isEmpty=function(){return 0==this.O.length&&0==this.S.length};h.clear=function(){this.O=[];this.S=[]};h.contains=function(a){return 0<=Fa(this.O,a)||0<=Fa(this.S,a)}; h.remove=function(a){var b;b=this.O;var c=Ha(b,a);0<=c?(Ra(b,c),b=!0):b=!1;return b||Sa(this.S,a)};h.s=function(){for(var a=[],b=this.O.length-1;0<=b;--b)a.push(this.O[b]);for(var c=this.S.length,b=0;bthis.Bb)throw Error("[goog.structs.Pool] Min can not be greater than max");this.V=new cg;this.ka=new zd;this.fc=0;this.xc=null;this.kb()};x(dg,A);dg.prototype.Va=function(){var a=ka();if(!(null!=this.xc&&a-this.xcthis.Bb&&0=this.B()){for(var c=this.R,d=0;d>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};h=gg.prototype; h.remove=function(){var a=this.R,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Qa(a);else{a[0]=a.pop();for(var a=0,b=this.R,d=b.length,e=b[a];a>1;){var f=2*a+1,g=2*a+2,f=ge.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.Rc}};h.s=function(){for(var a=this.R,b=[],c=a.length,d=0;de&&(e+=d);return[a.je,c,e,b.y].join("/")};wg.prototype.oc=function(){return this.pa.length};var yg=function(a){B.call(this,"tileevent");this.count=a};x(yg,B);var zg=function(){};var Ag=function(){this.ga=-1};var Bg=function(){this.ga=64;this.A=Array(4);this.Rd=Array(this.ga);this.Pb=this.Qa=0;this.reset()};x(Bg,Ag);Bg.prototype.reset=function(){this.A[0]=1732584193;this.A[1]=4023233417;this.A[2]=2562383102;this.A[3]=271733878;this.Pb=this.Qa=0}; var Cg=function(a,b,c){c||(c=0);var d=Array(16);if(p(b))for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.A[0];c=a.A[1];var e=a.A[2],f=a.A[3],g;g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^ b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+ (c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295| g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295| g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295| g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^ b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295; f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+ (g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295; c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.A[0]=a.A[0]+b&4294967295;a.A[1]=a.A[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.A[2]=a.A[2]+e&4294967295;a.A[3]=a.A[3]+f&4294967295}; Bg.prototype.update=function(a,b){m(b)||(b=a.length);for(var c=b-this.ga,d=this.Rd,e=this.Qa,f=0;fthis.Qa?this.ga:2*this.ga)-this.Qa);a[0]=128;for(var b=1;bb;++b)for(var d=0;32>d;d+=8)a[c++]=this.A[b]>>>d&255;return a};var Dg=function(a){this.jb="__ee_hash__";this.vc=!1!==a;this.Na=[];this.Ea={};this.Sc=[]};v("ee.Serializer",Dg);var Eg=new id,Fg=new Bg,Hg=function(a,b){return Gg(new Dg(m(b)?b:!0),a)};v("ee.Serializer.encode",Hg);var Ig=function(a){return Eg.v(Hg(a))};v("ee.Serializer.toJSON",Ig);var Jg=function(a){a=Gg(new Dg(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Eg.v(a)};v("ee.Serializer.toReadableJSON",Jg); var Gg=function(a,b){b=a.pb(b);a.vc&&(b=t(b)&&"ValueRef"==b.type&&1==a.Na.length?a.Na[0][1]:{type:"CompoundValue",scope:a.Na,value:b},a.Na=[],Ia(a.Sc,u(function(a){delete a[this.jb]},a)),a.Sc=[],a.Ea={});return b}; Dg.prototype.pb=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b,c=t(a)?a[this.jb]:null;if(this.vc&&null!=c&&this.Ea[c])return{type:"ValueRef",value:this.Ea[c]};if(null===a||"boolean"==typeof a||q(a)||p(a))return a;if(t(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof zg){if(b=a.encode(u(this.pb,this)),!(n(b)||t(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Ka(a,function(a){return this.pb(a)}, this);else if(t(a)&&!r(a))b=ab(a,function(a){if(!r(a))return this.pb(a)},this),gb(b,this.jb),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.vc){Fg.reset();Fg.update(Eg.v(b));var c=Fg.digest().toString(),d;this.Ea[c]?d=this.Ea[c]:(d=String(this.Na.length),this.Na.push([d,b]),this.Ea[c]=d);a[this.jb]=c;this.Sc.push(a);return{type:"ValueRef",value:d}}return b};var I=function(a,b,c){if(!(this instanceof I))return J(I,arguments);if(c&&(a||b))throw Error('When "opt_varName" is specified, "func" and "args" must be null.');if(a&&!b)throw Error('When "func" is specified, "args" must not be null.');this.f=a;this.o=b;this.w=c||null};x(I,zg);v("ee.ComputedObject",I);I.prototype.evaluate=function(a){if(!a||!r(a))throw Error("evaluate() requires a callback function.");Mf({json:this.v()},a)};I.prototype.evaluate=I.prototype.evaluate; I.prototype.W=function(a){return Mf({json:this.v()},a)};I.prototype.getInfo=I.prototype.W;I.prototype.encode=function(a){if(null===this.f&&null===this.o)return{type:"ArgumentRef",value:this.w};var b={},c;for(c in this.o)m(this.o[c])&&(b[c]=a(this.o[c]));b={type:"Invocation",arguments:b};a=a(this.f);b[p(a)?"functionName":"function"]=a;return b};I.prototype.v=function(){return Ig(this)};I.prototype.serialize=I.prototype.v;I.prototype.toString=function(){return"ee."+this.name()+"("+Jg(this)+")"}; v("ee.ComputedObject.prototype.toString",I.prototype.toString);I.prototype.name=function(){return"ComputedObject"};I.prototype.Tc=function(a,b){var c=Ua(arguments);c[0]=this;a.apply(k,c);return this};I.prototype.aside=I.prototype.Tc;var Kg=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.f=b.f;a.o=b.o;a.w=b.w;return a},J=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Lg={},Mg=function(a){return a.prototype instanceof I?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},Ng=function(a,b){if(b==a)return!0;switch(a){case "Element":return"Element"==b||"Image"==b||"Feature"==b||"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "FeatureCollection":case "Collection":return"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "Object":return!0;default:return!1}},Og=function(a){return q(a)|| a instanceof I&&"Number"==a.name()},Pg=function(a){return p(a)||a instanceof I&&"String"==a.name()},Qg=function(a){return t(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var K=function(){if(!(this instanceof K))return new K};x(K,zg);v("ee.Function",K);var Rg=lc;K.prototype.call=function(a){return this.apply(Sg(this,Array.prototype.slice.call(arguments,0)))};K.prototype.call=K.prototype.call;K.prototype.apply=function(a){a=new I(this,Tg(this,a));return Rg(a,this.F().returns)};K.prototype.apply=K.prototype.apply; var Ug=function(a,b,c){var d=m(b),e=a.F(),f=!1;if(1==c.length&&Qg(c[0])){var g=e.args;d&&(g=g.slice(1));g.length&&(f=!((1==g.length||g[1].optional)&&"Dictionary"==g[0].type))}if(f){if(c=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=Sg(a,d?[b].concat(c):c);return a.apply(c)},Tg=function(a,b){for(var c=a.F().args,d={},e={},f=0;f/,"");for(var c=0;c/,"");return new L(b,a)}),a&&a())};a?G("/algorithms",null,c,"GET"):c(G("/algorithms",null,void 0,"GET"))}},N=function(a,b,c,d){Zg();var e=d||"";Za(Xg,function(d,g){var f=g.split(".");if(2==f.length&&f[0]==b){var f=e+f[1],w=d.F();Yg[g]=!0;var oa=!1; w.args.length&&(g=w.args[0].type,oa="Object"!=g&&Ng(g,c));g=oa?a.prototype:a;f in g&&!g[f].signature||(g[f]=function(a){return Ug(d,oa?this:void 0,Array.prototype.slice.call(arguments,0))},g[f].toString=u(d.toString,d,f,oa),g[f].signature=w)}})},O=function(a){var b=function(a){for(var b in a)r(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var P=function(a,b){var c=ch(a),d=Ka(c,function(a){return a.replace(/^opt_/,"")});a=(a=k.EXPORTED_FN_INFO?k.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},f=b[0],g=t(f)&&!r(f)&&!n(f)&&!(f instanceof I);if(1d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(f=0;f=arguments.length){var c=arguments[0];if(b=Qg(c))a:{b=cb(c);var d=["properties"];if(ea(b)&&ea(d)&&b.length==d.length){for(var e=b.length,f=0;fc||4/,"");c[e]=!0}var f=k.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=Hi(g),Ai.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Yg[g]=!0):f[g].signature={});Lg=f;Ii()}catch(l){yi(l);return}ui="ready";for(vi=[];0a.le)return!1;a.Uc++;qg(a.C,a.da);setTimeout(u(a.ve,a),0);return!0}; Ni.prototype.ve=function(){if(!this.Aa){var a=u(function(a){this.Aa||(pg(this.C,this.da,a),$b(this.C,Qi,u(this.ce,this)),this.C.start())},this),b=this.getUrl();if(ef(b).Y.ha("profiling")){var c=new F;c.Ma="blob";c.X("complete",u(function(){this.Dd=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;var d;if(200<=c.getStatus()&&300>c.getStatus())try{d=URL.createObjectURL(ie(c))}catch(e){}a(d||b)},this));c.bb("ready",u(c.T,c));c.send(b,"GET")}else a(b)}};var Ri=function(){this.N=!1}; x(Ri,A);Ri.prototype.setActive=function(a){this.N=a};Ri.prototype.rd=function(){return this.N};var Mi=function(a,b){jg.call(this,a,b)};x(Mi,jg);Mi.prototype.ec=function(){return new Ri};Mi.prototype.nb=function(a){a.T()};Mi.prototype.Ac=function(a){return!a.aa&&!a.rd()};var Z=function(a,b,c,d,e){wg.call(this,a,b,c);this.minZoom=d.minZoom||0;this.maxZoom=d.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=d.tileSize||new google.maps.Size(256,256);this.zb=m(d.zb)?d.zb:!0;this.name=d.name;this.Nc=new zd;this.Bc=1;this.J=e||null};x(Z,wg);v("ee.MapLayerOverlay",Z);Z.prototype.Yb=function(a){return Tb(this,"tileevent",a)};Z.prototype.addTileCallback=Z.prototype.Yb;Z.prototype.Fc=function(a){bc(a)}; Z.prototype.removeTileCallback=Z.prototype.Fc;Z.prototype.getTile=function(a,b,c){if(ba.y||a.y>=1<