UNPKG

terahex

Version:

TeraHex is a geo-hashing scheme inspired by GeoHex with flexible grid sizes and encoders.

136 lines (133 loc) 188 kB
(function (global, factory) { if (typeof define === "function" && define.amd) { define(["exports"], factory); } else if (typeof exports !== "undefined") { factory(exports); } else { var mod = { exports: {} }; factory(mod.exports); global.terahex = mod.exports; } })(this, function (exports) { var scalaExports = {}; var __ScalaJSEnv = { exportsNamespace: scalaExports }; (function(){'use strict'; var d,aa="object"===typeof __ScalaJSEnv&&__ScalaJSEnv?__ScalaJSEnv:{},k="object"===typeof aa.global&&aa.global?aa.global:"object"===typeof global&&global&&global.Object===Object?global:this;aa.global=k;var ba="object"===typeof aa.exportsNamespace&&aa.exportsNamespace?aa.exportsNamespace:k;aa.exportsNamespace=ba;k.Object.freeze(aa);var ca={envInfo:aa,semantics:{asInstanceOfs:2,moduleInit:2,strictFloats:!1,productionMode:!0},assumingES6:!1,linkerVersion:"0.6.14"};k.Object.freeze(ca);k.Object.freeze(ca.semantics); var p=k.Math.imul||function(a,b){var c=a&65535,e=b&65535;return c*e+((a>>>16&65535)*e+c*(b>>>16&65535)<<16>>>0)|0},da=k.Math.fround||function(a){return+a},ea=k.Math.clz32||function(a){if(0===a)return 32;var b=1;0===(a&4294901760)&&(a<<=16,b+=16);0===(a&4278190080)&&(a<<=8,b+=8);0===(a&4026531840)&&(a<<=4,b+=4);0===(a&3221225472)&&(a<<=2,b+=2);return b+(a>>31)},fa=0,ga=k.WeakMap?new k.WeakMap:null;function ha(a){return function(b,c){return!(!b||!b.b||b.b.ge!==c||b.b.fe!==a)}} function ja(a){for(var b in a)return b}function r(a,b){return ka(a,b,0)}function ka(a,b,c){var e=new a.df(b[c]);if(c<b.length-1){a=a.we;c+=1;for(var f=e.a,g=0;g<f.length;g++)f[g]=ka(a,b,c)}return e}function la(a){return void 0===a?"undefined":a.toString()} function ma(a){switch(typeof a){case "string":return t(na);case "number":var b=a|0;return b===a?oa(b)?t(pa):qa(b)?t(ra):t(sa):ta(a)?t(ua):t(va);case "boolean":return t(xa);case "undefined":return t(ya);default:return null===a?a.$m():za(a)?t(Aa):a&&a.b?t(a.b):null}}function Ba(a,b){return a&&a.b||null===a?a.F(b):"number"===typeof a?"number"===typeof b&&(a===b?0!==a||1/a===1/b:a!==a&&b!==b):a===b} function Ca(a){switch(typeof a){case "string":return Da(Ea(),a);case "number":return Fa(Ga(),a);case "boolean":return a?1231:1237;case "undefined":return 0;default:return a&&a.b||null===a?a.S():null===ga?42:Ha(a)}}function Ia(a){return 2147483647<a?2147483647:-2147483648>a?-2147483648:a|0}function Ja(a,b){var c=k.Object.getPrototypeOf,e=k.Object.getOwnPropertyDescriptor;for(a=c(a);null!==a;){var f=e(a,b);if(void 0!==f)return f;a=c(a)}} function Ka(a,b,c){a=Ja(a,c);if(void 0!==a)return c=a.get,void 0!==c?c.call(b):a.value}function La(a,b,c,e){a=Ja(a,c);if(void 0!==a&&(a=a.set,void 0!==a)){a.call(b,e);return}throw new k.TypeError("super has no setter '"+c+"'.");}function Ma(a,b,c,e,f){a=a.a;c=c.a;if(a!==c||e<b||b+f<e)for(var g=0;g<f;g++)c[e+g]=a[b+g];else for(g=f-1;0<=g;g--)c[e+g]=a[b+g]} var Ha=null!==ga?function(a){switch(typeof a){case "string":case "number":case "boolean":case "undefined":return Ca(a);default:if(null===a)return 0;var b=ga.get(a);void 0===b&&(fa=b=fa+1|0,ga.set(a,b));return b}}:function(a){if(a&&a.b){var b=a.$idHashCode$0;if(void 0!==b)return b;if(k.Object.isSealed(a))return 42;fa=b=fa+1|0;return a.$idHashCode$0=b}return null===a?0:Ca(a)};function oa(a){return a<<24>>24===a&&1/a!==1/-0}function qa(a){return a<<16>>16===a&&1/a!==1/-0} function Na(a){return(a|0)===a&&1/a!==1/-0}function ta(a){return"number"===typeof a}function Oa(a){return null===a?u().Vc:a}this.__ScalaJSExportsNamespace=ba;function Pa(){this.vf=this.df=void 0;this.fe=this.we=this.s=null;this.ge=0;this.Tg=null;this.cf="";this.lc=this.$e=this.af=void 0;this.name="";this.isRawJSType=this.isArrayClass=this.isInterface=this.isPrimitive=!1;this.isInstance=void 0} function Qa(a,b,c){var e=new Pa;e.s={};e.we=null;e.Tg=a;e.cf=b;e.lc=function(){return!1};e.name=c;e.isPrimitive=!0;e.isInstance=function(){return!1};return e}function v(a,b,c,e,f,g,h,l){var n=new Pa,m=ja(a);h=h||function(a){return!!(a&&a.b&&a.b.s[m])};l=l||function(a,b){return!!(a&&a.b&&a.b.ge===b&&a.b.fe.s[m])};n.vf=g;n.s=e;n.cf="L"+c+";";n.lc=l;n.name=c;n.isInterface=b;n.isRawJSType=!!f;n.isInstance=h;return n} function Ra(a){function b(a){if("number"===typeof a){this.a=Array(a);for(var b=0;b<a;b++)this.a[b]=f}else this.a=a}var c=new Pa,e=a.Tg,f="longZero"==e?u().Vc:e;b.prototype=new w;b.prototype.constructor=b;b.prototype.b=c;var e="["+a.cf,g=a.fe||a,h=a.ge+1;c.df=b;c.vf=x;c.s={d:1,of:1,e:1};c.we=a;c.fe=g;c.ge=h;c.Tg=null;c.cf=e;c.af=void 0;c.$e=void 0;c.lc=void 0;c.name=e;c.isPrimitive=!1;c.isInterface=!1;c.isArrayClass=!0;c.isInstance=function(a){return g.lc(a,h)};return c} function t(a){if(!a.af){var b=new Sa;b.dd=a;a.af=b}return a.af}function y(a){a.$e||(a.$e=Ra(a));return a.$e}Pa.prototype.getFakeInstance=function(){return this===na?"some string":this===xa?!1:this===pa||this===ra||this===sa||this===ua||this===va?0:this===Aa?u().Vc:this===ya?void 0:{b:this}};Pa.prototype.getSuperclass=function(){return this.vf?t(this.vf):null};Pa.prototype.getComponentType=function(){return this.we?t(this.we):null}; Pa.prototype.newArrayOfThisClass=function(a){for(var b=this,c=0;c<a.length;c++)b=y(b);return r(b,a)};var Ta=Qa(!1,"Z","boolean"),Ua=Qa(0,"C","char"),Va=Qa(0,"B","byte"),Wa=Qa(0,"S","short"),Xa=Qa(0,"I","int"),Ya=Qa("longZero","J","long"),Za=Qa(0,"F","float"),ab=Qa(0,"D","double"),bb=ha(Ta);Ta.lc=bb;var cb=ha(Ua);Ua.lc=cb;var db=ha(Va);Va.lc=db;var eb=ha(Wa);Wa.lc=eb;var fb=ha(Xa);Xa.lc=fb;var gb=ha(Ya);Ya.lc=gb;var hb=ha(Za);Za.lc=hb;var ib=ha(ab);ab.lc=ib;function kb(){}function w(){}w.prototype=kb.prototype;kb.prototype.c=function(){return this};kb.prototype.F=function(a){return this===a};kb.prototype.v=function(){var a=lb(ma(this)),b=(+(this.S()>>>0)).toString(16);return a+"@"+b};kb.prototype.S=function(){return Ha(this)};kb.prototype.toString=function(){return this.v()};function mb(a,b){if(a=a&&a.b){var c=a.ge||0;return!(c<b)&&(c>b||!a.fe.isPrimitive)}return!1} var x=v({d:0},!1,"java.lang.Object",{d:1},void 0,void 0,function(a){return null!==a},mb);kb.prototype.b=x; function nb(a,b){if(ob(b)){b=null===b?0:b.wb;var c;c=pb(qb(),0);0<=a.Wb(c)?(c=pb(qb(),65535),c=0>=a.Wb(c)):c=!1;return c&&a.ua.Fe()===b}if(oa(b))return b|=0,c=pb(qb(),-128),0<=a.Wb(c)?(c=pb(qb(),127),c=0>=a.Wb(c)):c=!1,c&&a.sh()===b;if(qa(b))return b|=0,c=pb(qb(),-32768),0<=a.Wb(c)?(c=pb(qb(),32767),c=0>=a.Wb(c)):c=!1,c&&a.Li()===b;if(Na(b))return b|=0,c=pb(qb(),-2147483648),0<=a.Wb(c)?(c=pb(qb(),2147483647),c=0>=a.Wb(c)):c=!1,c&&a.ua.Fe()===b;if(za(b)){c=Oa(b);b=c.i;c=c.l;a=a.ua.mg();var e=a.l;return a.i=== b&&e===c}return ta(b)?(b=+b,a=a.ua,a=rb(sb(),a),da(tb(ub(),a))===b):"number"===typeof b?(b=+b,a=a.ua,tb(ub(),rb(sb(),a))===b):!1}function z(a){var b=r(y(x),[a.a.length]);Ma(a,0,b,0,a.a.length);return b} function vb(a,b,c){if(32>c)return a.wa().a[31&b];if(1024>c)return a.k().a[31&b>>5].a[31&b];if(32768>c)return a.o().a[31&b>>10].a[31&b>>5].a[31&b];if(1048576>c)return a.x().a[31&b>>15].a[31&b>>10].a[31&b>>5].a[31&b];if(33554432>c)return a.la().a[31&b>>20].a[31&b>>15].a[31&b>>10].a[31&b>>5].a[31&b];if(1073741824>c)return a.zb().a[31&b>>25].a[31&b>>20].a[31&b>>15].a[31&b>>10].a[31&b>>5].a[31&b];throw(new B).c();} function wb(a,b,c,e){if(32<=e)if(1024>e)1===a.Ma()&&(a.B(r(y(x),[32])),a.k().a[31&b>>5]=a.wa(),a.Xb(1+a.Ma()|0)),a.N(r(y(x),[32]));else if(32768>e)2===a.Ma()&&(a.R(r(y(x),[32])),a.o().a[31&b>>10]=a.k(),a.Xb(1+a.Ma()|0)),a.B(a.o().a[31&c>>10]),null===a.k()&&a.B(r(y(x),[32])),a.N(r(y(x),[32]));else if(1048576>e)3===a.Ma()&&(a.xa(r(y(x),[32])),a.x().a[31&b>>15]=a.o(),a.Xb(1+a.Ma()|0)),a.R(a.x().a[31&c>>15]),null===a.o()&&a.R(r(y(x),[32])),a.B(a.o().a[31&c>>10]),null===a.k()&&a.B(r(y(x),[32])),a.N(r(y(x), [32]));else if(33554432>e)4===a.Ma()&&(a.sb(r(y(x),[32])),a.la().a[31&b>>20]=a.x(),a.Xb(1+a.Ma()|0)),a.xa(a.la().a[31&c>>20]),null===a.x()&&a.xa(r(y(x),[32])),a.R(a.x().a[31&c>>15]),null===a.o()&&a.R(r(y(x),[32])),a.B(a.o().a[31&c>>10]),null===a.k()&&a.B(r(y(x),[32])),a.N(r(y(x),[32]));else if(1073741824>e)5===a.Ma()&&(a.ud(r(y(x),[32])),a.zb().a[31&b>>25]=a.la(),a.Xb(1+a.Ma()|0)),a.sb(a.zb().a[31&c>>25]),null===a.la()&&a.sb(r(y(x),[32])),a.xa(a.la().a[31&c>>20]),null===a.x()&&a.xa(r(y(x),[32])), a.R(a.x().a[31&c>>15]),null===a.o()&&a.R(r(y(x),[32])),a.B(a.o().a[31&c>>10]),null===a.k()&&a.B(r(y(x),[32])),a.N(r(y(x),[32]));else throw(new B).c();}function xb(a,b,c){var e=r(y(x),[32]);Ma(a,b,e,c,32-(c>b?c:b)|0);return e} function yb(a,b,c){if(32<=c)if(1024>c)a.N(a.k().a[31&b>>5]);else if(32768>c)a.B(a.o().a[31&b>>10]),a.N(a.k().a[31&b>>5]);else if(1048576>c)a.R(a.x().a[31&b>>15]),a.B(a.o().a[31&b>>10]),a.N(a.k().a[31&b>>5]);else if(33554432>c)a.xa(a.la().a[31&b>>20]),a.R(a.x().a[31&b>>15]),a.B(a.o().a[31&b>>10]),a.N(a.k().a[31&b>>5]);else if(1073741824>c)a.sb(a.zb().a[31&b>>25]),a.xa(a.la().a[31&b>>20]),a.R(a.x().a[31&b>>15]),a.B(a.o().a[31&b>>10]),a.N(a.k().a[31&b>>5]);else throw(new B).c();} function zb(a,b){var c=-1+a.Ma()|0;switch(c){case 5:a.ud(z(a.zb()));a.sb(z(a.la()));a.xa(z(a.x()));a.R(z(a.o()));a.B(z(a.k()));a.zb().a[31&b>>25]=a.la();a.la().a[31&b>>20]=a.x();a.x().a[31&b>>15]=a.o();a.o().a[31&b>>10]=a.k();a.k().a[31&b>>5]=a.wa();break;case 4:a.sb(z(a.la()));a.xa(z(a.x()));a.R(z(a.o()));a.B(z(a.k()));a.la().a[31&b>>20]=a.x();a.x().a[31&b>>15]=a.o();a.o().a[31&b>>10]=a.k();a.k().a[31&b>>5]=a.wa();break;case 3:a.xa(z(a.x()));a.R(z(a.o()));a.B(z(a.k()));a.x().a[31&b>>15]=a.o();a.o().a[31& b>>10]=a.k();a.k().a[31&b>>5]=a.wa();break;case 2:a.R(z(a.o()));a.B(z(a.k()));a.o().a[31&b>>10]=a.k();a.k().a[31&b>>5]=a.wa();break;case 1:a.B(z(a.k()));a.k().a[31&b>>5]=a.wa();break;case 0:break;default:throw(new C).r(c);}}function D(a,b){var c=a.a[b];a.a[b]=null;return z(c)} function Ab(a,b,c){a.Xb(c);c=-1+c|0;switch(c){case -1:break;case 0:a.N(b.wa());break;case 1:a.B(b.k());a.N(b.wa());break;case 2:a.R(b.o());a.B(b.k());a.N(b.wa());break;case 3:a.xa(b.x());a.R(b.o());a.B(b.k());a.N(b.wa());break;case 4:a.sb(b.la());a.xa(b.x());a.R(b.o());a.B(b.k());a.N(b.wa());break;case 5:a.ud(b.zb());a.sb(b.la());a.xa(b.x());a.R(b.o());a.B(b.k());a.N(b.wa());break;default:throw(new C).r(c);}}function Db(){}Db.prototype=new w;Db.prototype.constructor=Db;Db.prototype.c=function(){return this}; function Eb(a,b,c){a=c>>5;var e=31&c;c=(b.O+a|0)+(0===e?0:1)|0;var f=r(y(Xa),[c]),g=b.w;if(0===e)Ma(g,0,f,a,f.a.length-a|0);else{var h=32-e|0;f.a[-1+f.a.length|0]=0;for(var l=-1+f.a.length|0;l>a;){var n=l;f.a[n]=f.a[n]|g.a[-1+(l-a|0)|0]>>>h|0;f.a[-1+l|0]=g.a[-1+(l-a|0)|0]<<e;l=-1+l|0}}e=-1+a|0;if(!(0>=a))for(a=0;;){f.a[a]=0;if(a===e)break;a=1+a|0}b=Fb(new E,b.Q,c,f);Gb(b);return b} function Hb(a,b,c){a=c>>5;var e=31&c;if(a>=b.O)return 0>b.Q?Ib().Nf:Ib().ce;c=b.O-a|0;for(var f=r(y(Xa),[1+c|0]),g=c,h=b.w,l=0;l<a;)l=1+l|0;if(0===e)Ma(h,a,f,0,g);else{for(var n=32-e|0,l=0;l<(-1+g|0);)f.a[l]=h.a[l+a|0]>>>e|0|h.a[1+(l+a|0)|0]<<n,l=1+l|0;f.a[l]=h.a[l+a|0]>>>e|0}if(0>b.Q){for(g=0;g<a&&0===b.w.a[g];)g=1+g|0;h=0!==b.w.a[g]<<(32-e|0);if(g<a||0<e&&h){for(g=0;g<c&&-1===f.a[g];)f.a[g]=0,g=1+g|0;g===c&&(c=1+c|0);a=g;f.a[a]=1+f.a[a]|0}}b=Fb(new E,b.Q,c,f);Gb(b);return b} function Jb(a,b){if(0===b.Q)return 0;a=b.O<<5;var c=b.w.a[-1+b.O|0];0>b.Q&&Kb(b)===(-1+b.O|0)&&(c=-1+c|0);return a=a-ea(c)|0}Db.prototype.b=v({$i:0},!1,"java.math.BitLevel$",{$i:1,d:1});var Lb=void 0;function Mb(){Lb||(Lb=(new Db).c());return Lb}function Nb(){this.bh=this.ch=null}Nb.prototype=new w;Nb.prototype.constructor=Nb; Nb.prototype.c=function(){Ob=this;var a=(new F).T([-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]),b=a.L.length|0,b=r(y(Xa),[b]),c;c=0;for(a=G(new H,a,a.L.length|0);a.I();){var e=a.E();b.a[c]=e|0;c=1+c|0}this.ch=b;a=(new F).T([-2147483648,1162261467,1073741824,1220703125,362797056,1977326743,1073741824,387420489,1E9,214358881,429981696,815730721,1475789056,170859375,268435456,410338673,612220032,893871739,128E7,1801088541,113379904,148035889,191102976,244140625, 308915776,387420489,481890304,594823321,729E6,887503681,1073741824,1291467969,1544804416,1838265625,60466176]);b=a.L.length|0;b=r(y(Xa),[b]);c=0;for(a=G(new H,a,a.L.length|0);a.I();)e=a.E(),b.a[c]=e|0,c=1+c|0;this.bh=b;return this}; function rb(a,b){a=b.Q;var c=b.O,e=b.w;if(0===a)return"0";if(1===c)return b=(+(e.a[0]>>>0)).toString(10),0>a?"-"+b:b;b="";var f=r(y(Xa),[c]);Ma(e,0,f,0,c);do{for(var g=0,e=-1+c|0;0<=e;){var h=g,g=f.a[e],l;var n=u();l=g;0===h?(n.ja=0,l=+(l>>>0)/1E9|0):l=Pb(n,l,h,1E9,0);f.a[e]=l;var n=l>>31,m=65535&l;l=l>>>16|0;var h=p(51712,m),m=p(15258,m),q=p(51712,l),h=h+((m+q|0)<<16)|0;p(1E9,n);p(15258,l);g=g-h|0;e=-1+e|0}e=""+g;for(b="000000000".substring(e.length|0)+e+b;0!==c&&0===f.a[-1+c|0];)c=-1+c|0}while(0!== c);f=0;for(c=b.length|0;;)if(f<c&&48===(65535&(b.charCodeAt(f)|0)))f=1+f|0;else break;b=b.substring(f);return 0>a?""+(new Qb).Hb(45)+b:b}Nb.prototype.b=v({aj:0},!1,"java.math.Conversion$",{aj:1,d:1});var Ob=void 0;function sb(){Ob||(Ob=(new Nb).c());return Ob}function Rb(){}Rb.prototype=new w;Rb.prototype.constructor=Rb;Rb.prototype.c=function(){return this}; function Sb(a,b,c,e){for(var f=r(y(Xa),[b]),g=0,h=0;g<e;){var l=a.a[g],n=l-c.a[g]|0,l=(-2147483648^n)>(-2147483648^l)?-1:0,m=h,h=m>>31,m=n+m|0,n=(-2147483648^m)<(-2147483648^n)?1+(l+h|0)|0:l+h|0;f.a[g]=m;h=n;g=1+g|0}for(;g<b;)c=a.a[g],n=h,e=n>>31,n=c+n|0,c=(-2147483648^n)<(-2147483648^c)?1+e|0:e,f.a[g]=n,h=c,g=1+g|0;return f}function Tb(a,b,c,e){for(a=-1+e|0;0<=a&&b.a[a]===c.a[a];)a=-1+a|0;return 0>a?0:(-2147483648^b.a[a])<(-2147483648^c.a[a])?-1:1} function Ub(a,b,c,e){var f=r(y(Xa),[1+b|0]),g=1,h=a.a[0],l=h+c.a[0]|0;f.a[0]=l;h=(-2147483648^l)<(-2147483648^h)?1:0;if(b>=e){for(;g<e;){var n=a.a[g],l=n+c.a[g]|0,n=(-2147483648^l)<(-2147483648^n)?1:0,h=l+h|0,l=(-2147483648^h)<(-2147483648^l)?1+n|0:n;f.a[g]=h;h=l;g=1+g|0}for(;g<b;)c=a.a[g],e=c+h|0,c=(-2147483648^e)<(-2147483648^c)?1:0,f.a[g]=e,h=c,g=1+g|0}else{for(;g<b;)n=a.a[g],l=n+c.a[g]|0,n=(-2147483648^l)<(-2147483648^n)?1:0,h=l+h|0,l=(-2147483648^h)<(-2147483648^l)?1+n|0:n,f.a[g]=h,h=l,g=1+g| 0;for(;g<e;)a=c.a[g],b=a+h|0,a=(-2147483648^b)<(-2147483648^a)?1:0,f.a[g]=b,h=a,g=1+g|0}0!==h&&(f.a[g]=h);return f} function Vb(a,b,c){a=b.Q;var e=c.Q,f=b.O,g=c.O;if(0===a)return c;if(0===e)return b;if(2===(f+g|0)){b=b.w.a[0];c=c.w.a[0];if(a===e)return e=b+c|0,c=(-2147483648^e)<(-2147483648^b)?1:0,0===c?(new E).t(a,e):Fb(new E,a,2,Wb(Xb(),e,(new F).T([c])));e=Ib();0>a?(a=b=c-b|0,c=(-2147483648^b)>(-2147483648^c)?-1:0):(a=c=b-c|0,c=(-2147483648^c)>(-2147483648^b)?-1:0);return cc(e,(new I).t(a,c))}if(a===e)e=f>=g?Ub(b.w,f,c.w,g):Ub(c.w,g,b.w,f);else{var h=f!==g?f>g?1:-1:Tb(0,b.w,c.w,f);if(0===h)return Ib().ce;1=== h?e=Sb(b.w,f,c.w,g):(c=Sb(c.w,g,b.w,f),a=e,e=c)}a=Fb(new E,a|0,e.a.length,e);Gb(a);return a} function dc(a,b,c){var e=b.Q;a=c.Q;var f=b.O,g=c.O;if(0===a)return b;if(0===e)return 0===c.Q?c:Fb(new E,-c.Q|0,c.O,c.w);if(2===(f+g|0))return b=b.w.a[0],f=0,c=c.w.a[0],g=0,0>e&&(e=b,b=-e|0,f=0!==e?~f:-f|0),0>a&&(a=c,e=g,c=-a|0,g=0!==a?~e:-e|0),a=Ib(),e=b,b=f,f=g,c=e-c|0,cc(a,(new I).t(c,(-2147483648^c)>(-2147483648^e)?-1+(b-f|0)|0:b-f|0));var h=f!==g?f>g?1:-1:Tb(ec(),b.w,c.w,f);if(e===a&&0===h)return Ib().ce;-1===h?(c=e===a?Sb(c.w,g,b.w,f):Ub(c.w,g,b.w,f),a=-a|0):(c=e===a?Sb(b.w,f,c.w,g):Ub(b.w,f, c.w,g),a=e);a=Fb(new E,a|0,c.a.length,c);Gb(a);return a}Rb.prototype.b=v({bj:0},!1,"java.math.Elementary$",{bj:1,d:1});var fc=void 0;function ec(){fc||(fc=(new Rb).c());return fc}function gc(){this.qe=this.Ye=null}gc.prototype=new w;gc.prototype.constructor=gc; gc.prototype.c=function(){hc=this;ic(10,10);ic(14,5);this.Ye=r(y(jc),[32]);this.qe=r(y(jc),[32]);var a,b;a=1;for(var c=b=0;;){var e=c;if(18>=e){this.qe.a[e]=cc(Ib(),(new I).t(a,b));var f=this.Ye,g=Ib(),h=a,l=b;f.a[e]=cc(g,(new I).t(0===(32&e)?h<<e:0,0===(32&e)?(h>>>1|0)>>>(31-e|0)|0|l<<e:h<<e));e=a;a=e>>>16|0;e=p(5,65535&e);f=p(5,a);a=e+(f<<16)|0;e=(e>>>16|0)+f|0;b=p(5,b)+(e>>>16|0)|0}else this.qe.a[e]=kc(this.qe.a[-1+e|0],this.qe.a[1]),this.Ye.a[e]=kc(this.Ye.a[-1+e|0],Ib().Qf);if(31===c)break;c= 1+c|0}return this};function ic(a,b){var c=r(y(Xa),[-1+a|0]);a=[];var e,f=e=1;a.push(null===f?0:f);f=0;for(c=c.a.length;f<c;){var g=e=p(e|0,b);a.push(null===g?0:g);f=1+f|0}new (y(Xa).df)(a)} function lc(a,b,c){if(c.O>b.O)var e=c,f=b;else e=b,f=c;var g=e,h=f;if(63>h.O){var l;var n=g.O,m=h.O,q=n+m|0,A=g.Q!==h.Q?-1:1;if(2===q){var N=g.w.a[0],V=h.w.a[0],ia=65535&N,ki=N>>>16|0,li=65535&V,mi=V>>>16|0,Dc=p(ia,li),pg=p(ki,li),ni=p(ia,mi),Ec=Dc+((pg+ni|0)<<16)|0,oi=(Dc>>>16|0)+ni|0,je=(p(ki,mi)+(oi>>>16|0)|0)+(((65535&oi)+pg|0)>>>16|0)|0;l=0===je?(new E).t(A,Ec):Fb(new E,A,2,Wb(Xb(),Ec,(new F).T([je])))}else{var jb=g.w,ke=h.w,T=r(y(Xa),[q]);if(0!==n&&0!==m)if(1===n)T.a[m]=mc(0,T,ke,m,jb.a[0]); else if(1===m)T.a[n]=mc(0,T,jb,n,ke.a[0]);else if(jb===ke&&n===m){var $a,Bb=-1+n|0;if(!(0>=n))for(var Cb=0;;){var Fc=Cb;$a=0;var pi=1+Fc|0,Yk=-1+n|0;if(!(pi>=n))for(var Gc=pi;;){var qg=Gc,qi=jb.a[Fc],ri=jb.a[qg],Zk=T.a[Fc+qg|0],si=$a,ti=65535&qi,ui=qi>>>16|0,vi=65535&ri,wi=ri>>>16|0,rg=p(ti,vi),xi=p(ui,vi),yi=p(ti,wi),zi=rg+((xi+yi|0)<<16)|0,sg=(rg>>>16|0)+yi|0,Ai=(p(ui,wi)+(sg>>>16|0)|0)+(((65535&sg)+xi|0)>>>16|0)|0,tg=zi+Zk|0,ug=(-2147483648^tg)<(-2147483648^zi)?1+Ai|0:Ai,Bi=tg+si|0,$k=(-2147483648^ Bi)<(-2147483648^tg)?1+ug|0:ug;T.a[Fc+qg|0]=Bi;$a=$k;if(Gc===Yk)break;Gc=1+Gc|0}T.a[Fc+n|0]=$a;if(Cb===Bb)break;Cb=1+Cb|0}Mb();var le=n<<1,Hc;Hc=0;var al=-1+le|0;if(!(0>=le))for(var Ic=0;;){var Yb=Ic,Zb=T.a[Yb];T.a[Yb]=Zb<<1|Hc;Hc=Zb>>>31|0;if(Ic===al)break;Ic=1+Ic|0}0!==Hc&&(T.a[le]=Hc);for(var $b=$a=0,wa=0;$b<n;){var ac=jb.a[$b],vg=jb.a[$b],Jc=T.a[wa],Kc=$a,Ci=65535&ac,Di=ac>>>16|0,Ei=65535&vg,wg=vg>>>16|0,Fi=p(Ci,Ei),Gi=p(Di,Ei),Hi=p(Ci,wg),xg=Fi+((Gi+Hi|0)<<16)|0,Ii=(Fi>>>16|0)+Hi|0,Ji=(p(Di, wg)+(Ii>>>16|0)|0)+(((65535&Ii)+Gi|0)>>>16|0)|0,yg=xg+Jc|0,zg=(-2147483648^yg)<(-2147483648^xg)?1+Ji|0:Ji,Ag=yg+Kc|0,Bg=(-2147483648^Ag)<(-2147483648^yg)?1+zg|0:zg;T.a[wa]=Ag;var wa=1+wa|0,Cg=Bg+T.a[wa]|0,Ki=(-2147483648^Cg)<(-2147483648^Bg)?1:0;T.a[wa]=Cg;$a=Ki;$b=1+$b|0;wa=1+wa|0}}else{var Li=-1+n|0;if(!(0>=n))for(var Lc=0;;){var Mc=Lc,Nc;Nc=0;var Dg=jb.a[Mc],Mi=-1+m|0;if(!(0>=m))for(var Oc=0;;){var me=Oc,Eg=ke.a[me],Ni=T.a[Mc+me|0],Oi=Nc,Fg=65535&Dg,Gg=Dg>>>16|0,Hg=65535&Eg,Pi=Eg>>>16|0,Qi=p(Fg, Hg),Ri=p(Gg,Hg),Si=p(Fg,Pi),Ti=Qi+((Ri+Si|0)<<16)|0,Ui=(Qi>>>16|0)+Si|0,Vi=(p(Gg,Pi)+(Ui>>>16|0)|0)+(((65535&Ui)+Ri|0)>>>16|0)|0,Ig=Ti+Ni|0,Pc=(-2147483648^Ig)<(-2147483648^Ti)?1+Vi|0:Vi,Wi=Ig+Oi|0,bl=(-2147483648^Wi)<(-2147483648^Ig)?1+Pc|0:Pc;T.a[Mc+me|0]=Wi;Nc=bl;if(Oc===Mi)break;Oc=1+Oc|0}T.a[Mc+m|0]=Nc;if(Lc===Li)break;Lc=1+Lc|0}}var Jg=Fb(new E,A,q,T);Gb(Jg);l=Jg}return l}var bc=(-2&g.O)<<4,Kg=nc(g,bc),ne=nc(h,bc),dl=oc(Kg,bc),Yi=dc(ec(),g,dl),Zi=oc(ne,bc),$i=dc(ec(),h,Zi),Lg=lc(a,Kg,ne),Mg= lc(a,Yi,$i),Qc=lc(a,dc(ec(),Kg,Yi),dc(ec(),$i,ne)),el=Qc,fl=Lg,Xp=Vb(ec(),el,fl),Qc=Vb(ec(),Xp,Mg),Qc=oc(Qc,bc),Yp=Lg=oc(Lg,bc<<1),Zp=Qc,$p=Vb(ec(),Yp,Zp);return Vb(ec(),$p,Mg)} function mc(a,b,c,e,f){var g;g=0;a=-1+e|0;if(!(0>=e))for(e=0;;){var h=e,l=c.a[h],n=65535&l,l=l>>>16|0,m=65535&f,q=f>>>16|0,A=p(n,m),m=p(l,m),N=p(n,q),n=A+((m+N|0)<<16)|0,A=(A>>>16|0)+N|0,l=(p(l,q)+(A>>>16|0)|0)+(((65535&A)+m|0)>>>16|0)|0;g=n+g|0;l=(-2147483648^g)<(-2147483648^n)?1+l|0:l;b.a[h]=g;g=l;if(e===a)break;e=1+e|0}return g}gc.prototype.b=v({cj:0},!1,"java.math.Multiplication$",{cj:1,d:1});var hc=void 0;function pc(){hc||(hc=(new gc).c());return hc}function qc(){this.ci=null;this.Sa=!1} qc.prototype=new w;qc.prototype.constructor=qc;qc.prototype.c=function(){return this};function rc(){var a;sc||(sc=(new qc).c());a=sc;a.Sa||a.Sa||(a.ci=(new tc).c(),a.Sa=!0);return a.ci}qc.prototype.b=v({fj:0},!1,"net.teralytics.terahex.Encoding$",{fj:1,d:1});var sc=void 0;function uc(){this.Kh=this.Yc=null}uc.prototype=new w;uc.prototype.constructor=uc;function vc(){}vc.prototype=uc.prototype;uc.prototype.$a=function(a){this.Yc=(new wc).$a(a);this.Kh=xc();return this}; function yc(a,b,c,e,f,g){a=zc(Ac(),(new J).u((new Bc).pa(b,c),(new Bc).pa(e,f)),g,a.Yc).nc(K(new L,function(){return function(a){return Cc(new Rc,a)}}(a)),(Sc(),(new Tc).c()));b=Uc();if(a&&a.b&&a.b.s.Em)return a.il;if(a&&a.b&&a.b.s.Lg)return a.L;c=[];a.G(K(new L,function(a,b){return function(a){return b.push(a)|0}}(b,c)));return c}function Vc(a,b,c,e){return Cc(new Rc,Wc(Ac(),(new Bc).pa(b,c),e,a.Yc))}uc.prototype.Ed=function(a){return this.Yc.Ed(a)};uc.prototype.withRootSize=function(a){return(new uc).$a(+a)}; uc.prototype.zonesWithin=function(a,b,c,e,f){return yc(this,+a,+b,+c,+e,f|0)};uc.prototype.size=function(a){return this.Ed(a|0)};uc.prototype.zoneByLocation=function(a,b,c){return Vc(this,+a,+b,c|0)};uc.prototype.decode=function(a){return Cc(new Rc,this.Kh.Vf(a))};uc.prototype.encode=function(a,b,c){a=Vc(this,+a,+b,c|0);return Xc(xc(),a.ab)};uc.prototype.b=v({hh:0},!1,"net.teralytics.terahex.GridJs",{hh:1,d:1});function Yc(){}Yc.prototype=new w;Yc.prototype.constructor=Yc;Yc.prototype.c=function(){return this}; function Zc(a,b){var c=M().ei;if(null===c?null===a:c.F(a))return(new J).u(M().Gf,$c(b));c=M().gi;if(null===c?null===a:c.F(a))return(new J).u(M().Gf,ad(b));c=M().fi;if(null===c?null===a:c.F(a))return(new J).u(M().Bf,bd(b));c=M().hi;if(null===c?null===a:c.F(a))return(new J).u(M().Bf,cd(b));if(null!==a){var c=a.M,e=c.l,f=a.P,g=f.i,f=f.l;if(-2===c.i&&-1===e&&-1===g&&-1===f)return(new J).u(M().Cf,bd(b))}return null!==a&&(c=a.M,e=c.l,f=a.P,g=f.i,f=f.l,-2===c.i&&-1===e&&0===g&&0===f)?(new J).u(M().Ef,bd(b)): null!==a&&(c=a.M,e=c.l,f=a.P,g=f.i,f=f.l,-2===c.i&&-1===e&&2===g&&0===f)?(new J).u(M().Cf,cd(b)):null!==a&&(c=a.M,e=c.l,f=a.P,g=f.i,f=f.l,-2===c.i&&-1===e&&3===g&&0===f)?(new J).u(M().Ef,cd(b)):null!==a&&(c=a.M,e=c.l,f=a.P,g=f.i,f=f.l,0===c.i&&0===e&&-2===g&&-1===f)?(new J).u(M().Og,dd(b)):null!==a&&(c=a.M,e=c.l,f=a.P,g=f.i,f=f.l,0===c.i&&0===e&&2===g&&0===f)?(new J).u(M().Ng,ed(b)):null!==a&&(c=a.M,e=c.l,f=a.P,g=f.i,f=f.l,2===c.i&&0===e&&-3===g&&-1===f)?(new J).u(M().Df,$c(b)):null!==a&&(c=a.M,e= c.l,f=a.P,g=f.i,f=f.l,2===c.i&&0===e&&-2===g&&-1===f)?(new J).u(M().Ff,$c(b)):null!==a&&(c=a.M,e=c.l,f=a.P,g=f.i,f=f.l,2===c.i&&0===e&&0===g&&0===f)?(new J).u(M().Df,ad(b)):null!==a&&(c=a.M,e=c.l,f=a.P,g=f.i,f=f.l,2===c.i&&0===e&&1===g&&0===f)?(new J).u(M().Ff,ad(b)):(new J).u(a,b)}Yc.prototype.b=v({kj:0},!1,"net.teralytics.terahex.Outliers$",{kj:1,d:1});var fd=void 0;function gd(){}gd.prototype=new w;gd.prototype.constructor=gd;gd.prototype.c=function(){return this}; function hd(a){var b=id;a=jd(a);var c=a.q(),e=kd();a=a.Ue(c,e.ka);b=K(new L,function(){return function(a){var b=a.ma,c=a.fa;a=(new ld).f("%f %f");c=[b,c];Ea();b=a.Ha;kd();md();a=[];for(var e=0,n=c.length|0;e<n;){var m=c[e];a.push(nd(m)?m.ua:m);e=1+e|0}od||(od=(new pd).c());for(var c=a.length|0,c=r(y(x),[c]),m=c.a.length,n=e=0,q=a.length|0,m=q<m?q:m,q=c.a.length,m=m<q?m:q;e<m;)c.a[n]=a[e],e=1+e|0,n=1+n|0;a=(new qd).c();b=rd(sd(a,b,c)).v();td(a);return b}}(b));c=kd();return a.nc(b,c.ka).ke("POLYGON ((", ", ","))")}gd.prototype.b=v({oj:0},!1,"net.teralytics.terahex.package$ZoneOps$",{oj:1,d:1});var id=void 0;function Sa(){this.dd=null}Sa.prototype=new w;Sa.prototype.constructor=Sa;function lb(a){return a.dd.name}Sa.prototype.v=function(){return(this.dd.isInterface?"interface ":this.dd.isPrimitive?"":"class ")+lb(this)};Sa.prototype.b=v({yj:0},!1,"java.lang.Class",{yj:1,d:1});function ud(){}ud.prototype=new w;ud.prototype.constructor=ud;ud.prototype.c=function(){return this}; ud.prototype.b=v({Ij:0},!1,"java.lang.Math$",{Ij:1,d:1});var vd=void 0;function wd(){this.Vh=this.Uh=this.Th=this.Wh=null}wd.prototype=new w;wd.prototype.constructor=wd;wd.prototype.c=function(){xd=this;this.Wh=yd(new zd,new k.RegExp("^[^\\x25]+"));this.Th=yd(new zd,new k.RegExp("^\\x25{2}"));this.Uh=yd(new zd,new k.RegExp("^\\x25n"));this.Vh=yd(new zd,new k.RegExp("^\\x25(?:([1-9]\\d*)\\$)?([-#+ 0,\\(\x3c]*)(\\d*)(?:\\.(\\d+))?([A-Za-z])"));return this}; wd.prototype.b=v({Qj:0},!1,"java.util.Formatter$",{Qj:1,d:1});var xd=void 0;function Ad(){xd||(xd=(new wd).c());return xd}function zd(){this.ii=null}zd.prototype=new w;zd.prototype.constructor=zd;function Bd(a,b){Cd||(Cd=(new Dd).c());a=a.ii.exec(b);return null===a?Ed():(new Fd).r(a)}function yd(a,b){a.ii=b;return a}zd.prototype.b=v({Rj:0},!1,"java.util.Formatter$RegExpExtractor",{Rj:1,d:1});function Gd(){}Gd.prototype=new w;Gd.prototype.constructor=Gd;function Hd(){}Hd.prototype=Gd.prototype; function Id(){}Id.prototype=new w;Id.prototype.constructor=Id;function Jd(){}Jd.prototype=Id.prototype;function Kd(){}Kd.prototype=new w;Kd.prototype.constructor=Kd;Kd.prototype.c=function(){return this};Kd.prototype.b=v({gk:0},!1,"scala.Predef$any2stringadd$",{gk:1,d:1});var Ld=void 0;function Md(){}Md.prototype=new w;Md.prototype.constructor=Md;Md.prototype.c=function(){return this};Md.prototype.b=v({qk:0},!1,"scala.math.Ordered$",{qk:1,d:1});var Nd=void 0; function Od(){this.Of=this.ah=null;this.Sa=0}Od.prototype=new w;Od.prototype.constructor=Od; Od.prototype.c=function(){Pd=this;(new Qd).c();Rd||(Rd=(new Sd).c());Td||(Td=(new Ud).c());kd();Vd();O();Wd();P();Xd||(Xd=(new Yd).c());Zd||(Zd=(new $d).c());ae||(ae=(new be).c());this.Of=Sc();ce||(ce=(new de).c());ee();fe||(fe=(new ge).c());he();ie||(ie=(new oe).c());pe||(pe=(new qe).c());re||(re=(new se).c());te||(te=(new ue).c());Nd||(Nd=(new Md).c());ve||(ve=(new we).c());xe||(xe=(new ye).c());ze||(ze=(new Ae).c());Be||(Be=(new Ce).c());return this}; function De(){var a=Ee();0===(2&a.Sa)&&0===(2&a.Sa)&&(a.ah=qb(),a.Sa=(2|a.Sa)<<24>>24);return a.ah}Od.prototype.b=v({uk:0},!1,"scala.package$",{uk:1,d:1});var Pd=void 0;function Ee(){Pd||(Pd=(new Od).c());return Pd}function Fe(){}Fe.prototype=new w;Fe.prototype.constructor=Fe; Fe.prototype.c=function(){Ge=this;He||(He=(new Ie).c());Je||(Je=(new Ke).c());Le||(Le=(new Me).c());Ne||(Ne=(new Oe).c());Pe||(Pe=(new Qe).c());Re||(Re=(new Se).c());Te||(Te=(new Ue).c());Ve||(Ve=(new We).c());Xe||(Xe=(new Ye).c());Ze||(Ze=(new $e).c());od||(od=(new pd).c());af||(af=(new bf).c());cf||(cf=(new df).c());ef||(ef=(new ff).c());return this};Fe.prototype.b=v({wk:0},!1,"scala.reflect.ClassManifestFactory$",{wk:1,d:1});var Ge=void 0;function gf(){}gf.prototype=new w; gf.prototype.constructor=gf;gf.prototype.c=function(){return this};gf.prototype.b=v({xk:0},!1,"scala.reflect.ManifestFactory$",{xk:1,d:1});var hf=void 0;function jf(){}jf.prototype=new w;jf.prototype.constructor=jf;jf.prototype.c=function(){kf=this;Ge||(Ge=(new Fe).c());hf||(hf=(new gf).c());return this};jf.prototype.b=v({Nk:0},!1,"scala.reflect.package$",{Nk:1,d:1});var kf=void 0;function lf(){}lf.prototype=new w;lf.prototype.constructor=lf;lf.prototype.c=function(){(new mf).c();return this}; lf.prototype.b=v({Sk:0},!1,"scala.util.control.Breaks",{Sk:1,d:1});function nf(){}nf.prototype=new w;nf.prototype.constructor=nf;function of(){}of.prototype=nf.prototype;nf.prototype.uf=function(a,b){b=p(-862048943,b);b=p(461845907,b<<15|b>>>17|0);return a^b};nf.prototype.cb=function(a,b){a=this.uf(a,b);return-430675100+p(5,a<<13|a>>>19|0)|0}; function pf(a,b,c){var e=(new qf).kc(0),f=(new qf).kc(0),g=(new qf).kc(0),h=(new qf).kc(1);b.G(K(new L,function(a,b,c,e,f){return function(a){a=rf(Q(),a);b.p=b.p+a|0;c.p^=a;0!==a&&(f.p=p(f.p,a));e.p=1+e.p|0}}(a,e,f,g,h)));b=a.cb(c,e.p);b=a.cb(b,f.p);b=a.uf(b,h.p);return a.jc(b,g.p)}function sf(a){var b=tf(),c=a.mb();if(0===c)return a=a.ob(),Da(Ea(),a);for(var e=-889275714,f=0;f<c;)e=b.cb(e,rf(Q(),a.nb(f))),f=1+f|0;return b.jc(e,c)} nf.prototype.jc=function(a,b){a^=b;a=p(-2048144789,a^(a>>>16|0));a=p(-1028477387,a^(a>>>13|0));return a^(a>>>16|0)};function uf(a,b,c){var e=(new qf).kc(0);c=(new qf).kc(c);b.G(K(new L,function(a,b,c){return function(e){c.p=a.cb(c.p,rf(Q(),e));b.p=1+b.p|0}}(a,e,c)));return a.jc(c.p,e.p)}function be(){}be.prototype=new w;be.prototype.constructor=be;be.prototype.c=function(){return this};be.prototype.b=v({Vk:0},!1,"scala.collection.$colon$plus$",{Vk:1,d:1});var ae=void 0;function $d(){} $d.prototype=new w;$d.prototype.constructor=$d;$d.prototype.c=function(){return this};$d.prototype.b=v({Wk:0},!1,"scala.collection.$plus$colon$",{Wk:1,d:1});var Zd=void 0;function vf(){this.Ab=null}vf.prototype=new w;vf.prototype.constructor=vf;vf.prototype.c=function(){wf=this;this.Ab=(new xf).c();return this};vf.prototype.b=v({al:0},!1,"scala.collection.Iterator$",{al:1,d:1});var wf=void 0;function O(){wf||(wf=(new vf).c());return wf}function yf(a,b,c,e){return a.de((new zf).c(),b,c,e).Db.gb} function Af(a,b,c){b=(new Bf).r(b);a.G(K(new L,function(a,b,c){return function(a){c.p=Cf(b,c.p,a)}}(a,c,b)));return b.p}function Df(a,b,c,e,f){var g=Ef(!0);Ff(b,c);a.G(K(new L,function(a,b,c,e){return function(a){if(e.p)Gf(b,a),e.p=!1;else return Ff(b,c),Gf(b,a)}}(a,b,e,g)));Ff(b,f);return b} function Hf(a,b,c){if(a.h())throw(new If).f("empty.minBy");var e=(new Bf).r(null),f=(new Bf).r(null);a.G(K(new L,function(a,b,c,e,f,q){return function(a){var c=b.j(a);if(q.p||+c<+e.p)f.p=a,e.p=c,q.p=!1}}(a,b,c,e,f,Ef(!0))));return f.p}function Jf(a,b,c){if(a.h())throw(new If).f("empty.maxBy");var e=(new Bf).r(null),f=(new Bf).r(null);a.G(K(new L,function(a,b,c,e,f,q){return function(a){var c=b.j(a);if(q.p||+c>+e.p)f.p=a,e.p=c,q.p=!1}}(a,b,c,e,f,Ef(!0))));return f.p}function Kf(){}Kf.prototype=new w; Kf.prototype.constructor=Kf;function Lf(){}Lf.prototype=Kf.prototype;function Mf(){}Mf.prototype=new w;Mf.prototype.constructor=Mf;function Nf(){}Nf.prototype=Mf.prototype;Mf.prototype.Be=function(){return this.ga().Da()};function Of(a,b){a:for(;;){if(!b.h()){a.Vb(b.q());b=b.m();continue a}break}}function Pf(a,b){b&&b.b&&b.b.s.Ke?Of(a,b):b.G(K(new L,function(a){return function(b){return a.Vb(b)}}(a)));return a}function Qf(){}Qf.prototype=new w;Qf.prototype.constructor=Qf;function Rf(){} Rf.prototype=Qf.prototype;function de(){}de.prototype=new w;de.prototype.constructor=de;de.prototype.c=function(){return this};de.prototype.b=v({dm:0},!1,"scala.collection.immutable.Stream$$hash$colon$colon$",{dm:1,d:1});var ce=void 0;function Sf(){this.Ui=null}Sf.prototype=new w;Sf.prototype.constructor=Sf;function Tf(a,b){a.Ui=b;return a}function Uf(a,b){return Vf(new Wf,b,a.Ui)}Sf.prototype.b=v({em:0},!1,"scala.collection.immutable.Stream$ConsWrapper",{em:1,d:1}); function Xf(){this.Mg=this.Wi=null;this.Sa=!1;this.gc=null}Xf.prototype=new w;Xf.prototype.constructor=Xf;function Yf(a,b,c){a.Mg=c;if(null===b)throw Zf(Uc(),null);a.gc=b;return a}function $f(a){a.Sa||(a.Sa||(a.Wi=ag(a.Mg),a.Sa=!0),a.Mg=null);return a.Wi}Xf.prototype.b=v({im:0},!1,"scala.collection.immutable.StreamIterator$LazyCell",{im:1,d:1});function bg(){}bg.prototype=new w;bg.prototype.constructor=bg;bg.prototype.c=function(){return this}; function cg(a,b,c,e){a=0>c?0:c;return e<=a||a>=(b.length|0)?"":b.substring(a,e>(b.length|0)?b.length|0:e)}bg.prototype.b=v({jm:0},!1,"scala.collection.immutable.StringOps$",{jm:1,d:1});var dg=void 0;function eg(){dg||(dg=(new bg).c());return dg}function fg(){}fg.prototype=new w;fg.prototype.constructor=fg;fg.prototype.c=function(){return this};fg.prototype.ga=function(){var a=(new zf).c();return gg(new hg,a,K(new L,function(){return function(a){return(new ig).f(a)}}(this)))}; fg.prototype.b=v({rm:0},!1,"scala.collection.immutable.WrappedString$",{rm:1,d:1});var jg=void 0;function kg(){this.Zd=!1;this.Oh=this.mf=this.se=null;this.Sf=!1;this.ai=this.Qh=0}kg.prototype=new w;kg.prototype.constructor=kg; kg.prototype.c=function(){lg=this;this.se=(this.Zd=!!(k.ArrayBuffer&&k.Int32Array&&k.Float32Array&&k.Float64Array))?new k.ArrayBuffer(8):null;this.mf=this.Zd?new k.Int32Array(this.se,0,2):null;this.Zd&&new k.Float32Array(this.se,0,2);this.Oh=this.Zd?new k.Float64Array(this.se,0,1):null;if(this.Zd)this.mf[0]=16909060,a=1===((new k.Int8Array(this.se,0,8))[0]|0);else var a=!0;this.Qh=(this.Sf=a)?0:1;this.ai=this.Sf?1:0;return this}; function Fa(a,b){var c=b|0;if(c===b&&-Infinity!==1/b)return c;if(a.Zd)a.Oh[0]=b,a=(new I).t(a.mf[a.ai]|0,a.mf[a.Qh]|0);else{if(b!==b)a=!1,b=2047,c=+k.Math.pow(2,51);else if(Infinity===b||-Infinity===b)a=0>b,b=2047,c=0;else if(0===b)a=-Infinity===1/b,c=b=0;else{var e=(a=0>b)?-b:b;if(e>=+k.Math.pow(2,-1022)){b=+k.Math.pow(2,52);var c=+k.Math.log(e)/.6931471805599453,c=+k.Math.floor(c)|0,c=1023>c?c:1023,f=e/+k.Math.pow(2,c)*b,e=+k.Math.floor(f),f=f-e,e=.5>f?e:.5<f?1+e:0!==e%2?1+e:e;2<=e/b&&(c=1+c|0, e=1);1023<c?(c=2047,e=0):(c=1023+c|0,e-=b);b=c;c=e}else b=e/+k.Math.pow(2,-1074),c=+k.Math.floor(b),e=b-c,b=0,c=.5>e?c:.5<e?1+c:0!==c%2?1+c:c}c=+c;a=(new I).t(c|0,(a?-2147483648:0)|(b|0)<<20|c/4294967296|0)}return a.i^a.l}kg.prototype.b=v({Jm:0},!1,"scala.scalajs.runtime.Bits$",{Jm:1,d:1});var lg=void 0;function Ga(){lg||(lg=(new kg).c());return lg}function mg(){this.Sa=!1}mg.prototype=new w;mg.prototype.constructor=mg;mg.prototype.c=function(){return this}; function ng(a,b){return null===b?"null":la(b)}function og(){return k.String.fromCharCode(92)}function Da(a,b){a=0;for(var c=1,e=-1+(b.length|0)|0;0<=e;)a=a+p(65535&(b.charCodeAt(e)|0),c)|0,c=p(31,c),e=-1+e|0;return a}mg.prototype.b=v({Lm:0},!1,"scala.scalajs.runtime.RuntimeString$",{Lm:1,d:1});var Ng=void 0;function Ea(){Ng||(Ng=(new mg).c());return Ng}function Og(){}Og.prototype=new w;Og.prototype.constructor=Og;Og.prototype.c=function(){return this};function Zf(a,b){return Pg(b)?b.vd:b} function Qg(a,b){return b&&b.b&&b.b.s.tb?b:(new Rg).r(b)}Og.prototype.b=v({Mm:0},!1,"scala.scalajs.runtime.package$",{Mm:1,d:1});var Sg=void 0;function Uc(){Sg||(Sg=(new Og).c());return Sg}function Tg(){}Tg.prototype=new w;Tg.prototype.constructor=Tg;Tg.prototype.c=function(){return this}; function Ug(a,b){if(ob(b))return a.wb===b.wb;if(Vg(b)){if("number"===typeof b)return+b===a.wb;if(za(b)){b=Oa(b);var c=b.l;a=a.wb;return b.i===a&&c===a>>31}return null===b?null===a:Ba(b,a)}return null===a&&null===b}function R(a,b,c){if(b===c)c=!0;else if(Vg(b))a:if(Vg(c))c=Wg(b,c);else{if(ob(c)){if("number"===typeof b){c=+b===c.wb;break a}if(za(b)){a=Oa(b);b=a.l;c=c.wb;c=a.i===c&&b===c>>31;break a}}c=null===b?null===c:Ba(b,c)}else c=ob(b)?Ug(b,c):null===b?null===c:Ba(b,c);return c} function Wg(a,b){if("number"===typeof a){a=+a;if("number"===typeof b)return a===+b;if(za(b)){var c=Oa(b);b=c.i;c=c.l;return a===Xg(u(),b,c)}return nd(b)?b.F(a):!1}if(za(a)){c=Oa(a);a=c.i;c=c.l;if(za(b)){b=Oa(b);var e=b.l;return a===b.i&&c===e}return"number"===typeof b?(b=+b,Xg(u(),a,c)===b):nd(b)?b.F((new I).t(a,c)):!1}return null===a?null===b:Ba(a,b)}Tg.prototype.b=v({Om:0},!1,"scala.runtime.BoxesRunTime$",{Om:1,d:1});var Yg=void 0;function S(){Yg||(Yg=(new Tg).c());return Yg} var Zg=v({Rm:0},!1,"scala.runtime.Null$",{Rm:1,d:1});function $g(){}$g.prototype=new w;$g.prototype.constructor=$g;$g.prototype.c=function(){return this};function ah(a,b){if(mb(b,1)||fb(b,1)||ib(b,1)||gb(b,1)||hb(b,1)||cb(b,1)||db(b,1)||eb(b,1)||bb(b,1)||bh(b))return b.a.length;if(null===b)throw(new ch).c();throw(new C).r(b);} function dh(a,b,c,e){if(mb(b,1))b.a[c]=e;else if(fb(b,1))b.a[c]=e|0;else if(ib(b,1))b.a[c]=+e;else if(gb(b,1))b.a[c]=Oa(e);else if(hb(b,1))b.a[c]=+e;else if(cb(b,1))b.a[c]=null===e?0:e.wb;else if(db(b,1))b.a[c]=e|0;else if(eb(b,1))b.a[c]=e|0;else if(bb(b,1))b.a[c]=!!e;else if(bh(b))b.a[c]=void 0;else{if(null===b)throw(new ch).c();throw(new C).r(b);}}function eh(a,b){a=b.ub();return yf(a,b.ob()+"(",",",")")}$g.prototype.b=v({Tm:0},!1,"scala.runtime.ScalaRunTime$",{Tm:1,d:1});var fh=void 0; function U(){fh||(fh=(new $g).c());return fh}function gh(){}gh.prototype=new w;gh.prototype.constructor=gh;d=gh.prototype;d.c=function(){return this};d.uf=function(a,b){b=p(-862048943,b);b=p(461845907,b<<15|b>>>17|0);return a^b};function hh(a,b){a=Ia(b);if(a===b)return a;var c=u();a=ih(c,b);c=c.ja;return Xg(u(),a,c)===b?a^c:Fa(Ga(),b)}function rf(a,b){return null===b?0:"number"===typeof b?hh(0,+b):za(b)?(a=Oa(b),jh(0,(new I).t(a.i,a.l))):Ca(b)} d.cb=function(a,b){a=this.uf(a,b);return-430675100+p(5,a<<13|a>>>19|0)|0};function jh(a,b){a=b.i;b=b.l;return b===a>>31?a:a^b}d.jc=function(a,b){a^=b;a=p(-2048144789,a^(a>>>16|0));a=p(-1028477387,a^(a>>>13|0));return a^(a>>>16|0)};d.b=v({Vm:0},!1,"scala.runtime.Statics$",{Vm:1,d:1});var kh=void 0;function Q(){kh||(kh=(new gh).c());return kh}function tc(){this.ji=this.Xf=null}tc.prototype=new w;tc.prototype.constructor=tc; tc.prototype.c=function(){Ee();var a=[M().Og,M().Ff,M().Gf,M().Ef,M().Ub,M().Df,M().Bf,M().Cf,M().Ng];if(0===(a.length|0))lh(),ee(),a=mh((new nh).c());else{lh();ee();for(var b=(new nh).c(),c=0,e=a.length|0;c<e;)oh(b,a[c]),c=1+c|0;a=mh(b)}a=this.Xf=a;b=Vd();this.ji=a.Hd(b.Ze).Qe(ph().Mi);return this}; function qh(a,b){return b.Wc.vc(rh(b),sh(function(a){return function(b,f){var g=qb(),g=pb(g,10);b=th(new uh,kc(b.ua,g.ua));g=qb();f=a.ji.j(f)|0;f=pb(g,f);b=b.ua;f=f.ua;return th(new uh,Vb(ec(),b,f))}}(a)))} function rh(a){var b=a.Fb;a=u();b=+k.Math.round(b);b=ih(a,b);a=a.ja;if(!((0===a?-2147482649>=(-2147483648^b):0>a)&&(0===a?0!==b:0<a)))throw(new vh).r("assertion failed: "+wh(xh((new F).T(["Root size must be in (0, 999]"])),P()));var c=qb(),b=1E3+b|0;return yh(c,(new I).t(b,-2147482648>(-2147483648^b)?1+a|0:a))}tc.prototype.Jh=function(a){return qh(this,a)}; tc.prototype.Vf=function(a){a=a.ua;a=rb(sb(),a);a=(new ld).f(a);a=(new J).u(a.Fd(0,4),a.Fd(4,a.H()));if(null===a)throw(new C).r(a);var b=a.Fa();a=(new ld).f(a.Ra());ph();for(var c=zh(a,new Ah),e=0,f=a.Ha.length|0;e<f;){var g=a.La(e),g=null===g?0:g.wb;c.Va(this.Xf.La(Bh(Ch(),g,36)));e=1+e|0}a=c.Da();c=(new ld).f(b);Dh();b=new Eh;c=-1E3+Fh(0,c.Ha,10)|0;f=kd();e=P();e.h()?e=f.Be():(f=f.ga(),f.yb(e),e=f.Da());b=Gh(b,c,e).Fb;return Gh(new Eh,b,a)}; tc.prototype.b=v({gj:0},!1,"net.teralytics.terahex.Encoding$$anon$1",{gj:1,d:1,ej:1});function Hh(){}Hh.prototype=new w;Hh.prototype.constructor=Hh;Hh.prototype.c=function(){return this};Hh.prototype.Jh=function(a){return Xc(0,a)};function Xc(a,b){a=rc().Jh(b).ua;return rb(sb(),a)}Hh.prototype.Vf=function(a){return rc().Vf(Ih(De(),a))};Hh.prototype.b=v({lj:0},!1,"net.teralytics.terahex.StringEncoding$",{lj:1,d:1,ej:1});var Jh=void 0;function xc(){Jh||(Jh=(new Hh).c());return Jh} function Kh(){uc.call(this)}Kh.prototype=new vc;Kh.prototype.constructor=Kh;Kh.prototype.c=function(){uc.prototype.$a.call(this,300);return this};Kh.prototype.b=v({mj:0},!1,"net.teralytics.terahex.TeraHex$",{mj:1,hh:1,d:1});var Lh=void 0;ba.terahex=function(){Lh||(Lh=(new Kh).c());return Lh};function Mh(){}Mh.prototype=new w;Mh.prototype.constructor=Mh;function Nh(){}Nh.prototype=Mh.prototype;function Vg(a){return!!(a&&a.b&&a.b.s.fd||"number"===typeof a)}function W(){this.Pa=null}W.prototype=new w; W.prototype.constructor=W;function Oh(){}Oh.prototype=W.prototype;W.prototype.hf=function(){if(void 0===k.Error.captureStackTrace){try{var a={}.undef()}catch(b){if(a=Qg(Uc(),b),null!==a)if(Pg(a))a=a.vd;else throw Zf(Uc(),a);else throw b;}this.stackdata=a}else k.Error.captureStackTrace(this),this.stackdata=this;return this};W.prototype.Qd=function(){return this.Pa};W.prototype.v=function(){var a=lb(ma(this)),b=this.Qd();return null===b?a:a+": "+b};W.prototype.kb=function(a){this.Pa=a;this.hf();return this}; function Ah(){}Ah.prototype=new w;Ah.prototype.constructor=Ah;Ah.prototype.ee=function(){lh();ee();return(new nh).c()};Ah.prototype.Kb=function(){lh();ee();return(new nh).c()};Ah.prototype.b=v({Yj:0},!1,"scala.LowPriorityImplicits$$anon$4",{Yj:1,d:1,Le:1});function Ph(){}Ph.prototype=new w;Ph.prototype.constructor=Ph;Ph.prototype.c=function(){return this};Ph.prototype.ee=function(){return(new zf).c()};Ph.prototype.Kb=function(){return(new zf).c()}; Ph.prototype.b=v({fk:0},!1,"scala.Predef$$anon$3",{fk:1,d:1,Le:1});function Qd(){}Qd.prototype=new w;Qd.prototype.constructor=Qd;Qd.prototype.c=function(){return this};Qd.prototype.v=function(){return"object AnyRef"};Qd.prototype.b=v({vk:0},!1,"scala.package$$anon$1",{vk:1,d:1,nn:1});function Qh(){this.Ki=this.bi=this.Kg=0}Qh.prototype=new of;Qh.prototype.constructor=Qh;Qh.prototype.c=function(){Rh=this;this.Kg=Da(Ea(),"Seq");this.bi=Da(Ea(),"Map");this.Ki=Da(Ea(),"Set");return this}; function Sh(a,b){if(b&&b.b&&b.b.s.yi){for(var c=0,e=a.Kg,f=b;!f.h();)b=f.q(),f=f.m(),e=a.cb(e,rf(Q(),b)),c=1+c|0;a=a.jc(e,c)}else a=uf(a,b,a.Kg);return a}Qh.prototype.b=v({Uk:0},!1,"scala.util.hashing.MurmurHash3$",{Uk:1,zn:1,d:1});var Rh=void 0;function tf(){Rh||(Rh=(new Qh).c());return Rh}function Th(a,b){for(var c=!0;c&&a.I();)c=!!b.j(a.E());return c}function Uh(a,b){for(;a.I();)b.j(a.E())} function Vh(a){if(a.I()){var b=a.E();return Vf(new Wf,b,Wh(function(a){return function(){return a.Jb()}}(a)))}Sc();return Xh()}function Yh(){this.gc=null}Yh.prototype=new w;Yh.prototype.constructor=Yh;Yh.prototype.ee=function(){return Zh(new $h,this.gc.ff())};Yh.prototype.Kb=function(){return Zh(new $h,this.gc.ff())};Yh.prototype.b=v({kl:0},!1,"scala.collection.generic.GenMapFactory$MapCanBuildFrom",{kl:1,d:1,Le:1});function ai(){}ai.prototype=new Nf;ai.prototype.constructor=ai;function bi(){} bi.prototype=ai.prototype;function X(){this.ka=null}X.prototype=new Nf;X.prototype.constructor=X;function ci(){}ci.prototype=X.prototype;X.prototype.c=function(){this.ka=(new di).Ee(this);return this};function ei(){this.gc=null}ei.prototype=new w;ei.prototype.constructor=ei;function fi(){}fi.prototype=ei.prototype;ei.prototype.ee=function(){return this.gc.ga()};ei.prototype.Kb=function(a){return a.rb().ga()};ei.prototype.Ee=function(a){if(null===a)throw Zf(Uc(),null);this.gc=a;return this}; function gi(){}gi.prototype=new Lf;gi.prototype.constructor=gi;function hi(){}hi.prototype=gi.prototype;function ii(){this.pg=null}ii.prototype=new Rf;ii.prototype.constructor=ii;function ji(a,b){a.pg=b;b=new Xi;if(null===a)throw Zf(Uc(),null);b.hc=a}ii.prototype.Rf=function(a,b){return Cf(this.pg,a,b)};ii.prototype.b=v({ql:0},!1,"scala.collection.immutable.HashMap$$anon$2",{ql:1,vl:1,d:1});function Xi(){this.hc=null}Xi.prototype=new Rf;Xi.prototype.constructor=Xi; Xi.prototype.Rf=function(a,b){return Cf(this.hc.pg,b,a)};Xi.prototype.b=v({rl:0},!1,"scala.collection.immutable.HashMap$$anon$2$$anon$3",{rl:1,vl:1,d:1});function aj(){}aj.prototype=new w;aj.prototype.constructor=aj;aj.prototype.c=function(){return this};aj.prototype.j=function(){return this};aj.prototype.v=function(){return"\x3cfunction1\x3e"};aj.prototype.b=v({El:0},!1,"scala.collection.immutable.List$$anon$1",{El:1,d:1,J:1});function bj(a,b){b=b.bd();switch(b){case -1:break;default:a.Ib(b)}} function cj(a,b,c){b=b.bd();switch(b){case -1:break;default:a.Ib(b+c|0)}}function dj(a,b,c){c=c.bd();switch(c){case -1:break;default:a.Ib(b<c?b:c)}}function ej(){}ej.prototype=new w;ej.prototype.constructor=ej;function fj(){}fj.prototype=ej.prototype;ej.prototype.v=function(){return"\x3cfunction0\x3e"};function gj(){}gj.prototype=new w;gj.prototype.constructor=gj;function hj(){}hj.prototype=gj.prototype;gj.prototype.v=function(){return"\x3cfunction1\x3e"};function ij(){}ij.prototype=new w; ij.prototype.constructor=ij;function jj(){}jj.prototype=ij.prototype;ij.prototype.v=function(){return"\x3cfunction2\x3e"};function kj(){this.p=!1}kj.prototype=new w;kj.prototype.constructor=kj;kj.prototype.v=function(){return""+this.p};function Ef(a){var b=new kj;b.p=a;return b}kj.prototype.b=v({Nm:0},!1,"scala.runtime.BooleanRef",{Nm:1,d:1,e:1});function bh(a){return!!(a&&a.b&&1===a.b.ge&&a.b.fe.s.Ri)} var ya=v({Ri:0},!1,"scala.runtime.BoxedUnit",{Ri:1,d:1,e:1},void 0,void 0,function(a){return void 0===a});function qf(){this.p=0}qf.prototype=new w;qf.prototype.constructor=qf;qf.prototype.v=function(){return""+this.p};qf.prototype.kc=function(a){this.p=a;return this};qf.prototype.b=v({Pm:0},!1,"scala.runtime.IntRef",{Pm:1,d:1,e:1});function Bf(){this.p=null}Bf.prototype=new w;Bf.prototype.constructor=Bf;Bf.prototype.v=function(){return ng(Ea(),this.p)};Bf.prototype.r=function(a){this.p=a;return this}; Bf.prototype.b=v({Sm:0},!1,"scala.runtime.ObjectRef",{Sm:1,d:1,e:1});function lj(){this.rh=this.Nf=this.ce=this.Qf=this.qh=null}lj.prototype=new w;lj.prototype.constructor=lj; lj.prototype.c=function(){mj=this;this.qh=(new E).t(1,1);this.Qf=(new E).t(1,10);this.ce=(new E).t(0,0);this.Nf=(new E).t(-1,1);var a=(new F).T([this.ce,this.qh,(new E).t(1,2),(new E).t(1,3),(new E).t(1,4),(new E).t(1,5),(new E).t(1,6),(new E).t(1,7),(new E).t(1,8),(new E).t(1,9),this.Qf]),b=a.L.length|0,b=r(y(jc),[b]),c;c=0;for(a=G(new H,a,a.L.length|0);a.I();){var e=a.E();b.a[c]=e;c=1+c|0}this.rh=b;b=[];for(c=0;32>c;)a=c,a=cc(Ib(),(new I).t(0===(32&a)?1<<a:0,0===(32&a)?0:1<<a)),b.push(null===a? null:a),c=1+c|0;new (y(jc).df)(b);return this};function cc(a,b){if(0>b.l)return-1!==b.i||-1!==b.l?(a=b.i,b=b.l,nj(new E,-1,(new I).t(-a|0,0!==a?~b:-b|0))):a.Nf;var c=b.l;return(0===c?-2147483638>=(-2147483648^b.i):0>c)?a.rh.a[b.i]:nj(new E,1,b)}lj.prototype.b=v({Zi:0},!1,"java.math.BigInteger$",{Zi:1,d:1,g:1,e:1});var mj=void 0;function Ib(){mj||(mj=(new lj).c());return mj}function oj(){this.hi=this.gi=this.fi=this.ei=this.Ff=this.Ef=this.Df=this.Cf=this.Gf=this.Bf=this.Og=this.Ng=this.Ub=null} oj.prototype=new w;oj.prototype.constructor=oj;oj.prototype.c=function(){pj=this;this.Ub=qj(new rj,(M(),u().Vc),(M(),u().Vc));this.Ng=dd(this.Ub);this.Og=ed(this.Ub);this.Bf=ad($c(this.Ub));this.Gf=cd(bd(this.Ub));this.Cf=$c(this.Ub);this.Df=bd(this.Ub);this.Ef=ad(this.Ub);this.Ff=cd(this.Ub);this.ei=$c(dd(this.Ub));this.fi=bd(dd(this.Ub));this.gi=ad(ed(this.Ub));this.hi=cd(ed(this.Ub));return this};oj.prototype.b=v({dj:0},!1,"net.teralytics.terahex.Cell$",{dj:1,d:1,g:1,e:1});var pj=void 0; function M(){pj||(pj=(new oj).c());return pj}function sj(){this.ng=this.tf=this.sf=0;this.og=this.Zh=this.qf=null}sj.prototype=new w;sj.prototype.constructor=sj;sj.prototype.c=function(){tj=this;this.sf=180;this.tf=85;this.ng=90;this.qf=(new uj).pa(-this.sf,this.sf);this.Zh=(new uj).pa(-this.ng,this.ng);this.og=(new uj).pa(-this.tf,this.tf);return this};function vj(a,b){a=(new Bc).pa(b.Za,wj(-b.fb));return(new Bc).pa(xj(yj(),a.ma),zj(yj(),a.fa,yj().Zh))} function wj(a){a=a/180*3.141592653589793;vd||(vd=(new ud).c());a=a!==a||0===a||Infinity===+k.Math.abs(a)?a:(+k.Math.exp(a)-+k.Math.exp(-a))/2;return 180*+k.Math.atan(a)/3.141592653589793}function zj(a,b,c){if(null!==c)return a=c.Kf(),c=c.Mf(),b>c?c:b<a?a:b;throw(new C).r(c);} function xj(a,b){var c=yj().qf;if(null===c)throw(new C).r(c);a=c.Kf();var c=c.Mf(),e=c-a;b=b<a?c-(a-b)%e:(b-a)%e+a;b=b===a?c:b;if(!(b>a))throw(new vh).r("assertion failed: "+wh(xh((new F).T([""," should be \x3e ",""])),(new F).T([b,a])));if(!(b<=c))throw(new vh).r("assertion failed: "+wh(xh((new F).T([""," should be \x3c\x3d ",""])),(new F).T([b,c])));return b} function Aj(a,b){if(null!==b){var c=b.Fa(),e=b.Ra();if(null!==c){var f=c.ma,c=c.fa;if((new Bj).$a(f),(new Cj).$a(c),null!==e)return b=e.ma,e=e.fa,(new Bj).$a(b),(new Cj).$a(e),(new J).u((new Bc).pa(zj(0,+k.Math.min(f,b),a.qf),zj(0,+k.Math.min(c,e),a.og)),(new Bc).pa(zj(0,+k.Math.max(f,b),a.qf),zj(0,+k.Math.max(c,e),a.og)))}}throw(new C).r(b);}sj.prototype.b=v({ij:0},!1,"net.teralytics.terahex.LatLon$",{ij:1,d:1,g:1,e:1});var tj=void 0;function yj(){tj||(tj=(new sj).c());return tj}function Dj(){} Dj.prototype=new w;Dj.prototype.constructor=Dj;Dj.prototype.c=function(){return this};function Ej(a,b,c){Sc();return Uf(Tf(new Sf,Wh(function(a,b,c){return function(){return Fj(Gj(Ee().Of,c,K(new L,function(){return function(a){if(!a.Wc.h()){var b=a.Wc.yd(),c=dd(a.Wc.id()),e=kd(),b=b.Ue(c,e.ka),b=Hj(Gh(new Eh,a.Fb,b));a=Wc(Ac(),b,a.zd,a.Yc)}return a}}(a))).m(),K(new L,function(a,b){return function(a){return Ij(a)<b.fa&&Jj(a)<yj().tf}}(a,b)))}}(a,c,b))),b)} function Wc(a,b,c,e){var f=b.If(),g,h=(new Kj).pa(2*f.Za/3,(-f.Za+ +k.Math.sqrt(3)*f.fb)/3);a:{var l=(new Kj).pa(0,0),n=P(),m=1;for(;;){if(m>c){fd||(fd=(new Yc).c());c:{var q=n,A=P();d:for(;;){var N=!1,V=null,ia=q;if(P().F(ia)){g=A;break c}if(ia&&ia.b&&ia.b.s.Ag){var N=!0,V=ia,ki=V.Rd,li=V.qd;if(P().F(li)){g=Lj(new Mj,ki,A);break c}}if(N){var mi=V.Rd,Dc=V.qd;if(Dc&&Dc.b&&Dc.b.s.Ag){var pg=Dc,ni=pg.qd,Ec=Zc(mi,pg.Rd);if(null===Ec)throw(new C).r(Ec);var oi=Lj(new Mj,Ec.Fa(),A),q=Lj(new Mj,Ec.Ra(),ni), A=oi;continue d}}throw(new C).r(ia);}}break a}var je,jb=(new Kj).pa(h.M-l.M,h.P-l.P),ke=e.Ed(m),T=Nj(jb,1/ke),$a=void 0,Bb,Cb=new Oj,Fc=-T.M-T.P,pi=T.P;Cb.Za=T.M;Cb.fb=Fc;Cb.ab=pi;Bb=Cb;var Yk=Bb.Za,Gc=u(),qg=+k.Math.round(Yk),qi=ih(Gc,qg),ri=Gc.ja,Zk=Bb.fb,si=u(),ti=+k.Math.round(Zk),ui=ih(si,ti),vi=si.ja,wi=Bb.ab,rg=u(),xi=+k.Math.round(wi),yi=ih(rg,xi),zi=rg.ja,sg=Oa((new I).t(qi,ri)),Ai=sg.i,tg=sg.l,ug=Oa((new I).t(ui,vi)),Bi=ug.i,$k=ug.l,le=Oa((new I).t(yi,zi)),Hc=le.i,al=le.l,Ic=Oa((new I).t(Ai, tg)),Yb=Ic.i,Zb=Ic.l,$b=Oa((new I).t(Bi,$k)),wa=$b.i,ac=$b.l,vg=Oa((new I).t(Hc,al)),Jc=vg.i,Kc=vg.l,Ci=Yb,Di=Zb,Ei=Xg(u(),Ci,Di)-Bb.Za,wg=+k.Math.abs(Ei),Fi=wa,Gi=ac,Hi=Xg(u(),Fi,Gi)-Bb.fb,xg=+k.Math.abs(Hi),Ii=Jc,Ji=Kc,yg=Xg(u(),Ii,Ji)-Bb.ab,zg=+k.Math.abs(yg);if(wg>xg&&wg>zg)var Ag=wa,Bg=ac,Cg=-Ag|0,Ki=0!==Ag?~Bg:-Bg|0,Li=Kc,Lc=Cg-Jc|0,Yb=Lc,Zb=(-2147483648^Lc)>(-2147483648^Cg)?-1+(Ki-Li|0)|0:Ki-Li|0;else if(xg>zg)var Mc=Yb,Nc=Zb,Dg=-Mc|0,Mi=0!==Mc?~Nc:-Nc|0,Oc=Kc,me=Dg-Jc|0,wa=me,ac=(-2147483648^ me)>(-2147483648^Dg)?-1+(Mi-Oc|0)|0:Mi-Oc|0;else var Eg=Yb,Ni=Zb,Oi=-Eg|0,Fg=0!==Eg?~Ni:-Ni|0,Gg=ac,Hg=Oi-wa|0,Jc=Hg,Kc=(-2147483648^Hg)>(-2147483648^Oi)?-1+(Fg-Gg|0)|0:Fg-Gg|0;var Pi=Yb,Qi=Zb,Ri=Xg(u(),Pi,Qi),Si=wa,Ti=ac,Ui=Xg(u(),Si,Ti),Vi=Jc,Ig=Kc,Pc=new Oj,Wi=Ui,bl=Xg(u(),Vi,Ig);Pc.Za=Ri;Pc.fb=Wi;Pc.ab=bl;var $a=Pc,Jg=(new Kj).pa($a.Za,$a.ab),bc=Jg.M,Kg=Jg.P,ne=u(),dl=ih(ne,bc),Yi=(new I).t(dl,ne.ja),Zi=u(),$i=ih(Zi,Kg),Lg=Zi.ja;je=qj(new rj,Yi,(new I).t($i,Lg));var Mg=Pj(je,e.Ed(m)),Qc=1+m|0, el=(new Kj).pa(l.M+Mg.M,l.P+Mg.P),fl=Lj(new Mj,je,n),m=Qc,l=el,n=fl}}return Gh(new Eh,e.Fb,g)} function zc(a,b,c,e){var f=Aj(yj(),b);if(null===f)throw(new C).r(f);b=f.Fa();var f=f.Ra(),g=Wc(Ac(),b,c,e),g=Qj(g)>b.ma?Wc(Ac(),(new Bc).pa(b.ma-g.tc,b.fa),c,e):g;Sc();return Rj(Uf(Tf(new Sf,Wh(function(a,b,c,e,f,g){return function(){return Fj(Gj(Ee().Of,g,K(new L,function(a,b,c,e){return function(a){return Wc(Ac(),(new Bc).pa(Hj(a).ma+1.5*a.tc,e.fa),b,c)}}(a,b,c,e))).m(),K(new L,function(a,b){return function(a){var c;if(c=Hj(a).ma-a.tc<b.ma)c=Hj(a).ma+a.tc+a.tc<yj().sf;return c}}(a,f)))}}(a,c,e, b,