(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(ra,">"));-1!=a.indexOf('"')&&(a=a.replace(sa,"""));-1!=a.indexOf("'")&& (a=a.replace(ta,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(ua,"�"));return a},pa=/&/g,qa=//g,sa=/"/g,ta=/'/g,ua=/\x00/g,oa=/[\x00&<>"']/,wa=function(a,b){return ab?1:0};var xa=function(a,b){b.unshift(a);y.call(this,ma.apply(null,b));b.shift()};x(xa,y);xa.prototype.name="AssertionError"; var ya=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);throw new xa(""+e,f||[]);},z=function(a,b,c){a||ya("",null,b,Array.prototype.slice.call(arguments,2));return a},za=function(a,b){throw new xa("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Aa=function(a,b,c){q(a)||ya("Expected number but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2));return a},Ba=function(a,b,c){r(a)||ya("Expected function but got %s: %s.",[ca(a), a],b,Array.prototype.slice.call(arguments,2))},Ca=function(a,b,c){t(a)||ya("Expected object but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))},Da=function(a,b,c){n(a)||ya("Expected array but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var Ea=Array.prototype.indexOf?function(a,b,c){z(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;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},Ga=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]},Oa=function(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}, Qa=function(a,b){b=Ea(a,b);var c;(c=0<=b)&&Pa(a,b);return c},Pa=function(a,b){z(null!=a.length);Array.prototype.splice.call(a,b,1)},Ra=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)},Sa=function(a){var b=a.length;if(0=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},Va=function(a){for(var b={},c=0,d=0;dparseFloat(xb)){wb=String(zb);break a}}wb=xb} var Ab=wb,lb={},Bb=function(a){return mb(a,function(){for(var b=0,c=na(String(Ab)).split("."),d=na(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f=a.keyCode)a.keyCode=-1}catch(b){}};var Hb="closure_listenable_"+(1E6*Math.random()|0),Ib=function(a){return!(!a||!a[Hb])},Jb=0;var Kb=function(a,b,c,d,e){this.listener=a;this.Fb=null;this.src=b;this.type=c;this.capture=!!d;this.ca=e;this.key=++Jb;this.Ka=this.mb=!1},Lb=function(a){a.Ka=!0;a.listener=null;a.Fb=null;a.src=null;a.ca=null};var Mb=function(a){this.src=a;this.D={};this.hb=0};Mb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.D[f];a||(a=this.D[f]=[],this.hb++);var g=Nb(a,b,d,e);-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=cc(d[e],a,!0,b),c=c&&f}for(e=0;!b.Ja&&e>>0),Tb=function(a){z(a,"Listener can not be null.");if(r(a))return a;z(a.handleEvent,"An object listener must have handleEvent method.");a[dc]||(a[dc]=function(b){return a.handleEvent(b)});return a[dc]};var ec=function(a){A.call(this);this.ta=a;this.i={}};x(ec,A);var fc=[];ec.prototype.X=function(a,b,c,d){n(b)||(b&&(fc[0]=b.toString()),b=fc);for(var e=0;e++d,"infinite loop")}c=this.Pd;d=a.type||a;if(p(a))a=new B(a,c);else if(a instanceof B)a.target=a.target||c;else{var e=a;a=new B(d,c);jb(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Ja&&0<=g;g--)f=a.currentTarget=b[g],e=ic(f,d,!0,a)&&e;a.Ja||(f=a.currentTarget=c,e=ic(f,d,!0,a)&&e,a.Ja||(e=ic(f,d,!1,a)&&e));if(b)for(g=0;!a.Ja&&g=b.ac&&b.cancel())}this.yd?this.yd.call(this.bd,this):this.Gc=!0;this.Fa||Qc(this,new Rc)}};Pc.prototype.Zc=function(a,b){this.$b=!1;Sc(this,a,b)}; var Sc=function(a,b,c){a.Fa=!0;a.fa=c;a.Xa=!b;Tc(a)},Vc=function(a){if(a.Fa){if(!a.Gc)throw new Uc;a.Gc=!1}};Pc.prototype.bc=function(a){Vc(this);Wc(a);Sc(this,!0,a)};var Qc=function(a,b){Vc(a);Wc(b);Sc(a,!1,b)},Wc=function(a){z(!(a instanceof Pc),"An execution sequence may not be initiated with a blocking Deferred.")},Xc=function(a,b,c){z(!a.Uc,"Blocking Deferreds can not be re-used");a.Jb.push([b,c,void 0]);a.Fa&&Tc(a)}; Pc.prototype.then=function(a,b,c){var d,e,f=new Bc(function(a,b){d=a;e=b});Xc(this,d,function(a){a instanceof Rc?f.cancel():e(a)});return f.then(a,b,c)};xc(Pc); var Yc=function(a){return Ja(a.Jb,function(a){return r(a[1])})},Tc=function(a){if(a.Rb&&a.Fa&&Yc(a)){var b=a.Rb,c=Zc[b];c&&(k.clearTimeout(c.da),delete Zc[b]);a.Rb=0}a.m&&(a.m.ac--,delete a.m);for(var b=a.fa,d=c=!1;a.Jb.length&&!a.$b;){var e=a.Jb.shift(),f=e[0],g=e[1],e=e[2];if(f=a.Xa?g:f)try{var l=f.call(e||a.bd,b);m(l)&&(a.Xa=a.Xa&&(l==b||l instanceof Error),a.fa=b=l);if(yc(b)||"function"===typeof k.Promise&&b instanceof k.Promise)d=!0,a.$b=!0}catch(w){b=w,a.Xa=!0,Yc(a)||(c=!0)}}a.fa=b;d&&(l=u(a.Zc, a,!0),d=u(a.Zc,a,!1),b instanceof Pc?(Xc(b,l,d),b.Uc=!0):b.then(l,d));c&&(b=new $c(b),Zc[b.da]=b,a.Rb=b.da)},Uc=function(){y.call(this)};x(Uc,y);Uc.prototype.message="Deferred has already fired";Uc.prototype.name="AlreadyCalledError";var Rc=function(){y.call(this)};x(Rc,y);Rc.prototype.message="Deferred was canceled";Rc.prototype.name="CanceledError";var $c=function(a){this.da=k.setTimeout(u(this.we,this),0);this.qb=a}; $c.prototype.we=function(){z(Zc[this.da],"Cannot throw an error that is not scheduled.");delete Zc[this.da];throw this.qb;};var Zc={};var bd=function(a,b){m(a.name)?(this.name=a.name,this.code=bb[a.name]):(this.code=a.code,this.name=ad(a.code));y.call(this,ma("%s %s",this.name,b))};x(bd,y);var ad=function(a){var b=cb(function(b){return a==b});if(!m(b))throw Error("Invalid code: "+a);return b},bb={AbortError:3,EncodingError:5,InvalidModificationError:9,InvalidStateError:7,NotFoundError:1,NotReadableError:4,NoModificationAllowedError:6,PathExistsError:12,QuotaExceededError:10,SecurityError:2,SyntaxError:8,TypeMismatchError:11};var cd=function(a,b){B.call(this,a.type,b);this.ia=a};x(cd,B);var dd=function(){D.call(this);this.K=new FileReader;this.K.onloadstart=u(this.Da,this);this.K.onprogress=u(this.Da,this);this.K.onload=u(this.Da,this);this.K.onabort=u(this.Da,this);this.K.onerror=u(this.Da,this);this.K.onloadend=u(this.Da,this)};x(dd,D);h=dd.prototype;h.abort=function(){try{this.K.abort()}catch(a){throw new bd(a,"aborting read");}};h.ja=function(){return this.K.readyState};h.Da=function(a){this.dispatchEvent(new cd(a,this))};h.c=function(){dd.j.c.call(this);delete this.K}; h.readAsArrayBuffer=function(a){this.K.readAsArrayBuffer(a)};h.readAsText=function(a,b){this.K.readAsText(a,b)};var ed=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,""))},fd=function(a){a=String(a);if(ed(a))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},gd=function(a){return eval("("+a+")")},id=function(a){return(new hd(void 0)).v(a)}, hd=function(a){this.Hb=a};hd.prototype.v=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(n(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f=a.length)throw pd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},sd=function(a,b){if(ea(a))try{Ga(a,b,void 0)}catch(c){if(c!==pd)throw c;}else{a=rd(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==pd)throw c;}}};var td=function(a,b){this.u={};this.i=[];this.ib=this.h=0;var c=arguments.length;if(12*this.h&&ud(this),!0):!1};var ud=function(a){if(a.h!=a.i.length){for(var b=0,c=0;b=d.i.length)throw pd;var e=d.i[b++];return a?e:d.u[e]};return e};var vd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var wd=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=Jd(this).value)for(r(b)&&(b=b()),a=new Cd(a,String(b),this.ne),c&&(a.ed=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 Kd={},Ld=null,Md=function(a){Ld||(Ld=new Ed(""),Kd[""]=Ld,Ld.Kd(Hd));var b;if(!(b=Kd[a])){b=new Ed(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Md(a.substr(0,c));c.ld()[d]=b;b.m=c;Kd[a]=b}return b};var Nd=function(a,b){a&&a.log(Id,b,void 0)};var Od=function(a,b,c){if(r(a))c&&(a=u(a,c));else if(a&&"function"==typeof a.handleEvent)a=u(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647");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.Kc.nd()].join("-");var f=this.ad(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.nc()));"failed"==f.getStatus()&&this.dispatchEvent(new ze)});this.Kc.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(),Wa(b))};h.c=function(){we.j.c.call(this);this.oa.forEach(Wa);this.oa.clear();this.oa=null;Wa(this.ca);this.Kc=this.ca=null};var xe=function(a,b){return La(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.Hc="new";this.Gd=0;this.vc=!1};x(Ae,D); var Ce=function(a){if(!a.vc&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");Be(a,"loading");a.Z=new E;a.Z.Ma="blob";a.Z.X("complete",function(){var a=ie(this.Z);if(200<=this.Z.getStatus()&&300>this.Z.getStatus())this.ue=je(this.Z),this.Ld=a,this.Ta();else if(a){var c=new dd;c.X("loadend",function(){this.eb(c.K.result)},void 0,this);c.readAsText(a)}else this.eb("Failed to load tile.")},!1,a);a.Z.bb("ready",ja(Wa,a.Z));a.Z.send(a.Lb, "GET")};h=Ae.prototype;h.Ta=function(){this.Gb(this);Be(this,"loaded")};h.Ra=function(){Wa(this.Z)};h.eb=function(){this.Gd>=this.ke?Be(this,"failed"):(this.Gd++,this.vc=!0,this.Ra(),Ce(this),this.vc=!1)};h.abort=function(){this.Ra();Be(this,"aborted")};h.getStatus=function(){return this.Hc};var Be=function(a,b){a.Hc=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.Wc=new td;this.dd=new td};x(Fe,we);v("ee.layers.BinaryOverlay",Fe);Fe.prototype.ad=function(a,b,c,d){var e=new Ge(a,b,c,d);this.ca.X(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.Wc.set(a,new Float32Array(e.Td)),this.dd.set(a,e.H))});return e};Fe.prototype.c=function(){Fe.j.c.call(this);this.dd=this.Wc=null};var Ge=function(a,b,c,d){Ae.call(this,a,b,c,d)};x(Ge,Ae); Ge.prototype.Ta=function(){var a=new dd;a.X("loadend",function(){this.Td=a.K.result;Ae.prototype.Ta.call(this)},void 0,this);a.readAsArrayBuffer(this.Ld)};var He=function(a){for(var b=arguments[0],c=1;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.Fc(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.Fc=function(a){this.M=a;this.Y&&this.Y.Fc(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 td,a.h=0,a.I&&Qd(a.I,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=Ye.prototype;h.B=function(){gf(this);return this.h};h.add=function(a,b){gf(this);this.I=null;a=hf(this,a);var c=this.l.get(a);c||this.l.set(a,c=[]);c.push(b);this.h=Aa(this.h)+1;return this};h.remove=function(a){gf(this);a=hf(this,a);return this.l.ha(a)?(this.I=null,this.h=Aa(this.h)-this.l.get(a).length,this.l.remove(a)):!1};h.clear=function(){this.l=this.I=null;this.h=0}; h.isEmpty=function(){gf(this);return 0==this.h};h.ha=function(a){gf(this);a=hf(this,a);return this.l.ha(a)};h.P=function(){gf(this);for(var a=this.l.s(),b=this.l.P(),c=[],d=0;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=gb(a);return F("/value",G(a),b)};v("ee.data.getValue",Mf);var Nf=function(a,b){a=gb(a);n(a.dimensions)&&(a.dimensions=a.dimensions.join("x"));a=G(a).add("getid","1");return F("/thumb",a,b)};v("ee.data.getThumbId",Nf);var Of=function(a){return Bf+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};v("ee.data.makeThumbUrl",Of);var Pf=function(a,b){a=gb(a);return F("/download",G(a),b)};v("ee.data.getDownloadId",Pf); var Qf=function(a){return Bf+"/api/download?docid="+a.docid+"&token="+a.token};v("ee.data.makeDownloadUrl",Qf);var Rf=function(a,b){a=gb(a);return F("/table",G(a),b)};v("ee.data.getTableDownloadId",Rf);var Sf=function(a){return Bf+"/api/table?docid="+a.docid+"&token="+a.token};v("ee.data.makeTableDownloadUrl",Sf);var Uf=function(a,b,c){var d=Tf;try{return Tf=a,b.call(c)}finally{Tf=d}};v("ee.data.withProfiling",Uf); v("ee.data.newTaskId",function(a,b){var c={};q(a)&&(c.count=a);return F("/newtaskid",G(c),b)});v("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");return F("/taskstatus?q="+a.join(),null,b,"GET")});v("ee.data.getTaskList",function(a){return F("/tasklist",null,a,"GET")});v("ee.data.cancelTask",function(a,b){return Vf(a,"CANCEL",b)}); var Vf=function(a,b,c){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");var d;a:{d=Wf;for(var e in d)if(d[e]==b){d=!0;break a}d=!1}if(!d)throw Error("Invalid action: "+b);return F("/updatetask",G({id:a,action:b}),c,"POST")};v("ee.data.updateTask",Vf);v("ee.data.startProcessing",function(a,b,c){b=gb(b);b.id=a;return F("/processingrequest",G(b),c)}); v("ee.data.startIngestion",function(a,b,c){a={id:a,request:id(b)};return F("/ingestionrequest",G(a),c)});v("ee.data.startTableIngestion",function(a,b,c){a={id:a,tableRequest:id(b)};return F("/ingestionrequest",G(a),c)});var Xf=function(a,b){return F("/info",(new Ye).add("id",a),b)};v("ee.data.getInfo",Xf);var Yf=function(a,b){a=G(a);return F("/list",a,b)};v("ee.data.getList",Yf);v("ee.data.getAssetRoots",function(a){return F("/buckets",null,a,"GET")}); v("ee.data.createAssetHome",function(a,b){a=G({id:a});F("/createbucket",a,b)});v("ee.data.createAsset",function(a,b,c,d){p(a)||(a=id(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return F("/create",G(a),d)});v("ee.data.createFolder",function(a,b,c){return F("/createfolder",G({id:a,force:b||!1}),c)});v("ee.data.renameAsset",function(a,b,c){F("/rename",G({sourceId:a,destinationId:b}),c)});v("ee.data.copyAsset",function(a,b,c){F("/copy",G({sourceId:a,destinationId:b}),c)}); v("ee.data.deleteAsset",function(a,b){F("/delete",G({id:a}),b)});v("ee.data.getAssetAcl",function(a,b){return F("/getacl",G({id:a}),b,"GET")});v("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:id(b)};F("/setacl",G(a),c)});v("ee.data.setAssetProperties",function(a,b,c){a={id:a,properties:id(b)};F("/setproperties",G(a),c)});v("ee.data.getAssetRootQuota",function(a,b){return F("/quota",G({id:a}),b,"GET")}); var Wf={Ae:"CANCEL",De:"UPDATE"},F=function(a,b,c,d){Df();var e=Tf,f={"Content-Type":"application/x-www-form-urlencoded"},g=wf();if(null!=g)f.Authorization=g;else if(c&&sf&&jf)return nf(function(){Uf(e,function(){F(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new Ye;e&&b.add("profiling","1");b=Gf(b,a);null!=Cf&&(f["X-XSRF-Token"]=Cf);var l=function(a,b,c,d){var f=b("X-Earth-Engine-Computation-Profile");f&&e&&e(f);var g,l,w;b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"== b||"text/json"==b)try{g=gd(c),l=g.data}catch(Ri){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(d)return d(l,w),null;if(!w)return l;throw Error(w);},w=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(w)|| (a+=-1!=a.indexOf("?")?"&":"?",a+=w,w=null);var Z=zf+a;if(c)return Zf.push({url:Z,bc:function(a){a=a.target;var b=a.getStatus(),d=u(a.getResponseHeader,a),e;try{e=a.a?a.a.responseText:""}catch(Ai){Nd(a.G,"Can not get responseText: "+Ai.message),e=""}return l(b,d,e,c)},method:g,content:w,headers:f}),$f.hd(),null;var fb=Ud();fb.open(g,Z,!1);Xa(f,function(a,b){fb.setRequestHeader(b,a)});fb.send(w);return l(fb.status,function(a){try{return fb.getResponseHeader(a)}catch(Qi){return null}},fb.responseText, null)},mf=function(a){var b=function(){k.gapi.config.update("client/cors",!0);sf||(sf=k.gapi.auth.authorize);a()};if(t(k.gapi)&&t(k.gapi.auth)&&r(k.gapi.auth.authorize))b();else{for(var c=ka().toString(36);c in k;)c+="_";k[c]=function(){delete k[c];b()};Ne("https://apis.google.com/js/client.js?onload="+c)}},qf=function(a,b,c){c.access_token?(b=c.token_type+" "+c.access_token,isFinite(c.expires_in)&&(c=900*c.expires_in,setTimeout(nf,.9*c),uf=ka()+c),lf=b,a&&a()):b&&b(c.error||"Unknown error.")},G= function(a){var b=new Ye,c;for(c in a)b.set(c,a[c]);return b},Zf=[],$f=new Ke(function(){var a=Zf.shift();if(a){var b=a.url,c=a.bc,d=a.method,e=a.content,a=a.headers,f=Ef,g=new E;$d.push(g);c&&g.X("complete",c);g.bb("ready",g.Wd);f&&(g.Oa=Math.max(0,f));g.send(b,d,e,a)}0==Zf.length||$f.hd()},350),zf=null,Bf=null,Cf=null,Gf=kc,lf=null,uf=null,jf=null,kf=[],sf=null,Af=!1,Ef=0,Tf=null;var ag=function(){this.O=[];this.S=[]};h=ag.prototype;h.enqueue=function(a){this.S.push(a)};h.Sa=function(){0==this.O.length&&(this.O=this.S,this.O.reverse(),this.S=[]);return this.O.pop()};h.B=function(){return this.O.length+this.S.length};h.isEmpty=function(){return 0==this.O.length&&0==this.S.length};h.clear=function(){this.O=[];this.S=[]};h.contains=function(a){return 0<=Ea(this.O,a)||0<=Ea(this.S,a)}; h.remove=function(a){var b;b=this.O;var c=Fa(b,a);0<=c?(Pa(b,c),b=!0):b=!1;return b||Qa(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 ag;this.ka=new yd;this.fc=0;this.wc=null;this.kb()};x(bg,A);bg.prototype.Va=function(){var a=ka();if(!(null!=this.wc&&a-this.wcthis.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=eg.prototype; h.remove=function(){var a=this.R,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Oa(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.Qc}};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("/")};tg.prototype.nc=function(){return this.pa.length};var vg=function(a){B.call(this,"tileevent");this.count=a};x(vg,B);var wg=function(){};var xg=function(){this.ga=-1};var yg=function(){this.ga=64;this.A=Array(4);this.Rd=Array(this.ga);this.Pb=this.Qa=0;this.reset()};x(yg,xg);yg.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 zg=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}; yg.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 Ag=function(a){this.jb="__ee_hash__";this.uc=!1!==a;this.Na=[];this.Ea={};this.Rc=[]};v("ee.Serializer",Ag);var Bg=new hd,Cg=new yg,Eg=function(a,b){return Dg(new Ag(m(b)?b:!0),a)};v("ee.Serializer.encode",Eg);var Fg=function(a){return Bg.v(Eg(a))};v("ee.Serializer.toJSON",Fg);var Gg=function(a){a=Dg(new Ag(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Bg.v(a)};v("ee.Serializer.toReadableJSON",Gg); var Dg=function(a,b){b=a.pb(b);a.uc&&(b=t(b)&&"ValueRef"==b.type&&1==a.Na.length?a.Na[0][1]:{type:"CompoundValue",scope:a.Na,value:b},a.Na=[],Ga(a.Rc,u(function(a){delete a[this.jb]},a)),a.Rc=[],a.Ea={});return b}; Ag.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.uc&&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 wg){if(b=a.encode(u(this.pb,this)),!(n(b)||t(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Ia(a,function(a){return this.pb(a)}, this);else if(t(a)&&!r(a))b=Za(a,function(a){if(!r(a))return this.pb(a)},this),eb(b,this.jb),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.uc){Cg.reset();Cg.update(Bg.v(b));var c=Cg.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.Rc.push(a);return{type:"ValueRef",value:d}}return b};var H=function(a,b,c){if(!(this instanceof H))return I(H,arguments);if(c&&(a||b))throw Error('When "opt_varName" is specified, "func" and "args" must be null.');if(a&&!b)throw Error('When "func" is specified, "args" must not be null.');this.f=a;this.o=b;this.w=c||null};x(H,wg);v("ee.ComputedObject",H);H.prototype.evaluate=function(a){if(!a||!r(a))throw Error("evaluate() requires a callback function.");Mf({json:this.v()},a)};H.prototype.evaluate=H.prototype.evaluate; H.prototype.W=function(a){return Mf({json:this.v()},a)};H.prototype.getInfo=H.prototype.W;H.prototype.encode=function(a){if(null===this.f&&null===this.o)return{type:"ArgumentRef",value:this.w};var b={},c;for(c in this.o)m(this.o[c])&&(b[c]=a(this.o[c]));b={type:"Invocation",arguments:b};a=a(this.f);b[p(a)?"functionName":"function"]=a;return b};H.prototype.v=function(){return Fg(this)};H.prototype.serialize=H.prototype.v;H.prototype.toString=function(){return"ee."+this.name()+"("+Gg(this)+")"}; v("ee.ComputedObject.prototype.toString",H.prototype.toString);H.prototype.name=function(){return"ComputedObject"};H.prototype.Sc=function(a,b){var c=Sa(arguments);c[0]=this;a.apply(k,c);return this};H.prototype.aside=H.prototype.Sc;var Hg=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.f=b.f;a.o=b.o;a.w=b.w;return a},I=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Ig={},Jg=function(a){return a.prototype instanceof H?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},Kg=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}},Lg=function(a){return q(a)|| a instanceof H&&"Number"==a.name()},Mg=function(a){return p(a)||a instanceof H&&"String"==a.name()},Ng=function(a){return t(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var J=function(){if(!(this instanceof J))return new J};x(J,wg);v("ee.Function",J);var Og=kc;J.prototype.call=function(a){return this.apply(Pg(this,Array.prototype.slice.call(arguments,0)))};J.prototype.call=J.prototype.call;J.prototype.apply=function(a){a=new H(this,Qg(this,a));return Og(a,this.F().returns)};J.prototype.apply=J.prototype.apply; var Rg=function(a,b,c){var d=m(b),e=a.F(),f=!1;if(1==c.length&&Ng(c[0])){var g=e.args;d&&(g=g.slice(1));g.length&&(f=!((1==g.length||g[1].optional)&&"Dictionary"==g[0].type))}if(f){if(c=gb(c[0]),d){d=e.args[0].name;if(d in c)throw Error("Named args for "+e.name+" can't contain keyword "+d);c[d]=b}}else c=Pg(a,d?[b].concat(c):c);return a.apply(c)},Qg=function(a,b){for(var c=a.F().args,d={},e={},f=0;f/,"");for(var c=0;c/,"");return new K(b,a)}),a&&a())};a?F("/algorithms",null,c,"GET"):c(F("/algorithms",null,void 0,"GET"))}},M=function(a,b,c,d){Wg();var e=d||"";Xa(Ug,function(d,g){var f=g.split(".");if(2==f.length&&f[0]==b){var f=e+f[1],w=d.F();Vg[g]=!0;var Z=!1;w.args.length&& (g=w.args[0].type,Z="Object"!=g&&Kg(g,c));g=Z?a.prototype:a;f in g&&!g[f].signature||(g[f]=function(a){return Rg(d,Z?this:void 0,Array.prototype.slice.call(arguments,0))},g[f].toString=u(d.toString,d,f,Z),g[f].signature=w)}})},N=function(a){var b=function(a){for(var b in a)r(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var O=function(a,b){var c=$g(a),d=Ia(c,function(a){return a.replace(/^opt_/,"")});a=(a=k.EXPORTED_FN_INFO?k.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},f=b[0],g=t(f)&&!r(f)&&!n(f)&&!(f instanceof H);if(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=Ng(c))a:{b=ab(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]=Ei(g),xi.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Vg[g]=!0):f[g].signature={});Ig=f;Fi()}catch(l){vi(l);return}ri="ready";for(si=[];0a.le)return!1;a.Tc++;og(a.C,a.da);setTimeout(u(a.ve,a),0);return!0}; Ki.prototype.ve=function(){if(!this.Aa){var a=u(function(a){this.Aa||(ng(this.C,this.da,a),Zb(this.C,Ni,u(this.ce,this)),this.C.start())},this),b=this.getUrl();if(ef(b).Y.ha("profiling")){var c=new E;c.Ma="blob";c.X("complete",u(function(){this.Dd=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;var d;if(200<=c.getStatus()&&300>c.getStatus())try{d=URL.createObjectURL(ie(c))}catch(e){}a(d||b)},this));c.bb("ready",u(c.T,c));c.send(b,"GET")}else a(b)}};var Oi=function(){this.N=!1}; x(Oi,A);Oi.prototype.setActive=function(a){this.N=a};Oi.prototype.rd=function(){return this.N};var Ji=function(a,b){hg.call(this,a,b)};x(Ji,hg);Ji.prototype.ec=function(){return new Oi};Ji.prototype.nb=function(a){a.T()};Ji.prototype.zc=function(a){return!a.aa&&!a.rd()};var Y=function(a,b,c,d,e){tg.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.Mc=new yd;this.Ac=1;this.J=e||null};x(Y,tg);v("ee.MapLayerOverlay",Y);Y.prototype.Yb=function(a){return Sb(this,"tileevent",a)};Y.prototype.addTileCallback=Y.prototype.Yb;Y.prototype.Ec=function(a){ac(a)}; Y.prototype.removeTileCallback=Y.prototype.Ec;Y.prototype.getTile=function(a,b,c){if(ba.y||a.y>=1<