(function(){'use strict';const da=["DEBUG","INFO","WARN","ERROR"];var ea="main",fa=null;function ja(a,b,d){if(!(1>a)){var c="EagRuntimeJS: ["+(new Date).toLocaleTimeString()+"]["+ea+"/"+(da[a]||"UNKNOWN")+"] ";a:{if(0",[a])}function na(a){return function(){k("Unsupported function called: {}.{}",a);return 0}}function D(a,b){a[b]=na(b)}function pa(a){return new Promise(function(b){setTimeout(b,a)})} class ra{constructor(){this.G=this.o=null;this.u=0}K(){return this.u}push(a){this.G&&(this.G._next=a);this.G=a;this.o||(this.o=a);++this.u}j(){if(this.o){const a=this.o;(this.o=a._next||null)?a._next=null:this.G=null;--this.u;return a}return null}};var sa={},H={},ta={},ua={},xa={},J={},ya={},K={},Aa={},Ba={},Ca={},N={},Da={},Ea={},Ga={},Ha=null,Ia=null,Ja=null,Ka=null,Na=null,Oa=null,Pa=null,Qa=null,O=null,Ra=null,Sa=null,S=null,T=null,Ta=null,Ua=!1,Va=0,Ya=null,Za=!1,$a=null,ab=null,bb=!1;const cb=[];var db=null,eb="_eaglercraftX",fb=!1,hb=!1,ib=!1,jb=!0,kb=!1,lb=!1,mb=!0,nb=!0,ob=!1; function pb(){"string"===typeof O.localStorageNamespace&&(eb=O.localStorageNamespace);"boolean"===typeof O.openDebugConsoleOnLaunch&&(fb=O.openDebugConsoleOnLaunch);"boolean"===typeof O.fixDebugConsoleUnloadListener&&(hb=O.fixDebugConsoleUnloadListener);"boolean"===typeof O.forceWebViewSupport&&(ib=O.forceWebViewSupport);"boolean"===typeof O.enableWebViewCSP&&(jb=O.enableWebViewCSP);"boolean"===typeof O.forceWebGL1&&(kb=O.forceWebGL1);"boolean"===typeof O.forceWebGL2&&(lb=O.forceWebGL2);"boolean"=== typeof O.allowExperimentalWebGL1&&(mb=O.allowExperimentalWebGL1);"boolean"===typeof O.useWebGLExt&&(nb=O.useWebGLExt);"boolean"===typeof O.useDelayOnSwap&&(ob=O.useDelayOnSwap)} async function qb(){function a(){try{v=new AudioContext,b(),d()}catch(w){la("Could not initialize audio context",w)}}function b(){if(!I){I=!0;var w=function(){d()};window.addEventListener("keydown",w);S.addEventListener("mousedown",w);S.addEventListener("touchstart",w);S.addEventListener("pointerdown",w);document.addEventListener("visibilitychange",w)}}function d(){if(v&&"suspended"===v.state)try{var w=v.resume();w&&"function"===typeof w.catch&&w.catch(function(){})}catch(C){}}pb();fa=Lb;"yes"!== window.__isEaglerX188UnloadListenerSet&&(window.onbeforeunload=function(){window.__curEaglerX188UnloadListenerCB&&window.__curEaglerX188UnloadListenerCB();return!1},window.__isEaglerX188UnloadListenerSet="yes");e("Initializing EagRuntime JS context...");await Mb();Nb();Ob();Pb();Qb();Rb();Sb();D(Ga,"sendPacket");D(Ga,"getAvailablePackets");D(Ga,"getNextPacket");D(Ga,"setCrashCallback");D(Ga,"isTabAboutToClose");Sa.classList.add("_eaglercraftX_root_element");Sa.style.overflow="hidden";for(var c=null, g;g=Sa.lastChild;)c||=g,Sa.removeChild(g);S=document.createElement("div");S.classList.add("_eaglercraftX_wrapper_element");S.style.position="relative";S.style.width="100%";S.style.height="100%";S.style.overflow="hidden";S.style.backgroundColor="black";Sa.appendChild(S);c&&(c.style.position="absolute",c.style.top="0px",c.style.left="0px",c.style.right="0px",c.style.bottom="0px",c.style.zIndex="2",c.classList.add("_eaglercraftX_early_splash_element"),S.appendChild(c));await pa(10);g=window.devicePixelRatio; c=g*S.clientWidth|0;g=g*S.clientHeight|0;e("Initializing audio context");if("function"===typeof document.exitPointerLock){var h=navigator.userAgent;null!==h?(h=h.toLowerCase(),Za=-1!==h.indexOf("mobi")||-1!==h.indexOf("tablet")):Za=!1}else Za=!0;var v=null,I=!1;!Za&&navigator.userActivation&&navigator.userActivation.hasBeenActive?a():(h=document.createElement("div"),h.classList.add("_eaglercraftX_press_any_key_image"),h.style.position="absolute",h.style.top="0px",h.style.left="0px",h.style.right= "0px",h.style.bottom="0px",h.style.width="100%",h.style.height="100%",h.style.zIndex="3",h.style.touchAction="pan-x pan-y",h.style.background='center / contain no-repeat url("'+Oa+'"), left / 1000000% 100% no-repeat url("'+Oa+'") white',h.style.setProperty("image-rendering","pixelated"),S.appendChild(h),await new Promise(function(w,C){function E(){if(!P){P=!0;Za?S.removeChild(Q):(window.removeEventListener("keydown",E),S.removeEventListener("mousedown",E),S.removeEventListener("touchstart",E));try{a()}catch(t){C(t); return}w()}}var P=!1;if(Za){var Q=document.createElement("div");Q.classList.add("_eaglercraftX_mobile_press_any_key");Q.setAttribute("style","position:absolute;background-color:white;font-family:sans-serif;top:10%;left:10%;right:10%;bottom:10%;border:5px double black;padding:calc(5px + 7vh) 15px;text-align:center;font-size:20px;user-select:none;z-index:10;");Q.innerHTML='

Mobile Browser Detected

Warning: EaglercraftX WASM-GC requires a lot of memory and may not be stable on most mobile devices!

(Tablets and phones with large screens work best)

'; Q.querySelector("._eaglercraftX_mobile_launch_client").addEventListener("click",E);S.appendChild(Q)}else window.addEventListener("keydown",E),S.addEventListener("mousedown",E),S.addEventListener("touchstart",E)}),S.removeChild(h));v?(d(),Tb(v)):Ub();e("Creating main canvas");T=document.createElement("canvas");T.classList.add("_eaglercraftX_canvas_element");T.style.width="100%";T.style.height="100%";T.style.zIndex="1";T.style.touchAction="pan-x pan-y";T.style.setProperty("-webkit-touch-callout","none"); T.style.setProperty("-webkit-tap-highlight-color","rgba(255, 255, 255, 0)");T.style.setProperty("image-rendering","pixelated");T.width=c;T.height=g;S.appendChild(T);await Vb();e("Creating WebGL context");S.addEventListener("webglcontextcreationerror",function(w){k("[WebGL Error]: {}",w.statusMessage)});c={antialias:!1,depth:!1,powerPreference:"high-performance",desynchronized:!0,preserveDrawingBuffer:!1,premultipliedAlpha:!1,alpha:!1};h=!1;if(lb){e("Note: Forcing WebGL 2.0 context");g=300;var x=T.getContext("webgl2", c);if(!x)return Wb("WebGL 2.0 is not supported on this device!"),!1}else if(kb){if(e("Note: Forcing WebGL 1.0 context"),g=200,x=T.getContext("webgl",c),!x)if(mb){if(h=!0,x=T.getContext("experimental-webgl",c),!x)return Wb("WebGL is not supported on this device!"),!1}else return Wb("WebGL is not supported on this device!"),!1}else if(g=300,x=T.getContext("webgl2",c),!x&&(g=200,x=T.getContext("webgl",c),!x))if(mb){if(h=!0,x=T.getContext("experimental-webgl",c),!x)return Wb("WebGL is not supported on this device!"), !1}else return Wb("WebGL is not supported on this device!"),!1;h&&alert('WARNING: Detected "experimental" WebGL 1.0 support, certain graphics API features may be missing, and therefore EaglercraftX may malfunction and crash!');Va=g;Ta=x;Ua=h;Xb(x,g);e("OpenGL Version: {}",K.glGetString(7938));e("OpenGL Renderer: {}",K.glGetString(7937));c=K.dumpActiveExtensions();if(0===c.length)e("Unlocked the following OpenGL ES extensions: (NONE)");else for(c.sort(),e("Unlocked the following OpenGL ES extensions:"), g=0;g


Things you can try:

  1. Just try using Eaglercraft on a different device, it isn\'t a bug it\'s common sense
  2. If this screen just appeared randomly, try restarting your browser or device
  3. If you are not using Chrome/Edge, try installing the latest Google Chrome
  4. If your browser is out of date, please update it to the latest version
'; c.querySelector("#_eaglercraftX_crashReason").appendChild(document.createTextNode(a));try{var g=window.navigator.userAgent}catch(v){g=""}c.querySelector("#_eaglercraftX_crashUserAgent").appendChild(document.createTextNode(g));db&&db();window.__curEaglerX188UnloadListenerCB=null;a="No GL_RENDERER string could be queried";try{const v=document.createElement("canvas");v.width=64;v.height=64;const I=v.getContext("webgl");if(I){if(I.getExtension("WEBGL_debug_renderer_info"))var h=I.getParameter(37446); else(h=I.getParameter(WebGLRenderingContext.RENDERER))&&(h+=" [masked]");h&&(a=h)}}catch(v){}c.querySelector("#_eaglercraftX_crashWebGL").appendChild(document.createTextNode(a))}else alert("Compatibility error: "+a)}}var lc=null; function fc(){if(lc)return lc;try{var a=Ta,b=Ua;if(!a){b=!1;var d=document.createElement("canvas");d.width=64;d.height=64;a=d.getContext("webgl2");a||(a=d.getContext("webgl"),a||(b=!0,a=d.getContext("experimental-webgl")))}return a?(d="",0"}return"window.navigator."+a+" = "+b+"\n"}function hc(){try{var a=[];if("object"===typeof navigator.plugins){var b=navigator.plugins.length;if(0"}return"window.navigator.plugins = "+g+"\n"} function jc(a){try{var b=window.screen[a]}catch(d){b=""}return"window.screen."+a+" = "+b+"\n"}function kc(){try{var a=window.location.href}catch(b){a=""}return"window.location.href = "+a+"\n"}function ic(a){try{var b=window[a]}catch(d){b=""}return"window."+a+" = "+b+"\n"};function mc(a,b,d){const c=document.createElement("a");c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.style.zIndex="-100";c.style.color="transparent";c.innerText="Download File";c.href=b;c.target="_blank";c.download=a;S.appendChild(c);setTimeout(function(){c.click();setTimeout(function(){S.removeChild(c)},50);d&&setTimeout(d,6E4)},50)}var nc=0,oc=null,pc=null,qc=null,rc=null; function Lb(a,b){if(qc)rc&&rc(a,b);else for(a={msg:a,err:b,next:null},pc&&(pc.next=a),oc||=a,pc=a,++nc;256Debug Console

');P.close();Q=P.body;t=P.getElementById("loggerMessageContainer"); for(q=oc;q;)h(q.msg+"\n",q.err?"#DD0000":"#000000"),q=q.next;pc=oc=null;nc=0;v();q=()=>{null!=qc&&(qc=null,d(!1))};qc.addEventListener("beforeunload",q);qc.addEventListener("unload",q)}else k("Logger popup was blocked!"),window.alert("ERROR: Popup blocked!\n\nPlease make sure you have popups enabled for this site!")}}function h(q,p){var y=P.createElement("span");y.innerText=q;y.style.color=p;t.appendChild(y);for(q=t.children;2048{qc.scrollTo(0, Q.scrollHeight||Q.clientHeight)},1)}let I="";H.setClipboard=function(q){I=q;try{if(a(q))return!0;if(window.navigator.clipboard&&window.isSecureContext)return window.navigator.clipboard.writeText(q).then(function(){I=q}).catch(function(){k("Clipboard API write failed!")}),!0}catch(p){k("Failed to set clipboard data!")}return!1};H.getClipboard=new WebAssembly.Suspending(async function(){var q=null;try{window.navigator.clipboard&&window.isSecureContext&&(q=await navigator.clipboard.readText())}catch(p){k("Failed to read clipboard data!")}(null=== q||void 0===q||0===q.length)&&0{if(qc){var q=qc;t=Q=P=qc=null;q.close()}})}catch(q){}(fb||c())&&g();rc=function(q,p){var y=qc.innerHeight+qc.pageYOffset>=Q.offsetHeight;h(q+"\n",p?"#DD0000":"#000000");y&&v()};H.showDebugConsole=function(){d(!0);g()};H.addLogMessage=Lb;H.isShowingDebugConsole=function(){return!!qc};H.getFaviconURL=function(){return Qa}} ;ta.getEPKFileData=function(a){const b=Na[a];Na[a]=null;return b};ta.getEPKFileCount=function(){return Na.length}; if("undefined"!==typeof window){ta.loadImageFile0=new WebAssembly.Suspending(function(a,b){return new Promise(function(d){const c=URL.createObjectURL(new Blob([a],{type:b}));if(c){const g=document.createElement("img");g.addEventListener("load",function(){URL.revokeObjectURL(c);d({width:g.width,height:g.height,img:g})});g.addEventListener("error",function(){URL.revokeObjectURL(c);d(null)});g.src=c}else d(null)})});var sc=null,tc=null;ta.loadImageFile1=function(a,b){const d=a.width,c=a.height;if(a= a.img)sc||=document.createElement("canvas"),sc.widthl&&(l=1);Q=P=0;for(var B=T;B&&!isNaN(B.offsetLeft)&&!isNaN(B.offsetTop);)P+=B.offsetLeft-B.scrollLeft,Q+=B.offsetTop-B.scrollTop,B=B.offsetParent;B=S.clientWidth*l|0;var X=S.clientHeight*l|0,R=0,aa=0,qa=B,oa=X;if(Y){oa=window.visualViewport;var ba=oa.scale;R=oa.pageLeft*l*ba;aa=oa.pageTop*l*ba;qa=oa.width*l*ba;oa=oa.height*l*ba;1>qa&&(qa=1);1>oa&&(oa=1);0>R?(qa+=R,R=0):R>=B&&(R=B-1);0>aa?(oa+=aa,aa=0):aa>=X&&(aa=X-1);R+qa>B&&(qa=B- R);aa+oa>X&&(oa=X-aa)}ba={eventTypeMask:0};L!==l&&(L=l,ba.eventTypeMask|=4,ba.windowDPI=l);if(A!==B||F!==X)A=B,F=X,ba.eventTypeMask|=1,ba.windowWidth=B,ba.windowHeight=X;if(U!==R||Z!==aa||La!==qa||gb!==oa)U=R,Z=aa,La=qa,gb=oa,ba.eventTypeMask|=2,ba.visualViewportX=R,ba.visualViewportY=aa,ba.visualViewportW=qa,ba.visualViewportH=oa;0!==ba.eventTypeMask&&W(0,9,ba)}function b(l){const B=l.length,X=Array(B);for(var R=0;R=l){const X=1E3/l;if(0===ha)ha=performance.now()+X;else{l=performance.now();var B=ha-l|0;if(0B-Wa&&(va=window.setTimeout(function(){try{T.requestPointerLock()}catch(X){}},3100-(B-Wa)))}else if(-1!==va&&window.clearTimeout(va),va=-1,!Ma)try{document.exitPointerLock()}catch(X){}}}function I(){if(ia)if(n.matches){if(r)try{navigator.keyboard.unlock()}catch(l){}try{document.exitFullscreen()}catch(l){}}else{if(r)try{navigator.keyboard.lock()}catch(l){}try{T.requestFullscreen()}catch(l){}}} function x(){C()?w():m?(m.blur(),m.value="",setTimeout(function(){m&&(t?t.removeChild(m):m.remove(),m=null);t&&(S.removeChild(t),t=null)},10)):(t&&(S.removeChild(t),t=null),t=document.createElement("form"),t.setAttribute("autocomplete","off"),t.classList.add("_eaglercraftX_text_input_wrapper"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.bottom="0px",t.style.zIndex="-100",t.style.margin="0px",t.style.padding="0px",t.style.border="none",t.addEventListener("submit", function(l){l.preventDefault();l.stopPropagation();l=l.timeStamp;l&&(0!==y&&10>l-y||0!==f&&10>l-f||0!==u&&10>l-u)||(p||(e("Note: Generating return keystroke from submit event on form, this browser probably doesn't generate keydown/beforeinput/input when enter/return is pressed on the on-screen keyboard"),p=!0),W(0,3,{eventType:0,absoluteCode:28,absoluteChar:10}))}),m=document.createElement("input"),m.type="password",m.value=" ",m.classList.add("_eaglercraftX_text_input_element"),m.setAttribute("autocomplete", "off"),m.style.position="absolute",m.style.top="0px",m.style.left="0px",m.style.right="0px",m.style.bottom="0px",m.style.zIndex="-100",m.style.margin="0px",m.style.padding="0px",m.style.border="none",m.style.setProperty("-webkit-touch-callout","default"),m.addEventListener("beforeinput",function(l){if(m===l.target){z||(e("Note: Caught beforeinput event from on-screen keyboard, browser probably does not generate global keydown/keyup events on text fields, or does not respond to cancelling keydown"), z=!0);var B=l.timeStamp;if(B){if(0!==y&&10>B-y)return;f=B}l.preventDefault();l.stopPropagation();switch(l.inputType){case "insertParagraph":case "insertLineBreak":W(0,3,{eventType:0,absoluteCode:28,absoluteChar:10});break;case "deleteWordBackward":case "deleteSoftLineBackward":case "deleteHardLineBackward":case "deleteEntireSoftLine":case "deleteContentBackward":case "deleteContent":W(0,3,{eventType:0,absoluteCode:14,absoluteChar:0});break;case "deleteWordForward":case "deleteSoftLineForward":case "deleteHardLineForward":case "deleteContentForward":W(0, 3,{eventType:0,absoluteCode:211,absoluteChar:0});break;case "insertText":case "insertCompositionText":case "insertReplacementText":(l=l.data)&&0l-y||0!==f&&10>l-f)return;u=l}l=m.value;var B=l.length;0===B?W(0,3,{eventType:0,absoluteCode:14,absoluteChar:0}):1===B?W(0,3,{eventType:1,codepoints:l}):(l=l.trim(),B=l.length,0===B?W(0,3,{eventType:0,absoluteCode:57, absoluteChar:32}):W(0,3,{eventType:1,codepoints:l.charAt(B-1)}));m.value=" ";m.setSelectionRange(1,1)}}),m.addEventListener("focus",function(l){m===l.target&&(m.value=" ",m.setSelectionRange(1,1))}),m.addEventListener("select",function(l){m===l.target&&(l.preventDefault(),l.stopPropagation(),m.value=" ",m.setSelectionRange(1,1))}),t.appendChild(m),S.appendChild(t),m.value=" ",m.focus(),m.select(),m.setSelectionRange(1,1))}function w(){if(m){m.blur();m.value="";const l=m,B=t;window.setTimeout(function(){null!== B?(B.removeChild(l),B.remove()):l.remove()},10);t=m=null}else t&&(S?S.removeChild(t):t.remove(),t=null)}function C(){return!!m&&document.activeElement===m}var E=null,P=0,Q=0,t=null,m=null,z=!1,q=!1,p=!1,y=0,f=0,u=0,A=-1,F=-1,L=-1,Y=!1,U=-1,Z=-1,La=-1,gb=-1,Fa=!1,za=!1,Ma=!1,Wa=0,va=-1,ia=!1,n=null,r=!1,G=!1,M=-1,V=!1,ca=null,wa=null,Xa=null,rb=null,sb=null,tb=null,ub=null,vb=null,wb=null,xb=null,yb=null,zb=null,Ab=null,Bb=null,Cb=null,Db=null,Eb=null,Fb=null,Gb=null,Hb=null,Ib=null,Jb=null,Kb=null; E=document.createElement("div");E.classList.add("_eaglercraftX_keyboard_open_zone");E.style.display="none";E.style.position="absolute";E.style.backgroundColor="transparent";E.style.top="0px";E.style.left="0px";E.style.width="0px";E.style.height="0px";E.style.zIndex="100";E.style.touchAction="pan-x pan-y";E.style.setProperty("-webkit-touch-callout","none");E.style.setProperty("-webkit-tap-highlight-color","rgba(255, 255, 255, 0)");S.appendChild(E);a();S.addEventListener("contextmenu",ca=function(l){l.target!== Dc&&(l.preventDefault(),l.stopPropagation())});T.addEventListener("mousedown",wa=function(l){l.preventDefault();l.stopPropagation();Fa&&za&&document.pointerLockElement!==T?v(1):W(0,0,{eventType:0,posX:l.offsetX,posY:l.offsetY,button:l.button})});T.addEventListener("mouseup",Xa=function(l){l.preventDefault();l.stopPropagation();W(0,0,{eventType:1,posX:l.offsetX,posY:l.offsetY,button:l.button})});T.addEventListener("mousemove",rb=function(l){l.preventDefault();l.stopPropagation();W(0,0,{eventType:2, posX:l.offsetX,posY:l.offsetY,movementX:l.movementX,movementY:l.movementY})});T.addEventListener("mouseenter",sb=function(){W(0,7,null)});T.addEventListener("mouseleave",tb=function(){W(0,8,null)});T.addEventListener("touchstart",ub=function(l){l.preventDefault();l.stopPropagation();W(0,2,{eventType:0,changedTouches:b(l.changedTouches),targetTouches:b(l.targetTouches)});w()});T.addEventListener("touchend",vb=function(l){l.preventDefault();l.stopPropagation();W(0,2,{eventType:2,changedTouches:b(l.changedTouches), targetTouches:b(l.targetTouches)})});T.addEventListener("touchmove",wb=function(l){l.preventDefault();l.stopPropagation();W(0,2,{eventType:1,changedTouches:b(l.changedTouches),targetTouches:b(l.targetTouches)})});T.addEventListener("touchcancel",xb=function(l){W(0,2,{eventType:2,changedTouches:b(l.changedTouches),targetTouches:b(l.targetTouches)})});T.addEventListener("wheel",Fb=function(l){l.preventDefault();l.stopPropagation();W(0,0,{eventType:3,posX:l.offsetX,posY:l.offsetY,wheel:l.deltaY})}); window.addEventListener("blur",Hb=function(){W(0,6,null)});window.addEventListener("focus",Gb=function(){W(0,5,null)});window.addEventListener("keydown",Ab=function(l){Ec||(l.preventDefault(),l.stopPropagation());"F11"!==l.key||l.repeat?(W(0,1,d(l.repeat?2:0,l)),l.timeStamp&&"Unidentified"!==l.key&&(y=l.timeStamp)):I()});window.addEventListener("keyup",Bb=function(l){Ec||(l.preventDefault(),l.stopPropagation());W(0,1,d(1,l))});E.addEventListener("touchstart",Cb=function(l){l.preventDefault();l.stopPropagation()}); E.addEventListener("touchend",Db=function(l){l.preventDefault();l.stopPropagation();x()});E.addEventListener("touchmove",Eb=function(l){l.preventDefault();l.stopPropagation()});(Fa="function"===typeof document.exitPointerLock)?(document.addEventListener("pointerlockchange",Ib=function(){window.setTimeout(function(){const l=document.pointerLockElement===T;l||za&&(Wa=performance.now()|0);za=l},60);Ma=!1}),document.addEventListener("pointerlockerror",Jb=function(){Ma=!1})):k("Pointer lock is not supported on this browser"); (ia="function"===typeof document.exitFullscreen)?(n=window.matchMedia("(display-mode: fullscreen)"),(r=!(!navigator.keyboard||!navigator.keyboard.lock))&&n.addEventListener("change",Kb=function(){n.matches||navigator.keyboard.unlock()})):k("Fullscreen is not supported on this browser");if("undefined"!==typeof window.visualViewport)if("body"===Sa.tagName.toLowerCase())Y=!0;else{const l=document.body;10>=Math.abs(l.clientWidth-S.clientWidth)&&10>=Math.abs(l.clientHeight-S.clientHeight)&&(Y=!0)}else Y= !1;Y&&e("Note: Detected game is embedded in body, some screens may be resized to window.visualViewport instead for a better mobile experience");try{await c(),G=!0}catch(l){G=!1}G||k("VSync is not supported on this browser");(V="function"===typeof navigator.getGamepads)?(window.addEventListener("gamepadconnected",yb=function(){W(0,10,{eventType:0})}),window.addEventListener("gamepaddisconnected",zb=function(l){W(0,10,{eventType:1,gamepad:l.gamepad})})):k("Gamepad detected as unsupported!");J.keyboardLayoutSupported= function(){return!(!navigator.keyboard||!navigator.keyboard.getLayoutMap)};J.iterateKeyboardLayout=new WebAssembly.Suspending(async function(){const l=[];try{const B=await navigator.keyboard.getLayoutMap();B&&B.forEach&&B.forEach(function(X,R){l.push({key:X,value:R})})}catch(B){}return l});J.updateCanvasSize=function(l,B){T.width!==l&&(T.width=l);T.height!==B&&(T.height=B)};var ha=0;J.updatePlatformAndSleep=new WebAssembly.Suspending(function(l,B){a();if("string"!==typeof document.visibilityState|| "visible"===document.visibilityState)return G&&B?(ha=0,c()):0>=l?(ha=0,ob?Cc(0):Bc()):h(l);ha=0;return g(50)});J.isVSyncSupported=function(){return G};J.mouseSetGrabbed=v;J.isMouseGrabSupported=function(){return Fa};J.isMouseGrabbed=function(){return za};J.isPointerLocked=function(){return Fa&&(Ma||document.pointerLockElement===T)};J.supportsFullscreen=function(){return ia};J.toggleFullscreen=I;J.isFullscreen=function(){return ia&&n.matches};J.touchSetOpenKeyboardZone=function(l,B,X,R){0!==X&&0!== R?(E.style.display="block",E.style.top=""+(F-B-R)/L+"px",E.style.left=""+l/L+"px",E.style.width=""+X/L+"px",E.style.height=""+R/L+"px"):(E.style.display="none",E.style.top="0px",E.style.left="0px",E.style.width="0px",E.style.height="0px")};J.touchCloseDeviceKeyboard=w;J.touchIsDeviceKeyboardOpenMAYBE=C;J.gamepadSupported=function(){return V};J.isVisualViewport=function(){return Y};db=function(){try{ca&&(S.removeEventListener("contextmenu",ca),ca=null),wa&&(T.removeEventListener("mousedown",wa),wa= null),Xa&&(T.removeEventListener("mouseup",Xa),Xa=null),rb&&(T.removeEventListener("mousemove",rb),rb=null),sb&&(T.removeEventListener("mouseenter",sb),sb=null),tb&&(T.removeEventListener("mouseleave",tb),tb=null),ub&&(T.removeEventListener("touchstart",ub),ub=null),vb&&(T.removeEventListener("touchend",vb),vb=null),wb&&(T.removeEventListener("touchmove",wb),wb=null),xb&&(T.removeEventListener("touchcancel",xb),xb=null),yb&&(window.removeEventListener("gamepadconnected",yb),yb=null),zb&&(window.removeEventListener("gamepaddisconnected", zb),zb=null),Ab&&(window.removeEventListener("keydown",Ab),Ab=null),Bb&&(window.removeEventListener("keyup",Bb),Bb=null),Cb&&(E.removeEventListener("touchstart",Cb),Cb=null),Db&&(E.removeEventListener("touchend",Db),Db=null),Eb&&(E.removeEventListener("touchmove",Eb),Eb=null),Fb&&(T.removeEventListener("wheel",Fb),Fb=null),Gb&&(window.removeEventListener("focus",Gb),Gb=null),Hb&&(window.removeEventListener("blur",Hb),Hb=null),Ib&&(document.removeEventListener("pointerlockchange",Ib),Ib=null),Jb&& (document.removeEventListener("pointerlockerror",Jb),Jb=null),Kb&&(n.removeEventListener("change",Kb),Kb=null)}catch(l){k("Failed to remove event listeners! {}",l)}db=null}};(function(){function a(){this._socket.close()}function b(f){this._socket.send(f)}function d(f){this._socket.send(f)}function c(){return this._frameCountStr+this._frameCountBin}function g(){const f=this._queue;return f?(f._next===f&&f._prev===f?this._queue=null:(this._queue=f._next,f._prev._next=f._next,f._next._prev=f._prev),f._next=null,f._prev=null,0===f.type?--this._frameCountStr:--this._frameCountBin,f):null}function h(){var f=this._frameCountStr+this._frameCountBin;if(0===f)return null;f=Array(f); var u=0,A=this._queue;const F=A;do{f[u++]=A;var L=A._next;A._next=null;A._prev=null;A=L}while(A!==F);this._queue=null;this._frameCountBin=this._frameCountStr=0;return f}function v(){this._queue=null;this._frameCountBin=this._frameCountStr=0}function I(f,u){var A=f._queue;if(!A)return null;const F=A;do{var L=A._next;if(A.type===u)return u=A._prev,L===A&&u===A?f._queue=null:(A===F&&(f._queue=L),u._next=L,L._prev=u),A._next=null,A._prev=null,A;A=L}while(A!==F);return null}function x(f,u,A){var F=0,L= f._queue,Y=L;do{var U=L._next;L.type===u&&(A[F++]=L);L=U}while(L!==Y);A.length=F;for(Y=0;Yd+1?[Lc[0]].concat(Lc.slice(-d)):Lc,{type:Mc}),0{h.hasOwnProperty("type")&&"offer"===h.type&&this._peerConnection.createAnswer().then(v=>{this._peerConnection.setLocalDescription(v).then(()=>{W(2,1,{objId:this.objId,data:JSON.stringify(v)})}).catch(I=>{k('Failed to set local description for "{}"! {}',this.objId,I.message);W(2,3,{objId:this.objId})})}).catch(v=>{k('Failed to create answer for "{}"! {}',this.objId,v.message);W(2,3,{objId:this.objId})})}).catch(v=> {k('Failed to set remote description for "{}"! {}',this.objId,v.message);W(2,3,{objId:this.objId})})}catch(h){k(h.message),W(2,3,{objId:this.objId})}}function b(g){try{this._peerConnection.addIceCandidate(new RTCIceCandidate(JSON.parse(g))).catch(h=>{k('Failed to parse ice candidate for "{}"! {}',this.objId,h.message);W(2,3,{objId:this.objId})})}catch(h){k(h.message),W(2,3,{objId:this.objId})}}function d(){this._peerConnection.close()}Ca.isSupported=function(){return"undefined"!==typeof navigator.mediaDevices&& "undefined"!==typeof navigator.mediaDevices.getUserMedia&&"srcObject"in HTMLAudioElement.prototype};let c=0;Ca.createRTCPeerConnection=function(g,h,v){try{const x=c++;var I;const w=new RTCPeerConnection({iceServers:JSON.parse(g),optional:[{DtlsSrtpKeyAgreement:!0}]});w.addEventListener("icecandidate",C=>{C.candidate&&W(2,0,{objId:x,data:JSON.stringify({sdpMLineIndex:""+C.candidate.sdpMLineIndex,candidate:C.candidate.candidate})})});w.addEventListener("track",C=>{C=C.streams[0];I._aud=document.createElement("audio"); I._aud.autoplay=!0;I._aud.muted=!0;I._aud.srcObject=C;W(2,2,{objId:x,stream:C})});v.getTracks().forEach(function(C){w.addTrack(C,v)});h&&w.createOffer().then(C=>{w.setLocalDescription(C).then(()=>{W(2,1,{objId:x,data:JSON.stringify(C)})}).catch(E=>{k('Failed to set local description for "{}"! {}',x,E.message);W(2,3,{objId:x})})}).catch(C=>{k('Failed to set create offer for "{}"! {}',x,C.message);W(2,3,{objId:x})});w.addEventListener("connectionstatechange",()=>{const C=w.connectionState;"disconnected"!== C&&"failed"!==C||W(2,3,{objId:x})});return I={objId:x,_peerConnection:w,setRemoteDescription:a,addRemoteICECandidate:b,closeHandle:d}}catch(x){return k(x.message),null}}};function Qb(){const a=new ra;let b;b={iceServers:[],g:null,h:null,readyState:1,v:null,description:null,D:!1,C:!0,disconnect:function(c){if(b.h){try{b.h.close()}catch(g){}b.h=null}if(b.g){try{b.g.close()}catch(g){}b.g=null}c||(b.C=!0);b.readyState=0}};N.supported=function(){return"undefined"!==typeof RTCPeerConnection};N.clientLANReadyState=function(){return b.readyState};N.clientLANCloseConnection=function(){b.disconnect(!1)};N.clientLANSendPacket=function(c){if(null!==b.h&&"open"===b.h.readyState)try{b.h.send(c)}catch(g){b.disconnect(!1)}else b.disconnect(!1)}; N.clientLANReadPacket=function(){const c=a.j();return c?new Uint8Array(c.data):null};N.clientLANAvailable=function(){return a.u};N.clientLANSetICEServersAndConnect=function(c){b.iceServers.length=0;for(let g of c)c=g.split(";"),1===c.length?b.iceServers.push({urls:c[0]}):3===c.length&&b.iceServers.push({urls:c[0],username:c[1],credential:c[2]});2!==b.readyState&&1!==b.readyState||b.disconnect(!0);try{if(b.h){try{b.h.close()}catch(g){}b.h=null}if(b.g)try{b.g.close()}catch(g){}b.g=new RTCPeerConnection({iceServers:b.iceServers, optional:[{DtlsSrtpKeyAgreement:!0}]});b.readyState=1}catch(g){la("Could not create LAN client RTCPeerConnection!",g);b.readyState=-2;return}try{const g=[];b.g.addEventListener("icecandidate",v=>{if(v.candidate){if(0===g.length){const I=[0,0],x=()=>{if(null!==b.g&&"disconnected"!==b.g.connectionState){const w=++I[1];I[0]!==g.length&&3>w?(I[0]=g.length,setTimeout(x,2E3)):(b.v=JSON.stringify(g),g.length=0)}};setTimeout(x,2E3)}g.push({sdpMLineIndex:v.candidate.sdpMLineIndex,candidate:v.candidate.candidate})}}); b.h=b.g.createDataChannel("lan");b.h.binaryType="arraybuffer";let h;h=()=>{0{a.push({data:v.data,_next:null})});b.g.createOffer().then(v=>{b.g.setLocalDescription(v).then(()=>{b.description=JSON.stringify(v)}).catch(I=>{k("Failed to set local description! {}",I.message);b.readyState=-1;b.disconnect(!1)})}).catch(v=>{k("Failed to set create offer! {}",v.message);b.readyState=-1;b.disconnect(!1)}); b.g.addEventListener("connectionstatechange",()=>{var v=b.g.connectionState;"disconnected"===v?b.disconnect(!1):"connected"===v?b.readyState=2:"failed"===v&&(b.readyState=-1,b.disconnect(!1))})}catch(g){if(b.h){try{b.h.close()}catch(h){}b.h=null}if(b.g){try{b.g.close()}catch(h){}b.g=null}la("Could not create LAN client RTCDataChannel!",g);b.readyState=-2}};N.clearLANClientState=function(){b.v=b.description=null;b.D=!1;b.C=!0};N.clientLANAwaitICECandidate=function(){if(null===b.v)return null;const c= b.v;b.v=null;return c};N.clientLANAwaitDescription=function(){if(null===b.description)return null;const c=b.description;b.description=null;return c};N.clientLANAwaitChannel=function(){return b.D?(b.D=!1,!0):!1};N.clientLANClosed=function(){return b.C};N.clientLANSetICECandidate=function(c){try{const g=JSON.parse(c);for(c=0;c{if(x.candidate){if(0=== v.length){const w=[0,0],C=()=>{if(null!==h.g&&"disconnected"!==h.g.connectionState){const E=++w[1];w[0]!==v.length&&3>E?(w[0]=v.length,setTimeout(C,2E3)):(h.s(0,JSON.stringify(v)),v.length=0)}};setTimeout(C,2E3)}v.push({sdpMLineIndex:x.candidate.sdpMLineIndex,candidate:x.candidate.candidate})}});let I;I=x=>{0{w=w.data;h.l?ab(h.l,w):h.s(3,new Uint8Array(w))})))};h.g.addEventListener("datachannel", I);h.g.addEventListener("connectionstatechange",()=>{const x=h.g.connectionState;"disconnected"!==x&&"failed"!==x||d.disconnect(h.i)});return{peerId:h.i,countAvailableEvents:function(){return g.u},nextEvent:function(){return g.j()},writePacket:function(x){let w=!1;if(null!==h.h&&"open"===h.h.readyState)try{h.h.send(x)}catch(C){w=!0}else w=!0;w&&d.disconnect(h.i)},handleRemoteICECandidates:function(x){try{const w=JSON.parse(x);for(let C of w)h.g.addIceCandidate(new RTCIceCandidate(C))}catch(w){k('Failed to parse ice candidate for "{}"! {}', h.i,w.message),d.disconnect(h.i)}},handleRemoteDescription:function(x){try{const w=JSON.parse(x);h.g.setRemoteDescription(w).then(()=>{w.hasOwnProperty("type")&&"offer"===w.type&&h.g.createAnswer().then(C=>{h.g.setLocalDescription(C).then(()=>{h.s(1,JSON.stringify(C))}).catch(E=>{k('Failed to set local description for "{}"! {}',h.i,E.message);d.disconnect(h.i)})}).catch(C=>{k('Failed to create answer for "{}"! {}',h.i,C.message);d.disconnect(h.i)})}).catch(C=>{k('Failed to set remote description for "{}"! {}', h.i,C.message);d.disconnect(h.i)})}catch(w){k('Failed to parse remote description for "{}"! {}',h.i,w.message),d.disconnect(h.i)}},mapIPC:function(x){h.l?x||(d.F.delete(h.l),h.l=null):x&&(h.l=x,d.F.set(x,h))},disconnect:function(){d.disconnect(h.i)}}}catch(g){return la("Failed to create WebRTC LAN peer!",g),null}};$a=function(c,g){if(c=d.F.get(c)){let h=!1;if(c.h&&"open"===c.h.readyState)try{c.h.send(g)}catch(v){h=!0}else h=!0;h&&d.disconnect(c.i);return!0}return!1}};function Rb(){function a(f,u){f.allow=u;return f.allow===u}function b(f,u){const A=f.sandbox;for(var F=0;FL===A[F]))return!1;return!0}function d(f){if(E)p=document.createElement("iframe"),p.allow="",p.referrerPolicy="strict-origin",p.sandbox.add("allow-downloads"),f.scriptEnabled&&(p.sandbox.add("allow-scripts"),p.sandbox.add("allow-pointer-lock"));else{p=document.createElement("iframe"); p.referrerPolicy="strict-origin";var u=["allow-downloads"];f.scriptEnabled&&(u.push("allow-scripts"),u.push("allow-pointer-lock"));if(!a(p,"")||!b(p,u)){k("Caught safety exception while opening webview!");null!==p&&(p.remove(),p=null);k("Things you can try:");k("1. Set window.eaglercraftXOpts.forceWebViewSupport to true");k("2. Set window.eaglercraftXOpts.enableWebViewCSP to false");k("(these settings may compromise security)");c();q.innerHTML='

 IFrame Safety Error

The content cannot be displayed safely!

Check console for more details

';return}}p.j=!0;p.o="lazy";u=!1;if(1===f.contentMode){if(P&&C)if("string"===typeof p.csp){var A="default-src 'none';",F=f.strictCSPEnable?"":t?" https:":" http: https:";A=f.scriptEnabled?A+(" script-src 'unsafe-eval' 'unsafe-inline' data: blob:"+F+"; style-src 'unsafe-eval' 'unsafe-inline' data: blob:")+(F+"; img-src data: blob:")+ (F+"; font-src data: blob:")+(F+"; child-src data: blob:")+(F+"; frame-src data: blob:; media-src data: mediastream: blob:")+(F+"; connect-src data: blob:")+(F+"; worker-src data: blob:")+(F+";"):A+(" style-src data: 'unsafe-inline'"+F+"; img-src data:")+(F+"; font-src data:")+(F+"; media-src data:")+(F+";");p.csp=A}else ka("This browser does not support CSP attribute on iframes! (try Chrome)"),u=!0;else u=!0;u&&f.strictCSPEnable&&ka("Strict CSP was requested for this webview, but that feature is not available!")}else u= !0;p.style.border="none";p.style.backgroundColor="white";p.style.width="100%";p.style.height="100%";p.classList.add("_eaglercraftX_webview_iframe_element");z.appendChild(p);1===f.contentMode?(A=x.decode(f.blob),f.blob=null,p.srcdoc=A):p.src=f.uri;const L=m,Y=p;let U=!1;p.addEventListener("mouseover",function(){L!==m||Y!==p||U||(U=!0,p.contentWindow.focus())});p.addEventListener("mouseout",function(){L===m&&Y===p&&U&&(U=!1,window.focus())});f.scriptEnabled&&f.serverMessageAPIEnabled&&(y=function(Z){if(L=== m&&Y===p&&Z.source===Y.contentWindow){Z=Z.data;if("object"===typeof Z&&1===Z.ver&&"string"===typeof Z.channel&&0 Allow JavaScript

Strict CSP: '+(1!==f.contentMode?'Impossible':C&&P?f.strictCSPEnable?'Enabled':'Disabled':'Unsupported')+" | Message API: "+(f.serverMessageAPIEnabled?'Enabled': 'Disabled')+'

Remember my choice

';const u=m;if(1!==f.contentMode){const A=f.url;q.querySelector("._eaglercraftX_permission_target_url").innerText=255 Content Blocked

You chose to block JavaScript execution for this embed

';const u=m;q.querySelector("._eaglercraftX_re_evaluate_javascript").addEventListener("click",function(){m===u&&null!==q&&(W(3,4,null),g(f))})}function v(f,u,A,F){if(z){const L=window.devicePixelRatio;z.style.top=""+u/L+"px";z.style.left=""+ f/L+"px";z.style.width=""+(A/L-10)+"px";z.style.height=""+(F/L-10)+"px"}}function I(){++m;p&&(p.remove(),p=null);y=null;q&&(q.remove(),q=null);z&&(z.remove(),z=null);window.focus()}const x=new TextDecoder("utf-8");var w=!1,C=!1,E=ib,P=jb;if(E)C=w=!0;else{C=w=!1;try{var Q=document.createElement("iframe");w=null!=Q&&"string"===typeof Q.allow&&"object"===typeof Q.sandbox;C=P&&w&&"string"===typeof Q.csp}catch(f){k("Error checking iframe support"),k(f)}}w?!C&&P&&ka("This browser does not support CSP attribute on iframes! (try Chrome)"): k("This browser does not meet the safety requirements for webview support, this feature will be disabled");const t=location.protocol&&"https:"===location.protocol.toLowerCase();var m=0,z=null,q=null,p=null,y=null;window.addEventListener("message",function(f){y&&f.source!==window&&y(f)});Da.checkSupported=function(){return w};Da.checkCSPSupported=function(){return C};Da.sendStringMessage=function(f,u){try{var A;null!=p&&null!=(A=p.contentWindow)?A.postMessage({ver:1,channel:f,type:"string",data:u}, "*"):k("Server tried to send the WebView a message, but the message channel is not open!")}catch(F){la("Failed to send string message to WebView!",F)}};Da.sendBinaryMessage=function(f,u){try{var A;if(null!=p&&null!=(A=p.contentWindow)){const F=new Uint8Array(u.length);F.set(u,0);A.postMessage({ver:1,channel:f,type:"binary",data:F.buffer},"*")}else k("Server tried to send the WebView a message, but the message channel is not open!")}catch(F){la("Failed to send string message to WebView!",F)}};Da.beginShowing= function(f,u,A,F,L,Y){if(w)try{switch(null!==z&&I(),z=document.createElement("div"),z.classList.add("_eaglercraftX_webview_container_element"),z.style.border="5px solid #333333",z.style.zIndex="11",z.style.position="absolute",z.style.backgroundColor="#DDDDDD",z.style.fontFamily="sans-serif",v(A,F,L,Y),S.appendChild(z),f){case 0:d(u);break;case 1:if(1===u.contentMode){const U=new Uint8Array(u.blob.length);U.set(u.blob,0);u.blob=U}g(u);break;case 2:if(1===u.contentMode){const U=new Uint8Array(u.blob.length); U.set(u.blob,0);u.blob=U}h(u)}}catch(U){la("Failed to begin showing WebView!",U)}};Da.resize=v;Da.endShowing=I};var Dc=null,Ec=!1; function Sb(){var a=null;const b=new ra;var d=null;Ea.startIntegratedServer=new WebAssembly.Suspending(async function(){d||=URL.createObjectURL(new Blob(['"use strict"; (function(ctx, globals) {globals.__eaglerXOnMessage = function(o) {globals.__eaglerXOnMessage = function(oo) { console.error("Dropped IPC packet that was sent too early!"); };const eagRuntimeJSURL = URL.createObjectURL(new Blob([ o.eagruntimeJS ], { type: "text/javascript;charset=utf-8" }));ctx.getEaglercraftXOpts = function() { return o.eaglercraftXOpts; };ctx.getEagRuntimeJSURL = function() { return eagRuntimeJSURL; };ctx.getClassesWASMURL = function() { return o.classesWASM; };ctx.getClassesDeobfWASMURL = function() { return o.classesDeobfWASM; };ctx.getClassesTEADBGURL = function() { return o.classesTEADBG; };ctx.getEPKFiles = function() { return null; };ctx.getRootElement = function() { return null; };ctx.getMainArgs = function() { return ["_worker_process_"]; };ctx.getImageURL = function(idx) { return null; };ctx.runMain = function(mainFunc) { mainFunc(); };importScripts(eagRuntimeJSURL);};addEventListener("message", function(evt) { globals.__eaglerXOnMessage(evt.data); });})(self.__eaglercraftXLoaderContext = {}, self);'],{type:"text/javascript;charset=utf8"})); try{a=new Worker(d)}catch(h){return la("Failed to create worker",h),!1}a.addEventListener("error",function(h){la("Worker Error",h.error)});a.addEventListener("message",function(h){const v=h.data.ch;v?"~!LOGGER"===v?Lb(h.data.txt,h.data.err):(h=h.data.dat)?$a(v,h)||b.push({ch:v,data:new Uint8Array(h),_next:null}):k("Recieved IPC packet with null buffer"):k("Recieved IPC packet with null channel")});const c=new Int8Array(Ja.length);c.set(Ja,0);try{var g=await fetch(Ra,{cache:"force-cache"}).then(h=> h.arrayBuffer())}catch(h){la("Failed to fetch eagruntime.js contents",h);try{a.terminate()}catch(v){}return!1}a.postMessage({eaglercraftXOpts:O,eagruntimeJS:g,classesWASM:Ha,classesDeobfWASM:Ia,classesTEADBG:c.buffer});return!0});Ea.sendPacket=function(c,g){if(a){const h=new Uint8Array(g.length);h.set(g,0);a.postMessage({ch:c,dat:h.buffer},[h.buffer])}};ab=function(c,g){a&&a.postMessage({ch:c,dat:g},[g])};Ea.getAvailablePackets=b.K.bind(b);Ea.getNextPacket=b.j.bind(b);Ea.killWorker=function(){a&& (a.terminate(),a=null)};Ea.showCrashReportOverlay=function(c,g,h,v,I){Dc||(Dc=document.createElement("div"),Dc.setAttribute("style","z-index:99;position:absolute;background-color:black;color:white;overflow-x:hidden;overflow-y:scroll;overflow-wrap:break-word;white-space:pre-wrap;font:18px sans-serif;padding:20px;display:none;"),Dc.classList.add("_eaglercraftX_integratedserver_crash_element"),S.appendChild(Dc));Dc.innerText="";Dc.innerText="CURRENT DATE: "+(new Date).toLocaleString()+"\n\n"+c;c=window.devicePixelRatio; Dc.style.top=""+h/c+"px";Dc.style.left=""+g/c+"px";Dc.style.width=""+(v/c-20)+"px";Dc.style.height=""+(I/c-20)+"px";Dc.style.display="block";Ec=!0};Ea.hideCrashReportOverlay=function(){Dc&&(Dc.style.display="none");Ec=!1};window.__curEaglerX188UnloadListenerCB=function(){a&&a.postMessage({ch:"~!WASM_AUTOSAVE"})}};var ec=null,Tc=!1; function Zb(){const a=new ra;self.__eaglerXOnMessage=function(b){const d=b.ch;b=b.dat;d?"~!WASM_AUTOSAVE"===d?Tc=!0:b?a.push({ch:d,data:new Uint8Array(b),_next:null}):k("Recieved IPC packet with null buffer"):k("Recieved IPC packet with null channel")};Ga.sendPacket=function(b,d){const c=new Uint8Array(d.length);c.set(d,0);postMessage({ch:b,dat:c.buffer},[c.buffer])};Ga.getAvailablePackets=a.K.bind(a);Ga.getNextPacket=a.j.bind(a);Ga.setCrashCallback=function(){return{call:function(b){ec=b}}};Ga.isTabAboutToClose= function(){const b=Tc;Tc=!1;return b}};sa.getByteBufferView=function(a,b){return new Int8Array(Ya,a,b)};sa.getUnsignedByteBufferView=function(a,b){return new Uint8Array(Ya,a,b)};sa.getUnsignedClampedByteBufferView=function(a,b){return new Uint8ClampedArray(Ya,a,b)};sa.getShortBufferView=function(a,b){return new Int16Array(Ya,a,b)};sa.getUnsignedShortBufferView=function(a,b){return new Uint16Array(Ya,a,b)};sa.getIntBufferView=function(a,b){return new Int32Array(Ya,a,b)};sa.getFloatBufferView=function(a,b){return new Float32Array(Ya,a,b)};const Uc={172351395:{name:"EBML",type:"Container"},646:{name:"EBMLVersion",type:"Uint"},759:{name:"EBMLReadVersion",type:"Uint"},754:{name:"EBMLMaxIDLength",type:"Uint"},755:{name:"EBMLMaxSizeLength",type:"Uint"},642:{name:"DocType",type:"String"},647:{name:"DocTypeVersion",type:"Uint"},645:{name:"DocTypeReadVersion",type:"Uint"},108:{name:"Void",type:"Binary"},63:{name:"CRC-32",type:"Binary"},190023271:{name:"SignatureSlot",type:"Container"},16010:{name:"SignatureAlgo",type:"Uint"},16026:{name:"SignatureHash", type:"Uint"},16037:{name:"SignaturePublicKey",type:"Binary"},16053:{name:"Signature",type:"Binary"},15963:{name:"SignatureElements",type:"Container"},15995:{name:"SignatureElementList",type:"Container"},9522:{name:"SignedElement",type:"Binary"},139690087:{name:"Segment",type:"Container"},21863284:{name:"SeekHead",type:"Container"},3515:{name:"Seek",type:"Container"},5035:{name:"SeekID",type:"Binary"},5036:{name:"SeekPosition",type:"Uint"},88713574:{name:"Info",type:"Container"},13220:{name:"SegmentUID", type:"Binary"},13188:{name:"SegmentFilename",type:"String"},1882403:{name:"PrevUID",type:"Binary"},1868715:{name:"PrevFilename",type:"String"},2013475:{name:"NextUID",type:"Binary"},1999803:{name:"NextFilename",type:"String"},1092:{name:"SegmentFamily",type:"Binary"},10532:{name:"ChapterTranslate",type:"Container"},10748:{name:"ChapterTranslateEditionUID",type:"Uint"},10687:{name:"ChapterTranslateCodec",type:"Uint"},10661:{name:"ChapterTranslateID",type:"Binary"},710577:{name:"TimecodeScale",type:"Uint"}, 1161:{name:"Duration",type:"Float"},1121:{name:"DateUTC",type:"Date"},15273:{name:"Title",type:"String"},3456:{name:"MuxingApp",type:"String"},5953:{name:"WritingApp",type:"String"},103:{name:"Timecode",type:"Uint"},6228:{name:"SilentTracks",type:"Container"},6359:{name:"SilentTrackNumber",type:"Uint"},39:{name:"Position",type:"Uint"},43:{name:"PrevSize",type:"Uint"},35:{name:"SimpleBlock",type:"Binary"},32:{name:"BlockGroup",type:"Container"},33:{name:"Block",type:"Binary"},34:{name:"BlockVirtual", type:"Binary"},13729:{name:"BlockAdditions",type:"Container"},38:{name:"BlockMore",type:"Container"},110:{name:"BlockAddID",type:"Uint"},37:{name:"BlockAdditional",type:"Binary"},27:{name:"BlockDuration",type:"Uint"},122:{name:"ReferencePriority",type:"Uint"},123:{name:"ReferenceBlock",type:"Int"},125:{name:"ReferenceVirtual",type:"Int"},36:{name:"CodecState",type:"Binary"},13730:{name:"DiscardPadding",type:"Int"},14:{name:"Slices",type:"Container"},104:{name:"TimeSlice",type:"Container"},76:{name:"LaceNumber", type:"Uint"},77:{name:"FrameNumber",type:"Uint"},75:{name:"BlockAdditionID",type:"Uint"},78:{name:"Delay",type:"Uint"},79:{name:"SliceDuration",type:"Uint"},72:{name:"ReferenceFrame",type:"Container"},73:{name:"ReferenceOffset",type:"Uint"},74:{name:"ReferenceTimeCode",type:"Uint"},47:{name:"EncryptedBlock",type:"Binary"},106212971:{name:"Tracks",type:"Container"},46:{name:"TrackEntry",type:"Container"},87:{name:"TrackNumber",type:"Uint"},13253:{name:"TrackUID",type:"Uint"},3:{name:"TrackType",type:"Uint"}, 57:{name:"FlagEnabled",type:"Uint"},8:{name:"FlagDefault",type:"Uint"},5546:{name:"FlagForced",type:"Uint"},28:{name:"FlagLacing",type:"Uint"},11751:{name:"MinCache",type:"Uint"},11768:{name:"MaxCache",type:"Uint"},254851:{name:"DefaultDuration",type:"Uint"},216698:{name:"DefaultDecodedFieldDuration",type:"Uint"},209231:{name:"TrackTimecodeScale",type:"Float"},4991:{name:"TrackOffset",type:"Int"},5614:{name:"MaxBlockAdditionID",type:"Uint"},4974:{name:"Name",type:"String"},177564:{name:"Language", type:"String"},6:{name:"CodecID",type:"String"},9122:{name:"CodecPrivate",type:"Binary"},362120:{name:"CodecName",type:"String"},13382:{name:"AttachmentLink",type:"Uint"},1742487:{name:"CodecSettings",type:"String"},1785920:{name:"CodecInfoURL",type:"String"},438848:{name:"CodecDownloadURL",type:"String"},42:{name:"CodecDecodeAll",type:"Uint"},12203:{name:"TrackOverlay",type:"Uint"},5802:{name:"CodecDelay",type:"Uint"},5819:{name:"SeekPreRoll",type:"Uint"},9764:{name:"TrackTranslate",type:"Container"}, 9980:{name:"TrackTranslateEditionUID",type:"Uint"},9919:{name:"TrackTranslateCodec",type:"Uint"},9893:{name:"TrackTranslateTrackID",type:"Binary"},96:{name:"Video",type:"Container"},26:{name:"FlagInterlaced",type:"Uint"},5048:{name:"StereoMode",type:"Uint"},5056:{name:"AlphaMode",type:"Uint"},5049:{name:"OldStereoMode",type:"Uint"},48:{name:"PixelWidth",type:"Uint"},58:{name:"PixelHeight",type:"Uint"},5290:{name:"PixelCropBottom",type:"Uint"},5307:{name:"PixelCropTop",type:"Uint"},5324:{name:"PixelCropLeft", type:"Uint"},5341:{name:"PixelCropRight",type:"Uint"},5296:{name:"DisplayWidth",type:"Uint"},5306:{name:"DisplayHeight",type:"Uint"},5298:{name:"DisplayUnit",type:"Uint"},5299:{name:"AspectRatioType",type:"Uint"},963876:{name:"ColourSpace",type:"Binary"},1029411:{name:"GammaValue",type:"Float"},230371:{name:"FrameRate",type:"Float"},97:{name:"Audio",type:"Container"},53:{name:"SamplingFrequency",type:"Float"},14517:{name:"OutputSamplingFrequency",type:"Float"},31:{name:"Channels",type:"Uint"},15739:{name:"ChannelPositions", type:"Binary"},8804:{name:"BitDepth",type:"Uint"},98:{name:"TrackOperation",type:"Container"},99:{name:"TrackCombinePlanes",type:"Container"},100:{name:"TrackPlane",type:"Container"},101:{name:"TrackPlaneUID",type:"Uint"},102:{name:"TrackPlaneType",type:"Uint"},105:{name:"TrackJoinBlocks",type:"Container"},109:{name:"TrackJoinUID",type:"Uint"},64:{name:"TrickTrackUID",type:"Uint"},65:{name:"TrickTrackSegmentUID",type:"Binary"},70:{name:"TrickTrackFlag",type:"Uint"},71:{name:"TrickMasterTrackUID", type:"Uint"},68:{name:"TrickMasterTrackSegmentUID",type:"Binary"},11648:{name:"ContentEncodings",type:"Container"},8768:{name:"ContentEncoding",type:"Container"},4145:{name:"ContentEncodingOrder",type:"Uint"},4146:{name:"ContentEncodingScope",type:"Uint"},4147:{name:"ContentEncodingType",type:"Uint"},4148:{name:"ContentCompression",type:"Container"},596:{name:"ContentCompAlgo",type:"Uint"},597:{name:"ContentCompSettings",type:"Binary"},4149:{name:"ContentEncryption",type:"Container"},2017:{name:"ContentEncAlgo", type:"Uint"},2018:{name:"ContentEncKeyID",type:"Binary"},2019:{name:"ContentSignature",type:"Binary"},2020:{name:"ContentSigKeyID",type:"Binary"},2021:{name:"ContentSigAlgo",type:"Uint"},2022:{name:"ContentSigHashAlgo",type:"Uint"},206814059:{name:"Cues",type:"Container"},59:{name:"CuePoint",type:"Container"},51:{name:"CueTime",type:"Uint"},55:{name:"CueTrackPositions",type:"Container"},119:{name:"CueTrack",type:"Uint"},113:{name:"CueClusterPosition",type:"Uint"},112:{name:"CueRelativePosition",type:"Uint"}, 50:{name:"CueDuration",type:"Uint"},4984:{name:"CueBlockNumber",type:"Uint"},106:{name:"CueCodecState",type:"Uint"},91:{name:"CueReference",type:"Container"},22:{name:"CueRefTime",type:"Uint"},23:{name:"CueRefCluster",type:"Uint"},4959:{name:"CueRefNumber",type:"Uint"},107:{name:"CueRefCodecState",type:"Uint"},155296873:{name:"Attachments",type:"Container"},8615:{name:"AttachedFile",type:"Container"},1662:{name:"FileDescription",type:"String"},1646:{name:"FileName",type:"String"},1632:{name:"FileMimeType", type:"String"},1628:{name:"FileData",type:"Binary"},1710:{name:"FileUID",type:"Uint"},1653:{name:"FileReferral",type:"Binary"},1633:{name:"FileUsedStartTime",type:"Uint"},1634:{name:"FileUsedEndTime",type:"Uint"},4433776:{name:"Chapters",type:"Container"},1465:{name:"EditionEntry",type:"Container"},1468:{name:"EditionUID",type:"Uint"},1469:{name:"EditionFlagHidden",type:"Uint"},1499:{name:"EditionFlagDefault",type:"Uint"},1501:{name:"EditionFlagOrdered",type:"Uint"},54:{name:"ChapterAtom",type:"Container"}, 13252:{name:"ChapterUID",type:"Uint"},5716:{name:"ChapterStringUID",type:"String"},17:{name:"ChapterTimeStart",type:"Uint"},18:{name:"ChapterTimeEnd",type:"Uint"},24:{name:"ChapterFlagHidden",type:"Uint"},1432:{name:"ChapterFlagEnabled",type:"Uint"},11879:{name:"ChapterSegmentUID",type:"Binary"},11964:{name:"ChapterSegmentEditionUID",type:"Uint"},9155:{name:"ChapterPhysicalEquiv",type:"Uint"},15:{name:"ChapterTrack",type:"Container"},9:{name:"ChapterTrackNumber",type:"Uint"},0:{name:"ChapterDisplay", type:"Container"},5:{name:"ChapString",type:"String"},892:{name:"ChapLanguage",type:"String"},894:{name:"ChapCountry",type:"String"},10564:{name:"ChapProcess",type:"Container"},10581:{name:"ChapProcessCodecID",type:"Uint"},1293:{name:"ChapProcessPrivate",type:"Binary"},10513:{name:"ChapProcessCommand",type:"Container"},10530:{name:"ChapProcessTime",type:"Uint"},10547:{name:"ChapProcessData",type:"Binary"},39109479:{name:"Tags",type:"Container"},13171:{name:"Tag",type:"Container"},9152:{name:"Targets", type:"Container"},10442:{name:"TargetTypeValue",type:"Uint"},9162:{name:"TargetType",type:"String"},9157:{name:"TagTrackUID",type:"Uint"},9161:{name:"TagEditionUID",type:"Uint"},9156:{name:"TagChapterUID",type:"Uint"},9158:{name:"TagAttachmentUID",type:"Uint"},10184:{name:"SimpleTag",type:"Container"},1443:{name:"TagName",type:"String"},1146:{name:"TagLanguage",type:"String"},1156:{name:"TagDefault",type:"Uint"},1159:{name:"TagString",type:"String"},1157:{name:"TagBinary",type:"Binary"}}; function Vc(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a}function Wc(a,b){this.name=a||"Unknown";this.type=b||"Unknown"}Wc.prototype.j=function(){};Wc.prototype.m=function(){};function Xc(a,b){Wc.call(this,a,b||"Uint")}Vc(Xc,Wc);Xc.prototype.j=function(){this.data="";for(var a=0;a=g&&8>c;c++,g*=128);if(!d)for(b=g+b,d=c-1;0<=d;d--)g=b%256,a.source[a.offset+d]=g,b=(b-g)/256;a.offset+=c}function bd(a,b){for(var d=a.offset=0;d=v.L())d("[fix-webm-duration] Duration section is present, but the value is empty"),v.H(b);else return d("[fix-webm-duration] Duration section is present"), !1;else d("[fix-webm-duration] Duration section is missing"),v=new Yc("Duration","Float"),v.H(b),g.data.push({id:1161,data:v});h.H(1E6);g.m();c.m();a.m();return!0}function Sc(a,b,d,c){try{var g=new FileReader;g.onloadend=function(){try{var h=new dd(new Uint8Array(g.result));ed(h,b,c)&&(a=new Blob([h.source.buffer],{type:a.type||"video/webm"}))}catch(v){}d(a)};g.readAsArrayBuffer(a)}catch(h){d(a)}};var fd; (function(){function a(t){let m=C.get(t);"undefined"===typeof m&&(m=new Function("return "+t+";"),C.set(t,m));return m()}function b(t){let m={exports:null,B:null,I:null};d(t);c(t);g(t,m);h(t,m);t.teavmMath=Math;return{O(z){m.exports=z},Y(z){m.B=z},X(z){m.I=z}}}function d(t){t.teavmDate={currentTimeMillis:()=>(new Date).getTime(),dateToString:m=>(new Date(m)).toString(),getYear:m=>(new Date(m)).getFullYear(),setYear:(m,z)=>{m=new Date(m);m.setFullYear(z);return m.getTime()},getMonth:m=>(new Date(m)).getMonth(),setMonth:(m, z)=>{m=new Date(m);m.setMonth(z);return m.getTime()},getDate:m=>(new Date(m)).getDate(),setDate:(m,z)=>{m=new Date(m);m.setDate(z);return m.getTime()},create:(m,z,q,p,y,f)=>(new Date(m,z,q,p,y,f)).getTime(),createFromUTC:(m,z,q,p,y,f)=>Date.UTC(m,z,q,p,y,f)}}function c(t){let m=[],z=[];t.teavmConsole={putcharStderr:function(q){10===q?(q=String.fromCharCode(...m),console.error(q),fa&&fa(q,!0),m.length=0):m.push(q)},putcharStdout:function(q){10===q?(q=String.fromCharCode(...z),console.log(q),fa&&fa(q, !1),z.length=0):z.push(q)}}}function g(t,m){let z=new FinalizationRegistry(p=>{let y=m.exports["teavm.reportGarbageCollectedValue"];"undefined"!==typeof y&&m.I(function(){y(p.V,p.W)})}),q=new FinalizationRegistry(p=>{let y=m.exports["teavm.reportGarbageCollectedString"];"function"===typeof y&&m.I(function(){y(p)})});t.teavm={createWeakRef:(p,y,f)=>{null!==f&&z.register(p,{W:y,V:f});return new WeakRef(p)},deref:p=>p.deref(),createStringWeakRef:(p,y)=>{q.register(p,y);return new WeakRef(p)},stringDeref:p=> p.deref(),takeStackTrace:()=>{var p=Error().stack;let y=[];for(let f of p.split("\n"))p=E.exec(f),null!==p&&2<=p.length&&y.push(parseInt(p[1],16));return{getStack:function(){let f;if(m.B)try{f=m.B(y)}catch(u){console.warn("Could not deobfuscate stack",u)}f||=y.map(u=>({className:"java.lang.Throwable$FakeClass",method:"fakeMethod",file:"Throwable.java",line:u}));return f}}},decorateException:p=>{new Q(m,p)}}}function h(t,m){function z(n){return n}function q(n){var r=n.charAt(0);var G=""+(p(r)?r:"_"); for(r=1;r=M;G+=M?V:"_"}return G}function p(n){return"A"<=n&&"Z">=n||"a"<=n&&"z">=n||"_"===n||"$"===n}function y(n,r,G){null===n?(new Function("value",r+" = value;"))(G):n[r]=G}function f(n){m.exports["teavm.js.throwException"](P in n?n[P]:m.exports["teavm.js.wrapException"](n))}function u(n){a:{if(n instanceof WebAssembly.Exception){var r=m.exports["teavm.javaException"];var G=m.exports["teavm.getJsException"];if(n.is(r)){n=n.getArg(r,0); r=m.exports["teavm.js.extractException"](n);if(null!==r){G=r;break a}G=G(n);"undefined"===typeof G&&(G=new Q(m,n));break a}}G=n}throw G;}function A(n){var r=[];for(let G=0;Gza.delete(n)),Wa=new WeakMap,va=2463534242;t.teavmJso={emptyString:()=>"",stringFromCharCode:n=>String.fromCharCode(n),concatStrings:(n,r)=>n+r,stringLength:n=>n.length,charAt:(n,r)=>n.charCodeAt(r),emptyArray:()=> [],appendToArray:(n,r)=>n.push(r),unwrapBoolean:n=>n?1:0,wrapBoolean:n=>!!n,getProperty:function(n,r){try{return null!==n?n[r]:a(r)}catch(G){f(G)}},setProperty:y,setPropertyPure:y,global:n=>{try{return a(n)}catch(r){f(r)}},createClass:(n,r,G)=>{n=q(n||"JavaObject");let M;M=null===r?function(ca){this[Y]=ca;this[U]=null}:function(ca){r.call(this,ca)};let V=F(n,function(ca,wa){if(ca===La)M.call(this,wa);else{if(null===G)throw Error("This class can't be instantiated directly");try{return G.apply(null, arguments)}catch(Xa){u(Xa)}}});V.prototype=Object.create(r||Object.prototype);V.prototype.constructor=V;n=F(n,function(ca){return V.call(this,La,ca)});n[La]=V;n.prototype=V.prototype;return n},exportClass:n=>n[La],defineMethod:(n,r,G)=>{let M=[];for(let V=1;V{n[r]=A(G)},defineFunction:A,defineProperty:(n,r,G,M)=>{let V={get(){try{return G(this)}catch(ca){u(ca)}}};null!==M&&(V.set=function(ca){try{M(this,ca)}catch(wa){u(wa)}});Object.defineProperty(n.prototype,r,V)},defineStaticProperty:(n,r,G,M)=>{let V={get(){try{return G()}catch(ca){u(ca)}}};null!==M&&(V.set=function(ca){try{M(ca)}catch(wa){u(wa)}});Object.defineProperty(n,r,V)},javaObjectToJS:(n,r)=>{if(null===n)return null;var G=gb.get(n);if("undefined"!=typeof G&& (G=G.deref(),"undefined"!==typeof G))return G;r=new r(n);gb.set(n,new WeakRef(r));return r},unwrapJavaObject:n=>n[Y],asFunction:(n,r)=>{let G=n[U];null===G&&(G=Object.create(null),n[U]=G);let M=G[r];"function"!==typeof M&&(M=function(){return n[r].apply(n,arguments)},M[Z]=n,G[r]=M);return M},functionAsObject:(n,r)=>{let G=n[Z];if("undefined"!==typeof G){let M=G[U];if(void 0!==M&&M[r]===n)return G}return{[r]:function(...M){try{return n(...M)}catch(V){u(V)}}}},wrapObject:n=>{if(null===n)return null; if("object"===typeof n||"function"===typeof n){var r=n[Y];if("object"===typeof r)return r;r=Fa.get(n);if(void 0!==r&&(r=r.deref(),void 0!==r))return r;r=m.exports["teavm.jso.createWrapper"](n);Fa.set(n,new WeakRef(r));return r}r=za.get(n);if(void 0!==r&&(r=r.deref(),void 0!==r))return r;r=m.exports["teavm.jso.createWrapper"](n);za.set(n,new WeakRef(r));Ma.register(r,n);return r},isPrimitive:(n,r)=>typeof n===r,instanceOf:(n,r)=>n instanceof r,instanceOfOrNull:(n,r)=>null===n||n instanceof r,sameRef:(n, r)=>n===r,hashCode:n=>{if("object"===typeof n||"function"===typeof n||"symbol"===typeof n){var r=Wa.get(n);if("number"===typeof r)return r;r=va;r^=r<<13;r^=r>>>17;va=r^=r<<5;Wa.set(n,r);return r}return"number"===typeof n?n|0:"bigint"===typeof n?BigInt.asIntN(32,n):"boolean"===typeof n?n?1:0:0},apply:(n,r,G)=>{try{return null===n?a(r)(...G):n[r](...G)}catch(M){f(M)}},concatArray:(n,r)=>n.concat(r),getJavaException:n=>n[P]};for(var ia of"wrapByte wrapShort wrapChar wrapInt wrapFloat wrapDouble unwrapByte unwrapShort unwrapChar unwrapInt unwrapFloat unwrapDouble".split(" "))t.teavmJso[ia]= z;ia=[];for(let n=0;32>n;++n){let r=0===ia.length?"":ia.join(", "),G=[...ia,"body"].join(", ");t.teavmJso["createFunction"+n]=(new Function("wrapCallFromJavaToJs",...ia,"body",`return new Function('wrapCallFromJavaToJs', ${G}).bind(this, wrapCallFromJavaToJs);`)).bind(null,L);t.teavmJso["bindFunction"+n]=(M,...V)=>M.bind(null,...V);t.teavmJso["callFunction"+n]=(new Function("rethrowJsAsJava","fn",...ia,"try {\n"+` return fn(${r});\n`+"} catch (e) {\n rethrowJsAsJava(e);\n}")).bind(null,f);t.teavmJso["callMethod"+ n]=(new Function("rethrowJsAsJava","getGlobalName","instance","method",...ia,"try {\n return instance !== null\n"+` ? instance[method](${r})\n`+` : getGlobalName(method)(${r});\n`+"} catch (e) {\n rethrowJsAsJava(e);\n}")).bind(null,f,a);t.teavmJso["construct"+n]=(new Function("rethrowJsAsJava","constructor",...ia,"try {\n"+` return new constructor(${r});\n`+"} catch (e) {\n rethrowJsAsJava(e);\n}")).bind(null,f);t.teavmJso["arrayOf"+n]=new Function(...ia,"return ["+r+"]"); ia.push("p"+(n+1))}}async function v(t){try{const m={},z=b(m),q=t.path instanceof WebAssembly.Module?t.path:await WebAssembly.compileStreaming(fetch(t.path)),p=new WebAssembly.Instance(q,m);z.O(p.exports);return{module:q,instance:p}}catch(m){return console.warn("Could not load deobfuscator",m),null}}function I(t,m,z){let q=null,p=!1;return y=>{if(!p){p=!0;if(null!==m)try{q=z.exports.createFromExternalFile.value(m)}catch(f){console.warn("Could not load create deobfuscator",f)}if(null==q&&null!==t)try{q= z.exports.createForModule.value(t)}catch(f){console.warn("Could not create deobfuscator from module data",f)}}return null!==q?q.deobfuscate(y):[]}}async function x(t,m){if(!m.enabled||"auto"!==t&&"external"!==t)return null;if(m.J instanceof ArrayBuffer)return new Int8Array(m.J);t=await fetch(m.J);return t.ok?new Int8Array(await t.arrayBuffer()):null}function w(t){const m=new ra;t.teavm.pollAsyncCallbacks=function(){for(var z;z=m.j();)z.fn()};return function(z){m.push({fn:z,_next:null})}}let C=new Map, E=/.+:wasm-function\[[0-9]+]:0x([0-9a-f]+).*/,P=Symbol("javaException");class Q extends Error{constructor(t,m){super();this.j=t;this[P]=m;t.exports["teavm.setJsException"](m,this)}get message(){var t=this.j.exports["teavm.exceptionMessage"];return"function"===typeof t&&(t=t(this[P]),null!=t)?t:"(could not fetch message)"}}fd={load:async function(t,m){m||={};var z=m.B||{};let [q,p,y]=await Promise.all([z.enabled?v(z):Promise.resolve(null),t instanceof WebAssembly.Module?Promise.resolve(t):WebAssembly.compileStreaming(fetch(t)), x(z.T,z)]);z={};t=b(z);"undefined"!==typeof m.M&&m.M(z);t.X(w(z));m=await WebAssembly.instantiate(p,z);z={};t.O(m.exports);if(q){let f=I(null,y,q.instance);null!==f&&(t.Y(f),z.deobfuscator=f)}t={exports:z,instance:m,N:{P:p,S:q?q.module:null}};for(let f in m.exports){let u=m.exports[f];u instanceof WebAssembly.Global?Object.defineProperty(z,f,{get:()=>u.value}):"function"===typeof u&&(z[f]=u)}z.memory=m.exports["teavm.memory"];z.R=y;return t},Z:b,aa:function(t){return new Proxy(t,{get(m,z){return new WebAssembly.Global({value:"externref", mutable:!1},m[z])}})}}})();async function gd(){try{Error.stackTraceLimit=1024;O=self.__eaglercraftXLoaderContext.getEaglercraftXOpts();Ra=self.__eaglercraftXLoaderContext.getEagRuntimeJSURL();const a=self.__eaglercraftXLoaderContext.getClassesWASMURL(),b=self.__eaglercraftXLoaderContext.getClassesDeobfWASMURL(),d=self.__eaglercraftXLoaderContext.getClassesTEADBGURL();Na=self.__eaglercraftXLoaderContext.getEPKFiles();Sa=self.__eaglercraftXLoaderContext.getRootElement();self.__eaglercraftXLoaderContext.getImageURL(0);Oa=self.__eaglercraftXLoaderContext.getImageURL(1); Pa=self.__eaglercraftXLoaderContext.getImageURL(2);Qa=self.__eaglercraftXLoaderContext.getImageURL(3);const c=self.__eaglercraftXLoaderContext.getMainArgs();delete self.__eaglercraftXLoaderContext;if("_worker_process_"!==c[0]){if(!await qb())return}else ea="worker",await Yb();e("Loading EaglercraftX WASM GC binary...");const g=await fd.load(a,{B:{enabled:!0,path:b,T:"external",J:d},M:function(h){h.WASMGCBufferAllocator=sa;h.platformApplication=H;h.platformAssets=ta;h.platformAudio=ua;h.platformFilesystem= xa;h.platformInput=J;h.platformNetworking=ya;h.platformOpenGL=K;h.platformRuntime=Aa;h.platformScreenRecord=Ba;h.platformVoiceClient=Ca;h.platformWebRTC=N;h.platformWebView=Da;h.clientPlatformSingleplayer=Ea;h.serverPlatformSingleplayer=Ga;h.teavm.notifyHeapResized=function(){$b(g.exports.memory)}}});Ha=g.N.P;Ia=g.N.S;Ja=g.exports.R;$b(g.exports.memory);Ka=g.exports.deobfuscator;e("Calling entry point with args: {}",JSON.stringify(c));try{await WebAssembly.promising(g.exports.main.__impl)(c)}catch(h){g.exports.main.__rethrow(h)}finally{ka("Main function has returned!")}}catch(a){cc(a)}} "object"===typeof self.__eaglercraftXLoaderContext?self.__eaglercraftXLoaderContext.runMain(gd):console.error("???");}).call(this);