mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-27 20:28:54 +01:00
58 lines
805 KiB
JavaScript
58 lines
805 KiB
JavaScript
|
"use strict";
|
||
|
(function() {
|
||
|
|
||
|
Error.stackTraceLimit=Infinity;var $global,$module;if(typeof window!=="undefined"){$global=window;}else if(typeof self!=="undefined"){$global=self;}else if(typeof global!=="undefined"){$global=global;$global.require=require;}else{console.log("warning: no global object found");}if(typeof module!=="undefined"){$module=module;}var $packages={},$reflect,$idCounter=0;var $keys=function(m){return m?Object.keys(m):[];};var $min=Math.min;var $mod=function(x,y){return x%y;};var $parseInt=parseInt;var $parseFloat=function(f){if(f!==undefined&&f!==null&&f.constructor===Number){return f;}return parseFloat(f);};var $flushConsole=function(){};var $mapArray=function(array,f){var newArray=new array.constructor(array.length),i;for(i=0;i<array.length;i++){newArray[i]=f(array[i]);}return newArray;};var $methodVal=function(recv,name){var vals=recv.$methodVals||{};recv.$methodVals=vals;var f=vals[name];if(f!==undefined){return f;}var method=recv[name];f=function(){$stackDepthOffset--;try{return method.apply(recv,arguments);}finally{$stackDepthOffset++;}};vals[name]=f;return f;};var $methodExpr=function(method){if(method.$expr===undefined){method.$expr=function(){$stackDepthOffset--;try{return Function.call.apply(method,arguments);}finally{$stackDepthOffset++;}};}return method.$expr;};var $subslice=function(slice,low,high,max){if(low<0||high<low||max<high||high>slice.$capacity||max>slice.$capacity){$throwRuntimeError("slice bounds out of range");}var s=new slice.constructor(slice.$array);s.$offset=slice.$offset+low;s.$length=slice.$length-low;s.$capacity=slice.$capacity-low;if(high!==undefined){s.$length=high-low;}if(max!==undefined){s.$capacity=max-low;}return s;};var $sliceToArray=function(slice){if(slice.$length===0){return[];}if(slice.$array.constructor!==Array){return slice.$array.subarray(slice.$offset,slice.$offset+slice.$length);}return slice.$array.slice(slice.$offset,slice.$offset+slice.$length);};var $decodeRune=function(str,pos){var c0=str.charCodeAt(pos);if(c0<0x80){return[c0,1];}if(c0!==c0||c0<0xC0){return[0xFFFD,1];}var c1=str.charCodeAt(pos+1);if(c1!==c1||c1<0x80||0xC0<=c1){return[0xFFFD,1];}if(c0<0xE0){var r=(c0&0x1F)<<6|(c1&0x3F);if(r<=0x7F){return[0xFFFD,1];}return[r,2];}var c2=str.charCodeAt(pos+2);if(c2!==c2||c2<0x80||0xC0<=c2){return[0xFFFD,1];}if(c0<0xF0){var r=(c0&0x0F)<<12|(c1&0x3F)<<6|(c2&0x3F);if(r<=0x7FF){return[0xFFFD,1];}if(0xD800<=r&&r<=0xDFFF){return[0xFFFD,1];}return[r,3];}var c3=str.charCodeAt(pos+3);if(c3!==c3||c3<0x80||0xC0<=c3){return[0xFFFD,1];}if(c0<0xF8){var r=(c0&0x07)<<18|(c1&0x3F)<<12|(c2&0x3F)<<6|(c3&0x3F);if(r<=0xFFFF||0x10FFFF<r){return[0xFFFD,1];}return[r,4];}return[0xFFFD,1];};var $encodeRune=function(r){if(r<0||r>0x10FFFF||(0xD800<=r&&r<=0xDFFF)){r=0xFFFD;}if(r<=0x7F){return String.fromCharCode(r);}if(r<=0x7FF){return String.fromCharCode(0xC0|r>>6,0x80|(r&0x3F));}if(r<=0xFFFF){return String.fromCharCode(0xE0|r>>12,0x80|(r>>6&0x3F),0x80|(r&0x3F));}return String.fromCharCode(0xF0|r>>18,0x80|(r>>12&0x3F),0x80|(r>>6&0x3F),0x80|(r&0x3F));};var $stringToBytes=function(str){var array=new Uint8Array(str.length),i;for(i=0;i<str.length;i++){array[i]=str.charCodeAt(i);}return array;};var $bytesToString=function(slice){if(slice.$length===0){return"";}var str="",i;for(i=0;i<slice.$length;i+=10000){str+=String.fromCharCode.apply(null,slice.$array.subarray(slice.$offset+i,slice.$offset+Math.min(slice.$length,i+10000)));}return str;};var $stringToRunes=function(str){var array=new Int32Array(str.length);var rune,i,j=0;for(i=0;i<str.length;i+=rune[1],j++){rune=$decodeRune(str,i);array[j]=rune[0];}return array.subarray(0,j);};var $runesToString=function(slice){if(slice.$length===0){return"";}var str="",i;for(i=0;i<slice.$length;i++){str+=$encodeRune(slice.$array[slice.$offset+i]);}return str;};var $copyString=function(dst,src){var n=Math.min(src.length,dst.$length),i;for(i=0;i<n;i++){dst.$array[dst.$offset+i]=src.charCodeAt(i);}return n;};var $copySlice=function(dst,src){var n=Math.min(src.$length,dst.$length),i;$internalCopy(dst.$array,src.$array,dst.$offset,src.$offset,n,dst.constructor.elem);return n;};var $c
|
||
|
$packages["github.com/gopherjs/gopherjs/js"]=(function(){var $pkg={},K,L,A,B,H;A=$pkg.Object=$newType(8,$kindInterface,"js.Object","Object","github.com/gopherjs/gopherjs/js",null);B=$pkg.Error=$newType(0,$kindStruct,"js.Error","Error","github.com/gopherjs/gopherjs/js",function(Object_){this.$val=this;this.Object=Object_!==undefined?Object_:null;});B.Ptr.prototype.Error=function(){var a;a=this;return"JavaScript error: "+$internalize(a.Object.message,$String);};B.prototype.Error=function(){return this.$val.Error();};B.Ptr.prototype.Stack=function(){var a;a=this;return $internalize(a.Object.stack,$String);};B.prototype.Stack=function(){return this.$val.Stack();};H=function(){var a;a=new B.Ptr(null);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:K=$sliceType($emptyInterface);L=$ptrType(B);A.init([["Bool","Bool","",$funcType([],[$Bool],false)],["Call","Call","",$funcType([$String,K],[A],true)],["Delete","Delete","",$funcType([$String],[],false)],["Float","Float","",$funcType([],[$Float64],false)],["Get","Get","",$funcType([$String],[A],false)],["Index","Index","",$funcType([$Int],[A],false)],["Int","Int","",$funcType([],[$Int],false)],["Int64","Int64","",$funcType([],[$Int64],false)],["Interface","Interface","",$funcType([],[$emptyInterface],false)],["Invoke","Invoke","",$funcType([K],[A],true)],["Length","Length","",$funcType([],[$Int],false)],["New","New","",$funcType([K],[A],true)],["Set","Set","",$funcType([$String,$emptyInterface],[],false)],["SetIndex","SetIndex","",$funcType([$Int,$emptyInterface],[],false)],["Str","Str","",$funcType([],[$String],false)],["Uint64","Uint64","",$funcType([],[$Uint64],false)],["Unsafe","Unsafe","",$funcType([],[$Uintptr],false)]]);B.methods=[["Bool","Bool","",$funcType([],[$Bool],false),0],["Call","Call","",$funcType([$String,K],[A],true),0],["Delete","Delete","",$funcType([$String],[],false),0],["Float","Float","",$funcType([],[$Float64],false),0],["Get","Get","",$funcType([$String],[A],false),0],["Index","Index","",$funcType([$Int],[A],false),0],["Int","Int","",$funcType([],[$Int],false),0],["Int64","Int64","",$funcType([],[$Int64],false),0],["Interface","Interface","",$funcType([],[$emptyInterface],false),0],["Invoke","Invoke","",$funcType([K],[A],true),0],["Length","Length","",$funcType([],[$Int],false),0],["New","New","",$funcType([K],[A],true),0],["Set","Set","",$funcType([$String,$emptyInterface],[],false),0],["SetIndex","SetIndex","",$funcType([$Int,$emptyInterface],[],false),0],["Str","Str","",$funcType([],[$String],false),0],["Uint64","Uint64","",$funcType([],[$Uint64],false),0],["Unsafe","Unsafe","",$funcType([],[$Uintptr],false),0]];L.methods=[["Bool","Bool","",$funcType([],[$Bool],false),0],["Call","Call","",$funcType([$String,K],[A],true),0],["Delete","Delete","",$funcType([$String],[],false),0],["Error","Error","",$funcType([],[$String],false),-1],["Float","Float","",$funcType([],[$Float64],false),0],["Get","Get","",$funcType([$String],[A],false),0],["Index","Index","",$funcType([$Int],[A],false),0],["Int","Int","",$funcType([],[$Int],false),0],["Int64","Int64","",$funcType([],[$Int64],false),0],["Interface","Interface","",$funcType([],[$emptyInterface],false),0],["Invoke","Invoke","",$funcType([K],[A],true),0],["Length","Length","",$funcType([],[$Int],false),0],["New","New","",$funcType([K],[A],true),0],["Set","Set","",$funcType([$String,$emptyInterface],[],false),0],["SetIndex","SetIndex","",$funcType([$Int,$emptyInterface],[],false),0],["Stack","Stack","",$funcType([],[$String],false),-1],["Str","Str","",$funcType([],[$String],false),0],["Uint64","Uint64","",$funcType([],[$Uint64],false),0],["Unsafe","Unsafe","",$funcType([],[$Uintptr],false),0]];B.init([["Object","","",A,""]]);H();}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["runtime"]=(function(){var $pkg={},A,AN,AR,AS,C,X,Z,D,E,G,P;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg.NotSupportedError=$newType(0,$kindStruct,"runtime.NotSupportedError","NotSupportedError","runtime",function(Feature_){this.$val=this;this.Feature=Feature_!==undefined?Feature_:"";});X=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError","TypeAssertionError","runtime",function(interfaceString_,concreteString_,assertedString_,missingMethod_){this.$val=this;this.interfaceString=interfaceString_!==undefined?interfaceString_:"";this.concreteString=concreteString_!==undefined?concreteString_:"";this.assertedString=assertedString_!==undefined?assertedString_:"";this.missingMethod=missingMethod_!==undefined?missingMethod_:"";});Z=$pkg.errorString=$newType(8,$kindString,"runtime.errorString","errorString","runtime",null);C.Ptr.prototype.Error=function(){var a;a=this;return"not supported by GopherJS: "+a.Feature;};C.prototype.Error=function(){return this.$val.Error();};D=function(){var a;$throwRuntimeError=(function(a){$panic(new Z(a));});a=$ifaceNil;a=new X.Ptr("","","","");a=new C.Ptr("");};E=$pkg.GOROOT=function(){var a,b;a=$global.process;if(a===undefined){return"/";}b=a.env.GOROOT;if(!(b===undefined)){return $internalize(b,$String);}return"/usr/local/go";};G=$pkg.Caller=function(a){var b=0,c="",d=0,e=false,f,g,h,i,j,k,l,m,n,o;f=new($global.Error)().stack.split($externalize("\n",$String))[(a+2>>0)];if(f===undefined){g=0;h="";i=0;j=false;b=g;c=h;d=i;e=j;return[b,c,d,e];}k=f.substring(($parseInt(f.indexOf($externalize("(",$String)))>>0)+1>>0,$parseInt(f.indexOf($externalize(")",$String)))>>0).split($externalize(":",$String));l=0;m=$internalize(k[0],$String);n=$parseInt(k[1])>>0;o=true;b=l;c=m;d=n;e=o;return[b,c,d,e];};P=$pkg.SetFinalizer=function(a,b){};X.Ptr.prototype.RuntimeError=function(){};X.prototype.RuntimeError=function(){return this.$val.RuntimeError();};X.Ptr.prototype.Error=function(){var a,b;a=this;b=a.interfaceString;if(b===""){b="interface";}if(a.concreteString===""){return"interface conversion: "+b+" is nil, not "+a.assertedString;}if(a.missingMethod===""){return"interface conversion: "+b+" is "+a.concreteString+", not "+a.assertedString;}return"interface conversion: "+a.concreteString+" is not "+a.assertedString+": missing method "+a.missingMethod;};X.prototype.Error=function(){return this.$val.Error();};Z.prototype.RuntimeError=function(){var a;a=this.$val!==undefined?this.$val:this;};$ptrType(Z).prototype.RuntimeError=function(){return new Z(this.$get()).RuntimeError();};Z.prototype.Error=function(){var a;a=this.$val!==undefined?this.$val:this;return"runtime error: "+a;};$ptrType(Z).prototype.Error=function(){return new Z(this.$get()).Error();};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}AN=$ptrType(C);AR=$ptrType(X);AS=$ptrType(Z);AN.methods=[["Error","Error","",$funcType([],[$String],false),-1]];C.init([["Feature","Feature","",$String,""]]);AR.methods=[["Error","Error","",$funcType([],[$String],false),-1],["RuntimeError","RuntimeError","",$funcType([],[],false),-1]];X.init([["interfaceString","interfaceString","runtime",$String,""],["concreteString","concreteString","runtime",$String,""],["assertedString","assertedString","runtime",$String,""],["missingMethod","missingMethod","runtime",$String,""]]);Z.methods=[["Error","Error","",$funcType([],[$String],false),-1],["RuntimeError","RuntimeError","",$funcType([],[],false),-1]];AS.methods=[["Error","Error","",$funcType([],[$String],false),-1],["RuntimeError","RuntimeError","",$funcType([],[],false),-1]];D();}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["image/color"]=(function(){var $pkg={},Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,A,B,C,D,E,F,G,H,I,J,L,U,X,K,M,N,O,P,Q,R,S,T,V,W,Y;A=$pkg.Color=$newType(8,$kindInterface,"color.Color","Color","image/color",null);B=$pkg.RGBA=$newType(0,$kindStruct,"color.RGBA","RGBA","image/color",function(R_,G_,B_,A_){this.$val=this;this.R=R_!==undefined?R_:0;this.G=G_!==undefined?G_:0;this.B=B_!==undefined?B_:0;this.A=A_!==undefined?A_:0;});C=$pkg.RGBA64=$newType(0,$kindStruct,"color.RGBA64","RGBA64","image/color",function(R_,G_,B_,A_){this.$val=this;this.R=R_!==undefined?R_:0;this.G=G_!==undefined?G_:0;this.B=B_!==undefined?B_:0;this.A=A_!==undefined?A_:0;});D=$pkg.NRGBA=$newType(0,$kindStruct,"color.NRGBA","NRGBA","image/color",function(R_,G_,B_,A_){this.$val=this;this.R=R_!==undefined?R_:0;this.G=G_!==undefined?G_:0;this.B=B_!==undefined?B_:0;this.A=A_!==undefined?A_:0;});E=$pkg.NRGBA64=$newType(0,$kindStruct,"color.NRGBA64","NRGBA64","image/color",function(R_,G_,B_,A_){this.$val=this;this.R=R_!==undefined?R_:0;this.G=G_!==undefined?G_:0;this.B=B_!==undefined?B_:0;this.A=A_!==undefined?A_:0;});F=$pkg.Alpha=$newType(0,$kindStruct,"color.Alpha","Alpha","image/color",function(A_){this.$val=this;this.A=A_!==undefined?A_:0;});G=$pkg.Alpha16=$newType(0,$kindStruct,"color.Alpha16","Alpha16","image/color",function(A_){this.$val=this;this.A=A_!==undefined?A_:0;});H=$pkg.Gray=$newType(0,$kindStruct,"color.Gray","Gray","image/color",function(Y_){this.$val=this;this.Y=Y_!==undefined?Y_:0;});I=$pkg.Gray16=$newType(0,$kindStruct,"color.Gray16","Gray16","image/color",function(Y_){this.$val=this;this.Y=Y_!==undefined?Y_:0;});J=$pkg.Model=$newType(8,$kindInterface,"color.Model","Model","image/color",null);L=$pkg.modelFunc=$newType(0,$kindStruct,"color.modelFunc","modelFunc","image/color",function(f_){this.$val=this;this.f=f_!==undefined?f_:$throwNilPointerError;});U=$pkg.Palette=$newType(12,$kindSlice,"color.Palette","Palette","image/color",null);X=$pkg.YCbCr=$newType(0,$kindStruct,"color.YCbCr","YCbCr","image/color",function(Y_,Cb_,Cr_){this.$val=this;this.Y=Y_!==undefined?Y_:0;this.Cb=Cb_!==undefined?Cb_:0;this.Cr=Cr_!==undefined?Cr_:0;});B.Ptr.prototype.RGBA=function(){var a=0,b=0,c=0,d=0,e;e=$clone(this,B);a=(e.R>>>0);a=(a|((a<<8>>>0)))>>>0;b=(e.G>>>0);b=(b|((b<<8>>>0)))>>>0;c=(e.B>>>0);c=(c|((c<<8>>>0)))>>>0;d=(e.A>>>0);d=(d|((d<<8>>>0)))>>>0;return[a,b,c,d];};B.prototype.RGBA=function(){return this.$val.RGBA();};C.Ptr.prototype.RGBA=function(){var a=0,b=0,c=0,d=0,e,f,g,h,i;e=$clone(this,C);f=(e.R>>>0);g=(e.G>>>0);h=(e.B>>>0);i=(e.A>>>0);a=f;b=g;c=h;d=i;return[a,b,c,d];};C.prototype.RGBA=function(){return this.$val.RGBA();};D.Ptr.prototype.RGBA=function(){var a=0,b=0,c=0,d=0,e,f,g,h,i,j,k;e=$clone(this,D);a=(e.R>>>0);a=(a|((a<<8>>>0)))>>>0;a=(f=(e.A>>>0),(((a>>>16<<16)*f>>>0)+(a<<16>>>16)*f)>>>0);a=(g=a/(255),(g===g&&g!==1/0&&g!==-1/0)?g>>>0:$throwRuntimeError("integer divide by zero"));b=(e.G>>>0);b=(b|((b<<8>>>0)))>>>0;b=(h=(e.A>>>0),(((b>>>16<<16)*h>>>0)+(b<<16>>>16)*h)>>>0);b=(i=b/(255),(i===i&&i!==1/0&&i!==-1/0)?i>>>0:$throwRuntimeError("integer divide by zero"));c=(e.B>>>0);c=(c|((c<<8>>>0)))>>>0;c=(j=(e.A>>>0),(((c>>>16<<16)*j>>>0)+(c<<16>>>16)*j)>>>0);c=(k=c/(255),(k===k&&k!==1/0&&k!==-1/0)?k>>>0:$throwRuntimeError("integer divide by zero"));d=(e.A>>>0);d=(d|((d<<8>>>0)))>>>0;return[a,b,c,d];};D.prototype.RGBA=function(){return this.$val.RGBA();};E.Ptr.prototype.RGBA=function(){var a=0,b=0,c=0,d=0,e,f,g,h,i,j,k;e=$clone(this,E);a=(e.R>>>0);a=(f=(e.A>>>0),(((a>>>16<<16)*f>>>0)+(a<<16>>>16)*f)>>>0);a=(g=a/(65535),(g===g&&g!==1/0&&g!==-1/0)?g>>>0:$throwRuntimeError("integer divide by zero"));b=(e.G>>>0);b=(h=(e.A>>>0),(((b>>>16<<16)*h>>>0)+(b<<16>>>16)*h)>>>0);b=(i=b/(65535),(i===i&&i!==1/0&&i!==-1/0)?i>>>0:$throwRuntimeError("integer divide by zero"));c=(e.B>>>0);c=(j=(e.A>>>0),(((c>>>16<<16)*j>>>0)+(c<<16>>>16)*j)>>>0);c=(k=c/(65535),(k===k&&k!==1/0&&k!==-1/0)?k>>>0:$throwRuntimeError("integer divide by zero"));d=(e.A>>>0);return[a,b,c,d];};E.prototype.RGBA=function(){return this.$val.RGBA();};F.Ptr.prototype.RGBA=function(){var a=0,b
|
||
|
$packages["math"]=(function(){var $pkg={},A,FG,B,C,D,E,F,EN,ER,ES,G,X,Y,Z,AI,AN,AR,AS,AT,EP,EV;A=$packages["github.com/gopherjs/gopherjs/js"];G=function(){AR(0);AS(0);};X=$pkg.IsInf=function(ao,ap){if(ao===D){return ap>=0;}if(ao===E){return ap<=0;}return false;};Y=$pkg.IsNaN=function(ao){var ap=false;ap=!((ao===ao));return ap;};Z=$pkg.Ldexp=function(ao,ap){if(ao===0){return ao;}if(ap>=1024){return ao*$parseFloat(B.pow(2,1023))*$parseFloat(B.pow(2,ap-1023>>0));}if(ap<=-1024){return ao*$parseFloat(B.pow(2,-1023))*$parseFloat(B.pow(2,ap+1023>>0));}return ao*$parseFloat(B.pow(2,ap));};AI=$pkg.NaN=function(){return F;};AN=$pkg.Sincos=function(ao){var ap=0,aq=0,ar;ar=EV(ao);ap=ar[0];aq=ar[1];return[ap,aq];};AR=$pkg.Float32bits=function(ao){var ap,aq,ar;if(ao===0){if(1/ao===E){return 2147483648;}return 0;}if(!(ao===ao)){return 2143289344;}ap=0;if(ao<0){ap=2147483648;ao=-ao;}aq=150;while(ao>=1.6777216e+07){ao=ao/(2);aq=aq+(1)>>>0;if(aq===255){if(ao>=8.388608e+06){ao=D;}break;}}while(ao<8.388608e+06){aq=aq-(1)>>>0;if(aq===0){break;}ao=ao*(2);}ar=$parseFloat($mod(ao,2));if((ar>0.5&&ar<1)||ar>=1.5){ao=ao+(1);}return(((ap|(aq<<23>>>0))>>>0)|(((ao>>0)&~8388608)))>>>0;};AS=$pkg.Float32frombits=function(ao){var ap,aq,ar;ap=1;if(!((((ao&2147483648)>>>0)===0))){ap=-1;}aq=(((ao>>>23>>>0))&255)>>>0;ar=(ao&8388607)>>>0;if(aq===255){if(ar===0){return ap/0;}return F;}if(!((aq===0))){ar=ar+(8388608)>>>0;}if(aq===0){aq=1;}return Z(ar,((aq>>0)-127>>0)-23>>0)*ap;};AT=$pkg.Float64bits=function(ao){var ap,aq,ar,as,at,au;if(ao===0){if(1/ao===E){return new $Uint64(2147483648,0);}return new $Uint64(0,0);}if(!((ao===ao))){return new $Uint64(2146959360,1);}ap=new $Uint64(0,0);if(ao<0){ap=new $Uint64(2147483648,0);ao=-ao;}aq=1075;while(ao>=9.007199254740992e+15){ao=ao/(2);aq=aq+(1)>>>0;if(aq===2047){break;}}while(ao<4.503599627370496e+15){aq=aq-(1)>>>0;if(aq===0){break;}ao=ao*(2);}return(ar=(as=$shiftLeft64(new $Uint64(0,aq),52),new $Uint64(ap.$high|as.$high,(ap.$low|as.$low)>>>0)),at=(au=new $Uint64(0,ao),new $Uint64(au.$high&~1048576,(au.$low&~0)>>>0)),new $Uint64(ar.$high|at.$high,(ar.$low|at.$low)>>>0));};EP=function(){var ao,ap,aq,ar;EN[0]=1;EN[1]=10;ao=2;while(ao<70){aq=(ap=ao/2,(ap===ap&&ap!==1/0&&ap!==-1/0)?ap>>0:$throwRuntimeError("integer divide by zero"));(ao<0||ao>=EN.length)?$throwRuntimeError("index out of range"):EN[ao]=((aq<0||aq>=EN.length)?$throwRuntimeError("index out of range"):EN[aq])*(ar=ao-aq>>0,((ar<0||ar>=EN.length)?$throwRuntimeError("index out of range"):EN[ar]));ao=ao+(1)>>0;}};EV=function(ao){var ap=0,aq=0,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk;if(ao===0){ar=ao;as=1;ap=ar;aq=as;return[ap,aq];}else if(Y(ao)||X(ao,0)){at=AI();au=AI();ap=at;aq=au;return[ap,aq];}av=false;aw=false;ax=av;ay=aw;if(ao<0){ao=-ao;ax=true;}az=new $Int64(0,ao*1.2732395447351625);ba=$flatten64(az);if((bb=new $Int64(az.$high&0,(az.$low&1)>>>0),(bb.$high===0&&bb.$low===1))){az=(bc=new $Int64(0,1),new $Int64(az.$high+bc.$high,az.$low+bc.$low));ba=ba+(1);}az=(bd=new $Int64(0,7),new $Int64(az.$high&bd.$high,(az.$low&bd.$low)>>>0));if((az.$high>0||(az.$high===0&&az.$low>3))){az=(be=new $Int64(0,4),new $Int64(az.$high-be.$high,az.$low-be.$low));bf=!ax;bg=!ay;ax=bf;ay=bg;}if((az.$high>0||(az.$high===0&&az.$low>1))){ay=!ay;}bh=((ao-ba*0.7853981256484985)-ba*3.774894707930798e-08)-ba*2.6951514290790595e-15;bi=bh*bh;aq=1-0.5*bi+bi*bi*((((((ES[0]*bi)+ES[1])*bi+ES[2])*bi+ES[3])*bi+ES[4])*bi+ES[5]);ap=bh+bh*bi*((((((ER[0]*bi)+ER[1])*bi+ER[2])*bi+ER[3])*bi+ER[4])*bi+ER[5]);if((az.$high===0&&az.$low===1)||(az.$high===0&&az.$low===2)){bj=aq;bk=ap;ap=bj;aq=bk;}if(ay){aq=-aq;}if(ax){ap=-ap;}return[ap,aq];};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}FG=$arrayType($Float64,70);EN=FG.zero();B=$global.Math;C=0;D=1/C;E=-1/C;F=0/C;ER=$toNativeArray($kindFloat64,[1.5896230157654656e-10,-2.5050747762857807e-08,2.7557313621385722e-06,-0.0001984126982958954,0.008333333333322118,-0.1666666666666663]);ES=$toNativeArray($kindFloat64,[-1.135
|
||
|
$packages["github.com/hajimehoshi/ebiten/internal"]=(function(){var $pkg={},A,B,C,D;A=$packages["image/color"];B=$packages["math"];C=$pkg.NextPowerOf2Int=function(a){a=a-(1)>>0;a=a|(((a>>1>>0)));a=a|(((a>>2>>0)));a=a|(((a>>4>>0)));a=a|(((a>>8>>0)));a=a|(((a>>16>>0)));return a+1>>0;};D=$pkg.RGBA=function(a){var b=0,c=0,d=0,e=0,f,g,h,i,j;f=a.RGBA();g=f[0];h=f[1];i=f[2];j=f[3];b=g/65535;c=h/65535;d=i/65535;e=j/65535;return[b,c,d,e];};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["errors"]=(function(){var $pkg={},C,B,A;B=$pkg.errorString=$newType(0,$kindStruct,"errors.errorString","errorString","errors",function(s_){this.$val=this;this.s=s_!==undefined?s_:"";});A=$pkg.New=function(a){return new B.Ptr(a);};B.Ptr.prototype.Error=function(){var a;a=this;return a.s;};B.prototype.Error=function(){return this.$val.Error();};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:C=$ptrType(B);C.methods=[["Error","Error","",$funcType([],[$String],false),-1]];B.init([["s","s","errors",$String,""]]);}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["sync/atomic"]=(function(){var $pkg={},A,H,N,U,Y,AA;A=$packages["github.com/gopherjs/gopherjs/js"];H=$pkg.CompareAndSwapInt32=function(ad,ae,af){if(ad.$get()===ae){ad.$set(af);return true;}return false;};N=$pkg.AddInt32=function(ad,ae){var af;af=ad.$get()+ae>>0;ad.$set(af);return af;};U=$pkg.LoadUint32=function(ad){return ad.$get();};Y=$pkg.StoreInt32=function(ad,ae){ad.$set(ae);};AA=$pkg.StoreUint32=function(ad,ae){ad.$set(ae);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["sync"]=(function(){var $pkg={},B,A,AJ,AK,AM,AN,AP,AS,AT,AV,AW,AX,AY,AZ,BA,C,I,J,K,L,AC,AG,AH,O,D,E,M,P,Q,X,AA,AB,AF;B=$packages["runtime"];A=$packages["sync/atomic"];C=$pkg.Pool=$newType(0,$kindStruct,"sync.Pool","Pool","sync",function(local_,localSize_,store_,New_){this.$val=this;this.local=local_!==undefined?local_:0;this.localSize=localSize_!==undefined?localSize_:0;this.store=store_!==undefined?store_:AS.nil;this.New=New_!==undefined?New_:$throwNilPointerError;});I=$pkg.Mutex=$newType(0,$kindStruct,"sync.Mutex","Mutex","sync",function(state_,sema_){this.$val=this;this.state=state_!==undefined?state_:0;this.sema=sema_!==undefined?sema_:0;});J=$pkg.Locker=$newType(8,$kindInterface,"sync.Locker","Locker","sync",null);K=$pkg.Once=$newType(0,$kindStruct,"sync.Once","Once","sync",function(m_,done_){this.$val=this;this.m=m_!==undefined?m_:new I.Ptr();this.done=done_!==undefined?done_:0;});L=$pkg.poolLocal=$newType(0,$kindStruct,"sync.poolLocal","poolLocal","sync",function(private$0_,shared_,Mutex_,pad_){this.$val=this;this.private$0=private$0_!==undefined?private$0_:$ifaceNil;this.shared=shared_!==undefined?shared_:AS.nil;this.Mutex=Mutex_!==undefined?Mutex_:new I.Ptr();this.pad=pad_!==undefined?pad_:AY.zero();});AC=$pkg.syncSema=$newType(0,$kindStruct,"sync.syncSema","syncSema","sync",function(lock_,head_,tail_){this.$val=this;this.lock=lock_!==undefined?lock_:0;this.head=head_!==undefined?head_:0;this.tail=tail_!==undefined?tail_:0;});AG=$pkg.RWMutex=$newType(0,$kindStruct,"sync.RWMutex","RWMutex","sync",function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;this.w=w_!==undefined?w_:new I.Ptr();this.writerSem=writerSem_!==undefined?writerSem_:0;this.readerSem=readerSem_!==undefined?readerSem_:0;this.readerCount=readerCount_!==undefined?readerCount_:0;this.readerWait=readerWait_!==undefined?readerWait_:0;});AH=$pkg.rlocker=$newType(0,$kindStruct,"sync.rlocker","rlocker","sync",function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;this.w=w_!==undefined?w_:new I.Ptr();this.writerSem=writerSem_!==undefined?writerSem_:0;this.readerSem=readerSem_!==undefined?readerSem_:0;this.readerCount=readerCount_!==undefined?readerCount_:0;this.readerWait=readerWait_!==undefined?readerWait_:0;});C.Ptr.prototype.Get=function(){var d,e,f,g;d=this;if(d.store.$length===0){if(!(d.New===$throwNilPointerError)){return d.New();}return $ifaceNil;}g=(e=d.store,f=d.store.$length-1>>0,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]));d.store=$subslice(d.store,0,(d.store.$length-1>>0));return g;};C.prototype.Get=function(){return this.$val.Get();};C.Ptr.prototype.Put=function(d){var e;e=this;if($interfaceIsEqual(d,$ifaceNil)){return;}e.store=$append(e.store,d);};C.prototype.Put=function(d){return this.$val.Put(d);};D=function(d){};E=function(d){};I.Ptr.prototype.Lock=function(){var d,e,f,g;d=this;if(A.CompareAndSwapInt32(new AN(function(){return this.$target.state;},function($v){this.$target.state=$v;},d),0,1)){return;}e=false;while(true){f=d.state;g=f|1;if(!(((f&1)===0))){g=f+4>>0;}if(e){g=g&~(2);}if(A.CompareAndSwapInt32(new AN(function(){return this.$target.state;},function($v){this.$target.state=$v;},d),f,g)){if((f&1)===0){break;}AA(new AM(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},d));e=true;}}};I.prototype.Lock=function(){return this.$val.Lock();};I.Ptr.prototype.Unlock=function(){var d,e,f;d=this;e=A.AddInt32(new AN(function(){return this.$target.state;},function($v){this.$target.state=$v;},d),-1);if((((e+1>>0))&1)===0){$panic(new $String("sync: unlock of unlocked mutex"));}f=e;while(true){if(((f>>2>>0)===0)||!(((f&3)===0))){return;}e=((f-4>>0))|2;if(A.CompareAndSwapInt32(new AN(function(){return this.$target.state;},function($v){this.$target.state=$v;},d),f,e)){AB(new AM(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},d));return;}f=d.state;}};I.prototype.Unlock=function(){return this.$val.Unlock();};K.Ptr.prototype.Do=function(d){var $deferred=[],$err=null,e;try{$deferFrames.push($deferred);e=this;if(A
|
||
|
$packages["io"]=(function(){var $pkg={},B,A,C,AW,E,F,J,P,Q,T,W,AI,AJ,AA,AB;B=$packages["errors"];A=$packages["runtime"];C=$packages["sync"];E=$pkg.Reader=$newType(8,$kindInterface,"io.Reader","Reader","io",null);F=$pkg.Writer=$newType(8,$kindInterface,"io.Writer","Writer","io",null);J=$pkg.ReadCloser=$newType(8,$kindInterface,"io.ReadCloser","ReadCloser","io",null);P=$pkg.ReaderFrom=$newType(8,$kindInterface,"io.ReaderFrom","ReaderFrom","io",null);Q=$pkg.WriterTo=$newType(8,$kindInterface,"io.WriterTo","WriterTo","io",null);T=$pkg.ByteReader=$newType(8,$kindInterface,"io.ByteReader","ByteReader","io",null);W=$pkg.RuneReader=$newType(8,$kindInterface,"io.RuneReader","RuneReader","io",null);AA=$pkg.ReadAtLeast=function(b,c,d){var e=0,f=$ifaceNil,g,h,i,j;if(c.$length<d){g=0;h=$pkg.ErrShortBuffer;e=g;f=h;return[e,f];}while(e<d&&$interfaceIsEqual(f,$ifaceNil)){i=0;j=b.Read($subslice(c,e));i=j[0];f=j[1];e=e+(i)>>0;}if(e>=d){f=$ifaceNil;}else if(e>0&&$interfaceIsEqual(f,$pkg.EOF)){f=$pkg.ErrUnexpectedEOF;}return[e,f];};AB=$pkg.ReadFull=function(b,c){var d=0,e=$ifaceNil,f;f=AA(b,c,c.$length);d=f[0];e=f[1];return[d,e];};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}AW=$sliceType($Uint8);E.init([["Read","Read","",$funcType([AW],[$Int,$error],false)]]);F.init([["Write","Write","",$funcType([AW],[$Int,$error],false)]]);J.init([["Close","Close","",$funcType([],[$error],false)],["Read","Read","",$funcType([AW],[$Int,$error],false)]]);P.init([["ReadFrom","ReadFrom","",$funcType([E],[$Int64,$error],false)]]);Q.init([["WriteTo","WriteTo","",$funcType([F],[$Int64,$error],false)]]);T.init([["ReadByte","ReadByte","",$funcType([],[$Uint8,$error],false)]]);W.init([["ReadRune","ReadRune","",$funcType([],[$Int32,$Int,$error],false)]]);$pkg.ErrShortWrite=B.New("short write");$pkg.ErrShortBuffer=B.New("short buffer");$pkg.EOF=B.New("EOF");$pkg.ErrUnexpectedEOF=B.New("unexpected EOF");$pkg.ErrNoProgress=B.New("multiple Read calls return no data or error");AI=B.New("Seek: invalid whence");AJ=B.New("Seek: invalid offset");$pkg.ErrClosedPipe=B.New("io: read/write on closed pipe");}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["unicode"]=(function(){var $pkg={};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["unicode/utf8"]=(function(){var $pkg={},A,B,C,E,F,G,I,J,K,L,M;A=function(a){var b=0,c=0,d=false,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh;e=a.$length;if(e<1){f=65533;g=0;h=true;b=f;c=g;d=h;return[b,c,d];}i=((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]);if(i<128){j=(i>>0);k=1;l=false;b=j;c=k;d=l;return[b,c,d];}if(i<192){m=65533;n=1;o=false;b=m;c=n;d=o;return[b,c,d];}if(e<2){p=65533;q=1;r=true;b=p;c=q;d=r;return[b,c,d];}s=((1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]);if(s<128||192<=s){t=65533;u=1;v=false;b=t;c=u;d=v;return[b,c,d];}if(i<224){b=((((i&31)>>>0)>>0)<<6>>0)|(((s&63)>>>0)>>0);if(b<=127){w=65533;x=1;y=false;b=w;c=x;d=y;return[b,c,d];}z=b;aa=2;ab=false;b=z;c=aa;d=ab;return[b,c,d];}if(e<3){ac=65533;ad=1;ae=true;b=ac;c=ad;d=ae;return[b,c,d];}af=((2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]);if(af<128||192<=af){ag=65533;ah=1;ai=false;b=ag;c=ah;d=ai;return[b,c,d];}if(i<240){b=(((((i&15)>>>0)>>0)<<12>>0)|((((s&63)>>>0)>>0)<<6>>0))|(((af&63)>>>0)>>0);if(b<=2047){aj=65533;ak=1;al=false;b=aj;c=ak;d=al;return[b,c,d];}if(55296<=b&&b<=57343){am=65533;an=1;ao=false;b=am;c=an;d=ao;return[b,c,d];}ap=b;aq=3;ar=false;b=ap;c=aq;d=ar;return[b,c,d];}if(e<4){as=65533;at=1;au=true;b=as;c=at;d=au;return[b,c,d];}av=((3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]);if(av<128||192<=av){aw=65533;ax=1;ay=false;b=aw;c=ax;d=ay;return[b,c,d];}if(i<248){b=((((((i&7)>>>0)>>0)<<18>>0)|((((s&63)>>>0)>>0)<<12>>0))|((((af&63)>>>0)>>0)<<6>>0))|(((av&63)>>>0)>>0);if(b<=65535||1114111<b){az=65533;ba=1;bb=false;b=az;c=ba;d=bb;return[b,c,d];}bc=b;bd=4;be=false;b=bc;c=bd;d=be;return[b,c,d];}bf=65533;bg=1;bh=false;b=bf;c=bg;d=bh;return[b,c,d];};B=function(a){var b=0,c=0,d=false,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh;e=a.length;if(e<1){f=65533;g=0;h=true;b=f;c=g;d=h;return[b,c,d];}i=a.charCodeAt(0);if(i<128){j=(i>>0);k=1;l=false;b=j;c=k;d=l;return[b,c,d];}if(i<192){m=65533;n=1;o=false;b=m;c=n;d=o;return[b,c,d];}if(e<2){p=65533;q=1;r=true;b=p;c=q;d=r;return[b,c,d];}s=a.charCodeAt(1);if(s<128||192<=s){t=65533;u=1;v=false;b=t;c=u;d=v;return[b,c,d];}if(i<224){b=((((i&31)>>>0)>>0)<<6>>0)|(((s&63)>>>0)>>0);if(b<=127){w=65533;x=1;y=false;b=w;c=x;d=y;return[b,c,d];}z=b;aa=2;ab=false;b=z;c=aa;d=ab;return[b,c,d];}if(e<3){ac=65533;ad=1;ae=true;b=ac;c=ad;d=ae;return[b,c,d];}af=a.charCodeAt(2);if(af<128||192<=af){ag=65533;ah=1;ai=false;b=ag;c=ah;d=ai;return[b,c,d];}if(i<240){b=(((((i&15)>>>0)>>0)<<12>>0)|((((s&63)>>>0)>>0)<<6>>0))|(((af&63)>>>0)>>0);if(b<=2047){aj=65533;ak=1;al=false;b=aj;c=ak;d=al;return[b,c,d];}if(55296<=b&&b<=57343){am=65533;an=1;ao=false;b=am;c=an;d=ao;return[b,c,d];}ap=b;aq=3;ar=false;b=ap;c=aq;d=ar;return[b,c,d];}if(e<4){as=65533;at=1;au=true;b=as;c=at;d=au;return[b,c,d];}av=a.charCodeAt(3);if(av<128||192<=av){aw=65533;ax=1;ay=false;b=aw;c=ax;d=ay;return[b,c,d];}if(i<248){b=((((((i&7)>>>0)>>0)<<18>>0)|((((s&63)>>>0)>>0)<<12>>0))|((((af&63)>>>0)>>0)<<6>>0))|(((av&63)>>>0)>>0);if(b<=65535||1114111<b){az=65533;ba=1;bb=false;b=az;c=ba;d=bb;return[b,c,d];}bc=b;bd=4;be=false;b=bc;c=bd;d=be;return[b,c,d];}bf=65533;bg=1;bh=false;b=bf;c=bg;d=bh;return[b,c,d];};C=$pkg.FullRune=function(a){var b,c;b=A(a);c=b[2];return!c;};E=$pkg.DecodeRune=function(a){var b=0,c=0,d;d=A(a);b=d[0];c=d[1];return[b,c];};F=$pkg.DecodeRuneInString=function(a){var b=0,c=0,d;d=B(a);b=d[0];c=d[1];return[b,c];};G=$pkg.DecodeLastRune=function(a){var b=0,c=0,d,e,f,g,h,i,j,k,l,m,n,o;d=a.$length;if(d===0){e=65533;f=0;b=e;c=f;return[b,c];}g=d-1>>0;b=(((g<0||g>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+g])>>0);if(b<128){h=b;i=1;b=h;c=i;return[b,c];}j=d-4>>0;if(j<0){j=0;}g=g-(1)>>0;while(g>=j){if(M(((g<0||g>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+g]))){break;}g=g-(1)>
|
||
|
$packages["bytes"]=(function(){var $pkg={},A,B,D,C,BJ,BK,BL,BM,H,I,E,J,K;A=$packages["errors"];B=$packages["io"];D=$packages["unicode"];C=$packages["unicode/utf8"];H=$pkg.Buffer=$newType(0,$kindStruct,"bytes.Buffer","Buffer","bytes",function(buf_,off_,runeBytes_,bootstrap_,lastRead_){this.$val=this;this.buf=buf_!==undefined?buf_:BK.nil;this.off=off_!==undefined?off_:0;this.runeBytes=runeBytes_!==undefined?runeBytes_:BL.zero();this.bootstrap=bootstrap_!==undefined?bootstrap_:BM.zero();this.lastRead=lastRead_!==undefined?lastRead_:0;});I=$pkg.readOp=$newType(4,$kindInt,"bytes.readOp","readOp","bytes",null);E=$pkg.IndexByte=function(d,e){var f,g,h,i;f=d;g=0;while(g<f.$length){h=g;i=((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(i===e){return h;}g++;}return-1;};H.Ptr.prototype.Bytes=function(){var d;d=this;return $subslice(d.buf,d.off);};H.prototype.Bytes=function(){return this.$val.Bytes();};H.Ptr.prototype.String=function(){var d;d=this;if(d===BJ.nil){return"<nil>";}return $bytesToString($subslice(d.buf,d.off));};H.prototype.String=function(){return this.$val.String();};H.Ptr.prototype.Len=function(){var d;d=this;return d.buf.$length-d.off>>0;};H.prototype.Len=function(){return this.$val.Len();};H.Ptr.prototype.Truncate=function(d){var e;e=this;e.lastRead=0;if(d<0||d>e.Len()){$panic(new $String("bytes.Buffer: truncation out of range"));}else if(d===0){e.off=0;}e.buf=$subslice(e.buf,0,(e.off+d>>0));};H.prototype.Truncate=function(d){return this.$val.Truncate(d);};H.Ptr.prototype.Reset=function(){var d;d=this;d.Truncate(0);};H.prototype.Reset=function(){return this.$val.Reset();};H.Ptr.prototype.grow=function(d){var e,f,g,h;e=this;f=e.Len();if((f===0)&&!((e.off===0))){e.Truncate(0);}if((e.buf.$length+d>>0)>e.buf.$capacity){g=BK.nil;if(e.buf===BK.nil&&d<=64){g=$subslice(new BK(e.bootstrap),0);}else if((f+d>>0)<=(h=e.buf.$capacity/2,(h===h&&h!==1/0&&h!==-1/0)?h>>0:$throwRuntimeError("integer divide by zero"))){$copySlice(e.buf,$subslice(e.buf,e.off));g=$subslice(e.buf,0,f);}else{g=J((2*e.buf.$capacity>>0)+d>>0);$copySlice(g,$subslice(e.buf,e.off));}e.buf=g;e.off=0;}e.buf=$subslice(e.buf,0,((e.off+f>>0)+d>>0));return e.off+f>>0;};H.prototype.grow=function(d){return this.$val.grow(d);};H.Ptr.prototype.Grow=function(d){var e,f;e=this;if(d<0){$panic(new $String("bytes.Buffer.Grow: negative count"));}f=e.grow(d);e.buf=$subslice(e.buf,0,f);};H.prototype.Grow=function(d){return this.$val.Grow(d);};H.Ptr.prototype.Write=function(d){var e=0,f=$ifaceNil,g,h,i,j;g=this;g.lastRead=0;h=g.grow(d.$length);i=$copySlice($subslice(g.buf,h),d);j=$ifaceNil;e=i;f=j;return[e,f];};H.prototype.Write=function(d){return this.$val.Write(d);};H.Ptr.prototype.WriteString=function(d){var e=0,f=$ifaceNil,g,h,i,j;g=this;g.lastRead=0;h=g.grow(d.length);i=$copyString($subslice(g.buf,h),d);j=$ifaceNil;e=i;f=j;return[e,f];};H.prototype.WriteString=function(d){return this.$val.WriteString(d);};H.Ptr.prototype.ReadFrom=function(d){var e=new $Int64(0,0),f=$ifaceNil,g,h,i,j,k,l,m,n,o,p,q;g=this;g.lastRead=0;if(g.off>=g.buf.$length){g.Truncate(0);}while(true){h=g.buf.$capacity-g.buf.$length>>0;if(h<512){i=g.buf;if((g.off+h>>0)<512){i=J((2*g.buf.$capacity>>0)+512>>0);}$copySlice(i,$subslice(g.buf,g.off));g.buf=$subslice(i,0,(g.buf.$length-g.off>>0));g.off=0;}j=d.Read($subslice(g.buf,g.buf.$length,g.buf.$capacity));k=j[0];l=j[1];g.buf=$subslice(g.buf,0,(g.buf.$length+k>>0));e=(m=new $Int64(0,k),new $Int64(e.$high+m.$high,e.$low+m.$low));if($interfaceIsEqual(l,B.EOF)){break;}if(!($interfaceIsEqual(l,$ifaceNil))){n=e;o=l;e=n;f=o;return[e,f];}}p=e;q=$ifaceNil;e=p;f=q;return[e,f];};H.prototype.ReadFrom=function(d){return this.$val.ReadFrom(d);};J=function(d){var $deferred=[],$err=null;try{$deferFrames.push($deferred);$deferred.push([(function(){if(!($interfaceIsEqual($recover(),$ifaceNil))){$panic($pkg.ErrTooLarge);}}),[]]);return BK.make(d);}catch(err){$err=err;return BK.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};H.Ptr.prototype.WriteTo=function(d){var e=new $Int64(0,0),f=$ifaceNil,g,h,i,j,k,l,m,n,o;g=this;g.
|
||
|
$packages["syscall"]=(function(){var $pkg={},A,E,B,D,C,MD,ME,MF,ML,MS,MT,MZ,NE,NG,NH,NK,NX,NY,NZ,OA,OF,OG,OI,OK,EQ,ER,KF,KI,KO,KW,F,G,N,O,P,AP,AQ,AR,AS,DT,FS,H,I,J,K,L,Q,R,S,V,AU,AW,CQ,CR,CT,CY,DO,DY,DZ,ET,EU,GM,HA,HE,HF,HH,HI,HL,HN,HO,HP,II,IT,IU,IV,JA,JY,JZ,KA;A=$packages["bytes"];E=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];D=$packages["runtime"];C=$packages["sync"];EQ=$pkg.mmapper=$newType(0,$kindStruct,"syscall.mmapper","mmapper","syscall",function(Mutex_,active_,mmap_,munmap_){this.$val=this;this.Mutex=Mutex_!==undefined?Mutex_:new C.Mutex.Ptr();this.active=active_!==undefined?active_:false;this.mmap=mmap_!==undefined?mmap_:$throwNilPointerError;this.munmap=munmap_!==undefined?munmap_:$throwNilPointerError;});ER=$pkg.Errno=$newType(4,$kindUintptr,"syscall.Errno","Errno","syscall",null);KF=$pkg._C_int=$newType(4,$kindInt32,"syscall._C_int","_C_int","syscall",null);KI=$pkg.Timespec=$newType(0,$kindStruct,"syscall.Timespec","Timespec","syscall",function(Sec_,Nsec_){this.$val=this;this.Sec=Sec_!==undefined?Sec_:new $Int64(0,0);this.Nsec=Nsec_!==undefined?Nsec_:new $Int64(0,0);});KO=$pkg.Stat_t=$newType(0,$kindStruct,"syscall.Stat_t","Stat_t","syscall",function(Dev_,Mode_,Nlink_,Ino_,Uid_,Gid_,Rdev_,Pad_cgo_0_,Atimespec_,Mtimespec_,Ctimespec_,Birthtimespec_,Size_,Blocks_,Blksize_,Flags_,Gen_,Lspare_,Qspare_){this.$val=this;this.Dev=Dev_!==undefined?Dev_:0;this.Mode=Mode_!==undefined?Mode_:0;this.Nlink=Nlink_!==undefined?Nlink_:0;this.Ino=Ino_!==undefined?Ino_:new $Uint64(0,0);this.Uid=Uid_!==undefined?Uid_:0;this.Gid=Gid_!==undefined?Gid_:0;this.Rdev=Rdev_!==undefined?Rdev_:0;this.Pad_cgo_0=Pad_cgo_0_!==undefined?Pad_cgo_0_:NG.zero();this.Atimespec=Atimespec_!==undefined?Atimespec_:new KI.Ptr();this.Mtimespec=Mtimespec_!==undefined?Mtimespec_:new KI.Ptr();this.Ctimespec=Ctimespec_!==undefined?Ctimespec_:new KI.Ptr();this.Birthtimespec=Birthtimespec_!==undefined?Birthtimespec_:new KI.Ptr();this.Size=Size_!==undefined?Size_:new $Int64(0,0);this.Blocks=Blocks_!==undefined?Blocks_:new $Int64(0,0);this.Blksize=Blksize_!==undefined?Blksize_:0;this.Flags=Flags_!==undefined?Flags_:0;this.Gen=Gen_!==undefined?Gen_:0;this.Lspare=Lspare_!==undefined?Lspare_:0;this.Qspare=Qspare_!==undefined?Qspare_:OG.zero();});KW=$pkg.Dirent=$newType(0,$kindStruct,"syscall.Dirent","Dirent","syscall",function(Ino_,Seekoff_,Reclen_,Namlen_,Type_,Name_,Pad_cgo_0_){this.$val=this;this.Ino=Ino_!==undefined?Ino_:new $Uint64(0,0);this.Seekoff=Seekoff_!==undefined?Seekoff_:new $Uint64(0,0);this.Reclen=Reclen_!==undefined?Reclen_:0;this.Namlen=Namlen_!==undefined?Namlen_:0;this.Type=Type_!==undefined?Type_:0;this.Name=Name_!==undefined?Name_:OI.zero();this.Pad_cgo_0=Pad_cgo_0_!==undefined?Pad_cgo_0_:OK.zero();});H=function(){$flushConsole=(function(){if(!((G.$length===0))){$global.console.log($externalize($bytesToString(G),$String));G=MD.nil;}});};I=function(){if(!F){console.log("warning: system calls not available, see https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md");}F=true;};J=function(i){var j,k;j=$global.goPrintToConsole;if(!(j===undefined)){j(i);return;}G=$appendSlice(G,i);while(true){k=A.IndexByte(G,10);if(k===-1){break;}$global.console.log($externalize($bytesToString($subslice(G,0,k)),$String));G=$subslice(G,(k+1>>0));}};K=function(i){};L=function(){var i,j,k,l,m,n;i=$global.process;if(i===undefined){return ME.nil;}j=i.env;k=$global.Object.keys(j);l=ME.make($parseInt(k.length));m=0;while(m<$parseInt(k.length)){n=$internalize(k[m],$String);(m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]=n+"="+$internalize(j[$externalize(n,$String)],$String);m=m+(1)>>0;}return l;};Q=function(i){var $deferred=[],$err=null,j;try{$deferFrames.push($deferred);$deferred.push([(function(){$recover();}),[]]);if(N===null){if(O){return null;}O=true;j=$global.require;if(j===undefined){$panic(new $String(""));}N=j($externalize("syscall",$String));}return N[$externalize(i,$String)];}catch(err){$err=err;return null;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};R=$pkg.Syscall=function(i,j
|
||
|
$packages["github.com/gopherjs/gopherjs/nosync"]=(function(){var $pkg={},I,J,D;D=$pkg.Once=$newType(0,$kindStruct,"nosync.Once","Once","github.com/gopherjs/gopherjs/nosync",function(doing_,done_){this.$val=this;this.doing=doing_!==undefined?doing_:false;this.done=done_!==undefined?done_:false;});D.Ptr.prototype.Do=function(a){var $deferred=[],$err=null,b;try{$deferFrames.push($deferred);b=this;if(b.done){return;}if(b.doing){$panic(new $String("nosync: Do called within f"));}b.doing=true;$deferred.push([(function(){b.doing=false;b.done=true;}),[]]);a();}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};D.prototype.Do=function(a){return this.$val.Do(a);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:I=$funcType([],[],false);J=$ptrType(D);J.methods=[["Do","Do","",$funcType([I],[],false),-1]];D.init([["doing","doing","github.com/gopherjs/gopherjs/nosync",$Bool,""],["done","done","github.com/gopherjs/gopherjs/nosync",$Bool,""]]);}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["strings"]=(function(){var $pkg={},B,A,C,E,D,BY,F,AB,AD,AH,BU;B=$packages["errors"];A=$packages["github.com/gopherjs/gopherjs/js"];C=$packages["io"];E=$packages["unicode"];D=$packages["unicode/utf8"];F=$pkg.IndexByte=function(b,c){return $parseInt(b.indexOf($global.String.fromCharCode(c)))>>0;};AB=function(b){var c,d,e,f,g,h,i,j,k;c=0;d=0;while(d<b.length){c=((((c>>>16<<16)*16777619>>>0)+(c<<16>>>16)*16777619)>>>0)+(b.charCodeAt(d)>>>0)>>>0;d=d+(1)>>0;}e=1;f=16777619;g=e;h=f;i=b.length;while(i>0){if(!(((i&1)===0))){g=(j=h,(((g>>>16<<16)*j>>>0)+(g<<16>>>16)*j)>>>0);}h=(k=h,(((h>>>16<<16)*k>>>0)+(h<<16>>>16)*k)>>>0);i=(i>>$min((1),31))>>0;}return[c,g];};AD=$pkg.Count=function(b,c){var d,e,f,g,h,i,j,k,l,m,n,o;d=0;if(c.length===0){return D.RuneCountInString(b)+1>>0;}else if(c.length===1){e=c.charCodeAt(0);f=0;while(f<b.length){if(b.charCodeAt(f)===e){d=d+(1)>>0;}f=f+(1)>>0;}return d;}else if(c.length>b.length){return 0;}else if(c.length===b.length){if(c===b){return 1;}return 0;}g=AB(c);h=g[0];i=g[1];j=0;k=0;while(k<c.length){j=((((j>>>16<<16)*16777619>>>0)+(j<<16>>>16)*16777619)>>>0)+(b.charCodeAt(k)>>>0)>>>0;k=k+(1)>>0;}l=0;if((j===h)&&b.substring(0,c.length)===c){d=d+(1)>>0;l=c.length;}m=c.length;while(m<b.length){j=(n=16777619,(((j>>>16<<16)*n>>>0)+(j<<16>>>16)*n)>>>0);j=j+((b.charCodeAt(m)>>>0))>>>0;j=j-((o=(b.charCodeAt((m-c.length>>0))>>>0),(((i>>>16<<16)*o>>>0)+(i<<16>>>16)*o)>>>0))>>>0;m=m+(1)>>0;if((j===h)&&l<=(m-c.length>>0)&&b.substring((m-c.length>>0),m)===c){d=d+(1)>>0;l=m;}}return d;};AH=$pkg.Index=function(b,c){var d,e,f,g,h,i,j,k,l;d=c.length;if(d===0){return 0;}else if(d===1){return F(b,c.charCodeAt(0));}else if(d===b.length){if(c===b){return 0;}return-1;}else if(d>b.length){return-1;}e=AB(c);f=e[0];g=e[1];h=0;i=0;while(i<d){h=((((h>>>16<<16)*16777619>>>0)+(h<<16>>>16)*16777619)>>>0)+(b.charCodeAt(i)>>>0)>>>0;i=i+(1)>>0;}if((h===f)&&b.substring(0,d)===c){return 0;}j=d;while(j<b.length){h=(k=16777619,(((h>>>16<<16)*k>>>0)+(h<<16>>>16)*k)>>>0);h=h+((b.charCodeAt(j)>>>0))>>>0;h=h-((l=(b.charCodeAt((j-d>>0))>>>0),(((g>>>16<<16)*l>>>0)+(g<<16>>>16)*l)>>>0))>>>0;j=j+(1)>>0;if((h===f)&&b.substring((j-d>>0),j)===c){return j-d>>0;}}return-1;};BU=$pkg.Replace=function(b,c,d,e){var f,g,h,i,j,k,l,m;if(c===d||(e===0)){return b;}f=AD(b,c);if(f===0){return b;}else if(e<0||f<e){e=f;}g=BY.make((b.length+(e*((d.length-c.length>>0))>>0)>>0));h=0;i=0;j=0;while(j<e){k=i;if(c.length===0){if(j>0){l=D.DecodeRuneInString(b.substring(i));m=l[1];k=k+(m)>>0;}}else{k=k+(AH(b.substring(i),c))>>0;}h=h+($copyString($subslice(g,h),b.substring(i,k)))>>0;h=h+($copyString($subslice(g,h),d))>>0;i=k+c.length>>0;j=j+(1)>>0;}h=h+($copyString($subslice(g,h),b.substring(i)))>>0;return $bytesToString($subslice(g,0,h));};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}BY=$sliceType($Uint8);}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["time"]=(function(){var $pkg={},C,B,E,F,A,D,CW,CX,CY,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DM,DN,DO,DQ,DR,DS,DT,G,AB,AS,BG,BH,BJ,BN,CA,CB,CC,N,Q,R,S,T,X,AA,AN,BI,BK,BS,CD,CE,CF,CH,CL,CS,j,H,I,J,K,L,M,O,P,U,V,W,Y,Z,AC,AD,AE,AF,AG,AH,AJ,AK,AL,AM,AO,AR,AT,AU,AV,BL,BM,BO,BP,BR,BU,BV,BW,BX,BY,BZ,CG;C=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];E=$packages["github.com/gopherjs/gopherjs/nosync"];F=$packages["runtime"];A=$packages["strings"];D=$packages["syscall"];G=$pkg.runtimeTimer=$newType(0,$kindStruct,"time.runtimeTimer","runtimeTimer","time",function(i_,when_,period_,f_,arg_,timeout_,active_){this.$val=this;this.i=i_!==undefined?i_:0;this.when=when_!==undefined?when_:new $Int64(0,0);this.period=period_!==undefined?period_:new $Int64(0,0);this.f=f_!==undefined?f_:$throwNilPointerError;this.arg=arg_!==undefined?arg_:$ifaceNil;this.timeout=timeout_!==undefined?timeout_:null;this.active=active_!==undefined?active_:false;});AB=$pkg.ParseError=$newType(0,$kindStruct,"time.ParseError","ParseError","time",function(Layout_,Value_,LayoutElem_,ValueElem_,Message_){this.$val=this;this.Layout=Layout_!==undefined?Layout_:"";this.Value=Value_!==undefined?Value_:"";this.LayoutElem=LayoutElem_!==undefined?LayoutElem_:"";this.ValueElem=ValueElem_!==undefined?ValueElem_:"";this.Message=Message_!==undefined?Message_:"";});AS=$pkg.Timer=$newType(0,$kindStruct,"time.Timer","Timer","time",function(C_,r_){this.$val=this;this.C=C_!==undefined?C_:DJ.nil;this.r=r_!==undefined?r_:new G.Ptr();});BG=$pkg.Time=$newType(0,$kindStruct,"time.Time","Time","time",function(sec_,nsec_,loc_){this.$val=this;this.sec=sec_!==undefined?sec_:new $Int64(0,0);this.nsec=nsec_!==undefined?nsec_:0;this.loc=loc_!==undefined?loc_:DH.nil;});BH=$pkg.Month=$newType(4,$kindInt,"time.Month","Month","time",null);BJ=$pkg.Weekday=$newType(4,$kindInt,"time.Weekday","Weekday","time",null);BN=$pkg.Duration=$newType(8,$kindInt64,"time.Duration","Duration","time",null);CA=$pkg.Location=$newType(0,$kindStruct,"time.Location","Location","time",function(name_,zone_,tx_,cacheStart_,cacheEnd_,cacheZone_){this.$val=this;this.name=name_!==undefined?name_:"";this.zone=zone_!==undefined?zone_:CX.nil;this.tx=tx_!==undefined?tx_:CY.nil;this.cacheStart=cacheStart_!==undefined?cacheStart_:new $Int64(0,0);this.cacheEnd=cacheEnd_!==undefined?cacheEnd_:new $Int64(0,0);this.cacheZone=cacheZone_!==undefined?cacheZone_:CZ.nil;});CB=$pkg.zone=$newType(0,$kindStruct,"time.zone","zone","time",function(name_,offset_,isDST_){this.$val=this;this.name=name_!==undefined?name_:"";this.offset=offset_!==undefined?offset_:0;this.isDST=isDST_!==undefined?isDST_:false;});CC=$pkg.zoneTrans=$newType(0,$kindStruct,"time.zoneTrans","zoneTrans","time",function(when_,index_,isstd_,isutc_){this.$val=this;this.when=when_!==undefined?when_:new $Int64(0,0);this.index=index_!==undefined?index_:0;this.isstd=isstd_!==undefined?isstd_:false;this.isutc=isutc_!==undefined?isutc_:false;});H=function(){var k,l,m,n;k=new($global.Date)();l=$internalize(k,$String);m=A.IndexByte(l,40);n=A.IndexByte(l,41);if((m===-1)||(n===-1)){CE.name="UTC";return;}CE.name=l.substring((m+1>>0),n);CE.zone=new CX([new CB.Ptr(CE.name,($parseInt(k.getTimezoneOffset())>>0)*-60>>0,false)]);};I=function(){return $mul64($internalize(new($global.Date)().getTime(),$Int64),new $Int64(0,1000000));};J=function(){var k=new $Int64(0,0),l=0,m,n,o,p;m=I();n=$div64(m,new $Int64(0,1000000000),false);o=((p=$div64(m,new $Int64(0,1000000000),true),p.$low+((p.$high>>31)*4294967296))>>0);k=n;l=o;return[k,l];};K=$pkg.Sleep=function(k,$b){var $this=this,$args=arguments,$r,$s=0,l,m,n;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:l=new DB(0);$global.setTimeout($externalize((function(){$close(l);}),DC),((m=$div64(k,new BN(0,1000000),false),m.$low+((m.$high>>31)*4294967296))>>0));n=$recv(l,$BLOCKING);$s=1;case 1:if(n&&n.$blocking){n=n();}n[0];case-1:}return;}};$f.$blocking=true;return $f;};L=function(k){var l,m,n;k.active=true;n=$div64(((l=k.when,m=I(),new $Int64(l.$high-m.$high,l.$low-m.$low))),new $Int64(0,10000
|
||
|
$packages["os"]=(function(){var $pkg={},E,A,B,F,H,G,C,D,CX,CY,CZ,DB,DC,DD,DE,DK,DQ,DR,DS,DW,DX,DZ,W,X,AQ,BG,BH,BJ,CS,CT,CV,AO,AV,BV,CP,I,Y,AA,AD,AX,AY,BB,BI,BK,BN,BQ,BX,BY,CD,CJ,CL,CM,CQ;E=$packages["errors"];A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["io"];F=$packages["runtime"];H=$packages["sync"];G=$packages["sync/atomic"];C=$packages["syscall"];D=$packages["time"];W=$pkg.PathError=$newType(0,$kindStruct,"os.PathError","PathError","os",function(Op_,Path_,Err_){this.$val=this;this.Op=Op_!==undefined?Op_:"";this.Path=Path_!==undefined?Path_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});X=$pkg.SyscallError=$newType(0,$kindStruct,"os.SyscallError","SyscallError","os",function(Syscall_,Err_){this.$val=this;this.Syscall=Syscall_!==undefined?Syscall_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});AQ=$pkg.LinkError=$newType(0,$kindStruct,"os.LinkError","LinkError","os",function(Op_,Old_,New_,Err_){this.$val=this;this.Op=Op_!==undefined?Op_:"";this.Old=Old_!==undefined?Old_:"";this.New=New_!==undefined?New_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});BG=$pkg.File=$newType(0,$kindStruct,"os.File","File","os",function(file_){this.$val=this;this.file=file_!==undefined?file_:DQ.nil;});BH=$pkg.file=$newType(0,$kindStruct,"os.file","file","os",function(fd_,name_,dirinfo_,nepipe_){this.$val=this;this.fd=fd_!==undefined?fd_:0;this.name=name_!==undefined?name_:"";this.dirinfo=dirinfo_!==undefined?dirinfo_:CY.nil;this.nepipe=nepipe_!==undefined?nepipe_:0;});BJ=$pkg.dirInfo=$newType(0,$kindStruct,"os.dirInfo","dirInfo","os",function(buf_,nbuf_,bufp_){this.$val=this;this.buf=buf_!==undefined?buf_:CZ.nil;this.nbuf=nbuf_!==undefined?nbuf_:0;this.bufp=bufp_!==undefined?bufp_:0;});CS=$pkg.FileInfo=$newType(8,$kindInterface,"os.FileInfo","FileInfo","os",null);CT=$pkg.FileMode=$newType(4,$kindUint32,"os.FileMode","FileMode","os",null);CV=$pkg.fileStat=$newType(0,$kindStruct,"os.fileStat","fileStat","os",function(name_,size_,mode_,modTime_,sys_){this.$val=this;this.name=name_!==undefined?name_:"";this.size=size_!==undefined?size_:new $Int64(0,0);this.mode=mode_!==undefined?mode_:0;this.modTime=modTime_!==undefined?modTime_:new D.Time.Ptr();this.sys=sys_!==undefined?sys_:$ifaceNil;});I=function(){var b,c,d,e;b=$global.process;if(b===undefined){return new CX(["browser"]);}c=b.argv;d=CX.make(($parseInt(c.length)-1>>0));e=0;while(e<($parseInt(c.length)-1>>0)){(e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]=$internalize(c[(e+1>>0)],$String);e=e+(1)>>0;}return d;};BG.Ptr.prototype.readdirnames=function(b){var c=CX.nil,d=$ifaceNil,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=this;if(e.file.dirinfo===CY.nil){e.file.dirinfo=new BJ.Ptr();e.file.dirinfo.buf=CZ.make(4096);}f=e.file.dirinfo;g=b;if(g<=0){g=100;b=-1;}c=CX.make(0,g);while(!((b===0))){if(f.bufp>=f.nbuf){f.bufp=0;h=$ifaceNil;j=C.ReadDirent(e.file.fd,f.buf);i=AX(j[0],j[1]);f.nbuf=i[0];h=i[1];if(!($interfaceIsEqual(h,$ifaceNil))){k=c;l=Y("readdirent",h);c=k;d=l;return[c,d];}if(f.nbuf<=0){break;}}m=0;n=0;o=m;p=n;q=C.ParseDirent($subslice(f.buf,f.bufp,f.nbuf),b,c);o=q[0];p=q[1];c=q[2];f.bufp=f.bufp+(o)>>0;b=b-(p)>>0;}if(b>=0&&(c.$length===0)){r=c;s=B.EOF;c=r;d=s;return[c,d];}t=c;u=$ifaceNil;c=t;d=u;return[c,d];};BG.prototype.readdirnames=function(b){return this.$val.readdirnames(b);};BG.Ptr.prototype.Readdir=function(b){var c=DB.nil,d=$ifaceNil,e,f,g,h;e=this;if(e===DC.nil){f=DB.nil;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.readdir(b);c=h[0];d=h[1];return[c,d];};BG.prototype.Readdir=function(b){return this.$val.Readdir(b);};BG.Ptr.prototype.Readdirnames=function(b){var c=CX.nil,d=$ifaceNil,e,f,g,h;e=this;if(e===DC.nil){f=CX.nil;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.readdirnames(b);c=h[0];d=h[1];return[c,d];};BG.prototype.Readdirnames=function(b){return this.$val.Readdirnames(b);};W.Ptr.prototype.Error=function(){var b;b=this;return b.Op+" "+b.Path+": "+b.Err.Error();};W.prototype.Error=function(){return this.$val.Error();};X.Ptr.prototype.Error=function(){var b;b=this;return b.Syscall+": "+b.Err.Error();};X.prototype.Error=function(){return this.$v
|
||
|
$packages["strconv"]=(function(){var $pkg={},B,A,C,CI,CJ,CK,CL,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,Z,AD,AI,AP,AY,G,AE,AJ,AK,AL,AQ,AR,BD,BE,BF,BG,BM,AA,AB,AC,AF,AG,AH,AM,AN,AO,AT,AU,AV,AW,AX,AZ,BA,BB,BC,BI,BJ,BN,BO,BP,BR,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE;B=$packages["errors"];A=$packages["math"];C=$packages["unicode/utf8"];Z=$pkg.decimal=$newType(0,$kindStruct,"strconv.decimal","decimal","strconv",function(d_,nd_,dp_,neg_,trunc_){this.$val=this;this.d=d_!==undefined?d_:CU.zero();this.nd=nd_!==undefined?nd_:0;this.dp=dp_!==undefined?dp_:0;this.neg=neg_!==undefined?neg_:false;this.trunc=trunc_!==undefined?trunc_:false;});AD=$pkg.leftCheat=$newType(0,$kindStruct,"strconv.leftCheat","leftCheat","strconv",function(delta_,cutoff_){this.$val=this;this.delta=delta_!==undefined?delta_:0;this.cutoff=cutoff_!==undefined?cutoff_:"";});AI=$pkg.extFloat=$newType(0,$kindStruct,"strconv.extFloat","extFloat","strconv",function(mant_,exp_,neg_){this.$val=this;this.mant=mant_!==undefined?mant_:new $Uint64(0,0);this.exp=exp_!==undefined?exp_:0;this.neg=neg_!==undefined?neg_:false;});AP=$pkg.floatInfo=$newType(0,$kindStruct,"strconv.floatInfo","floatInfo","strconv",function(mantbits_,expbits_,bias_){this.$val=this;this.mantbits=mantbits_!==undefined?mantbits_:0;this.expbits=expbits_!==undefined?expbits_:0;this.bias=bias_!==undefined?bias_:0;});AY=$pkg.decimalSlice=$newType(0,$kindStruct,"strconv.decimalSlice","decimalSlice","strconv",function(d_,nd_,dp_,neg_){this.$val=this;this.d=d_!==undefined?d_:CL.nil;this.nd=nd_!==undefined?nd_:0;this.dp=dp_!==undefined?dp_:0;this.neg=neg_!==undefined?neg_:false;});Z.Ptr.prototype.String=function(){var a,b,c,d;a=this;b=10+a.nd>>0;if(a.dp>0){b=b+(a.dp)>>0;}if(a.dp<0){b=b+(-a.dp)>>0;}c=CL.make(b);d=0;if(a.nd===0){return"0";}else if(a.dp<=0){(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=48;d=d+(1)>>0;(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=46;d=d+(1)>>0;d=d+(AA($subslice(c,d,(d+-a.dp>>0))))>>0;d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),0,a.nd)))>>0;}else if(a.dp<a.nd){d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),0,a.dp)))>>0;(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=46;d=d+(1)>>0;d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),a.dp,a.nd)))>>0;}else{d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),0,a.nd)))>>0;d=d+(AA($subslice(c,d,((d+a.dp>>0)-a.nd>>0))))>>0;}return $bytesToString($subslice(c,0,d));};Z.prototype.String=function(){return this.$val.String();};AA=function(a){var b,c,d;b=a;c=0;while(c<b.$length){d=c;(d<0||d>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+d]=48;c++;}return a.$length;};AB=function(a){var b,c;while(a.nd>0&&((b=a.d,c=a.nd-1>>0,((c<0||c>=b.length)?$throwRuntimeError("index out of range"):b[c]))===48)){a.nd=a.nd-(1)>>0;}if(a.nd===0){a.dp=0;}};Z.Ptr.prototype.Assign=function(a){var b,c,d,e,f,g,h;b=this;c=$clone(CN.zero(),CN);d=0;while((a.$high>0||(a.$high===0&&a.$low>0))){e=$div64(a,new $Uint64(0,10),false);a=(f=$mul64(new $Uint64(0,10),e),new $Uint64(a.$high-f.$high,a.$low-f.$low));(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(new $Uint64(a.$high+0,a.$low+48).$low<<24>>>24);d=d+(1)>>0;a=e;}b.nd=0;d=d-(1)>>0;while(d>=0){(g=b.d,h=b.nd,(h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h]=((d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]));b.nd=b.nd+(1)>>0;d=d-(1)>>0;}b.dp=b.nd;AB(b);};Z.prototype.Assign=function(a){return this.$val.Assign(a);};AC=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;c=0;d=0;e=0;while(((e>>$min(b,31))>>0)===0){if(c>=a.nd){if(e===0){a.nd=0;return;}while(((e>>$min(b,31))>>0)===0){e=e*10>>0;c=c+(1)>>0;}break;}g=((f=a.d,((c<0||c>=f.length)?$throwRuntimeError("index out of range"):f[c]))>>0);e=((e*10>>0)+g>>0)-48>>0;c=c+(1)>>0;}a.dp=a.dp-((c-1>>0))>>0;while(c<a.nd){i=((h=a.d,((c<0||c>=h.length)?$throwRuntimeError("index out of range"):h[c]))>>0);j=(e>>$min(b,31))>>0;e=e-(((k=b,k<32?(j<<k):0)>>0))>>0;(l=a.d,(d<0||d>=l.length)?$throwRuntimeError("index ou
|
||
|
$packages["reflect"]=(function(){var $pkg={},B,E,A,C,D,FF,FG,FO,FP,FQ,FR,FS,FT,FU,FV,FW,FX,FY,FZ,GA,GB,GC,GE,GF,GG,GH,GI,GJ,GO,GQ,GR,GS,GU,GV,GW,GX,GY,GZ,HA,HB,HC,HD,HF,HG,HH,HI,AF,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BS,BT,BU,CT,CU,CX,CZ,F,BR,DG,G,H,I,J,K,L,M,N,O,P,T,U,V,W,Y,AC,AD,AE,AG,AH,AI,AJ,AK,AM,AN,AO,AP,AQ,BW,BY,BZ,CA,CL,CQ,DH,DZ,EB,EC,ED,EE,EF,EG,EH,EI,EJ,EK,EL,EM,EN,EO,EP,EQ,ER,ES,ET,EU,EV,EW;B=$packages["github.com/gopherjs/gopherjs/js"];E=$packages["math"];A=$packages["runtime"];C=$packages["strconv"];D=$packages["sync"];AF=$pkg.mapIter=$newType(0,$kindStruct,"reflect.mapIter","mapIter","reflect",function(t_,m_,keys_,i_){this.$val=this;this.t=t_!==undefined?t_:$ifaceNil;this.m=m_!==undefined?m_:null;this.keys=keys_!==undefined?keys_:null;this.i=i_!==undefined?i_:0;});AZ=$pkg.Type=$newType(8,$kindInterface,"reflect.Type","Type","reflect",null);BA=$pkg.Kind=$newType(4,$kindUint,"reflect.Kind","Kind","reflect",null);BB=$pkg.rtype=$newType(0,$kindStruct,"reflect.rtype","rtype","reflect",function(size_,hash_,_$2_,align_,fieldAlign_,kind_,alg_,gc_,string_,uncommonType_,ptrToThis_,zero_){this.$val=this;this.size=size_!==undefined?size_:0;this.hash=hash_!==undefined?hash_:0;this._$2=_$2_!==undefined?_$2_:0;this.align=align_!==undefined?align_:0;this.fieldAlign=fieldAlign_!==undefined?fieldAlign_:0;this.kind=kind_!==undefined?kind_:0;this.alg=alg_!==undefined?alg_:FP.nil;this.gc=gc_!==undefined?gc_:FQ.zero();this.string=string_!==undefined?string_:FR.nil;this.uncommonType=uncommonType_!==undefined?uncommonType_:FS.nil;this.ptrToThis=ptrToThis_!==undefined?ptrToThis_:FF.nil;this.zero=zero_!==undefined?zero_:0;});BC=$pkg.typeAlg=$newType(0,$kindStruct,"reflect.typeAlg","typeAlg","reflect",function(hash_,equal_){this.$val=this;this.hash=hash_!==undefined?hash_:$throwNilPointerError;this.equal=equal_!==undefined?equal_:$throwNilPointerError;});BD=$pkg.method=$newType(0,$kindStruct,"reflect.method","method","reflect",function(name_,pkgPath_,mtyp_,typ_,ifn_,tfn_){this.$val=this;this.name=name_!==undefined?name_:FR.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FR.nil;this.mtyp=mtyp_!==undefined?mtyp_:FF.nil;this.typ=typ_!==undefined?typ_:FF.nil;this.ifn=ifn_!==undefined?ifn_:0;this.tfn=tfn_!==undefined?tfn_:0;});BE=$pkg.uncommonType=$newType(0,$kindStruct,"reflect.uncommonType","uncommonType","reflect",function(name_,pkgPath_,methods_){this.$val=this;this.name=name_!==undefined?name_:FR.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FR.nil;this.methods=methods_!==undefined?methods_:FT.nil;});BF=$pkg.ChanDir=$newType(4,$kindInt,"reflect.ChanDir","ChanDir","reflect",null);BG=$pkg.arrayType=$newType(0,$kindStruct,"reflect.arrayType","arrayType","reflect",function(rtype_,elem_,slice_,len_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BB.Ptr();this.elem=elem_!==undefined?elem_:FF.nil;this.slice=slice_!==undefined?slice_:FF.nil;this.len=len_!==undefined?len_:0;});BH=$pkg.chanType=$newType(0,$kindStruct,"reflect.chanType","chanType","reflect",function(rtype_,elem_,dir_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BB.Ptr();this.elem=elem_!==undefined?elem_:FF.nil;this.dir=dir_!==undefined?dir_:0;});BI=$pkg.funcType=$newType(0,$kindStruct,"reflect.funcType","funcType","reflect",function(rtype_,dotdotdot_,in$2_,out_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BB.Ptr();this.dotdotdot=dotdotdot_!==undefined?dotdotdot_:false;this.in$2=in$2_!==undefined?in$2_:FU.nil;this.out=out_!==undefined?out_:FU.nil;});BJ=$pkg.imethod=$newType(0,$kindStruct,"reflect.imethod","imethod","reflect",function(name_,pkgPath_,typ_){this.$val=this;this.name=name_!==undefined?name_:FR.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FR.nil;this.typ=typ_!==undefined?typ_:FF.nil;});BK=$pkg.interfaceType=$newType(0,$kindStruct,"reflect.interfaceType","interfaceType","reflect",function(rtype_,methods_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BB.Ptr();this.methods=methods_!==undefined?methods_:FV.nil;});BL=$pkg.mapType=$newType(0,$kindStruct,"reflect.mapType","mapType","reflect",function(rtype_,key
|
||
|
$packages["fmt"]=(function(){var $pkg={},D,E,A,F,G,B,H,C,CE,CF,CG,CH,CI,CJ,CK,CN,CO,DI,DJ,DK,L,M,AF,AG,AH,AI,AJ,AK,BE,BR,BS,BT,I,J,N,O,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AL,AZ,BA,BB,BU,BY,CA,CB,K,P,AM,AP,AQ,AT,AW,AX,AY,BC,BD,BV,BW,CC;D=$packages["errors"];E=$packages["io"];A=$packages["math"];F=$packages["os"];G=$packages["reflect"];B=$packages["strconv"];H=$packages["sync"];C=$packages["unicode/utf8"];L=$pkg.fmtFlags=$newType(0,$kindStruct,"fmt.fmtFlags","fmtFlags","fmt",function(widPresent_,precPresent_,minus_,plus_,sharp_,space_,unicode_,uniQuote_,zero_,plusV_,sharpV_){this.$val=this;this.widPresent=widPresent_!==undefined?widPresent_:false;this.precPresent=precPresent_!==undefined?precPresent_:false;this.minus=minus_!==undefined?minus_:false;this.plus=plus_!==undefined?plus_:false;this.sharp=sharp_!==undefined?sharp_:false;this.space=space_!==undefined?space_:false;this.unicode=unicode_!==undefined?unicode_:false;this.uniQuote=uniQuote_!==undefined?uniQuote_:false;this.zero=zero_!==undefined?zero_:false;this.plusV=plusV_!==undefined?plusV_:false;this.sharpV=sharpV_!==undefined?sharpV_:false;});M=$pkg.fmt=$newType(0,$kindStruct,"fmt.fmt","fmt","fmt",function(intbuf_,buf_,wid_,prec_,fmtFlags_){this.$val=this;this.intbuf=intbuf_!==undefined?intbuf_:DI.zero();this.buf=buf_!==undefined?buf_:CJ.nil;this.wid=wid_!==undefined?wid_:0;this.prec=prec_!==undefined?prec_:0;this.fmtFlags=fmtFlags_!==undefined?fmtFlags_:new L.Ptr();});AF=$pkg.State=$newType(8,$kindInterface,"fmt.State","State","fmt",null);AG=$pkg.Formatter=$newType(8,$kindInterface,"fmt.Formatter","Formatter","fmt",null);AH=$pkg.Stringer=$newType(8,$kindInterface,"fmt.Stringer","Stringer","fmt",null);AI=$pkg.GoStringer=$newType(8,$kindInterface,"fmt.GoStringer","GoStringer","fmt",null);AJ=$pkg.buffer=$newType(12,$kindSlice,"fmt.buffer","buffer","fmt",null);AK=$pkg.pp=$newType(0,$kindStruct,"fmt.pp","pp","fmt",function(n_,panicking_,erroring_,buf_,arg_,value_,reordered_,goodArgNum_,runeBuf_,fmt_){this.$val=this;this.n=n_!==undefined?n_:0;this.panicking=panicking_!==undefined?panicking_:false;this.erroring=erroring_!==undefined?erroring_:false;this.buf=buf_!==undefined?buf_:AJ.nil;this.arg=arg_!==undefined?arg_:$ifaceNil;this.value=value_!==undefined?value_:new G.Value.Ptr();this.reordered=reordered_!==undefined?reordered_:false;this.goodArgNum=goodArgNum_!==undefined?goodArgNum_:false;this.runeBuf=runeBuf_!==undefined?runeBuf_:CO.zero();this.fmt=fmt_!==undefined?fmt_:new M.Ptr();});BE=$pkg.runeUnreader=$newType(8,$kindInterface,"fmt.runeUnreader","runeUnreader","fmt",null);BR=$pkg.scanError=$newType(0,$kindStruct,"fmt.scanError","scanError","fmt",function(err_){this.$val=this;this.err=err_!==undefined?err_:$ifaceNil;});BS=$pkg.ss=$newType(0,$kindStruct,"fmt.ss","ss","fmt",function(rr_,buf_,peekRune_,prevRune_,count_,atEOF_,ssave_){this.$val=this;this.rr=rr_!==undefined?rr_:$ifaceNil;this.buf=buf_!==undefined?buf_:AJ.nil;this.peekRune=peekRune_!==undefined?peekRune_:0;this.prevRune=prevRune_!==undefined?prevRune_:0;this.count=count_!==undefined?count_:0;this.atEOF=atEOF_!==undefined?atEOF_:false;this.ssave=ssave_!==undefined?ssave_:new BT.Ptr();});BT=$pkg.ssave=$newType(0,$kindStruct,"fmt.ssave","ssave","fmt",function(validSave_,nlIsEnd_,nlIsSpace_,argLimit_,limit_,maxWid_){this.$val=this;this.validSave=validSave_!==undefined?validSave_:false;this.nlIsEnd=nlIsEnd_!==undefined?nlIsEnd_:false;this.nlIsSpace=nlIsSpace_!==undefined?nlIsSpace_:false;this.argLimit=argLimit_!==undefined?argLimit_:0;this.limit=limit_!==undefined?limit_:0;this.maxWid=maxWid_!==undefined?maxWid_:0;});K=function(){var a;a=0;while(a<65){(a<0||a>=I.$length)?$throwRuntimeError("index out of range"):I.$array[I.$offset+a]=48;(a<0||a>=J.$length)?$throwRuntimeError("index out of range"):J.$array[J.$offset+a]=32;a=a+(1)>>0;}};M.Ptr.prototype.clearflags=function(){var a;a=this;$copy(a.fmtFlags,new L.Ptr(false,false,false,false,false,false,false,false,false,false,false),L);};M.prototype.clearflags=function(){return this.$val.clearflags();};M.Ptr.prototype.init=function(a){var b;b=this;b.buf=a;b.clearfla
|
||
|
$packages["github.com/gopherjs/webgl"]=(function(){var $pkg={},A,B,G,H,I,J,K,L,M,C,E,D,F;A=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg.ContextAttributes=$newType(0,$kindStruct,"webgl.ContextAttributes","ContextAttributes","github.com/gopherjs/webgl",function(Alpha_,Depth_,Stencil_,Antialias_,PremultipliedAlpha_,PreserveDrawingBuffer_){this.$val=this;this.Alpha=Alpha_!==undefined?Alpha_:false;this.Depth=Depth_!==undefined?Depth_:false;this.Stencil=Stencil_!==undefined?Stencil_:false;this.Antialias=Antialias_!==undefined?Antialias_:false;this.PremultipliedAlpha=PremultipliedAlpha_!==undefined?PremultipliedAlpha_:false;this.PreserveDrawingBuffer=PreserveDrawingBuffer_!==undefined?PreserveDrawingBuffer_:false;});E=$pkg.Context=$newType(0,$kindStruct,"webgl.Context","Context","github.com/gopherjs/webgl",function(Object_,ARRAY_BUFFER_,ARRAY_BUFFER_BINDING_,ATTACHED_SHADERS_,BACK_,BLEND_,BLEND_COLOR_,BLEND_DST_ALPHA_,BLEND_DST_RGB_,BLEND_EQUATION_,BLEND_EQUATION_ALPHA_,BLEND_EQUATION_RGB_,BLEND_SRC_ALPHA_,BLEND_SRC_RGB_,BLUE_BITS_,BOOL_,BOOL_VEC2_,BOOL_VEC3_,BOOL_VEC4_,BROWSER_DEFAULT_WEBGL_,BUFFER_SIZE_,BUFFER_USAGE_,BYTE_,CCW_,CLAMP_TO_EDGE_,COLOR_ATTACHMENT0_,COLOR_BUFFER_BIT_,COLOR_CLEAR_VALUE_,COLOR_WRITEMASK_,COMPILE_STATUS_,COMPRESSED_TEXTURE_FORMATS_,CONSTANT_ALPHA_,CONSTANT_COLOR_,CONTEXT_LOST_WEBGL_,CULL_FACE_,CULL_FACE_MODE_,CURRENT_PROGRAM_,CURRENT_VERTEX_ATTRIB_,CW_,DECR_,DECR_WRAP_,DELETE_STATUS_,DEPTH_ATTACHMENT_,DEPTH_BITS_,DEPTH_BUFFER_BIT_,DEPTH_CLEAR_VALUE_,DEPTH_COMPONENT_,DEPTH_COMPONENT16_,DEPTH_FUNC_,DEPTH_RANGE_,DEPTH_STENCIL_,DEPTH_STENCIL_ATTACHMENT_,DEPTH_TEST_,DEPTH_WRITEMASK_,DITHER_,DONT_CARE_,DST_ALPHA_,DST_COLOR_,DYNAMIC_DRAW_,ELEMENT_ARRAY_BUFFER_,ELEMENT_ARRAY_BUFFER_BINDING_,EQUAL_,FASTEST_,FLOAT_,FLOAT_MAT2_,FLOAT_MAT3_,FLOAT_MAT4_,FLOAT_VEC2_,FLOAT_VEC3_,FLOAT_VEC4_,FRAGMENT_SHADER_,FRAMEBUFFER_,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_,FRAMEBUFFER_BINDING_,FRAMEBUFFER_COMPLETE_,FRAMEBUFFER_INCOMPLETE_ATTACHMENT_,FRAMEBUFFER_INCOMPLETE_DIMENSIONS_,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_,FRAMEBUFFER_UNSUPPORTED_,FRONT_,FRONT_AND_BACK_,FRONT_FACE_,FUNC_ADD_,FUNC_REVERSE_SUBTRACT_,FUNC_SUBTRACT_,GENERATE_MIPMAP_HINT_,GEQUAL_,GREATER_,GREEN_BITS_,HIGH_FLOAT_,HIGH_INT_,INCR_,INCR_WRAP_,INFO_LOG_LENGTH_,INT_,INT_VEC2_,INT_VEC3_,INT_VEC4_,INVALID_ENUM_,INVALID_FRAMEBUFFER_OPERATION_,INVALID_OPERATION_,INVALID_VALUE_,INVERT_,KEEP_,LEQUAL_,LESS_,LINEAR_,LINEAR_MIPMAP_LINEAR_,LINEAR_MIPMAP_NEAREST_,LINES_,LINE_LOOP_,LINE_STRIP_,LINE_WIDTH_,LINK_STATUS_,LOW_FLOAT_,LOW_INT_,LUMINANCE_,LUMINANCE_ALPHA_,MAX_COMBINED_TEXTURE_IMAGE_UNITS_,MAX_CUBE_MAP_TEXTURE_SIZE_,MAX_FRAGMENT_UNIFORM_VECTORS_,MAX_RENDERBUFFER_SIZE_,MAX_TEXTURE_IMAGE_UNITS_,MAX_TEXTURE_SIZE_,MAX_VARYING_VECTORS_,MAX_VERTEX_ATTRIBS_,MAX_VERTEX_TEXTURE_IMAGE_UNITS_,MAX_VERTEX_UNIFORM_VECTORS_,MAX_VIEWPORT_DIMS_,MEDIUM_FLOAT_,MEDIUM_INT_,MIRRORED_REPEAT_,NEAREST_,NEAREST_MIPMAP_LINEAR_,NEAREST_MIPMAP_NEAREST_,NEVER_,NICEST_,NONE_,NOTEQUAL_,NO_ERROR_,NUM_COMPRESSED_TEXTURE_FORMATS_,ONE_,ONE_MINUS_CONSTANT_ALPHA_,ONE_MINUS_CONSTANT_COLOR_,ONE_MINUS_DST_ALPHA_,ONE_MINUS_DST_COLOR_,ONE_MINUS_SRC_ALPHA_,ONE_MINUS_SRC_COLOR_,OUT_OF_MEMORY_,PACK_ALIGNMENT_,POINTS_,POLYGON_OFFSET_FACTOR_,POLYGON_OFFSET_FILL_,POLYGON_OFFSET_UNITS_,RED_BITS_,RENDERBUFFER_,RENDERBUFFER_ALPHA_SIZE_,RENDERBUFFER_BINDING_,RENDERBUFFER_BLUE_SIZE_,RENDERBUFFER_DEPTH_SIZE_,RENDERBUFFER_GREEN_SIZE_,RENDERBUFFER_HEIGHT_,RENDERBUFFER_INTERNAL_FORMAT_,RENDERBUFFER_RED_SIZE_,RENDERBUFFER_STENCIL_SIZE_,RENDERBUFFER_WIDTH_,RENDERER_,REPEAT_,REPLACE_,RGB_,RGB5_A1_,RGB565_,RGBA_,RGBA4_,SAMPLER_2D_,SAMPLER_CUBE_,SAMPLES_,SAMPLE_ALPHA_TO_COVERAGE_,SAMPLE_BUFFERS_,SAMPLE_COVERAGE_,SAMPLE_COVERAGE_INVERT_,SAMPLE_COVERAGE_VALUE_,SCISSOR_BOX_,SCISSOR_TEST_,SHADER_COMPILER_,SHADER_SOURCE_LENGTH_,SHADER_TYPE_,SHADING_LANGUAGE_VERSION_,SHORT_,SRC_ALPHA_,SRC_ALPHA_SATURATE_,SRC_COLOR_,STATIC_DRAW_,STENCIL_ATTACHMENT_,STENCIL_BACK_FAIL_,STENCIL_BACK_
|
||
|
$packages["github.com/hajimehoshi/ebiten/internal/opengl"]=(function(){var $pkg={},A,B,C,D,U,V,W,X,Y,Z,E,F,G,H,I,K,P,Q,R,S,T,M,N,O,a,b,c,d,L;A=$packages["errors"];B=$packages["fmt"];C=$packages["github.com/gopherjs/gopherjs/js"];D=$packages["github.com/gopherjs/webgl"];E=$pkg.Texture=$newType(8,$kindInterface,"opengl.Texture","Texture","github.com/hajimehoshi/ebiten/internal/opengl",null);F=$pkg.Framebuffer=$newType(8,$kindInterface,"opengl.Framebuffer","Framebuffer","github.com/hajimehoshi/ebiten/internal/opengl",null);G=$pkg.Shader=$newType(8,$kindInterface,"opengl.Shader","Shader","github.com/hajimehoshi/ebiten/internal/opengl",null);H=$pkg.Program=$newType(8,$kindInterface,"opengl.Program","Program","github.com/hajimehoshi/ebiten/internal/opengl",null);I=$pkg.UniformLocation=$newType(8,$kindInterface,"opengl.UniformLocation","UniformLocation","github.com/hajimehoshi/ebiten/internal/opengl",null);K=$pkg.context=$newType(0,$kindStruct,"opengl.context","context","github.com/hajimehoshi/ebiten/internal/opengl",function(gl_){this.$val=this;this.gl=gl_!==undefined?gl_:X.nil;});P=$pkg.FilterType=$newType(4,$kindInt,"opengl.FilterType","FilterType","github.com/hajimehoshi/ebiten/internal/opengl",null);Q=$pkg.ShaderType=$newType(4,$kindInt,"opengl.ShaderType","ShaderType","github.com/hajimehoshi/ebiten/internal/opengl",null);R=$pkg.BufferType=$newType(4,$kindInt,"opengl.BufferType","BufferType","github.com/hajimehoshi/ebiten/internal/opengl",null);S=$pkg.BufferUsageType=$newType(4,$kindInt,"opengl.BufferUsageType","BufferUsageType","github.com/hajimehoshi/ebiten/internal/opengl",null);T=$pkg.Context=$newType(0,$kindStruct,"opengl.Context","Context","github.com/hajimehoshi/ebiten/internal/opengl",function(Nearest_,Linear_,VertexShader_,FragmentShader_,ArrayBuffer_,ElementArrayBuffer_,DynamicDraw_,StaticDraw_,context_){this.$val=this;this.Nearest=Nearest_!==undefined?Nearest_:0;this.Linear=Linear_!==undefined?Linear_:0;this.VertexShader=VertexShader_!==undefined?VertexShader_:0;this.FragmentShader=FragmentShader_!==undefined?FragmentShader_:0;this.ArrayBuffer=ArrayBuffer_!==undefined?ArrayBuffer_:0;this.ElementArrayBuffer=ElementArrayBuffer_!==undefined?ElementArrayBuffer_:0;this.DynamicDraw=DynamicDraw_!==undefined?DynamicDraw_:0;this.StaticDraw=StaticDraw_!==undefined?StaticDraw_:0;this.context=context_!==undefined?context_:new K.Ptr();});L=$pkg.NewContext=function(e){var f;f=new T.Ptr((($parseInt(e.Object.NEAREST)>>0)>>0),(($parseInt(e.Object.LINEAR)>>0)>>0),(($parseInt(e.Object.VERTEX_SHADER)>>0)>>0),(($parseInt(e.Object.FRAGMENT_SHADER)>>0)>>0),(($parseInt(e.Object.ARRAY_BUFFER)>>0)>>0),(($parseInt(e.Object.ELEMENT_ARRAY_BUFFER)>>0)>>0),(($parseInt(e.Object.DYNAMIC_DRAW)>>0)>>0),(($parseInt(e.Object.STATIC_DRAW)>>0)>>0),new K.Ptr());f.context.gl=e;f.init();return f;};T.Ptr.prototype.init=function(){var e,f;e=this;f=e.context.gl;f.Enable($parseInt(f.Object.BLEND)>>0);f.BlendFunc($parseInt(f.Object.ONE)>>0,$parseInt(f.Object.ONE_MINUS_SRC_ALPHA)>>0);};T.prototype.init=function(){return this.$val.init();};T.Ptr.prototype.NewTexture=function(e,f,g,h){var i,j,k,l;i=this;j=i.context.gl;k=j.CreateTexture();if(k===null){return[$ifaceNil,A.New("glGenTexture failed")];}j.PixelStorei($parseInt(j.Object.UNPACK_ALIGNMENT)>>0,4);j.BindTexture($parseInt(j.Object.TEXTURE_2D)>>0,k);j.TexParameteri($parseInt(j.Object.TEXTURE_2D)>>0,$parseInt(j.Object.TEXTURE_MAG_FILTER)>>0,(h>>0));j.TexParameteri($parseInt(j.Object.TEXTURE_2D)>>0,$parseInt(j.Object.TEXTURE_MIN_FILTER)>>0,(h>>0));l=$ifaceNil;if(!(g===U.nil)){l=g;}j.Object.texImage2D($parseInt(j.Object.TEXTURE_2D)>>0,0,$parseInt(j.Object.RGBA)>>0,e,f,0,$parseInt(j.Object.RGBA)>>0,$parseInt(j.Object.UNSIGNED_BYTE)>>0,$externalize(l,$emptyInterface));return[k,$ifaceNil];};T.prototype.NewTexture=function(e,f,g,h){return this.$val.NewTexture(e,f,g,h);};T.Ptr.prototype.TexturePixels=function(e,f,g){var h,i,j,k;h=this;i=h.context.gl;i.Flush();j=new($global.Uint8Array)((4*f>>0)*g>>0);i.BindTexture($parseInt(i.Object.TEXTURE_2D)>>0,e);i.ReadPixels(0,0,f,g,$parseInt(i.Object.RGBA)>>0,$parseInt(i.Obje
|
||
|
$packages["github.com/hajimehoshi/ebiten/internal/graphics/internal/shader"]=(function(){var $pkg={},A,B,O,P,Q,R,S,F,H,J,N,a,b,C,G,I,K,M;A=$packages["github.com/hajimehoshi/ebiten/internal/opengl"];B=$packages["strings"];C=function(c){return new O([(c.nilCheck,c[0])[0],(c.nilCheck,c[1])[0],(c.nilCheck,c[2])[0],(c.nilCheck,c[3])[0],(c.nilCheck,c[0])[1],(c.nilCheck,c[1])[1],(c.nilCheck,c[2])[1],(c.nilCheck,c[3])[1],(c.nilCheck,c[0])[2],(c.nilCheck,c[1])[2],(c.nilCheck,c[2])[2],(c.nilCheck,c[3])[2],(c.nilCheck,c[0])[3],(c.nilCheck,c[1])[3],(c.nilCheck,c[2])[3],(c.nilCheck,c[3])[3]]);};G=$pkg.DrawTexture=function(c,d,e,f,g,h){var $deferred=[],$err=null,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;try{$deferFrames.push($deferred);if(!F){i=I(c);if(!($interfaceIsEqual(i,$ifaceNil))){return i;}F=true;}if(f.Len()===0){return $ifaceNil;}j=K(c,C(e),g,h);c.BindTexture(d);c.EnableVertexAttribArray(j,"vertex");c.EnableVertexAttribArray(j,"tex_coord");$deferred.push([(function(){c.DisableVertexAttribArray(j,"tex_coord");c.DisableVertexAttribArray(j,"vertex");}),[]]);c.VertexAttribPointer(j,"vertex",16,0);c.VertexAttribPointer(j,"tex_coord",16,8);k=O.make(0,(16*f.Len()>>0));l=0;while(l<f.Len()){m=f.Vertex(l);n=m[0];o=m[1];p=m[2];q=m[3];r=f.Texture(l);s=r[0];t=r[1];u=r[2];v=r[3];if(($float32IsEqual(n,p))||($float32IsEqual(o,q))||($float32IsEqual(s,u))||($float32IsEqual(t,v))){l=l+(1)>>0;continue;}k=$append(k,n,o,s,t,p,o,u,t,n,q,s,v,p,q,u,v);l=l+(1)>>0;}if(k.$length===0){return $ifaceNil;}c.BufferSubData(c.ArrayBuffer,k);c.DrawElements((w=(6*k.$length>>0)/16,(w===w&&w!==1/0&&w!==-1/0)?w>>0:$throwRuntimeError("integer divide by zero")));return $ifaceNil;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};I=function(c){var $deferred=[],$err=null,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;try{$deferFrames.push($deferred);d=c.NewShader(c.VertexShader,M(c,0));e=d[0];f=d[1];if(!($interfaceIsEqual(f,$ifaceNil))){return f;}$deferred.push([$methodVal(c,"DeleteShader"),[e]]);g=c.NewShader(c.FragmentShader,M(c,1));h=g[0];f=g[1];if(!($interfaceIsEqual(f,$ifaceNil))){return f;}$deferred.push([$methodVal(c,"DeleteShader"),[h]]);i=new P([e,h]);j=c.NewProgram(i);H=j[0];f=j[1];if(!($interfaceIsEqual(f,$ifaceNil))){return f;}k=O.make(160000);c.NewBuffer(c.ArrayBuffer,k,c.DynamicDraw);l=Q.make(60000);m=0;while(m<10000){(n=(6*m<<16>>>16)+0<<16>>>16,(n<0||n>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+n]=(4*m<<16>>>16)+0<<16>>>16);(o=(6*m<<16>>>16)+1<<16>>>16,(o<0||o>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+o]=(4*m<<16>>>16)+1<<16>>>16);(p=(6*m<<16>>>16)+2<<16>>>16,(p<0||p>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+p]=(4*m<<16>>>16)+2<<16>>>16);(q=(6*m<<16>>>16)+3<<16>>>16,(q<0||q>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+q]=(4*m<<16>>>16)+1<<16>>>16);(r=(6*m<<16>>>16)+4<<16>>>16,(r<0||r>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+r]=(4*m<<16>>>16)+2<<16>>>16);(s=(6*m<<16>>>16)+5<<16>>>16,(s<0||s>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+s]=(4*m<<16>>>16)+3<<16>>>16);m=m+(1)<<16>>>16;}c.NewBuffer(c.ElementArrayBuffer,l,c.StaticDraw);return $ifaceNil;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};K=function(c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t;if(!($interfaceIsEqual(J,H))){c.UseProgram(H);J=H;}g=H;c.UniformFloats(g,"projection_matrix",d);h=e.Element(0,0);i=e.Element(0,1);j=e.Element(1,0);k=e.Element(1,1);l=e.Element(0,2);m=e.Element(1,2);n=new O([h,j,0,0,i,k,0,0,0,0,1,0,l,m,0,1]);c.UniformFloats(g,"modelview_matrix",n);c.UniformInt(g,"texture",0);o=S.zero();p=0;while(p<4){q=0;while(q<5){(r=((p<0||p>=o.length)?$throwRuntimeError("index out of range"):o[p]),(q<0||q>=r.length)?$throwRuntimeError("index out of range"):r[q]=f.Element(p,q));q=q+(1)>>0;}p=p+(1)>>0;}s=new O([o[0][0],o[1][0],o[2][0],o[3][0],o[0][1],o[1][1],o[2][1],o[3][1],o[0][2],o[1][2],o[2][2],o[3][2],o[0][3],o[1][3],o[2][3],o[3][3]]);c.UniformFloats(g
|
||
|
$packages["bufio"]=(function(){var $pkg={},A,B,C,D,Y,Z,AA,E,H,I,F,G;A=$packages["bytes"];B=$packages["errors"];C=$packages["io"];D=$packages["unicode/utf8"];E=$pkg.Reader=$newType(0,$kindStruct,"bufio.Reader","Reader","bufio",function(buf_,rd_,r_,w_,err_,lastByte_,lastRuneSize_){this.$val=this;this.buf=buf_!==undefined?buf_:Y.nil;this.rd=rd_!==undefined?rd_:$ifaceNil;this.r=r_!==undefined?r_:0;this.w=w_!==undefined?w_:0;this.err=err_!==undefined?err_:$ifaceNil;this.lastByte=lastByte_!==undefined?lastByte_:0;this.lastRuneSize=lastRuneSize_!==undefined?lastRuneSize_:0;});F=$pkg.NewReaderSize=function(a,b){var c,d,e,f;c=$assertType(a,Z,true);d=c[0];e=c[1];if(e&&d.buf.$length>=b){return d;}if(b<16){b=16;}f=new E.Ptr();f.reset(Y.make(b),a);return f;};G=$pkg.NewReader=function(a){return F(a,4096);};E.Ptr.prototype.Reset=function(a){var b;b=this;b.reset(b.buf,a);};E.prototype.Reset=function(a){return this.$val.Reset(a);};E.Ptr.prototype.reset=function(a,b){var c;c=this;$copy(c,new E.Ptr(a,b,0,0,$ifaceNil,-1,-1),E);};E.prototype.reset=function(a,b){return this.$val.reset(a,b);};E.Ptr.prototype.fill=function(){var a,b,c,d,e;a=this;if(a.r>0){$copySlice(a.buf,$subslice(a.buf,a.r,a.w));a.w=a.w-(a.r)>>0;a.r=0;}if(a.w>=a.buf.$length){$panic(new $String("bufio: tried to fill full buffer"));}b=100;while(b>0){c=a.rd.Read($subslice(a.buf,a.w));d=c[0];e=c[1];if(d<0){$panic(H);}a.w=a.w+(d)>>0;if(!($interfaceIsEqual(e,$ifaceNil))){a.err=e;return;}if(d>0){return;}b=b-(1)>>0;}a.err=C.ErrNoProgress;};E.prototype.fill=function(){return this.$val.fill();};E.Ptr.prototype.readErr=function(){var a,b;a=this;b=a.err;a.err=$ifaceNil;return b;};E.prototype.readErr=function(){return this.$val.readErr();};E.Ptr.prototype.Peek=function(a){var b,c,d;b=this;if(a<0){return[Y.nil,$pkg.ErrNegativeCount];}if(a>b.buf.$length){return[Y.nil,$pkg.ErrBufferFull];}while((b.w-b.r>>0)<a&&$interfaceIsEqual(b.err,$ifaceNil)){b.fill();}c=$ifaceNil;d=b.w-b.r>>0;if(d<a){a=d;c=b.readErr();if($interfaceIsEqual(c,$ifaceNil)){c=$pkg.ErrBufferFull;}}return[$subslice(b.buf,b.r,(b.r+a>>0)),c];};E.prototype.Peek=function(a){return this.$val.Peek(a);};E.Ptr.prototype.Read=function(a){var b=0,c=$ifaceNil,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;d=this;b=a.$length;if(b===0){e=0;f=d.readErr();b=e;c=f;return[b,c];}if(d.r===d.w){if(!($interfaceIsEqual(d.err,$ifaceNil))){g=0;h=d.readErr();b=g;c=h;return[b,c];}if(a.$length>=d.buf.$length){i=d.rd.Read(a);b=i[0];d.err=i[1];if(b<0){$panic(H);}if(b>0){d.lastByte=((j=b-1>>0,((j<0||j>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+j]))>>0);d.lastRuneSize=-1;}k=b;l=d.readErr();b=k;c=l;return[b,c];}d.fill();if(d.r===d.w){m=0;n=d.readErr();b=m;c=n;return[b,c];}}b=$copySlice(a,$subslice(d.buf,d.r,d.w));d.r=d.r+(b)>>0;d.lastByte=((o=d.buf,p=d.r-1>>0,((p<0||p>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+p]))>>0);d.lastRuneSize=-1;q=b;r=$ifaceNil;b=q;c=r;return[b,c];};E.prototype.Read=function(a){return this.$val.Read(a);};E.Ptr.prototype.ReadByte=function(){var a=0,b=$ifaceNil,c,d,e,f,g,h,i;c=this;c.lastRuneSize=-1;while(c.r===c.w){if(!($interfaceIsEqual(c.err,$ifaceNil))){d=0;e=c.readErr();a=d;b=e;return[a,b];}c.fill();}a=(f=c.buf,g=c.r,((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]));c.r=c.r+(1)>>0;c.lastByte=(a>>0);h=a;i=$ifaceNil;a=h;b=i;return[a,b];};E.prototype.ReadByte=function(){return this.$val.ReadByte();};E.Ptr.prototype.UnreadByte=function(){var a,b,c;a=this;if(a.lastByte<0||(a.r===0)&&a.w>0){return $pkg.ErrInvalidUnreadByte;}if(a.r>0){a.r=a.r-(1)>>0;}else{a.w=1;}(b=a.buf,c=a.r,(c<0||c>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]=(a.lastByte<<24>>>24));a.lastByte=-1;a.lastRuneSize=-1;return $ifaceNil;};E.prototype.UnreadByte=function(){return this.$val.UnreadByte();};E.Ptr.prototype.ReadRune=function(){var a=0,b=0,c=$ifaceNil,d,e,f,g,h,i,j,k,l,m,n,o,p,q;d=this;while((d.r+4>>0)>d.w&&!D.FullRune($subslice(d.buf,d.r,d.w))&&$interfaceIsEqual(d.err,$ifaceNil)&&(d.w-d.r>>0)<d.buf.$length){d.fill();}d.lastRuneSize=-1;if(d.r===d.w){e=0;f=0;g
|
||
|
$packages["image"]=(function(){var $pkg={},A,B,E,C,D,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,F,I,O,Q,S,T,V,X,Z,AB,AD,AF,AH,AJ,AL,AN,AP,AQ,G,a,b,c,d,H,J,K,L,M,R,W,Y,AA,AC,AI,AK,AM,AO,AR;A=$packages["bufio"];B=$packages["errors"];E=$packages["image/color"];C=$packages["io"];D=$packages["strconv"];F=$pkg.format=$newType(0,$kindStruct,"image.format","format","image",function(name_,magic_,decode_,decodeConfig_){this.$val=this;this.name=name_!==undefined?name_:"";this.magic=magic_!==undefined?magic_:"";this.decode=decode_!==undefined?decode_:$throwNilPointerError;this.decodeConfig=decodeConfig_!==undefined?decodeConfig_:$throwNilPointerError;});I=$pkg.reader=$newType(8,$kindInterface,"image.reader","reader","image",null);O=$pkg.Point=$newType(0,$kindStruct,"image.Point","Point","image",function(X_,Y_){this.$val=this;this.X=X_!==undefined?X_:0;this.Y=Y_!==undefined?Y_:0;});Q=$pkg.Rectangle=$newType(0,$kindStruct,"image.Rectangle","Rectangle","image",function(Min_,Max_){this.$val=this;this.Min=Min_!==undefined?Min_:new O.Ptr();this.Max=Max_!==undefined?Max_:new O.Ptr();});S=$pkg.Config=$newType(0,$kindStruct,"image.Config","Config","image",function(ColorModel_,Width_,Height_){this.$val=this;this.ColorModel=ColorModel_!==undefined?ColorModel_:$ifaceNil;this.Width=Width_!==undefined?Width_:0;this.Height=Height_!==undefined?Height_:0;});T=$pkg.Image=$newType(8,$kindInterface,"image.Image","Image","image",null);V=$pkg.RGBA=$newType(0,$kindStruct,"image.RGBA","RGBA","image",function(Pix_,Stride_,Rect_){this.$val=this;this.Pix=Pix_!==undefined?Pix_:AT.nil;this.Stride=Stride_!==undefined?Stride_:0;this.Rect=Rect_!==undefined?Rect_:new Q.Ptr();});X=$pkg.RGBA64=$newType(0,$kindStruct,"image.RGBA64","RGBA64","image",function(Pix_,Stride_,Rect_){this.$val=this;this.Pix=Pix_!==undefined?Pix_:AT.nil;this.Stride=Stride_!==undefined?Stride_:0;this.Rect=Rect_!==undefined?Rect_:new Q.Ptr();});Z=$pkg.NRGBA=$newType(0,$kindStruct,"image.NRGBA","NRGBA","image",function(Pix_,Stride_,Rect_){this.$val=this;this.Pix=Pix_!==undefined?Pix_:AT.nil;this.Stride=Stride_!==undefined?Stride_:0;this.Rect=Rect_!==undefined?Rect_:new Q.Ptr();});AB=$pkg.NRGBA64=$newType(0,$kindStruct,"image.NRGBA64","NRGBA64","image",function(Pix_,Stride_,Rect_){this.$val=this;this.Pix=Pix_!==undefined?Pix_:AT.nil;this.Stride=Stride_!==undefined?Stride_:0;this.Rect=Rect_!==undefined?Rect_:new Q.Ptr();});AD=$pkg.Alpha=$newType(0,$kindStruct,"image.Alpha","Alpha","image",function(Pix_,Stride_,Rect_){this.$val=this;this.Pix=Pix_!==undefined?Pix_:AT.nil;this.Stride=Stride_!==undefined?Stride_:0;this.Rect=Rect_!==undefined?Rect_:new Q.Ptr();});AF=$pkg.Alpha16=$newType(0,$kindStruct,"image.Alpha16","Alpha16","image",function(Pix_,Stride_,Rect_){this.$val=this;this.Pix=Pix_!==undefined?Pix_:AT.nil;this.Stride=Stride_!==undefined?Stride_:0;this.Rect=Rect_!==undefined?Rect_:new Q.Ptr();});AH=$pkg.Gray=$newType(0,$kindStruct,"image.Gray","Gray","image",function(Pix_,Stride_,Rect_){this.$val=this;this.Pix=Pix_!==undefined?Pix_:AT.nil;this.Stride=Stride_!==undefined?Stride_:0;this.Rect=Rect_!==undefined?Rect_:new Q.Ptr();});AJ=$pkg.Gray16=$newType(0,$kindStruct,"image.Gray16","Gray16","image",function(Pix_,Stride_,Rect_){this.$val=this;this.Pix=Pix_!==undefined?Pix_:AT.nil;this.Stride=Stride_!==undefined?Stride_:0;this.Rect=Rect_!==undefined?Rect_:new Q.Ptr();});AL=$pkg.Paletted=$newType(0,$kindStruct,"image.Paletted","Paletted","image",function(Pix_,Stride_,Rect_,Palette_){this.$val=this;this.Pix=Pix_!==undefined?Pix_:AT.nil;this.Stride=Stride_!==undefined?Stride_:0;this.Rect=Rect_!==undefined?Rect_:new Q.Ptr();this.Palette=Palette_!==undefined?Palette_:E.Palette.nil;});AN=$pkg.Uniform=$newType(0,$kindStruct,"image.Uniform","Uniform","image",function(C_){this.$val=this;this.C=C_!==undefined?C_:$ifaceNil;});AP=$pkg.YCbCrSubsampleRatio=$newType(4,$kindInt,"image.YCbCrSubsampleRatio","YCbCrSubsampleRatio","image",null);AQ=$pkg.YCbCr=$newType(0,$kindStruct,"image.YCbCr","YCbCr","image",function(Y_,Cb_,Cr_,YStride_,CStride_,SubsampleRatio_,Rect_){this.$val=this;this.Y=Y_!==un
|
||
|
$packages["image/draw"]=(function(){var $pkg={},A,B,X,Y,Z,AA,AB,AC,AD,AE,AF,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V;A=$packages["image"];B=$packages["image/color"];H=function(b,c,d,e,f,g){var h,i,j;h=$clone(c.Min,A.Point);$copy(c,c.Intersect(b.Bounds()),A.Rectangle);$copy(c,c.Intersect(d.Bounds().Add(h.Sub(e))),A.Rectangle);if(!($interfaceIsEqual(f,$ifaceNil))){$copy(c,c.Intersect(f.Bounds().Add(h.Sub(g))),A.Rectangle);}i=c.Min.X-h.X>>0;j=c.Min.Y-h.Y>>0;if((i===0)&&(j===0)){return;}e.X=(e).X+(i)>>0;e.Y=(e).Y+(j)>>0;g.X=(g).X+(i)>>0;g.Y=(g).Y+(j)>>0;};I=function(b,c,d,e){e=$clone(e,A.Point);c=$clone(c,A.Rectangle);return $interfaceIsEqual(b,d)&&c.Overlaps(c.Add(e.Sub(c.Min)))&&(e.Y<c.Min.Y||((e.Y===c.Min.Y)&&e.X<c.Min.X));};J=$pkg.Draw=function(b,c,d,e,f){e=$clone(e,A.Point);c=$clone(c,A.Rectangle);K(b,c,d,e,$ifaceNil,new A.Point.Ptr(0,0),f);};K=$pkg.DrawMask=function(b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu;g=$clone(g,A.Point);e=$clone(e,A.Point);c=$clone(c,A.Rectangle);H(b,c,d,e,f,g);if(c.Empty()){return;}j=b;if($assertType(j,X,true)[1]){i=j.$val;if(h===0){if($interfaceIsEqual(f,$ifaceNil)){l=d;if($assertType(l,Z,true)[1]){k=l.$val;L(i,c,k);return;}else if($assertType(l,X,true)[1]){k=l.$val;N(i,c,k,e);return;}else if($assertType(l,AA,true)[1]){k=l.$val;P(i,c,k,e);return;}else if($assertType(l,AB,true)[1]){k=l.$val;if(R(i,c,k,e)){return;}}}else{m=$assertType(f,AC,true);n=m[0];o=m[1];if(o){q=d;if($assertType(q,Z,true)[1]){p=q.$val;S(i,c,p,n,g);return;}}}}else{if($interfaceIsEqual(f,$ifaceNil)){s=d;if($assertType(s,Z,true)[1]){r=s.$val;M(i,c,r);return;}else if($assertType(s,X,true)[1]){r=s.$val;O(i,c,r,e);return;}else if($assertType(s,AA,true)[1]){r=s.$val;Q(i,c,r,e);return;}else if($assertType(s,AB,true)[1]){r=s.$val;if(R(i,c,r,e)){return;}}}}T(i,c,d,e,f,g,h);return;}else if($assertType(j,Y,true)[1]){i=j.$val;if((h===1)&&$interfaceIsEqual(f,$ifaceNil)&&!I(b,c,d,e)){V(i,c,d,e,false);}}t=c.Min.X;u=c.Max.X;v=1;w=t;x=u;y=v;z=c.Min.Y;aa=c.Max.Y;ab=1;ac=z;ad=aa;ae=ab;if(I(b,c,d,e)){af=x-1>>0;ag=w-1>>0;ah=-1;w=af;x=ag;y=ah;ai=ad-1>>0;aj=ac-1>>0;ak=-1;ac=ai;ad=aj;ae=ak;}al=$clone(new B.RGBA64.Ptr(),B.RGBA64);am=(e.Y+ac>>0)-c.Min.Y>>0;an=(g.Y+ac>>0)-c.Min.Y>>0;ao=ac;while(!((ao===ad))){ap=(e.X+w>>0)-c.Min.X>>0;aq=(g.X+w>>0)-c.Min.X>>0;ar=w;while(!((ar===x))){as=65535;if(!($interfaceIsEqual(f,$ifaceNil))){at=f.At(aq,an).RGBA();as=at[3];}if(as===0){if(h===0){}else{b.Set(ar,ao,(au=B.Transparent,new au.constructor.Struct(au)));}}else if((as===65535)&&(h===1)){b.Set(ar,ao,d.At(ap,am));}else{av=d.At(ap,am).RGBA();aw=av[0];ax=av[1];ay=av[2];az=av[3];if(h===0){ba=b.At(ar,ao).RGBA();bb=ba[0];bc=ba[1];bd=ba[2];be=ba[3];bg=65535-((bf=((((az>>>16<<16)*as>>>0)+(az<<16>>>16)*as)>>>0)/65535,(bf===bf&&bf!==1/0&&bf!==-1/0)?bf>>>0:$throwRuntimeError("integer divide by zero")))>>>0;al.R=((bh=((((((bb>>>16<<16)*bg>>>0)+(bb<<16>>>16)*bg)>>>0)+((((aw>>>16<<16)*as>>>0)+(aw<<16>>>16)*as)>>>0)>>>0))/65535,(bh===bh&&bh!==1/0&&bh!==-1/0)?bh>>>0:$throwRuntimeError("integer divide by zero"))<<16>>>16);al.G=((bi=((((((bc>>>16<<16)*bg>>>0)+(bc<<16>>>16)*bg)>>>0)+((((ax>>>16<<16)*as>>>0)+(ax<<16>>>16)*as)>>>0)>>>0))/65535,(bi===bi&&bi!==1/0&&bi!==-1/0)?bi>>>0:$throwRuntimeError("integer divide by zero"))<<16>>>16);al.B=((bj=((((((bd>>>16<<16)*bg>>>0)+(bd<<16>>>16)*bg)>>>0)+((((ay>>>16<<16)*as>>>0)+(ay<<16>>>16)*as)>>>0)>>>0))/65535,(bj===bj&&bj!==1/0&&bj!==-1/0)?bj>>>0:$throwRuntimeError("integer divide by zero"))<<16>>>16);al.A=((bk=((((((be>>>16<<16)*bg>>>0)+(be<<16>>>16)*bg)>>>0)+((((az>>>16<<16)*as>>>0)+(az<<16>>>16)*as)>>>0)>>>0))/65535,(bk===bk&&bk!==1/0&&bk!==-1/0)?bk>>>0:$throwRuntimeError("integer divide by zero"))<<16>>>16);}else{al.R=((bl=((((aw>>>16<<16)*as>>>0)+(aw<<16>>>16)*as)>>>0)/65535,(bl===bl&&bl!==1/0&&bl!==-1/0)?bl>>>0:$throwRuntimeError("integer divide by zero"))<<16>>>16);al.G=((bm=((((ax>>>16<<16)*as>>>0)+(ax<<16>>>16)*as)>>>0)/65535,(bm===bm&&bm!==1/0&&bm!==-1/0)?bm>>>0:$throwRuntimeError("inte
|
||
|
$packages["github.com/hajimehoshi/ebiten/internal/graphics"]=(function(){var $pkg={},D,A,B,C,E,F,Q,R,S,T,U,V,W,X,H,K,L,N,G,I,J,M,O,P;D=$packages["errors"];A=$packages["github.com/hajimehoshi/ebiten/internal"];B=$packages["github.com/hajimehoshi/ebiten/internal/graphics/internal/shader"];C=$packages["github.com/hajimehoshi/ebiten/internal/opengl"];E=$packages["image"];F=$packages["image/draw"];H=$pkg.Framebuffer=$newType(0,$kindStruct,"graphics.Framebuffer","Framebuffer","github.com/hajimehoshi/ebiten/internal/graphics",function(native$0_,width_,height_,flipY_){this.$val=this;this.native$0=native$0_!==undefined?native$0_:$ifaceNil;this.width=width_!==undefined?width_:0;this.height=height_!==undefined?height_:0;this.flipY=flipY_!==undefined?flipY_:false;});K=$pkg.Matrix=$newType(8,$kindInterface,"graphics.Matrix","Matrix","github.com/hajimehoshi/ebiten/internal/graphics",null);L=$pkg.TextureQuads=$newType(8,$kindInterface,"graphics.TextureQuads","TextureQuads","github.com/hajimehoshi/ebiten/internal/graphics",null);N=$pkg.Texture=$newType(0,$kindStruct,"graphics.Texture","Texture","github.com/hajimehoshi/ebiten/internal/graphics",function(native$0_,width_,height_){this.$val=this;this.native$0=native$0_!==undefined?native$0_:$ifaceNil;this.width=width_!==undefined?width_:0;this.height=height_!==undefined?height_:0;});G=function(a,b,c,d){var e,f,g,h;e=2/(b-a>>0);f=2/(d-c>>0);g=-1*(b+a>>0)/(b-a>>0);h=-1*(d+c>>0)/(d-c>>0);return $toNativeArray($kindArray,[$toNativeArray($kindFloat64,[e,0,0,g]),$toNativeArray($kindFloat64,[0,f,0,h]),$toNativeArray($kindFloat64,[0,0,1,0]),$toNativeArray($kindFloat64,[0,0,0,1])]);};I=$pkg.NewZeroFramebuffer=function(a,b,c){var d;d=new H.Ptr($ifaceNil,b,c,true);return[d,$ifaceNil];};J=$pkg.NewFramebufferFromTexture=function(a,b){var c,d,e,f,g,h;c=a.NewFramebuffer(b.native$0);d=c[0];e=c[1];if(!($interfaceIsEqual(e,$ifaceNil))){return[R.nil,e];}f=b.Size();g=f[0];h=f[1];return[new H.Ptr(d,g,h,false),$ifaceNil];};H.Ptr.prototype.Size=function(){var a=0,b=0,c,d,e;c=this;d=c.width;e=c.height;a=d;b=e;return[a,b];};H.prototype.Size=function(){return this.$val.Size();};H.Ptr.prototype.Dispose=function(a){var b;b=this;a.DeleteFramebuffer(b.native$0);};H.prototype.Dispose=function(a){return this.$val.Dispose(a);};H.Ptr.prototype.setAsViewport=function(a){var b,c,d;b=this;c=A.NextPowerOf2Int(b.width);d=A.NextPowerOf2Int(b.height);return a.SetViewport(b.native$0,c,d);};H.prototype.setAsViewport=function(a){return this.$val.setAsViewport(a);};H.Ptr.prototype.projectionMatrix=function(){var a,b,c,d,e,f,g,h;a=this;b=A.NextPowerOf2Int(a.width);c=A.NextPowerOf2Int(a.height);d=G(0,b,0,c);if(a.flipY){e=(d.nilCheck,d[1]);f=1;(f<0||f>=e.length)?$throwRuntimeError("index out of range"):e[f]=((f<0||f>=e.length)?$throwRuntimeError("index out of range"):e[f])*(-1);g=(d.nilCheck,d[1]);h=3;(h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h]=((h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h])+(a.height/A.NextPowerOf2Int(a.height)*2);}return d;};H.prototype.projectionMatrix=function(){return this.$val.projectionMatrix();};H.Ptr.prototype.Fill=function(a,b,c,d,e){var f,g;f=this;g=f.setAsViewport(a);if(!($interfaceIsEqual(g,$ifaceNil))){return g;}return a.FillFramebuffer(f.native$0,b,c,d,e);};H.prototype.Fill=function(a,b,c,d,e){return this.$val.Fill(a,b,c,d,e);};H.Ptr.prototype.DrawTexture=function(a,b,c,d,e){var f,g,h;f=this;g=f.setAsViewport(a);if(!($interfaceIsEqual(g,$ifaceNil))){return g;}h=f.projectionMatrix();return B.DrawTexture(a,b.native$0,h,c,d,e);};H.prototype.DrawTexture=function(a,b,c,d,e){return this.$val.DrawTexture(a,b,c,d,e);};M=function(a){var b,c,d,e,f,g,h,i,j,k;b=a.Bounds().Size().X;c=a.Bounds().Size().Y;d=b;e=c;f=new E.Rectangle.Ptr($clone(E.ZP,E.Point),new E.Point.Ptr(A.NextPowerOf2Int(d),A.NextPowerOf2Int(e)));g=$assertType(a,S,true);h=g[0];i=g[1];if(i&&$equal(a.Bounds(),f,E.Rectangle)){return h;}j=E.NewRGBA(f);k=new E.Rectangle.Ptr($clone(E.ZP,E.Point),$clone(a.Bounds().Size(),E.Point));F.Draw(j,k,a,E.ZP,1);return j;};N.Ptr.prototype.Size=function(){var a=0,b=0,c,d,e;c=this;
|
||
|
$packages["github.com/hajimehoshi/ebiten/internal/ui"]=(function(){var $pkg={},A,B,C,D,E,W,X,Y,Z,AA,AB,AC,AD,K,L,M,F,G,N,O,a,b,P,Q,R,S,T,U,V;A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["github.com/gopherjs/webgl"];C=$packages["github.com/hajimehoshi/ebiten/internal/opengl"];D=$packages["strconv"];E=$packages["time"];K=$pkg.Key=$newType(4,$kindInt,"ui.Key","Key","github.com/hajimehoshi/ebiten/internal/ui",null);L=$pkg.MouseButton=$newType(4,$kindInt,"ui.MouseButton","MouseButton","github.com/hajimehoshi/ebiten/internal/ui",null);M=$pkg.input=$newType(0,$kindStruct,"ui.input","input","github.com/hajimehoshi/ebiten/internal/ui",function(keyPressed_,mouseButtonPressed_,cursorX_,cursorY_){this.$val=this;this.keyPressed=keyPressed_!==undefined?keyPressed_:AB.zero();this.mouseButtonPressed=mouseButtonPressed_!==undefined?mouseButtonPressed_:AC.zero();this.cursorX=cursorX_!==undefined?cursorX_:0;this.cursorY=cursorY_!==undefined?cursorY_:0;});M.Ptr.prototype.keyDown=function(c){var d,e,f,g;d=this;f=(e=F[c],e!==undefined?e.v:0);(g=d.keyPressed,(f<0||f>=g.length)?$throwRuntimeError("index out of range"):g[f]=true);};M.prototype.keyDown=function(c){return this.$val.keyDown(c);};M.Ptr.prototype.keyUp=function(c){var d,e,f,g;d=this;f=(e=F[c],e!==undefined?e.v:0);(g=d.keyPressed,(f<0||f>=g.length)?$throwRuntimeError("index out of range"):g[f]=false);};M.prototype.keyUp=function(c){return this.$val.keyUp(c);};P=$pkg.Use=function(c){c(O);};Q=$pkg.DoEvents=function($b){var $this=this,$args=arguments,$r,$s=0;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:$r=E.Sleep(new E.Duration(0,0),$BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};R=$pkg.Terminate=function(){};S=$pkg.IsClosed=function(){return false;};T=$pkg.SwapBuffers=function(){};U=function($b){var $this=this,$args=arguments,$r,$s=0,c,d,e,f,g,h,i,j,k;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:c=new Y(0);$global.window.onload=$externalize((function(){$close(c);}),Z);d=$recv(c,$BLOCKING);$s=1;case 1:if(d&&d.$blocking){d=d();}d[0];e=$global.document;N=e.createElement($externalize("canvas",$String));N.width=16;N.height=16;e.body.appendChild(N);f=e.documentElement.style;f.height=$externalize("100%",$String);f.margin=$externalize("0",$String);f.padding=$externalize("0",$String);g=e.body.style;g.backgroundColor=$externalize("#000",$String);g.position=$externalize("relative",$String);g.height=$externalize("100%",$String);g.margin=$externalize("0",$String);g.padding=$externalize("0",$String);h=N.style;h.position=$externalize("absolute",$String);i=B.NewContext(N,new B.ContextAttributes.Ptr(true,false,false,false,true,false));j=i[0];k=i[1];if(!($interfaceIsEqual(k,$ifaceNil))){$panic(k);}O=C.NewContext(j);N.setAttribute($externalize("tabindex",$String),1);N.style.outline=$externalize("none",$String);N.onkeydown=$externalize((function(l){var $deferred=[],$err=null,m,n;try{$deferFrames.push($deferred);$deferred.push([function(m){l[$externalize(m,$String)]();},["preventDefault"]]);n=$parseInt(l.keyCode)>>0;G.keyDown(n);}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}}),AA);N.onkeyup=$externalize((function(l){var $deferred=[],$err=null,m,n;try{$deferFrames.push($deferred);$deferred.push([function(m){l[$externalize(m,$String)]();},["preventDefault"]]);n=$parseInt(l.keyCode)>>0;G.keyUp(n);}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}}),AA);case-1:}return;}};$f.$blocking=true;return $f;};V=$pkg.Start=function(c,d,e,f){var g=0,h=$ifaceNil,i,j,k,l,m,n;i=$global.document;i.title=$externalize(f,$String);N.width=c*e>>0;N.height=d*e>>0;j=N.style;j.left=$externalize("calc(50% - "+D.Itoa((k=(c*e>>0)/2,(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero")))+"px)",$String);j.top=$externalize("calc(50% - "+D.Itoa((l=(d*e>>0)/2,(l===l&&l!==1/0&&l!==-1/0)?l>>0:$throwRuntimeError("integer divide by zero")))+"px)",$String);m=e;n=$ifaceNil;g=m;h=n;return[g,h];};$pkg.$init=f
|
||
|
$packages["github.com/hajimehoshi/ebiten"]=(function(){var $pkg={},F,B,C,D,E,G,A,H,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,M,W,AD,AE,AG,AH,AK,AL,AM,AN,AO,K,L,V,Z,AB,AC,AF,AI,AJ,AR;F=$packages["github.com/hajimehoshi/ebiten/internal"];B=$packages["github.com/hajimehoshi/ebiten/internal/graphics"];C=$packages["github.com/hajimehoshi/ebiten/internal/opengl"];D=$packages["github.com/hajimehoshi/ebiten/internal/ui"];E=$packages["image"];G=$packages["image/color"];A=$packages["math"];H=$packages["time"];M=$pkg.ColorM=$newType(0,$kindStruct,"ebiten.ColorM","ColorM","github.com/hajimehoshi/ebiten",function(initialized_,es_){this.$val=this;this.initialized=initialized_!==undefined?initialized_:false;this.es=es_!==undefined?es_:AT.zero();});W=$pkg.GeoM=$newType(0,$kindStruct,"ebiten.GeoM","GeoM","github.com/hajimehoshi/ebiten",function(initialized_,es_){this.$val=this;this.initialized=initialized_!==undefined?initialized_:false;this.es=es_!==undefined?es_:AZ.zero();});AD=$pkg.graphicsContext=$newType(0,$kindStruct,"ebiten.graphicsContext","graphicsContext","github.com/hajimehoshi/ebiten",function(glContext_,screen_,defaultR_,screenScale_){this.$val=this;this.glContext=glContext_!==undefined?glContext_:BB.nil;this.screen=screen_!==undefined?screen_:AU.nil;this.defaultR=defaultR_!==undefined?defaultR_:AU.nil;this.screenScale=screenScale_!==undefined?screenScale_:0;});AE=$pkg.innerImage=$newType(0,$kindStruct,"ebiten.innerImage","innerImage","github.com/hajimehoshi/ebiten",function(framebuffer_,texture_){this.$val=this;this.framebuffer=framebuffer_!==undefined?framebuffer_:BG.nil;this.texture=texture_!==undefined?texture_:AV.nil;});AG=$pkg.imageParts=$newType(12,$kindSlice,"ebiten.imageParts","imageParts","github.com/hajimehoshi/ebiten",null);AH=$pkg.wholeImage=$newType(0,$kindStruct,"ebiten.wholeImage","wholeImage","github.com/hajimehoshi/ebiten",function(width_,height_){this.$val=this;this.width=width_!==undefined?width_:0;this.height=height_!==undefined?height_:0;});AK=$pkg.textureQuads=$newType(0,$kindStruct,"ebiten.textureQuads","textureQuads","github.com/hajimehoshi/ebiten",function(parts_,width_,height_){this.$val=this;this.parts=parts_!==undefined?parts_:$ifaceNil;this.width=width_!==undefined?width_:0;this.height=height_!==undefined?height_:0;});AL=$pkg.Image=$newType(0,$kindStruct,"ebiten.Image","Image","github.com/hajimehoshi/ebiten",function(inner_,pixels_){this.$val=this;this.inner=inner_!==undefined?inner_:AU.nil;this.pixels=pixels_!==undefined?pixels_:AX.nil;});AM=$pkg.ImagePart=$newType(0,$kindStruct,"ebiten.ImagePart","ImagePart","github.com/hajimehoshi/ebiten",function(Dst_,Src_){this.$val=this;this.Dst=Dst_!==undefined?Dst_:new E.Rectangle.Ptr();this.Src=Src_!==undefined?Src_:new E.Rectangle.Ptr();});AN=$pkg.ImageParts=$newType(8,$kindInterface,"ebiten.ImageParts","ImageParts","github.com/hajimehoshi/ebiten",null);AO=$pkg.DrawImageOptions=$newType(0,$kindStruct,"ebiten.DrawImageOptions","DrawImageOptions","github.com/hajimehoshi/ebiten",function(ImageParts_,GeoM_,ColorM_,Parts_){this.$val=this;this.ImageParts=ImageParts_!==undefined?ImageParts_:$ifaceNil;this.GeoM=GeoM_!==undefined?GeoM_:new W.Ptr();this.ColorM=ColorM_!==undefined?ColorM_:new M.Ptr();this.Parts=Parts_!==undefined?Parts_:BC.nil;});K=function(a,b,c){var d,e,f,g;d=a.dim();if(!((d===b.dim()))){$panic(new $String("diffrent-sized matrices can't be multiplied"));}e=0;while(e<(d-1>>0)){f=0;while(f<d){g=a.Element(e,f)+b.Element(e,f);c.SetElement(e,f,g);f=f+(1)>>0;}e=e+(1)>>0;}};L=function(a,b,c){var d,e,f,g,h;d=a.dim();if(!((d===b.dim()))){$panic(new $String("diffrent-sized matrices can't be multiplied"));}e=0;while(e<(d-1>>0)){f=0;while(f<d){g=0;h=0;while(h<(d-1>>0)){g=g+(a.Element(e,h)*b.Element(h,f));h=h+(1)>>0;}if(f===(d-1>>0)){g=g+(a.Element(e,f));}c.SetElement(e,f,g);f=f+(1)>>0;}e=e+(1)>>0;}};M.Ptr.prototype.dim=function(){var a;a=this;return 5;};M.prototype.dim=function(){return this.$val.dim();};M.Ptr.prototype.initialize=function(){var a;a=this;a.initialized=true;a.es[0][0]=1;a.es[1][1]=1;a.es[2][2]=1;a.es[3][3]=1;};M.prototype.initi
|
||
|
$packages["sort"]=(function(){var $pkg={};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["compress/flate"]=(function(){var $pkg={},E,A,B,C,D,F,BK,BL,BM,BN,BU,BV,BW,BX,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CS,CT,CU,CW,Y,Z,AK,AL,AM,AO,AP,AQ,AR,Q,AF,AG,AS,AW,G,AC,AD,AE,AT,AU,AV,AX,AY;E=$packages["bufio"];A=$packages["fmt"];B=$packages["io"];C=$packages["math"];D=$packages["sort"];F=$packages["strconv"];Y=$pkg.huffmanEncoder=$newType(0,$kindStruct,"flate.huffmanEncoder","huffmanEncoder","compress/flate",function(codeBits_,code_){this.$val=this;this.codeBits=codeBits_!==undefined?codeBits_:BV.nil;this.code=code_!==undefined?code_:BX.nil;});Z=$pkg.literalNode=$newType(0,$kindStruct,"flate.literalNode","literalNode","compress/flate",function(literal_,freq_){this.$val=this;this.literal=literal_!==undefined?literal_:0;this.freq=freq_!==undefined?freq_:0;});AK=$pkg.CorruptInputError=$newType(8,$kindInt64,"flate.CorruptInputError","CorruptInputError","compress/flate",null);AL=$pkg.InternalError=$newType(8,$kindString,"flate.InternalError","InternalError","compress/flate",null);AM=$pkg.ReadError=$newType(0,$kindStruct,"flate.ReadError","ReadError","compress/flate",function(Offset_,Err_){this.$val=this;this.Offset=Offset_!==undefined?Offset_:new $Int64(0,0);this.Err=Err_!==undefined?Err_:$ifaceNil;});AO=$pkg.Resetter=$newType(8,$kindInterface,"flate.Resetter","Resetter","compress/flate",null);AP=$pkg.huffmanDecoder=$newType(0,$kindStruct,"flate.huffmanDecoder","huffmanDecoder","compress/flate",function(min_,chunks_,links_,linkMask_){this.$val=this;this.min=min_!==undefined?min_:0;this.chunks=chunks_!==undefined?chunks_:CC.zero();this.links=links_!==undefined?links_:BL.nil;this.linkMask=linkMask_!==undefined?linkMask_:0;});AQ=$pkg.Reader=$newType(8,$kindInterface,"flate.Reader","Reader","compress/flate",null);AR=$pkg.decompressor=$newType(0,$kindStruct,"flate.decompressor","decompressor","compress/flate",function(r_,roffset_,woffset_,b_,nb_,h1_,h2_,bits_,codebits_,hist_,hp_,hw_,hfull_,buf_,step_,final$15_,err_,toRead_,hl_,hd_,copyLen_,copyDist_){this.$val=this;this.r=r_!==undefined?r_:$ifaceNil;this.roffset=roffset_!==undefined?roffset_:new $Int64(0,0);this.woffset=woffset_!==undefined?woffset_:new $Int64(0,0);this.b=b_!==undefined?b_:0;this.nb=nb_!==undefined?nb_:0;this.h1=h1_!==undefined?h1_:new AP.Ptr();this.h2=h2_!==undefined?h2_:new AP.Ptr();this.bits=bits_!==undefined?bits_:CH.nil;this.codebits=codebits_!==undefined?codebits_:CJ.nil;this.hist=hist_!==undefined?hist_:CL.nil;this.hp=hp_!==undefined?hp_:0;this.hw=hw_!==undefined?hw_:0;this.hfull=hfull_!==undefined?hfull_:false;this.buf=buf_!==undefined?buf_:CM.zero();this.step=step_!==undefined?step_:$throwNilPointerError;this.final$15=final$15_!==undefined?final$15_:false;this.err=err_!==undefined?err_:$ifaceNil;this.toRead=toRead_!==undefined?toRead_:BM.nil;this.hl=hl_!==undefined?hl_:CF.nil;this.hd=hd_!==undefined?hd_:CF.nil;this.copyLen=copyLen_!==undefined?copyLen_:0;this.copyDist=copyDist_!==undefined?copyDist_:0;});G=function(a,b,c,d){var e;if(b<=c){$copySlice($subslice(a,b,(b+d>>0)),$subslice(a,c,(c+d>>0)));return;}while(true){if(b>=(c+d>>0)){$copySlice($subslice(a,b,(b+d>>0)),$subslice(a,c,(c+d>>0)));return;}e=b-c>>0;$copySlice($subslice(a,b,(b+e>>0)),$subslice(a,c,(c+e>>0)));d=d-(e)>>0;b=b+(e)>>0;}};AC=function(a){return new Y.Ptr(BV.make(a),BX.make(a));};AD=function(){var a,b,c,d,e,f;a=AC(286);b=a.codeBits;c=a.code;d=0;d=0;while(d<286){e=0;f=0;switch(0){default:if(d<144){e=d+48<<16>>>16;f=8;break;}else if(d<256){e=(d+400<<16>>>16)-144<<16>>>16;f=9;break;}else if(d<280){e=d-256<<16>>>16;f=7;break;}else{e=(d+192<<16>>>16)-280<<16>>>16;f=8;}}(d<0||d>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+d]=f;(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=AY(e,f);d=d+(1)<<16>>>16;}return a;};AE=function(){var a,b,c,d;a=AC(30);b=a.codeBits;c=a.code;d=0;while(d<30){(d<0||d>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+d]=5;(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=AY(d,5);d=d+(1)<<16>>>16;}return a;};AK.prototype.Error=function(){var a;a
|
||
|
$packages["hash"]=(function(){var $pkg={},A,E,C;A=$packages["io"];C=$pkg.Hash32=$newType(8,$kindInterface,"hash.Hash32","Hash32","hash",null);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}E=$sliceType($Uint8);C.init([["BlockSize","BlockSize","",$funcType([],[$Int],false)],["Reset","Reset","",$funcType([],[],false)],["Size","Size","",$funcType([],[$Int],false)],["Sum","Sum","",$funcType([E],[E],false)],["Sum32","Sum32","",$funcType([],[$Uint32],false)],["Write","Write","",$funcType([E],[$Int,$error],false)]]);}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["hash/adler32"]=(function(){var $pkg={},A,F,G,B,C,D,E;A=$packages["hash"];B=$pkg.digest=$newType(4,$kindUint32,"adler32.digest","digest","hash/adler32",null);$ptrType(B).prototype.Reset=function(){var a;a=this;a.$set(1);};C=$pkg.New=function(){var a;a=$newDataPointer(0,F);a.Reset();return a;};$ptrType(B).prototype.Size=function(){var a;a=this;return 4;};$ptrType(B).prototype.BlockSize=function(){var a;a=this;return 1;};D=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;c=(((a&65535)>>>0)>>>0);d=((a>>>16>>>0)>>>0);e=c;f=d;while(b.$length>0){g=G.nil;if(b.$length>5552){h=$subslice(b,0,5552);i=$subslice(b,5552);b=h;g=i;}j=b;k=0;while(k<j.$length){l=((k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]);e=e+((l>>>0))>>>0;f=f+(e)>>>0;k++;}e=(m=e%(65521),m===m?m:$throwRuntimeError("integer divide by zero"));f=(n=f%(65521),n===n?n:$throwRuntimeError("integer divide by zero"));b=g;}return((((f<<16>>>0)|e)>>>0)>>>0);};$ptrType(B).prototype.Write=function(a){var b=0,c=$ifaceNil,d,e,f;d=this;d.$set(D(d.$get(),a));e=a.$length;f=$ifaceNil;b=e;c=f;return[b,c];};$ptrType(B).prototype.Sum32=function(){var a;a=this;return(a.$get()>>>0);};$ptrType(B).prototype.Sum=function(a){var b,c;b=this;c=(b.$get()>>>0);return $append(a,((c>>>24>>>0)<<24>>>24),((c>>>16>>>0)<<24>>>24),((c>>>8>>>0)<<24>>>24),(c<<24>>>24));};E=$pkg.Checksum=function(a){return(D(1,a)>>>0);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}F=$ptrType(B);G=$sliceType($Uint8);F.methods=[["BlockSize","BlockSize","",$funcType([],[$Int],false),-1],["Reset","Reset","",$funcType([],[],false),-1],["Size","Size","",$funcType([],[$Int],false),-1],["Sum","Sum","",$funcType([G],[G],false),-1],["Sum32","Sum32","",$funcType([],[$Uint32],false),-1],["Write","Write","",$funcType([G],[$Int,$error],false),-1]];}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["compress/zlib"]=(function(){var $pkg={},A,B,C,G,D,E,F,P,T,U,H,J,K;A=$packages["bufio"];B=$packages["compress/flate"];C=$packages["errors"];G=$packages["fmt"];D=$packages["hash"];E=$packages["hash/adler32"];F=$packages["io"];H=$pkg.reader=$newType(0,$kindStruct,"zlib.reader","reader","compress/zlib",function(r_,decompressor_,digest_,err_,scratch_){this.$val=this;this.r=r_!==undefined?r_:$ifaceNil;this.decompressor=decompressor_!==undefined?decompressor_:$ifaceNil;this.digest=digest_!==undefined?digest_:$ifaceNil;this.err=err_!==undefined?err_:$ifaceNil;this.scratch=scratch_!==undefined?scratch_:T.zero();});J=$pkg.NewReader=function(a){return K(a,P.nil);};K=$pkg.NewReaderDict=function(a,b){var c,d;c=new H.Ptr();d=c.Reset(a,b);if(!($interfaceIsEqual(d,$ifaceNil))){return[$ifaceNil,d];}return[c,$ifaceNil];};H.Ptr.prototype.Read=function(a){var b=0,c=$ifaceNil,d,e,f,g,h,i,j,k,l,m,n,o,p;d=this;if(!($interfaceIsEqual(d.err,$ifaceNil))){e=0;f=d.err;b=e;c=f;return[b,c];}if(a.$length===0){g=0;h=$ifaceNil;b=g;c=h;return[b,c];}i=d.decompressor.Read(a);b=i[0];c=i[1];d.digest.Write($subslice(a,0,b));if(!((b===0))||!($interfaceIsEqual(c,F.EOF))){d.err=c;return[b,c];}j=F.ReadFull(d.r,$subslice(new P(d.scratch),0,4));k=j[1];if(!($interfaceIsEqual(k,$ifaceNil))){d.err=k;l=0;m=k;b=l;c=m;return[b,c];}n=(((((((d.scratch[0]>>>0)<<24>>>0)|((d.scratch[1]>>>0)<<16>>>0))>>>0)|((d.scratch[2]>>>0)<<8>>>0))>>>0)|(d.scratch[3]>>>0))>>>0;if(!((n===d.digest.Sum32()))){d.err=$pkg.ErrChecksum;o=0;p=d.err;b=o;c=p;return[b,c];}return[b,c];};H.prototype.Read=function(a){return this.$val.Read(a);};H.Ptr.prototype.Close=function(){var a;a=this;if(!($interfaceIsEqual(a.err,$ifaceNil))){return a.err;}a.err=a.decompressor.Close();return a.err;};H.prototype.Close=function(){return this.$val.Close();};H.Ptr.prototype.Reset=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;c=this;d=$assertType(a,B.Reader,true);e=d[0];f=d[1];if(f){c.r=e;}else{c.r=A.NewReader(a);}g=F.ReadFull(c.r,$subslice(new P(c.scratch),0,2));h=g[1];if(!($interfaceIsEqual(h,$ifaceNil))){return h;}i=(((c.scratch[0]>>>0)<<8>>>0)|(c.scratch[1]>>>0))>>>0;if((!((((c.scratch[0]&15)>>>0)===8)))||(!(((j=i%31,j===j?j:$throwRuntimeError("integer divide by zero"))===0)))){return $pkg.ErrHeader;}k=!((((c.scratch[1]&32)>>>0)===0));if(k){l=F.ReadFull(c.r,$subslice(new P(c.scratch),0,4));h=l[1];if(!($interfaceIsEqual(h,$ifaceNil))){return h;}m=(((((((c.scratch[0]>>>0)<<24>>>0)|((c.scratch[1]>>>0)<<16>>>0))>>>0)|((c.scratch[2]>>>0)<<8>>>0))>>>0)|(c.scratch[3]>>>0))>>>0;if(!((m===E.Checksum(b)))){return $pkg.ErrDictionary;}}if($interfaceIsEqual(c.decompressor,$ifaceNil)){if(k){c.decompressor=B.NewReaderDict(c.r,b);}else{c.decompressor=B.NewReader(c.r);}}else{$assertType(c.decompressor,B.Resetter).Reset(c.r,b);}c.digest=E.New();return $ifaceNil;};H.prototype.Reset=function(a,b){return this.$val.Reset(a,b);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}P=$sliceType($Uint8);T=$arrayType($Uint8,4);U=$ptrType(H);U.methods=[["Close","Close","",$funcType([],[$error],false),-1],["Read","Read","",$funcType([P],[$Int,$error],false),-1],["Reset","Reset","",$funcType([F.Reader,P],[$error],false),-1]];H.init([["r","r","compress/zlib",B.Reader,""],["decompressor","decompressor","compress/zlib",F.ReadCloser,""],["digest","digest","compress/zlib",D.Hash32,""],["err","err","compress/zlib",$error,""],["scratch","scratch","compress/zlib",T,""]]);$pkg.ErrChecksum=C.New("zlib: invalid checksum");$pkg.ErrDictionary=C.New("zlib: invalid dictionary");$pkg.ErrHeader=C.New("zlib: invalid header");}return;}};$f.$blocking=true;return $f;};r
|
||
|
$packages["encoding/binary"]=(function(){var $pkg={},A,B,C,D,Y,AQ,G,U;A=$packages["errors"];B=$packages["io"];C=$packages["math"];D=$packages["reflect"];G=$pkg.bigEndian=$newType(0,$kindStruct,"binary.bigEndian","bigEndian","encoding/binary",function(){this.$val=this;});G.Ptr.prototype.Uint16=function(a){return((((1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1])<<16>>>16)|((((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0])<<16>>>16)<<8<<16>>>16))>>>0;};G.prototype.Uint16=function(a){return this.$val.Uint16(a);};G.Ptr.prototype.PutUint16=function(a,b){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=((b>>>8<<16>>>16)<<24>>>24);(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(b<<24>>>24);};G.prototype.PutUint16=function(a,b){return this.$val.PutUint16(a,b);};G.Ptr.prototype.Uint32=function(a){return((((((((3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3])>>>0)|((((2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2])>>>0)<<8>>>0))>>>0)|((((1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1])>>>0)<<16>>>0))>>>0)|((((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0])>>>0)<<24>>>0))>>>0;};G.prototype.Uint32=function(a){return this.$val.Uint32(a);};G.Ptr.prototype.PutUint32=function(a,b){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=((b>>>24>>>0)<<24>>>24);(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=((b>>>16>>>0)<<24>>>24);(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=((b>>>8>>>0)<<24>>>24);(3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]=(b<<24>>>24);};G.prototype.PutUint32=function(a,b){return this.$val.PutUint32(a,b);};G.Ptr.prototype.Uint64=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;return(b=(c=(d=(e=(f=(g=(h=new $Uint64(0,((7<0||7>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+7])),i=$shiftLeft64(new $Uint64(0,((6<0||6>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+6])),8),new $Uint64(h.$high|i.$high,(h.$low|i.$low)>>>0)),j=$shiftLeft64(new $Uint64(0,((5<0||5>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+5])),16),new $Uint64(g.$high|j.$high,(g.$low|j.$low)>>>0)),k=$shiftLeft64(new $Uint64(0,((4<0||4>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+4])),24),new $Uint64(f.$high|k.$high,(f.$low|k.$low)>>>0)),l=$shiftLeft64(new $Uint64(0,((3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3])),32),new $Uint64(e.$high|l.$high,(e.$low|l.$low)>>>0)),m=$shiftLeft64(new $Uint64(0,((2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2])),40),new $Uint64(d.$high|m.$high,(d.$low|m.$low)>>>0)),n=$shiftLeft64(new $Uint64(0,((1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1])),48),new $Uint64(c.$high|n.$high,(c.$low|n.$low)>>>0)),o=$shiftLeft64(new $Uint64(0,((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0])),56),new $Uint64(b.$high|o.$high,(b.$low|o.$low)>>>0));};G.prototype.Uint64=function(a){return this.$val.Uint64(a);};G.Ptr.prototype.PutUint64=function(a,b){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=($shiftRightUint64(b,56).$low<<24>>>24);(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=($shiftRightUint64(b,48).$low<<24>>>24);(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=($shiftRightUint64(b,40).$low<<24>>>24);(3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]=($shiftRightUint64(b,32).$low<<24>>>24);(4<0||4>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+4]=($shiftRightUint64(b,24).$low<<24>>>24);(5<0||5>=a.$length)?$throwRuntimeError("index out o
|
||
|
$packages["hash/crc32"]=(function(){var $pkg={},A,B,Q,R,S,C,I,D,H,J,K,L,M,P;A=$packages["hash"];B=$packages["sync"];C=$pkg.Table=$newType(1024,$kindArray,"crc32.Table","Table","hash/crc32",null);I=$pkg.digest=$newType(0,$kindStruct,"crc32.digest","digest","hash/crc32",function(crc_,tab_){this.$val=this;this.crc=crc_!==undefined?crc_:0;this.tab=tab_!==undefined?tab_:Q.nil;});H=function(a){var b,c,d,e,f;b=C.zero();c=0;while(c<256){d=(c>>>0);e=0;while(e<8){if(((d&1)>>>0)===1){d=(((d>>>1>>>0))^a)>>>0;}else{d=(f=(1),f<32?(d>>>f):0)>>>0;}e=e+(1)>>0;}b.nilCheck,(c<0||c>=b.length)?$throwRuntimeError("index out of range"):b[c]=d;c=c+(1)>>0;}return b;};J=$pkg.New=function(a){return new I.Ptr(0,a);};K=$pkg.NewIEEE=function(){return J($pkg.IEEETable);};I.Ptr.prototype.Size=function(){var a;a=this;return 4;};I.prototype.Size=function(){return this.$val.Size();};I.Ptr.prototype.BlockSize=function(){var a;a=this;return 1;};I.prototype.BlockSize=function(){return this.$val.BlockSize();};I.Ptr.prototype.Reset=function(){var a;a=this;a.crc=0;};I.prototype.Reset=function(){return this.$val.Reset();};L=function(a,b,c){var d,e,f,g;a=~a>>>0;d=c;e=0;while(e<d.$length){f=((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);a=((g=((a<<24>>>24)^f)<<24>>>24,(b.nilCheck,((g<0||g>=b.length)?$throwRuntimeError("index out of range"):b[g])))^((a>>>8>>>0)))>>>0;e++;}return~a>>>0;};M=$pkg.Update=function(a,b,c){if($equal(b,D,C)){return P(a,c);}return L(a,b,c);};I.Ptr.prototype.Write=function(a){var b=0,c=$ifaceNil,d,e,f;d=this;d.crc=M(d.crc,d.tab,a);e=a.$length;f=$ifaceNil;b=e;c=f;return[b,c];};I.prototype.Write=function(a){return this.$val.Write(a);};I.Ptr.prototype.Sum32=function(){var a;a=this;return a.crc;};I.prototype.Sum32=function(){return this.$val.Sum32();};I.Ptr.prototype.Sum=function(a){var b,c;b=this;c=b.Sum32();return $append(a,((c>>>24>>>0)<<24>>>24),((c>>>16>>>0)<<24>>>24),((c>>>8>>>0)<<24>>>24),(c<<24>>>24));};I.prototype.Sum=function(a){return this.$val.Sum(a);};P=function(a,b){return L(a,D,b);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}Q=$ptrType(C);R=$sliceType($Uint8);S=$ptrType(I);C.init($Uint32,256);S.methods=[["BlockSize","BlockSize","",$funcType([],[$Int],false),-1],["Reset","Reset","",$funcType([],[],false),-1],["Size","Size","",$funcType([],[$Int],false),-1],["Sum","Sum","",$funcType([R],[R],false),-1],["Sum32","Sum32","",$funcType([],[$Uint32],false),-1],["Write","Write","",$funcType([R],[$Int,$error],false),-1]];I.init([["crc","crc","hash/crc32",$Uint32,""],["tab","tab","hash/crc32",Q,""]]);D=Q.nil;$pkg.IEEETable=H(3988292384);}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["image/png"]=(function(){var $pkg={},I,A,B,C,D,E,F,G,H,J,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AZ,BA,BB,N,P,Q,S,O,R,K,M,T,U,V,W;I=$packages["bufio"];A=$packages["compress/zlib"];B=$packages["encoding/binary"];C=$packages["fmt"];D=$packages["hash"];E=$packages["hash/crc32"];F=$packages["image"];G=$packages["image/color"];H=$packages["io"];J=$packages["strconv"];N=$pkg.interlaceScan=$newType(0,$kindStruct,"png.interlaceScan","interlaceScan","image/png",function(xFactor_,yFactor_,xOffset_,yOffset_){this.$val=this;this.xFactor=xFactor_!==undefined?xFactor_:0;this.yFactor=yFactor_!==undefined?yFactor_:0;this.xOffset=xOffset_!==undefined?xOffset_:0;this.yOffset=yOffset_!==undefined?yOffset_:0;});P=$pkg.decoder=$newType(0,$kindStruct,"png.decoder","decoder","image/png",function(r_,img_,crc_,width_,height_,depth_,palette_,cb_,stage_,idatLength_,tmp_,interlace_){this.$val=this;this.r=r_!==undefined?r_:$ifaceNil;this.img=img_!==undefined?img_:$ifaceNil;this.crc=crc_!==undefined?crc_:$ifaceNil;this.width=width_!==undefined?width_:0;this.height=height_!==undefined?height_:0;this.depth=depth_!==undefined?depth_:0;this.palette=palette_!==undefined?palette_:G.Palette.nil;this.cb=cb_!==undefined?cb_:0;this.stage=stage_!==undefined?stage_:0;this.idatLength=idatLength_!==undefined?idatLength_:0;this.tmp=tmp_!==undefined?tmp_:AW.zero();this.interlace=interlace_!==undefined?interlace_:0;});Q=$pkg.FormatError=$newType(8,$kindString,"png.FormatError","FormatError","image/png",null);S=$pkg.UnsupportedError=$newType(8,$kindString,"png.UnsupportedError","UnsupportedError","image/png",null);K=function(a){var b;b=a>>31>>0;return(((a^b)>>0))-b>>0;};M=function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;d=0;e=0;f=0;g=0;h=0;i=0;j=d;k=e;l=f;m=g;n=h;o=i;p=0;while(p<c){q=0;r=0;j=q;l=r;s=p;while(s<a.$length){k=(((s<0||s>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+s])>>0);m=k-l>>0;n=j-l>>0;o=K(m+n>>0);m=K(m);n=K(n);if(m<=n&&m<=o){}else if(n<=o){j=k;}else{j=l;}j=j+((((s<0||s>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+s])>>0))>>0;j=j&(255);(s<0||s>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+s]=(j<<24>>>24);l=k;s=s+(c)>>0;}p=p+(1)>>0;}};Q.prototype.Error=function(){var a;a=this.$val!==undefined?this.$val:this;return"png: invalid format: "+a;};$ptrType(Q).prototype.Error=function(){return new Q(this.$get()).Error();};S.prototype.Error=function(){var a;a=this.$val!==undefined?this.$val:this;return"png: unsupported feature: "+a;};$ptrType(S).prototype.Error=function(){return new S(this.$get()).Error();};T=function(a,b){if(a<b){return a;}return b;};P.Ptr.prototype.parseIHDR=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;b=this;if(!((a===13))){return new Q("bad IHDR length");}c=H.ReadFull(b.r,$subslice(new AJ(b.tmp),0,13));d=c[1];if(!($interfaceIsEqual(d,$ifaceNil))){return d;}b.crc.Write($subslice(new AJ(b.tmp),0,13));if(!((b.tmp[10]===0))){return new S("compression method");}if(!((b.tmp[11]===0))){return new S("filter method");}if(!((b.tmp[12]===0))&&!((b.tmp[12]===1))){return new Q("invalid interlace method");}b.interlace=(b.tmp[12]>>0);e=(B.BigEndian.Uint32($subslice(new AJ(b.tmp),0,4))>>0);f=(B.BigEndian.Uint32($subslice(new AJ(b.tmp),4,8))>>0);if(e<0||f<0){return new Q("negative dimension");}g=$mul64(new $Int64(0,e),new $Int64(0,f));if(!((h=new $Int64(0,((g.$low+((g.$high>>31)*4294967296))>>0)),(g.$high===h.$high&&g.$low===h.$low)))){return new S("dimension overflow");}b.cb=0;b.depth=(b.tmp[8]>>0);i=b.depth;if(i===1){j=b.tmp[9];if(j===0){b.cb=1;}else if(j===3){b.cb=7;}}else if(i===2){k=b.tmp[9];if(k===0){b.cb=2;}else if(k===3){b.cb=8;}}else if(i===4){l=b.tmp[9];if(l===0){b.cb=3;}else if(l===3){b.cb=9;}}else if(i===8){m=b.tmp[9];if(m===0){b.cb=4;}else if(m===2){b.cb=6;}else if(m===3){b.cb=10;}else if(m===4){b.cb=5;}else if(m===6){b.cb=11;}}else if(i===16){n=b.tmp[9];if(n===0){b.cb=12;}else if(n===2){b.cb=14;}else if(n===4){b.cb=13;}else if(n===6){b.cb=15;}}if(b.cb===0){return new S(C.Sprintf("bit depth %d, color type %d",new AK([new $Uint8(b.tmp[8]),new $Uint
|
||
|
$packages["path/filepath"]=(function(){var $pkg={},G,A,B,C,D,E,F;G=$packages["bytes"];A=$packages["errors"];B=$packages["os"];C=$packages["runtime"];D=$packages["sort"];E=$packages["strings"];F=$packages["unicode/utf8"];$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=G.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$pkg.ErrBadPattern=A.New("syntax error in pattern");$pkg.SkipDir=A.New("skip this directory");}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["io/ioutil"]=(function(){var $pkg={},A,B,C,F,D,G,E,H,Y,Z,AA,R;A=$packages["bytes"];B=$packages["io"];C=$packages["os"];F=$packages["path/filepath"];D=$packages["sort"];G=$packages["strconv"];E=$packages["sync"];H=$packages["time"];$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}Y=$sliceType($emptyInterface);Z=$sliceType($Uint8);AA=$ptrType(Z);R=new E.Pool.Ptr(0,0,Y.nil,(function(){var a;a=Z.make(8192);return new AA(function(){return a;},function($v){a=$v;});}));}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["path"]=(function(){var $pkg={},A,B,C;A=$packages["errors"];B=$packages["strings"];C=$packages["unicode/utf8"];$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$pkg.ErrBadPattern=A.New("syntax error in pattern");}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["github.com/hajimehoshi/ebiten/internal/assets"]=(function(){var $pkg={},A,D,B,C,E,F,G,H,I,J,K;A=$packages["bytes"];D=$packages["fmt"];B=$packages["image"];C=$packages["image/png"];E=$packages["io/ioutil"];F=$packages["os"];G=$packages["path"];H=$packages["path/filepath"];I=$packages["reflect"];J=$packages["strings"];K=$packages["time"];$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}$r=I.$init($BLOCKING);$s=9;case 9:if($r&&$r.$blocking){$r=$r();}$r=J.$init($BLOCKING);$s=10;case 10:if($r&&$r.$blocking){$r=$r();}$r=K.$init($BLOCKING);$s=11;case 11:if($r&&$r.$blocking){$r=$r();}}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["image/color/palette"]=(function(){var $pkg={},A;A=$packages["image/color"];$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["compress/lzw"]=(function(){var $pkg={},A,B,C,D,N,O,P,S,T,U,V,F,G,L,H;A=$packages["bufio"];B=$packages["errors"];C=$packages["fmt"];D=$packages["io"];F=$pkg.decoder=$newType(0,$kindStruct,"lzw.decoder","decoder","compress/lzw",function(r_,bits_,nBits_,width_,read_,litWidth_,err_,clear_,eof_,hi_,overflow_,last_,suffix_,prefix_,output_,o_,toRead_){this.$val=this;this.r=r_!==undefined?r_:$ifaceNil;this.bits=bits_!==undefined?bits_:0;this.nBits=nBits_!==undefined?nBits_:0;this.width=width_!==undefined?width_:0;this.read=read_!==undefined?read_:$throwNilPointerError;this.litWidth=litWidth_!==undefined?litWidth_:0;this.err=err_!==undefined?err_:$ifaceNil;this.clear=clear_!==undefined?clear_:0;this.eof=eof_!==undefined?eof_:0;this.hi=hi_!==undefined?hi_:0;this.overflow=overflow_!==undefined?overflow_:0;this.last=last_!==undefined?last_:0;this.suffix=suffix_!==undefined?suffix_:S.zero();this.prefix=prefix_!==undefined?prefix_:T.zero();this.output=output_!==undefined?output_:U.zero();this.o=o_!==undefined?o_:0;this.toRead=toRead_!==undefined?toRead_:N.nil;});F.Ptr.prototype.readLSB=function(){var a,b,c,d,e,f,g,h;a=this;while(a.nBits<a.width){b=a.r.ReadByte();c=b[0];d=b[1];if(!($interfaceIsEqual(d,$ifaceNil))){return[0,d];}a.bits=(a.bits|(((e=a.nBits,e<32?((c>>>0)<<e):0)>>>0)))>>>0;a.nBits=a.nBits+(8)>>>0;}g=(((a.bits&((((f=a.width,f<32?(1<<f):0)>>>0)-1>>>0)))>>>0)<<16>>>16);a.bits=(h=(a.width),h<32?(a.bits>>>h):0)>>>0;a.nBits=a.nBits-(a.width)>>>0;return[g,$ifaceNil];};F.prototype.readLSB=function(){return this.$val.readLSB();};F.Ptr.prototype.readMSB=function(){var a,b,c,d,e,f,g,h;a=this;while(a.nBits<a.width){b=a.r.ReadByte();c=b[0];d=b[1];if(!($interfaceIsEqual(d,$ifaceNil))){return[0,d];}a.bits=(a.bits|(((e=((24-a.nBits>>>0)),e<32?((c>>>0)<<e):0)>>>0)))>>>0;a.nBits=a.nBits+(8)>>>0;}g=(((f=((32-a.width>>>0)),f<32?(a.bits>>>f):0)>>>0)<<16>>>16);a.bits=(h=(a.width),h<32?(a.bits<<h):0)>>>0;a.nBits=a.nBits-(a.width)>>>0;return[g,$ifaceNil];};F.prototype.readMSB=function(){return this.$val.readMSB();};F.Ptr.prototype.Read=function(a){var b,c;b=this;while(true){if(b.toRead.$length>0){c=$copySlice(a,b.toRead);b.toRead=$subslice(b.toRead,c);return[c,$ifaceNil];}if(!($interfaceIsEqual(b.err,$ifaceNil))){return[0,b.err];}b.decode();}};F.prototype.Read=function(a){return this.$val.Read(a);};F.Ptr.prototype.decode=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab;a=this;while(true){b=a.read(a);c=b[0];d=b[1];if(!($interfaceIsEqual(d,$ifaceNil))){if($interfaceIsEqual(d,D.EOF)){d=D.ErrUnexpectedEOF;}a.err=d;return;}if(c<a.clear){(e=a.output,f=a.o,(f<0||f>=e.length)?$throwRuntimeError("index out of range"):e[f]=(c<<24>>>24));a.o=a.o+(1)>>0;if(!((a.last===65535))){(g=a.suffix,h=a.hi,(h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h]=(c<<24>>>24));(i=a.prefix,j=a.hi,(j<0||j>=i.length)?$throwRuntimeError("index out of range"):i[j]=a.last);}}else if(c===a.clear){a.width=1+(a.litWidth>>>0)>>>0;a.hi=a.eof;a.overflow=(k=a.width,k<32?(1<<k):0)<<16>>>16;a.last=65535;continue;}else if(c===a.eof){a.flush();a.err=D.EOF;return;}else if(c<=a.hi){l=c;m=8191;n=l;o=m;if(c===a.hi){n=a.last;while(n>=a.clear){n=(p=a.prefix,((n<0||n>=p.length)?$throwRuntimeError("index out of range"):p[n]));}(q=a.output,(o<0||o>=q.length)?$throwRuntimeError("index out of range"):q[o]=(n<<24>>>24));o=o-(1)>>0;n=a.last;}while(n>=a.clear){(s=a.output,(o<0||o>=s.length)?$throwRuntimeError("index out of range"):s[o]=(r=a.suffix,((n<0||n>=r.length)?$throwRuntimeError("index out of range"):r[n])));o=o-(1)>>0;n=(t=a.prefix,((n<0||n>=t.length)?$throwRuntimeError("index out of range"):t[n]));}(u=a.output,(o<0||o>=u.length)?$throwRuntimeError("index out of range"):u[o]=(n<<24>>>24));a.o=a.o+($copySlice($subslice(new N(a.output),a.o),$subslice(new N(a.output),o)))>>0;if(!((a.last===65535))){(v=a.suffix,w=a.hi,(w<0||w>=v.length)?$throwRuntimeError("index out of range"):v[w]=(n<<24>>>24));(x=a.prefix,y=a.hi,(y<0||y>=x.length)?$throwRuntimeError("index out of range"):x[y]=a.last);}}else{a.err=B.New("lzw: invalid code");return;}z=c;aa=a.hi+1<<16>>>
|
||
|
$packages["image/gif"]=(function(){var $pkg={},A,B,C,D,E,F,H,I,G,AG,AH,AI,AJ,AK,AL,AN,AO,AQ,AS,AT,M,N,O,P,J,K,L,Q,R,S,V,W;A=$packages["bufio"];B=$packages["compress/lzw"];C=$packages["errors"];D=$packages["fmt"];E=$packages["image"];F=$packages["image/color"];H=$packages["image/color/palette"];I=$packages["image/draw"];G=$packages["io"];M=$pkg.reader=$newType(8,$kindInterface,"gif.reader","reader","image/gif",null);N=$pkg.decoder=$newType(0,$kindStruct,"gif.decoder","decoder","image/gif",function(r_,vers_,width_,height_,flags_,headerFields_,backgroundIndex_,loopCount_,delayTime_,aspect_,imageFields_,transparentIndex_,hasTransparentIndex_,pixelSize_,globalColorMap_,delay_,image_,tmp_){this.$val=this;this.r=r_!==undefined?r_:$ifaceNil;this.vers=vers_!==undefined?vers_:"";this.width=width_!==undefined?width_:0;this.height=height_!==undefined?height_:0;this.flags=flags_!==undefined?flags_:0;this.headerFields=headerFields_!==undefined?headerFields_:0;this.backgroundIndex=backgroundIndex_!==undefined?backgroundIndex_:0;this.loopCount=loopCount_!==undefined?loopCount_:0;this.delayTime=delayTime_!==undefined?delayTime_:0;this.aspect=aspect_!==undefined?aspect_:0;this.imageFields=imageFields_!==undefined?imageFields_:0;this.transparentIndex=transparentIndex_!==undefined?transparentIndex_:0;this.hasTransparentIndex=hasTransparentIndex_!==undefined?hasTransparentIndex_:false;this.pixelSize=pixelSize_!==undefined?pixelSize_:0;this.globalColorMap=globalColorMap_!==undefined?globalColorMap_:F.Palette.nil;this.delay=delay_!==undefined?delay_:AO.nil;this.image=image_!==undefined?image_:AN.nil;this.tmp=tmp_!==undefined?tmp_:AQ.zero();});O=$pkg.blockReader=$newType(0,$kindStruct,"gif.blockReader","blockReader","image/gif",function(r_,slice_,err_,tmp_){this.$val=this;this.r=r_!==undefined?r_:$ifaceNil;this.slice=slice_!==undefined?slice_:AH.nil;this.err=err_!==undefined?err_:$ifaceNil;this.tmp=tmp_!==undefined?tmp_:AJ.zero();});P=$pkg.interlaceScan=$newType(0,$kindStruct,"gif.interlaceScan","interlaceScan","image/gif",function(skip_,start_){this.$val=this;this.skip=skip_!==undefined?skip_:0;this.start=start_!==undefined?start_:0;});O.Ptr.prototype.Read=function(a){var b,c,d,e,f;b=this;if(!($interfaceIsEqual(b.err,$ifaceNil))){return[0,b.err];}if(a.$length===0){return[0,$ifaceNil];}if(b.slice.$length===0){c=0;d=b.r.ReadByte();c=d[0];b.err=d[1];if(!($interfaceIsEqual(b.err,$ifaceNil))){return[0,b.err];}if(c===0){b.err=G.EOF;return[0,b.err];}b.slice=$subslice(new AH(b.tmp),0,c);e=G.ReadFull(b.r,b.slice);b.err=e[1];if(!($interfaceIsEqual(b.err,$ifaceNil))){return[0,b.err];}}f=$copySlice(a,b.slice);b.slice=$subslice(b.slice,f);return[f,$ifaceNil];};O.prototype.Read=function(a){return this.$val.Read(a);};N.Ptr.prototype.decode=function(a,b){var $deferred=[],$err=null,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac,ad,ae,af,ag,ah;try{$deferFrames.push($deferred);c=this;d=$assertType(a,M,true);e=d[0];f=d[1];if(f){c.r=e;}else{c.r=A.NewReader(a);}g=c.readHeaderAndScreenDescriptor();if(!($interfaceIsEqual(g,$ifaceNil))){return g;}if(b){return $ifaceNil;}if(!((((c.headerFields&128)>>>0)===0))){h=c.readColorMap();c.globalColorMap=h[0];g=h[1];if(!($interfaceIsEqual(g,$ifaceNil))){return g;}}while(true){i=c.r.ReadByte();j=i[0];k=i[1];if(!($interfaceIsEqual(k,$ifaceNil))){return k;}l=j;if(l===33){k=c.readExtension();if(!($interfaceIsEqual(k,$ifaceNil))){return k;}}else if(l===44){m=c.newImageFromDescriptor();n=m[0];o=m[1];if(!($interfaceIsEqual(o,$ifaceNil))){return o;}p=!((((c.imageFields&128)>>>0)===0));if(p){q=c.readColorMap();n.Palette=q[0];o=q[1];if(!($interfaceIsEqual(o,$ifaceNil))){return o;}}else{n.Palette=c.globalColorMap;}if(c.hasTransparentIndex&&(c.transparentIndex>>0)<n.Palette.$length){if(!p){n.Palette=$appendSlice(F.Palette.nil,c.globalColorMap);}(s=n.Palette,t=c.transparentIndex,(t<0||t>=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+t]=(r=new F.RGBA.Ptr(0,0,0,0),new r.constructor.Struct(r)));}u=c.r.ReadByte();v=u[0];o=u[1];if(!($interfaceIsEqual(o,$ifaceNil))){return o;}if(v<2||v>8){return D.Errorf("gif:
|
||
|
$packages["github.com/hajimehoshi/ebiten/ebitenutil"]=(function(){var $pkg={},L,M,N,O,A,B,F,C,G,H,I,J,D,E,K,Y,AA,AB,AG,AH,AI,AJ,U,V,X;L=$packages["bytes"];M=$packages["errors"];N=$packages["fmt"];O=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["github.com/hajimehoshi/ebiten"];B=$packages["github.com/hajimehoshi/ebiten/internal/assets"];F=$packages["image"];C=$packages["image/color"];G=$packages["image/color/palette"];H=$packages["image/draw"];I=$packages["image/gif"];J=$packages["io"];D=$packages["math"];E=$packages["strings"];K=$packages["sync"];V=function(){var a,b,c,d,e,f,g,h,i,j,k;a=new AA([]);b=new AB([0,128,255]);c=0;while(c<b.$length){d=((c<0||c>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]);e=new AB([0,128,255]);f=0;while(f<e.$length){g=((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);h=new AB([0,128,255]);i=0;while(i<h.$length){j=((i<0||i>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);a=$append(a,(k=new C.RGBA.Ptr(d,g,j,255),new k.constructor.Struct(k)));i++;}f++;}c++;}U=$subslice(new C.Palette(a.$array),a.$offset,a.$offset+a.$length);};X=$pkg.NewImageFromFile=function(a,b,$b){var $this=this,$args=arguments,$r,$s=0,c,d,e,f,g,h,i,j,k,l,m;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:c=$ifaceNil;d=null;e=new AH(0);f=new($global.XMLHttpRequest)();f.open($externalize("GET",$String),$externalize(a,$String),$externalize(true,$Bool));f.responseType=$externalize("arraybuffer",$String);f.onload=$externalize((function(){var $deferred=[],$err=null,g,h;try{$deferFrames.push($deferred);$deferred.push([function(g){$close(g);},[e]]);h=$parseInt(f.status)>>0;if(200<=h&&h<400){d=f.response;return;}c=M.New(N.Sprintf("http error: %d",new AI([new $Int(h)])));}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}}),AJ);f.onerror=$externalize((function(){var $deferred=[],$err=null,g;try{$deferFrames.push($deferred);$deferred.push([function(g){$close(g);},[e]]);c=M.New("http error");}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}}),AJ);f.send();g=$recv(e,$BLOCKING);$s=1;case 1:if(g&&g.$blocking){g=g();}g[0];if(!($interfaceIsEqual(c,$ifaceNil))){return[Y.nil,$ifaceNil,c];}h=$assertType($internalize(new($global.Uint8Array)(d),$emptyInterface),AB);i=L.NewBuffer(h);j=F.Decode(i);k=j[0];c=j[2];if(!($interfaceIsEqual(c,$ifaceNil))){return[Y.nil,$ifaceNil,c];}l=A.NewImageFromImage(k,b);m=l[0];c=l[1];if(!($interfaceIsEqual(c,$ifaceNil))){return[Y.nil,$ifaceNil,c];}return[m,k,$ifaceNil];case-1:}return;}};$f.$blocking=true;return $f;};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=L.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=M.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=N.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=O.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=9;case 9:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=10;case 10:if($r&&$r.$blocking){$r=$r();}$r=I.$init($BLOCKING);$s=11;case 11:if($r&&$r.$blocking){$r=$r();}$r=J.$init($BLOCKING);$s=12;case 12:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=13;case 13:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=14;case 14:if($r&&$r.$blocking){$r=$r();}$r=K.$init($BLOCKING);$s=15;case 15:if($r&&$r.$blocking){$r=$r();}Y=$ptrType(A.Image);AA=$sliceType(C.Color);AB=$sliceType($Uint8);AG=$structType([]);AH=$chanType(AG,false,false);AI=$sliceType($emptyInterface);AJ=$funcType([],[],false);U=C.Palette.nil;V();}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$packages["image/jpeg"]=(function(){var $pkg={},D,E,B,C,A,AQ,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BF,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,G,I,K,L,M,P,Q,AB,AD,H,N,R,AC,AE,J,S,T,U,AF;D=$packages["bufio"];E=$packages["errors"];B=$packages["image"];C=$packages["image/color"];A=$packages["io"];G=$pkg.huffman=$newType(0,$kindStruct,"jpeg.huffman","huffman","image/jpeg",function(nCodes_,lut_,vals_,minCodes_,maxCodes_,valsIndices_){this.$val=this;this.nCodes=nCodes_!==undefined?nCodes_:0;this.lut=lut_!==undefined?lut_:BI.zero();this.vals=vals_!==undefined?vals_:BJ.zero();this.minCodes=minCodes_!==undefined?minCodes_:AT.zero();this.maxCodes=maxCodes_!==undefined?maxCodes_:AT.zero();this.valsIndices=valsIndices_!==undefined?valsIndices_:AT.zero();});I=$pkg.block=$newType(256,$kindArray,"jpeg.block","block","image/jpeg",null);K=$pkg.FormatError=$newType(8,$kindString,"jpeg.FormatError","FormatError","image/jpeg",null);L=$pkg.UnsupportedError=$newType(8,$kindString,"jpeg.UnsupportedError","UnsupportedError","image/jpeg",null);M=$pkg.component=$newType(0,$kindStruct,"jpeg.component","component","image/jpeg",function(h_,v_,c_,tq_){this.$val=this;this.h=h_!==undefined?h_:0;this.v=v_!==undefined?v_:0;this.c=c_!==undefined?c_:0;this.tq=tq_!==undefined?tq_:0;});P=$pkg.bits=$newType(0,$kindStruct,"jpeg.bits","bits","image/jpeg",function(a_,m_,n_){this.$val=this;this.a=a_!==undefined?a_:0;this.m=m_!==undefined?m_:0;this.n=n_!==undefined?n_:0;});Q=$pkg.decoder=$newType(0,$kindStruct,"jpeg.decoder","decoder","image/jpeg",function(r_,bits_,bytes_,width_,height_,img1_,img3_,ri_,nComp_,progressive_,eobRun_,comp_,progCoeffs_,huff_,quant_,tmp_){this.$val=this;this.r=r_!==undefined?r_:$ifaceNil;this.bits=bits_!==undefined?bits_:new P.Ptr();this.bytes=bytes_!==undefined?bytes_:new BN.Ptr();this.width=width_!==undefined?width_:0;this.height=height_!==undefined?height_:0;this.img1=img1_!==undefined?img1_:AV.nil;this.img3=img3_!==undefined?img3_:AW.nil;this.ri=ri_!==undefined?ri_:0;this.nComp=nComp_!==undefined?nComp_:0;this.progressive=progressive_!==undefined?progressive_:false;this.eobRun=eobRun_!==undefined?eobRun_:0;this.comp=comp_!==undefined?comp_:BO.zero();this.progCoeffs=progCoeffs_!==undefined?progCoeffs_:BP.zero();this.huff=huff_!==undefined?huff_:BR.zero();this.quant=quant_!==undefined?quant_:BF.zero();this.tmp=tmp_!==undefined?tmp_:BS.zero();});AB=$pkg.huffmanSpec=$newType(0,$kindStruct,"jpeg.huffmanSpec","huffmanSpec","image/jpeg",function(count_,value_){this.$val=this;this.count=count_!==undefined?count_:BW.zero();this.value=value_!==undefined?value_:AS.nil;});AD=$pkg.huffmanLUT=$newType(12,$kindSlice,"jpeg.huffmanLUT","huffmanLUT","image/jpeg",null);Q.Ptr.prototype.ensureNBits=function(a){var b,c,d,e,f;b=this;while(true){c=b.readByteStuffedByte();d=c[0];e=c[1];if(!($interfaceIsEqual(e,$ifaceNil))){if($interfaceIsEqual(e,A.EOF)){return new K(H);}return e;}b.bits.a=((b.bits.a<<8>>>0)|(d>>>0))>>>0;b.bits.n=b.bits.n+(8)>>0;if(b.bits.m===0){b.bits.m=128;}else{b.bits.m=(f=(8),f<32?(b.bits.m<<f):0)>>>0;}if(b.bits.n>=a){break;}}return $ifaceNil;};Q.prototype.ensureNBits=function(a){return this.$val.ensureNBits(a);};Q.Ptr.prototype.receiveExtend=function(a){var b,c,d,e,f,g,h,i;b=this;if(b.bits.n<(a>>0)){c=b.ensureNBits((a>>0));if(!($interfaceIsEqual(c,$ifaceNil))){return[0,c];}}b.bits.n=b.bits.n-((a>>0))>>0;b.bits.m=(d=(a),d<32?(b.bits.m>>>d):0)>>>0;f=(e=a,e<32?(1<<e):0)>>0;h=(((g=(b.bits.n<<24>>>24),g<32?(b.bits.a>>>g):0)>>>0)>>0)&((f-1>>0));if(h<(f>>1>>0)){h=h+(((((i=a,i<32?(-1<<i):0)>>0))+1>>0))>>0;}return[h,$ifaceNil];};Q.prototype.receiveExtend=function(a){return this.$val.receiveExtend(a);};Q.Ptr.prototype.processDHT=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw;b=this;while(a>0){if(a<17){return new K("DHT has wrong length");}c=b.readFull($subslice(new AS(b.tmp),0,17));if(!($interfaceIsEqual(c,$ifaceNil))){return c;}d=b.tmp[0]>>>4<<24>>>24;if(d>1){return new K("bad Tc value");}e=(b.tmp[0]&15)>>>0;if(e>3||!b.progressive&&e>1){return new K("bad T
|
||
|
$packages["log"]=(function(){var $pkg={},A,B,C,D,E,F,Y,Z,AA,AB,AC,G,I,H,J,S;A=$packages["fmt"];B=$packages["io"];C=$packages["os"];D=$packages["runtime"];E=$packages["sync"];F=$packages["time"];G=$pkg.Logger=$newType(0,$kindStruct,"log.Logger","Logger","log",function(mu_,prefix_,flag_,out_,buf_){this.$val=this;this.mu=mu_!==undefined?mu_:new E.Mutex.Ptr();this.prefix=prefix_!==undefined?prefix_:"";this.flag=flag_!==undefined?flag_:0;this.out=out_!==undefined?out_:$ifaceNil;this.buf=buf_!==undefined?buf_:Y.nil;});H=$pkg.New=function(a,b,c){return new G.Ptr(new E.Mutex.Ptr(),b,c,a,Y.nil);};J=function(a,b,c){var d,e,f,g,h;d=(b>>>0);if((d===0)&&c<=1){a.$set($append(a.$get(),48));return;}e=$clone(Z.zero(),Z);f=32;while(d>0||c>0){f=f-(1)>>0;c=c-(1)>>0;(f<0||f>=e.length)?$throwRuntimeError("index out of range"):e[f]=((g=d%10,g===g?g:$throwRuntimeError("integer divide by zero"))<<24>>>24)+48<<24>>>24;d=(h=d/(10),(h===h&&h!==1/0&&h!==-1/0)?h>>>0:$throwRuntimeError("integer divide by zero"));}a.$set($appendSlice(a.$get(),$subslice(new Y(e),f)));};G.Ptr.prototype.formatHeader=function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p;e=this;b=$clone(b,F.Time);a.$set($appendSlice(a.$get(),new Y($stringToBytes(e.prefix))));if(!(((e.flag&7)===0))){if(!(((e.flag&1)===0))){f=b.Date();g=f[0];h=f[1];i=f[2];J(a,g,4);a.$set($append(a.$get(),47));J(a,(h>>0),2);a.$set($append(a.$get(),47));J(a,i,2);a.$set($append(a.$get(),32));}if(!(((e.flag&6)===0))){j=b.Clock();k=j[0];l=j[1];m=j[2];J(a,k,2);a.$set($append(a.$get(),58));J(a,l,2);a.$set($append(a.$get(),58));J(a,m,2);if(!(((e.flag&4)===0))){a.$set($append(a.$get(),46));J(a,(n=b.Nanosecond()/1000,(n===n&&n!==1/0&&n!==-1/0)?n>>0:$throwRuntimeError("integer divide by zero")),6);}a.$set($append(a.$get(),32));}}if(!(((e.flag&24)===0))){if(!(((e.flag&16)===0))){o=c;p=c.length-1>>0;while(p>0){if(c.charCodeAt(p)===47){o=c.substring((p+1>>0));break;}p=p-(1)>>0;}c=o;}a.$set($appendSlice(a.$get(),new Y($stringToBytes(c))));a.$set($append(a.$get(),58));J(a,d,-1);a.$set($appendSlice(a.$get(),new Y($stringToBytes(": "))));}};G.prototype.formatHeader=function(a,b,c,d){return this.$val.formatHeader(a,b,c,d);};G.Ptr.prototype.Output=function(a,b){var $deferred=[],$err=null,c,d,e,f,g,h,i,j;try{$deferFrames.push($deferred);c=this;d=$clone(F.Now(),F.Time);e="";f=0;c.mu.Lock();$deferred.push([$methodVal(c.mu,"Unlock"),[]]);if(!(((c.flag&24)===0))){c.mu.Unlock();g=false;h=D.Caller(a);e=h[1];f=h[2];g=h[3];if(!g){e="???";f=0;}c.mu.Lock();}c.buf=$subslice(c.buf,0,0);c.formatHeader(new AA(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c),d,e,f);c.buf=$appendSlice(c.buf,new Y($stringToBytes(b)));if(b.length>0&&!((b.charCodeAt((b.length-1>>0))===10))){c.buf=$append(c.buf,10);}i=c.out.Write(c.buf);j=i[1];return j;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};G.prototype.Output=function(a,b){return this.$val.Output(a,b);};G.Ptr.prototype.Printf=function(a,b){var c;c=this;c.Output(2,A.Sprintf(a,b));};G.prototype.Printf=function(a,b){return this.$val.Printf(a,b);};G.Ptr.prototype.Print=function(a){var b;b=this;b.Output(2,A.Sprint(a));};G.prototype.Print=function(a){return this.$val.Print(a);};G.Ptr.prototype.Println=function(a){var b;b=this;b.Output(2,A.Sprintln(a));};G.prototype.Println=function(a){return this.$val.Println(a);};G.Ptr.prototype.Fatal=function(a){var b;b=this;b.Output(2,A.Sprint(a));C.Exit(1);};G.prototype.Fatal=function(a){return this.$val.Fatal(a);};G.Ptr.prototype.Fatalf=function(a,b){var c;c=this;c.Output(2,A.Sprintf(a,b));C.Exit(1);};G.prototype.Fatalf=function(a,b){return this.$val.Fatalf(a,b);};G.Ptr.prototype.Fatalln=function(a){var b;b=this;b.Output(2,A.Sprintln(a));C.Exit(1);};G.prototype.Fatalln=function(a){return this.$val.Fatalln(a);};G.Ptr.prototype.Panic=function(a){var b,c;b=this;c=A.Sprint(a);b.Output(2,c);$panic(new $String(c));};G.prototype.Panic=function(a){return this.$val.Panic(a);};G.Ptr.prototype.Panicf=function(a,b){var c,d;c=this;d=A.Sprintf(a,b);c.Output(2,d);$panic(new $String(d));};G.prototype.Panicf=function(a,b){
|
||
|
$packages["github.com/hajimehoshi/ebiten/example/rotate"]=(function(){var $pkg={},A,B,C,D,E,J,K,L,F,G,H,I;A=$packages["github.com/hajimehoshi/ebiten"];B=$packages["github.com/hajimehoshi/ebiten/ebitenutil"];C=$packages["image/jpeg"];D=$packages["log"];E=$packages["math"];H=function(a){var b,c,d,e,f,g;F=F+(1)>>0;b=G.Size();c=b[0];d=b[1];e=new A.DrawImageOptions.Ptr($ifaceNil,new A.GeoM.Ptr(),new A.ColorM.Ptr(),K.nil);e.GeoM.Translate(-c/2,-d/2);e.GeoM.Rotate((f=F%360,f===f?f:$throwRuntimeError("integer divide by zero"))*2*3.141592653589793/360);e.GeoM.Translate(160,120);g=a.DrawImage(G,e);if(!($interfaceIsEqual(g,$ifaceNil))){return g;}return $ifaceNil;};I=function($b){var $this=this,$args=arguments,$r,$s=0,a,b,c,d,e;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:a=$ifaceNil;c=B.NewImageFromFile("images/gophers.jpg",0,$BLOCKING);$s=1;case 1:if(c&&c.$blocking){c=c();}b=c;G=b[0];a=b[2];if(!($interfaceIsEqual(a,$ifaceNil))){D.Fatal(new L([a]));}d=A.Run(H,320,240,1,"Rotate (Ebiten Demo)",$BLOCKING);$s=2;case 2:if(d&&d.$blocking){d=d();}e=d;if(!($interfaceIsEqual(e,$ifaceNil))){}else{$s=3;continue;}D.Fatal(new L([e]));case 3:case-1:}return;}};$f.$blocking=true;return $f;};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $f=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}J=$ptrType(A.Image);K=$sliceType(A.ImagePart);L=$sliceType($emptyInterface);F=0;G=J.nil;$r=I($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}}return;}};$f.$blocking=true;return $f;};return $pkg;})();
|
||
|
$go($packages["github.com/hajimehoshi/ebiten/example/rotate"].$init, [], true);
|
||
|
$flushConsole();
|
||
|
|
||
|
})();
|
||
|
//# sourceMappingURL=rotate.js.map
|