Error.stackTraceLimit=1/0;var$global,$module,$NaN=NaN;if("undefined"!=typeofwindow?$global=window:"undefined"!=typeofself?$global=self:"undefined"!=typeofglobal?($global=global).require=require:$global=this,void0===$global||void0===$global.Array)thrownewError("no global object found");if("undefined"!=typeofmodule&&($module=module),!$global.fs&&$global.require)try{varfs=$global.require("fs");"object"==typeoffs&&null!==fs&&0!==Object.keys(fs).length&&($global.fs=fs)}catch(e){}if(!$global.fs){varoutputBuf="",decoder=newTextDecoder("utf-8");$global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync:function(e,n){varr=(outputBuf+=decoder.decode(n)).lastIndexOf("\n");return-1!=r&&(console.log(outputBuf.substr(0,r)),outputBuf=outputBuf.substr(r+1)),n.length},write:function(e,n,r,t,i,a){0===r&&t===n.length&&null===i?a(null,this.writeSync(e,n)):a(enosys())}}}var$throwRuntimeError,$linknames={},$packages={},$idCounter=0,$keys=function(e){returne?Object.keys(e):[]},$flushConsole=function(){},$throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference")},$call=function(e,n,r){returne.apply(n,r)},$makeFunc=function(e){returnfunction(){return$externalize(e(this,new($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments,[]))),$emptyInterface)}},$unused=function(e){},$print=console.log;if(void0!==$global.process&&$global.require)try{varutil=$global.require("util");$print=function(){$global.process.stderr.write(util.format.apply(this,arguments))}}catch(e){}var$println=console.log,$initAllLinknames=function(){for(vare=$keys($packages),n=0;n<e.length;n++){varr=$packages[e[n]].$initLinknames;"function"==typeofr&&r()}},$mapArray=function(e,n){for(varr=newe.constructor(e.length),t=0;t<e.length;t++)r[t]=n(e[t]);returnr},$methodVal=function(e,n){varr=e.$methodVals||{};e.$methodVals=r;vart=r[n];returnvoid0!==t?t:(t=e[n].bind(e),r[n]=t,t)},$methodExpr=function(e,n){varr=e.prototype[n];returnvoid0===r.$expr&&(r.$expr=function(){$stackDepthOffset--;try{returne.wrapped&&(arguments[0]=newe(arguments[0])),Function.call.apply(r,arguments)}finally{$stackDepthOffset++}}),r.$expr},$ifaceMethodExprs={},$ifaceMethodExpr=function(e){varn=$ifaceMethodExprs["$"+e];returnvoid0===n&&(n=$ifaceMethodExprs["$"+e]=function(){$stackDepthOffset--;try{returnFunction.call.apply(arguments[0][e],arguments)}finally{$stackDepthOffset++}}),n},$subslice=function(e,n,r,t){if(void0===r&&(r=e.$length),void0===t&&(t=e.$capacity),(n<0||r<n||t<r||r>e.$capacity||t>e.$capacity)&&$throwRuntimeError("slice bounds out of range"),e===e.constructor.nil)returne;vari=newe.constructor(e.$array);returni.$offset=e.$offset+n,i.$length=r-n,i.$capacity=t-n,i},$substring=function(e,n,r){return(n<0||r<n||r>e.length)&&$throwRuntimeError("slice bounds out of range"),e.substring(n,r)},$sliceToNativeArray=function(e){returne.$array.constructor!==Array?e.$array.subarray(e.$offset,e.$offset+e.$length):e.$array.slice(e.$offset,e.$offset+e.$length)},$sliceToGoArray=function(e,n){varr=n.elem;returnvoid0!==r&&e.$length<r.len&&$throwRuntimeError("cannot convert slice with length "+e.$length+" to pointer to array with length "+r.len),e==e.constructor.nil?n.nil:e.$array.constructor!==Array?e.$array.subarray(e.$offset,e.$offset+r.len):0==e.$offset&&e.$length==e.$capacity&&e.$length==r.len?e.$array:0==r.len?newr([]):void$throwRuntimeError("gopherjs: non-numeric slice to underlying array conversion is not supported for subslices")},$convertSliceType=function(e,n){returne==e.constructor.nil?n.nil:$subslice(newn(e.$array),e.$offset,e.$offset+e.$length)},$decodeRune=function(e,n){varr=e.charCodeAt(n);if(r<128)return[r,1];if(r!=r||r<192)return[65533,1];vart=e.charCodeAt(n+1);if(t!=t||t<128||192<=t)return[65533,1];if(r<224)return(a=(31&r)<<6|63&t)<=127?[65533,1]:[a,2];vari=e.charCodeAt(n+2);if(i!=i||i<128||192<=i)return[65533,1];if(r<240)return(a=(15&r)<<12|(63&t)<<6|63&i)<=2047?[65533,1]:55296<=a&&a<=57343?[65533,1]:[a,3];vara,o=e.charCodeAt(n+3);returno!=o||o
$packages["runtime"]=(function(){var$pkg={},$init,A,C,D,AT,AZ,BD,AM,E,AU;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg._type=$newType(0,$kindStruct,"runtime._type",true,"runtime",false,function(str_){this.$val=this;if(arguments.length===0){this.str="";return;}this.str=str_;});D=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError",true,"runtime",true,function(_interface_,concrete_,asserted_,missingMethod_){this.$val=this;if(arguments.length===0){this._interface=AZ.nil;this.concrete=AZ.nil;this.asserted=AZ.nil;this.missingMethod="";return;}this._interface=_interface_;this.concrete=concrete_;this.asserted=asserted_;this.missingMethod=missingMethod_;});AT=$pkg.errorString=$newType(8,$kindString,"runtime.errorString",true,"runtime",false,null);AZ=$ptrType(C);BD=$ptrType(D);C.ptr.prototype.string=function(){vara;a=this;returna.str;};C.prototype.string=function(){returnthis.$val.string();};C.ptr.prototype.pkgpath=function(){vara;a=this;return"";};C.prototype.pkgpath=function(){returnthis.$val.pkgpath();};D.ptr.prototype.RuntimeError=function(){};D.prototype.RuntimeError=function(){returnthis.$val.RuntimeError();};D.ptr.prototype.Error=function(){vara,b,c,d,e;a=this;b="interface";if(!(a._interface===AZ.nil)){b=a._interface.string();}c=a.asserted.string();if(a.concrete===AZ.nil){return"interface conversion: "+b+" is nil, not "+c;}d=a.concrete.string();if(a.missingMethod===""){e="interface conversion: "+b+" is "+d+", not "+c;if(d===c){if(!(a.concrete.pkgpath()===a.asserted.pkgpath())){e=e+(" (types from different packages)");}else{e=e+(" (types from different scopes)");}}returne;}return"interface conversion: "+d+" is not "+c+": missing method "+a.missingMethod;};D.prototype.Error=function(){returnthis.$val.Error();};E=function(){vara,b;a=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$jsObjectPtr=a.Object.ptr;$jsErrorPtr=a.Error.ptr;$throwRuntimeError=AU;AM=$internalize($goVersion,$String);b=$ifaceNil;b=newD.ptr(AZ.nil,AZ.nil,AZ.nil,"");$unused(b);};AT.prototype.RuntimeError=function(){vara;a=this.$val;};$ptrType(AT).prototype.RuntimeError=function(){returnnewAT(this.$get()).RuntimeError();};AT.prototype.Error=function(){vara;a=this.$val;return"runtime error: "+(a);};$ptrType(AT).prototype.Error=function(){returnnewAT(this.$get()).Error();};AU=function(a){vara;$panic(newAT((a)));};AZ.methods=[{prop:"string",name:"string",pkg:"runtime",typ:$funcType([],[$String],false)},{prop:"pkgpath",name:"pkgpath",pkg:"runtime",typ:$funcType([],[$String],false)}];BD.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AT.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init("runtime",[{prop:"str",name:"str",embedded:false,exported:false,typ:$String,tag:""}]);D.init("runtime",[{prop:"_interface",name:"_interface",embedded:false,exported:false,typ:AZ,tag:""},{prop:"concrete",name:"concrete",embedded:false,exported:false,typ:AZ,tag:""},{prop:"asserted",name:"asserted",embedded:false,exported:false,typ:AZ,tag:""},{prop:"missingMethod",name:"missingMethod",embedded:false,exported:false,typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var$f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case0:$r=A.$init();$s=1;case1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){breaks;}AM="";E();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return$f;};$pkg.$init=$init;return$pkg;})();
$packages["resolv"]=(function(){var$pkg={},$init,A,B,C,N,P,Q,S,U,X,Z,AA,AE,AG,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,K,O,R,T,V,W,Y,AB,AC,AD,AF,AH;A=$packages["math"];B=$pkg.Vector=$newType(12,$kindSlice,"resolv.Vector",true,"resolv",true,null);C=$pkg.Axis=$newType(4,$kindInt,"resolv.Axis",true,"resolv",true,null);N=$pkg.Space=$newType(0,$kindStruct,"resolv.Space",true,"resolv",true,function(Cells_,CellWidth_,CellHeight_){this.$val=this;if(arguments.length===0){this.Cells=AL.nil;this.CellWidth=0;this.CellHeight=0;return;}this.Cells=Cells_;this.CellWidth=CellWidth_;this.CellHeight=CellHeight_;});P=$pkg.Shape=$newType(8,$kindInterface,"resolv.Shape",true,"resolv",true,null);Q=$pkg.Line=$newType(0,$kindStruct,"resolv.Line",true,"resolv",true,function(Start_,End_){this.$val=this;if(arguments.length===0){this.Start=B.nil;this.End=B.nil;return;}this.Start=Start_;this.End=End_;});S=$pkg.ConvexPolygon=$newType(0,$kindStruct,"resolv.ConvexPolygon",true,"resolv",true,function(Points_,X_,Y_,Closed_){this.$val=this;if(arguments.length===0){this.Points=AP.nil;this.X=0;this.Y=0;this.Closed=false;return;}this.Points=Points_;this.X=X_;this.Y=Y_;this.Closed=Closed_;});U=$pkg.ContactSet=$newType(0,$kindStruct,"resolv.ContactSet",true,"resolv",true,function(Points_,MTV_,Center_){this.$val=this;if(arguments.length===0){this.Points=AP.nil;this.MTV=B.nil;this.Center=B.nil;return;}this.Points=Points_;this.MTV=MTV_;this.Center=Center_;});X=$pkg.Circle=$newType(0,$kindStruct,"resolv.Circle",true,"resolv",true,function(X_,Y_,Radius_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Radius=0;return;}this.X=X_;this.Y=Y_;this.Radius=Radius_;});Z=$pkg.Projection=$newType(0,$kindStruct,"resolv.Projection",true,"resolv",true,function(Min_,Max_){this.$val=this;if(arguments.length===0){this.Min=0;this.Max=0;return;}this.Min=Min_;this.Max=Max_;});AA=$pkg.Object=$newType(0,$kindStruct,"resolv.Object",true,"resolv",true,function(Shape_,Space_,X_,Y_,W_,H_,TouchingCells_,Data_,ignoreList_,tags_){this.$val=this;if(arguments.length===0){this.Shape=$ifaceNil;this.Space=AM.nil;this.X=0;this.Y=0;this.W=0;this.H=0;this.TouchingCells=AK.nil;this.Data=$ifaceNil;this.ignoreList=false;this.tags=AV.nil;return;}this.Shape=Shape_;this.Space=Space_;this.X=X_;this.Y=Y_;this.W=W_;this.H=H_;this.TouchingCells=TouchingCells_;this.Data=Data_;this.ignoreList=ignoreList_;this.tags=tags_;});AE=$pkg.Collision=$newType(0,$kindStruct,"resolv.Collision",true,"resolv",true,function(checkingObject_,dx_,dy_,Objects_,Cells_){this.$val=this;if(arguments.length===0){this.checkingObject=AN.nil;this.dx=0;this.dy=0;this.Objects=AO.nil;this.Cells=AK.nil;return;}this.checkingObject=checkingObject_;this.dx=dx_;this.dy=dy_;this.Objects=Objects_;this.Cells=Cells_;});AG=$pkg.Cell=$newType(0,$kindStruct,"resolv.Cell",true,"resolv",true,function(X_,Y_,Objects_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Objects=AO.nil;return;}this.X=X_;this.Y=Y_;this.Objects=Objects_;});AI=$sliceType($Float64);AJ=$ptrType(AG);AK=$sliceType(AJ);AL=$sliceType(AK);AM=$ptrType(N);AN=$ptrType(AA);AO=$sliceType(AN);AP=$sliceType(B);AQ=$ptrType(Q);AR=$sliceType(AQ);AS=$ptrType(X);AT=$ptrType(S);AU=$ptrType(U);AV=$sliceType($String);AW=$ptrType(AE);AX=$sliceType(C);AY=$mapType(AN,$Bool);B.prototype.Clone=function(){vara,b;a=this;b=$makeSlice(B,a.$length);$copySlice(b,a);returnb;};$ptrType(B).prototype.Clone=function(){returnthis.$get().Clone();};B.prototype.Add=function(a){vara,b,c,d,e,f;b=this;c=b.$length;d=a;e=0;while(true){if(!(e<d.$length)){break;}f=e;if(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]).$length>c){AC($convertSliceType(b,AI),1,$convertSliceType(b,AI),$convertSliceType($subslice(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),0,c),AI));}else{AC($convertSliceType(b,AI),1,$convertSliceType(b,AI),$convertSliceType(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),AI));}e++;}returnb;};$ptrType(B).prototype.Add=function(