EmulatorJS/data/emulator.min.js

1 line
482 KiB
JavaScript
Raw Normal View History

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<e?1:-1})},Array.isArray,a.m=n,a.c=o,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)a.d(n,o,function(e){return t[e]}.bind(null,o));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=396)}([function(e){e.exports=function(e,t,n){console.warn(e),e&&e.response&&0===e.response.status?t.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;"><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors">'+n.localization("CORS Error")+"</a></strong>":t.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+n.localization("Network Error")+"</strong>"}},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<t.length;n++)(e=t[n])&&this.knownGamepads.indexOf(e)<0&&(this.knownGamepads.push(e),this.listener._connect(e))},a.factory=function(e){var t=r;return t=window&&void 0!==window.addEventListener?new a(e):t},a.getType=function(){return"Firefox"},a.prototype.getType=function(){return a.getType()},a.prototype.isSupported=function(){return-1!==(window&&window.navigator).userAgent.indexOf("Firefox")},a.prototype.update=o;l.UpdateStrategies={AnimFrameUpdateStrategy:t,ManualUpdateStrategy:n},l.PlatformFactories=[a.factory,i.factory],l.Type={N64:"n64",PLAYSTATION:"playstation",LOGITECH:"logitech",XBOX:"xbox",ECKA:"ecka",UNKNOWN:"unknown"},l.Event={CONNECTED:"connected",UNSUPPORTED:"unsupported",DISCONNECTED:"disconnected",TICK:"tick",BUTTON_DOWN:"button-down",BUTTON_UP:"button-up",AXIS_CHANGED:"axis-changed"},l.StandardButtons=["BUTTON_1","BUTTON_2","BUTTON_3","BUTTON_4","LEFT_TOP_SHOULDER","RIGHT_TOP_SHOULDER","LEFT_BOTTOM_SHOULDER","RIGHT_BO