-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
124 lines (123 loc) · 53.5 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
var h;h||(h=typeof Module !== 'undefined' ? Module : {});var aa=Object.assign({},h),ba=[],ca="./this.program",da=(a,b)=>{throw b;},k="",ea;"undefined"!=typeof document&&document.currentScript&&(k=document.currentScript.src);k=0!==k.indexOf("blob:")?k.substr(0,k.replace(/[?#].*/,"").lastIndexOf("/")+1):"";ea=a=>{document.title=a};var fa=h.print||console.log.bind(console),l=h.printErr||console.warn.bind(console);Object.assign(h,aa);aa=null;h.arguments&&(ba=h.arguments);
h.thisProgram&&(ca=h.thisProgram);h.quit&&(da=h.quit);var ha;h.wasmBinary&&(ha=h.wasmBinary);var noExitRuntime=h.noExitRuntime||!0;"object"!=typeof WebAssembly&&p("no native wasm support detected");var ia,ja=!1,ka="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
function la(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&ka)return ka.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|g:(e&7)<<18|f<<12|g<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function r(a,b){return a?la(u,a,b):""}
function ma(a,b,c,d){if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var m=a.charCodeAt(++f);g=65536+((g&1023)<<10)|m&1023}if(127>=g){if(c>=d)break;b[c++]=g}else{if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6}else{if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>>12&63}b[c++]=128|g>>6&63}b[c++]=128|g&63}}b[c]=0;return c-e}function w(a,b,c){return ma(a,u,b,c)}
function na(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b}var x,u,oa,pa,y,z,A,B,qa,ra=[],ta=[],ua=[],va=[],wa=[];function xa(){var a=h.preRun.shift();ra.unshift(a)}var C=0,ya=null,za=null;function p(a){if(h.onAbort)h.onAbort(a);a="Aborted("+a+")";l(a);ja=!0;throw new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");}function Aa(){return D.startsWith("data:application/octet-stream;base64,")}var D;
D="index.wasm";if(!Aa()){var Ba=D;D=h.locateFile?h.locateFile(Ba,k):k+Ba}function Ca(){var a=D;try{if(a==D&&ha)return new Uint8Array(ha);throw"both async and sync fetching of the wasm failed";}catch(b){p(b)}}function Da(){return ha||"function"!=typeof fetch?Promise.resolve().then(function(){return Ca()}):fetch(D,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+D+"'";return a.arrayBuffer()}).catch(function(){return Ca()})}
var Ea,Fa,Ja={56168392:()=>"undefined"!==typeof AudioContext||"undefined"!==typeof webkitAudioContext?!0:!1,56168539:()=>"undefined"!==typeof navigator.mediaDevices&&"undefined"!==typeof navigator.mediaDevices.getUserMedia||"undefined"!==typeof navigator.webkitGetUserMedia?!0:!1,56168773:a=>{"undefined"===typeof h.SDL2&&(h.SDL2={});var b=h.SDL2;a?b.capture={}:b.audio={};b.Zd||("undefined"!==typeof AudioContext?b.Zd=new AudioContext:"undefined"!==typeof webkitAudioContext&&(b.Zd=new webkitAudioContext),
b.Zd&&Ga(b.Zd));return void 0===b.Zd?-1:0},56169266:()=>h.SDL2.Zd.sampleRate,56169334:(a,b,c,d)=>{function e(){}function f(m){void 0!==g.capture.oe&&(clearTimeout(g.capture.oe),g.capture.oe=void 0);g.capture.re=g.Zd.createMediaStreamSource(m);g.capture.ae=g.Zd.createScriptProcessor(b,a,1);g.capture.ae.onaudioprocess=function(n){void 0!==g&&void 0!==g.capture&&(n.outputBuffer.getChannelData(0).fill(0),g.capture.we=n.inputBuffer,Ha(c,[d]))};g.capture.re.connect(g.capture.ae);g.capture.ae.connect(g.Zd.destination);
g.capture.stream=m}var g=h.SDL2;g.capture.se=g.Zd.createBuffer(a,b,g.Zd.sampleRate);g.capture.se.getChannelData(0).fill(0);g.capture.oe=setTimeout(function(){g.capture.we=g.capture.se;Ha(c,[d])},b/g.Zd.sampleRate*1E3);void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(f).catch(e):void 0!==navigator.webkitGetUserMedia&&navigator.webkitGetUserMedia({audio:!0,video:!1},f,e)},56170986:(a,b,c,d)=>{var e=h.SDL2;e.audio.ae=
e.Zd.createScriptProcessor(b,0,a);e.audio.ae.onaudioprocess=function(f){void 0!==e&&void 0!==e.audio&&(e.audio.Be=f.outputBuffer,Ha(c,[d]))};e.audio.ae.connect(e.Zd.destination)},56171396:(a,b)=>{for(var c=h.SDL2,d=c.capture.we.numberOfChannels,e=0;e<d;++e){var f=c.capture.we.getChannelData(e);if(f.length!=b)throw"Web Audio capture buffer length mismatch! Destination size: "+f.length+" samples vs expected "+b+" samples!";if(1==d)for(var g=0;g<b;++g)Ia(a+4*g,f[g]);else for(g=0;g<b;++g)Ia(a+4*(g*d+
e),f[g])}},56172001:(a,b)=>{for(var c=h.SDL2,d=c.audio.Be.numberOfChannels,e=0;e<d;++e){var f=c.audio.Be.getChannelData(e);if(f.length!=b)throw"Web Audio output buffer length mismatch! Destination size: "+f.length+" samples vs expected "+b+" samples!";for(var g=0;g<b;++g)f[g]=A[a+(g*d+e<<2)>>2]}},56172481:a=>{var b=h.SDL2;if(a){void 0!==b.capture.oe&&clearTimeout(b.capture.oe);if(void 0!==b.capture.stream){a=b.capture.stream.getAudioTracks();for(var c=0;c<a.length;c++)b.capture.stream.removeTrack(a[c]);
b.capture.stream=void 0}void 0!==b.capture.ae&&(b.capture.ae.onaudioprocess=function(){},b.capture.ae.disconnect(),b.capture.ae=void 0);void 0!==b.capture.re&&(b.capture.re.disconnect(),b.capture.re=void 0);void 0!==b.capture.se&&(b.capture.se=void 0);b.capture=void 0}else void 0!=b.audio.ae&&(b.audio.ae.disconnect(),b.audio.ae=void 0),b.audio=void 0;void 0!==b.Zd&&void 0===b.audio&&void 0===b.capture&&(b.Zd.close(),b.Zd=void 0)},56173653:(a,b,c)=>{h.SDL2||(h.SDL2={});var d=h.SDL2;d.Le!==h.canvas&&
(d.fe=h.createContext(h.canvas,!1,!0),d.Le=h.canvas);if(d.w!==a||d.Te!==b||d.Ve!==d.fe)d.image=d.fe.createImageData(a,b),d.w=a,d.Te=b,d.Ve=d.fe;a=d.image.data;b=c>>2;var e=0;if("undefined"!==typeof CanvasPixelArray&&a instanceof CanvasPixelArray)for(c=a.length;e<c;){var f=y[b];a[e]=f&255;a[e+1]=f>>8&255;a[e+2]=f>>16&255;a[e+3]=255;b++;e+=4}else if(d.Ne!==a&&(d.Me=new Int32Array(a.buffer),d.Oe=new Uint8Array(a.buffer),d.Ne=a),a=d.Me,c=a.length,a.set(y.subarray(b,b+c)),a=d.Oe,b=3,e=b+4*c,0==c%8)for(;b<
e;)a[b]=255,b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0;else for(;b<e;)a[b]=255,b=b+4|0;d.fe.putImageData(d.image,0,0)},56175122:(a,b,c,d,e)=>{var f=document.createElement("canvas");f.width=a;f.height=b;var g=f.getContext("2d");a=g.createImageData(a,b);b=a.data;e>>=2;var m=0,n;if("undefined"!==typeof CanvasPixelArray&&b instanceof CanvasPixelArray)for(n=b.length;m<n;){var q=y[e];b[m]=q&255;b[m+1]=q>>8&255;b[m+2]=q>>
16&255;b[m+3]=q>>24&255;e++;m+=4}else b=new Int32Array(b.buffer),n=b.length,b.set(y.subarray(e,e+n));g.putImageData(a,0,0);c=0===c&&0===d?"url("+f.toDataURL()+"), auto":"url("+f.toDataURL()+") "+c+" "+d+", auto";d=E(c.length+1);w(c,d,c.length+1);return d},56176111:a=>{h.canvas&&(h.canvas.style.cursor=r(a))},56176194:()=>{h.canvas&&(h.canvas.style.cursor="none")},56176263:()=>window.innerWidth,56176293:()=>window.innerHeight};
function Ka(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function La(a,b,c){a.addEventListener(b,c,{once:!0})}function Ga(a){var b;b||(b=[document,document.getElementById("canvas")]);["keydown","mousedown","touchstart"].forEach(function(c){b.forEach(function(d){d&&La(d,c,()=>{"suspended"===a.state&&a.resume()})})})}function Ma(a){for(;0<a.length;)a.shift()(h)}var Na=[];
function F(a){var b=Na[a];b||(a>=Na.length&&(Na.length=a+1),Na[a]=b=qa.get(a));return b}function Ha(a,b){if("vi".includes("j")){var c=h.dynCall_vi;b&&b.length?c.apply(null,[a].concat(b)):c.call(null,a)}else F(a).apply(null,b)}
function Ia(a,b){var c="float";c.endsWith("*")&&(c="*");switch(c){case "i1":x[a>>0]=b;break;case "i8":x[a>>0]=b;break;case "i16":oa[a>>1]=b;break;case "i32":y[a>>2]=b;break;case "i64":Fa=[b>>>0,(Ea=b,1<=+Math.abs(Ea)?0<Ea?(Math.min(+Math.floor(Ea/4294967296),4294967295)|0)>>>0:~~+Math.ceil((Ea-+(~~Ea>>>0))/4294967296)>>>0:0)];y[a>>2]=Fa[0];y[a+4>>2]=Fa[1];break;case "float":A[a>>2]=b;break;case "double":B[a>>3]=b;break;case "*":z[a>>2]=b;break;default:p("invalid type for setValue: "+c)}}
function Oa(a,b){Pa=a;Qa=b;if(Ra)if(Sa||(Sa=!0),0==a)G=function(){var d=Math.max(0,Ta+b-Ua())|0;setTimeout(Va,d)};else if(1==a)G=function(){Wa(Va)};else if(2==a){if("undefined"==typeof setImmediate){var c=[];addEventListener("message",d=>{if("setimmediate"===d.data||"setimmediate"===d.data.target)d.stopPropagation(),c.shift()()},!0);setImmediate=function(d){c.push(d);postMessage("setimmediate","*")}}G=function(){setImmediate(Va)}}}var Ua;Ua=()=>performance.now();
function Xa(a){if(!noExitRuntime){if(h.onExit)h.onExit(a);ja=!0}da(a,new Ka(a))}function Ya(a){a instanceof Ka||"unwind"==a||da(1,a)}
function Za(a,b,c,d,e){!Ra||p("emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Ra=a;$a=d;var f=ab;Sa=!1;Va=function(){if(!ja)if(0<bb.length){var g=Date.now(),m=bb.shift();m.ef(m.af);if(cb){var n=cb,q=0==n%1?n-1:Math.floor(n);cb=m.cf?q:(8*n+(q+.5))/9}fa('main loop blocker "'+m.name+'" took '+(Date.now()-g)+" ms");h.setStatus&&(g=h.statusMessage||"Please wait...",
m=cb,n=db.df,m?m<n?h.setStatus(g+" ("+(n-m)+"/"+n+")"):h.setStatus(g):h.setStatus(""));f<ab||setTimeout(Va,0)}else f<ab||(eb=eb+1|0,1==Pa&&1<Qa&&0!=eb%Qa?G():(0==Pa&&(Ta=Ua()),ja||h.preMainLoop&&!1===h.preMainLoop()||(fb(a),h.postMainLoop&&h.postMainLoop()),f<ab||("object"==typeof SDL&&SDL.audio&&SDL.audio.Xe&&SDL.audio.Xe(),G())))};e||(b&&0<b?Oa(0,1E3/b):Oa(1,1),G());if(c)throw"unwind";}function fb(a){if(!ja)try{a()}catch(b){Ya(b)}}function gb(a){setTimeout(function(){fb(a)},1E4)}
function hb(a){ib||(ib={});ib[a]||(ib[a]=1,l(a))}var ib,Sa=!1,G=null,ab=0,Ra=null,$a=0,Pa=0,Qa=0,eb=0,bb=[],db={},Ta,Va,cb,jb=!1,kb=!1,mb=[];
function nb(){function a(){kb=document.pointerLockElement===h.canvas||document.mozPointerLockElement===h.canvas||document.webkitPointerLockElement===h.canvas||document.msPointerLockElement===h.canvas}h.preloadPlugins||(h.preloadPlugins=[]);if(!ob){ob=!0;try{pb=!0}catch(c){pb=!1,l("warning: no blob constructor, cannot create blobs with mimetypes")}qb="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:pb?null:l("warning: no BlobBuilder");rb="undefined"!=
typeof window?window.URL?window.URL:window.webkitURL:void 0;h.Fe||"undefined"!=typeof rb||(l("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),h.Fe=!0);h.preloadPlugins.push({canHandle:function(c){return!h.Fe&&/\.(jpg|jpeg|png|bmp)$/i.test(c)},handle:function(c,d,e,f){var g=null;if(pb)try{g=new Blob([c],{type:sb(d)}),g.size!==c.length&&(g=new Blob([(new Uint8Array(c)).buffer],{type:sb(d)}))}catch(q){hb("Blob constructor present but fails: "+
q+"; falling back to blob builder")}g||(g=new qb,g.append((new Uint8Array(c)).buffer),g=g.getBlob());var m=rb.createObjectURL(g),n=new Image;n.onload=()=>{n.complete||p("Image "+d+" could not be decoded");var q=document.createElement("canvas");q.width=n.width;q.height=n.height;q.getContext("2d").drawImage(n,0,0);rb.revokeObjectURL(m);e&&e(c)};n.onerror=()=>{fa("Image "+m+" could not be decoded");f&&f()};n.src=m}});h.preloadPlugins.push({canHandle:function(c){return!h.kf&&c.substr(-4)in{".ogg":1,".wav":1,
".mp3":1}},handle:function(c,d,e,f){function g(){n||(n=!0,e&&e(c))}function m(){n||(n=!0,new Audio,f&&f())}var n=!1;if(pb){try{var q=new Blob([c],{type:sb(d)})}catch(v){return m()}q=rb.createObjectURL(q);var t=new Audio;t.addEventListener("canplaythrough",()=>g(t),!1);t.onerror=function(){if(!n){l("warning: browser could not fully decode audio "+d+", trying slower base64 approach");for(var v="",O=0,K=0,sa=0;sa<c.length;sa++)for(O=O<<8|c[sa],K+=8;6<=K;){var lb=O>>K-6&63;K-=6;v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[lb]}2==
K?(v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(O&3)<<4],v+="=="):4==K&&(v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(O&15)<<2],v+="=");t.src="data:audio/x-"+d.substr(-3)+";base64,"+v;g(t)}};t.src=q;gb(function(){g(t)})}else return m()}});var b=h.canvas;b&&(b.requestPointerLock=b.requestPointerLock||b.mozRequestPointerLock||b.webkitRequestPointerLock||b.msRequestPointerLock||(()=>{}),b.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||
document.webkitExitPointerLock||document.msExitPointerLock||(()=>{}),b.exitPointerLock=b.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",a,!1),document.addEventListener("mozpointerlockchange",a,!1),document.addEventListener("webkitpointerlockchange",a,!1),document.addEventListener("mspointerlockchange",a,!1),h.elementPointerLock&&b.addEventListener("click",c=>{!kb&&h.canvas.requestPointerLock&&(h.canvas.requestPointerLock(),c.preventDefault())},!1))}}
function tb(a,b,c,d){if(b&&h.fe&&a==h.canvas)return h.fe;var e;if(b){var f={antialias:!1,alpha:!1,Ee:1};if(d)for(var g in d)f[g]=d[g];if("undefined"!=typeof ub&&(e=vb(a,f)))var m=H[e].ge}else m=a.getContext("2d");if(!m)return null;c&&(b||"undefined"==typeof I||p("cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),h.fe=m,b&&wb(e),h.Ze=b,mb.forEach(function(n){n()}),nb());return m}var xb=!1,yb=void 0,zb=void 0;
function Ab(a,b){function c(){jb=!1;var f=d.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===f?(d.exitFullscreen=Bb,yb&&d.requestPointerLock(),jb=!0,zb?("undefined"!=typeof SDL&&(y[SDL.screen>>2]=z[SDL.screen>>2]|8388608),Cb(h.canvas),Db()):Cb(d)):(f.parentNode.insertBefore(d,f),f.parentNode.removeChild(f),zb?("undefined"!=typeof SDL&&(y[SDL.screen>>2]=z[SDL.screen>>2]&
-8388609),Cb(h.canvas),Db()):Cb(d));if(h.onFullScreen)h.onFullScreen(jb);if(h.onFullscreen)h.onFullscreen(jb)}yb=a;zb=b;"undefined"==typeof yb&&(yb=!0);"undefined"==typeof zb&&(zb=!1);var d=h.canvas;xb||(xb=!0,document.addEventListener("fullscreenchange",c,!1),document.addEventListener("mozfullscreenchange",c,!1),document.addEventListener("webkitfullscreenchange",c,!1),document.addEventListener("MSFullscreenChange",c,!1));var e=document.createElement("div");d.parentNode.insertBefore(e,d);e.appendChild(d);
e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||(e.webkitRequestFullscreen?()=>e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):null)||(e.webkitRequestFullScreen?()=>e.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):null);e.requestFullscreen()}
function Bb(){if(!jb)return!1;(document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]);return!0}var Eb=0;function Wa(a){if("function"==typeof requestAnimationFrame)requestAnimationFrame(a);else{var b=Date.now();if(0===Eb)Eb=b+1E3/60;else for(;b+2>=Eb;)Eb+=1E3/60;setTimeout(a,Math.max(Eb-b,0))}}
function sb(a){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[a.substr(a.lastIndexOf(".")+1)]}var Fb=[];function Db(){var a=h.canvas;Fb.forEach(function(b){b(a.width,a.height)})}
function Cb(a,b,c){b&&c?(a.$e=b,a.Ue=c):(b=a.$e,c=a.Ue);var d=b,e=c;h.forcedAspectRatio&&0<h.forcedAspectRatio&&(d/e<h.forcedAspectRatio?d=Math.round(e*h.forcedAspectRatio):e=Math.round(d/h.forcedAspectRatio));if((document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===a.parentNode&&"undefined"!=typeof screen){var f=Math.min(screen.width/d,screen.height/e);d=Math.round(d*f);e=Math.round(e*
f)}zb?(a.width!=d&&(a.width=d),a.height!=e&&(a.height=e),"undefined"!=typeof a.style&&(a.style.removeProperty("width"),a.style.removeProperty("height"))):(a.width!=b&&(a.width=b),a.height!=c&&(a.height=c),"undefined"!=typeof a.style&&(d!=b||e!=c?(a.style.setProperty("width",d+"px","important"),a.style.setProperty("height",e+"px","important")):(a.style.removeProperty("width"),a.style.removeProperty("height"))))}
var ob,pb,qb,rb,J=12288,Gb=!1,Hb=0,Ib=0,Jb=0,L={alpha:!1,depth:!1,stencil:!1,antialias:!1},Kb={},Lb;function Mb(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,d){b.vertexAttribDivisorANGLE(c,d)},a.drawArraysInstanced=function(c,d,e,f){b.drawArraysInstancedANGLE(c,d,e,f)},a.drawElementsInstanced=function(c,d,e,f,g){b.drawElementsInstancedANGLE(c,d,e,f,g)})}
function Nb(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function Ob(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,d){b.drawBuffersWEBGL(c,d)})}var Pb=1,M=[],N=[],Qb=[],Rb=[],Sb=[],P=[],Tb=[],H=[],Q=[],Ub={},Vb=4;
function R(a){Wb||(Wb=a)}function S(a){for(var b=Pb++,c=a.length;c<b;c++)a[c]=null;return b}function Xb(a,b,c){for(var d="",e=0;e<a;++e){var f=c?y[c+4*e>>2]:-1;d+=r(y[b+4*e>>2],0>f?void 0:f)}return d}function vb(a,b){a.pe||(a.pe=a.getContext,a.getContext=function(d,e){e=a.pe(d,e);return"webgl"==d==e instanceof WebGLRenderingContext?e:null});var c=a.getContext("webgl",b);return c?Yb(c,b):0}
function Yb(a,b){var c=S(H),d={ff:c,attributes:b,version:b.Ee,ge:a};a.canvas&&(a.canvas.ke=d);H[c]=d;("undefined"==typeof b.Qe||b.Qe)&&Zb(d);return c}function wb(a){$b=H[a];h.fe=I=$b&&$b.ge}function Zb(a){a||(a=$b);if(!a.We){a.We=!0;var b=a.ge;Mb(b);Nb(b);Ob(b);b.de=b.getExtension("EXT_disjoint_timer_query");b.jf=b.getExtension("WEBGL_multi_draw");(b.getSupportedExtensions()||[]).forEach(function(c){c.includes("lose_context")||c.includes("debug")||b.getExtension(c)})}}var ub={},Wb,$b;
function ac(a){var b=na(a)+1,c=E(b);c&&ma(a,x,c,b);return c}var bc=[];function cc(a,b){bc.length=0;var c;for(b>>=2;c=u[a++];)b+=105!=c&b,bc.push(105==c?y[b]:B[b++>>1]),++b;return bc}function dc(a){var b=ec();a=a();fc(b);return a}var gc=0;function hc(){for(var a=T.length-1;0<=a;--a)ic(a);T=[];U=[]}var U=[];
function jc(a,b,c){function d(g,m){if(g.length!=m.length)return!1;for(var n in g)if(g[n]!=m[n])return!1;return!0}for(var e in U){var f=U[e];if(f.ye==a&&d(f.ze,c))return}U.push({ye:a,He:b,ze:c});U.sort(function(g,m){return g.He<m.He})}function kc(a){for(var b=0;b<U.length;++b)U[b].ye==a&&(U.splice(b,1),--b)}function lc(){if(gc&&mc.ie)for(var a=0;a<U.length;++a){var b=U[a];U.splice(a,1);--a;b.ye.apply(null,b.ze)}}var T=[];
function ic(a){var b=T[a];b.target.removeEventListener(b.$d,b.Re,b.be);T.splice(a,1)}function V(a){function b(d){++gc;mc=a;lc();a.ee(d);lc();--gc}if(a.ce)a.Re=b,a.target.addEventListener(a.$d,b,a.be),T.push(a),nc||(va.push(hc),nc=!0);else for(var c=0;c<T.length;++c)T[c].target==a.target&&T[c].$d==a.$d&&ic(c--)}function oc(a){return a?a==window?"#window":a==screen?"#screen":a&&a.nodeName?a.nodeName:"":""}function pc(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}
var qc={},nc,mc,rc,sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc,Dc={},Ec=[0,document,window];function W(a){a=2<a?r(a):a;return Ec[a]||document.querySelector(a)}function Fc(a){return dc(function(){var b=Gc(8),c=b+4,d=Gc(a.id.length+1);w(a.id,d,a.id.length+1);if(d=W(d))y[b>>2]=d.width,y[c>>2]=d.height;return[y[b>>2],y[c>>2]]})}function Hc(a,b,c){a=W(a);if(!a)return-4;a.width=b;a.height=c;return 0}
function Ic(a,b,c){a.bf?dc(function(){var d=Gc(a.id.length+1);w(a.id,d,a.id.length+1);Hc(d,b,c)}):(a.width=b,a.height=c)}
function Jc(a){function b(){document.fullscreenElement||document.webkitFullscreenElement||(document.removeEventListener("fullscreenchange",b),document.removeEventListener("webkitfullscreenchange",b),Ic(a,d,e),a.style.width=f,a.style.height=g,a.style.backgroundColor=m,n||(document.body.style.backgroundColor="white"),document.body.style.backgroundColor=n,a.style.paddingLeft=q,a.style.paddingRight=t,a.style.paddingTop=v,a.style.paddingBottom=O,a.style.marginLeft=K,a.style.marginRight=sa,a.style.marginTop=
lb,a.style.marginBottom=pd,document.body.style.margin=qd,document.documentElement.style.overflow=rd,document.body.scroll=sd,a.style.he=td,a.ke&&a.ke.ge.viewport(0,0,d,e),Dc.qe&&F(Dc.qe)(37,0,Dc.Ae))}var c=Fc(a),d=c[0],e=c[1],f=a.style.width,g=a.style.height,m=a.style.backgroundColor,n=document.body.style.backgroundColor,q=a.style.paddingLeft,t=a.style.paddingRight,v=a.style.paddingTop,O=a.style.paddingBottom,K=a.style.marginLeft,sa=a.style.marginRight,lb=a.style.marginTop,pd=a.style.marginBottom,
qd=document.body.style.margin,rd=document.documentElement.style.overflow,sd=document.body.scroll,td=a.style.he;document.addEventListener("fullscreenchange",b);document.addEventListener("webkitfullscreenchange",b)}function Kc(a,b,c){a.style.paddingLeft=a.style.paddingRight=c+"px";a.style.paddingTop=a.style.paddingBottom=b+"px"}function Lc(a){return 0>Ec.indexOf(a)?a.getBoundingClientRect():{left:0,top:0}}
function Mc(a,b){if(0!=b.xe||0!=b.ve){Jc(a);var c=b.Ye?innerWidth:screen.width,d=b.Ye?innerHeight:screen.height,e=Lc(a),f=e.width;e=e.height;var g=Fc(a),m=g[0];g=g[1];3==b.xe?(Kc(a,(d-e)/2,(c-f)/2),c=f,d=e):2==b.xe&&(c*g<m*d?(f=g*c/m,Kc(a,(d-f)/2,0),d=f):(f=m*d/g,Kc(a,0,(c-f)/2),c=f));a.style.backgroundColor||(a.style.backgroundColor="black");document.body.style.backgroundColor||(document.body.style.backgroundColor="black");a.style.width=c+"px";a.style.height=d+"px";1==b.Se&&(a.style.he="optimizeSpeed",
a.style.he="-moz-crisp-edges",a.style.he="-o-crisp-edges",a.style.he="-webkit-optimize-contrast",a.style.he="optimize-contrast",a.style.he="crisp-edges",a.style.he="pixelated");f=2==b.ve?devicePixelRatio:1;0!=b.ve&&(c=c*f|0,d=d*f|0,Ic(a,c,d),a.ke&&a.ke.ge.viewport(0,0,c,d))}if(a.requestFullscreen)a.requestFullscreen();else if(a.webkitRequestFullscreen)a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);else return pc()?-3:-1;Dc=b;b.qe&&F(b.qe)(37,0,b.Ae);return 0}
function Nc(a){if(a.requestPointerLock)a.requestPointerLock();else return document.body.requestPointerLock?-3:-1;return 0}
function Oc(a,b){B[a>>3]=b.timestamp;for(var c=0;c<b.axes.length;++c)B[a+8*c+16>>3]=b.axes[c];for(c=0;c<b.buttons.length;++c)B[a+8*c+528>>3]="object"==typeof b.buttons[c]?b.buttons[c].value:b.buttons[c];for(c=0;c<b.buttons.length;++c)y[a+4*c+1040>>2]="object"==typeof b.buttons[c]?b.buttons[c].pressed:1==b.buttons[c];y[a+1296>>2]=b.connected;y[a+1300>>2]=b.index;y[a+8>>2]=b.axes.length;y[a+12>>2]=b.buttons.length;w(b.id,a+1304,64);w(b.mapping,a+1368,64)}var Pc=[];
function Qc(a,b,c,d){for(var e=0;e<a;e++){var f=I[c](),g=f&&S(d);f?(f.name=g,d[g]=f):R(1282);y[b+4*e>>2]=g}}function Rc(a,b,c,d,e,f,g,m){b=N[b];if(a=I[a](b,c))d=m&&w(a.name,m,d),e&&(y[e>>2]=d),f&&(y[f>>2]=a.size),g&&(y[g>>2]=a.type)}function Sc(a,b){z[a>>2]=b;z[a+4>>2]=(b-z[a>>2])/4294967296}
function Tc(a,b,c){if(b){var d=void 0;switch(a){case 36346:d=1;break;case 36344:0!=c&&1!=c&&R(1280);return;case 36345:d=0;break;case 34466:var e=I.getParameter(34467);d=e?e.length:0}if(void 0===d)switch(e=I.getParameter(a),typeof e){case "number":d=e;break;case "boolean":d=e?1:0;break;case "string":R(1280);return;case "object":if(null===e)switch(a){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:d=0;break;default:R(1280);return}else{if(e instanceof Float32Array||
e instanceof Uint32Array||e instanceof Int32Array||e instanceof Array){for(a=0;a<e.length;++a)switch(c){case 0:y[b+4*a>>2]=e[a];break;case 2:A[b+4*a>>2]=e[a];break;case 4:x[b+a>>0]=e[a]?1:0}return}try{d=e.name|0}catch(f){R(1280);l("GL_INVALID_ENUM in glGet"+c+"v: Unknown object returned from WebGL getParameter("+a+")! (error: "+f+")");return}}break;default:R(1280);l("GL_INVALID_ENUM in glGet"+c+"v: Native code calling glGet"+c+"v("+a+") and it returns "+e+" of type "+typeof e+"!");return}switch(c){case 1:Sc(b,
d);break;case 0:y[b>>2]=d;break;case 2:A[b>>2]=d;break;case 4:x[b>>0]=d?1:0}}else R(1281)}function Uc(a){var b=na(a)+1,c=E(b);w(a,c,b);return c}function Vc(a){return"]"==a.slice(-1)&&a.lastIndexOf("[")}function Wc(a){var b=a.je,c=a.ue,d;if(!b)for(a.je=b={},a.Ie={},d=0;d<I.getProgramParameter(a,35718);++d){var e=I.getActiveUniform(a,d);var f=e.name;e=e.size;var g=Vc(f);g=0<g?f.slice(0,g):f;var m=a.te;a.te+=e;c[g]=[e,m];for(f=0;f<e;++f)b[m]=f,a.Ie[m++]=g}}
function X(a){var b=I.Ce;if(b){var c=b.je[a];"number"==typeof c&&(b.je[a]=c=I.getUniformLocation(b,b.Ie[a]+(0<c?"["+c+"]":"")));return c}R(1282)}function Xc(a,b,c,d){if(c)if(a=N[a],Wc(a),a=I.getUniform(a,X(b)),"number"==typeof a||"boolean"==typeof a)switch(d){case 0:y[c>>2]=a;break;case 2:A[c>>2]=a}else for(b=0;b<a.length;b++)switch(d){case 0:y[c+4*b>>2]=a[b];break;case 2:A[c+4*b>>2]=a[b]}else R(1281)}
function Yc(a,b,c,d){if(c)if(a=I.getVertexAttrib(a,b),34975==b)y[c>>2]=a&&a.name;else if("number"==typeof a||"boolean"==typeof a)switch(d){case 0:y[c>>2]=a;break;case 2:A[c>>2]=a;break;case 5:y[c>>2]=Math.fround(a)}else for(b=0;b<a.length;b++)switch(d){case 0:y[c+4*b>>2]=a[b];break;case 2:A[c+4*b>>2]=a[b];break;case 5:y[c+4*b>>2]=Math.fround(a[b])}else R(1281)}
function Zc(a,b,c,d,e){a-=5120;a=1==a?u:4==a?y:6==a?A:5==a||28922==a?z:pa;var f=31-Math.clz32(a.BYTES_PER_ELEMENT),g=Vb;return a.subarray(e>>f,e+d*(c*({5:3,6:4,8:2,29502:3,29504:4}[b-6402]||1)*(1<<f)+g-1&-g)>>f)}var Y=[],$c=[];function ad(a,b){if(!pc())return-1;a=W(a);return a?a.requestFullscreen||a.webkitRequestFullscreen?gc&&mc.ie?Mc(a,b):b.Pe?(jc(Mc,1,[a,b]),1):-2:-3:-4}
function bd(a,b){var c={target:W(2),$d:"beforeunload",ce:b,ee:function(d){d=d||event;var e=F(b)(28,0,a);e&&(e=r(e));if(e)return d.preventDefault(),d.returnValue=e},be:!0};V(c)}function cd(a,b,c,d,e,f){sc||(sc=E(256));a={target:W(a),$d:f,ce:d,ee:function(g){g=g||event;var m=g.target.id?g.target.id:"",n=sc;w(oc(g.target),n+0,128);w(m,n+128,128);F(d)(e,n,b)&&g.preventDefault()},be:c};V(a)}
function dd(a,b,c,d,e){uc||(uc=E(280));V({target:a,$d:e,ce:d,ee:function(f){f=f||event;var g=uc,m=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,n=!!m;y[g>>2]=n;y[g+4>>2]=pc();var q=n?m:tc,t=q&&q.id?q.id:"";w(oc(q),g+8,128);w(t,g+136,128);y[g+264>>2]=q?q.clientWidth:0;y[g+268>>2]=q?q.clientHeight:0;y[g+272>>2]=screen.width;y[g+276>>2]=screen.height;n&&(tc=m);F(d)(19,g,b)&&f.preventDefault()},be:c})}
function ed(a,b,c,d,e){vc||(vc=E(1432));b={target:W(2),ie:!0,$d:e,ce:c,ee:function(f){f=f||event;var g=vc;Oc(g,f.gamepad);F(c)(d,g,a)&&f.preventDefault()},be:b};V(b)}
function fd(a,b,c,d,e,f){wc||(wc=E(176));a={target:W(a),ie:!0,$d:f,ce:d,ee:function(g){var m=wc;B[m>>3]=g.timeStamp;var n=m>>2;y[n+2]=g.location;y[n+3]=g.ctrlKey;y[n+4]=g.shiftKey;y[n+5]=g.altKey;y[n+6]=g.metaKey;y[n+7]=g.repeat;y[n+8]=g.charCode;y[n+9]=g.keyCode;y[n+10]=g.which;w(g.key||"",m+44,32);w(g.code||"",m+76,32);w(g.char||"",m+108,32);w(g.locale||"",m+140,32);F(d)(e,m,b)&&g.preventDefault()},be:c};V(a)}
function gd(a,b,c){B[a>>3]=b.timeStamp;a>>=2;y[a+2]=b.screenX;y[a+3]=b.screenY;y[a+4]=b.clientX;y[a+5]=b.clientY;y[a+6]=b.ctrlKey;y[a+7]=b.shiftKey;y[a+8]=b.altKey;y[a+9]=b.metaKey;oa[2*a+20]=b.button;oa[2*a+21]=b.buttons;y[a+11]=b.movementX;y[a+12]=b.movementY;c=Lc(c);y[a+13]=b.clientX-c.left;y[a+14]=b.clientY-c.top}
function hd(a,b,c,d,e,f){xc||(xc=E(72));a=W(a);V({target:a,ie:"mousemove"!=f&&"mouseenter"!=f&&"mouseleave"!=f,$d:f,ce:d,ee:function(g){g=g||event;gd(xc,g,a);F(d)(e,xc,b)&&g.preventDefault()},be:c})}function jd(a,b,c,d,e){yc||(yc=E(260));V({target:a,$d:e,ce:d,ee:function(f){f=f||event;var g=yc,m=document.pointerLockElement||document.pe||document.Ke||document.Je;y[g>>2]=!!m;var n=m&&m.id?m.id:"";w(oc(m),g+4,128);w(n,g+132,128);F(d)(20,g,b)&&f.preventDefault()},be:c})}
function kd(a,b,c,d){zc||(zc=E(36));a=W(a);V({target:a,$d:"resize",ce:d,ee:function(e){e=e||event;if(e.target==a){var f=document.body;if(f){var g=zc;y[g>>2]=e.detail;y[g+4>>2]=f.clientWidth;y[g+8>>2]=f.clientHeight;y[g+12>>2]=innerWidth;y[g+16>>2]=innerHeight;y[g+20>>2]=outerWidth;y[g+24>>2]=outerHeight;y[g+28>>2]=pageXOffset;y[g+32>>2]=pageYOffset;F(d)(10,g,b)&&e.preventDefault()}}},be:c})}
function ld(a,b,c,d,e,f){Ac||(Ac=E(1696));a=W(a);V({target:a,ie:"touchstart"==f||"touchend"==f,$d:f,ce:d,ee:function(g){for(var m,n={},q=g.touches,t=0;t<q.length;++t)m=q[t],m.De=m.Ge=0,n[m.identifier]=m;for(t=0;t<g.changedTouches.length;++t)m=g.changedTouches[t],m.De=1,n[m.identifier]=m;for(t=0;t<g.targetTouches.length;++t)n[g.targetTouches[t].identifier].Ge=1;q=Ac;B[q>>3]=g.timeStamp;var v=q>>2;y[v+3]=g.ctrlKey;y[v+4]=g.shiftKey;y[v+5]=g.altKey;y[v+6]=g.metaKey;v+=7;var O=Lc(a),K=0;for(t in n)if(m=
n[t],y[v]=m.identifier,y[v+1]=m.screenX,y[v+2]=m.screenY,y[v+3]=m.clientX,y[v+4]=m.clientY,y[v+5]=m.pageX,y[v+6]=m.pageY,y[v+7]=m.De,y[v+8]=m.Ge,y[v+9]=m.clientX-O.left,y[v+10]=m.clientY-O.top,v+=13,31<++K)break;y[q+8>>2]=K;F(d)(e,q,b)&&g.preventDefault()},be:c})}
function md(a,b,c){var d=Ec[1];Bc||(Bc=E(8));V({target:d,$d:"visibilitychange",ce:c,ee:function(e){e=e||event;var f=Bc,g=["hidden","visible","prerender","unloaded"].indexOf(document.visibilityState);y[f>>2]=document.hidden;y[f+4>>2]=g;F(c)(21,f,a)&&e.preventDefault()},be:b})}
function nd(a,b,c,d){Cc||(Cc=E(104));V({target:a,ie:!0,$d:"wheel",ce:d,ee:function(e){e=e||event;var f=Cc;gd(f,e,a);B[f+72>>3]=e.deltaX;B[f+80>>3]=e.deltaY;B[f+88>>3]=e.deltaZ;y[f+96>>2]=e.deltaMode;F(d)(9,f,b)&&e.preventDefault()},be:c})}var od={};
function ud(){if(!vd){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ca||"./this.program"},b;for(b in od)void 0===od[b]?delete a[b]:a[b]=od[b];var c=[];for(b in a)c.push(b+"="+a[b]);vd=c}return vd}var vd,wd=[null,[],[]];h.requestFullscreen=function(a,b){Ab(a,b)};h.requestAnimationFrame=function(a){Wa(a)};
h.setCanvasSize=function(a,b,c){Cb(h.canvas,a,b);c||Db()};h.pauseMainLoop=function(){G=null;ab++};h.resumeMainLoop=function(){ab++;var a=Pa,b=Qa,c=Ra;Ra=null;Za(c,0,!1,$a,!0);Oa(a,b);G()};h.getUserMedia=function(){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia);window.getUserMedia(void 0)};h.createContext=function(a,b,c,d){return tb(a,b,c,d)};for(var I,Z=0;32>Z;++Z)Pc.push(Array(Z));var xd=new Float32Array(288);for(Z=0;288>Z;++Z)Y[Z]=xd.subarray(0,Z+1);
var yd=new Int32Array(288);for(Z=0;288>Z;++Z)$c[Z]=yd.subarray(0,Z+1);
var zd={T:function(){return 0},Va:function(){return 0},Wa:function(){},Xa:function(){return!0},Ga:function(a){if(12448==a)return J=12288,1;J=12300;return 0},Ja:function(a,b,c,d,e){if(62E3!=a)J=12296,c=0;else{if(b)for(;;){a=y[b>>2];if(12321==a)L.alpha=0<y[b+4>>2];else if(12325==a)L.depth=0<y[b+4>>2];else if(12326==a)L.stencil=0<y[b+4>>2];else if(12337==a)a=y[b+4>>2],L.antialias=0<a;else if(12338==a)a=y[b+4>>2],L.antialias=1==a;else if(12544==a)L.gf=12547!=y[b+4>>2];else if(12344==a)break;b+=8}c&&d||
e?(e&&(y[e>>2]=1),c&&0<d&&(y[c>>2]=62002),J=12288,c=1):(J=12300,c=0)}return c},xa:function(a,b,c,d){if(62E3!=a)return J=12296,0;for(a=1;;){b=y[d>>2];if(12440==b)a=y[d+4>>2];else if(12344==b)break;else return J=12292,0;d+=8}if(2!=a)return J=12293,0;L.Ee=a-1;L.hf=0;Lb=vb(h.canvas,L);if(0!=Lb)return J=12288,wb(Lb),h.Ze=!0,mb.forEach(function(e){e()}),wb(null),62004;J=12297;return 0},za:function(a,b){if(62E3!=a)return J=12296,0;if(62002!=b)return J=12293,0;J=12288;return 62006},ya:function(a,b){if(62E3!=
a)return J=12296,0;if(62004!=b)return J=12294,0;a=Lb;$b===H[a]&&($b=null);if("object"==typeof qc)for(var c=H[a].ge.canvas,d=0;d<T.length;++d)T[d].target!=c||ic(d--);H[a]&&H[a].ge.canvas&&(H[a].ge.canvas.ke=void 0);H[a]=null;J=12288;Hb==b&&(Hb=0);return 1},Aa:function(a,b){if(62E3!=a)return J=12296,0;if(62006!=b)return J=12301,1;Ib==b&&(Ib=0);Jb==b&&(Jb=0);J=12288;return 1},Ka:function(a,b,c,d){if(62E3!=a)return J=12296,0;if(62002!=b)return J=12293,0;if(!d)return J=12300,0;J=12288;switch(c){case 12320:return y[d>>
2]=L.alpha?32:24,1;case 12321:return y[d>>2]=L.alpha?8:0,1;case 12322:return y[d>>2]=8,1;case 12323:return y[d>>2]=8,1;case 12324:return y[d>>2]=8,1;case 12325:return y[d>>2]=L.depth?24:0,1;case 12326:return y[d>>2]=L.stencil?8:0,1;case 12327:return y[d>>2]=12344,1;case 12328:return y[d>>2]=62002,1;case 12329:return y[d>>2]=0,1;case 12330:return y[d>>2]=4096,1;case 12331:return y[d>>2]=16777216,1;case 12332:return y[d>>2]=4096,1;case 12333:return y[d>>2]=0,1;case 12334:return y[d>>2]=0,1;case 12335:return y[d>>
2]=12344,1;case 12337:return y[d>>2]=L.antialias?4:0,1;case 12338:return y[d>>2]=L.antialias?1:0,1;case 12339:return y[d>>2]=4,1;case 12340:return y[d>>2]=12344,1;case 12341:case 12342:case 12343:return y[d>>2]=-1,1;case 12345:case 12346:return y[d>>2]=0,1;case 12347:return y[d>>2]=0,1;case 12348:return y[d>>2]=1;case 12349:case 12350:return y[d>>2]=0,1;case 12351:return y[d>>2]=12430,1;case 12352:return y[d>>2]=4,1;case 12354:return y[d>>2]=0,1;default:return J=12292,0}},K:function(){J=12288;return 62E3},
wa:function(){return J},Ha:function(a,b,c){if(62E3!=a)return J=12296,0;b&&(y[b>>2]=1);c&&(y[c>>2]=4);Gb=!0;J=12288;return 1},Ba:function(a,b,c,d){if(62E3!=a)return J=12296,0;if(0!=d&&62004!=d)return J=12294,0;if(0!=c&&62006!=c||0!=b&&62006!=b)return J=12301,0;wb(d?Lb:null);Hb=d;Jb=b;Ib=c;J=12288;return 1},va:function(a,b){if(62E3!=a)return J=12296,0;J=12288;if(Kb[b])return Kb[b];switch(b){case 12371:a=ac("Emscripten");break;case 12372:a=ac("1.4 Emscripten EGL");break;case 12373:a=ac("");break;case 12429:a=
ac("OpenGL_ES");break;default:return J=12300,0}return Kb[b]=a},Ca:function(){if(Gb)if(h.fe)if(h.fe.isContextLost())J=12302;else return J=12288,1;else J=12290;else J=12289;return 0},Da:function(a,b){if(62E3!=a)return J=12296,0;0==b?Oa(0,0):Oa(1,b);J=12288;return 1},Ia:function(a){if(62E3!=a)return J=12296,0;Jb=Ib=Hb=0;Gb=!1;J=12288;return 1},Fa:function(){J=12288;return 1},Ea:function(){J=12288;return 1},Ma:function(a,b,c){b=cc(b,c);return Ja[a].apply(null,b)},a:function(a,b,c){b=cc(b,c);return Ja[a].apply(null,
b)},U:function(){return Date.now()},oa:function(){if(!pc())return-1;kc(Mc);var a=Ec[1];if(a.exitFullscreen)a.fullscreenElement&&a.exitFullscreen();else if(a.webkitExitFullscreen)a.webkitFullscreenElement&&a.webkitExitFullscreen();else return-1;return 0},ta:function(){kc(Nc);if(document.exitPointerLock)document.exitPointerLock();else return-1;return 0},e:function(){return devicePixelRatio},b:function(a,b,c){a=W(a);if(!a)return-4;a=Lc(a);B[b>>3]=a.width;B[c>>3]=a.height;return 0},O:function(a,b){if(0>
a||a>=rc.length)return-5;if(!rc[a])return-7;Oc(b,rc[a]);return 0},m:Ua,La:function(){return rc.length},ua:function(a,b){y[a>>2]=screen.width;y[b>>2]=screen.height},Nd:function(a){I.activeTexture(a)},Md:function(a,b){I.attachShader(N[a],P[b])},ka:function(a,b){I.de.beginQueryEXT(a,Q[b])},Ld:function(a,b,c){I.bindAttribLocation(N[a],b,r(c))},Kd:function(a,b){I.bindBuffer(a,M[b])},Jd:function(a,b){I.bindFramebuffer(a,Qb[b])},Id:function(a,b){I.bindRenderbuffer(a,Rb[b])},Hd:function(a,b){I.bindTexture(a,
Sb[b])},ba:function(a){I.bindVertexArray(Tb[a])},Gd:function(a,b,c,d){I.blendColor(a,b,c,d)},Fd:function(a){I.blendEquation(a)},Dd:function(a,b){I.blendEquationSeparate(a,b)},Cd:function(a,b){I.blendFunc(a,b)},Bd:function(a,b,c,d){I.blendFuncSeparate(a,b,c,d)},Ad:function(a,b,c,d){I.bufferData(a,c?u.subarray(c,c+b):b,d)},zd:function(a,b,c,d){I.bufferSubData(a,b,u.subarray(d,d+c))},yd:function(a){return I.checkFramebufferStatus(a)},xd:function(a){I.clear(a)},wd:function(a,b,c,d){I.clearColor(a,b,c,
d)},vd:function(a){I.clearDepth(a)},ud:function(a){I.clearStencil(a)},sd:function(a,b,c,d){I.colorMask(!!a,!!b,!!c,!!d)},rd:function(a){I.compileShader(P[a])},qd:function(a,b,c,d,e,f,g,m){I.compressedTexImage2D(a,b,c,d,e,f,m?u.subarray(m,m+g):null)},pd:function(a,b,c,d,e,f,g,m,n){I.compressedTexSubImage2D(a,b,c,d,e,f,g,n?u.subarray(n,n+m):null)},od:function(a,b,c,d,e,f,g,m){I.copyTexImage2D(a,b,c,d,e,f,g,m)},nd:function(a,b,c,d,e,f,g,m){I.copyTexSubImage2D(a,b,c,d,e,f,g,m)},md:function(){var a=S(N),
b=I.createProgram();b.name=a;b.ne=b.le=b.me=0;b.te=1;N[a]=b;return a},ld:function(a){var b=S(P);P[b]=I.createShader(a);return b},kd:function(a){I.cullFace(a)},jd:function(a,b){for(var c=0;c<a;c++){var d=y[b+4*c>>2],e=M[d];e&&(I.deleteBuffer(e),e.name=0,M[d]=null)}},id:function(a,b){for(var c=0;c<a;++c){var d=y[b+4*c>>2],e=Qb[d];e&&(I.deleteFramebuffer(e),e.name=0,Qb[d]=null)}},hd:function(a){if(a){var b=N[a];b?(I.deleteProgram(b),b.name=0,N[a]=null):R(1281)}},ma:function(a,b){for(var c=0;c<a;c++){var d=
y[b+4*c>>2],e=Q[d];e&&(I.de.deleteQueryEXT(e),Q[d]=null)}},gd:function(a,b){for(var c=0;c<a;c++){var d=y[b+4*c>>2],e=Rb[d];e&&(I.deleteRenderbuffer(e),e.name=0,Rb[d]=null)}},fd:function(a){if(a){var b=P[a];b?(I.deleteShader(b),P[a]=null):R(1281)}},ed:function(a,b){for(var c=0;c<a;c++){var d=y[b+4*c>>2],e=Sb[d];e&&(I.deleteTexture(e),e.name=0,Sb[d]=null)}},aa:function(a,b){for(var c=0;c<a;c++){var d=y[b+4*c>>2];I.deleteVertexArray(Tb[d]);Tb[d]=null}},dd:function(a){I.depthFunc(a)},cd:function(a){I.depthMask(!!a)},
bd:function(a,b){I.depthRange(a,b)},ad:function(a,b){I.detachShader(N[a],P[b])},$c:function(a){I.disable(a)},_c:function(a){I.disableVertexAttribArray(a)},Zc:function(a,b,c){I.drawArrays(a,b,c)},Y:function(a,b,c,d){I.drawArraysInstanced(a,b,c,d)},Z:function(a,b){for(var c=Pc[a],d=0;d<a;d++)c[d]=y[b+4*d>>2];I.drawBuffers(c)},Yc:function(a,b,c,d){I.drawElements(a,b,c,d)},X:function(a,b,c,d,e){I.drawElementsInstanced(a,b,c,d,e)},Xc:function(a){I.enable(a)},Wc:function(a){I.enableVertexAttribArray(a)},
ja:function(a){I.de.endQueryEXT(a)},Vc:function(){I.finish()},Uc:function(){I.flush()},Tc:function(a,b,c,d){I.framebufferRenderbuffer(a,b,c,Rb[d])},Sc:function(a,b,c,d,e){I.framebufferTexture2D(a,b,c,Sb[d],e)},Rc:function(a){I.frontFace(a)},Pc:function(a,b){Qc(a,b,"createBuffer",M)},Nc:function(a,b){Qc(a,b,"createFramebuffer",Qb)},na:function(a,b){for(var c=0;c<a;c++){var d=I.de.createQueryEXT();if(!d){for(R(1282);c<a;)y[b+4*c++>>2]=0;break}var e=S(Q);d.name=e;Q[e]=d;y[b+4*c>>2]=e}},Mc:function(a,
b){Qc(a,b,"createRenderbuffer",Rb)},Lc:function(a,b){Qc(a,b,"createTexture",Sb)},$:function(a,b){Qc(a,b,"createVertexArray",Tb)},Oc:function(a){I.generateMipmap(a)},Kc:function(a,b,c,d,e,f,g){Rc("getActiveAttrib",a,b,c,d,e,f,g)},Jc:function(a,b,c,d,e,f,g){Rc("getActiveUniform",a,b,c,d,e,f,g)},Ic:function(a,b,c,d){a=I.getAttachedShaders(N[a]);var e=a.length;e>b&&(e=b);y[c>>2]=e;for(b=0;b<e;++b)y[d+4*b>>2]=P.indexOf(a[b])},Hc:function(a,b){return I.getAttribLocation(N[a],r(b))},Gc:function(a,b){Tc(a,
b,4)},Fc:function(a,b,c){c?y[c>>2]=I.getBufferParameter(a,b):R(1281)},Ec:function(){var a=I.getError()||Wb;Wb=0;return a},Dc:function(a,b){Tc(a,b,2)},Cc:function(a,b,c,d){a=I.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;y[d>>2]=a},Bc:function(a,b){Tc(a,b,0)},zc:function(a,b,c,d){a=I.getProgramInfoLog(N[a]);null===a&&(a="(unknown error)");b=0<b&&d?w(a,d,b):0;c&&(y[c>>2]=b)},Ac:function(a,b,c){if(c)if(a>=Pb)R(1281);else if(a=N[a],35716==
b)a=I.getProgramInfoLog(a),null===a&&(a="(unknown error)"),y[c>>2]=a.length+1;else if(35719==b){if(!a.ne)for(b=0;b<I.getProgramParameter(a,35718);++b)a.ne=Math.max(a.ne,I.getActiveUniform(a,b).name.length+1);y[c>>2]=a.ne}else if(35722==b){if(!a.le)for(b=0;b<I.getProgramParameter(a,35721);++b)a.le=Math.max(a.le,I.getActiveAttrib(a,b).name.length+1);y[c>>2]=a.le}else if(35381==b){if(!a.me)for(b=0;b<I.getProgramParameter(a,35382);++b)a.me=Math.max(a.me,I.getActiveUniformBlockName(a,b).length+1);y[c>>
2]=a.me}else y[c>>2]=I.getProgramParameter(a,b);else R(1281)},da:function(a,b,c){if(c){a=I.de.getQueryObjectEXT(Q[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;Sc(c,d)}else R(1281)},ga:function(a,b,c){if(c){a=I.de.getQueryObjectEXT(Q[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;y[c>>2]=d}else R(1281)},ca:function(a,b,c){if(c){a=I.de.getQueryObjectEXT(Q[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;Sc(c,d)}else R(1281)},ea:function(a,b,c){if(c){a=I.de.getQueryObjectEXT(Q[a],b);var d;"boolean"==typeof a?
d=a?1:0:d=a;y[c>>2]=d}else R(1281)},ha:function(a,b,c){c?y[c>>2]=I.de.getQueryEXT(a,b):R(1281)},yc:function(a,b,c){c?y[c>>2]=I.getRenderbufferParameter(a,b):R(1281)},wc:function(a,b,c,d){a=I.getShaderInfoLog(P[a]);null===a&&(a="(unknown error)");b=0<b&&d?w(a,d,b):0;c&&(y[c>>2]=b)},uc:function(a,b,c,d){a=I.getShaderPrecisionFormat(a,b);y[c>>2]=a.rangeMin;y[c+4>>2]=a.rangeMax;y[d>>2]=a.precision},tc:function(a,b,c,d){if(a=I.getShaderSource(P[a]))b=0<b&&d?w(a,d,b):0,c&&(y[c>>2]=b)},xc:function(a,b,c){c?
35716==b?(a=I.getShaderInfoLog(P[a]),null===a&&(a="(unknown error)"),y[c>>2]=a?a.length+1:0):35720==b?(a=I.getShaderSource(P[a]),y[c>>2]=a?a.length+1:0):y[c>>2]=I.getShaderParameter(P[a],b):R(1281)},sc:function(a){var b=Ub[a];if(!b){switch(a){case 7939:b=I.getSupportedExtensions()||[];b=b.concat(b.map(function(d){return"GL_"+d}));b=Uc(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=I.getParameter(a))||R(1280);b=b&&Uc(b);break;case 7938:b=Uc("OpenGL ES 2.0 ("+I.getParameter(7938)+")");
break;case 35724:b=I.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b="OpenGL ES GLSL ES "+c[1]+" ("+b+")");b=Uc(b);break;default:R(1280)}Ub[a]=b}return b},rc:function(a,b,c){c?A[c>>2]=I.getTexParameter(a,b):R(1281)},qc:function(a,b,c){c?y[c>>2]=I.getTexParameter(a,b):R(1281)},nc:function(a,b){b=r(b);if(a=N[a]){Wc(a);var c=a.je,d=0,e=b,f=Vc(b);0<f&&(d=parseInt(b.slice(f+1))>>>0,e=b.slice(0,f));if((e=a.ue[e])&&d<e[0]&&(d+=e[1],
c[d]=c[d]||I.getUniformLocation(a,b)))return d}else R(1281);return-1},pc:function(a,b,c){Xc(a,b,c,2)},oc:function(a,b,c){Xc(a,b,c,0)},jc:function(a,b,c){c?y[c>>2]=I.getVertexAttribOffset(a,b):R(1281)},mc:function(a,b,c){Yc(a,b,c,2)},lc:function(a,b,c){Yc(a,b,c,5)},ic:function(a,b){I.hint(a,b)},hc:function(a){return(a=M[a])?I.isBuffer(a):0},gc:function(a){return I.isEnabled(a)},fc:function(a){return(a=Qb[a])?I.isFramebuffer(a):0},ec:function(a){return(a=N[a])?I.isProgram(a):0},la:function(a){return(a=
Q[a])?I.de.isQueryEXT(a):0},dc:function(a){return(a=Rb[a])?I.isRenderbuffer(a):0},cc:function(a){return(a=P[a])?I.isShader(a):0},bc:function(a){return(a=Sb[a])?I.isTexture(a):0},_:function(a){return(a=Tb[a])?I.isVertexArray(a):0},ac:function(a){I.lineWidth(a)},$b:function(a){a=N[a];I.linkProgram(a);a.je=0;a.ue={}},_b:function(a,b){3317==a&&(Vb=b);I.pixelStorei(a,b)},Zb:function(a,b){I.polygonOffset(a,b)},ia:function(a,b){I.de.queryCounterEXT(Q[a],b)},Yb:function(a,b,c,d,e,f,g){(g=Zc(f,e,c,d,g))?I.readPixels(a,
b,c,d,e,f,g):R(1280)},Xb:function(){},Wb:function(a,b,c,d){I.renderbufferStorage(a,b,c,d)},Vb:function(a,b){I.sampleCoverage(a,!!b)},Ub:function(a,b,c,d){I.scissor(a,b,c,d)},Tb:function(){R(1280)},Sb:function(a,b,c,d){b=Xb(b,c,d);I.shaderSource(P[a],b)},Qb:function(a,b,c){I.stencilFunc(a,b,c)},Pb:function(a,b,c,d){I.stencilFuncSeparate(a,b,c,d)},Ob:function(a){I.stencilMask(a)},Nb:function(a,b){I.stencilMaskSeparate(a,b)},Mb:function(a,b,c){I.stencilOp(a,b,c)},Lb:function(a,b,c,d){I.stencilOpSeparate(a,
b,c,d)},Kb:function(a,b,c,d,e,f,g,m,n){I.texImage2D(a,b,c,d,e,f,g,m,n?Zc(m,g,d,e,n):null)},Jb:function(a,b,c){I.texParameterf(a,b,c)},Ib:function(a,b,c){I.texParameterf(a,b,A[c>>2])},Hb:function(a,b,c){I.texParameteri(a,b,c)},Gb:function(a,b,c){I.texParameteri(a,b,y[c>>2])},Fb:function(a,b,c,d,e,f,g,m,n){var q=null;n&&(q=Zc(m,g,e,f,n));I.texSubImage2D(a,b,c,d,e,f,g,m,q)},Eb:function(a,b){I.uniform1f(X(a),b)},Db:function(a,b,c){if(288>=b)for(var d=Y[b-1],e=0;e<b;++e)d[e]=A[c+4*e>>2];else d=A.subarray(c>>
2,c+4*b>>2);I.uniform1fv(X(a),d)},Cb:function(a,b){I.uniform1i(X(a),b)},Bb:function(a,b,c){if(288>=b)for(var d=$c[b-1],e=0;e<b;++e)d[e]=y[c+4*e>>2];else d=y.subarray(c>>2,c+4*b>>2);I.uniform1iv(X(a),d)},Ab:function(a,b,c){I.uniform2f(X(a),b,c)},zb:function(a,b,c){if(144>=b)for(var d=Y[2*b-1],e=0;e<2*b;e+=2)d[e]=A[c+4*e>>2],d[e+1]=A[c+(4*e+4)>>2];else d=A.subarray(c>>2,c+8*b>>2);I.uniform2fv(X(a),d)},yb:function(a,b,c){I.uniform2i(X(a),b,c)},xb:function(a,b,c){if(144>=b)for(var d=$c[2*b-1],e=0;e<2*
b;e+=2)d[e]=y[c+4*e>>2],d[e+1]=y[c+(4*e+4)>>2];else d=y.subarray(c>>2,c+8*b>>2);I.uniform2iv(X(a),d)},vb:function(a,b,c,d){I.uniform3f(X(a),b,c,d)},ub:function(a,b,c){if(96>=b)for(var d=Y[3*b-1],e=0;e<3*b;e+=3)d[e]=A[c+4*e>>2],d[e+1]=A[c+(4*e+4)>>2],d[e+2]=A[c+(4*e+8)>>2];else d=A.subarray(c>>2,c+12*b>>2);I.uniform3fv(X(a),d)},tb:function(a,b,c,d){I.uniform3i(X(a),b,c,d)},sb:function(a,b,c){if(96>=b)for(var d=$c[3*b-1],e=0;e<3*b;e+=3)d[e]=y[c+4*e>>2],d[e+1]=y[c+(4*e+4)>>2],d[e+2]=y[c+(4*e+8)>>2];
else d=y.subarray(c>>2,c+12*b>>2);I.uniform3iv(X(a),d)},rb:function(a,b,c,d,e){I.uniform4f(X(a),b,c,d,e)},qb:function(a,b,c){if(72>=b){var d=Y[4*b-1],e=A;c>>=2;for(var f=0;f<4*b;f+=4){var g=c+f;d[f]=e[g];d[f+1]=e[g+1];d[f+2]=e[g+2];d[f+3]=e[g+3]}}else d=A.subarray(c>>2,c+16*b>>2);I.uniform4fv(X(a),d)},pb:function(a,b,c,d,e){I.uniform4i(X(a),b,c,d,e)},ob:function(a,b,c){if(72>=b)for(var d=$c[4*b-1],e=0;e<4*b;e+=4)d[e]=y[c+4*e>>2],d[e+1]=y[c+(4*e+4)>>2],d[e+2]=y[c+(4*e+8)>>2],d[e+3]=y[c+(4*e+12)>>2];
else d=y.subarray(c>>2,c+16*b>>2);I.uniform4iv(X(a),d)},nb:function(a,b,c,d){if(72>=b)for(var e=Y[4*b-1],f=0;f<4*b;f+=4)e[f]=A[d+4*f>>2],e[f+1]=A[d+(4*f+4)>>2],e[f+2]=A[d+(4*f+8)>>2],e[f+3]=A[d+(4*f+12)>>2];else e=A.subarray(d>>2,d+16*b>>2);I.uniformMatrix2fv(X(a),!!c,e)},mb:function(a,b,c,d){if(32>=b)for(var e=Y[9*b-1],f=0;f<9*b;f+=9)e[f]=A[d+4*f>>2],e[f+1]=A[d+(4*f+4)>>2],e[f+2]=A[d+(4*f+8)>>2],e[f+3]=A[d+(4*f+12)>>2],e[f+4]=A[d+(4*f+16)>>2],e[f+5]=A[d+(4*f+20)>>2],e[f+6]=A[d+(4*f+24)>>2],e[f+7]=
A[d+(4*f+28)>>2],e[f+8]=A[d+(4*f+32)>>2];else e=A.subarray(d>>2,d+36*b>>2);I.uniformMatrix3fv(X(a),!!c,e)},kb:function(a,b,c,d){if(18>=b){var e=Y[16*b-1],f=A;d>>=2;for(var g=0;g<16*b;g+=16){var m=d+g;e[g]=f[m];e[g+1]=f[m+1];e[g+2]=f[m+2];e[g+3]=f[m+3];e[g+4]=f[m+4];e[g+5]=f[m+5];e[g+6]=f[m+6];e[g+7]=f[m+7];e[g+8]=f[m+8];e[g+9]=f[m+9];e[g+10]=f[m+10];e[g+11]=f[m+11];e[g+12]=f[m+12];e[g+13]=f[m+13];e[g+14]=f[m+14];e[g+15]=f[m+15]}}else e=A.subarray(d>>2,d+64*b>>2);I.uniformMatrix4fv(X(a),!!c,e)},jb:function(a){a=
N[a];I.useProgram(a);I.Ce=a},ib:function(a){I.validateProgram(N[a])},hb:function(a,b){I.vertexAttrib1f(a,b)},gb:function(a,b){I.vertexAttrib1f(a,A[b>>2])},fb:function(a,b,c){I.vertexAttrib2f(a,b,c)},eb:function(a,b){I.vertexAttrib2f(a,A[b>>2],A[b+4>>2])},db:function(a,b,c,d){I.vertexAttrib3f(a,b,c,d)},cb:function(a,b){I.vertexAttrib3f(a,A[b>>2],A[b+4>>2],A[b+8>>2])},bb:function(a,b,c,d,e){I.vertexAttrib4f(a,b,c,d,e)},$a:function(a,b){I.vertexAttrib4f(a,A[b>>2],A[b+4>>2],A[b+8>>2],A[b+12>>2])},Od:function(a,
b){I.vertexAttribDivisor(a,b)},_a:function(a,b,c,d,e,f){I.vertexAttribPointer(a,b,c,!!d,e,f)},Za:function(a,b,c,d){I.viewport(a,b,c,d)},k:function(){return 0},Ya:function(a,b,c){u.copyWithin(a,b,b+c)},pa:function(a,b,c){return ad(a,{xe:y[c>>2],ve:y[c+4>>2],Se:y[c+8>>2],Pe:b,qe:y[c+12>>2],Ae:y[c+16>>2]})},I:function(a,b){a=W(a);return a?a.requestPointerLock?gc&&mc.ie?Nc(a):b?(jc(Nc,2,[a]),1):-2:-1:-4},Qa:function(){p("OOM")},Qc:function(a){eval(r(a))},P:function(){return(rc=navigator.getGamepads?navigator.getGamepads():
navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1},o:function(a,b,c){if("undefined"==typeof onbeforeunload)return-1;if(1!==c)return-5;bd(a,b);return 0},A:function(a,b,c,d){cd(a,b,c,d,12,"blur");return 0},c:Hc,i:function(a,b,c){a=W(a);if(!a)return-4;a.style.width=b+"px";a.style.height=c+"px";return 0},B:function(a,b,c,d){cd(a,b,c,d,13,"focus");return 0},q:function(a,b,c,d){if(!pc())return-1;a=W(a);if(!a)return-4;dd(a,b,c,d,"fullscreenchange");dd(a,b,c,d,"webkitfullscreenchange");
return 0},N:function(a,b,c){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;ed(a,b,c,26,"gamepadconnected");return 0},M:function(a,b,c){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;ed(a,b,c,27,"gamepaddisconnected");return 0},t:function(a,b,c,d){fd(a,b,c,d,2,"keydown");return 0},r:function(a,b,c,d){fd(a,b,c,d,1,"keypress");return 0},s:function(a,b,c,d){fd(a,b,c,d,3,"keyup");return 0},Na:function(a,b,c){a=F(a);Za(a,b,c)},G:function(a,b,c,d){hd(a,b,c,d,5,"mousedown");
return 0},E:function(a,b,c,d){hd(a,b,c,d,33,"mouseenter");return 0},D:function(a,b,c,d){hd(a,b,c,d,34,"mouseleave");return 0},H:function(a,b,c,d){hd(a,b,c,d,8,"mousemove");return 0},F:function(a,b,c,d){hd(a,b,c,d,6,"mouseup");return 0},u:function(a,b,c,d){if(!document||!document.body||!(document.body.requestPointerLock||document.body.pe||document.body.Ke||document.body.Je))return-1;a=W(a);if(!a)return-4;jd(a,b,c,d,"pointerlockchange");jd(a,b,c,d,"mozpointerlockchange");jd(a,b,c,d,"webkitpointerlockchange");
jd(a,b,c,d,"mspointerlockchange");return 0},l:function(a,b,c,d){kd(a,b,c,d);return 0},v:function(a,b,c,d){ld(a,b,c,d,25,"touchcancel");return 0},y:function(a,b,c,d){ld(a,b,c,d,23,"touchend");return 0},w:function(a,b,c,d){ld(a,b,c,d,24,"touchmove");return 0},z:function(a,b,c,d){ld(a,b,c,d,22,"touchstart");return 0},p:function(a,b,c){md(a,b,c);return 0},C:function(a,b,c,d){a=W(a);return"undefined"!=typeof a.onwheel?(nd(a,b,c,d),0):-1},ra:function(a){ea(r(a))},j:function(){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_sleep";
},Ra:function(a,b){var c=0;ud().forEach(function(d,e){var f=b+c;e=z[a+4*e>>2]=f;for(f=0;f<d.length;++f)x[e++>>0]=d.charCodeAt(f);x[e>>0]=0;c+=d.length+1});return 0},Sa:function(a,b){var c=ud();z[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});z[b>>2]=d;return 0},R:function(){return 52},Ta:function(){return 52},Pa:function(){return 70},S:function(a,b,c,d){for(var e=0,f=0;f<c;f++){var g=z[b>>2],m=z[b+4>>2];b+=8;for(var n=0;n<m;n++){var q=u[g+n],t=wd[a];0===q||10===q?((1===a?fa:l)(la(t,
0)),t.length=0):t.push(q)}e+=m}z[d>>2]=e;return 0},x:function(a,b){I.attachShader(N[a],P[b])},h:function(a,b){I.bindBuffer(a,M[b])},Rb:function(a,b){I.blendFunc(a,b)},V:function(a,b,c,d){I.bufferData(a,c?u.subarray(c,c+b):b,d)},vc:function(a){I.clear(a)},wb:function(a,b,c,d){I.clearColor(a,b,c,d)},J:function(a){I.compileShader(P[a])},sa:function(){var a=S(N),b=I.createProgram();b.name=a;b.ne=b.le=b.me=0;b.te=1;N[a]=b;return a},Q:function(a){var b=S(P);P[b]=I.createShader(a);return b},ab:function(a){I.disableVertexAttribArray(a)},
kc:function(a,b,c,d){I.drawElements(a,b,c,d)},n:function(a){I.enable(a)},Oa:function(a){I.enableVertexAttribArray(a)},W:function(a,b){Qc(a,b,"createBuffer",M)},fa:function(a,b){return I.getAttribLocation(N[a],r(b))},d:function(a,b){b=r(b);if(a=N[a]){Wc(a);var c=a.je,d=0,e=b,f=Vc(b);0<f&&(d=parseInt(b.slice(f+1))>>>0,e=b.slice(0,f));if((e=a.ue[e])&&d<e[0]&&(d+=e[1],c[d]=c[d]||I.getUniformLocation(a,b)))return d}else R(1281);return-1},qa:function(a){a=N[a];I.linkProgram(a);a.je=0;a.ue={}},L:function(a,
b,c,d){b=Xb(b,c,d);I.shaderSource(P[a],b)},lb:function(a,b){I.uniform1f(X(a),b)},f:function(a,b,c,d){I.uniform3f(X(a),b,c,d)},g:function(a,b,c,d){if(18>=b){var e=Y[16*b-1],f=A;d>>=2;for(var g=0;g<16*b;g+=16){var m=d+g;e[g]=f[m];e[g+1]=f[m+1];e[g+2]=f[m+2];e[g+3]=f[m+3];e[g+4]=f[m+4];e[g+5]=f[m+5];e[g+6]=f[m+6];e[g+7]=f[m+7];e[g+8]=f[m+8];e[g+9]=f[m+9];e[g+10]=f[m+10];e[g+11]=f[m+11];e[g+12]=f[m+12];e[g+13]=f[m+13];e[g+14]=f[m+14];e[g+15]=f[m+15]}}else e=A.subarray(d>>2,d+64*b>>2);I.uniformMatrix4fv(X(a),
!!c,e)},Ed:function(a){a=N[a];I.useProgram(a);I.Ce=a},Ua:function(a,b,c,d,e,f){I.vertexAttribPointer(a,b,c,!!d,e,f)},td:function(a,b,c,d){I.viewport(a,b,c,d)}};
(function(){function a(e){h.asm=e.exports;ia=h.asm.Pd;e=ia.buffer;h.HEAP8=x=new Int8Array(e);h.HEAP16=oa=new Int16Array(e);h.HEAP32=y=new Int32Array(e);h.HEAPU8=u=new Uint8Array(e);h.HEAPU16=pa=new Uint16Array(e);h.HEAPU32=z=new Uint32Array(e);h.HEAPF32=A=new Float32Array(e);h.HEAPF64=B=new Float64Array(e);qa=h.asm.Sd;ta.unshift(h.asm.Qd);C--;h.monitorRunDependencies&&h.monitorRunDependencies(C);0==C&&(null!==ya&&(clearInterval(ya),ya=null),za&&(e=za,za=null,e()))}function b(e){a(e.instance)}function c(e){return Da().then(function(f){return WebAssembly.instantiate(f,
d)}).then(function(f){return f}).then(e,function(f){l("failed to asynchronously prepare wasm: "+f);p(f)})}var d={a:zd};C++;h.monitorRunDependencies&&h.monitorRunDependencies(C);if(h.instantiateWasm)try{return h.instantiateWasm(d,a)}catch(e){return l("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return ha||"function"!=typeof WebAssembly.instantiateStreaming||Aa()||"function"!=typeof fetch?c(b):fetch(D,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,
d).then(b,function(f){l("wasm streaming compile failed: "+f);l("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();h.___wasm_call_ctors=function(){return(h.___wasm_call_ctors=h.asm.Qd).apply(null,arguments)};h._main=function(){return(h._main=h.asm.Rd).apply(null,arguments)};
var E=h._malloc=function(){return(E=h._malloc=h.asm.Td).apply(null,arguments)},ec=h.stackSave=function(){return(ec=h.stackSave=h.asm.Ud).apply(null,arguments)},fc=h.stackRestore=function(){return(fc=h.stackRestore=h.asm.Vd).apply(null,arguments)},Gc=h.stackAlloc=function(){return(Gc=h.stackAlloc=h.asm.Wd).apply(null,arguments)};h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.Xd).apply(null,arguments)};h.dynCall_ji=function(){return(h.dynCall_ji=h.asm.Yd).apply(null,arguments)};var Ad;
za=function Bd(){Ad||Cd();Ad||(za=Bd)};function Dd(a){var b=h._main;a=a||[];a.unshift(ca);var c=a.length,d=Gc(4*(c+1)),e=d>>2;a.forEach(g=>{var m=y,n=e++,q=na(g)+1,t=Gc(q);ma(g,x,t,q);m[n]=t});y[e]=0;try{var f=b(c,d);Xa(f)}catch(g){Ya(g)}}
function Cd(){function a(){if(!Ad&&(Ad=!0,h.calledRun=!0,!ja)){Ma(ta);Ma(ua);if(h.onRuntimeInitialized)h.onRuntimeInitialized();Ed&&Dd(b);if(h.postRun)for("function"==typeof h.postRun&&(h.postRun=[h.postRun]);h.postRun.length;){var c=h.postRun.shift();wa.unshift(c)}Ma(wa)}}var b=b||ba;if(!(0<C)){if(h.preRun)for("function"==typeof h.preRun&&(h.preRun=[h.preRun]);h.preRun.length;)xa();Ma(ra);0<C||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1);
a()},1)):a())}}if(h.preInit)for("function"==typeof h.preInit&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();var Ed=!0;h.noInitialRun&&(Ed=!1);Cd();