diff --git a/README.md b/README.md index 655f1a9..74f2c49 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,12 @@
- +

- + [![Badge License]][License] -
Self-hosted **Javascript** emulation for various system. @@ -131,7 +130,7 @@ EJS_BETA = true; -[Configurator]: https://emulatorjs.ga/codehelper +[Configurator]: https://emulatorjs.ga/editor.html [Contributors]: docs/Contributors.md [Website]: https://emulatorjs.ga/ [Legacy]: https://coldcast.org/games/1/Super-Mario-Bros diff --git a/data/emu-main.js b/data/emu-main.js index 087b7e3..6117e82 100644 --- a/data/emu-main.js +++ b/data/emu-main.js @@ -31,7 +31,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 'reset': 'Reset', 'disabled': 'Disabled', 'enabled': 'Enabled', - 'playNow': 'Play Now' + 'playNow': 'Start Game' }, 'listeners': { 'play': null, @@ -3859,8 +3859,9 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { {id: {"b_cr":true},number: 20} ].forEach((a) => { _0x1093f4.call(this, _0x530042.call(this, '.'.concat(_0x2c1832, ' .').concat(_0x449eac(a.id))), - 'touchstart touchend', function(e) { - ['touchend'].includes(e.type) ? (_0x3a8e2f(e.target, _0x2ec721, false), window.setTimeout(function() { + 'touchstart touchend mousedown mouseup mouseout', function(e) { + if (e.sourceCapabilities.firesTouchEvents && e.type.includes('mouse')) return; + ['touchend', 'mouseup', 'mouseout'].includes(e.type) ? (_0x3a8e2f(e.target, _0x2ec721, false), window.setTimeout(function() { _0x378b5c.syncInput(0, a.number, 0); }, 30)) : (_0x3a8e2f(e.target, _0x2ec721, true), _0x378b5c.syncInput(0, a.number, 1)), e.stopPropagation(); }) @@ -3875,6 +3876,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0x530042.call(this, ".".concat(_0x449eac({ejs__widgets: true}))).appendChild(menuButton); var hideTimeout; _0x1093f4.call(this, menuButton, 'mousedown touchstart', function(e) { + if (e.sourceCapabilities.firesTouchEvents && e.type.includes('mouse')) return; _0x3a8e2f(e.target, _0x2ec721, true); clearTimeout(hideTimeout); _0x5ab74d.toggleControls.call(_0xa88a13, true); @@ -6516,4 +6518,4 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }(); _0x3dbc76.defaults = {}; _0x17edbf.default = _0x3dbc76; -} +} \ No newline at end of file diff --git a/data/emu-min.js b/data/emu-min.js new file mode 100644 index 0000000..f3dc224 --- /dev/null +++ b/data/emu-min.js @@ -0,0 +1 @@ +var EJS=function(n){window.EJS_MODULES=n;var o={},a=[];function i(e){if(o[e])return o[e].exports;a.push(e);var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return window.aba=function(){return a.sort(function(e,t){return t'+n.localization("CORS Error")+"":t.innerHTML=''+n.localization("Network Error")+""}},null,null,null,null,null,function(e,t,n){!function(e){"use strict";function o(){}function t(e){var t=this,n=window;this.update=o,this.requestAnimationFrame=e||n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame,this.tickFunction=function(){t.update(),t.startTicker()},this.startTicker=function(){t.requestAnimationFrame.apply(n,[t.tickFunction])}}function n(){}function a(e,t){this.listener=e,this.gamepadGetter=t,this.knownGamepads=[]}function i(t){this.listener=t,window.addEventListener("gamepadconnected",function(e){t._connect(e.gamepad)}),window.addEventListener("gamepaddisconnected",function(e){t._disconnect(e.gamepad)})}function l(e){this.updateStrategy=e||new t,this.gamepads=[],this.listeners={},this.platform=r,this.deadzone=.03,this.maximizeThreshold=.97}var r={getType:function(){return"null"},isSupported:function(){return!1},update:o};t.prototype.start=function(e){this.update=e||o,this.startTicker()},n.prototype.update=o,n.prototype.start=function(e){this.update=e||o},a.factory=function(e){var t=r,n=window&&window.navigator;return n&&(void 0!==n.getGamepads?t=new a(e,function(){return n.getGamepads()}):void 0!==n.webkitGamepads?t=new a(e,function(){return n.webkitGamepads()}):void 0!==n.webkitGetGamepads&&(t=new a(e,function(){return n.webkitGetGamepads()}))),t},a.getType=function(){return"WebKit"},a.prototype.getType=function(){return a.getType()},a.prototype.isSupported=function(){return!0},a.prototype.update=function(){for(var e,t=Array.prototype.slice.call(this.gamepadGetter(),0),n=this.knownGamepads.length-1;0<=n;n--)e=this.knownGamepads[n],t.indexOf(e)<0&&(this.knownGamepads.splice(n,1),this.listener._disconnect(e));for(n=0;ne.length)&&(n=e.length),n-=t.length;e=e.indexOf(t,n);return-1!==e&&e===n},toArray:function(e){if(!e)return null;var t=e.length;if(l(t))return null;for(var n=new Array(t);0>16&255,a[i++]=t>>8&255,a[i++]=255&t;return 2===n&&(t=c[e.charCodeAt(s)]<<2|c[e.charCodeAt(s+1)]>>4,a[i++]=255&t),1===n&&(t=c[e.charCodeAt(s)]<<10|c[e.charCodeAt(s+1)]<<4|c[e.charCodeAt(s+2)]>>2,a[i++]=t>>8&255,a[i++]=255&t),a},n.fromByteArray=function(e){for(var t,n=e.length,o=n%3,a=[],i=0,r=n-o;i>18&63]+s[o>>12&63]+s[o>>6&63]+s[63&o]);return a.join("")}(e,i,r>2]+s[t<<4&63]+"==")):2==o&&(t=(e[n-2]<<8)+e[n-1],a.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"=")),a.join("")};for(var s=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,i=o.length;a>>1;case"base64":return T(e).length;default:if(a)return o?-1:_(e).length;t=(""+t).toLowerCase(),a=!0}}function n(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function s(e,t,n,o,a){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):2147483647=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=u.from(t,o)),u.isBuffer(t))return 0===t.length?-1:c(e,t,n,o,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(a?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):c(e,[t],n,o,a);throw new TypeError("val must be string, number or Buffer")}function c(e,t,n,o,a){var i=1,r=e.length,s=t.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;r/=i=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a)for(var l=-1,d=n;d>>10&1023|55296),d=56320|1023&d),o.push(d),a+=u}var f=o,p=f.length;if(p<=g)return String.fromCharCode.apply(String,f);for(var h="",m=0;mthis.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var i=this,r=t,s=n,c=i.length;(!s||s<0||ct&&(e+=" ... "),""},u.prototype.compare=function(e,t,n,o,a){if(A(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===a&&(a=this.length),(t=void 0===t?0:t)<0||n>e.length||o<0||a>this.length)throw new RangeError("out of range index");if(a<=o&&n<=t)return 0;if(a<=o)return-1;if(n<=t)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(o>>>=0),r=(n>>>=0)-(t>>>=0),s=Math.min(i,r),c=this.slice(o,a),l=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}var a=this.length-t;if((void 0===n||athis.length)throw new RangeError("Attempt to write outside buffer bounds");o=o||"utf8";for(var i,r,s,c,l,d=!1;;)switch(o){case"hex":var u=this,f=e,p=t,h=n,m=(p=Number(p)||0,u.length-p);(!h||(h=Number(h))>m)&&(h=m),(m=f.length)/2>8,a.push(n%256),a.push(o);return a}(e,(i=this).length-s),i,s,r);default:if(d)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),d=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var g=4096;function l(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(ne.length)throw new RangeError("Index out of range")}function b(e,t,n,o){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function v(e,t,n,o,a){return t=+t,n>>>=0,a||b(e,0,n,4),i.write(e,t,n,o,23,4),n+4}function w(e,t,n,o,a){return t=+t,n>>>=0,a||b(e,0,n,8),i.write(e,t,n,o,52,8),n+8}u.prototype.slice=function(e,t){var n=this.length,n=((e=~~e)<0?(e+=n)<0&&(e=0):n>>=0,t>>>=0,n||l(e,t,this.length);for(var o=this[e],a=1,i=0;++i>>=0,t>>>=0,n||l(e,t,this.length);for(var o=this[e+--t],a=1;0>>=0,t||l(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||l(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||l(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||l(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||l(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||l(e,t,this.length);for(var o=this[e],a=1,i=0;++i=(a*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||l(e,t,this.length);for(var o=t,a=1,i=this[e+--o];0=(a*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||l(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||l(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},u.prototype.readInt16BE=function(e,t){e>>>=0,t||l(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||l(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||l(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||l(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||l(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||l(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||l(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,o){e=+e,t>>>=0,n>>>=0,o||m(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,o||m(this,e,t,n,Math.pow(2,8*n)-1,0);var a=n-1,i=1;for(this[t+a]=255&e;0<=--a&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,n,o){e=+e,t>>>=0,o||m(this,e,t,n,(o=Math.pow(2,8*n-1))-1,-o);var a=0,i=1,r=0;for(this[t]=255&e;++a>0)-r&255;return t+n},u.prototype.writeIntBE=function(e,t,n,o){e=+e,t>>>=0,o||m(this,e,t,n,(o=Math.pow(2,8*n-1))-1,-o);var a=n-1,i=1,r=0;for(this[t+a]=255&e;0<=--a&&(i*=256);)e<0&&0===r&&0!==this[t+a+1]&&(r=1),this[t+a]=(e/i>>0)-r&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,n){return v(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return v(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return w(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return w(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,o){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n=n||0,o||0===o||(o=this.length),t>=e.length&&(t=e.length),(o=0=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length);var a=(o=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(i=t;i>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function T(e){return S.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(x,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function E(e,t,n,o){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function A(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function k(e){return e!=e}}.call(this)}.call(this,O("buffer").Buffer)},{"base64-js":2,buffer:3,ieee754:4}],4:[function(e,t,n){n.read=function(e,t,n,o,a){var i,r,s=8*a-o-1,c=(1<>1,d=-7,u=n?a-1:0,f=n?-1:1,a=e[t+u];for(u+=f,i=a&(1<<-d)-1,a>>=-d,d+=s;0>=-d,d+=o;0>1,u=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=o?0:i-1,p=o?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,r=l):(r=Math.floor(Math.log(t)/Math.LN2),t*(o=Math.pow(2,-r))<1&&(r--,o*=2),2<=(t+=1<=r+d?u/o:u*Math.pow(2,1-d))*o&&(r++,o/=2),l<=r+d?(s=0,r=l):1<=r+d?(s=(t*o-1)*Math.pow(2,a),r+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),r=0));8<=a;e[n+f]=255&s,f+=p,s/=256,a-=8);for(r=r<=this._reconnectionAttempts?(d("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1):(e=this.backoff.duration(),d("will wait %dms before reconnect attempt",e),this.reconnecting=!0,t=setTimeout(function(){n.skipReconnect||(d("attempting reconnect"),n.emitAll("reconnect_attempt",n.backoff.attempts),n.emitAll("reconnecting",n.backoff.attempts),n.skipReconnect||n.open(function(e){e?(d("reconnect attempt error"),n.reconnecting=!1,n.reconnect(),n.emitAll("reconnect_error",e.data)):(d("reconnect success"),n.onreconnect())}))},e),this.subs.push({destroy:function(){clearTimeout(t)}}))},p.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){var r=n(106),s=n(381),c=n(390),n=n(391);t.polling=function(e){var t,n,o=!1,a=!1,i=!1!==e.jsonp;if("undefined"!=typeof location&&(t="https:"===location.protocol,n=(n=location.port)||(t?443:80),o=e.hostname!==location.hostname||n!==e.port,a=e.secure!==t),e.xdomain=o,e.xscheme=a,"open"in new r(e)&&!e.forceJSONP)return new s(e);if(i)return new c(e);throw new Error("JSONP disabled")},t.websocket=n},function(e,t,n){var o=n(107),a=n(75),i=n(51),r=n(76),s=n(152),c=n(77)("engine.io-client:polling"),l=(e.exports=d,null!=new(n(106))({xdomain:!1}).responseType);function d(e){var t=e&&e.forceBase64;l&&!t||(this.supportsBinary=!1),o.call(this,e)}r(d,o),d.prototype.name="polling",d.prototype.doOpen=function(){this.poll()},d.prototype.pause=function(e){var t,n=this;function o(){c("paused"),n.readyState="paused",e()}this.readyState="pausing",this.polling||!this.writable?(t=0,this.polling&&(c("we are currently polling - waiting to pause"),t++,this.once("pollComplete",function(){c("pre-pause polling complete"),--t||o()})),this.writable||(c("we are currently writing - waiting to pause"),t++,this.once("drain",function(){c("pre-pause writing complete"),--t||o()}))):o()},d.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},d.prototype.onData=function(e){var o=this;c("polling got data %s",e),i.decodePayload(e,this.socket.binaryType,function(e,t,n){if("opening"===o.readyState&&o.onOpen(),"close"===e.type)return o.onClose(),!1;o.onPacket(e)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},d.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},d.prototype.write=function(e){function t(){n.writable=!0,n.emit("drain")}var n=this;this.writable=!1;i.encodePayload(e,this.supportsBinary,function(e){n.doWrite(e,t)})},d.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=s()),this.supportsBinary||e.sid||(e.b64=1),e=a.encode(e),this.port&&("https"==t&&443!==Number(this.port)||"http"==t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(t,e,n){!function(i){var e=Object.prototype.toString,r="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===e.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===e.call(File);t.exports=function e(t){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(var n=0,o=t.length;nthis.options.threshold){var s={};for(c in this.direction)this.direction.hasOwnProperty(c)&&(s[c]=this.direction[c]);var c,l={};for(c in this.direction={x:n,y:o,angle:t},e.direction=this.direction,s)s[c]===this.direction[c]&&(l[c]=!0);if(l.x&&l.y&&l.angle)return e;l.x&&l.y||this.trigger("plain",e),l.x||this.trigger("plain:"+n,e),l.y||this.trigger("plain:"+o,e),l.angle||this.trigger("dir dir:"+t,e)}return e},o.prototype=new e,(o.constructor=o).id=0,o.prototype.prepareNipples=function(){var e=this,o=e.nipples;o.on=e.on.bind(e),o.off=e.off.bind(e),o.options=e.options,o.destroy=e.destroy.bind(e),o.ids=e.ids,o.id=e.id,o.processOnMove=e.processOnMove.bind(e),o.processOnEnd=e.processOnEnd.bind(e),o.get=function(e){if(void 0===e)return o[0];for(var t=0,n=o.length;t
\n
\n
\n
\n
\n
\n
\n '+de("playNow",b.config)+"\n
\n ",e=F("iframe",{src:b.adUrl,scrolling:"no",frameborder:"no",style:"width:300px !important;height:250px !important;display: block !important;"}),Z.loading.querySelector(".".concat(T.ad)).removeChild(Z.loading.querySelector(".".concat(T.ad," iframe"))),Z.loading.querySelector(".".concat(T.ad)).appendChild(e),X.webgl.DETECTED||(q(Z.loading.querySelector(".".concat(T["start-game"])),!0),Z.loading.querySelector(".".concat(T.p3)).innerHTML='Failed to initialize WebGL.'),Z.loading.querySelector(".".concat(T.ad," iframe")).style.setProperty("display","block","important"),Z.loading.querySelector(".".concat(T.ad," iframe")).style.setProperty("visibility","visible","important"),Z.loading.querySelector(".".concat(T.ad)).style.setProperty("display","block","important"),Z.loading.querySelector(".".concat(T.ad)).style.setProperty("visibility","visible","important")):(Z.loading.innerHTML='\n
\n
\n
\n
\n
\n
\n
\n ').concat(de("playNow",b.config),"\n
\n
"),X.webgl.DETECTED||(q(Z.loading.querySelector(".".concat(T["start-game"])),!0),Z.loading.querySelector(".".concat(T.p3)).innerHTML='Failed to initialize WebGL.')),window.URL||window.webkitURL),S=(J.a.interceptors.request.use(function(e){return e.headers["Content-Type"]="application/x-www-form-urlencoded","options"===e.method.toLowerCase()&&(e.method="get"),e},function(e){return Promise.reject(e)}),function(e){var t;return 80===e[0]&&75===e[1]&&3===e[2]&&4===e[3]||80===e[0]&&75===e[1]&&5===e[2]&&6===e[3]||80===e[0]&&75===e[1]&&7===e[2]&&8===e[3]?t="zip":55===e[0]&&122===e[1]&&188===e[2]&&175===e[3]&&39===e[4]&&28===e[5]?t="7z":82===e[0]&&97===e[1]&&114===e[2]&&33===e[3]&&26===e[4]&&7===e[5]&&0==e[6]&&(t="rar"),t}),C=function(e){var e=new Blob(['importScripts("'+e+'");'],{type:"application/javascript"}),n=window.URL.createObjectURL(e);return new Promise(function(e,t){e(new Worker(n))})},E=function(e,t){var n="",t=("rar"==t&&(n="\nvar dataToPass = [];\nModule = {\n monitorRunDependencies: function(left) {\n if (left == 0) {\n setTimeout(function() {\n unrar(dataToPass, null);\n }, 100);\n }\n },\n onRuntimeInitialized: function() {\n },\n locateFile: function(file) {\n return '".concat(e+".mem","';\n }\n};\nimportScripts(\"").concat(e,'");\nvar unrar = function(data, password) {\n var cb = function(fileName, fileSize, progress) {\n postMessage({"t":4,"current":progress,"total":fileSize, "name": fileName});\n };\n\n var rarContent = readRARContent(data.map(function(d) {\n return {\n name: d.name,\n content: new Uint8Array(d.content)\n }\n }), password, cb)\n var rec = function(entry) {\n if (entry.type === \'file\') {\n postMessage({"t":2,"file":entry.fullFileName,"size":entry.fileSize,"data":entry.fileContent});\n } else if (entry.type === \'dir\') {\n Object.keys(entry.ls).forEach(function(k) {\n rec(entry.ls[k]);\n })\n } else {\n throw "Unknown type";\n }\n }\n rec(rarContent);\n postMessage({"t":1});\n return rarContent;\n};\nonmessage = function(data) {\n dataToPass.push({name: \'test.rar\', content: data.data});\n};\n ')),new Blob([n],{type:"application/javascript"})),o=window.URL.createObjectURL(t);return new Promise(function(e,t){e(new Worker(o))})},A=null,d=null,c=null,u=null;try{A=new ve.a({dbVersion:1,storePrefix:"ejs-",storeName:"system",keyPath:null,autoIncrement:!1,onStoreReady:function(){o=!0},onError:function(){o=!0}}),d=new ve.a({dbVersion:1,storePrefix:"ejs-",storeName:"roms",keyPath:null,autoIncrement:!1,onStoreReady:function(){a=!0},onError:function(){a=!0}}),c=new ve.a({dbVersion:1,storePrefix:"ejs-",storeName:"bios",keyPath:null,autoIncrement:!1,onStoreReady:function(){i=!0},onError:function(){i=!0}}),u=new ve.a({dbVersion:1,storePrefix:"ejs-",storeName:"romsdata",keyPath:null,autoIncrement:!1,onStoreReady:function(){},onError:function(){}})}catch(e){i=a=o=!0,console.log(e)}z.call(b,b.elements.container,"start-game",function(e){b.started=!0,b.playing=!0,q(Z.loading.querySelector(".".concat(T["loading-info"])),!0),!ee||"undefined"!=ee.virtualGamepadContainer&&null!==ee.virtualGamepadContainer||K.toggleControls.call(b,!0);var t,n,o,a,i,r,s,c,l=V({"ejs__tooltip--visible":!0}),d=b.elements.buttons.gamepad.querySelector(".".concat(V({ejs__tooltip:!0}))),u=(H(d,l,!0),setTimeout(function(){H(d,l,!1)},5e3),"string"==typeof b.adUrl&&(q(Z.loading.querySelector(".".concat(T["close-ad"])),!1),setTimeout(function(){b.started&&Z.loading.querySelector(".".concat(T.ad))&&Z.loading.querySelector(".".concat(T.ad)).parentNode.removeChild(Z.loading.querySelector(".".concat(T.ad)))},1e4)),q(Z.loading.querySelector(".".concat(T["start-game"])),!0),Y(te.defaultCoreOptionsValues.call(p),te.storage.get("core-options")||{})),f=("n64"===b.system&&u&&Object.keys(u).forEach(function(e){"glupen64-aspect"===e&&"16:9"===u[e]&&(_.height=_.width/16*9,Z.aspectRatio=16/9)}),"arcade"!==p.system&&"fba0.2.97.29"!==p.system||u&&Object.keys(u).forEach(function(e){"fba-aspect"===e&&"PAR"===u[e]&&(_.height=_.width/16*9,Z.aspectRatio=16/9)}),"gba"===b.system&&(_.height=_.width/1.5,Z.aspectRatio=1.5),window.setTimeout(function(){},150),f=p,"undefined"!=typeof RI?(document.removeEventListener("mousemove",RI.eventHandler,!1),_.removeEventListener("mousedown",RI.canvasEventHandler,!1),_.removeEventListener("mouseup",RI.canvasEventHandler,!1),f.elements.container.addEventListener("mousemove",function(e){var t=0,n=0,o=e.offsetX-Z.Module.canvas.offsetLeft,a=e.offsetY-Z.Module.canvas.offsetTop;if("mousemove"===e.type){t=o<0?(o=0,-Z.Module.canvas.offsetWidth):o>Z.Module.canvas.offsetWidth?(o=Z.Module.canvas.offsetWidth,Z.Module.canvas.offsetWidth):o-RI.currentX,n=a<0?(a=0,-Z.Module.canvas.offsetHeight):a>Z.Module.canvas.offsetHeight?(a=Z.Module.canvas.offsetHeight,Z.Module.canvas.offsetHeight):a-RI.currentY,RI.currentX=o,RI.currentY=a;for(var i=0;i>2]=t,HEAP32[RI.contexts[i].state+36>>2]=n}},!1),f.elements.container.addEventListener("mousedown",RI.canvasEventHandler,!1),f.elements.container.addEventListener("mouseup",RI.canvasEventHandler,!1),f.elements.container.addEventListener("touchstart",t=function(e){if(e.targetTouches[0]){var t,n=0,o=0,a=e.target.getBoundingClientRect(),i=e.targetTouches[0].clientX-a.left,a=e.targetTouches[0].clientY-a.top,n=i<0?(i=0,-Z.Module.canvas.offsetWidth):i>Z.Module.canvas.offsetWidth?(i=Z.Module.canvas.offsetWidth,Z.Module.canvas.offsetWidth):i-RI.currentX,o=a<0?(a=0,-Z.Module.canvas.offsetHeight):a>Z.Module.canvas.offsetHeight?(a=Z.Module.canvas.offsetHeight,Z.Module.canvas.offsetHeight):a-RI.currentY;RI.currentX=i,RI.currentY=a;for(var r=0;r>2]=n,HEAP32[RI.contexts[r].state+36>>2]=o;switch(e.type){case"touchend":case"touchstart":if(0===e.button)t=40;else{if(2!==e.button)break;t=41}for(var s="touchend"===e.type?0:1,c=0;c>0]=s}}},!1),f.elements.container.addEventListener("touchend",t,!1)):(f=function(e){e=new MouseEvent(e.type,e);Z.Module.canvas.dispatchEvent(e)},G.call(p,".".concat(V({ejs__dialogs:!0}))).addEventListener("mousemove",f,!1),G.call(p,".".concat(V({ejs__dialogs:!0}))).addEventListener("mousedown",f,!1),G.call(p,".".concat(V({ejs__dialogs:!0}))).addEventListener("mouseup",f,!1)),"msx"===b.system&&"undefined"!=typeof RI&&(document.removeEventListener("keydown",RI.eventHandler,!1),document.removeEventListener("keyup",RI.eventHandler,!1),t=function(e){var t=e.keyCode,n=t>>3,o=1<<(7&t);switch(e.type){case"keyup":case"keydown":if(32<=n)throw"key code error! bad code: "+t;for(var a=0;a>0];"keyup"===e.type?i&=~o:i|=o,HEAP8[RI.contexts[a].state+n>>0]=i}}},document.addEventListener("keydown",t,!1),document.addEventListener("keyup",t,!1)),setTimeout(function(){var a=W.info();null===ee.setVolume&&"undefined"!=typeof RA?(RA.queueAudio=function(){var e=b.volume,t=RA.bufIndex,n=RA.bufIndex?RA.buffers[RA.bufIndex-1].endTime:RA.context.currentTime,o=(RA.buffers[t].endTime=n+RA.buffers[t].duration,RA.context.createBufferSource());o.buffer=RA.buffers[t],1===(e=b.muted?0:e)?o.connect(RA.context.destination):(t=RA.context.createGain(),o.connect(t),t.connect(RA.context.destination),W.isEdge||"chrome"===a.name&&parseInt(a.version,10)<=60||"firefox"===a.name&&parseInt(a.version,10)<=56||"opera"===a.name&&parseInt(a.version,10)<=44?t.gain.value=e:"firefox"===a.name?t.gain.setValueAtTime(e,RA.context.currentTime):t.gain.setValueAtTime(e,RA.context.currentTime,0)),o.start(n),RA.bufIndex+=1,RA.bufOffset=0},W.isIos&&window.addEventListener("touchstart",function(){var e;RA.context&&(RA.context.resume(),(e=RA.context.createBufferSource()).connect(RA.context.destination),e.start())},!1)):ee.setVolume()},500),setTimeout(function(){b.elements.container.focus()},30),void 0===window.addRunDependency&&(window.Module=void 0),Z.FS.readFile(b.startName));f.length<=33554432&&".cue"!=b.startName.substr(-4)&&(o="snes"===b.system||["snes2002","snes2005","snes2010"].includes(b.system)?(n=f.length%1024,new $(n?f.slice?f.slice(n):f.subarray(n):f)):new $(f),a=Le.a.create(),i=new FileReader,r=0,s=o._u8array.length,c=function(){var e;r");var c=s.split("|");Z.coreFileName="".concat(f.system,"-").concat(c[0]),a="1"===c[1],B.element(f.elements.buttons.saveState)&&q(f.elements.buttons.saveState,!a),B.element(f.elements.buttons.loadState)&&q(f.elements.buttons.loadState,!a),q(te.contextMenu.querySelectorAll("ul li").item(2),!a),q(te.contextMenu.querySelectorAll("ul li").item(3),!a),d=2===f.coreVer?"":f.system.concat("-old-").concat(c[0],"-wasm.data"),c[0]?(X.wasm&&r?h=!0:(c.innerHTML=''+f.localization("Webassembly support is not detected in this browser")+"",d=""),d&&(A.db?A.get(d,function(e){e&&e.version===n?2===b.coreVer?L(e.data):((e=e.data.slice?e.data.slice(12):e.data.subarray(12)).set([55,122,188,175,39,28,0,3],0),L(e)):u(d,n)}):u(d,n))):c.innerHTML=''+f.localization("Unsupported Game")+""}else{var l,d=!1;if(X.wasm&&r?(l="wasm",d=!0,"n64"!==f.system||e||(l="legacy-wasm"),h=!0):i&&(d=!0,l="asmjs","n64"!==f.system||e||(l="legacy-asmjs")),!0!==(d="undefined"!=typeof EJS_CUSTOM_COREFILE?EJS_CUSTOM_COREFILE:d))return void(c.innerHTML=''+f.localization("Please upgrade your browser to the latest version")+"");d=2===f.coreVer?t+"-"+l+".data":t+"-old-"+l+".data","undefined"!=typeof EJS_CUSTOM_COREFILE&&(d=EJS_CUSTOM_COREFILE),A.db?A.get(d,function(e){!e||e.version!==n||"undefined"!=typeof EJS_DEBUG_XX&&!0===EJS_DEBUG_XX?u(d,n):2===b.coreVer?L(e.data):((e=e.data.slice?e.data.slice(12):e.data.subarray(12)).set([55,122,188,175,39,28,0,3],0),L(e))}):u(d,n)}2!==f.coreVer||"undefined"!=typeof EJS_DEBUG_XX&&!0===EJS_DEBUG_XX||B.element(f.elements.buttons.gamepad)&&q(f.elements.buttons.gamepad,!0),o||B.element(f.elements.buttons.netplay)&&q(f.elements.buttons.netplay,!0),B.element(f.elements.buttons.saveState)&&q(f.elements.buttons.saveState,!a),B.element(f.elements.buttons.loadState)&&q(f.elements.buttons.loadState,!a),q(te.contextMenu.querySelectorAll("ul li").item(2),!a),q(te.contextMenu.querySelectorAll("ul li").item(3),!a),b.setStatesSupported(a)}).catch(function(e){D(e,t,b)}),clearInterval(n),Z.romdb=d)},500),!1;var t,f,n}var k=function(){d.db&&d.getAll(function(e){Array.isArray(e)&&10Failed to start game'}try{r()}catch(e){}}if(2===e.data.t){var n=e.data.file.split("/"),o=(a=n.pop()).split(".").pop(),a=a.replace(/\#/g,"");Z._FS.createPath("/",n.join("/"),!0,!0);for(var i=m[l].length-1;0<=i;--i)m[l][i]===o.toLowerCase()&&dFailed to start game'}try{r()}catch(e){}}},s=function(){var t=p,n=Z.loading.querySelector(".".concat(T.p3)),e=p.config,o=(e.gameId,e.gameUrl),a=e.system,e=("vbanext"==a&&(a="gba"),o.split("/")),l=e[e.length-1];(l=-1')),!t)return!0;for(var n in t)He(n);return!0}),playerName:"",players:[],waitingList:{},roomMaster:null,inputsData:{},coreOptionData:{},currentFrame:0,wait:!(He=function(e){if(!document.getElementById(e))return!1}),progressHelper:{},icons:{lock:''},disableInput:!1,disableControl:function(e){if(e){for(var t=0;t<24;t+=1)b.simulateInputFn(0,t,0),b.simulateInputFn(1,t,0),b.simulateInputFn(2,t,0),b.simulateInputFn(3,t,0);b.disableInput=!0}else b.disableInput=!1},loadRoomsListTimer:null,loadRoomsList:function(){},stopLoadRooms:function(){b.loadRoomsListTimer&&clearTimeout(b.loadRoomsListTimer)},openRoom:function(){},isPaused:null,setVolume:null,setVariable:null,simulateInput:null,simulateInputFn:null,toggleShader:null,saveState:null,screenRecord:null,loadState:null,quickSaveState:null,quickLoadState:null,changeStateSlot:null,getScreenData:null,getStateInfo:null,setCheat:null,resetCheat:null,getGameCoreOptions:null,classNames:{"dialog-container":V({"dialog-container":!0}),tabs:V({tabs:!0}),"dialog-title":V({"dialog-title":!0}),"dialog-content":V({"dialog-content":!0}),"dialog-buttons":V({"dialog-buttons":!0}),overlay:V({overlay:!0}),"key-setting-popup":V({"key-setting-popup":!0}),"tabs-panel":V({"tabs-panel":!0}),"tabs-content":V({"tabs-content":!0}),"button-container":V({"button-container":!0}),set:V({set:!0}),active:V({active:!0}),"btn-cancel":V({"btn-cancel":!0}),"btn-reset":V({"btn-reset":!0}),"btn-clear":V({"btn-clear":!0}),"btn-create":V({"btn-create":!0}),"btn-submit":V({"btn-submit":!0}),"btn-join-room":V({"btn-join-room":!0}),"btn-quit":V({"btn-quit":!0}),"btn-create-room":V({"btn-create-room":!0}),"netplay-player-name":V({"netplay-player-name":!0}),"netplay-roomlist":V({"netplay-roomlist":!0}),"netplay-room-name-input":V({"netplay-room-name-input":!0}),"netplay-room-password-input":V({"netplay-room-password-input":!0}),"netplay-create-room-set":V({"netplay-create-room-set":!0}),"netplay-room":V({"netplay-room":!0}),modal:V({modal:!0}),modal__overlay:V({modal__overlay:!0}),modal__container:V({modal__container:!0}),modal__header:V({modal__header:!0}),modal__title:V({modal__title:!0}),modal__close:V({modal__close:!0}),modal__content:V({modal__content:!0}),modal__btn:V({modal__btn:!0}),"modal__btn-primary":V({"modal__btn-primary":!0}),"micromodal-slide":V({"micromodal-slide":!0}),modal__errmsg:V({modal__errmsg:!0}),modal__footer:V({modal__footer:!0}),"cheats-add":V({"cheats-add":!0}),"cheats-list":V({"cheats-list":!0}),"cheat-code-input":V({"cheat-code-input":!0}),"cheat-name-input":V({"cheat-name-input":!0}),"ejs-switch":V({"ejs-switch":!0}),"ejs-delete-cheat":V({"ejs-delete-cheat":!0})},initShaders:function(){for(var e,t=ye,n=Object.keys(t),o=0;o\n
\n

'+s.localization("Control Settings")+'

\n
\n \n \n
\n
\n \n
\n
\n \n \n \n ",'\n ')),n='\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
');i="nes"===s.system?{0:"B",2:"SELECT",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",24:s.localization("QUICK SAVE STATE"),25:s.localization("QUICK LOAD STATE"),26:s.localization("CHANGE STATE SLOT")}:"snes"===s.system?{0:"B",1:"Y",2:"SELECT",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",9:"X",10:"L",11:"R",24:s.localization("QUICK SAVE STATE"),25:s.localization("QUICK LOAD STATE"),26:s.localization("CHANGE STATE SLOT")}:"n64"===s.system?{0:"B",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",10:"L",11:"R",12:"Z",19:"L STICK UP",18:"L STICK DOWN",17:"L STICK LEFT",16:"L STICK RIGHT",23:"R STICK UP",22:"R STICK DOWN",21:"R STICK LEFT",20:"R STICK RIGHT",24:s.localization("QUICK SAVE STATE"),25:s.localization("QUICK LOAD STATE"),26:s.localization("CHANGE STATE SLOT")}:"nds"===s.system?{0:"B",1:"Y",2:"SELECT",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",9:"X",10:"L",11:"R",14:"Microphone",24:s.localization("QUICK SAVE STATE"),25:s.localization("QUICK LOAD STATE"),26:s.localization("CHANGE STATE SLOT")}:{0:"B",1:"Y",2:"SELECT",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",9:"X",10:"L",11:"R",12:"L2",13:"R2",14:"L3",15:"R3",19:"L STICK UP",18:"L STICK DOWN",17:"L STICK LEFT",16:"L STICK RIGHT",23:"R STICK UP",22:"R STICK DOWN",21:"R STICK LEFT",20:"R STICK RIGHT",24:s.localization("QUICK SAVE STATE"),25:s.localization("QUICK LOAD STATE"),26:s.localization("CHANGE STATE SLOT")},["arcade","mame"].includes(s.system)&&(i[2]=s.localization("INSERT COIN")),!1===s.statesSupported&&(delete i[24],delete i[25],delete i[26]);for(var o=[2,3,4,5,6,7,8,0,9,1,10,11,12,13,14,15,19,18,17,16,23,22,21,20,24,25,26],t=0;t<=3;t+=1)!function(t){s.elements.dialogs.gamepad.querySelector(".".concat(b.classNames["tabs-content"])).innerHTML+=e.replace(/{index}/g,t),o.forEach(function(e){i[e]&&(s.elements.dialogs.gamepad.querySelector("#controls-".concat(t)).innerHTML+=n.replace(/{index}/g,t).replace(/{id}/g,e).replace(/{label}/g,i[e]))}),s.elements.dialogs.gamepad.querySelector('[data-id="16"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="16"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="17"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="17"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="18"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="18"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="19"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="19"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="20"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="20"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="21"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="21"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="22"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="22"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc"),s.elements.dialogs.gamepad.querySelector('[data-id="23"][data-index="'.concat(t,'"][data-type="2"]'))&&(s.elements.dialogs.gamepad.querySelector('[data-id="23"][data-index="'.concat(t,'"][data-type="2"]')).style.backgroundColor="#ccc")}(t);Object.keys(b.controllers).forEach(function(o){b.controllers[o]&&Object.keys(b.controllers[o]).forEach(function(e){var t=s.elements.dialogs.gamepad.querySelector('[data-id="'.concat(e,'"][data-index="').concat(o,'"][data-type="1"]')),n=s.elements.dialogs.gamepad.querySelector('[data-id="'.concat(e,'"][data-index="').concat(o,'"][data-type="2"]'));if(!t||!n)return!1;e=b.controllers[o][e];e&&(e.type&&1!==parseInt(e.type,10)?n.value="":e.value&&(t.value=b.keyMap[e.value]||"",t.setAttribute("data-value",e.value)),e.value2&&(n.value=isNaN(e.value2)?e.value2:"button ".concat(parseInt(e.value2,10)+1),n.setAttribute("data-value",e.value2)))})}),z.call(this,s.elements.dialogs.gamepad.querySelector(".".concat(b.classNames["btn-submit"])),"click",function(e){var t=s.elements.dialogs.gamepad.querySelectorAll("input"),a={};return Array.from(t).forEach(function(e){var t,n=e.getAttribute("data-index"),o=e.getAttribute("data-value"),e=(2===parseInt(e.getAttribute("data-type"),10)&&(t=e.getAttribute("data-value")),e.getAttribute("data-id"));a[n]||(a[n]={}),a[n][e]||(a[n][e]={}),o&&(a[n][e].value=o),t&&(a[n][e].value2=t)}),te.storage.set({controllers:a}),b.controllers=a,q(s.elements.dialogs.gamepad,!0),s.elements.container.focus(),e.stopPropagation(),!1}),z.call(this,s.elements.dialogs.gamepad.querySelector(".".concat(b.classNames["btn-reset"])),"click",function(e){b.controllers=JSON.parse(JSON.stringify(b.defaultControllers)),localStorage.removeItem(te.storage.key);for(var t=s.elements.dialogs.gamepad.querySelectorAll("input"),n=0;n
"+s.localization("Press keyboard or gamepad")+"
"+s.localization("Press escape (esc) to clear")):t+="
Press keyboard
"+s.localization("Press escape (esc) to clear"),r.querySelector(".".concat(b.classNames["key-setting-popup"])).innerHTML=t,e.stopPropagation()})})},setCacheDialog:function(){var t=this;t.elements.dialogs.cache.innerHTML='\n
\n
\n

'+t.localization("Cache Manager")+'

\n
\n
\n\n
\n \n
\n "),z.call(this,t.elements.dialogs.cache.querySelector(".".concat(b.classNames["btn-cancel"])),"click",function(e){return q(t.elements.dialogs.cache,!0),t.elements.container.focus(),e.stopPropagation(),!1}),z.call(this,t.elements.dialogs.cache.querySelector(".".concat(b.classNames["dialog-title"]," a")),"click",function(e){return m.romdb&&(m.romdb.clear(),t.elements.dialogs.cache.querySelector(".".concat(b.classNames["dialog-content"])).innerHTML='
'+t.localization("Empty")+"
"),e.stopPropagation(),!1})},showLoading:function(e){g.show("modal-6ed698f3d04061f5",{closeByEsckey:!1}),e&&console.log(""),q(this.elements.dialogs.loading,!1)},hideLoading:function(){g.close(),q(this.elements.dialogs.loading,!0)},setLoadingDialog:function(){this.elements.dialogs.loading&&(this.elements.dialogs.loading.innerHTML='\n "))},setCheatDialog:function(){var i,r,o,s=this;s.elements.dialogs.cheat&&(s.elements.dialogs.cheat.innerHTML='\n
\n
\n

Cheats

\n
\n
\n
\n \n
\n
\n \n
\n\n \n\n \n "),i=s.elements.dialogs.cheat.querySelector("#modal-85cd7a1c543a484b"),z.call(this,s.elements.dialogs.cheat.querySelector(".".concat(b.classNames["cheats-add"])),"click",function(e){return g.show("modal-85cd7a1c543a484b",{closeTrigger:"data-modal-close"}),!1}),r=s.elements.dialogs.cheat.querySelector(".".concat(b.classNames["cheats-list"])),z.call(this,i.querySelector(".".concat(b.classNames["modal__btn-primary"])),"click",function(e){var t,n,o=i.querySelector(".".concat(b.classNames["cheat-name-input"])).value,a=i.querySelector(".".concat(b.classNames["cheat-code-input"])).value;return o&&a&&(t=r.querySelectorAll("input:checked"),i.querySelector(".".concat(b.classNames["cheat-name-input"])).value="",i.querySelector(".".concat(b.classNames["cheat-code-input"])).value="",g.close(),n=s.cheats.length,s.cheats.push([o,a]),r.innerHTML+='
\n \n \n ×\n
'),t.forEach(function(e,t){r.querySelector("#ejs-cheat-switch-".concat(t)).setAttribute("checked","checked")})),"localStorage"in window&&localStorage.setItem("".concat(s.system,"-").concat(s.startName,"-cheats"),JSON.stringify(s.cheats)),e.stopPropagation(),!1}),o=function(){if("localStorage"in window){var e=localStorage.getItem("".concat(s.system,"-").concat(s.startName,"-cheats"));try{e=JSON.parse(e)}catch(e){}e&&(s.cheats=e)}r.innerHTML="",s.cheats&&Array.isArray(s.cheats)&&s.cheats.forEach(function(e,t){var n=e[0];e[1],r.innerHTML+='
\n \n \n ×\n
')})},z.call(s,r,"click",function(e){var t,n;return e.target&&e.target.classList.contains(b.classNames["ejs-delete-cheat"])&&e.target.getAttribute("data-idx")&&(t=e.target.getAttribute("data-idx"),s.cheats.splice(t,1),"localStorage"in window&&localStorage.setItem("".concat(s.system,"-").concat(s.startName,"-cheats"),JSON.stringify(s.cheats)),n=[],r.querySelectorAll("input").forEach(function(e,t){n[t]=!!r.querySelector("#ejs-cheat-switch-".concat(t,":checked"))}),n.splice(t,1),o(),n.forEach(function(e,t){e&&r.querySelector("#ejs-cheat-switch-".concat(t)).setAttribute("checked","checked")})),e.stopPropagation(),!1}),z.call(s,s.elements.container,"start-game",function(e){o()}),z.call(this,s.elements.dialogs.cheat.querySelector(".".concat(b.classNames["btn-cancel"])),"click",function(e){return q(s.elements.dialogs.cheat,!0),e.stopPropagation(),s.elements.container.focus(),!1}),z.call(this,s.elements.dialogs.cheat.querySelector(".".concat(b.classNames["btn-submit"])),"click",function(e){return b.resetCheat(),r.querySelectorAll("input:checked").forEach(function(e,t){e=s.cheats[e.value];e&&b.setCheat(t,1,e[1])}),q(s.elements.dialogs.cheat,!0),s.elements.container.focus(),!1}),"arcade"!==s.system&&"mame"!==s.system&&"mame2003"!==s.system&&"mame2010"!==s.system||(B.element(s.elements.buttons.cheat)&&q(s.elements.buttons.cheat,!0),b.allowCheat=!1),b.setCheat||(q(s.elements.buttons.cheat,!0),b.allowCheat=!1))},setNetplayDialog:function(){var n,i,o,a,l,s,c,d,e,r,u,f,p=this,h=this;h.elements.dialogs.netplay&&(h.elements.dialogs.netplay.innerHTML='\n
\n
\n

'+h.localization("Netplay")+'

\n
\n
\n \n\n \n
\n \n
\n\n \n \n \n \n \n \n \n \n \n \n '),z.call(this,h.elements.dialogs.netplay.querySelector(".".concat(b.classNames["btn-cancel"])),"click",function(e){return q(h.elements.dialogs.netplay,!0),b.disableControl(!1),b.stopLoadRooms(),e.stopPropagation(),h.elements.container.focus(),!1}),window.setInterval(function(){var o="
    ";b.players.forEach(function(e,t){var n=null;e?(b.connection.peers[e]?n=b.connection.peers[e].extra:b.connection.userid===e&&(n=b.connection.extra),o+="
  • ".concat(t+1,". ").concat(n.name,"
  • ")):o+="
  • ".concat(t+1,".
  • ")}),o+="
",h.elements.widgets.netplay.innerHTML=o},500),n=h.elements.dialogs.netplay.querySelector("#modal-9de6c4e9ce2b9361"),i=h.elements.dialogs.netplay.querySelector("#modal-85cd7a1c543a484a"),o=h.elements.dialogs.netplay.querySelector("#modal-7d8fd50ed642340b"),a=h.elements.dialogs.netplay.querySelector("#modal-5aa765d61d8327de"),l={},b.connection=new De.a,(e=p.socketUrl).endsWith("/")||(e+="/"),b.connection.socketURL="/",b.connection.socketURL=e,b.connection.socketMessageEvent="emulatorjs-message",b.connection.socketCustomEvent="emulatorjs-custom-message",e=W.info(),b.connection.extra={name:b.playerName,game_id:h.config.gameId,browser_name:e.name,room_name:" ",domain:document.domain},b.connection.socketMessageEvent="netplay",b.connection.enableFileSharing=!0,b.connection.enableLogs=!1,b.connection.session={data:!0},b.connection.sdpConstraints.mandatory={OfferToReceiveAudio:!1,OfferToReceiveVideo:!1},b.connection.onclose=function(e){},b.connection.iceServers=[{urls:"turn:turn.emulatorjs.com:3478",credential:"dSnmrtehverella",username:"ejs"},{urls:["stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302","stun:stun.l.google.com:19302?transport=udp"]}],b.connection.maxParticipantsAllowed=4,s=b.netPlayInitFrame=0,c=!1,Module.postMainLoop=function(){var e,t;if(b.currentFrame=parseInt(b.currentFrameNum(),10),b.connected)if(s+=1,b.connection.isInitiator)if(1<=s){for(var n=[],o=b.currentFrame-1;ob.currentFrame){console.log("lost",b.currentFrame),a=!0;break}a?b.wait||(!c||c<(new Date).valueOf()-3e3)&&(b.inputsData={},c=(new Date).valueOf(),b.connection.send(JSON.stringify({act:"sync-mem",value:b.connection.userid}),b.roomMaster)):(b.wait=!0,b.systemPause(1),m.Module.pauseMainLoop())}b.currentFrame%100==0&&Object.keys(b.inputsData).forEach(function(e,t){e>0;"reset"===t[0]?(n=0,b.connection.isInitiator?(b.systemPause(0),b.disableControl(!1),h.playing=!0,m.Module.resumeMainLoop()):J.a.get(e.url,{responseType:"arraybuffer"}).then(function(e){b.inputsData={};e=new Uint8Array(e.data);b.loadState(e,n),b.wait=!1,b.systemPause(0),b.disableInput=!1,h.playing=!0,m.Module.resumeMainLoop()})):"game.state"===t[1]&&(b.connection.isInitiator?(b.openRoom(h),b.wait=!1,b.systemPause(0),m.Module.resumeMainLoop()):(b.netPlayInitFrame=n,J.a.get(e.url,{responseType:"arraybuffer"}).then(function(e){e=new Uint8Array(e.data);b.loadState(e,n),b.wait=!1,b.disableInput=!1,b.connection.send(JSON.stringify({act:"wait-end",value:b.connection.userid})),b.hideLoading.call(h),h.playing=!0,m.Module.resumeMainLoop()}))),b.connection.isInitiator||console.log("recv mem end",b.currentFrame,e.name)}),b.connection.onmessage=function(e){var t,r,n,e=e.data||e;try{t=JSON.parse(e)}catch(e){t=null}if(t){if("room-master"===t.act&&(b.roomMaster=t.value),t.act,"short-pause"!==t.act||d||(b.systemPause(1),m.Module.pauseMainLoop(),d=!0,b.wait=!0,setTimeout(function(){b.systemPause(0),m.Module.resumeMainLoop(),b.wait=!1,d=!1},48)),"sync-control"===t.act&&(e=t.value,h.playing||b.wait,r=b.connection.userid,b.players.indexOf(r),b.connection.isInitiator,e.forEach(function(e,t){var e=e.split("|"),n=e[0]>>0,o=e[1]>>0,a=e[2]>>0,e=e[3]>>0,i=b.currentFrame;b.inputsData[e]||(b.inputsData[e]=[]),-1!=n&&e===i&&b.simulateInputFn(n,o,a),b.connection.isInitiator?0<=n&&(b.inputsData[i]||(b.inputsData[i]=[]),-2!=o&&(b.inputsData[i].push({index:n,key:o,status:a,frame:i}),b.simulateInputFn(n,o,a)),d||e<=i-10&&(b.systemPause(1),m.Module.pauseMainLoop(),d=!0,b.wait=!0,setTimeout(function(){b.systemPause(0),m.Module.resumeMainLoop(),b.wait=!1,d=!1},48))):(""!==n&&b.inputsData[e].push({index:n,key:o,status:a,frame:e}),b.inputsData[b.currentFrame]&&m.Module.resumeMainLoop(),i+10<=e&&e>b.netPlayInitFrame+100&&b.connection.send(JSON.stringify({act:"short-pause",value:r}),b.roomMaster))})),t.act,t.act,"update-core-option"!==t.act||b.connection.isInitiator||(b.coreOptionData[t.frame]={key:t.key,value:t.value}),"restart-game"===t.act&&(b.inputsData={},b.connection.send(JSON.stringify({act:"sync-mem",value:b.connection.userid}),b.roomMaster)),"pause"===t.act&&m.Module.pauseMainLoop(),"resume"===t.act&&m.Module.resumeMainLoop(),"wait"===t.act&&(b.wait=!0,b.systemPause(1),t.value!==b.connection.userid&&(b.waitingList[t.value]=1),b.disableControl(!0)),"wait-end"===t.act&&(b.waitingList[t.value]&&delete b.waitingList[t.value],0===Object.keys(b.waitingList).length&&(b.wait=!1,b.systemPause(0),b.disableInput=!1)),"sync-mem"===t.act){b.wait=!0,b.systemPause(1);e=t.value;b.disableControl(!0),b.connection.send(JSON.stringify({act:"wait",value:e}));for(var o=b.getStateInfo().split("|"),a=o[0]>>0,i=new Uint8Array(a),s=o[1]>>0,c=0;cJoin'):"",a=t.country||"?";n.innerHTML="[".concat(a,"] ").concat(o," ").concat(t.room_name,"").concat(t.current,"/").concat(t.max,"").concat(e,""),z.call(p,n.querySelector(".".concat(b.classNames["btn-join-room"])),"click",f),c.appendChild(n)}),c.querySelectorAll("tr").forEach(function(e){r.includes(e.id)||c.removeChild(e)})),b.loadRoomsListTimer=setTimeout(b.loadRoomsList,2e3)}).catch(function(e){console.log("Network Error",e),b.loadRoomsListTimer=setTimeout(b.loadRoomsList,2e3)})},b.openRoom=function(e){b.stopLoadRooms(),q(e.elements.dialogs.netplay.querySelector(".".concat(b.classNames["netplay-roomlist"])),!0),q(e.elements.dialogs.netplay.querySelector(".".concat(b.classNames["netplay-room"])),!1),q(e.elements.dialogs.netplay.querySelector(".".concat(b.classNames["btn-create-room"])),!0),q(e.elements.dialogs.netplay.querySelector(".".concat(b.classNames["btn-quit"])),!1),b.resetCheat(),q(e.elements.buttons.cheat,!0);var e=e.elements.dialogs.netplay.querySelector(".".concat(b.classNames["netplay-room"])),t=e.querySelector("[data-room-password]"),o=(null===b.connection.password?q(t,!0):(q(t,!1),t.querySelector("span").innerText=b.connection.password),e.querySelector("tbody"));o.innerHTML="",e.querySelector("strong").innerText=l.room_name,b.players.forEach(function(e,t){var n=null;e&&(b.connection.peers[e]?n=b.connection.peers[e].extra:b.connection.userid===e&&(n=b.connection.extra),n&&n.name)&&((e=document.createElement("tr")).innerHTML="".concat(t+1,"").concat(n.name,""),o.appendChild(e))})},z.call(this,a.querySelector(".".concat(b.classNames["modal__btn-primary"])),"click",function(e){var t=a.querySelector(".".concat(b.classNames["netplay-room-password-input"])).value,t=(b.showLoading.call(h),b.connection.password=t,a.getAttribute("data-id"));b.connection.join(t,function(e,t,n){u(e,0,n),e&&a.classList.remove(V({"is-open":!0}))}),e.stopPropagation()}),z.call(this,n.querySelector(".".concat(b.classNames["modal__btn-primary"])),"click",function(e){var t=(t=n.querySelector(".".concat(b.classNames["netplay-player-name"])).value).replace(/<|>/g,"");n.querySelector(".".concat(b.classNames.modal__errmsg)).innerHTML="",t.trim()&&(b.playerName=t.trim(),b.connection.extra.name=t.trim(),g.close()),e.stopPropagation()}),z.call(this,i.querySelector(".".concat(b.classNames["modal__btn-primary"])),"click",function(e){var t=(t=i.querySelector(".".concat(b.classNames["netplay-room-name-input"])).value).replace(/<|>/g,""),n=i.querySelector("select[data-max-players] option:checked").value;4<(n=n<2?2:n)&&(n=4);for(var o=0;o')+('
'),!0===n.LandR&&(a="n64"===t.system?(a=(a+='
L
')+'
Z
')+'
R
':(a+='
L
')+'
R
'),a=(a=(a+="
")+('
'))+('
'),a="n64"===t.system?(a+='
'+t.localization("Menu")+"
")+'
'+t.localization("Start")+"
":(a=(a+='
'+t.localization("Start")+"
")+'
'+t.localization("Menu")+"
")+'
'+t.localization("Select")+"
",a=(a+="
")+('
'),"n64"===t.system&&(a=(a=(a=(a+='
')+'
')+'
')+'
');for(var i=0;i'+n.order[i]+"
"}b.virtualGamepadContainer.innerHTML=a+="",q(b.virtualGamepadContainer,!e);o=be.a.create({zone:G.call(this,".".concat(V({"ejs-virtual-gamepad":!0})," .").concat(V({left:!0}))),mode:"static",position:{left:"50%",top:"50%"},color:"red"});function s(){var e;return"n64"!==t.system||"d-pad"===(e=te&&"function"==typeof te.getCoreOptionsValues?te.getCoreOptionsValues()["joystick-input"]:e)?{downVal:1,4:4,5:5,6:6,7:7}:{downVal:32767,4:19,5:18,6:17,7:16}}o.on("end",function(e,t){b.syncInput(0,s()[4],0),b.syncInput(0,s()[5],0),b.syncInput(0,s()[6],0),b.syncInput(0,s()[7],0)}),o.on("move",function(e,t){t=t.angle.degree;30<=t&&t<150?b.syncInput(0,s()[4],s().downVal):window.setTimeout(function(){b.syncInput(0,s()[4],0)},30),210<=t&&t<330?b.syncInput(0,s()[5],s().downVal):window.setTimeout(function(){b.syncInput(0,s()[5],0)},30),120<=t&&t<240?b.syncInput(0,s()[6],s().downVal):window.setTimeout(function(){b.syncInput(0,s()[6],0)},30),300<=t||0<=t&&t<60?b.syncInput(0,s()[7],s().downVal):window.setTimeout(function(){b.syncInput(0,s()[7],0)},30)});var c,l=V({"virtual-gamepad":!0}),d=V({touch:!0});W.isIos||z.call(this,G.call(this,".".concat(l)),"touchmove",function(e){e.stopPropagation()}),[{id:{b_a:!0},number:8},{id:{b_b:!0},number:0},{id:{b_x:!0},number:9},{id:{b_y:!0},number:1},{id:{b_l:!0},number:10},{id:{b_z:!0},number:12},{id:{b_r:!0},number:11},{id:{b_start:!0},number:3},{id:{b_select:!0},number:2},{id:{b_cu:!0},number:23},{id:{b_cd:!0},number:22},{id:{b_cl:!0},number:21},{id:{b_cr:!0},number:20}].forEach(t=>{z.call(this,G.call(this,".".concat(l," .").concat(V(t.id))),"touchstart touchend mousedown mouseup mouseout",function(e){["touchend","mouseup","mouseout"].includes(e.type)?(H(e.target,d,!1),window.setTimeout(function(){b.syncInput(0,t.number,0)},30)):(H(e.target,d,!0),b.syncInput(0,t.number,1)),e.stopPropagation()})}),z.call(this,G.call(this,".".concat(l," .").concat(V({b_c:!0}))),"touchstart touchend mousedown mouseup mouseout",function(e){["touchend","mouseup","mouseout"].includes(e.type)?H(e.target,d,!1):(H(e.target,d,!0),clearTimeout(c),K.toggleControls.call(t,!0),c=setTimeout(function(){K.toggleControls.call(t,!1)},5e3))})}else q(b.virtualGamepadContainer,!e)},setup:function(){var e,t,n,o=this;this.game?(b.playerName=o.config.playerName,H(this.elements.container,this.config.classNames.type,!0),this.elements.container.setAttribute("tabindex","0"),this.color&&(e=function(e){var t=e.toLowerCase();if(t&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)){if(4===t.length){for(var n="#",o=1;o<4;o+=1)n+=t.slice(o,o+1).concat(t.slice(o,o+1));t=n}for(var a=[],i=1;i<7;i+=2)a.push(parseInt("0x".concat(t.slice(i,i+2)),16));return a}return null}(this.color))&&this.elements.container.setAttribute("style","--ejs-primary-color: ".concat(e[0],", ").concat(e[1],", ").concat(e[2])),this.elements.wrapper=F("div",{class:this.config.classNames.video}),j(this.game,this.elements.wrapper),"video"!==o.game.tagName.toLocaleLowerCase()&&(t=this.config.volume,Object.defineProperty(o.game,"volume",{get:function(){return t},set:function(e){t=e,U.call(o,o.game,"volumechange")}}),n=o.storage.get("muted"),Object.defineProperty(o.game,"muted",{get:function(){return n},set:function(e){e=!!B.boolean(e)&&e;n=e,U.call(o,o.game,"volumechange")}})),window.addEventListener("beforeunload",function(e){if(o.started){var t=o.startName.split("/").pop().split("."),t=t.slice(0,t.length-1).join(".");m.FS.syncfs(function(e){});try{var n="srm";"nds"===o.system&&(n="dsv"),m.FS.unlink("/data/saves/".concat(t,".").concat(n))}catch(e){console.log("fail to save")}b.saveSavFiles(),m.FS.syncfs(function(e){})}},!0)):console.warn("No game element found!")},listeners:function(){var r=this;r.elements.buttons.restart&&z.call(r,r.elements.buttons.restart,"click",function(e){if(b.restartGame(),b.inputsData={},b.connected&&b.connection.isInitiator){for(var t=b.getStateInfo().split("|"),n=t[0]>>0,o=(t[2],new Uint8Array(n)),a=t[1]>>0,i=0;i>0==0&&(c[t]!==n&&(o?(b.inputsData[i]||(b.inputsData[i]=[]),b.inputsData[i].push({index:a,key:t,status:n,frame:i}),b.simulateInputFn(a,t,n)):b.connection.send(JSON.stringify({act:"sync-control",value:["".concat(a,"|").concat(t,"|").concat(n,"|").concat(i)]}),b.roomMaster)),c[t]=n)):b.disableInput||b.simulateInputFn(e,t,n)},b.syncInput=b.simulateInput,window.simulateInput=b.simulateInput,m.Module.cwrap("shader_enable","null",["number"])),l=(b.toggleShader=function(e){return n(e)},b.getStateInfo=m.Module.cwrap("get_state_info","string",[]),b.saveState=function(){var e=b.getStateInfo().split("|"),t=e[0]>>0;if(0>0,a=0;a>0,o=(e[2],new Uint8Array(n)),a=e[1]>>0,i=0;i".concat(this.icons[e],"");for(var o=t.childNodes[0].childNodes,a=0;a",""]),i=[];function n(e,t,n){"function"==typeof n?i.push(n):i.push(function(){});n=a.length-1;t?a.splice(n,0,'"):a.splice(n,0,'
  • '+e+"
  • ")}n(o.localization("Take Screenshot"),!1,function(e){var t=b.getScreenData(),n=(n="string"==typeof o.gameName?o.gameName:n)?"".concat(n,"-screenshot.png"):"game.png";return ge()(new Blob([t]),n),!1}),n(o.localization("Cache Manage"),!0,function(e){var n;return m.romdb&&(q(o.elements.dialogs.cache,!1),(n=o.elements.dialogs.cache.querySelector(".".concat(b.classNames["dialog-content"]))).innerHTML="
    "+o.localization("Loading")+"
    ",m.romdb.getAll(function(e){var t,l;e?(t=F("table",{style:"width:100%;padding-left:10px;text-align:left"}),l=F("tbody"),0"):n.innerHTML='
    '+o.localization("Empty")+"
    "},function(){})),!1}),n(o.localization("Quick Save")+" (F2)",!1,function(e){b.quickSaveState(),te.contextMenu.style.display="none"}),n(o.localization("Quick Load")+" (F4)",!1,function(e){b.quickLoadState(),te.contextMenu.style.display="none"}),h.contextMenu.innerHTML=a.join("");for(var r=h.contextMenu.getElementsByTagName("li"),s=0;s',"exit-fullscreen":'',gamepad:'',"load-state":'',muted:'',netplay:'',pause:'',play:'',restart:'',"save-state":'',"screen-record":'',settings:'',volume:'\n \n ',cheat:''},this.id=Math.floor(1e4*Math.random()),null),t=(this.elements.controls=null,{id:this.id}),o=!0;B.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this.props)),this.config.controls||(this.config.controls=[]),B.element(this.config.controls)||B.string(this.config.controls)?e=this.config.controls:(e=h.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality}),o=!1);function a(e){var n=e;return Object.entries(t).forEach(function(e){t=2;var e=function(e){if(Array.isArray(e))return e}(e=e)||function(e,t){var n=[],o=!0,a=!1,i=void 0;try{for(var r,s=e[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);o=!0);}catch(e){a=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}(),t=e[0],e=e[1];n=le(n,"{".concat(t,"}"),e)}),n}var i,r;o&&(B.string(this.config.controls)?e=a(e):B.element(e)&&(e.innerHTML=a(e.innerHTML))),B.string(this.config.selectors.controls.container)&&(i=document.querySelector(this.config.selectors.controls.container)),(i=B.element(i)?i:this.elements.container)[B.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),B.element(this.elements.controls)||h.findElements.call(this),B.empty(this.elements.buttons)||(r=function(e){var t=n.config.classNames.controlPressed;Object.defineProperty(e,"pressed",{enumerable:!0,get:function(){return L(e,t)},set:function(){H(e,t,0Math.abs(n)?o:n),n=(i.increaseVolume(o/50),i.game.volume);(1===o&&n<1||-1===o&&0>10|55296,1023&e|56320))}function D(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}function B(){_()}var e,f,w,i,z,p,U,F,x,c,l,_,T,n,S,h,o,a,m,C="sizzle"+ +new Date,d=L.document,E=0,q=0,H=R(),G=R(),V=R(),g=R(),W=function(e,t){return e===t&&(l=!0),0},X={}.hasOwnProperty,t=[],Y=t.pop,J=t.push,A=t.push,K=t.slice,y=function(e,t){for(var n=0,o=e.length;n+~]|"+r+")"+r+"*"),oe=new RegExp(r+"|>"),ae=new RegExp(Z),ie=new RegExp("^"+s+"$"),v={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),TAG:new RegExp("^("+s+"|[*])"),ATTR:new RegExp("^"+Q),PSEUDO:new RegExp("^"+Z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),bool:new RegExp("^(?:"+$+")$","i"),needsContext:new RegExp("^"+r+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+r+"*((?:-\\d)?\\d*)"+r+"*\\)|)(?=[^-]|$)","i")},re=/HTML$/i,se=/^(?:input|select|textarea|button)$/i,ce=/^h\d$/i,k=/^[^{]+\{\s*\[native \w/,le=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,de=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+r+"?|\\\\([^\\r\\n\\f])","g"),ue=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,fe=ye(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{A.apply(t=K.call(d.childNodes),d.childNodes),t[d.childNodes.length].nodeType}catch(e){A={apply:t.length?function(e,t){J.apply(e,K.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}function M(e,t,n,o){var a,i,r,s,c,l,d=t&&t.ownerDocument,u=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==u&&9!==u&&11!==u)return n;if(!o&&(_(t),t=t||T,S)){if(11!==u&&(s=le.exec(e)))if(a=s[1]){if(9===u){if(!(l=t.getElementById(a)))return n;if(l.id===a)return n.push(l),n}else if(d&&(l=d.getElementById(a))&&m(t,l)&&l.id===a)return n.push(l),n}else{if(s[2])return A.apply(n,t.getElementsByTagName(e)),n;if((a=s[3])&&f.getElementsByClassName&&t.getElementsByClassName)return A.apply(n,t.getElementsByClassName(a)),n}if(f.qsa&&!g[e+" "]&&(!h||!h.test(e))&&(1!==u||"object"!==t.nodeName.toLowerCase())){if(l=e,d=t,1===u&&(oe.test(e)||ne.test(e))){for((d=de.test(e)&&ge(t.parentNode)||t)===t&&f.scope||((r=t.getAttribute("id"))?r=r.replace(ue,D):t.setAttribute("id",r=C)),i=(c=p(e)).length;i--;)c[i]=(r?"#"+r:":scope")+" "+I(c[i]);l=c.join(",")}try{return A.apply(n,d.querySelectorAll(l)),n}catch(t){g(e,!0)}finally{r===C&&t.removeAttribute("id")}}}return F(e.replace(b,"$1"),t,n,o)}function R(){var o=[];return function e(t,n){return o.push(t+" ")>w.cacheLength&&delete e[o.shift()],e[t+" "]=n}}function j(e){return e[C]=!0,e}function P(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function pe(e,t){for(var n=e.split("|"),o=n.length;o--;)w.attrHandle[n[o]]=t}function he(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function me(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&fe(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function N(r){return j(function(i){return i=+i,j(function(e,t){for(var n,o=r([],e.length,i),a=o.length;a--;)e[n=o[a]]&&(e[n]=!(t[n]=e[n]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in f=M.support={},z=M.isXML=function(e){var t=e&&e.namespaceURI,e=e&&(e.ownerDocument||e).documentElement;return!re.test(t||e&&e.nodeName||"HTML")},_=M.setDocument=function(e){var e=e?e.ownerDocument||e:d;return e!=T&&9===e.nodeType&&e.documentElement&&(n=(T=e).documentElement,S=!z(T),d!=T&&(e=T.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",B,!1):e.attachEvent&&e.attachEvent("onunload",B)),f.scope=P(function(e){return n.appendChild(e).appendChild(T.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),f.attributes=P(function(e){return e.className="i",!e.getAttribute("className")}),f.getElementsByTagName=P(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),f.getElementsByClassName=k.test(T.getElementsByClassName),f.getById=P(function(e){return n.appendChild(e).id=C,!T.getElementsByName||!T.getElementsByName(C).length}),f.getById?(w.filter.ID=function(e){var t=e.replace(O,u);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&S)return(t=t.getElementById(e))?[t]:[]}):(w.filter.ID=function(e){var t=e.replace(O,u);return function(e){e=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return e&&e.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n,o,a,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(a=t.getElementsByName(e),o=0;i=a[o++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),w.find.TAG=f.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):f.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,o=[],a=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[a++];)1===n.nodeType&&o.push(n);return o},w.find.CLASS=f.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},o=[],h=[],(f.qsa=k.test(T.querySelectorAll))&&(P(function(e){var t;n.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&h.push("[*^$]="+r+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||h.push("\\["+r+"*(?:value|"+$+")"),e.querySelectorAll("[id~="+C+"-]").length||h.push("~="),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||h.push("\\["+r+"*name"+r+"*="+r+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||h.push(":checked"),e.querySelectorAll("a#"+C+"+*").length||h.push(".#.+[+~]"),e.querySelectorAll("\\\f"),h.push("[\\r\\n\\f]")}),P(function(e){e.innerHTML="";var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&h.push("name"+r+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&h.push(":enabled",":disabled"),n.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(f.matchesSelector=k.test(a=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.oMatchesSelector||n.msMatchesSelector))&&P(function(e){f.disconnectedMatch=a.call(e,"*"),a.call(e,"[s!='']:x"),o.push("!=",Z)}),h=h.length&&new RegExp(h.join("|")),o=o.length&&new RegExp(o.join("|")),e=k.test(n.compareDocumentPosition),m=e||k.test(n.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,t=t&&t.parentNode;return e===t||!(!t||1!==t.nodeType||!(n.contains?n.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},W=e?function(e,t){return e===t?(l=!0,0):!e.compareDocumentPosition-!t.compareDocumentPosition||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(e)===n?e==T||e.ownerDocument==d&&m(d,e)?-1:t==T||t.ownerDocument==d&&m(d,t)?1:c?y(c,e)-y(c,t):0:4&n?-1:1);var n}:function(e,t){if(e===t)return l=!0,0;var n,o=0,a=e.parentNode,i=t.parentNode,r=[e],s=[t];if(!a||!i)return e==T?-1:t==T?1:a?-1:i?1:c?y(c,e)-y(c,t):0;if(a===i)return he(e,t);for(n=e;n=n.parentNode;)r.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;r[o]===s[o];)o++;return o?he(r[o],s[o]):r[o]==d?-1:s[o]==d?1:0}),T},M.matches=function(e,t){return M(e,null,null,t)},M.matchesSelector=function(e,t){if(_(e),f.matchesSelector&&S&&!g[t+" "]&&(!o||!o.test(t))&&(!h||!h.test(t)))try{var n=a.call(e,t);if(n||f.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){g(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,u),e[3]=(e[3]||e[4]||e[5]||"").replace(O,u),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||M.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&M.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return v.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ae.test(n)&&(t=p(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,u).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=H[e+" "];return t||(t=new RegExp("(^|"+r+")"+e+"("+r+"|$)"))&&H(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,n,o){return function(e){e=M.attr(e,t);return null==e?"!="===n:!n||(e+="","="===n?e===o:"!="===n?e!==o:"^="===n?o&&0===e.indexOf(o):"*="===n?o&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Q(e,n,o){return y(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==o}):n.nodeType?S.grep(e,function(e){return e===n!==o}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/,te=((S.fn.init=function(e,t,n){if(!e)return this;if(n=n||Z,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this);if(!(o="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:ee.exec(e))||!o[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(o[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(o[1],t&&t.nodeType?t.ownerDocument||t:T,!0)),$.test(o[1])&&S.isPlainObject(t))for(var o in t)y(this[o])?this[o](t[o]):this.attr(o,t[o]);return this}return(n=T.getElementById(o[2]))&&(this[0]=n,this.length=1),this}).prototype=S.fn,Z=S(T),/^(?:parents|prev(?:Until|All))/),ne={children:!0,contents:!0,next:!0,prev:!0};function oe(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Te=/^$|^module$|\/(?:java|ecma)script/i,n=T.createDocumentFragment().appendChild(T.createElement("div")),k=((j=T.createElement("input")).setAttribute("type","radio"),j.setAttribute("checked","checked"),j.setAttribute("name","t"),n.appendChild(j),g.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,n.innerHTML="",g.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue,n.innerHTML="",g.option=!!n.lastChild,{thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]});function O(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&c(e,t)?S.merge([e],n):n}function Se(e,t){for(var n=0,o=e.length;n",""]);var Ce=/<|&#?\w+;/;function Ee(e,t,n,o,a){for(var i,r,s,c,l,d=t.createDocumentFragment(),u=[],f=0,p=e.length;f\s*$/g;function Ne(e,t){return c(e,"table")&&c(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function De(e,t){var n,o,a,i;if(1===t.nodeType){if(w.hasData(e)&&(i=w.get(e).events))for(a in w.remove(t,"handle events"),i)for(n=0,o=i[a].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",a=function(e){o.remove(),a=null,e&&t("error"===e.type?404:200,e.type)}),T.head.appendChild(o[0])},abort:function(){a&&a()}}});var Yt=[],Jt=/(=)\?(?=&|$)|\?\?/,Kt=(S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||S.expando+"_"+At.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var o,a,i,r=!1!==e.jsonp&&(Jt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Jt.test(e.data)&&"data");if(r||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=y(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,r?e[r]=e[r].replace(Jt,"$1"+o):!1!==e.jsonp&&(e.url+=(kt.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return i||S.error(o+" was not called"),i[0]},e.dataTypes[0]="json",a=_[o],_[o]=function(){i=arguments},n.always(function(){void 0===a?S(_).removeProp(o):_[o]=a,e[o]&&(e.jsonpCallback=t.jsonpCallback,Yt.push(o)),i&&y(a)&&a(i[0]),i=a=void 0}),"script"}),g.createHTMLDocument=((e=T.implementation.createHTMLDocument("").body).innerHTML="
    ",2===e.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((o=(t=T.implementation.createHTMLDocument("")).createElement("base")).href=T.location.href,t.head.appendChild(o)):t=T),o=!n&&[],(n=$.exec(e))?[t.createElement(n[1])]:(n=Ee([e],t,o),o&&o.length&&S(o).remove(),S.merge([],n.childNodes)));var o},S.fn.load=function(e,t,n){var o,a,i,r=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(o):e)}).always(n&&function(e,t){r.each(function(){n.apply(this,i||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var o,a,i,r,s=S.css(e,"position"),c=S(e),l={};"static"===s&&(e.style.position="relative"),i=c.offset(),o=S.css(e,"top"),r=S.css(e,"left"),s=("absolute"===s||"fixed"===s)&&-1<(o+r).indexOf("auto")?(a=(s=c.position()).top,s.left):(a=parseFloat(o)||0,parseFloat(r)||0),null!=(t=y(t)?t.call(e,n,S.extend({},i)):t).top&&(l.top=t.top-i.top+a),null!=t.left&&(l.left=t.left-i.left+s),"using"in t?t.using.call(e,l):c.css(l)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),n=n.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,o=this[0],a={top:0,left:0};if("fixed"===S.css(o,"position"))t=o.getBoundingClientRect();else{for(t=this.offset(),n=o.ownerDocument,e=o.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==o&&1===e.nodeType&&((a=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),a.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-a.top-S.css(o,"marginTop",!0),left:t.left-a.left-S.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||x})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,a){var i="pageYOffset"===a;S.fn[t]=function(e){return u(this,function(e,t,n){var o;if(m(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===n)return o?o[a]:e[t];o?o.scrollTo(i?o.pageXOffset:n,i?n:o.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(g.pixelPosition,function(e,t){if(t)return t=Ke(e,n),Ye.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(r,s){S.each({padding:"inner"+r,content:s,"":"outer"+r},function(o,i){S.fn[i]=function(e,t){var n=arguments.length&&(o||"boolean"!=typeof e),a=o||(!0===e||!0===t?"margin":"border");return u(this,function(e,t,n){var o;return m(e)?0===i.indexOf("outer")?e["inner"+r]:e.document.documentElement["client"+r]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+r],o["scroll"+r],e.body["offset"+r],o["offset"+r],o["client"+r])):void 0===n?S.css(e,t,a):S.style(e,t,n,a)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,o){return this.on(t,e,n,o)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0>>24]^e[n>>>16&255]^j[g>>>8&255]^l[h&255]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j }, _0x17a9ac.prototype.setJitter = function(_0x2d4fd2) { this.jitter = _0x2d4fd2; }; -}, null, window.EJS_main]).default; +}, null, window.EJS_main]).default; \ No newline at end of file diff --git a/data/emulator.min.js b/data/emulator.min.js index b1d418a..e8de339 100644 --- a/data/emulator.min.js +++ b/data/emulator.min.js @@ -1 +1 @@ -var EJS=function(n){window.EJS_MODULES=n;var o={},i=[];function a(e){if(o[e])return o[e].exports;i.push(e);var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}return window.aba=function(){return i.sort(function(e,t){return t'+n.localization("CORS Error")+"":t.innerHTML=''+n.localization("Network Error")+""}},null,null,null,null,null,function(e,t,n){!function(e){"use strict";function o(){}function t(e){var t=this,n=window;this.update=o,this.requestAnimationFrame=e||n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame,this.tickFunction=function(){t.update(),t.startTicker()},this.startTicker=function(){t.requestAnimationFrame.apply(n,[t.tickFunction])}}function n(){}function i(e,t){this.listener=e,this.gamepadGetter=t,this.knownGamepads=[]}function a(t){this.listener=t,window.addEventListener("gamepadconnected",function(e){t._connect(e.gamepad)}),window.addEventListener("gamepaddisconnected",function(e){t._disconnect(e.gamepad)})}function l(e){this.updateStrategy=e||new t,this.gamepads=[],this.listeners={},this.platform=r,this.deadzone=.03,this.maximizeThreshold=.97}var r={getType:function(){return"null"},isSupported:function(){return!1},update:o};t.prototype.start=function(e){this.update=e||o,this.startTicker()},n.prototype.update=o,n.prototype.start=function(e){this.update=e||o},i.factory=function(e){var t=r,n=window&&window.navigator;return n&&(void 0!==n.getGamepads?t=new i(e,function(){return n.getGamepads()}):void 0!==n.webkitGamepads?t=new i(e,function(){return n.webkitGamepads()}):void 0!==n.webkitGetGamepads&&(t=new i(e,function(){return n.webkitGetGamepads()}))),t},i.getType=function(){return"WebKit"},i.prototype.getType=function(){return i.getType()},i.prototype.isSupported=function(){return!0},i.prototype.update=function(){for(var e,t=Array.prototype.slice.call(this.gamepadGetter(),0),n=this.knownGamepads.length-1;0<=n;n--)e=this.knownGamepads[n],t.indexOf(e)<0&&(this.knownGamepads.splice(n,1),this.listener._disconnect(e));for(n=0;n>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(o+i)%4*8;else if(65535>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=s.ceil(t/4)},clone:function(){var e=t.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new c.init(n,t/2)}},j=p.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],o=0;o>>2]>>>24-o%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new c.init(n,t)}},G=p.Utf8={stringify:function(e){try{return decodeURIComponent(escape(j.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return j.parse(unescape(encodeURIComponent(e)))}},q=e.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=G.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,n=t.words,o=t.sigBytes,i=this.blockSize,a=o/(4*i),a=e?s.ceil(a):s.max((0|a)-this._minBufferSize,0),o=s.min(4*(e=a*i),o);if(e){for(var r=0;r>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,r=0;r<4&&i+.75*r>>6*(3-r)&63));if(t=o.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,n=this._map;!(a=n.charAt(64))||-1!=(a=e.indexOf(a))&&(t=a);for(var o,i,a=[],r=0,s=0;s>>6-s%4*2,a[r>>>2]|=(o|i)<<24-r%4*8,r++);return H.create(a,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};var $=Math;function T(e,t,n,o,i,a,r){return((e=e+(t&n|~t&o)+i+r)<>>32-a)+t}function x(e,t,n,o,i,a,r){return((e=e+(t&o|n&~o)+i+r)<>>32-a)+t}function C(e,t,n,o,i,a,r){return((e=e+(t^n^o)+i+r)<>>32-a)+t}function E(e,t,n,o,i,a,r){return((e=e+(n^(t|~o))+i+r)<>>32-a)+t}for(var e=l,ee=(u=e.lib).WordArray,n=u.Hasher,u=e.algo,A=[],d=0;d<64;d++)A[d]=4294967296*$.abs($.sin(d+1))|0;function te(e,t,n){var o=this._iv;o?this._iv=void 0:o=this._prevBlock;for(var i=0;i>>24)|4278255360&(o<<24|o>>>8)}var n=this._hash.words,i=e[t+0],o=e[t+1],a=e[t+2],r=e[t+3],s=e[t+4],c=e[t+5],l=e[t+6],u=e[t+7],d=e[t+8],f=e[t+9],p=e[t+10],h=e[t+11],m=e[t+12],g=e[t+13],v=e[t+14],y=e[t+15],b=T(n[0],S=n[1],_=n[2],w=n[3],i,7,A[0]),w=T(w,b,S,_,o,12,A[1]),_=T(_,w,b,S,a,17,A[2]),S=T(S,_,w,b,r,22,A[3]),b=T(b,S,_,w,s,7,A[4]),w=T(w,b,S,_,c,12,A[5]),_=T(_,w,b,S,l,17,A[6]),S=T(S,_,w,b,u,22,A[7]),b=T(b,S,_,w,d,7,A[8]),w=T(w,b,S,_,f,12,A[9]),_=T(_,w,b,S,p,17,A[10]),S=T(S,_,w,b,h,22,A[11]),b=T(b,S,_,w,m,7,A[12]),w=T(w,b,S,_,g,12,A[13]),_=T(_,w,b,S,v,17,A[14]),b=x(b,S=T(S,_,w,b,y,22,A[15]),_,w,o,5,A[16]),w=x(w,b,S,_,l,9,A[17]),_=x(_,w,b,S,h,14,A[18]),S=x(S,_,w,b,i,20,A[19]),b=x(b,S,_,w,c,5,A[20]),w=x(w,b,S,_,p,9,A[21]),_=x(_,w,b,S,y,14,A[22]),S=x(S,_,w,b,s,20,A[23]),b=x(b,S,_,w,f,5,A[24]),w=x(w,b,S,_,v,9,A[25]),_=x(_,w,b,S,r,14,A[26]),S=x(S,_,w,b,d,20,A[27]),b=x(b,S,_,w,g,5,A[28]),w=x(w,b,S,_,a,9,A[29]),_=x(_,w,b,S,u,14,A[30]),b=C(b,S=x(S,_,w,b,m,20,A[31]),_,w,c,4,A[32]),w=C(w,b,S,_,d,11,A[33]),_=C(_,w,b,S,h,16,A[34]),S=C(S,_,w,b,v,23,A[35]),b=C(b,S,_,w,o,4,A[36]),w=C(w,b,S,_,s,11,A[37]),_=C(_,w,b,S,u,16,A[38]),S=C(S,_,w,b,p,23,A[39]),b=C(b,S,_,w,g,4,A[40]),w=C(w,b,S,_,i,11,A[41]),_=C(_,w,b,S,r,16,A[42]),S=C(S,_,w,b,l,23,A[43]),b=C(b,S,_,w,f,4,A[44]),w=C(w,b,S,_,m,11,A[45]),_=C(_,w,b,S,y,16,A[46]),b=E(b,S=C(S,_,w,b,a,23,A[47]),_,w,i,6,A[48]),w=E(w,b,S,_,u,10,A[49]),_=E(_,w,b,S,v,15,A[50]),S=E(S,_,w,b,c,21,A[51]),b=E(b,S,_,w,m,6,A[52]),w=E(w,b,S,_,r,10,A[53]),_=E(_,w,b,S,p,15,A[54]),S=E(S,_,w,b,o,21,A[55]),b=E(b,S,_,w,d,6,A[56]),w=E(w,b,S,_,y,10,A[57]),_=E(_,w,b,S,l,15,A[58]),S=E(S,_,w,b,g,21,A[59]),b=E(b,S,_,w,s,6,A[60]),w=E(w,b,S,_,h,10,A[61]),_=E(_,w,b,S,a,15,A[62]),S=E(S,_,w,b,f,21,A[63]);n[0]=n[0]+b|0,n[1]=n[1]+S|0,n[2]=n[2]+_|0,n[3]=n[3]+w|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,o=8*e.sigBytes,i=(t[o>>>5]|=128<<24-o%32,$.floor(n/4294967296));for(t[15+(64+o>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t[14+(64+o>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process(),t=(e=this._hash).words,n=0;n<4;n++)o=t[n],t[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);return e},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),e.MD5=n._createHelper(u),e.HmacMD5=n._createHmacHelper(u),e=(p=l).lib,u=e.Base,W=e.WordArray,X=(e=p.algo).EvpKDF=u.extend({cfg:u.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=(r=this.cfg).hasher.create(),o=W.create(),i=o.words,a=r.keySize,r=r.iterations;i.length>>2]}},e.BlockCipher=o.extend({cfg:o.cfg.extend({mode:h,padding:f}),reset:function(){o.reset.call(this);var e,t=(n=this.cfg).iv,n=n.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode=e.call(n,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),a=e.CipherParams=p.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),h=(u.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?r.create([1398893684,1701076831]).concat(e).concat(t):t).toString(K)},parse:function(e){var t,n=(e=K.parse(e)).words;return 1398893684==n[0]&&1701076831==n[1]&&(t=r.create(n.slice(2,4)),n.splice(0,4),e.sigBytes-=16),a.create({ciphertext:e,salt:t})}},i=e.SerializableCipher=p.extend({cfg:p.extend({format:h}),encrypt:function(e,t,n,o){o=this.cfg.extend(o);var i=e.createEncryptor(n,o);return t=i.finalize(t),i=i.cfg,a.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:o.format})},decrypt:function(e,t,n,o){return o=this.cfg.extend(o),t=this._parse(t,o.format),e.createDecryptor(n,o).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),u=(u.kdf={}).OpenSSL={execute:function(e,t,n,o){return o=o||r.random(8),e=J.create({keySize:t+n}).compute(e,o),n=r.create(e.words.slice(t),4*n),e.sigBytes=4*t,a.create({key:e,iv:n,salt:o})}},Q=e.PasswordBasedCipher=i.extend({cfg:i.cfg.extend({kdf:u}),encrypt:function(e,t,n,o){return n=(o=this.cfg.extend(o)).kdf.execute(n,e.keySize,e.ivSize),o.iv=n.iv,(e=i.encrypt.call(this,e,t,n.key,o)).mixIn(n),e},decrypt:function(e,t,n,o){return o=this.cfg.extend(o),t=this._parse(t,o.format),n=o.kdf.execute(n,e.keySize,e.ivSize,t.salt),o.iv=n.iv,i.decrypt.call(this,e,t,n.key,o)}}));for(var f=l,p=f.lib.BlockCipher,h=f.algo,m=[],ne=[],oe=[],ie=[],ae=[],re=[],se=[],ce=[],le=[],ue=[],g=[],v=0;v<256;v++)g[v]=v<128?v<<1:v<<1^283;for(var y=0,b=0,v=0;v<256;v++){var w=b^b<<1^b<<2^b<<3^b<<4,_=(m[y]=w=w>>>8^255&w^99,g[ne[w]=y]),de=g[_],fe=g[de],S=257*g[w]^16843008*w;oe[y]=S<<24|S>>>8,ie[y]=S<<16|S>>>16,ae[y]=S<<8|S>>>24,re[y]=S,se[w]=(S=16843009*fe^65537*de^257*_^16843008*y)<<24|S>>>8,ce[w]=S<<16|S>>>16,le[w]=S<<8|S>>>24,ue[w]=S,y?(y=_^g[g[g[fe^_]]],b^=g[g[b]]):y=b=1}var pe=[0,1,2,4,8,16,32,64,128,27,54],h=h.AES=p.extend({_doReset:function(){for(var e,t=(o=this._key).words,n=o.sigBytes/4,o=4*((this._nRounds=n+6)+1),i=this._keySchedule=[],a=0;a>>24]<<24|m[e>>>16&255]<<16|m[e>>>8&255]<<8|m[255&e]):(e=m[(e=e<<8|e>>>24)>>>24]<<24|m[e>>>16&255]<<16|m[e>>>8&255]<<8|m[255&e],e^=pe[a/n|0]<<24),i[a]=i[a-n]^e);for(t=this._invKeySchedule=[],n=0;n>>24]]^ce[m[e>>>16&255]]^le[m[e>>>8&255]]^ue[m[255&e]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,oe,ie,ae,re,m)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,se,ce,le,ue,ne),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,o,i,a,r,s){for(var c=this._nRounds,l=e[t]^n[0],u=e[t+1]^n[1],d=e[t+2]^n[2],f=e[t+3]^n[3],p=4,h=1;h>>24]^i[u>>>16&255]^a[d>>>8&255]^r[255&f]^n[p++],g=o[u>>>24]^i[d>>>16&255]^a[f>>>8&255]^r[255&l]^n[p++],v=o[d>>>24]^i[f>>>16&255]^a[l>>>8&255]^r[255&u]^n[p++],f=o[f>>>24]^i[l>>>16&255]^a[u>>>8&255]^r[255&d]^n[p++],l=m,u=g,d=v;m=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^n[p++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^n[p++],v=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[p++],f=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^n[p++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=f},keySize:8});function M(a,e){var r=_e();return(M=function(e,t){var u,n=r[e-=191],o=(void 0===M.mlwoQJ&&(M.Bczeqh=u=function(e){for(var t,n,o="",i="",a=o+u,r=0,s=0;n=e.charAt(s++);~n&&(t=r%4?64*t+n:n,r++%4)&&(o+=a.charCodeAt(s+10)-10!=0?String.fromCharCode(255&t>>(-2*r&6)):r))n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(var c=0,l=o.length;c")[0].split("<")[o(0,0,88,89)]("")[o(0,0,95,39)]('"').join(""),_0x260e0e[n(1106,1068)][n(1085,1130)](t.XoJen,t[n(1102,1150)]).toString(_0x303212.enc.Utf8))&&(_0x293102=!0)}}:function(){};return we=!1,e};function I(e,t){return M(t-474,e)}function N(e,t,n){return M(e-966,n)}function L(e,t,n){return M(e- -207,n)}function _e(){var e=["zgvJCNLWDa","mePLEeroq0n4kW","C3bSAxq","rKnTmeXVwfbhAa","vtjgC2rhvMTymq","wMjTDfO","z3b4weq","vdrxAgXNqvv1zW","ne1qEITcm2fXEG","zxHJzxb0Aw9U","AvreBwG","wMnODuLTou1ABa","uxrMBeC","yuDxtvK","y0rwuKW","nxWZFdb8mxWYFa","BMn0Aw9UkcKG","BunWqva","z25qrwe","r3DwDhe","D1DSEee","quvt","Aff0ruO","DwiUy29Tl2v0Aa","mti1mte5nLzZBwjkvq","v2PVt2O","DMv6u1m","ndmXndvIDfLcC3C","yMLUza","uxLvDwe","zvfbAMG","zw11Bgf0B3jQCW","Dgv4Da","wwrNseS","yw5HB2jYAwvUlW","BMntzMe","sLjJAeG","ndi5mwfRsxfjyG","sxH3A3q","r0vu","yxnMzgr3C2vNzG","k2zjnKTbqwHVqW","y29UC29Szq","r2fyt0O","Cw5vvM8","svfdv1m","runhstjrod0","CK90Cxy","Dg9tDhjPBMC","DhjHy2u","zKfxBxe","s3jnB3a","sLjJq20","C2vHCMnO","rhb0D3e","s1bVtxe","DhbZoI8Vz2L0Aa","EKv3DLu","mtuWvNjOAuPs","AgfeveG","Bg9N","wdq5ttLSl0TLAW","CM4GDgHPCYiPka","wg9wugS","mtjrDvvoAwe","vxrMoa","AK5RB2u","CK9TCuy","z0n5y3G","reDfvwe","mtmYnJi1nLLTzufqra","C3LLuMC","mtu4odyZmhfPD0vlzG","BgvUz3rO","CMvNCJmYntrYyW","vwf5yKu","CMvZCg9UC2vuEq","D3H5Dhm","Ce5Sse4","Aw5Uzxjive1m","otKXmZG2ovL0Cfj4Ea","AMTur1O","vuXnBxa","y29UC3rYDwn0BW","Evnlu2q","C0j5vgfNtMfTzq","Aw5MBW","z2v0rwXLBwvUDa","zxHWB3j0CW","qvfjteK","x19WCM90B19F","y3rVCIGICMv0Dq","zw5J","yxbWBhK","DgfIBgu","yLu2qNjdnZm0qW","C291CMnLoIbODa","sxHUrxy","yMnRCui","tuz3rKe","E30Uy29UC3rYDq","Dwfkyu1XkZe2wa","tKzeueK","A3D4CNO","D3vgC1y","mZe5nJGYnZb5v1nWDwC","mti5mJbWzfjhB1i","ChjVDg90ExbL","CMv0DxjUicHMDq","kcGOlISPkYKRkq","tw9csve","Ew1jwKu","AM9PBG","shjdvKe","CIn2vJqZDL4J","qMXmt00","rKngvee"];return(_e=function(){return e})()}P(this,function(){var i={qnUVo:function(e,t){return e===t},ymIZE:M(238,1096),vezSS:function(e,t){return e===t},YdgHK:"HrxqK",cDVRL:M(221,300),gCycx:function(e,t){return e(t)},zEwvU:function(e,t){return e+t},aPPBH:"{}.constru"+M(300,388)+M(271,1236)+" )",ULMmp:function(e,t){return e")[0][r(273,258)]("<")[r(297,251)]("")[r(210,258)]('"')[r(226,251)](""),_0x108bf4[M(230,1196)][M(209,1110)](i[r(198,238)],i[M(306,1193)]).toString(_0x432c88[r(349,348)][M(274,1142)]))&&(p=!0)}p||i.gCycx(_0x4e8549,i[r(334,334)])}})(),D[L(90,0,38)]={a:{get:async function(e,t){var n={jNkoe:i(-409,0,0,-390),bckqB:function(e,t,n){return e(t,n)},ySKSd:o(764,821)};function o(e,t){return L(e-723,0,t)}t=t&&t[i(-365,0,0,-390)+"pe"]?t&&t[i(-365,0,0,-406)+"pe"]:n[i(-375,0,0,-367)];function i(e,t,n,o){return L(e- -443,0,o)}return n[o(823,790)](U,e,{method:n[i(-357,0,0,-336)],type:t})},head:async function(e,t){var n={KPoMq:o(0,-608,0,-632),wxyts:function(e,t,n){return e(t,n)},gnPEa:"HEAD"},t=t&&t.responseType?t&&t[L(78,0,-196)+"pe"]:n[o(0,-585,0,-567)];function o(e,t,n,o){return L(t- -642,0,o)}return n[o(0,-563,0,-593)](U,e,{method:n[o(0,-622,0,-594)],type:t})},check:function(e){function t(e,t){return L(t- -53,0,e)}var n={zvvQv:function(e,t){return e")[0].split("<")[o(-217,0,0,-247)]("")[t(5,-49)]('"').join("")===l.AES[t(-71,-51)](n[o(-187,0,0,-240)],n[o(-206,0,0,-233)])[t(-7,-3)](l[t(5,41)][o(-147,0,0,-133)])&&(a=!0);a||n.DIRCp(alert,n.bwNeo)}}}},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(e,t){var n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(e,t){var n,o,e=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function r(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return(n=setTimeout)(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}var s,c=[],l=!1,u=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):u=-1,c.length&&f())}function f(){if(!l){var e=r(d);l=!0;for(var t=c.length;t;){for(s=c,c=[];++u>16&255,i[a++]=t>>8&255,i[a++]=255&t;return 2===n&&(t=c[e.charCodeAt(s)]<<2|c[e.charCodeAt(s+1)]>>4,i[a++]=255&t),1===n&&(t=c[e.charCodeAt(s)]<<10|c[e.charCodeAt(s+1)]<<4|c[e.charCodeAt(s+2)]>>2,i[a++]=t>>8&255,i[a++]=255&t),i},n.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,r=n-o;a>18&63]+s[o>>12&63]+s[o>>6&63]+s[63&o]);return i.join("")}(e,a,r>2]+s[t<<4&63]+"==")):2==o&&(t=(e[n-2]<<8)+e[n-1],i.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"=")),i.join("")};for(var s=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=o.length;i>>1;case"base64":return T(e).length;default:if(i)return o?-1:S(e).length;t=(""+t).toLowerCase(),i=!0}}function n(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function s(e,t,n,o,i){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):2147483647=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=d.from(t,o)),d.isBuffer(t))return 0===t.length?-1:c(e,t,n,o,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):c(e,[t],n,o,i);throw new TypeError("val must be string, number or Buffer")}function c(e,t,n,o,i){var a=1,r=e.length,s=t.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;r/=a=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i)for(var l=-1,u=n;u>>10&1023|55296),u=56320|1023&u),o.push(u),i+=d}var f=o,p=f.length;if(p<=g)return String.fromCharCode.apply(String,f);for(var h="",m=0;mthis.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var a=this,r=t,s=n,c=a.length;(!s||s<0||ct&&(e+=" ... "),""},d.prototype.compare=function(e,t,n,o,i){if(A(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),(t=void 0===t?0:t)<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(i<=o&&n<=t)return 0;if(i<=o)return-1;if(n<=t)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(o>>>=0),r=(n>>>=0)-(t>>>=0),s=Math.min(a,r),c=this.slice(o,i),l=e.slice(t,n),u=0;u>>=0,isFinite(n)?(n>>>=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}var i=this.length-t;if((void 0===n||ithis.length)throw new RangeError("Attempt to write outside buffer bounds");o=o||"utf8";for(var a,r,s,c,l,u=!1;;)switch(o){case"hex":var d=this,f=e,p=t,h=n,m=(p=Number(p)||0,d.length-p);(!h||(h=Number(h))>m)&&(h=m),(m=f.length)/2>8,i.push(n%256),i.push(o);return i}(e,(a=this).length-s),a,s,r);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),u=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var g=4096;function l(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(ne.length)throw new RangeError("Index out of range")}function v(e,t,n,o){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function b(e,t,n,o,i){return t=+t,n>>>=0,i||v(e,0,n,4),a.write(e,t,n,o,23,4),n+4}function w(e,t,n,o,i){return t=+t,n>>>=0,i||v(e,0,n,8),a.write(e,t,n,o,52,8),n+8}d.prototype.slice=function(e,t){var n=this.length,n=((e=~~e)<0?(e+=n)<0&&(e=0):n>>=0,t>>>=0,n||l(e,t,this.length);for(var o=this[e],i=1,a=0;++a>>=0,t>>>=0,n||l(e,t,this.length);for(var o=this[e+--t],i=1;0>>=0,t||l(e,1,this.length),this[e]},d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||l(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||l(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||l(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUInt32BE=function(e,t){return e>>>=0,t||l(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||l(e,t,this.length);for(var o=this[e],i=1,a=0;++a=(i*=128)&&(o-=Math.pow(2,8*t)),o},d.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||l(e,t,this.length);for(var o=t,i=1,a=this[e+--o];0=(i*=128)&&(a-=Math.pow(2,8*t)),a},d.prototype.readInt8=function(e,t){return e>>>=0,t||l(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||l(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},d.prototype.readInt16BE=function(e,t){e>>>=0,t||l(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},d.prototype.readInt32LE=function(e,t){return e>>>=0,t||l(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return e>>>=0,t||l(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readFloatLE=function(e,t){return e>>>=0,t||l(e,4,this.length),a.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||l(e,4,this.length),a.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||l(e,8,this.length),a.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||l(e,8,this.length),a.read(this,e,!1,52,8)},d.prototype.writeUIntLE=function(e,t,n,o){e=+e,t>>>=0,n>>>=0,o||m(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a>>=0,n>>>=0,o||m(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;0<=--i&&(a*=256);)this[t+i]=e/a&255;return t+n},d.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,1,255,0),this[t]=255&e,t+1},d.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeIntLE=function(e,t,n,o){e=+e,t>>>=0,o||m(this,e,t,n,(o=Math.pow(2,8*n-1))-1,-o);var i=0,a=1,r=0;for(this[t]=255&e;++i>0)-r&255;return t+n},d.prototype.writeIntBE=function(e,t,n,o){e=+e,t>>>=0,o||m(this,e,t,n,(o=Math.pow(2,8*n-1))-1,-o);var i=n-1,a=1,r=0;for(this[t+i]=255&e;0<=--i&&(a*=256);)e<0&&0===r&&0!==this[t+i+1]&&(r=1),this[t+i]=(e/a>>0)-r&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeFloatLE=function(e,t,n){return b(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return b(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return w(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return w(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,o){if(!d.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n=n||0,o||0===o||(o=this.length),t>=e.length&&(t=e.length),(o=0=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length);var i=(o=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(a=t;a>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function T(e){return x.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(_,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function E(e,t,n,o){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function A(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function M(e){return e!=e}}.call(this)}.call(this,k("buffer").Buffer)},{"base64-js":2,buffer:3,ieee754:4}],4:[function(e,t,n){n.read=function(e,t,n,o,i){var a,r,s=8*i-o-1,c=(1<>1,u=-7,d=n?i-1:0,f=n?-1:1,i=e[t+d];for(d+=f,a=i&(1<<-u)-1,i>>=-u,u+=s;0>=-u,u+=o;0>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=o?0:a-1,p=o?1:-1,a=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,r=l):(r=Math.floor(Math.log(t)/Math.LN2),t*(o=Math.pow(2,-r))<1&&(r--,o*=2),2<=(t+=1<=r+u?d/o:d*Math.pow(2,1-u))*o&&(r++,o/=2),l<=r+u?(s=0,r=l):1<=r+u?(s=(t*o-1)*Math.pow(2,i),r+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,i),r=0));8<=i;e[n+f]=255&s,f+=p,s/=256,i-=8);for(r=r<=this._reconnectionAttempts?(u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1):(e=this.backoff.duration(),u("will wait %dms before reconnect attempt",e),this.reconnecting=!0,t=setTimeout(function(){n.skipReconnect||(u("attempting reconnect"),n.emitAll("reconnect_attempt",n.backoff.attempts),n.emitAll("reconnecting",n.backoff.attempts),n.skipReconnect||n.open(function(e){e?(u("reconnect attempt error"),n.reconnecting=!1,n.reconnect(),n.emitAll("reconnect_error",e.data)):(u("reconnect success"),n.onreconnect())}))},e),this.subs.push({destroy:function(){clearTimeout(t)}}))},p.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){var r=n(106),s=n(381),c=n(390),n=n(391);t.polling=function(e){var t,n,o=!1,i=!1,a=!1!==e.jsonp;if("undefined"!=typeof location&&(t="https:"===location.protocol,n=(n=location.port)||(t?443:80),o=e.hostname!==location.hostname||n!==e.port,i=e.secure!==t),e.xdomain=o,e.xscheme=i,"open"in new r(e)&&!e.forceJSONP)return new s(e);if(a)return new c(e);throw new Error("JSONP disabled")},t.websocket=n},function(e,t,n){var o=n(107),i=n(75),a=n(51),r=n(76),s=n(152),c=n(77)("engine.io-client:polling"),l=(e.exports=u,null!=new(n(106))({xdomain:!1}).responseType);function u(e){var t=e&&e.forceBase64;l&&!t||(this.supportsBinary=!1),o.call(this,e)}r(u,o),u.prototype.name="polling",u.prototype.doOpen=function(){this.poll()},u.prototype.pause=function(e){var t,n=this;function o(){c("paused"),n.readyState="paused",e()}this.readyState="pausing",this.polling||!this.writable?(t=0,this.polling&&(c("we are currently polling - waiting to pause"),t++,this.once("pollComplete",function(){c("pre-pause polling complete"),--t||o()})),this.writable||(c("we are currently writing - waiting to pause"),t++,this.once("drain",function(){c("pre-pause writing complete"),--t||o()}))):o()},u.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},u.prototype.onData=function(e){var o=this;c("polling got data %s",e),a.decodePayload(e,this.socket.binaryType,function(e,t,n){if("opening"===o.readyState&&o.onOpen(),"close"===e.type)return o.onClose(),!1;o.onPacket(e)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},u.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},u.prototype.write=function(e){function t(){n.writable=!0,n.emit("drain")}var n=this;this.writable=!1;a.encodePayload(e,this.supportsBinary,function(e){n.doWrite(e,t)})},u.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=s()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"==t&&443!==Number(this.port)||"http"==t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(t,e,n){!function(a){var e=Object.prototype.toString,r="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===e.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===e.call(File);t.exports=function e(t){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(var n=0,o=t.length;nthis.options.threshold){var s={};for(c in this.direction)this.direction.hasOwnProperty(c)&&(s[c]=this.direction[c]);var c,l={};for(c in this.direction={x:n,y:o,angle:t},e.direction=this.direction,s)s[c]===this.direction[c]&&(l[c]=!0);if(l.x&&l.y&&l.angle)return e;l.x&&l.y||this.trigger("plain",e),l.x||this.trigger("plain:"+n,e),l.y||this.trigger("plain:"+o,e),l.angle||this.trigger("dir dir:"+t,e)}return e},o.prototype=new e,(o.constructor=o).id=0,o.prototype.prepareNipples=function(){var e=this,o=e.nipples;o.on=e.on.bind(e),o.off=e.off.bind(e),o.options=e.options,o.destroy=e.destroy.bind(e),o.ids=e.ids,o.id=e.id,o.processOnMove=e.processOnMove.bind(e),o.processOnEnd=e.processOnEnd.bind(e),o.get=function(e){if(void 0===e)return o[0];for(var t=0,n=o.length;t