UNPKG

cloudpilot-emu-embedded

Version:

Embedded version of the CloudpilotEmu PalmOS emulator

1 lines 174 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.cloudpilot=e():t.cloudpilot=e()}(self,()=>(()=>{var t={84:(t,e,i)=>{"use strict";var n=i(360);e.J=n.default},360:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=[];i[0]=function(){return function(){}},i[1]=function(t,e){return void 0===e?t:function(i){t(i,e)}};var n=function(){function t(){this.hasHandlers=!1,this._handlers=[],this._contexts=[],this._createDispatcher()}return t.prototype.addHandler=function(t,e){return this.isHandlerAttached(t,e)||(this._handlers.push(t),this._contexts.push(e),this._createDispatcher(),this._updateHasHandlers()),this},t.prototype.removeHandler=function(t,e){var i=this._getHandlerIndex(t,e);return void 0!==i&&(this._handlers.splice(i,1),this._contexts.splice(i,1),this._createDispatcher(),this._updateHasHandlers()),this},t.prototype.isHandlerAttached=function(t,e){return void 0!==this._getHandlerIndex(t,e)},t.prototype._updateHasHandlers=function(){this.hasHandlers=!!this._handlers.length},t.prototype._getHandlerIndex=function(t,e){var i,n=this._handlers.length;for(i=0;i<n&&(this._handlers[i]!==t||this._contexts[i]!==e);i++);return i<n?i:void 0},t.prototype._createDispatcher=function(){var t;this.dispatch=(t=this._handlers.length,i[t]||(i[t]=function(t){for(var e="return function dispatcher"+t+"(payload) {\n",i=[],n=[],r=0;r<t;r++)i.push("cb"+r),n.push("ctx"+r),e+=" cb"+r+"(payload, ctx"+r+");\n";return e+="};",new(Function.bind.apply(Function,[void 0].concat(i.concat(n),[e])))}(t)),i[t]).apply(this,this._handlers.concat(this._contexts))},t}();e.default=n},389:function(t,e){!function(t){"use strict";var e,i=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,n=536870912,r=1073741824,o=new WeakMap,s=function(t,e){return function(o){var s=e.get(o),a=void 0===s?o.size:s<r?s+1:0;if(!o.has(a))return t(o,a);if(o.size<n){for(;o.has(a);)a=Math.floor(Math.random()*r);return t(o,a)}if(o.size>i)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;o.has(a);)a=Math.floor(Math.random()*i);return t(o,a)}}((e=o,function(t,i){return e.set(t,i),i}),o),a=function(t){return function(e){var i=t(e);return e.add(i),i}}(s);t.addUniqueNumber=a,t.generateUniqueNumber=s}(e)},666:t=>{var e,i=(e="undefined"!=typeof document?document.currentScript?.src:void 0,async function(t={}){var i=t,n="object"==typeof window,r="undefined"!=typeof WorkerGlobalScope,o=("object"==typeof process&&process.versions?.node&&process.type,"./this.program"),s=(t,e)=>{throw e};r&&(e=self.location.href);var a,c,p="";if(n||r){try{p=new URL(".",e).href}catch{}r&&(c=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),a=async t=>{var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)}}var u,l,d,h,m,v,y,f,_,g,S,b=console.log.bind(console),w=console.error.bind(console),C=!1;function E(t,e){t||P(e)}function I(){if(!C){var t=Gr();0==t&&(t+=4);var e=_[t>>2],i=_[t+4>>2];34821223==e&&2310721022==i||P(`Stack overflow! Stack cookie has been overwritten at ${j(t)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${j(i)} ${j(e)}`),1668509029!=_[0]&&P("Runtime error: The application has corrupted its heap memory area (address zero)!")}}var x=!1;function D(){var t=m.buffer;v=new Int8Array(t),new Int16Array(t),i.HEAPU8=y=new Uint8Array(t),new Uint16Array(t),f=new Int32Array(t),i.HEAPU32=_=new Uint32Array(t),new Float32Array(t),g=new Float64Array(t),S=new BigInt64Array(t),new BigUint64Array(t)}var G,M=0,k=null;function P(t){i.onAbort?.(t),w(t="Aborted("+t+")"),C=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw h?.(e),e}async function R(t,e,i){if(!t&&"function"==typeof WebAssembly.instantiateStreaming)try{var n=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,i)}catch(t){w(`wasm streaming compile failed: ${t}`),w("falling back to ArrayBuffer instantiation")}return async function(t,e){try{var i=await async function(t){if(!u)try{var e=await a(t);return new Uint8Array(e)}catch{}return function(t){if(t==G&&u)return new Uint8Array(u);if(c)return c(t);throw"both async and sync fetching of the wasm failed"}(t)}(t);return await WebAssembly.instantiate(i,e)}catch(t){w(`failed to asynchronously prepare wasm: ${t}`),P(t)}}(e,i)}class z{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var H,T,N=t=>{for(;t.length>0;)t.shift()(i)},A=[],U=t=>A.push(t),B=[],F=t=>B.push(t),L=!0,j=t=>"0x"+(t>>>=0).toString(16).padStart(8,"0"),O="undefined"!=typeof TextDecoder?new TextDecoder:void 0,W=(t,e=0,i=NaN)=>{for(var n=e+i,r=e;t[r]&&!(r>=n);)++r;if(r-e>16&&t.buffer&&O)return O.decode(t.subarray(e,r));for(var o="";e<r;){var s=t[e++];if(128&s){var a=63&t[e++];if(192!=(224&s)){var c=63&t[e++];if((s=224==(240&s)?(15&s)<<12|a<<6|c:(7&s)<<18|a<<12|c<<6|63&t[e++])<65536)o+=String.fromCharCode(s);else{var p=s-65536;o+=String.fromCharCode(55296|p>>10,56320|1023&p)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o},V=(t,e)=>t?W(y,t,e):"",q=t=>t<-9007199254740992||t>9007199254740992?NaN:Number(t),K=0,$=[0,31,60,91,121,152,182,213,244,274,305,335],J=[0,31,59,90,120,151,181,212,243,273,304,334],Q=t=>{var e;return((e=t.getFullYear())%4!=0||e%100==0&&e%400!=0?J:$)[t.getMonth()]+t.getDate()-1},Y={},Z=t=>{if(t instanceof z||"unwind"==t)return l;I(),t instanceof WebAssembly.RuntimeError&&Pr()<=0&&w("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 1048576)"),s(0,t)},X=()=>L||K>0,tt=t=>{l=t,X()||(i.onExit?.(t),C=!0),s(0,new z(t))},et=(t,e)=>{l=t,tt(t)},it=et,nt=()=>performance.now(),rt=(t,e,i,n)=>{if(!(n>0))return 0;for(var r=i,o=i+n-1,s=0;s<t.length;++s){var a=t.codePointAt(s);if(a<=127){if(i>=o)break;e[i++]=a}else if(a<=2047){if(i+1>=o)break;e[i++]=192|a>>6,e[i++]=128|63&a}else if(a<=65535){if(i+2>=o)break;e[i++]=224|a>>12,e[i++]=128|a>>6&63,e[i++]=128|63&a}else{if(i+3>=o)break;e[i++]=240|a>>18,e[i++]=128|a>>12&63,e[i++]=128|a>>6&63,e[i++]=128|63&a,s++}}return e[i]=0,i-r},ot=(t,e,i)=>rt(t,y,e,i),st=()=>Date.now(),at=[],ct=(t,e)=>Math.ceil(t/e)*e,pt=t=>{var e=(t-m.buffer.byteLength+65535)/65536|0;try{return m.grow(e),D(),1}catch(t){}},ut={},lt=()=>{if(!lt.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.language||"C").replace("-","_")+".UTF-8",_:o||"./this.program"};for(var e in ut)void 0===ut[e]?delete t[e]:t[e]=ut[e];var i=[];for(var e in t)i.push(`${e}=${t[e]}`);lt.strings=i}return lt.strings},dt=t=>{for(var e=0,i=0;i<t.length;++i){var n=t.charCodeAt(i);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++i):e+=3}return e},ht=[null,[],[]],mt=(t,e)=>{var i=ht[t];0===e||10===e?((1===t?b:w)(W(i)),i.length=0):i.push(e)},vt=[],yt=(t,e)=>{t<128?e.push(t):e.push(t%128|128,t>>7)},ft=[],_t=t=>{var e=ft[t];return e||(ft[t]=e=H.get(t)),e},gt=[],St=(t,e)=>{H.set(t,e),ft[t]=H.get(t)};i.noExitRuntime&&(L=i.noExitRuntime),i.print&&(b=i.print),i.printErr&&(w=i.printErr),i.wasmBinary&&(u=i.wasmBinary),i.arguments&&i.arguments,i.thisProgram&&(o=i.thisProgram),i.addFunction=(t,e)=>{var i=(t=>(T||(T=new WeakMap,((t,e)=>{if(T)for(var i=0;i<0+e;i++){var n=_t(i);n&&T.set(n,i)}})(0,H.length)),T.get(t)||0))(t);if(i)return i;var n=(()=>{if(gt.length)return gt.pop();try{H.grow(1)}catch(t){if(!(t instanceof RangeError))throw t;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return H.length-1})();try{St(n,t)}catch(i){if(!(i instanceof TypeError))throw i;var r=((t,e)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function((t=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},i={parameters:[],results:"v"==t[0]?[]:[e[t[0]]]},n=1;n<t.length;++n)i.parameters.push(e[t[n]]);return i})(e),t);var i=[1];((t,e)=>{var i=t.slice(0,1),n=t.slice(1),r={i:127,p:127,j:126,f:125,d:124,e:111};for(var o of(e.push(96),yt(n.length,e),n))e.push(r[o]);"v"==i?e.push(0):e.push(1,r[i])})(e,i);var n=[0,97,115,109,1,0,0,0,1];yt(i.length,n),n.push(...i),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var r=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(r,{e:{f:t}}).exports.f})(t,e);St(n,r)}return T.set(t,n),n},i.UTF8ToString=V;var bt,wt,Ct,Et,It,xt,Dt,Gt,Mt,kt,Pt,Rt,zt,Ht,Tt,Nt,At,Ut,Bt,Ft,Lt,jt,Ot,Wt,Vt,qt,Kt,$t,Jt,Qt,Yt,Zt,Xt,te,ee,ie,ne,re,oe,se,ae,ce,pe,ue,le,de,he,me,ve,ye,fe,_e,ge,Se,be,we,Ce,Ee,Ie,xe,De,Ge,Me,ke,Pe,Re,ze,He,Te,Ne,Ae,Ue,Be,Fe,Le,je,Oe,We,Ve,qe,Ke,$e,Je,Qe,Ye,Ze,Xe,ti,ei,ii,ni,ri,oi,si,ai,ci,pi,ui,li,di,hi,mi,vi,yi,fi,_i,gi,Si,bi,wi,Ci,Ei,Ii,xi,Di,Gi,Mi,ki,Pi,Ri,zi,Hi,Ti,Ni,Ai,Ui,Bi,Fi,Li,ji,Oi,Wi,Vi,qi,Ki,$i,Ji,Qi,Yi,Zi,Xi,tn,en,nn,rn,on,sn,an,cn,pn,un,ln,dn,hn,mn,vn,yn,fn,_n,gn,Sn,bn,wn,Cn,En,In,xn,Dn,Gn,Mn,kn,Pn,Rn,zn,Hn,Tn,Nn,An,Un,Bn,Fn,Ln,jn,On,Wn,Vn,qn,Kn,$n,Jn,Qn,Yn,Zn,Xn,tr,er,ir,nr,rr,or,sr,ar,cr,pr,ur,lr,dr,hr,mr,vr,yr,fr,_r,gr,Sr,br,wr,Cr,Er,Ir,xr,Dr,Gr,Mr,kr,Pr,Rr={433568:t=>{H.grow(65536);for(let e=0;e<=65535;e++)H.set(H.length-65535-1+e,H.get(_[(t>>>2)+e]));return H.length-65535-1}},zr={a:(t,e,i,n)=>P(`Assertion failed: ${V(t)}, at: `+[e?V(e):"unknown filename",i,n?V(n):"unknown function"]),s:function(t){const e=new Error(V(t));throw e.isAssert=!0,e},c:function(t,e){e=q(e)},h:()=>P(""),j:()=>{L=!1,K=0},p:function(t,e){t=q(t);var i=new Date(1e3*t);f[e>>2]=i.getSeconds(),f[e+4>>2]=i.getMinutes(),f[e+8>>2]=i.getHours(),f[e+12>>2]=i.getDate(),f[e+16>>2]=i.getMonth(),f[e+20>>2]=i.getFullYear()-1900,f[e+24>>2]=i.getDay();var n=0|Q(i);f[e+28>>2]=n,f[e+36>>2]=-60*i.getTimezoneOffset();var r=new Date(i.getFullYear(),0,1),o=new Date(i.getFullYear(),6,1).getTimezoneOffset(),s=r.getTimezoneOffset(),a=0|(o!=s&&i.getTimezoneOffset()==Math.min(s,o));f[e+32>>2]=a},q:function(t){var e=(()=>{var e=new Date(f[t+20>>2]+1900,f[t+16>>2],f[t+12>>2],f[t+8>>2],f[t+4>>2],f[t>>2],0),i=f[t+32>>2],n=e.getTimezoneOffset(),r=new Date(e.getFullYear(),0,1),o=new Date(e.getFullYear(),6,1).getTimezoneOffset(),s=r.getTimezoneOffset(),a=Math.min(s,o);if(i<0)f[t+32>>2]=Number(o!=s&&a==n);else if(i>0!=(a==n)){var c=Math.max(s,o),p=i>0?a:c;e.setTime(e.getTime()+6e4*(p-n))}f[t+24>>2]=e.getDay();var u=0|Q(e);f[t+28>>2]=u,f[t>>2]=e.getSeconds(),f[t+4>>2]=e.getMinutes(),f[t+8>>2]=e.getHours(),f[t+12>>2]=e.getDate(),f[t+16>>2]=e.getMonth(),f[t+20>>2]=e.getYear();var l=e.getTime();return isNaN(l)?-1:l/1e3})();return BigInt(e)},k:(t,e)=>{if(Y[t]&&(clearTimeout(Y[t].id),delete Y[t]),!e)return 0;var i=setTimeout(()=>{delete Y[t],(t=>{if(!C)try{t(),(()=>{if(!X())try{it(l)}catch(t){Z(t)}})()}catch(t){Z(t)}})(()=>Mr(t,nt()))},e);return Y[t]={id:i,timeout_ms:e},0},r:(t,e,i,n)=>{var r=(new Date).getFullYear(),o=new Date(r,0,1),s=new Date(r,6,1),a=o.getTimezoneOffset(),c=s.getTimezoneOffset(),p=Math.max(a,c);_[t>>2]=60*p,f[e>>2]=Number(a!=c);var u=t=>{var e=t>=0?"-":"+",i=Math.abs(t);return`UTC${e}${String(Math.floor(i/60)).padStart(2,"0")}${String(i%60).padStart(2,"0")}`},l=u(a),d=u(c);c<a?(ot(l,i,17),ot(d,n,17)):(ot(l,n,17),ot(d,i,17))},n:function(t,e,i){if(e=q(e),!((n=t)>=0&&n<=3))return 28;var n,r;r=0===t?st():nt();var o=Math.round(1e3*r*1e3);return S[i>>3]=BigInt(o),0},t:(t,e,i)=>((t,e,i)=>{var n=((t,e)=>{var i;for(at.length=0;i=y[t++];){var n=105!=i;e+=(n&=112!=i)&&e%8?4:0,at.push(112==i?_[e>>2]:106==i?S[e>>3]:105==i?f[e>>2]:g[e>>3]),e+=n?8:4}return at})(e,i);return Rr[t](...n)})(t,e,i),g:st,o:t=>{var e=y.length,i=2147483648;if((t>>>=0)>i)return!1;for(var n=1;n<=4;n*=2){var r=e*(1+.2/n);r=Math.min(r,t+100663296);var o=Math.min(i,ct(Math.max(t,r),65536));if(pt(o))return!0}return!1},l:(t,e)=>{var i=0,n=0;for(var r of lt()){var o=e+i;_[t+n>>2]=o,i+=ot(r,o,1/0)+1,n+=4}return 0},m:(t,e)=>{var i=lt();_[t>>2]=i.length;var n=0;for(var r of i)n+=dt(r)+1;return _[e>>2]=n,0},d:t=>52,f:(t,e,i,n)=>52,b:function(t,e,i,n){return e=q(e),70},e:(t,e,i,n)=>{for(var r=0,o=0;o<i;o++){var s=_[e>>2],a=_[e+4>>2];e+=8;for(var c=0;c<a;c++)mt(t,y[s+c]);r+=a}return _[n>>2]=r,0},i:tt},Hr=await async function(){function t(t,e){return Hr=t.exports,m=Hr.u,D(),H=Hr.Ed,function(t){i._main=bt=t.w,i._webidl_free=t.x,i._webidl_malloc=t.y,i._emscripten_bind_VoidPtr___destroy___0=wt=t.z,i._emscripten_bind_Cloudpilot_Cloudpilot_0=Ct=t.A,i._emscripten_bind_Cloudpilot_Malloc_1=Et=t.B,i._emscripten_bind_Cloudpilot_Free_1=It=t.C,i._emscripten_bind_Cloudpilot_Nullptr_0=xt=t.D,i._emscripten_bind_Cloudpilot_EnableLogging_1=Dt=t.E,i._emscripten_bind_Cloudpilot_InitializeSession_3=Gt=t.F,i._emscripten_bind_Cloudpilot_GetCyclesPerSecond_0=Mt=t.G,i._emscripten_bind_Cloudpilot_RunEmulation_1=kt=t.H,i._emscripten_bind_Cloudpilot_SetClockFactor_1=Pt=t.I,i._emscripten_bind_Cloudpilot_CopyFrame_0=Rt=t.J,i._emscripten_bind_Cloudpilot_IsScreenDirty_0=zt=t.K,i._emscripten_bind_Cloudpilot_MarkScreenClean_0=Ht=t.L,i._emscripten_bind_Cloudpilot_MinMemoryForDevice_1=Tt=t.M,i._emscripten_bind_Cloudpilot_FramebufferSizeForDevice_1=Nt=t.N,i._emscripten_bind_Cloudpilot_TotalMemoryForDevice_1=At=t.O,i._emscripten_bind_Cloudpilot_QueuePenMove_2=Ut=t.P,i._emscripten_bind_Cloudpilot_QueuePenUp_0=Bt=t.Q,i._emscripten_bind_Cloudpilot_QueueButtonDown_1=Ft=t.R,i._emscripten_bind_Cloudpilot_QueueButtonUp_1=Lt=t.S,i._emscripten_bind_Cloudpilot_QueueKeyboardEvent_1=jt=t.T,i._emscripten_bind_Cloudpilot_IsPowerOff_0=Ot=t.U,i._emscripten_bind_Cloudpilot_IsUIInitialized_0=Wt=t.V,i._emscripten_bind_Cloudpilot_GetOSVersion_0=Vt=t.W,i._emscripten_bind_Cloudpilot_IsSetupComplete_0=qt=t.X,i._emscripten_bind_Cloudpilot_Reset_0=Kt=t.Y,i._emscripten_bind_Cloudpilot_ResetNoExtensions_0=$t=t.Z,i._emscripten_bind_Cloudpilot_ResetHard_0=Jt=t._,i._emscripten_bind_Cloudpilot_InstallDb_2=Qt=t.$,i._emscripten_bind_Cloudpilot_GetPalette2bitMapping_0=Yt=t.aa,i._emscripten_bind_Cloudpilot_GetMemoryPtr_0=Zt=t.ba,i._emscripten_bind_Cloudpilot_GetDirtyPagesPtr_0=Xt=t.ca,i._emscripten_bind_Cloudpilot_GetMemorySize_0=te=t.da,i._emscripten_bind_Cloudpilot_ImportMemoryImage_2=ee=t.ea,i._emscripten_bind_Cloudpilot_GetRomPtr_0=ie=t.fa,i._emscripten_bind_Cloudpilot_GetRomSize_0=ne=t.ga,i._emscripten_bind_Cloudpilot_GetSavestatePtr_0=re=t.ha,i._emscripten_bind_Cloudpilot_GetSavestateSize_0=oe=t.ia,i._emscripten_bind_Cloudpilot_SaveState_0=se=t.ja,i._emscripten_bind_Cloudpilot_LoadState_2=ae=t.ka,i._emscripten_bind_Cloudpilot_GetHotsyncName_0=ce=t.la,i._emscripten_bind_Cloudpilot_SetHotsyncName_1=pe=t.ma,i._emscripten_bind_Cloudpilot_RegisterPwmHandler_1=ue=t.na,i._emscripten_bind_Cloudpilot_StartBackup_0=le=t.oa,i._emscripten_bind_Cloudpilot_SetClipboardIntegration_1=de=t.pa,i._emscripten_bind_Cloudpilot_GetClipboardIntegration_0=he=t.qa,i._emscripten_bind_Cloudpilot_IsSuspended_0=me=t.ra,i._emscripten_bind_Cloudpilot_GetSuspendContext_0=ve=t.sa,i._emscripten_bind_Cloudpilot_SetNetworkRedirection_1=ye=t.ta,i._emscripten_bind_Cloudpilot_GetNetworkRedirection_0=fe=t.ua,i._emscripten_bind_Cloudpilot_RegisterProxyDisconnectHandler_1=_e=t.va,i._emscripten_bind_Cloudpilot_SetHotsyncNameManagement_1=ge=t.wa,i._emscripten_bind_Cloudpilot_LaunchAppByName_1=Se=t.xa,i._emscripten_bind_Cloudpilot_LaunchAppByDbHeader_2=be=t.ya,i._emscripten_bind_Cloudpilot_ClearExternalStorage_0=we=t.za,i._emscripten_bind_Cloudpilot_AllocateCard_2=Ce=t.Aa,i._emscripten_bind_Cloudpilot_AdoptCard_3=Ee=t.Ba,i._emscripten_bind_Cloudpilot_MountCard_1=Ie=t.Ca,i._emscripten_bind_Cloudpilot_RemoveCard_1=xe=t.Da,i._emscripten_bind_Cloudpilot_GetCardData_1=De=t.Ea,i._emscripten_bind_Cloudpilot_GetCardDirtyPages_1=Ge=t.Fa,i._emscripten_bind_Cloudpilot_GetCardSize_1=Me=t.Ga,i._emscripten_bind_Cloudpilot_RemountCards_0=ke=t.Ha,i._emscripten_bind_Cloudpilot_GetSupportLevel_1=Pe=t.Ia,i._emscripten_bind_Cloudpilot_GetMountedKey_0=Re=t.Ja,i._emscripten_bind_Cloudpilot_GetTransportIR_0=ze=t.Ka,i._emscripten_bind_Cloudpilot_GetTransportSerial_0=He=t.La,i._emscripten_bind_Cloudpilot___destroy___0=Te=t.Ma,i._emscripten_bind_RomInfo_RomInfo_2=Ne=t.Na,i._emscripten_bind_RomInfo_IsValid_0=Ae=t.Oa,i._emscripten_bind_RomInfo_CardVersion_0=Ue=t.Pa,i._emscripten_bind_RomInfo_CardName_0=Be=t.Qa,i._emscripten_bind_RomInfo_RomVersion_0=Fe=t.Ra,i._emscripten_bind_RomInfo_RomVersionString_0=Le=t.Sa,i._emscripten_bind_RomInfo_Supports_1=je=t.Ta,i._emscripten_bind_RomInfo___destroy___0=Oe=t.Ua,i._emscripten_bind_Frame_GetLineWidth_0=We=t.Va,i._emscripten_bind_Frame_GetBpp_0=Ve=t.Wa,i._emscripten_bind_Frame_GetLines_0=qe=t.Xa,i._emscripten_bind_Frame_GetMargin_0=Ke=t.Ya,i._emscripten_bind_Frame_GetBytesPerLine_0=$e=t.Za,i._emscripten_bind_Frame_GetFirstDirtyLine_0=Je=t._a,i._emscripten_bind_Frame_GetLastDirtyLine_0=Qe=t.$a,i._emscripten_bind_Frame_GetHasChanges_0=Ye=t.ab,i._emscripten_bind_Frame_GetBuffer_0=Ze=t.bb,i._emscripten_bind_Frame_GetBufferSize_0=Xe=t.cb,i._emscripten_bind_Frame_GetScaleX_0=ti=t.db,i._emscripten_bind_Frame_GetScaleY_0=ei=t.eb,i._emscripten_bind_Frame___destroy___0=ii=t.fb,i._emscripten_bind_DbBackup_Init_1=ni=t.gb,i._emscripten_bind_DbBackup_IsInProgress_0=ri=t.hb,i._emscripten_bind_DbBackup_IsDone_0=oi=t.ib,i._emscripten_bind_DbBackup_GetCurrentDatabase_0=si=t.jb,i._emscripten_bind_DbBackup_Save_0=ai=t.kb,i._emscripten_bind_DbBackup_Skip_0=ci=t.lb,i._emscripten_bind_DbBackup_GetArchivePtr_0=pi=t.mb,i._emscripten_bind_DbBackup_GetArchiveSize_0=ui=t.nb,i._emscripten_bind_DbBackup___destroy___0=li=t.ob,i._emscripten_bind_SuspendContextClipboardCopy_Cancel_0=di=t.pb,i._emscripten_bind_SuspendContextClipboardCopy_Resume_0=hi=t.qb,i._emscripten_bind_SuspendContextClipboardCopy_GetClipboardContent_0=mi=t.rb,i._emscripten_bind_SuspendContextClipboardCopy___destroy___0=vi=t.sb,i._emscripten_bind_SuspendContextClipboardPaste_Cancel_0=yi=t.tb,i._emscripten_bind_SuspendContextClipboardPaste_Resume_1=fi=t.ub,i._emscripten_bind_SuspendContextClipboardPaste___destroy___0=_i=t.vb,i._emscripten_bind_SuspendContextNetworkConnect_Cancel_0=gi=t.wb,i._emscripten_bind_SuspendContextNetworkConnect_Resume_0=Si=t.xb,i._emscripten_bind_SuspendContextNetworkConnect___destroy___0=bi=t.yb,i._emscripten_bind_SuspendContextNetworkRpc_Cancel_0=wi=t.zb,i._emscripten_bind_SuspendContextNetworkRpc_GetRequestSize_0=Ci=t.Ab,i._emscripten_bind_SuspendContextNetworkRpc_GetRequestData_0=Ei=t.Bb,i._emscripten_bind_SuspendContextNetworkRpc_ReceiveResponse_2=Ii=t.Cb,i._emscripten_bind_SuspendContextNetworkRpc___destroy___0=xi=t.Db,i._emscripten_bind_SuspendContextSerialSync_Cancel_0=Di=t.Eb,i._emscripten_bind_SuspendContextSerialSync_Resume_0=Gi=t.Fb,i._emscripten_bind_SuspendContextSerialSync___destroy___0=Mi=t.Gb,i._emscripten_bind_SuspendContext_GetKind_0=ki=t.Hb,i._emscripten_bind_SuspendContext_Cancel_0=Pi=t.Ib,i._emscripten_bind_SuspendContext_AsContextClipboardCopy_0=Ri=t.Jb,i._emscripten_bind_SuspendContext_AsContextClipboardPaste_0=zi=t.Kb,i._emscripten_bind_SuspendContext_AsContextNetworkConnect_0=Hi=t.Lb,i._emscripten_bind_SuspendContext_AsContextNetworkRpc_0=Ti=t.Mb,i._emscripten_bind_SuspendContext_AsContextSerialSync_0=Ni=t.Nb,i._emscripten_bind_SuspendContext___destroy___0=Ai=t.Ob,i._emscripten_bind_SessionImage_SessionImage_0=Ui=t.Pb,i._emscripten_bind_SessionImage_GetDeviceId_0=Bi=t.Qb,i._emscripten_bind_SessionImage_SetDeviceId_1=Fi=t.Rb,i._emscripten_bind_SessionImage_GetRomImage_0=Li=t.Sb,i._emscripten_bind_SessionImage_GetRomImageSize_0=ji=t.Tb,i._emscripten_bind_SessionImage_SetRomImage_2=Oi=t.Ub,i._emscripten_bind_SessionImage_GetMemoryImage_0=Wi=t.Vb,i._emscripten_bind_SessionImage_GetMemoryImageSize_0=Vi=t.Wb,i._emscripten_bind_SessionImage_SetMemoryImage_2=qi=t.Xb,i._emscripten_bind_SessionImage_GetMetadata_0=Ki=t.Yb,i._emscripten_bind_SessionImage_GetMetadataSize_0=$i=t.Zb,i._emscripten_bind_SessionImage_SetMetadata_2=Ji=t._b,i._emscripten_bind_SessionImage_GetSavestate_0=Qi=t.$b,i._emscripten_bind_SessionImage_GetSavestateSize_0=Yi=t.ac,i._emscripten_bind_SessionImage_SetSavestate_2=Zi=t.bc,i._emscripten_bind_SessionImage_GetVersion_0=Xi=t.cc,i._emscripten_bind_SessionImage_Serialize_0=tn=t.dc,i._emscripten_bind_SessionImage_GetSerializedImage_0=en=t.ec,i._emscripten_bind_SessionImage_GetSerializedImageSize_0=nn=t.fc,i._emscripten_bind_SessionImage_Deserialize_2=rn=t.gc,i._emscripten_bind_SessionImage___destroy___0=on=t.hc,i._emscripten_bind_SkinLoader_SkinLoader_1=sn=t.ic,i._emscripten_bind_SkinLoader_GetData_0=an=t.jc,i._emscripten_bind_SkinLoader_GetSize_0=cn=t.kc,i._emscripten_bind_SkinLoader___destroy___0=pn=t.lc,i._emscripten_bind_EmTransportSerialBuffer_RxBytesPending_0=un=t.mc,i._emscripten_bind_EmTransportSerialBuffer_Receive_0=ln=t.nc,i._emscripten_bind_EmTransportSerialBuffer_Send_3=dn=t.oc,i._emscripten_bind_EmTransportSerialBuffer_IsOpen_0=hn=t.pc,i._emscripten_bind_EmTransportSerialBuffer_Rts_0=mn=t.qc,i._emscripten_bind_EmTransportSerialBuffer_Dtr_0=vn=t.rc,i._emscripten_bind_EmTransportSerialBuffer_IsBreak_0=yn=t.sc,i._emscripten_bind_EmTransportSerialBuffer_BufferSize_0=fn=t.tc,i._emscripten_bind_EmTransportSerialBuffer_GetBaud_0=_n=t.uc,i._emscripten_bind_EmTransportSerialBuffer_GetParity_0=gn=t.vc,i._emscripten_bind_EmTransportSerialBuffer_GetStopBits_0=Sn=t.wc,i._emscripten_bind_EmTransportSerialBuffer_GetDataBits_0=bn=t.xc,i._emscripten_bind_EmTransportSerialBuffer_GetHwrHandshake_0=wn=t.yc,i._emscripten_bind_EmTransportSerialBuffer_GetModeSync_0=Cn=t.zc,i._emscripten_bind_EmTransportSerialBuffer_SetModeSync_1=En=t.Ac,i._emscripten_bind_EmTransportSerialBuffer_IsFrameComplete_0=In=t.Bc,i._emscripten_bind_EmTransportSerialBuffer_SetRequestTransferCallback_1=xn=t.Cc,i._emscripten_bind_EmTransportSerialBuffer___destroy___0=Dn=t.Dc,i._emscripten_bind_GunzipContext_GunzipContext_3=Gn=t.Ec,i._emscripten_bind_GunzipContext_GetState_0=Mn=t.Fc,i._emscripten_bind_GunzipContext_Continue_0=kn=t.Gc,i._emscripten_bind_GunzipContext_GetUncompressedData_0=Pn=t.Hc,i._emscripten_bind_GunzipContext_ReleaseUncompressedData_0=Rn=t.Ic,i._emscripten_bind_GunzipContext_GetUncompressedSize_0=zn=t.Jc,i._emscripten_bind_GunzipContext_GetError_0=Hn=t.Kc,i._emscripten_bind_GunzipContext___destroy___0=Tn=t.Lc,i._emscripten_bind_ZipfileWalker_ZipfileWalker_2=Nn=t.Mc,i._emscripten_bind_ZipfileWalker_GetState_0=An=t.Nc,i._emscripten_bind_ZipfileWalker_Next_0=Un=t.Oc,i._emscripten_bind_ZipfileWalker_GetTotalEntries_0=Bn=t.Pc,i._emscripten_bind_ZipfileWalker_GetCurrentEntrySize_0=Fn=t.Qc,i._emscripten_bind_ZipfileWalker_GetCurrentEntryName_0=Ln=t.Rc,i._emscripten_bind_ZipfileWalker_GetCurrentEntryContent_0=jn=t.Sc,i._emscripten_bind_ZipfileWalker___destroy___0=On=t.Tc,i._emscripten_bind_SessionFile5_SessionFile5_0=Wn=t.Uc,i._emscripten_bind_SessionFile5_IsSessionFile_2=Vn=t.Vc,i._emscripten_bind_SessionFile5_GetDeviceId_0=qn=t.Wc,i._emscripten_bind_SessionFile5_SetDeviceId_1=Kn=t.Xc,i._emscripten_bind_SessionFile5_GetMetadata_0=$n=t.Yc,i._emscripten_bind_SessionFile5_GetMetadataSize_0=Jn=t.Zc,i._emscripten_bind_SessionFile5_SetMetadata_2=Qn=t._c,i._emscripten_bind_SessionFile5_GetNor_0=Yn=t.$c,i._emscripten_bind_SessionFile5_GetNorSize_0=Zn=t.ad,i._emscripten_bind_SessionFile5_SetNor_2=Xn=t.bd,i._emscripten_bind_SessionFile5_GetNand_0=tr=t.cd,i._emscripten_bind_SessionFile5_GetNandSize_0=er=t.dd,i._emscripten_bind_SessionFile5_SetNand_2=ir=t.ed,i._emscripten_bind_SessionFile5_GetMemory_0=nr=t.fd,i._emscripten_bind_SessionFile5_GetMemorySize_0=rr=t.gd,i._emscripten_bind_SessionFile5_SetMemory_2=or=t.hd,i._emscripten_bind_SessionFile5_GetSavestate_0=sr=t.id,i._emscripten_bind_SessionFile5_GetSavestateSize_0=ar=t.jd,i._emscripten_bind_SessionFile5_SetSavestate_2=cr=t.kd,i._emscripten_bind_SessionFile5_GetRamSize_0=pr=t.ld,i._emscripten_bind_SessionFile5_SetRamSize_1=ur=t.md,i._emscripten_bind_SessionFile5_Serialize_0=lr=t.nd,i._emscripten_bind_SessionFile5_GetSerializedSession_0=dr=t.od,i._emscripten_bind_SessionFile5_GetSerializedSessionSize_0=hr=t.pd,i._emscripten_bind_SessionFile5_GetVersion_0=mr=t.qd,i._emscripten_bind_SessionFile5_Deserialize_2=vr=t.rd,i._emscripten_bind_SessionFile5___destroy___0=yr=t.sd,i._emscripten_bind_RomInfo5_RomInfo5_2=fr=t.td,i._emscripten_bind_RomInfo5_IsValid_0=_r=t.ud,i._emscripten_bind_RomInfo5_GetCardName_0=gr=t.vd,i._emscripten_bind_RomInfo5_GetManufacturer_0=Sr=t.wd,i._emscripten_bind_RomInfo5_GetRomName_0=br=t.xd,i._emscripten_bind_RomInfo5_GetCompanyId_0=wr=t.yd,i._emscripten_bind_RomInfo5_GetHalId_0=Cr=t.zd,i._emscripten_bind_RomInfo5_NeedsNand_0=Er=t.Ad,i._emscripten_bind_RomInfo5_GetDeviceType_0=Ir=t.Bd,i._emscripten_bind_RomInfo5_GetRecommendedRamSize_0=xr=t.Cd,i._emscripten_bind_RomInfo5___destroy___0=Dr=t.Dd,Gr=t.Fd,Mr=t.Gd,kr=t.Hd,Pr=t.Id,i.___original_main=t.Jd}(Hr),function(){if(M--,i.monitorRunDependencies?.(M),0==M&&k){var t=k;k=null,t()}}(),Hr}M++,i.monitorRunDependencies?.(M);var e,n={a:zr};return i.instantiateWasm?new Promise((e,r)=>{i.instantiateWasm(n,(i,n)=>{e(t(i))})}):(G??=(e="cloudpilot_web.wasm",i.locateFile?i.locateFile(e,p):p+e),t((await R(u,G,n)).instance))}();function Tr(){}function Nr(t){return(t||Tr).__cache__}function Ar(t,e){var i=Nr(e),n=i[t];return n||((n=Object.create((e||Tr).prototype)).ptr=t,i[t]=n)}!function(){if(i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.shift()()}(),function t(){function e(){i.calledRun=!0,C||(x=!0,I(),N(vt),Hr.v(),I(),d?.(i),i.onRuntimeInitialized?.(),i.noInitialRun||function(){var t=bt;try{var e=t(0,0);return et(e),e}catch(t){return Z(t)}}(),function(){if(I(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)U(i.postRun.shift());N(A)}())}var n;M>0?k=t:(kr(),0==(n=Gr())&&(n+=4),_[n>>2]=34821223,_[n+4>>2]=2310721022,_[0]=1668509029,function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)F(i.preRun.shift());N(B)}(),M>0?k=t:(i.setStatus?(i.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>i.setStatus(""),1),e()},1)):e(),I()))}(),Tr.prototype=Object.create(Tr.prototype),Tr.prototype.constructor=Tr,Tr.prototype.__class__=Tr,Tr.__cache__={},i.WrapperObject=Tr,i.getCache=Nr,i.wrapPointer=Ar,i.castObject=function(t,e){return Ar(t.ptr,e)},i.NULL=Ar(0),i.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete Nr(t.__class__)[t.ptr]},i.compare=function(t,e){return t.ptr===e.ptr},i.getPointer=function(t){return t.ptr},i.getClass=function(t){return t.__class__};var Ur={buffer:0,size:0,pos:0,temps:[],needed:0,prepare(){if(Ur.needed){for(var t=0;t<Ur.temps.length;t++)i._webidl_free(Ur.temps[t]);Ur.temps.length=0,i._webidl_free(Ur.buffer),Ur.buffer=0,Ur.size+=Ur.needed,Ur.needed=0}Ur.buffer||(Ur.size+=128,Ur.buffer=i._webidl_malloc(Ur.size),E(Ur.buffer)),Ur.pos=0},alloc(t,e){E(Ur.buffer);var n,r=e.BYTES_PER_ELEMENT,o=t.length*r;return o=ct(o,8),Ur.pos+o>=Ur.size?(E(o>0),Ur.needed+=o,n=i._webidl_malloc(o),Ur.temps.push(n)):(n=Ur.buffer+Ur.pos,Ur.pos+=o),n},copy(t,e,i){i/=e.BYTES_PER_ELEMENT;for(var n=0;n<t.length;n++)e[i+n]=t[n]}};function Br(t){if("string"==typeof t){var e=(r=dt(n=t)+1,o=new Array(r),rt(n,o,0,o.length),o),i=Ur.alloc(e,v);return Ur.copy(e,v,i),i}var n,r,o;return t}function Fr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Lr(){this.ptr=Ct(),Nr(Lr)[this.ptr]=this}function jr(t,e){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=Ne(t,e),Nr(jr)[this.ptr]=this}function Or(){throw"cannot construct a Frame, no constructor in IDL"}function Wr(){throw"cannot construct a DbBackup, no constructor in IDL"}function Vr(){throw"cannot construct a SuspendContextClipboardCopy, no constructor in IDL"}function qr(){throw"cannot construct a SuspendContextClipboardPaste, no constructor in IDL"}function Kr(){throw"cannot construct a SuspendContextNetworkConnect, no constructor in IDL"}function $r(){throw"cannot construct a SuspendContextNetworkRpc, no constructor in IDL"}function Jr(){throw"cannot construct a SuspendContextSerialSync, no constructor in IDL"}function Qr(){throw"cannot construct a SuspendContext, no constructor in IDL"}function Yr(){this.ptr=Ui(),Nr(Yr)[this.ptr]=this}function Zr(t){Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),this.ptr=sn(t),Nr(Zr)[this.ptr]=this}function Xr(){throw"cannot construct a EmTransportSerialBuffer, no constructor in IDL"}function to(t,e,i){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),i&&"object"==typeof i&&(i=i.ptr),this.ptr=Gn(t,e,i),Nr(to)[this.ptr]=this}function eo(t,e){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=Nn(t,e),Nr(eo)[this.ptr]=this}function io(){this.ptr=Wn(),Nr(io)[this.ptr]=this}function no(t,e){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=fr(t,e),Nr(no)[this.ptr]=this}return Fr.prototype=Object.create(Tr.prototype),Fr.prototype.constructor=Fr,Fr.prototype.__class__=Fr,Fr.__cache__={},i.VoidPtr=Fr,Fr.prototype.__destroy__=Fr.prototype.__destroy__=function(){var t=this.ptr;wt(t)},Lr.prototype=Object.create(Tr.prototype),Lr.prototype.constructor=Lr,Lr.prototype.__class__=Lr,Lr.__cache__={},i.Cloudpilot=Lr,Lr.prototype.Malloc=Lr.prototype.Malloc=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Ar(Et(e,t),Fr)},Lr.prototype.Free=Lr.prototype.Free=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),It(e,t)},Lr.prototype.Nullptr=Lr.prototype.Nullptr=function(){var t=this.ptr;return Ar(xt(t),Fr)},Lr.prototype.EnableLogging=Lr.prototype.EnableLogging=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Dt(e,t)},Lr.prototype.InitializeSession=Lr.prototype.InitializeSession=function(t,e,i){var n=this.ptr;return Ur.prepare(),t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),i=i&&"object"==typeof i?i.ptr:Br(i),!!Gt(n,t,e,i)},Lr.prototype.GetCyclesPerSecond=Lr.prototype.GetCyclesPerSecond=function(){var t=this.ptr;return Mt(t)},Lr.prototype.RunEmulation=Lr.prototype.RunEmulation=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),kt(e,t)},Lr.prototype.SetClockFactor=Lr.prototype.SetClockFactor=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Pt(e,t)},Lr.prototype.CopyFrame=Lr.prototype.CopyFrame=function(){var t=this.ptr;return Ar(Rt(t),Or)},Lr.prototype.IsScreenDirty=Lr.prototype.IsScreenDirty=function(){var t=this.ptr;return!!zt(t)},Lr.prototype.MarkScreenClean=Lr.prototype.MarkScreenClean=function(){var t=this.ptr;Ht(t)},Lr.prototype.MinMemoryForDevice=Lr.prototype.MinMemoryForDevice=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),Tt(e,t)},Lr.prototype.FramebufferSizeForDevice=Lr.prototype.FramebufferSizeForDevice=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),Nt(e,t)},Lr.prototype.TotalMemoryForDevice=Lr.prototype.TotalMemoryForDevice=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),At(e,t)},Lr.prototype.QueuePenMove=Lr.prototype.QueuePenMove=function(t,e){var i=this.ptr;t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Ut(i,t,e)},Lr.prototype.QueuePenUp=Lr.prototype.QueuePenUp=function(){var t=this.ptr;Bt(t)},Lr.prototype.QueueButtonDown=Lr.prototype.QueueButtonDown=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ft(e,t)},Lr.prototype.QueueButtonUp=Lr.prototype.QueueButtonUp=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Lt(e,t)},Lr.prototype.QueueKeyboardEvent=Lr.prototype.QueueKeyboardEvent=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),jt(e,t)},Lr.prototype.IsPowerOff=Lr.prototype.IsPowerOff=function(){var t=this.ptr;return!!Ot(t)},Lr.prototype.IsUIInitialized=Lr.prototype.IsUIInitialized=function(){var t=this.ptr;return!!Wt(t)},Lr.prototype.GetOSVersion=Lr.prototype.GetOSVersion=function(){var t=this.ptr;return Vt(t)},Lr.prototype.IsSetupComplete=Lr.prototype.IsSetupComplete=function(){var t=this.ptr;return!!qt(t)},Lr.prototype.Reset=Lr.prototype.Reset=function(){var t=this.ptr;Kt(t)},Lr.prototype.ResetNoExtensions=Lr.prototype.ResetNoExtensions=function(){var t=this.ptr;$t(t)},Lr.prototype.ResetHard=Lr.prototype.ResetHard=function(){var t=this.ptr;Jt(t)},Lr.prototype.InstallDb=Lr.prototype.InstallDb=function(t,e){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Qt(i,t,e)},Lr.prototype.GetPalette2bitMapping=Lr.prototype.GetPalette2bitMapping=function(){var t=this.ptr;return Yt(t)},Lr.prototype.GetMemoryPtr=Lr.prototype.GetMemoryPtr=function(){var t=this.ptr;return Ar(Zt(t),Fr)},Lr.prototype.GetDirtyPagesPtr=Lr.prototype.GetDirtyPagesPtr=function(){var t=this.ptr;return Ar(Xt(t),Fr)},Lr.prototype.GetMemorySize=Lr.prototype.GetMemorySize=function(){var t=this.ptr;return te(t)},Lr.prototype.ImportMemoryImage=Lr.prototype.ImportMemoryImage=function(t,e){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),!!ee(i,t,e)},Lr.prototype.GetRomPtr=Lr.prototype.GetRomPtr=function(){var t=this.ptr;return Ar(ie(t),Fr)},Lr.prototype.GetRomSize=Lr.prototype.GetRomSize=function(){var t=this.ptr;return ne(t)},Lr.prototype.GetSavestatePtr=Lr.prototype.GetSavestatePtr=function(){var t=this.ptr;return Ar(re(t),Fr)},Lr.prototype.GetSavestateSize=Lr.prototype.GetSavestateSize=function(){var t=this.ptr;return oe(t)},Lr.prototype.SaveState=Lr.prototype.SaveState=function(){var t=this.ptr;return!!se(t)},Lr.prototype.LoadState=Lr.prototype.LoadState=function(t,e){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),!!ae(i,t,e)},Lr.prototype.GetHotsyncName=Lr.prototype.GetHotsyncName=function(){var t=this.ptr;return V(ce(t))},Lr.prototype.SetHotsyncName=Lr.prototype.SetHotsyncName=function(t){var e=this.ptr;Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),pe(e,t)},Lr.prototype.RegisterPwmHandler=Lr.prototype.RegisterPwmHandler=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),ue(e,t)},Lr.prototype.StartBackup=Lr.prototype.StartBackup=function(){var t=this.ptr;return Ar(le(t),Wr)},Lr.prototype.SetClipboardIntegration=Lr.prototype.SetClipboardIntegration=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),de(e,t)},Lr.prototype.GetClipboardIntegration=Lr.prototype.GetClipboardIntegration=function(){var t=this.ptr;return!!he(t)},Lr.prototype.IsSuspended=Lr.prototype.IsSuspended=function(){var t=this.ptr;return!!me(t)},Lr.prototype.GetSuspendContext=Lr.prototype.GetSuspendContext=function(){var t=this.ptr;return Ar(ve(t),Qr)},Lr.prototype.SetNetworkRedirection=Lr.prototype.SetNetworkRedirection=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),ye(e,t)},Lr.prototype.GetNetworkRedirection=Lr.prototype.GetNetworkRedirection=function(){var t=this.ptr;return!!fe(t)},Lr.prototype.RegisterProxyDisconnectHandler=Lr.prototype.RegisterProxyDisconnectHandler=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),_e(e,t)},Lr.prototype.SetHotsyncNameManagement=Lr.prototype.SetHotsyncNameManagement=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),ge(e,t)},Lr.prototype.LaunchAppByName=Lr.prototype.LaunchAppByName=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),!!Se(e,t)},Lr.prototype.LaunchAppByDbHeader=Lr.prototype.LaunchAppByDbHeader=function(t,e){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),!!be(i,t,e)},Lr.prototype.ClearExternalStorage=Lr.prototype.ClearExternalStorage=function(){var t=this.ptr;we(t)},Lr.prototype.AllocateCard=Lr.prototype.AllocateCard=function(t,e){var i=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),e&&"object"==typeof e&&(e=e.ptr),!!Ce(i,t,e)},Lr.prototype.AdoptCard=Lr.prototype.AdoptCard=function(t,e,i){var n=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),e&&"object"==typeof e&&(e=e.ptr),i&&"object"==typeof i&&(i=i.ptr),!!Ee(n,t,e,i)},Lr.prototype.MountCard=Lr.prototype.MountCard=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),!!Ie(e,t)},Lr.prototype.RemoveCard=Lr.prototype.RemoveCard=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),!!xe(e,t)},Lr.prototype.GetCardData=Lr.prototype.GetCardData=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),Ar(De(e,t),Fr)},Lr.prototype.GetCardDirtyPages=Lr.prototype.GetCardDirtyPages=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),Ar(Ge(e,t),Fr)},Lr.prototype.GetCardSize=Lr.prototype.GetCardSize=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),Me(e,t)},Lr.prototype.RemountCards=Lr.prototype.RemountCards=function(){var t=this.ptr;ke(t)},Lr.prototype.GetSupportLevel=Lr.prototype.GetSupportLevel=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Pe(e,t)},Lr.prototype.GetMountedKey=Lr.prototype.GetMountedKey=function(){var t=this.ptr;return V(Re(t))},Lr.prototype.GetTransportIR=Lr.prototype.GetTransportIR=function(){var t=this.ptr;return Ar(ze(t),Xr)},Lr.prototype.GetTransportSerial=Lr.prototype.GetTransportSerial=function(){var t=this.ptr;return Ar(He(t),Xr)},Lr.prototype.__destroy__=Lr.prototype.__destroy__=function(){var t=this.ptr;Te(t)},jr.prototype=Object.create(Tr.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},i.RomInfo=jr,jr.prototype.IsValid=jr.prototype.IsValid=function(){var t=this.ptr;return!!Ae(t)},jr.prototype.CardVersion=jr.prototype.CardVersion=function(){var t=this.ptr;return Ue(t)},jr.prototype.CardName=jr.prototype.CardName=function(){var t=this.ptr;return V(Be(t))},jr.prototype.RomVersion=jr.prototype.RomVersion=function(){var t=this.ptr;return Fe(t)},jr.prototype.RomVersionString=jr.prototype.RomVersionString=function(){var t=this.ptr;return V(Le(t))},jr.prototype.Supports=jr.prototype.Supports=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),!!je(e,t)},jr.prototype.__destroy__=jr.prototype.__destroy__=function(){var t=this.ptr;Oe(t)},Or.prototype=Object.create(Tr.prototype),Or.prototype.constructor=Or,Or.prototype.__class__=Or,Or.__cache__={},i.Frame=Or,Or.prototype.GetLineWidth=Or.prototype.GetLineWidth=function(){var t=this.ptr;return We(t)},Or.prototype.GetBpp=Or.prototype.GetBpp=function(){var t=this.ptr;return Ve(t)},Or.prototype.GetLines=Or.prototype.GetLines=function(){var t=this.ptr;return qe(t)},Or.prototype.GetMargin=Or.prototype.GetMargin=function(){var t=this.ptr;return Ke(t)},Or.prototype.GetBytesPerLine=Or.prototype.GetBytesPerLine=function(){var t=this.ptr;return $e(t)},Or.prototype.GetFirstDirtyLine=Or.prototype.GetFirstDirtyLine=function(){var t=this.ptr;return Je(t)},Or.prototype.GetLastDirtyLine=Or.prototype.GetLastDirtyLine=function(){var t=this.ptr;return Qe(t)},Or.prototype.GetHasChanges=Or.prototype.GetHasChanges=function(){var t=this.ptr;return!!Ye(t)},Or.prototype.GetBuffer=Or.prototype.GetBuffer=function(){var t=this.ptr;return Ar(Ze(t),Fr)},Or.prototype.GetBufferSize=Or.prototype.GetBufferSize=function(){var t=this.ptr;return Xe(t)},Or.prototype.GetScaleX=Or.prototype.GetScaleX=function(){var t=this.ptr;return ti(t)},Or.prototype.GetScaleY=Or.prototype.GetScaleY=function(){var t=this.ptr;return ei(t)},Or.prototype.__destroy__=Or.prototype.__destroy__=function(){var t=this.ptr;ii(t)},Wr.prototype=Object.create(Tr.prototype),Wr.prototype.constructor=Wr,Wr.prototype.__class__=Wr,Wr.__cache__={},i.DbBackup=Wr,Wr.prototype.Init=Wr.prototype.Init=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!ni(e,t)},Wr.prototype.IsInProgress=Wr.prototype.IsInProgress=function(){var t=this.ptr;return!!ri(t)},Wr.prototype.IsDone=Wr.prototype.IsDone=function(){var t=this.ptr;return!!oi(t)},Wr.prototype.GetCurrentDatabase=Wr.prototype.GetCurrentDatabase=function(){var t=this.ptr;return V(si(t))},Wr.prototype.Save=Wr.prototype.Save=function(){var t=this.ptr;return!!ai(t)},Wr.prototype.Skip=Wr.prototype.Skip=function(){var t=this.ptr;ci(t)},Wr.prototype.GetArchivePtr=Wr.prototype.GetArchivePtr=function(){var t=this.ptr;return Ar(pi(t),Fr)},Wr.prototype.GetArchiveSize=Wr.prototype.GetArchiveSize=function(){var t=this.ptr;return ui(t)},Wr.prototype.__destroy__=Wr.prototype.__destroy__=function(){var t=this.ptr;li(t)},Vr.prototype=Object.create(Tr.prototype),Vr.prototype.constructor=Vr,Vr.prototype.__class__=Vr,Vr.__cache__={},i.SuspendContextClipboardCopy=Vr,Vr.prototype.Cancel=Vr.prototype.Cancel=function(){var t=this.ptr;di(t)},Vr.prototype.Resume=Vr.prototype.Resume=function(){var t=this.ptr;hi(t)},Vr.prototype.GetClipboardContent=Vr.prototype.GetClipboardContent=function(){var t=this.ptr;return V(mi(t))},Vr.prototype.__destroy__=Vr.prototype.__destroy__=function(){var t=this.ptr;vi(t)},qr.prototype=Object.create(Tr.prototype),qr.prototype.constructor=qr,qr.prototype.__class__=qr,qr.__cache__={},i.SuspendContextClipboardPaste=qr,qr.prototype.Cancel=qr.prototype.Cancel=function(){var t=this.ptr;yi(t)},qr.prototype.Resume=qr.prototype.Resume=function(t){var e=this.ptr;Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),fi(e,t)},qr.prototype.__destroy__=qr.prototype.__destroy__=function(){var t=this.ptr;_i(t)},Kr.prototype=Object.create(Tr.prototype),Kr.prototype.constructor=Kr,Kr.prototype.__class__=Kr,Kr.__cache__={},i.SuspendContextNetworkConnect=Kr,Kr.prototype.Cancel=Kr.prototype.Cancel=function(){var t=this.ptr;gi(t)},Kr.prototype.Resume=Kr.prototype.Resume=function(){var t=this.ptr;Si(t)},Kr.prototype.__destroy__=Kr.prototype.__destroy__=function(){var t=this.ptr;bi(t)},$r.prototype=Object.create(Tr.prototype),$r.prototype.constructor=$r,$r.prototype.__class__=$r,$r.__cache__={},i.SuspendContextNetworkRpc=$r,$r.prototype.Cancel=$r.prototype.Cancel=function(){var t=this.ptr;wi(t)},$r.prototype.GetRequestSize=$r.prototype.GetRequestSize=function(){var t=this.ptr;return Ci(t)},$r.prototype.GetRequestData=$r.prototype.GetRequestData=function(){var t=this.ptr;return Ar(Ei(t),Fr)},$r.prototype.ReceiveResponse=$r.prototype.ReceiveResponse=function(t,e){var i=this.ptr;t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Ii(i,t,e)},$r.prototype.__destroy__=$r.prototype.__destroy__=function(){var t=this.ptr;xi(t)},Jr.prototype=Object.create(Tr.prototype),Jr.prototype.constructor=Jr,Jr.prototype.__class__=Jr,Jr.__cache__={},i.SuspendContextSerialSync=Jr,Jr.prototype.Cancel=Jr.prototype.Cancel=function(){var t=this.ptr;Di(t)},Jr.prototype.Resume=Jr.prototype.Resume=function(){var t=this.ptr;Gi(t)},Jr.prototype.__destroy__=Jr.prototype.__destroy__=function(){var t=this.ptr;Mi(t)},Qr.prototype=Object.create(Tr.prototype),Qr.prototype.constructor=Qr,Qr.prototype.__class__=Qr,Qr.__cache__={},i.SuspendContext=Qr,Qr.prototype.GetKind=Qr.prototype.GetKind=function(){var t=this.ptr;return ki(t)},Qr.prototype.Cancel=Qr.prototype.Cancel=function(){var t=this.ptr;Pi(t)},Qr.prototype.AsContextClipboardCopy=Qr.prototype.AsContextClipboardCopy=function(){var t=this.ptr;return Ar(Ri(t),Vr)},Qr.prototype.AsContextClipboardPaste=Qr.prototype.AsContextClipboardPaste=function(){var t=this.ptr;return Ar(zi(t),qr)},Qr.prototype.AsContextNetworkConnect=Qr.prototype.AsContextNetworkConnect=function(){var t=this.ptr;return Ar(Hi(t),Kr)},Qr.prototype.AsContextNetworkRpc=Qr.prototype.AsContextNetworkRpc=function(){var t=this.ptr;return Ar(Ti(t),$r)},Qr.prototype.AsContextSerialSync=Qr.prototype.AsContextSerialSync=function(){var t=this.ptr;return Ar(Ni(t),Jr)},Qr.prototype.__destroy__=Qr.prototype.__destroy__=function(){var t=this.ptr;Ai(t)},Yr.prototype=Object.create(Tr.prototype),Yr.prototype.constructor=Yr,Yr.prototype.__class__=Yr,Yr.__cache__={},i.SessionImage=Yr,Yr.prototype.GetDeviceId=Yr.prototype.GetDeviceId=function(){var t=this.ptr;return V(Bi(t))},Yr.prototype.SetDeviceId=Yr.prototype.SetDeviceId=function(t){var e=this.ptr;return Ur.prepare(),t=t&&"object"==typeof t?t.ptr:Br(t),Ar(Fi(e,t),Yr)},Yr.prototype.GetRomImage=Yr.prototype.GetRomImage=function(){var t=this.ptr;return Ar(Li(t),Fr)},Yr.prototype.GetRomImageSize=Yr.prototype.GetRomImageSize=function(){var t=this.ptr;return ji(t)},Yr.prototype.SetRomImage=Yr.prototype.SetRomImage=function(t,e){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Ar(Oi(i,t,e),Yr)},Yr.prototype.GetMemoryImage=Yr.prototype.GetMemoryImage=function(){var t=this.ptr;return Ar(Wi(t),Fr)},Yr.prototype.GetMemoryImageSize=Yr.prototype.GetMemoryImageSize=function(){var t=this.ptr;return Vi(t)},Yr.prototype.SetMemoryImage=Yr.prototype.SetMemoryImage=function(t,e){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Ar(qi(i,t,e),Yr)},Yr.prototype.GetMetadata=Yr.prototype.GetMetadata=function(){var t=this.ptr;return Ar(Ki(t),Fr)},Yr.prototype.GetMetadataSize=Yr.prototype.GetMetadataSize=function(){var t=this.ptr;return $i(t)},Yr.prototype.SetMetadata=Yr.prototype.SetMetadata=function(t,e){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Ar(Ji(i,t,e),Yr)},Yr.prototype.GetSavestate=Yr.prototype.GetSavestate=function(){var t=this.ptr;return Ar(Qi(t),Fr)},Yr.prototype.GetSavestateSize=Yr.prototype.GetSavestateSize=function(){var t=this.ptr;return Yi(t)},Yr.prototype.SetSavestate=Yr.prototype.SetSavestate=function(t,e){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Ar(Zi(i,t,e),Yr)},Yr.prototype.GetVersion=Yr.prototype.GetVersion=function(){var t=this.ptr;return Xi(t)},Yr.prototype.Serialize=Yr.prototype.Serialize=function(){var t=this.ptr;return!!tn(t)},Yr.prototype.GetSerializedImage=Yr.prototype.GetSerializedImage=function(){var t=this.ptr;return Ar(en(t),Fr)},Yr.prototype.GetSerializedImageSize=Yr.prototype.GetSerializedImageSize=function(){var t=this.ptr;return nn(t)},Yr.prototype.Deserialize=Yr.prototype.Deserialize=function(t,e){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),!!rn(i,t,e)},Yr.prototype.__destroy__=Yr.prototype.__destroy__=function(){var t=this.ptr;on(t)},Zr.prototype=Object.create(Tr.prototype),Zr.prototype.constructor=Zr,Zr.prototype.__class__=Zr,Zr.__cache__={},i.SkinLoader=Zr,Zr.prototype.GetData=Zr.prototype.GetData=function(){var t=this.ptr;return Ar(an(t),Fr)},Zr.prototype.GetSize=Zr.prototype.GetSize=function(){var t=this.ptr;return cn(t)},Zr.prototype.__destroy__=Zr.prototype.__destroy__=function(){var t=this.ptr;pn(t)},Xr.prototype=Object.create(Tr.prototype),Xr.prototype.constructor=Xr,Xr.prototype.__class__=Xr,Xr.__cache__={},i.EmTransportSerialBuffer=Xr,Xr.prototype.RxBytesPending=Xr.prototype.RxBytesPending=function(){var t=this.ptr;return un(t)},Xr.prototype.Receive=Xr.prototype.Receive=function(){var t=this.ptr;return Ar(ln(t),Fr)},Xr.prototype.Send=Xr.prototype.Send=function(t,e,i){var n=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),i&&"object"==typeof i&&(i=i.ptr),dn(n,t,e,i)},Xr.prototype.IsOpen=Xr.prototype.IsOpen=function(){var t=this.ptr;return!!hn(t)},Xr.prototype.Rts=Xr.prototype.Rts=function(){var t=this.ptr;return mn(t)},Xr.prototype.Dtr=Xr.prototype.Dtr=function(){var t=this.ptr;return!!vn(t)},Xr.prototype.IsBreak=Xr.prototype.IsBreak=function(){var t=this.ptr;return!!yn(t)},Xr.prototype.BufferSize=Xr.prototype.BufferSize=function(){var t=this.ptr;return fn(t)},Xr.prototype.GetBaud=Xr.prototype.GetBaud=function(){var t=this.ptr;return _n(t)},Xr.prototype.GetParity=Xr.prototype.GetParity=function(){var t=this.ptr;return gn(t)},Xr.prototype.GetStopBits=Xr.prototype.GetStopBits=function(){var t=this.ptr;return Sn(t)},Xr.prototype.GetDataBits=Xr.prototype.GetDataBits=function(){var t=this.ptr;return bn(t)},Xr.prototype.GetHwrHandshake=Xr.prototype.GetHwrHandshake=function(){var t=this.ptr;return wn(t)},Xr.prototype.GetModeSync=Xr.prototype.GetModeSync=function(){var t=this.ptr;return!!Cn(t)},Xr.prototype.SetModeSync=Xr.prototype.SetModeSync=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),En(e,t)},Xr.prototype.IsFrameComplete=Xr.prototype.IsFrameComplete=function(){var t=this.ptr;return!!In(t)},Xr.prototype.SetRequestTransferCallback=Xr.prototype.SetRequestTransferCallback=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),xn(e,t)},Xr.prototype.__destroy__=Xr.prototype.__destroy__=function(){var t=this.ptr;Dn(t)},to.prototype=Object.create(Tr.prototype),to.prototype.constructor=to,to.prototype.__class__=to,to.__cache__={},i.GunzipContext=to,to.prototype.GetState=to.prototype.GetState=function(){var t=this.ptr;return Mn(t)},to.prototype.Continue=to.prototype.Continue=function(){var t=this.ptr;return kn(t)},to.prototype.GetUncompressedData=to.prototype.GetUncompressedData=function(){var t=this.ptr;return Ar(Pn(t),Fr)},to.prototype.ReleaseUncompressedData=to.prototype.ReleaseUncompressedData=function(){var t=this.ptr;return Ar(Rn(t),Fr)},to.prototype.GetUncompressedSize=to.prototype.GetUncompressedSize=function(){var t=this.ptr;return zn(t)},to.prototype.GetError=to.prototype.GetError=function(){var t=this.ptr;return V(Hn(t))},to.prototype.__destroy__=to.prototype.__destroy__=function(){var t=this.ptr;Tn(t)},eo.prototype=Object.create(Tr.prototype),eo.prototype.constructor=eo,eo.prototype.__class__=eo,eo.__cache__={},i.ZipfileWalker=eo,eo.prototype.GetState=eo.prototype.GetState=function(){var t=this.ptr;return An(t)},eo.prototype.Next=eo.prototype.Next=function(){var t=this.ptr;return Un(t)},eo.prototype.GetTotalEntries=eo.prototype.GetTotalEntries=function(){var t=this.ptr;return Bn(t)},eo.prototype.GetCurrentEntrySize=eo.prototype.GetCurrentEntrySize=function(){var t=this.ptr;return Fn(t)},eo.prototype.GetCurrentEntryName=eo.prototype.GetCurrentEntryName=function(){var t=this.ptr;return V(Ln(t))},eo.prototype.GetCurrentEntryContent=eo.prototype.GetCurrentEntryContent=function(){var t=this.ptr;return Ar(jn(t),Fr)},eo.prototype.__destroy__=eo.prototype.__destroy__=function(){var t=this.ptr;On(t)},io.prototype=Object.create(Tr.prototype),io.prototype.