{"size": 659200, "ext": "js", "max_stars_repo_path": "imageAssets/data/emu-min.js", "max_stars_repo_name": "teddblue/-gamebois", "max_stars_repo_stars_event_min_datetime": "2021-12-01T18:10:42.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-16T08:24:08.000Z", "max_issues_repo_path": "imageAssets/data/emu-min.js", "max_issues_repo_name": "teddblue/-gamebois", "max_issues_repo_issues_event_min_datetime": "2021-11-16T12:56:46.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-30T21:35:58.000Z", "max_forks_repo_path": "imageAssets/data/emu-min.js", "max_forks_repo_name": "teddblue/-gamebois", "max_forks_repo_forks_event_min_datetime": "2022-02-01T19:39:50.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-01T19:39:50.000Z"}
{"max_stars_count": 7, "max_issues_count": 2, "max_forks_count": 1, "avg_line_length": 82400.0, "max_line_length": 595128, "alphanum_fraction": 0.7008692354}
var EJS=function(e){t=!0;var t,n={};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=396)}([function(e,t,n){var o=n(2),r=n(20),a=n(13),i=n(14),s=n(21),c=function(e,t,n){var l,u,d,f,p=e&c.F,h=e&c.G,m=e&c.S,v=e&c.P,g=e&c.B,b=h?o:m?o[t]||(o[t]={}):(o[t]||{}).prototype,y=h?r:r[t]||(r[t]={}),w=y.prototype||(y.prototype={});for(l in h&&(n=t),n)d=((u=!p&&b&&void 0!==b[l])?b:n)[l],f=g&&u?s(d,o):v&&"function"==typeof d?s(Function.call,d):d,b&&i(b,l,d,e&c.U),y[l]!=d&&a(y,l,f),v&&w[l]!=d&&(w[l]=d)};o.core=r,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){var o=n(4);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var o=n(58)("wks"),r=n(36),a=n(2).Symbol,i="function"==typeof a;(e.exports=function(e){return o[e]||(o[e]=i&&a[e]||(i?a:r)("Symbol."+e))}).store=o},function(e,t,n){!function(e){"use strict";var t=function(){},n={getType:function(){return"null"},isSupported:function(){return!1},update:t},o=function(e){var n=this,o=window;this.update=t,this.requestAnimationFrame=e||o.requestAnimationFrame||o.webkitRequestAnimationFrame||o.mozRequestAnimationFrame,this.tickFunction=function(){n.update(),n.startTicker()},this.startTicker=function(){n.requestAnimationFrame.apply(o,[n.tickFunction])}};o.prototype.start=function(e){this.update=e||t,this.startTicker()};var r=function(){};r.prototype.update=t,r.prototype.start=function(e){this.update=e||t};var a=function(e,t){this.listener=e,this.gamepadGetter=t,this.knownGamepads=[]};a.factory=function(e){var t=n,o=window&&window.navigator;return o&&(void 0!==o.getGamepads?t=new a(e,(function(){return o.getGamepads()})):void 0!==o.webkitGamepads?t=new a(e,(function(){return o.webkitGamepads()})):void 0!==o.webkitGetGamepads&&(t=new a(e,(function(){return o.webkitGetGamepads()})))),t},a.getType=function(){return"WebKit"},a.prototype.getType=function(){return a.getType()},a.prototype.isSupported=function(){return!0},a.prototype.update=function(){var e,t,n=Array.prototype.slice.call(this.gamepadGetter(),0);for(t=this.knownGamepads.length-1;t>=0;t--)e=this.knownGamepads[t],n.indexOf(e)<0&&(this.knownGamepads.splice(t,1),this.listener._disconnect(e));for(t=0;t<n.length;t++)(e=n[t])&&this.knownGamepads.indexOf(e)<0&&(this.knownGamepads.push(e),this.listener._connect(e))};var i=function(e){this.listener=e,window.addEventListener("gamepadconnected",(function(t){e._connect(t.gamepad)})),window.addEventListener("gamepaddisconnected",(function(t){e._disconnect(t.gamepad)}))};i.factory=function(e){var t=n;return window&&void 0!==window.addEventListener&&(t=new i(e)),t},i.getType=function(){return"Firefox"},i.prototype.getType=function(){return i.getType()},i.prototype.isSupported=function(){return-1!==(window&&window.navigator).userAgent.indexOf("Firefox")},i.prototype.update=t;var s=function(e){this.updateStrategy=e||new o,this.gamepads=[],this.listeners={},this.platform=n,this.deadzone=.03,this.maximizeThreshold=.97};s.UpdateStrategies={AnimFrameUpdateStrategy:o,ManualUpdateStrategy:r},s.PlatformFactories=[i.factory,a.factory],s.Type={N64:"n64",PLAYSTATION:"playstation",LOGITECH:"logitech",XBOX:"xbox",ECKA:"ecka",UNKNOWN:"unknown"},s.Event={CONNECTED:"connected",UNSUPPORTED:"unsupported",DISCONNECTED:"disconnected",TICK:"tick",BUTTON_DOWN:"button-down",BUTTON_UP:"button-up",AXIS_CHANGED:"axis-changed"},s.StandardButtons=["BUTTON_1","BUTTON_2","BUTTON_3","BUTTON_4","LEFT_TOP_SHOULDER","RIGHT_TOP_SHOULDER","LEFT_BOTTOM_SHOULDER","RIGHT_BOTTOM_SHOULDER","SELECT_BACK","START_FORWARD","LEFT_STICK","RIGHT_STICK","DPAD_UP","DPAD_DOWN","DPAD_LEFT","DPAD_RIGHT","HOME"],s.StandardAxes=["LEFT_STICK_X","LEFT_STICK_Y","RIGHT_STICK_X","RIGHT_STICK_Y"];var c,l=function(e,t,n){return t<e.length?e[t]:n+(t-e.length+1)};s.StandardMapping={env:{},buttons:{byButton:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},axes:{byAxis:[0,1,2,3]}},s.Mappings=[{env:{platform:i.getType(),type:s.Type.N64},buttons:{byButton:[2,1,3,0,4,5,-1,-1,8,9,-1,-1,12,13,14,15,-1]},axes:{byAxis:[1,2,-1,-1]}},{env:{platform:a.getType(),type:s.Type.N64},buttons:{byButton:[2,1,3,0,4,5,-1,-1,8,9,-1,-1,12,13,14,15,-1]},axes:{byAxis:[0,1,-1,-1]}},{env:{platform:i.getType(),type:s.Type.XBOX},buttons:{byButton:[0,1,2,3,4,5,15,16,9,8,6,7,11,12,13,14,10]},axes:{byAxis:[0,1,2,3]}},{env:{platform:i.getType(),type:s.Type.PLAYSTATION},buttons:{byButton:[14,13,15,12,10,11,8,9,0,3,1,2,4,6,7,5,16]},axes:{byAxis:[0,1,2,3]}},{env:{platform:a.getType(),type:s.Type.LOGITECH},buttons:{byButton:[1,2,0,3,4,5,6,7,8,9,10,11,11,12,13,14,10]},axes:{byAxis:[0,1,2,3]}},{env:{platform:i.getType(),type:s.Type.LOGITECH},buttons:{byButton:[0,1,2,3,4,5,-1,-1,6,7,8,9,11,12,13,14,10],byAxis:[-1,-1,-1,-1,-1,-1,[2,0,1],[2,0,-1]]},axes:{byAxis:[0,1,3,4]}},{env:{platform:a.getType(),type:s.Type.ECKA},buttons:{byButton:[2,1,3,0,4,5,6,7,8,9,10,11,11,12,13,14,10],byAxis:[-1,-1,-1,-1,-1,-1,[2,0,1],[2,0,-1]]},axes:{byAxis:[0,1,3,4]}},{env:{platform:a.getType(),type:s.Type.UNKNOWN},buttons:{byButton:[0,1,2,3,4,5,-1,-1,6,7,8,9,11,12,13,14,15,16,17,10]},axes:{byAxis:[0,1,2,5]}}],s.prototype.init=function(){var e=s.resolvePlatform(this),t=this;return this.platform=e,this.updateStrategy.start((function(){t._update()})),this.buttonState=[],this.extraButtonState=[],e.isSupported()},s.prototype.bind=function(e,t){return void 0===this.listeners[e]&&(this.listeners[e]=[]),this.listeners[e].push(t),this},s.prototype.unbind=function(e,t){if(void 0!==e){if(void 0!==t){if(void 0===this.listeners[e])return!1;for(var n=0;n<this.listeners[e].length;n++)if(this.listeners[e][n]===t)return this.listeners[e].splice(n,1),!0;return!1}this.listeners[e]=[]}else this.listeners={}},s.prototype.count=function(){return this.gamepads.length},s.prototype._fire=function(e,t){if(void 0!==this.listeners[e]){for(var n=0;n<this.listeners[e].length;n++)this.listeners[e][n].apply(this.listeners[e][n],[t]);var o=this;t.gamepad&&t.gamepad.extra_buttons&&t.gamepad.extra_buttons.forEach((function(e,n){o.extraButtonState[t.gamepad.index]||(o.extraButtonState[t.gamepad.index]=[]),o.extraButtonState[t.gamepad.index][n]=e}))}},s.getNullPlatform=function(){return Object.create(n)},s.resolvePlatform=function(e){var t,o=n;for(t=0;!o.isSupported()&&t<s.PlatformFactories.length;t++)o=s.PlatformFactories[t](e);return o},s.prototype._connect=function(e){var t,n,o=this._resolveMapping(e);for(e.state={},e.lastState={},e.updater=[],this.buttonState[e.index]||(this.buttonState[e.index]=[]),this.extraButtonState[e.index]||(this.extraButtonState[e.index]=[]),t=o.buttons.byButton.length,n=0;n<t;n++)this._addButtonUpdater(e,o,n);for(t=o.axes.byAxis.length,n=0;n<t;n++)this._addAxisUpdater(e,o,n);if(this.gamepads[e.index]=e,!this.gamepads[e.index].extra_buttons)for(this.gamepads[e.index].extra_buttons=[],n=e.buttons.length;n<16;n++)this.extraButtonState[e.index][n]?this.gamepads[e.index].extra_buttons[n]=this.extraButtonState[e.index][n]:this.gamepads[e.index].extra_buttons[n]={pressed:!1,value:0};this._fire(s.Event.CONNECTED,e)},s.prototype._addButtonUpdater=function(e,t,n){var o,r=l(s.StandardButtons,n,"EXTRA_BUTTON_"),a=this._createButtonGetter(e,t.buttons,n),i=this,c={gamepad:e,control:r,index:n,gamepadIndex:e.index};e.state[r]=0,e.lastState[r]=0,null==this.buttonState[e.index][r]&&(this.buttonState[e.index][r]=0),o=function(){var t=a(),n=e.lastState[r],o=t>.5,l=n>.5;e.state[r]=t,o&&!l?i._fire(s.Event.BUTTON_DOWN,Object.create(c)):(!o&&l||i.buttonState[e.index][r]!=t)&&i._fire(s.Event.BUTTON_UP,Object.create(c)),0!==t&&1!==t&&t!==n&&i._fireAxisChangedEvent(e,r,t),e.lastState[r]=t,i.buttonState[e.index][r]=t},e.updater.push(o)},s.prototype._addAxisUpdater=function(e,t,n){var o,r=l(s.StandardAxes,n,"EXTRA_AXIS_"),a=this._createAxisGetter(e,t.axes,n),i=this;e.state[r]=0,e.lastState[r]=0,null==this.buttonState[e.index][r]&&(this.buttonState[e.index][r]=0),o=function(){var t=a(),n=i.buttonState[e.index][r];e.state[r]=t,t!==n&&i._fireAxisChangedEvent(e,r,t),e.lastState[r]=t,i.buttonState[e.index][r]=t},e.updater.push(o)},s.prototype._fireAxisChangedEvent=function(e,t,n){var o={gamepad:e,axis:t,value:n};this._fire(s.Event.AXIS_CHANGED,o)},s.prototype._createButtonGetter=(c=function(){return 0},function(e,t,n){var o,r,a,i,s,l,u=c,d=this;return-1!==(o=t.byButton[n])?"number"==typeof o&&o<e.buttons.length&&(u=function(){var t=e.buttons[o];return"number"==typeof t?t:"number"==typeof t.value?t.value:0}):t.byAxis&&n<t.byAxis.length&&(r=o=t.byAxis[n],"[object Array]"===Object.prototype.toString.call(r)&&3==o.length&&o[0]<e.axes.length&&(a=u=function(){var t=e.axes[o[0]];return d._applyDeadzoneMaximize(t)},i=o[1],s=o[2],l=c,i<s?l=function(){var e=s-i,t=a();return(t=(t-i)/e)<0?0:t}:s<i&&(l=function(){var e=i-s,t=a();return(t=(t-s)/e)>1?0:1-t}),u=l)),u}),s.prototype._createAxisGetter=function(){var e=function(){return 0};return function(t,n,o){var r,a=e,i=this;return-1!==(r=n.byAxis[o])&&"number"==typeof r&&r<t.axes.length&&(a=function(){var e=t.axes[r];return i._applyDeadzoneMaximize(e)}),a}}(),s.prototype._disconnect=function(e){var t,n=[];for(void 0!==this.gamepads[e.index]&&delete this.gamepads[e.index],t=0;t<this.gamepads.length;t++)void 0!==this.gamepads[t]&&(n[t]=this.gamepads[t]);this.gamepads=n,this._fire(s.Event.DISCONNECTED,e)},s.prototype._resolveControllerType=function(e){return-1!==(e=e.toLowerCase().replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")).indexOf("playstation")?s.Type.PLAYSTATION:-1!==e.indexOf("logitech")||-1!==e.indexOf("wireless gamepad")?s.Type.LOGITECH:-1!==e.indexOf("xbox")||-1!==e.indexOf("360")?s.Type.XBOX:-1!==e.indexOf("79-6-generic")&&-1!==e.indexOf("joystick")||-1!==e.indexOf("vendor: 0079 product: 0006")&&-1!==e.indexOf("generic usb joystick")?s.Type.N64:"usb joystick (vendor: 0e8f product: 0002)"===e?s.Type.ECKA:s.Type.UNKNOWN},s.prototype._resolveMapping=function(e){var t,n,o=s.Mappings,r=null,a={platform:this.platform.getType(),type:this._resolveControllerType(e.id)};for(t=0;!r&&t<o.length;t++)n=o[t],s.envMatchesFilter(n.env,a)&&(r=n);return r||s.StandardMapping},s.envMatchesFilter=function(e,t){var n,o=!0;for(n in e)e[n]!==t[n]&&(o=!1);return o},s.prototype._update=function(){this.platform.update(),this.gamepads.forEach((function(e){e&&e.updater.forEach((function(e){e()}))})),this.gamepads.length>0&&this._fire(s.Event.TICK,this.gamepads)},s.prototype._applyDeadzoneMaximize=function(e,t,n){return t=void 0!==t?t:this.deadzone,n=void 0!==n?n:this.maximizeThreshold,e>=0?e<t?e=0:e>n&&(e=1):e>-t?e=0:e<-n&&(e=-1),e},e.Gamepad=s}(e.exports||window)},function(e,t,n){e.exports=!n(3)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var o=n(1),r=n(109),a=n(24),i=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(o(e),t=a(t,!0),o(n),r)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var o=n(26),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t,n){var o=n(25);e.exports=function(e){return Object(o(e))}},function(e,t,n){(function(e,n){var o,r,a,i;function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function o(e){var t=new i(e),n=a(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var r=n(2),a=n(3),i=n(5),s=n(22),c=o(n(11));c.Axios=i,c.create=function(e){return o(s(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(10),c.all=function(e){return Promise.all(e)},c.spread=n(25),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function o(e){return"[object Array]"===u.call(e)}function r(e){return null!==e&&"object"==s(e)}function a(e){return"[object Function]"===u.call(e)}function i(e,t){if(null!=e)if("object"!=s(e)&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}var c=n(3),l=n(4),u=Object.prototype.toString;e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===u.call(e)},isBuffer:l,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:r,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===u.call(e)},isFile:function(e){return"[object File]"===u.call(e)},isBlob:function(e){return"[object Blob]"===u.call(e)},isFunction:a,isStream:function(e){return r(e)&&a(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:i,merge:function e(){function t(t,o){"object"==s(n[o])&&"object"==s(t)?n[o]=e(n[o],t):n[o]=t}for(var n={},o=0,r=arguments.length;o<r;o++)i(arguments[o],t);return n},deepMerge:function e(){function t(t,o){"object"==s(n[o])&&"object"==s(t)?n[o]=e(n[o],t):"object"==s(t)?n[o]=e({},t):n[o]=t}for(var n={},o=0,r=arguments.length;o<r;o++)i(arguments[o],t);return n},extend:function(e,t,n){return i(t,(function(t,o){e[o]=n&&"function"==typeof t?c(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];return e.apply(t,n)}}},function(e,t){e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";function o(e){this.defaults=e,this.interceptors={request:new i,response:new i}}var r=n(2),a=n(6),i=n(7),s=n(8),c=n(22);o.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=c(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},o.prototype.getUri=function(e){return e=c(this.defaults,e),a(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){o.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){o.prototype[e]=function(t,n,o){return this.request(r.merge(o||{},{method:e,url:t,data:n}))}})),e.exports=o},function(e,t,n){"use strict";function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var r=n(2);e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,n){"use strict";function o(){this.handlers=[]}var r=n(2);o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";function o(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var r=n(2),a=n(9),i=n(10),s=n(11),c=n(20),l=n(21);e.exports=function(e){return o(e),e.baseURL&&!c(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=a(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return o(e),t.data=a(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(o(e),t&&t.response&&(t.response.data=a(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var o=n(2);e.exports=function(e,t,n){return o.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(t,n,o){"use strict";function r(e,t){!a.isUndefined(e)&&a.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a=o(2),i=o(12),s={"Content-Type":"application/x-www-form-urlencoded"},c={adapter:function(){var t;return(void 0!==e&&"[object process]"===Object.prototype.toString.call(e)||"undefined"!=typeof XMLHttpRequest)&&(t=o(13)),t}(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),a.isFormData(e)||a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)?e:a.isArrayBufferView(e)?e.buffer:a.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):a.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),a.forEach(["post","put","patch"],(function(e){c.headers[e]=a.merge(s)})),t.exports=c},function(e,t,n){"use strict";var o=n(2);e.exports=function(e,t){o.forEach(e,(function(n,o){o!==t&&o.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[o])}))}},function(e,t,n){"use strict";var o=n(2),r=n(14),a=n(6),i=n(17),s=n(18),c=n(15);e.exports=function(e){return new Promise((function(t,l){var u=e.data,d=e.headers;o.isFormData(u)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",h=e.auth.password||"";d.Authorization="Basic "+btoa(p+":"+h)}if(f.open(e.method.toUpperCase(),a(e.url,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?i(f.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};r(t,l,o),f=null}},f.onabort=function(){f&&(l(c("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){l(c("Network Error",e,null,f)),f=null},f.ontimeout=function(){l(c("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",f)),f=null},o.isStandardBrowserEnv()){var m=n(19),v=(e.withCredentials||s(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in f&&o.forEach(d,(function(e,t){void 0===u&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),e.withCredentials&&(f.withCredentials=!0),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),l(e),f=null)})),void 0===u&&(u=null),f.send(u)}))}},function(e,t,n){"use strict";var o=n(15);e.exports=function(e,t,n){var r=n.config.validateStatus;!r||r(n.status)?e(n):t(o("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";var o=n(16);e.exports=function(e,t,n,r,a){var i=new Error(e);return o(i,t,n,r,a)}},function(e,t){"use strict";e.exports=function(e,t,n,o,r){return e.config=t,n&&(e.code=n),e.request=o,e.response=r,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var o=n(2),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(o.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=o.trim(e.substr(0,a)).toLowerCase(),n=o.trim(e.substr(a+1)),t){if(i[t]&&r.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},function(e,t,n){"use strict";var o=n(2);e.exports=o.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");return t=e(window.location.href),function(n){var r=o.isString(n)?e(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(e,t,n){"use strict";var o=n(2);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,n,r,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),o.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),o.isString(r)&&s.push("path="+r),o.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var o=n(2);e.exports=function(e,t){t=t||{};var n={};return o.forEach(["url","method","params","data"],(function(e){void 0!==t[e]&&(n[e]=t[e])})),o.forEach(["headers","auth","proxy"],(function(r){o.isObject(t[r])?n[r]=o.deepMerge(e[r],t[r]):void 0!==t[r]?n[r]=t[r]:o.isObject(e[r])?n[r]=o.deepMerge(e[r]):void 0!==e[r]&&(n[r]=e[r])})),o.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(o){void 0!==t[o]?n[o]=t[o]:void 0!==e[o]&&(n[o]=e[o])})),n}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}var r=n(23);o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])},"object"==s(t)&&"object"==s(n)?n.exports=i():(r=[],void 0===(a="function"==typeof(o=i)?o.apply(t,r):o)||(n.exports=a))}).call(this,n(49),n(143)(e))},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var o=n(8),r=n(35);e.exports=n(7)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(2),r=n(13),a=n(16),i=n(36)("src"),s=Function.toString,c=(""+s).split("toString");n(20).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(a(n,"name")||r(n,"name",t)),e[t]!==n&&(l&&(a(n,i)||r(n,i,e[t]?""+e[t]:c.join(String(t)))),e===o?e[t]=n:s?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[i]||s.call(this)}))},function(e,t,n){var o=n(0),r=n(3),a=n(25),i=/"/g,s=function(e,t,n,o){var r=String(a(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(o).replace(i,"&quot;")+'"'),s+">"+r+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),o(o.P+o.F*r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(53),r=n(25);e.exports=function(e){return o(r(e))}},function(e,t,n){var o=n(54),r=n(35),a=n(17),i=n(24),s=n(16),c=n(109),l=Object.getOwnPropertyDescriptor;t.f=n(7)?l:function(e,t){if(e=a(e),t=i(t,!0),c)try{return l(e,t)}catch(e){}if(s(e,t))return r(!o.f.call(e,t),e[t])}},function(e,t,n){var o=n(16),r=n(10),a=n(80)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),o(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var o=n(12);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";var o=n(3);e.exports=function(e,t){return!!e&&o((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){var o=n(4);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(0),r=n(20),a=n(3);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],i={};i[e]=t(n),o(o.S+o.F*a((function(){n(1)})),"Object",i)}},function(e,t,n){var o=n(21),r=n(53),a=n(10),i=n(9),s=n(97);e.exports=function(e,t){var n=1==e,c=2==e,l=3==e,u=4==e,d=6==e,f=5==e||d,p=t||s;return function(t,s,h){for(var m,v,g=a(t),b=r(g),y=o(s,h,3),w=i(b.length),x=0,_=n?p(t,w):c?p(t,0):void 0;w>x;x++)if((f||x in b)&&(v=y(m=b[x],x,g),e))if(n)_[x]=v;else if(v)switch(e){case 3:return!0;case 5:return m;case 6:return x;case 2:_.push(m)}else if(u)return!1;return d?-1:l||u?u:_}}},function(e,t,n){"use strict";if(n(7)){var o=n(33),r=n(2),a=n(3),i=n(0),s=n(69),c=n(103),l=n(21),u=n(42),d=n(35),f=n(13),p=n(44),h=n(26),m=n(9),v=n(135),g=n(38),b=n(24),y=n(16),w=n(55),x=n(4),_=n(10),S=n(94),T=n(39),C=n(19),E=n(40).f,A=n(96),k=n(36),M=n(5),O=n(28),R=n(59),P=n(66),j=n(99),I=n(47),N=n(63),L=n(41),F=n(98),D=n(125),z=n(8),B=n(18),U=z.f,G=B.f,V=r.RangeError,q=r.TypeError,H=r.Uint8Array,W=Array.prototype,Y=c.ArrayBuffer,X=c.DataView,K=O(0),J=O(2),$=O(3),Z=O(4),Q=O(5),ee=O(6),te=R(!0),ne=R(!1),oe=j.values,re=j.keys,ae=j.entries,ie=W.lastIndexOf,se=W.reduce,ce=W.reduceRight,le=W.join,ue=W.sort,de=W.slice,fe=W.toString,pe=W.toLocaleString,he=M("iterator"),me=M("toStringTag"),ve=k("typed_constructor"),ge=k("def_constructor"),be=s.CONSTR,ye=s.TYPED,we=s.VIEW,xe=O(1,(function(e,t){return Ee(P(e,e[ge]),t)})),_e=a((function(){return 1===new H(new Uint16Array([1]).buffer)[0]})),Se=!!H&&!!H.prototype.set&&a((function(){new H(1).set({})})),Te=function(e,t){var n=h(e);if(n<0||n%t)throw V("Wrong offset!");return n},Ce=function(e){if(x(e)&&ye in e)return e;throw q(e+" is not a typed array!")},Ee=function(e,t){if(!x(e)||!(ve in e))throw q("It is not a typed array constructor!");return new e(t)},Ae=function(e,t){return ke(P(e,e[ge]),t)},ke=function(e,t){for(var n=0,o=t.length,r=Ee(e,o);o>n;)r[n]=t[n++];return r},Me=function(e,t,n){U(e,t,{get:function(){return this._d[n]}})},Oe=function(e){var t,n,o,r,a,i,s=_(e),c=arguments.length,u=c>1?arguments[1]:void 0,d=void 0!==u,f=A(s);if(null!=f&&!S(f)){for(i=f.call(s),o=[],t=0;!(a=i.next()).done;t++)o.push(a.value);s=o}for(d&&c>2&&(u=l(u,arguments[2],2)),t=0,n=m(s.length),r=Ee(this,n);n>t;t++)r[t]=d?u(s[t],t):s[t];return r},Re=function(){for(var e=0,t=arguments.length,n=Ee(this,t);t>e;)n[e]=arguments[e++];return n},Pe=!!H&&a((function(){pe.call(new H(1))})),je=function(){return pe.apply(Pe?de.call(Ce(this)):Ce(this),arguments)},Ie={copyWithin:function(e,t){return D.call(Ce(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Z(Ce(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return F.apply(Ce(this),arguments)},filter:function(e){return Ae(this,J(Ce(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Ce(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Ce(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){K(Ce(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Ce(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Ce(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return le.apply(Ce(this),arguments)},lastIndexOf:function(e){return ie.apply(Ce(this),arguments)},map:function(e){return xe(Ce(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(Ce(this),arguments)},reduceRight:function(e){return ce.apply(Ce(this),arguments)},reverse:function(){for(var e,t=Ce(this).length,n=Math.floor(t/2),o=0;o<n;)e=this[o],this[o++]=this[--t],this[t]=e;return this},some:function(e){return $(Ce(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return ue.call(Ce(this),e)},subarray:function(e,t){var n=Ce(this),o=n.length,r=g(e,o);return new(P(n,n[ge]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,m((void 0===t?o:g(t,o))-r))}},Ne=function(e,t){return Ae(this,de.call(Ce(this),e,t))},Le=function(e){Ce(this);var t=Te(arguments[1],1),n=this.length,o=_(e),r=m(o.length),a=0;if(r+t>n)throw V("Wrong length!");for(;a<r;)this[t+a]=o[a++]},Fe={entries:function(){return ae.call(Ce(this))},keys:function(){return re.call(Ce(this))},values:function(){return oe.call(Ce(this))}},De=function(e,t){return x(e)&&e[ye]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},ze=function(e,t){return De(e,t=b(t,!0))?d(2,e[t]):G(e,t)},Be=function(e,t,n){return!(De(e,t=b(t,!0))&&x(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?U(e,t,n):(e[t]=n.value,e)};be||(B.f=ze,z.f=Be),i(i.S+i.F*!be,"Object",{getOwnPropertyDescriptor:ze,defineProperty:Be}),a((function(){fe.call({})}))&&(fe=pe=function(){return le.call(this)});var Ue=p({},Ie);p(Ue,Fe),f(Ue,he,Fe.values),p(Ue,{slice:Ne,set:Le,constructor:function(){},toString:fe,toLocaleString:je}),Me(Ue,"buffer","b"),Me(Ue,"byteOffset","o"),Me(Ue,"byteLength","l"),Me(Ue,"length","e"),U(Ue,me,{get:function(){return this[ye]}}),e.exports=function(e,t,n,c){var l=e+((c=!!c)?"Clamped":"")+"Array",d="get"+e,p="set"+e,h=r[l],g=h||{},b=h&&C(h),y=!h||!s.ABV,_={},S=h&&h.prototype,A=function(e,n){U(e,n,{get:function(){return e=n,(o=this._d).v[d](e*t+o.o,_e);var e,o},set:function(e){return o=n,r=e,a=this._d,c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),void a.v[p](o*t+a.o,r,_e);var o,r,a},enumerable:!0})};y?(h=n((function(e,n,o,r){u(e,h,l,"_d");var a,i,s,c,d=0,p=0;if(x(n)){if(!(n instanceof Y||"ArrayBuffer"==(c=w(n))||"SharedArrayBuffer"==c))return ye in n?ke(h,n):Oe.call(h,n);a=n,p=Te(o,t);var g=n.byteLength;if(void 0===r){if(g%t)throw V("Wrong length!");if((i=g-p)<0)throw V("Wrong length!")}else if((i=m(r)*t)+p>g)throw V("Wrong length!");s=i/t}else s=v(n),a=new Y(i=s*t);for(f(e,"_d",{b:a,o:p,l:i,e:s,v:new X(a)});d<s;)A(e,d++)})),S=h.prototype=T(Ue),f(S,"constructor",h)):a((function(){h(1)}))&&a((function(){new h(-1)}))&&N((function(e){new h,new h(null),new h(1.5),new h(e)}),!0)||(h=n((function(e,n,o,r){var a;return u(e,h,l),x(n)?n instanceof Y||"ArrayBuffer"==(a=w(n))||"SharedArrayBuffer"==a?void 0!==r?new g(n,Te(o,t),r):void 0!==o?new g(n,Te(o,t)):new g(n):ye in n?ke(h,n):Oe.call(h,n):new g(v(n))})),K(b!==Function.prototype?E(g).concat(E(b)):E(g),(function(e){e in h||f(h,e,g[e])})),h.prototype=S,o||(S.constructor=h));var k=S[he],M=!!k&&("values"==k.name||null==k.name),O=Fe.values;f(h,ve,!0),f(S,ye,l),f(S,we,!0),f(S,ge,h),(c?new h(1)[me]==l:me in S)||U(S,me,{get:function(){return l}}),_[l]=h,i(i.G+i.W+i.F*(h!=g),_),i(i.S,l,{BYTES_PER_ELEMENT:t}),i(i.S+i.F*a((function(){g.of.call(h,1)})),l,{from:Oe,of:Re}),"BYTES_PER_ELEMENT"in S||f(S,"BYTES_PER_ELEMENT",t),i(i.P,l,Ie),L(l),i(i.P+i.F*Se,l,{set:Le}),i(i.P+i.F*!M,l,Fe),o||S.toString==fe||(S.toString=fe),i(i.P+i.F*a((function(){new h(1).slice()})),l,{slice:Ne}),i(i.P+i.F*(a((function(){return[1,2].toLocaleString()!=new h([1,2]).toLocaleString()}))||!a((function(){S.toLocaleString.call([1,2])}))),l,{toLocaleString:je}),I[l]=M?k:O,o||M||f(S,he,O)}}else e.exports=function(){}},function(e,t,n){var o=n(130),r=n(0),a=n(58)("metadata"),i=a.store||(a.store=new(n(133))),s=function(e,t,n){var r=i.get(e);if(!r){if(!n)return;i.set(e,r=new o)}var a=r.get(t);if(!a){if(!n)return;r.set(t,a=new o)}return a};e.exports={store:i,map:s,has:function(e,t,n){var o=s(t,n,!1);return void 0!==o&&o.has(e)},get:function(e,t,n){var o=s(t,n,!1);return void 0===o?void 0:o.get(e)},set:function(e,t,n,o){s(n,o,!0).set(e,t)},keys:function(e,t){var n=s(e,t,!1),o=[];return n&&n.forEach((function(e,t){o.push(t)})),o},key:function(e){return void 0===e||"symbol"==typeof e?e:String(e)},exp:function(e){r(r.S,"Reflect",e)}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var o=n(36)("meta"),r=n(4),a=n(16),i=n(8).f,s=0,c=Object.isExtensible||function(){return!0},l=!n(3)((function(){return c(Object.preventExtensions({}))})),u=function(e){i(e,o,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:o,NEED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,o)){if(!c(e))return"F";if(!t)return"E";u(e)}return e[o].i},getWeak:function(e,t){if(!a(e,o)){if(!c(e))return!0;if(!t)return!1;u(e)}return e[o].w},onFreeze:function(e){return l&&d.NEED&&c(e)&&!a(e,o)&&u(e),e}}},function(e,t){e.exports=!1},function(e,t,n){var o=n(5)("unscopables"),r=Array.prototype;null==r[o]&&n(13)(r,o,{}),e.exports=function(e){r[o][e]=!0}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},function(e,t,n){var o=n(111),r=n(81);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){var o=n(26),r=Math.max,a=Math.min;e.exports=function(e,t){return(e=o(e))<0?r(e+t,0):a(e,t)}},function(e,t,n){var o=n(1),r=n(112),a=n(81),i=n(80)("IE_PROTO"),s=function(){},c=function(){var e,t=n(78)("iframe"),o=a.length;for(t.style.display="none",n(82).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;o--;)delete c.prototype[a[o]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=o(e),n=new s,s.prototype=null,n[i]=e):n=c(),void 0===t?n:r(n,t)}},function(e,t,n){var o=n(111),r=n(81).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(2),r=n(8),a=n(7),i=n(5)("species");e.exports=function(e){var t=o[e];a&&t&&!t[i]&&r.f(t,i,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,o){if(!(e instanceof t)||void 0!==o&&o in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var o=n(21),r=n(123),a=n(94),i=n(1),s=n(9),c=n(96),l={},u={};(t=e.exports=function(e,t,n,d,f){var p,h,m,v,g=f?function(){return e}:c(e),b=o(n,d,t?2:1),y=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(a(g)){for(p=s(e.length);p>y;y++)if((v=t?b(i(h=e[y])[0],h[1]):b(e[y]))===l||v===u)return v}else for(m=g.call(e);!(h=m.next()).done;)if((v=r(m,b,h.value,t))===l||v===u)return v}).BREAK=l,t.RETURN=u},function(e,t,n){var o=n(14);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){var o=n(8).f,r=n(16),a=n(5)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,a)&&o(e,a,{configurable:!0,value:t})}},function(e,t,n){var o=n(0),r=n(25),a=n(3),i=n(84),s="["+i+"]",c=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),u=function(e,t,n){var r={},s=a((function(){return!!i[e]()||"​"!="​"[e]()})),c=r[e]=s?t(d):i[e];n&&(r[n]=c),o(o.P+o.F*s,"String",r)},d=u.trim=function(e,t){return e=String(r(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(l,"")),e};e.exports=u},function(e,t){e.exports={}},function(e,t,n){var o=n(4);e.exports=function(e,t){if(!o(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t){var n,o,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{o="function"==typeof clearTimeout?clearTimeout:i}catch(e){o=i}}();var c,l=[],u=!1,d=-1;function f(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===i||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||u||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){function o(e){if(e)return function(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}(e)}e.exports=o,o.prototype.on=o.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},o.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<o.length;r++)if((n=o[r])===t||n.fn===t){o.splice(r,1);break}return this},o.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var o=0,r=(n=n.slice(0)).length;o<r;++o)n[o].apply(this,t);return this},o.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},o.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var o,r=n(382),a=n(151),i=n(384),s=n(385),c=n(386);"undefined"!=typeof ArrayBuffer&&(o=n(387));var l="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),u="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),d=l||u;t.protocol=3;var f=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=r(f),h={type:"error",data:"parser error"},m=n(388);function v(e,t,n){for(var o=new Array(e.length),r=s(e.length,n),a=function(e,n,r){t(n,(function(t,n){o[e]=n,r(t,o)}))},i=0;i<e.length;i++)a(i,e[i],r)}t.encodePacket=function(e,n,o,r){"function"==typeof n&&(r=n,n=!1),"function"==typeof o&&(r=o,o=null);var a,i=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer)return function(e,n,o){if(!n)return t.encodeBase64Packet(e,o);var r=e.data,a=new Uint8Array(r),i=new Uint8Array(1+r.byteLength);i[0]=f[e.type];for(var s=0;s<a.length;s++)i[s+1]=a[s];return o(i.buffer)}(e,n,r);if(void 0!==m&&i instanceof m)return function(e,n,o){if(!n)return t.encodeBase64Packet(e,o);if(d)return function(e,n,o){if(!n)return t.encodeBase64Packet(e,o);var r=new FileReader;return r.onload=function(){t.encodePacket({type:e.type,data:r.result},n,!0,o)},r.readAsArrayBuffer(e.data)}(e,n,o);var r=new Uint8Array(1);return r[0]=f[e.type],o(new m([r.buffer,e.data]))}(e,n,r);if(i&&i.base64)return a=e,r("b"+t.packets[a.type]+a.data.data);var s=f[e.type];return void 0!==e.data&&(s+=o?c.encode(String(e.data),{strict:!1}):String(e.data)),r(""+s)},t.encodeBase64Packet=function(e,n){var o,r="b"+t.packets[e.type];if(void 0!==m&&e.data instanceof m){var a=new FileReader;return a.onload=function(){var e=a.result.split(",")[1];n(r+e)},a.readAsDataURL(e.data)}try{o=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var i=new Uint8Array(e.data),s=new Array(i.length),c=0;c<i.length;c++)s[c]=i[c];o=String.fromCharCode.apply(null,s)}return r+=btoa(o),n(r)},t.decodePacket=function(e,n,o){if(void 0===e)return h;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(o&&!1===(e=function(e){try{e=c.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return h;var r=e.charAt(0);return Number(r)==r&&p[r]?e.length>1?{type:p[r],data:e.substring(1)}:{type:p[r]}:h}r=new Uint8Array(e)[0];var a=i(e,1);return m&&"blob"===n&&(a=new m([a])),{type:p[r],data:a}},t.decodeBase64Packet=function(e,t){var n=p[e.charAt(0)];if(!o)return{type:n,data:{base64:!0,data:e.substr(1)}};var r=o.decode(e.substr(1));return"blob"===t&&m&&(r=new m([r])),{type:n,data:r}},t.encodePayload=function(e,n,o){"function"==typeof n&&(o=n,n=null);var r=a(e);return n&&r?m&&!d?t.encodePayloadAsBlob(e,o):t.encodePayloadAsArrayBuffer(e,o):e.length?void v(e,(function(e,o){t.encodePacket(e,!!r&&n,!1,(function(e){var t;o(null,(t=e).length+":"+t)}))}),(function(e,t){return o(t.join(""))})):o("0:")},t.decodePayload=function(e,n,o){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,o);var r;if("function"==typeof n&&(o=n,n=null),""===e)return o(h,0,1);for(var a,i,s="",c=0,l=e.length;c<l;c++){var u=e.charAt(c);if(":"===u){if(""===s||s!=(a=Number(s)))return o(h,0,1);if(s!=(i=e.substr(c+1,a)).length)return o(h,0,1);if(i.length){if(r=t.decodePacket(i,n,!1),h.type===r.type&&h.data===r.data)return o(h,0,1);if(!1===o(r,c+a,l))return}c+=a,s=""}else s+=u}return""!==s?o(h,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));v(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){return n(null,e)}))}),(function(e,t){var o=t.reduce((function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2}),0),r=new Uint8Array(o),a=0;return t.forEach((function(e){var t="string"==typeof e,n=e;if(t){for(var o=new Uint8Array(e.length),i=0;i<e.length;i++)o[i]=e.charCodeAt(i);n=o.buffer}r[a++]=t?0:1;var s=n.byteLength.toString();for(i=0;i<s.length;i++)r[a++]=parseInt(s[i]);for(r[a++]=255,o=new Uint8Array(n),i=0;i<o.length;i++)r[a++]=o[i]})),n(r.buffer)}))},t.encodePayloadAsBlob=function(e,n){v(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var o=new Uint8Array(e.length),r=0;r<e.length;r++)o[r]=e.charCodeAt(r);e=o.buffer,t[0]=0}var a=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),i=new Uint8Array(a.length+1);for(r=0;r<a.length;r++)i[r]=parseInt(a[r]);if(i[a.length]=255,m){var s=new m([t.buffer,i.buffer,e]);n(null,s)}}))}),(function(e,t){return n(new m(t))}))},t.decodePayloadAsBinary=function(e,n,o){"function"==typeof n&&(o=n,n=null);for(var r=e,a=[];r.byteLength>0;){for(var s=new Uint8Array(r),c=0===s[0],l="",u=1;255!==s[u];u++){if(l.length>310)return o(h,0,1);l+=s[u]}r=i(r,2+l.length),l=parseInt(l);var d=i(r,0,l);if(c)try{d=String.fromCharCode.apply(null,new Uint8Array(d))}catch(e){var f=new Uint8Array(d);for(d="",u=0;u<f.length;u++)d+=String.fromCharCode(f[u])}a.push(d),r=i(r,l)}var p=a.length;a.forEach((function(e,r){o(t.decodePacket(e,n,!0),r,p)}))}},function(e,t,n){var o=n(373),r=n(105),a=n(148),i=n(74)("socket.io-client");e.exports=t=c;var s=t.managers={};function c(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r=o(e),c=r.source,l=r.id,u=r.path,d=s[l]&&u in s[l].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||d?(i("ignoring socket cache for %s",c),n=a(c,t)):(s[l]||(i("new io instance for %s",c),s[l]=a(c,t)),n=s[l]),r.query&&!t.query&&(t.query=r.query),n.socket(r.path,t)}t.protocol=r.protocol,t.connect=c,t.Manager=n(148),t.Socket=n(154)},function(e,t,n){var o=n(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var o=n(22),r=n(5)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?n:a?o(t):"Object"==(i=o(t))&&"function"==typeof t.callee?"Arguments":i}},function(e,t,n){"use strict";t.a="0.4.26"},function(e,t,n){var o,r;!function(a,i,s){"use strict";void 0===(r="function"==typeof(o=function(){var e=function(e){throw e},t=function(){},n={storeName:"Store",storePrefix:"IDBWrapper-",dbVersion:1,keyPath:"id",autoIncrement:!0,onStoreReady:function(){},onError:e,indexes:[],implementationPreference:["indexedDB","webkitIndexedDB","mozIndexedDB","shimIndexedDB"]},o=function(e,t){for(var o in void 0===t&&"function"==typeof e&&(t=e),"[object Object]"!=Object.prototype.toString.call(e)&&(e={}),n)this[o]=void 0!==e[o]?e[o]:n[o];this.dbName=this.storePrefix+this.storeName,this.dbVersion=parseInt(this.dbVersion,10)||1,t&&(this.onStoreReady=t);var r="object"==typeof window?window:self,a=this.implementationPreference.filter((function(e){return e in r}));this.implementation=a[0],this.idb=r[this.implementation],this.keyRange=r.IDBKeyRange||r.webkitIDBKeyRange||r.mozIDBKeyRange,this.consts={READ_ONLY:"readonly",READ_WRITE:"readwrite",VERSION_CHANGE:"versionchange",NEXT:"next",NEXT_NO_DUPLICATE:"nextunique",PREV:"prev",PREV_NO_DUPLICATE:"prevunique"},this.openDB()},r={constructor:o,version:"1.7.2",db:null,dbName:null,dbVersion:null,store:null,storeName:null,storePrefix:null,keyPath:null,autoIncrement:null,indexes:null,implementationPreference:null,implementation:"",onStoreReady:null,onError:null,_insertIdCount:0,openDB:function(){var e=this.idb.open(this.dbName,this.dbVersion),t=!1;e.onerror=function(e){if("error"in(o=e).target?"VersionError"==o.target.error.name:"errorCode"in o.target&&12==o.target.errorCode)this.onError(new Error("The version number provided is lower than the existing one."));else{var t;if(e.target.error)t=e.target.error;else{var n="IndexedDB unknown error occurred when opening DB "+this.dbName+" version "+this.dbVersion;"errorCode"in e.target&&(n+=" with error code "+e.target.errorCode),t=new Error(n)}this.onError(t)}var o}.bind(this),e.onsuccess=function(e){if(!t)if(this.db)this.onStoreReady();else if(this.db=e.target.result,"string"!=typeof this.db.version)if(this.db.objectStoreNames.contains(this.storeName)){var n=this.db.transaction([this.storeName],this.consts.READ_ONLY);this.store=n.objectStore(this.storeName);var o=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach((function(e){var n=e.name;if(!n)return t=!0,void this.onError(new Error("Cannot create index: No index name given."));if(this.normalizeIndexData(e),this.hasIndex(n)){var r=this.store.index(n);this.indexComplies(r,e)||(t=!0,this.onError(new Error('Cannot modify index "'+n+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),o.splice(o.indexOf(n),1)}else t=!0,this.onError(new Error('Cannot create new index "'+n+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))}),this),o.length&&(t=!0,this.onError(new Error('Cannot delete index(es) "'+o.toString()+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),t||this.onStoreReady()}else this.onError(new Error("Object store couldn't be created."));else this.onError(new Error("The IndexedDB implementation in this browser is outdated. Please upgrade your browser."))}.bind(this),e.onupgradeneeded=function(e){if(this.db=e.target.result,this.db.objectStoreNames.contains(this.storeName))this.store=e.target.transaction.objectStore(this.storeName);else{var n={autoIncrement:this.autoIncrement};null!==this.keyPath&&(n.keyPath=this.keyPath),this.store=this.db.createObjectStore(this.storeName,n)}var o=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach((function(e){var n=e.name;if(n||(t=!0,this.onError(new Error("Cannot create index: No index name given."))),this.normalizeIndexData(e),this.hasIndex(n)){var r=this.store.index(n);this.indexComplies(r,e)||(this.store.deleteIndex(n),this.store.createIndex(n,e.keyPath,{unique:e.unique,multiEntry:e.multiEntry})),o.splice(o.indexOf(n),1)}else this.store.createIndex(n,e.keyPath,{unique:e.unique,multiEntry:e.multiEntry})}),this),o.length&&o.forEach((function(e){this.store.deleteIndex(e)}),this)}.bind(this)},deleteDatabase:function(e,t){if(this.idb.deleteDatabase){this.db.close();var n=this.idb.deleteDatabase(this.dbName);n.onsuccess=e,n.onerror=t}else t(new Error("Browser does not support IndexedDB deleteDatabase!"))},put:function(n,o,r,a){null!==this.keyPath&&(a=r,r=o,o=n),a||(a=e),r||(r=t);var i,s=!1,c=null,l=this.db.transaction([this.storeName],this.consts.READ_WRITE);return l.oncomplete=function(){(s?r:a)(c)},l.onabort=a,l.onerror=a,null!==this.keyPath?(this._addIdPropertyIfNeeded(o),i=l.objectStore(this.storeName).put(o)):i=l.objectStore(this.storeName).put(o,n),i.onsuccess=function(e){s=!0,c=e.target.result},i.onerror=a,l},get:function(n,o,r){r||(r=e),o||(o=t);var a=!1,i=null,s=this.db.transaction([this.storeName],this.consts.READ_ONLY);s.oncomplete=function(){(a?o:r)(i)},s.onabort=r,s.onerror=r;var c=s.objectStore(this.storeName).get(n);return c.onsuccess=function(e){a=!0,i=e.target.result},c.onerror=r,s},remove:function(n,o,r){r||(r=e),o||(o=t);var a=!1,i=null,s=this.db.transaction([this.storeName],this.consts.READ_WRITE);s.oncomplete=function(){(a?o:r)(i)},s.onabort=r,s.onerror=r;var c=s.objectStore(this.storeName).delete(n);return c.onsuccess=function(e){a=!0,i=e.target.result},c.onerror=r,s},batch:function(n,o,r){if(r||(r=e),o||(o=t),"[object Array]"!=Object.prototype.toString.call(n))r(new Error("dataArray argument must be of type Array."));else if(0===n.length)return o(!0);var a=n.length,i=!1,s=!1,c=this.db.transaction([this.storeName],this.consts.READ_WRITE);c.oncomplete=function(){(s?o:r)(s)},c.onabort=r,c.onerror=r;var l=function(){0!=--a||i||(i=!0,s=!0)};return n.forEach((function(e){var t=e.type,n=e.key,o=e.value,a=function(e){c.abort(),i||(i=!0,r(e,t,n))};if("remove"==t){var s=c.objectStore(this.storeName).delete(n);s.onsuccess=l,s.onerror=a}else if("put"==t){var u;null!==this.keyPath?(this._addIdPropertyIfNeeded(o),u=c.objectStore(this.storeName).put(o)):u=c.objectStore(this.storeName).put(o,n),u.onsuccess=l,u.onerror=a}}),this),c},putBatch:function(e,t,n){var o=e.map((function(e){return{type:"put",value:e}}));return this.batch(o,t,n)},upsertBatch:function(n,o,r,a){"function"==typeof o&&(a=r=o,o={}),a||(a=e),r||(r=t),o||(o={}),"[object Array]"!=Object.prototype.toString.call(n)&&a(new Error("dataArray argument must be of type Array."));var i=o.keyField||this.keyPath,s=n.length,c=!1,l=!1,u=0,d=this.db.transaction([this.storeName],this.consts.READ_WRITE);d.oncomplete=function(){l?r(n):a(!1)},d.onabort=a,d.onerror=a;var f=function(e){n[u++][i]=e.target.result,0!=--s||c||(c=!0,l=!0)};return n.forEach((function(e){var t,n=e.key;null!==this.keyPath?(this._addIdPropertyIfNeeded(e),t=d.objectStore(this.storeName).put(e)):t=d.objectStore(this.storeName).put(e,n),t.onsuccess=f,t.onerror=function(e){d.abort(),c||(c=!0,a(e))}}),this),d},removeBatch:function(e,t,n){var o=e.map((function(e){return{type:"remove",key:e}}));return this.batch(o,t,n)},getBatch:function(n,o,r,a){if(r||(r=e),o||(o=t),a||(a="sparse"),"[object Array]"!=Object.prototype.toString.call(n))r(new Error("keyArray argument must be of type Array."));else if(0===n.length)return o([]);var i=[],s=n.length,c=!1,l=null,u=this.db.transaction([this.storeName],this.consts.READ_ONLY);u.oncomplete=function(){(c?o:r)(l)},u.onabort=r,u.onerror=r;var d=function(e){e.target.result||"dense"==a?i.push(e.target.result):"sparse"==a&&i.length++,0==--s&&(c=!0,l=i)};return n.forEach((function(e){var t=u.objectStore(this.storeName).get(e);t.onsuccess=d,t.onerror=function(e){l=e,r(e),u.abort()}}),this),u},getAll:function(n,o){o||(o=e),n||(n=t);var r=this.db.transaction([this.storeName],this.consts.READ_ONLY),a=r.objectStore(this.storeName);return a.getAll?this._getAllNative(r,a,n,o):this._getAllCursor(r,a,n,o),r},_getAllNative:function(e,t,n,o){var r=!1,a=null;e.oncomplete=function(){(r?n:o)(a)},e.onabort=o,e.onerror=o;var i=t.getAll();i.onsuccess=function(e){r=!0,a=e.target.result},i.onerror=o},_getAllCursor:function(e,t,n,o){var r=[],a=!1,i=null;e.oncomplete=function(){(a?n:o)(i)},e.onabort=o,e.onerror=o;var s=t.openCursor();s.onsuccess=function(e){var t=e.target.result;t?(r.push(t.value),t.continue()):(a=!0,i=r)},s.onError=o},clear:function(n,o){o||(o=e),n||(n=t);var r=!1,a=null,i=this.db.transaction([this.storeName],this.consts.READ_WRITE);i.oncomplete=function(){(r?n:o)(a)},i.onabort=o,i.onerror=o;var s=i.objectStore(this.storeName).clear();return s.onsuccess=function(e){r=!0,a=e.target.result},s.onerror=o,i},_addIdPropertyIfNeeded:function(e){void 0===e[this.keyPath]&&(e[this.keyPath]=this._insertIdCount+++Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(e){return this.store.indexNames.contains(e)},normalizeIndexData:function(e){e.keyPath=e.keyPath||e.name,e.unique=!!e.unique,e.multiEntry=!!e.multiEntry},indexComplies:function(e,t){return["keyPath","unique","multiEntry"].every((function(n){if("multiEntry"==n&&void 0===e[n]&&!1===t[n])return!0;if("keyPath"==n&&"[object Array]"==Object.prototype.toString.call(t[n])){var o=t.keyPath,r=e.keyPath;if("string"==typeof r)return o.toString()==r;if("function"!=typeof r.contains&&"function"!=typeof r.indexOf)return!1;if(r.length!==o.length)return!1;for(var a=0,i=o.length;a<i;a++)if(!(r.contains&&r.contains(o[a])||r.indexOf(-1!==o[a])))return!1;return!0}return t[n]==e[n]}))},iterate:function(t,n){var o="desc"==(n=i({index:null,order:"ASC",autoContinue:!0,filterDuplicates:!1,keyRange:null,writeAccess:!1,onEnd:null,onError:e,limit:1/0,offset:0,allowItemRejection:!1},n||{})).order.toLowerCase()?"PREV":"NEXT";n.filterDuplicates&&(o+="_NO_DUPLICATE");var r=!1,a=this.db.transaction([this.storeName],this.consts[n.writeAccess?"READ_WRITE":"READ_ONLY"]),s=a.objectStore(this.storeName);n.index&&(s=s.index(n.index));var c=0;a.oncomplete=function(){r?n.onEnd?n.onEnd():t(null):n.onError(null)},a.onabort=n.onError,a.onerror=n.onError;var l=s.openCursor(n.keyRange,this.consts[o]);return l.onerror=n.onError,l.onsuccess=function(e){var o=e.target.result;if(o)if(n.offset)o.advance(n.offset),n.offset=0;else{var i=t(o.value,o,a);n.allowItemRejection&&!1===i||c++,n.autoContinue&&(c+n.offset<n.limit?o.continue():r=!0)}else r=!0},a},query:function(e,t){var n=[],o=0;return(t=t||{}).autoContinue=!0,t.writeAccess=!1,t.allowItemRejection=!!t.filter,t.onEnd=function(){e(n,o)},this.iterate((function(e){o++;var r=!t.filter||t.filter(e);return!1!==r&&n.push(e),r}),t)},count:function(t,n){var o=(n=i({index:null,keyRange:null},n||{})).onError||e,r=!1,a=null,s=this.db.transaction([this.storeName],this.consts.READ_ONLY);s.oncomplete=function(){(r?t:o)(a)},s.onabort=o,s.onerror=o;var c=s.objectStore(this.storeName);n.index&&(c=c.index(n.index));var l=c.count(n.keyRange);return l.onsuccess=function(e){r=!0,a=e.target.result},l.onError=o,s},makeKeyRange:function(e){var t,n=void 0!==e.lower,o=void 0!==e.upper;switch(!0){case void 0!==e.only:t=this.keyRange.only(e.only);break;case n&&o:t=this.keyRange.bound(e.lower,e.upper,e.excludeLower,e.excludeUpper);break;case n:t=this.keyRange.lowerBound(e.lower,e.excludeLower);break;case o:t=this.keyRange.upperBound(e.upper,e.excludeUpper);break;default:throw new Error('Cannot create KeyRange. Provide one or both of "lower" or "upper" value, or an "only" value.')}return t}},a={};function i(e,t){var n,o;for(n in t)(o=t[n])!==a[n]&&o!==e[n]&&(e[n]=o);return e}return o.prototype=r,o.version=r.version,o})?o.call(t,n,t,e):o)||(e.exports=r)}()},function(e,t,n){var o=n(20),r=n(2),a=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:o.version,mode:n(33)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var o=n(17),r=n(9),a=n(38);e.exports=function(e){return function(t,n,i){var s,c=o(t),l=r(c.length),u=a(i,l);if(e&&n!=n){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var o=n(22);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){var o=n(4),r=n(22),a=n(5)("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==r(e))}},function(e,t,n){var o=n(5)("iterator"),r=!1;try{var a=[7][o]();a.return=function(){r=!0},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var a=[7],i=a[o]();i.next=function(){return{done:n=!0}},a[o]=function(){return i},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var o=n(1);e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var o=n(13),r=n(14),a=n(3),i=n(25),s=n(5);e.exports=function(e,t,n){var c=s(e),l=n(i,c,""[e]),u=l[0],d=l[1];a((function(){var t={};return t[c]=function(){return 7},7!=""[e](t)}))&&(r(String.prototype,e,u),o(RegExp.prototype,c,2==t?function(e,t){return d.call(e,this,t)}:function(e){return d.call(e,this)}))}},function(e,t,n){var o=n(1),r=n(12),a=n(5)("species");e.exports=function(e,t){var n,i=o(e).constructor;return void 0===i||null==(n=o(i)[a])?t:r(n)}},function(e,t,n){var o=n(2).navigator;e.exports=o&&o.userAgent||""},function(e,t,n){"use strict";var o=n(2),r=n(0),a=n(14),i=n(44),s=n(32),c=n(43),l=n(42),u=n(4),d=n(3),f=n(63),p=n(45),h=n(85);e.exports=function(e,t,n,m,v,g){var b=o[e],y=b,w=v?"set":"add",x=y&&y.prototype,_={},S=function(e){var t=x[e];a(x,e,"delete"==e?function(e){return!(g&&!u(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!u(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof y&&(g||x.forEach&&!d((function(){(new y).entries().next()})))){var T=new y,C=T[w](g?{}:-0,1)!=T,E=d((function(){T.has(1)})),A=f((function(e){new y(e)})),k=!g&&d((function(){for(var e=new y,t=5;t--;)e[w](t,t);return!e.has(-0)}));A||((y=t((function(t,n){l(t,y,e);var o=h(new b,t,y);return null!=n&&c(n,v,o[w],o),o}))).prototype=x,x.constructor=y),(E||k)&&(S("delete"),S("has"),v&&S("get")),(k||C)&&S(w),g&&x.clear&&delete x.clear}else y=m.getConstructor(t,e,v,w),i(y.prototype,n),s.NEED=!0;return p(y,e),_[e]=y,r(r.G+r.W+r.F*(y!=b),_),g||m.setStrong(y,e,v),y}},function(e,t,n){for(var o,r=n(2),a=n(13),i=n(36),s=i("typed_array"),c=i("view"),l=!(!r.ArrayBuffer||!r.DataView),u=l,d=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)(o=r[f[d++]])?(a(o.prototype,s,!0),a(o.prototype,c,!0)):u=!1;e.exports={ABV:l,CONSTR:u,TYPED:s,VIEW:c}},function(e,t,n){"use strict";e.exports=n(33)||!n(3)((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete n(2)[e]}))},function(e,t,n){"use strict";var o=n(0);e.exports=function(e){o(o.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){"use strict";var o=n(0),r=n(12),a=n(21),i=n(43);e.exports=function(e){o(o.S,e,{from:function(e){var t,n,o,s,c=arguments[1];return r(this),(t=void 0!==c)&&r(c),null==e?new this:(n=[],t?(o=0,s=a(c,arguments[2],2),i(e,!1,(function(e){n.push(s(e,o++))}))):i(e,!1,n.push,n),new this(n))}})}},function(e,t,n){"use strict";(function(e){
/*!
         * The buffer module from node.js, for the browser.
         *
         * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
         * @license MIT
         */
var o=n(370),r=n(371),a=n(372);function i(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return l(this,e,t,n)}function l(e,t,n,o){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,o){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(o||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===o?new Uint8Array(t):void 0===o?new Uint8Array(t,n):new Uint8Array(t,n,o),c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=f(e,t),e}(e,t,n,o):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var o=0|h(t,n),r=(e=s(e,o)).write(t,n);return r!==o&&(e=e.slice(0,r)),e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(o=t.length)!=o?s(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=s(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var o=0;o<n;o+=1)e[o]=255&t[o];return e}function p(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(o)return N(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,n){var r,a,i,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return r=this,i=n,0===(a=t)&&i===r.length?o.fromByteArray(r):o.fromByteArray(r.slice(a,i));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function v(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function g(e,t,n,o,r){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,o)),c.isBuffer(t))return 0===t.length?-1:b(e,t,n,o,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,o,r);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,o,r){var a,i=1,s=e.length,c=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;i=2,s/=2,c/=2,n/=2}function l(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(r){var u=-1;for(a=n;a<s;a++)if(l(e,a)===l(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===c)return u*i}else-1!==u&&(a-=a-u),u=-1}else for(n+c>s&&(n=s-c),a=n;a>=0;a--){for(var d=!0,f=0;f<c;f++)if(l(e,a+f)!==l(t,f)){d=!1;break}if(d)return a}return-1}function y(e,t,n,o){n=Number(n)||0;var r=e.length-n;o?(o=Number(o))>r&&(o=r):o=r;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");o>a/2&&(o=a/2);for(var i=0;i<o;++i){var s=parseInt(t.substr(2*i,2),16);if(isNaN(s))return i;e[n+i]=s}return i}function w(e,t,n,o){return F(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,o)}function x(e,t,n){n=Math.min(e.length,n);for(var o=[],r=t;r<n;){var a,i,s,c,l=e[r],u=null,d=l>239?4:l>223?3:l>191?2:1;if(r+d<=n)switch(d){case 1:l<128&&(u=l);break;case 2:128==(192&(a=e[r+1]))&&(c=(31&l)<<6|63&a)>127&&(u=c);break;case 3:a=e[r+1],i=e[r+2],128==(192&a)&&128==(192&i)&&(c=(15&l)<<12|(63&a)<<6|63&i)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:a=e[r+1],i=e[r+2],s=e[r+3],128==(192&a)&&128==(192&i)&&128==(192&s)&&(c=(15&l)<<18|(63&a)<<12|(63&i)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,d=1):u>65535&&(u-=65536,o.push(u>>>10&1023|55296),u=56320|1023&u),o.push(u),r+=d}return function(e){var t=e.length;if(t<=_)return String.fromCharCode.apply(String,e);for(var n="",o=0;o<t;)n+=String.fromCharCode.apply(String,e.slice(o,o+=_));return n}(o)}t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=i(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return l(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return o=null,a=t,i=n,u(r=e),r<=0?s(o,r):void 0!==a?"string"==typeof i?s(o,r).fill(a,i):s(o,r).fill(a):s(o,r);var o,r,a,i},c.allocUnsafe=function(e){return d(null,e)},c.allocUnsafeSlow=function(e){return d(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,o=t.length,r=0,a=Math.min(n,o);r<a;++r)if(e[r]!==t[r]){n=e[r],o=t[r];break}return n<o?-1:o<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var o=c.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var i=e[n];if(!c.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(o,r),r+=i.length}return o},c.byteLength=h,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):m.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,o,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===r&&(r=this.length),t<0||n>e.length||o<0||r>this.length)throw new RangeError("out of range index");if(o>=r&&t>=n)return 0;if(o>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(r>>>=0)-(o>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(a,i),l=this.slice(o,r),u=e.slice(t,n),d=0;d<s;++d)if(l[d]!==u[d]){a=l[d],i=u[d];break}return a<i?-1:i<a?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},c.prototype.write=function(e,t,n,o){if(void 0===t)o="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)o=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}var r,a,i,s,c,l,u,d,f,p=this.length-t;if((void 0===n||n>p)&&(n=p),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var h=!1;;)switch(o){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return d=t,f=n,F(N(e,(u=this).length-d),u,d,f);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return s=this,c=t,l=n,F(L(e),s,c,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=t,i=n,F(function(e,t){for(var n,o,r,a=[],i=0;i<e.length&&!((t-=2)<0);++i)o=(n=e.charCodeAt(i))>>8,r=n%256,a.push(r),a.push(o);return a}(e,(r=this).length-a),r,a,i);default:if(h)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),h=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function S(e,t,n){var o="";n=Math.min(e.length,n);for(var r=t;r<n;++r)o+=String.fromCharCode(127&e[r]);return o}function T(e,t,n){var o="";n=Math.min(e.length,n);for(var r=t;r<n;++r)o+=String.fromCharCode(e[r]);return o}function C(e,t,n){var o,r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var a="",i=t;i<n;++i)a+=(o=e[i])<16?"0"+o.toString(16):o.toString(16);return a}function E(e,t,n){for(var o=e.slice(t,n),r="",a=0;a<o.length;a+=2)r+=String.fromCharCode(o[a]+256*o[a+1]);return r}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,n,o,r,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}function M(e,t,n,o){t<0&&(t=65535+t+1);for(var r=0,a=Math.min(e.length-n,2);r<a;++r)e[n+r]=(t&255<<8*(o?r:1-r))>>>8*(o?r:1-r)}function O(e,t,n,o){t<0&&(t=4294967295+t+1);for(var r=0,a=Math.min(e.length-n,4);r<a;++r)e[n+r]=t>>>8*(o?r:3-r)&255}function R(e,t,n,o,r,a){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(e,t,n,o,a){return a||R(e,0,n,4),r.write(e,t,n,o,23,4),n+4}function j(e,t,n,o,a){return a||R(e,0,n,8),r.write(e,t,n,o,52,8),n+8}c.prototype.slice=function(e,t){var n,o=this.length;if((e=~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),(t=void 0===t?o:~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var r=t-e;n=new c(r,void 0);for(var a=0;a<r;++a)n[a]=this[a+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var o=this[e],r=1,a=0;++a<t&&(r*=256);)o+=this[e+a]*r;return o},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var o=this[e+--t],r=1;t>0&&(r*=256);)o+=this[e+--t]*r;return o},c.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var o=this[e],r=1,a=0;++a<t&&(r*=256);)o+=this[e+a]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var o=t,r=1,a=this[e+--o];o>0&&(r*=256);)a+=this[e+--o]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,o){e=+e,t|=0,n|=0,o||k(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,a=0;for(this[t]=255&e;++a<n&&(r*=256);)this[t+a]=e/r&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,o){e=+e,t|=0,n|=0,o||k(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,a=1;for(this[t+r]=255&e;--r>=0&&(a*=256);)this[t+r]=e/a&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t|=0,!o){var r=Math.pow(2,8*n-1);k(this,e,t,n,r-1,-r)}var a=0,i=1,s=0;for(this[t]=255&e;++a<n&&(i*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t|=0,!o){var r=Math.pow(2,8*n-1);k(this,e,t,n,r-1,-r)}var a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,o){if(n||(n=0),o||0===o||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-n&&(o=e.length-t+n);var r,a=o-n;if(this===e&&n<t&&t<o)for(r=a-1;r>=0;--r)e[r+t]=this[r+n];else if(a<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r<a;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},c.prototype.fill=function(e,t,n,o){if("string"==typeof e){if("string"==typeof t?(o=t,t=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!c.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var i=c.isBuffer(e)?e:N(new c(e,o).toString()),s=i.length;for(a=0;a<n-t;++a)this[a+t]=i[a%s]}return this};var I=/[^+\/0-9A-Za-z-_]/g;function N(e,t){var n;t=t||1/0;for(var o=e.length,r=null,a=[],i=0;i<o;++i){if((n=e.charCodeAt(i))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===o){(t-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>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 L(e){return o.toByteArray(function(e){if((e=(t=e,t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(I,"")).length<2)return"";for(var t;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,n,o){for(var r=0;r<o&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(31))},function(e,t,n){(function(o){function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==o&&"env"in o&&(e=o.env.DEBUG),e}(t=e.exports=n(374)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var r=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(a=r))})),e.splice(a,0,o)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())}).call(this,n(49))},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),o=0,r=n.length;o<r;o++){var a=n[o].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(o){function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==o&&"env"in o&&(e=o.env.DEBUG),e}(t=e.exports=n(389)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var r=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(a=r))})),e.splice(a,0,o)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())}).call(this,n(49))},function(e,t,n){var o=n(4),r=n(2).document,a=o(r)&&o(r.createElement);e.exports=function(e){return a?r.createElement(e):{}}},function(e,t,n){var o=n(2),r=n(20),a=n(33),i=n(110),s=n(8).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=a?{}:o.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:i.f(e)})}},function(e,t,n){var o=n(58)("keys"),r=n(36);e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var o=n(2).document;e.exports=o&&o.documentElement},function(e,t,n){var o=n(4),r=n(1),a=function(e,t){if(r(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{(o=n(21)(Function.call,n(18).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:o(e,n),e}}({},!1):void 0),check:a}},function(e,t){e.exports=atob("w5prwofDtMO6wrfCq+GYheGjnuKBluKDuuKDuuKBk+KDvOKCmuKCn+KBt+KAuOKCueKBguKDjeKCgOODtuKBpeKBg++6pg==")},function(e,t,n){var o=n(4),r=n(83).set;e.exports=function(e,t,n){var a,i=t.constructor;return i!==n&&"function"==typeof i&&(a=i.prototype)!==n.prototype&&o(a)&&r&&r(e,a),e}},function(e,t,n){"use strict";var o=n(26),r=n(25);e.exports=function(e){var t=String(r(this)),n="",a=o(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var o=n(26),r=n(25);e.exports=function(e){return function(t,n){var a,i,s=String(r(t)),c=o(n),l=s.length;return c<0||c>=l?e?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===l||(i=s.charCodeAt(c+1))<56320||i>57343?e?s.charAt(c):a:e?s.slice(c,c+2):i-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var o=n(33),r=n(0),a=n(14),i=n(13),s=n(47),c=n(91),l=n(45),u=n(19),d=n(5)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,h,m,v,g){c(n,t,h);var b,y,w,x=function(e){if(!f&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},_=t+" Iterator",S="values"==m,T=!1,C=e.prototype,E=C[d]||C["@@iterator"]||m&&C[m],A=E||x(m),k=m?S?x("entries"):A:void 0,M="Array"==t&&C.entries||E;if(M&&(w=u(M.call(new e)))!==Object.prototype&&w.next&&(l(w,_,!0),o||"function"==typeof w[d]||i(w,d,p)),S&&E&&"values"!==E.name&&(T=!0,A=function(){return E.call(this)}),o&&!g||!f&&!T&&C[d]||i(C,d,A),s[t]=A,s[_]=p,m)if(b={values:S?A:x("values"),keys:v?A:x("keys"),entries:k},g)for(y in b)y in C||a(C,y,b[y]);else r(r.P+r.F*(f||T),t,b);return b}},function(e,t,n){"use strict";var o=n(39),r=n(35),a=n(45),i={};n(13)(i,n(5)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=o(i,{next:r(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var o=n(62),r=n(25);e.exports=function(e,t,n){if(o(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(e))}},function(e,t,n){var o=n(5)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var o=n(47),r=n(5)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[r]===e)}},function(e,t,n){"use strict";var o=n(8),r=n(35);e.exports=function(e,t,n){t in e?o.f(e,t,r(0,n)):e[t]=n}},function(e,t,n){var o=n(55),r=n(5)("iterator"),a=n(47);e.exports=n(20).getIteratorMethod=function(e){if(null!=e)return e[r]||e["@@iterator"]||a[o(e)]}},function(e,t,n){var o=n(254);e.exports=function(e,t){return new(o(e))(t)}},function(e,t,n){"use strict";var o=n(10),r=n(38),a=n(9);e.exports=function(e){for(var t=o(this),n=a(t.length),i=arguments.length,s=r(i>1?arguments[1]:void 0,n),c=i>2?arguments[2]:void 0,l=void 0===c?n:r(c,n);l>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var o=n(34),r=n(126),a=n(47),i=n(17);e.exports=n(90)(Array,"Array",(function(e,t){this._t=i(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,o("keys"),o("values"),o("entries")},function(e,t,n){var o,r,a,i=n(21),s=n(116),c=n(82),l=n(78),u=n(2),d=u.process,f=u.setImmediate,p=u.clearImmediate,h=u.MessageChannel,m=u.Dispatch,v=0,g={},b=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},y=function(e){b.call(e.data)};f&&p||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++v]=function(){s("function"==typeof e?e:Function(e),t)},o(v),v},p=function(e){delete g[e]},"process"==n(22)(d)?o=function(e){d.nextTick(i(b,e,1))}:m&&m.now?o=function(e){m.now(i(b,e,1))}:h?(a=(r=new h).port2,r.port1.onmessage=y,o=i(a.postMessage,a,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(o=function(e){u.postMessage(e+"","*")},u.addEventListener("message",y,!1)):o="onreadystatechange"in l("script")?function(e){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),b.call(e)}}:function(e){setTimeout(i(b,e,1),0)}),e.exports={set:f,clear:p}},function(e,t,n){var o=n(2),r=n(100).set,a=o.MutationObserver||o.WebKitMutationObserver,i=o.process,s=o.Promise,c="process"==n(22)(i);e.exports=function(){var e,t,n,l=function(){var o,r;for(c&&(o=i.domain)&&o.exit();e;){r=e.fn,e=e.next;try{r()}catch(o){throw e?n():t=void 0,o}}t=void 0,o&&o.enter()};if(c)n=function(){i.nextTick(l)};else if(!a||o.navigator&&o.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(l)}}else n=function(){r.call(o,l)};else{var d=!0,f=document.createTextNode("");new a(l).observe(f,{characterData:!0}),n=function(){f.data=d=!d}}return function(o){var r={fn:o,next:void 0};t&&(t.next=r),e||(e=r,n()),t=r}}},function(e,t,n){"use strict";var o=n(12);function r(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)}e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";var o=n(2),r=n(7),a=n(33),i=n(69),s=n(13),c=n(44),l=n(3),u=n(42),d=n(26),f=n(9),p=n(135),h=n(40).f,m=n(8).f,v=n(98),g=n(45),b="Wrong index!",y=o.ArrayBuffer,w=o.DataView,x=o.Math,_=o.RangeError,S=o.Infinity,T=y,C=x.abs,E=x.pow,A=x.floor,k=x.log,M=x.LN2,O=r?"_b":"buffer",R=r?"_l":"byteLength",P=r?"_o":"byteOffset";function j(e,t,n){var o,r,a,i=new Array(n),s=8*n-t-1,c=(1<<s)-1,l=c>>1,u=23===t?E(2,-24)-E(2,-77):0,d=0,f=e<0||0===e&&1/e<0?1:0;for((e=C(e))!=e||e===S?(r=e!=e?1:0,o=c):(o=A(k(e)/M),e*(a=E(2,-o))<1&&(o--,a*=2),(e+=o+l>=1?u/a:u*E(2,1-l))*a>=2&&(o++,a/=2),o+l>=c?(r=0,o=c):o+l>=1?(r=(e*a-1)*E(2,t),o+=l):(r=e*E(2,l-1)*E(2,t),o=0));t>=8;i[d++]=255&r,r/=256,t-=8);for(o=o<<t|r,s+=t;s>0;i[d++]=255&o,o/=256,s-=8);return i[--d]|=128*f,i}function I(e,t,n){var o,r=8*n-t-1,a=(1<<r)-1,i=a>>1,s=r-7,c=n-1,l=e[c--],u=127&l;for(l>>=7;s>0;u=256*u+e[c],c--,s-=8);for(o=u&(1<<-s)-1,u>>=-s,s+=t;s>0;o=256*o+e[c],c--,s-=8);if(0===u)u=1-i;else{if(u===a)return o?NaN:l?-S:S;o+=E(2,t),u-=i}return(l?-1:1)*o*E(2,u-t)}function N(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function L(e){return[255&e]}function F(e){return[255&e,e>>8&255]}function D(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function z(e){return j(e,52,8)}function B(e){return j(e,23,4)}function U(e,t,n){m(e.prototype,t,{get:function(){return this[n]}})}function G(e,t,n,o){var r=p(+n);if(r+t>e[R])throw _(b);var a=e[O]._b,i=r+e[P],s=a.slice(i,i+t);return o?s:s.reverse()}function V(e,t,n,o,r,a){var i=p(+n);if(i+t>e[R])throw _(b);for(var s=e[O]._b,c=i+e[P],l=o(+r),u=0;u<t;u++)s[c+u]=l[a?u:t-u-1]}if(i.ABV){if(!l((function(){y(1)}))||!l((function(){new y(-1)}))||l((function(){return new y,new y(1.5),new y(NaN),"ArrayBuffer"!=y.name}))){for(var q,H=(y=function(e){return u(this,y),new T(p(e))}).prototype=T.prototype,W=h(T),Y=0;W.length>Y;)(q=W[Y++])in y||s(y,q,T[q]);a||(H.constructor=y)}var X=new w(new y(2)),K=w.prototype.setInt8;X.setInt8(0,2147483648),X.setInt8(1,2147483649),!X.getInt8(0)&&X.getInt8(1)||c(w.prototype,{setInt8:function(e,t){K.call(this,e,t<<24>>24)},setUint8:function(e,t){K.call(this,e,t<<24>>24)}},!0)}else y=function(e){u(this,y,"ArrayBuffer");var t=p(e);this._b=v.call(new Array(t),0),this[R]=t},w=function(e,t,n){u(this,w,"DataView"),u(e,y,"DataView");var o=e[R],r=d(t);if(r<0||r>o)throw _("Wrong offset!");if(r+(n=void 0===n?o-r:f(n))>o)throw _("Wrong length!");this[O]=e,this[P]=r,this[R]=n},r&&(U(y,"byteLength","_l"),U(w,"buffer","_b"),U(w,"byteLength","_l"),U(w,"byteOffset","_o")),c(w.prototype,{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return N(G(this,4,e,arguments[1]))},getUint32:function(e){return N(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return I(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return I(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){V(this,1,e,L,t)},setUint8:function(e,t){V(this,1,e,L,t)},setInt16:function(e,t){V(this,2,e,F,t,arguments[2])},setUint16:function(e,t){V(this,2,e,F,t,arguments[2])},setInt32:function(e,t){V(this,4,e,D,t,arguments[2])},setUint32:function(e,t){V(this,4,e,D,t,arguments[2])},setFloat32:function(e,t){V(this,4,e,B,t,arguments[2])},setFloat64:function(e,t){V(this,8,e,z,t,arguments[2])}});g(y,"ArrayBuffer"),g(w,"DataView"),s(w.prototype,i.VIEW,!0),t.ArrayBuffer=y,t.DataView=w},function(e,t){var n=1e3,o=6e4,r=36e5,a=864e5;function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var s,c,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var i=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"days":case"day":case"d":return i*a;case"hours":case"hour":case"hrs":case"hr":case"h":return i*r;case"minutes":case"minute":case"mins":case"min":case"m":return i*o;case"seconds":case"second":case"secs":case"sec":case"s":return i*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(e);if("number"===l&&!1===isNaN(e))return t.long?i(s=e,a,"day")||i(s,r,"hour")||i(s,o,"minute")||i(s,n,"second")||s+" ms":(c=e)>=a?Math.round(c/a)+"d":c>=r?Math.round(c/r)+"h":c>=o?Math.round(c/o)+"m":c>=n?Math.round(c/n)+"s":c+"ms";throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var o=n(375)("socket.io-parser"),r=n(50),a=n(377),i=n(146),s=n(147);function c(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=c,t.Decoder=d;var l=t.ERROR+'"encode error"';function u(e){var n=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data){var r=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===r)return l;n+=r}return o("encoded %j as %s",e,n),n}function d(){this.reconstructor=null}function f(e){this.reconPack=e,this.buffers=[]}function p(e){return{type:t.ERROR,data:"parser error: "+e}}c.prototype.encode=function(e,n){var r,i;o("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type?(r=e,i=n,a.removeBlobs(r,(function(e){var t=a.deconstructPacket(e),n=u(t.packet),o=t.buffers;o.unshift(n),i(o)}))):n([u(e)])},r(d.prototype),d.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,r={type:Number(e.charAt(0))};if(null==t.types[r.type])return p("unknown packet type "+r.type);if(t.BINARY_EVENT===r.type||t.BINARY_ACK===r.type){for(var a="";"-"!==e.charAt(++n)&&(a+=e.charAt(n),n!=e.length););if(a!=Number(a)||"-"!==e.charAt(n))throw new Error("Illegal attachments");r.attachments=Number(a)}if("/"===e.charAt(n+1))for(r.nsp="";++n&&","!==(c=e.charAt(n))&&(r.nsp+=c,n!==e.length););else r.nsp="/";var s=e.charAt(n+1);if(""!==s&&Number(s)==s){for(r.id="";++n;){var c;if(null==(c=e.charAt(n))||Number(c)!=c){--n;break}if(r.id+=e.charAt(n),n===e.length)break}r.id=Number(r.id)}if(e.charAt(++n)){var l=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n));if(!1===l||r.type!==t.ERROR&&!i(l))return p("invalid payload");r.data=l}return o("decoded %s as %j",e,r),r}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new f(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!s(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},d.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},f.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=a.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},f.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){var o=n(380);e.exports=function(e){var t=e.xdomain,n=e.xscheme,r=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||o))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&r)return new XDomainRequest}catch(e){}if(!t)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},function(e,t,n){var o=n(51),r=n(50);function a(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=a,r(a.prototype),a.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},a.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},a.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},a.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},a.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},a.prototype.onData=function(e){var t=o.decodePacket(e,this.socket.binaryType);this.onPacket(t)},a.prototype.onPacket=function(e){this.emit("packet",e)},a.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){(function(n){var o,r;void 0===(r="function"==typeof(o=function(){"use strict";function t(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){i(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function r(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,i=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,i){var s=a.URL||a.webkitURL,c=document.createElement("a");n=n||e.name||"download",c.download=n,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?r(c):o(c.href)?t(e,n,i):r(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){r(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob((s=e,void 0===(c=a)?c={autoBom:!1}:"object"!=typeof c&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\ufeff",s],{type:s.type}):s),n);else if(o(e))t(e,n,a);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){r(i)}))}var s,c}:function(e,n,o,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,o);var i="application/octet-stream"===e.type,s=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&s)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},l.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,d=u.createObjectURL(e);r?r.location=d:location.href=d,r=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});a.saveAs=i.saveAs=i,e.exports=i})?o.apply(t,[]):o)||(e.exports=r)}).call(this,n(31))},function(e,t,n){e.exports=!n(7)&&!n(3)((function(){return 7!=Object.defineProperty(n(78)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){t.f=n(5)},function(e,t,n){var o=n(16),r=n(17),a=n(59)(!1),i=n(80)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),c=0,l=[];for(n in s)n!=i&&o(s,n)&&l.push(n);for(;t.length>c;)o(s,n=t[c++])&&(~a(l,n)||l.push(n));return l}},function(e,t,n){var o=n(8),r=n(1),a=n(37);e.exports=n(7)?Object.defineProperties:function(e,t){r(e);for(var n,i=a(t),s=i.length,c=0;s>c;)o.f(e,n=i[c++],t[n]);return e}},function(e,t,n){var o=n(17),r=n(40).f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==a.call(e)?function(e){try{return r(e)}catch(e){return i.slice()}}(e):r(o(e))}},function(e,t,n){"use strict";var o=n(37),r=n(60),a=n(54),i=n(10),s=n(53),c=Object.assign;e.exports=!c||n(3)((function(){var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=o}))?function(e,t){for(var n=i(e),c=arguments.length,l=1,u=r.f,d=a.f;c>l;)for(var f,p=s(arguments[l++]),h=u?o(p).concat(u(p)):o(p),m=h.length,v=0;m>v;)d.call(p,f=h[v++])&&(n[f]=p[f]);return n}:c},function(e,t,n){"use strict";var o=n(12),r=n(4),a=n(116),i=[].slice,s={},c=function(e,t,n){if(!(t in s)){for(var o=[],r=0;r<t;r++)o[r]="a["+r+"]";s[t]=Function("F,a","return new F("+o.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=o(this),n=i.call(arguments,1),s=function(){var o=n.concat(i.call(arguments));return this instanceof s?c(t,o.length,o):a(t,o,e)};return r(t.prototype)&&(s.prototype=t.prototype),s}},function(e,t){e.exports=function(e,t,n){var o=void 0===n;switch(t.length){case 0:return o?e():e.call(n);case 1:return o?e(t[0]):e.call(n,t[0]);case 2:return o?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return o?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return o?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var o=n(2).parseInt,r=n(46).trim,a=n(84),i=/^[-+]?0[xX]/;e.exports=8!==o(a+"08")||22!==o(a+"0x16")?function(e,t){var n=r(String(e),3);return o(n,t>>>0||(i.test(n)?16:10))}:o},function(e,t,n){var o=n(2).parseFloat,r=n(46).trim;e.exports=1/o(n(84)+"-0")!=-1/0?function(e){var t=r(String(e),3),n=o(t);return 0===n&&"-"==t.charAt(0)?-0:n}:o},function(e,t,n){var o=n(22);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=o(e))throw TypeError(t);return+e}},function(e,t,n){var o=n(4),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){var o=n(87),r=Math.pow,a=r(2,-52),i=r(2,-23),s=r(2,127)*(2-i),c=r(2,-126);e.exports=Math.fround||function(e){var t,n,r=Math.abs(e),l=o(e);return r<c?l*(r/c/i+1/a-1/a)*c*i:(n=(t=(1+i/a)*r)-(t-r))>s||n!=n?l*(1/0):l*n}},function(e,t,n){var o=n(1);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&o(a.call(e)),t}}},function(e,t,n){var o=n(12),r=n(10),a=n(53),i=n(9);e.exports=function(e,t,n,s,c){o(t);var l=r(e),u=a(l),d=i(l.length),f=c?d-1:0,p=c?-1:1;if(n<2)for(;;){if(f in u){s=u[f],f+=p;break}if(f+=p,c?f<0:d<=f)throw TypeError("Reduce of empty array with no initial value")}for(;c?f>=0:d>f;f+=p)f in u&&(s=t(s,u[f],f,l));return s}},function(e,t,n){"use strict";var o=n(10),r=n(38),a=n(9);e.exports=[].copyWithin||function(e,t){var n=o(this),i=a(n.length),s=r(e,i),c=r(t,i),l=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===l?i:r(l,i))-c,i-s),d=1;for(c<s&&s<c+u&&(d=-1,c+=u-1,s+=u-1);u-- >0;)c in n?n[s]=n[c]:delete n[s],s+=d,c+=d;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(64)})},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var o=n(1),r=n(4),a=n(102);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var o=n(131),r=n(48);e.exports=n(68)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=o.getEntry(r(this,"Map"),e);return t&&t.v},set:function(e,t){return o.def(r(this,"Map"),0===e?0:e,t)}},o,!0)},function(e,t,n){"use strict";var o=n(8).f,r=n(39),a=n(44),i=n(21),s=n(42),c=n(43),l=n(90),u=n(126),d=n(41),f=n(7),p=n(32).fastKey,h=n(48),m=f?"_s":"size",v=function(e,t){var n,o=p(t);if("F"!==o)return e._i[o];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,l){var u=e((function(e,o){s(e,u,t,"_i"),e._t=t,e._i=r(null),e._f=void 0,e._l=void 0,e[m]=0,null!=o&&c(o,n,e[l],e)}));return a(u.prototype,{clear:function(){for(var e=h(this,t),n=e._i,o=e._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete n[o.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var n=h(this,t),o=v(n,e);if(o){var r=o.n,a=o.p;delete n._i[o.i],o.r=!0,a&&(a.n=r),r&&(r.p=a),n._f==o&&(n._f=r),n._l==o&&(n._l=a),n[m]--}return!!o},forEach:function(e){h(this,t);for(var n,o=i(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(o(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!v(h(this,t),e)}}),f&&o(u.prototype,"size",{get:function(){return h(this,t)[m]}}),u},def:function(e,t,n){var o,r,a=v(e,t);return a?a.v=n:(e._l=a={i:r=p(t,!0),k:t,v:n,p:o=e._l,n:void 0,r:!1},e._f||(e._f=a),o&&(o.n=a),e[m]++,"F"!==r&&(e._i[r]=a)),e},getEntry:v,setStrong:function(e,t,n){l(e,t,(function(e,n){this._t=h(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?u(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,u(1))}),n?"entries":"values",!n,!0),d(t)}}},function(e,t,n){"use strict";var o=n(131),r=n(48);e.exports=n(68)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,"Set"),e=0===e?0:e,e)}},o)},function(e,t,n){"use strict";var o,r=n(28)(0),a=n(14),i=n(32),s=n(114),c=n(134),l=n(4),u=n(3),d=n(48),f=i.getWeak,p=Object.isExtensible,h=c.ufstore,m={},v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(e){if(l(e)){var t=f(e);return!0===t?h(d(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return c.def(d(this,"WeakMap"),e,t)}},b=e.exports=n(68)("WeakMap",v,g,c,!0,!0);u((function(){return 7!=(new b).set((Object.freeze||Object)(m),7).get(m)}))&&(s((o=c.getConstructor(v,"WeakMap")).prototype,g),i.NEED=!0,r(["delete","has","get","set"],(function(e){var t=b.prototype,n=t[e];a(t,e,(function(t,r){if(l(t)&&!p(t)){this._f||(this._f=new o);var a=this._f[e](t,r);return"set"==e?this:a}return n.call(this,t,r)}))})))},function(e,t,n){"use strict";var o=n(44),r=n(32).getWeak,a=n(1),i=n(4),s=n(42),c=n(43),l=n(28),u=n(16),d=n(48),f=l(5),p=l(6),h=0,m=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},g=function(e,t){return f(e.a,(function(e){return e[0]===t}))};v.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=p(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,a){var l=e((function(e,o){s(e,l,t,"_i"),e._t=t,e._i=h++,e._l=void 0,null!=o&&c(o,n,e[a],e)}));return o(l.prototype,{delete:function(e){if(!i(e))return!1;var n=r(e);return!0===n?m(d(this,t)).delete(e):n&&u(n,this._i)&&delete n[this._i]},has:function(e){if(!i(e))return!1;var n=r(e);return!0===n?m(d(this,t)).has(e):n&&u(n,this._i)}}),l},def:function(e,t,n){var o=r(a(t),!0);return!0===o?m(e).set(t,n):o[e._i]=n,e},ufstore:m}},function(e,t,n){var o=n(26),r=n(9);e.exports=function(e){if(void 0===e)return 0;var t=o(e),n=r(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var o=n(40),r=n(60),a=n(1),i=n(2).Reflect;e.exports=i&&i.ownKeys||function(e){var t=o.f(a(e)),n=r.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";var o=n(61),r=n(4),a=n(9),i=n(21),s=n(5)("isConcatSpreadable");e.exports=function e(t,n,c,l,u,d,f,p){for(var h,m,v=u,g=0,b=!!f&&i(f,p,3);g<l;){if(g in c){if(h=b?b(c[g],g,n):c[g],m=!1,r(h)&&(m=void 0!==(m=h[s])?!!m:o(h)),m&&d>0)v=e(t,n,h,a(h.length),v,d-1)-1;else{if(v>=9007199254740991)throw TypeError();t[v]=h}v++}g++}return v}},function(e,t,n){var o=n(9),r=n(86),a=n(25);e.exports=function(e,t,n,i){var s=String(a(e)),c=s.length,l=void 0===n?" ":String(n),u=o(t);if(u<=c||""==l)return s;var d=u-c,f=r.call(l,Math.ceil(d/l.length));return f.length>d&&(f=f.slice(0,d)),i?f+s:s+f}},function(e,t,n){var o=n(37),r=n(17),a=n(54).f;e.exports=function(e){return function(t){for(var n,i=r(t),s=o(i),c=s.length,l=0,u=[];c>l;)a.call(i,n=s[l++])&&u.push(e?[n,i[n]]:i[n]);return u}}},function(e,t,n){var o=n(55),r=n(141);e.exports=function(e){return function(){if(o(this)!=e)throw TypeError(e+"#toJSON isn't generic");return r(this)}}},function(e,t,n){var o=n(43);e.exports=function(e,t){var n=[];return o(e,!1,n.push,n,t),n}},function(e,t){e.exports=Math.scale||function(e,t,n,o,r){return 0===arguments.length||e!=e||t!=t||n!=n||o!=o||r!=r?NaN:e===1/0||e===-1/0?e:(e-t)*(r-o)/(n-t)+o}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,o=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,r=e.indexOf("["),a=e.indexOf("]");-1!=r&&-1!=a&&(e=e.substring(0,r)+e.substring(r,a).replace(/:/g,";")+e.substring(a,e.length));for(var i=n.exec(e||""),s={},c=14;c--;)s[o[c]]=i[c]||"";return-1!=r&&-1!=a&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){e.exports=function(e){return n&&t.isBuffer(e)||o&&(e instanceof ArrayBuffer||r(e))};var n="function"==typeof t&&"function"==typeof t.isBuffer,o="function"==typeof ArrayBuffer,r=function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}}).call(this,n(73).Buffer)},function(e,t,n){var o=n(378),r=n(154),a=n(50),i=n(105),s=n(155),c=n(156),l=n(74)("socket.io-client:manager"),u=n(153),d=n(394),f=Object.prototype.hasOwnProperty;function p(e,t){if(!(this instanceof p))return new p(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new d({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||i;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=p,p.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)f.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},p.prototype.updateSocketIds=function(){for(var e in this.nsps)f.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},p.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},a(p.prototype),p.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},p.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},p.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(e,t){if(l("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;l("opening %s",this.uri),this.engine=o(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var a=s(n,"open",(function(){r.onopen(),e&&e()})),i=s(n,"error",(function(t){if(l("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var c=this._timeout;l("connect attempt will timeout after %d",c);var u=setTimeout((function(){l("connect attempt timed out after %d",c),a.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",c)}),c);this.subs.push({destroy:function(){clearTimeout(u)}})}return this.subs.push(a),this.subs.push(i),this},p.prototype.onopen=function(){l("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(s(e,"data",c(this,"ondata"))),this.subs.push(s(e,"ping",c(this,"onping"))),this.subs.push(s(e,"pong",c(this,"onpong"))),this.subs.push(s(e,"error",c(this,"onerror"))),this.subs.push(s(e,"close",c(this,"onclose"))),this.subs.push(s(this.decoder,"decoded",c(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(e){this.decoder.add(e)},p.prototype.ondecoded=function(e){this.emit("packet",e)},p.prototype.onerror=function(e){l("error",e),this.emitAll("error",e)},p.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new r(this,e,t),this.nsps[e]=n;var o=this;n.on("connecting",a),n.on("connect",(function(){n.id=o.generateId(e)})),this.autoConnect&&a()}function a(){~u(o.connecting,n)||o.connecting.push(n)}return n},p.prototype.destroy=function(e){var t=u(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},p.prototype.packet=function(e){l("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var o=0;o<n.length;o++)t.engine.write(n[o],e.options);t.encoding=!1,t.processPacketQueue()})))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},p.prototype.cleanup=function(){l("cleanup");for(var e=this.subs.length,t=0;t<e;t++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){l("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(e){l("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)l("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();l("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(l("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(l("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(l("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},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 o=n(106),r=n(381),a=n(390),i=n(391);t.polling=function(e){var t=!1,n=!1,i=!1!==e.jsonp;if("undefined"!=typeof location){var s="https:"===location.protocol,c=location.port;c||(c=s?443:80),t=e.hostname!==location.hostname||c!==e.port,n=e.secure!==s}if(e.xdomain=t,e.xscheme=n,"open"in new o(e)&&!e.forceJSONP)return new r(e);if(!i)throw new Error("JSONP disabled");return new a(e)},t.websocket=i},function(e,t,n){var o=n(107),r=n(75),a=n(51),i=n(76),s=n(152),c=n(77)("engine.io-client:polling");e.exports=u;var l=null!=new(n(106))({xdomain:!1}).responseType;function u(e){var t=e&&e.forceBase64;l&&!t||(this.supportsBinary=!1),o.call(this,e)}i(u,o),u.prototype.name="polling",u.prototype.doOpen=function(){this.poll()},u.prototype.pause=function(e){var t=this;function n(){c("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var o=0;this.polling&&(c("we are currently polling - waiting to pause"),o++,this.once("pollComplete",(function(){c("pre-pause polling complete"),--o||n()}))),this.writable||(c("we are currently writing - waiting to pause"),o++,this.once("drain",(function(){c("pre-pause writing complete"),--o||n()})))}else n()},u.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},u.prototype.onData=function(e){var t=this;c("polling got data %s",e),a.decodePayload(e,this.socket.binaryType,(function(e,n,o){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.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){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};a.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},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=r.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(e,t,n){(function(t){var o=n(383),r=Object.prototype.toString,a="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(o(n)){for(var r=0,s=n.length;r<s;r++)if(e(n[r]))return!0;return!1}if("function"==typeof t&&t.isBuffer&&t.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||a&&n instanceof Blob||i&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return e(n.toJSON(),!0);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&e(n[c]))return!0;return!1}}).call(this,n(73).Buffer)},function(e,t,n){"use strict";var o,r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),a={},i=0,s=0;function c(e){var t="";do{t=r[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function l(){var e=c(+new Date);return e!==o?(i=0,o=e):e+"."+c(i++)}for(;s<64;s++)a[r[s]]=s;l.encode=c,l.decode=function(e){var t=0;for(s=0;s<e.length;s++)t=64*t+a[e.charAt(s)];return t},e.exports=l},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var o=0;o<e.length;++o)if(e[o]===t)return o;return-1}},function(e,t,n){var o=n(105),r=n(50),a=n(393),i=n(155),s=n(156),c=n(74)("socket.io-client:socket"),l=n(75),u=n(151);e.exports=p;var d={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},f=r.prototype.emit;function p(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}r(p.prototype),p.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[i(e,"open",s(this,"onopen")),i(e,"packet",s(this,"onpacket")),i(e,"close",s(this,"onclose"))]}},p.prototype.open=p.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},p.prototype.send=function(){var e=a(arguments);return e.unshift("message"),this.emit.apply(this,e),this},p.prototype.emit=function(e){if(d.hasOwnProperty(e))return f.apply(this,arguments),this;var t=a(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:u(t))?o.BINARY_EVENT:o.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},p.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},p.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?l.encode(this.query):this.query;c("sending connect packet with query %s",e),this.packet({type:o.CONNECT,query:e})}else this.packet({type:o.CONNECT})},p.prototype.onclose=function(e){c("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},p.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===o.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case o.CONNECT:this.onconnect();break;case o.EVENT:case o.BINARY_EVENT:this.onevent(e);break;case o.ACK:case o.BINARY_ACK:this.onack(e);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",e.data)}},p.prototype.onevent=function(e){var t=e.data||[];c("emitting event %j",t),null!=e.id&&(c("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?f.apply(this,t):this.receiveBuffer.push(t)},p.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var r=a(arguments);c("sending ack %j",r),t.packet({type:u(r)?o.BINARY_ACK:o.ACK,id:e,data:r})}}},p.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(c("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):c("bad ack %s",e.id)},p.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},p.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)f.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},p.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},p.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},p.prototype.close=p.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},p.prototype.compress=function(e){return this.flags.compress=e,this},p.prototype.binary=function(e){return this.flags.binary=e,this}},function(e,t){e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var o=n.call(arguments,2);return function(){return t.apply(e,o.concat(n.call(arguments)))}}},function(e,t,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(this&&this[o]||o);else if(Array.isArray(o))e.push(r.apply(this,o));else if("object"===a)for(var i in o)n.call(o,i)&&o[i]&&e.push(this&&this[i]||i)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t,n){var o=n(366);"string"==typeof o&&(o=[[e.i,o,""]]);n(368)(o,{hmr:!0,transform:void 0,insertInto:void 0}),o.locals&&(e.exports=o.locals)},function(e,t,n){var o,r,a,i;function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=function(){function e(){}function t(e,n){return this.identifier=n.identifier,this.position=n.position,this.frontPosition=n.frontPosition,this.collection=e,this.defaults={size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5,mode:"dynamic",zone:document.body,lockX:!1,lockY:!1},this.config(n),"dynamic"===this.options.mode&&(this.options.restOpacity=0),this.id=t.id,t.id+=1,this.buildEl().stylize(),this.instance={el:this.ui.el,on:this.on.bind(this),off:this.off.bind(this),show:this.show.bind(this),hide:this.hide.bind(this),add:this.addToDom.bind(this),remove:this.removeFromDom.bind(this),destroy:this.destroy.bind(this),resetDirection:this.resetDirection.bind(this),computeDirection:this.computeDirection.bind(this),trigger:this.trigger.bind(this),position:this.position,frontPosition:this.frontPosition,ui:this.ui,identifier:this.identifier,id:this.id,options:this.options},this.instance}function n(e,t){var o=this;return o.nipples=[],o.idles=[],o.actives=[],o.ids=[],o.pressureIntervals={},o.manager=e,o.id=n.id,n.id+=1,o.defaults={zone:document.body,multitouch:!1,maxNumberOfNipples:10,mode:"dynamic",position:{top:0,left:0},catchDistance:200,size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5,lockX:!1,lockY:!1},o.config(t),"static"!==o.options.mode&&"semi"!==o.options.mode||(o.options.multitouch=!1),o.options.multitouch||(o.options.maxNumberOfNipples=1),o.updateBox(),o.prepareNipples(),o.bindings(),o.begin(),o.nipples}function o(e){var t,n=this;return n.ids={},n.index=0,n.collections=[],n.config(e),n.prepareCollections(),u.bindEvt(window,"resize",(function(e){clearTimeout(t),t=setTimeout((function(){var e,t=u.getScroll();n.collections.forEach((function(n){n.forEach((function(n){e=n.el.getBoundingClientRect(),n.position={x:t.x+e.left,y:t.y+e.top}}))}))}),100)})),n.collections}var r,a=!!("ontouchstart"in window),i=!!window.PointerEvent,s=!!window.MSPointerEvent,c={start:"mousedown",move:"mousemove",end:"mouseup"},l={};i?r={start:"pointerdown",move:"pointermove",end:"pointerup, pointercancel"}:s?r={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:a?(r={start:"touchstart",move:"touchmove",end:"touchend, touchcancel"},l=c):r=c;var u={distance:function(e,t){var n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)},angle:function(e,t){var n=t.x-e.x,o=t.y-e.y;return u.degrees(Math.atan2(o,n))},findCoord:function(e,t,n){var o={x:0,y:0};return n=u.radians(n),o.x=e.x-t*Math.cos(n),o.y=e.y-t*Math.sin(n),o},radians:function(e){return e*(Math.PI/180)},degrees:function(e){return e*(180/Math.PI)},bindEvt:function(e,t,n){for(var o,r=t.split(/[ ,]+/g),a=0;a<r.length;a+=1)o=r[a],e.addEventListener?e.addEventListener(o,n,!1):e.attachEvent&&e.attachEvent(o,n)},unbindEvt:function(e,t,n){for(var o,r=t.split(/[ ,]+/g),a=0;a<r.length;a+=1)o=r[a],e.removeEventListener?e.removeEventListener(o,n):e.detachEvent&&e.detachEvent(o,n)},trigger:function(e,t,n){var o=new CustomEvent(t,n);e.dispatchEvent(o)},prepareEvent:function(e){return e.preventDefault(),e.type.match(/^touch/)?e.changedTouches:e},getScroll:function(){return{x:void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop}},applyPosition:function(e,t){t.top||t.right||t.bottom||t.left?(e.style.top=t.top,e.style.right=t.right,e.style.bottom=t.bottom,e.style.left=t.left):(e.style.left=t.x+"px",e.style.top=t.y+"px")},getTransitionStyle:function(e,t,n){var o=u.configStylePropertyObject(e);for(var r in o)if(o.hasOwnProperty(r))if("string"==typeof t)o[r]=t+" "+n;else{for(var a="",i=0,s=t.length;i<s;i+=1)a+=t[i]+" "+n+", ";o[r]=a.slice(0,-2)}return o},getVendorStyle:function(e,t){var n=u.configStylePropertyObject(e);for(var o in n)n.hasOwnProperty(o)&&(n[o]=t);return n},configStylePropertyObject:function(e){var t={};return t[e]="",["webkit","Moz","o"].forEach((function(n){t[n+e.charAt(0).toUpperCase()+e.slice(1)]=""})),t},extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},safeExtend:function(e,t){var n={};for(var o in e)e.hasOwnProperty(o)&&t.hasOwnProperty(o)?n[o]=t[o]:e.hasOwnProperty(o)&&(n[o]=e[o]);return n},map:function(e,t){if(e.length)for(var n=0,o=e.length;n<o;n+=1)t(e[n]);else t(e)}};e.prototype.on=function(e,t){var n,o=this,r=e.split(/[ ,]+/g);o._handlers_=o._handlers_||{};for(var a=0;a<r.length;a+=1)n=r[a],o._handlers_[n]=o._handlers_[n]||[],o._handlers_[n].push(t);return o},e.prototype.off=function(e,t){var n=this;return n._handlers_=n._handlers_||{},void 0===e?n._handlers_={}:void 0===t?n._handlers_[e]=null:n._handlers_[e]&&n._handlers_[e].indexOf(t)>=0&&n._handlers_[e].splice(n._handlers_[e].indexOf(t),1),n},e.prototype.trigger=function(e,t){var n,o=this,r=e.split(/[ ,]+/g);o._handlers_=o._handlers_||{};for(var a=0;a<r.length;a+=1)n=r[a],o._handlers_[n]&&o._handlers_[n].length&&o._handlers_[n].forEach((function(e){e.call(o,{type:n,target:o},t)}))},e.prototype.config=function(e){var t=this;t.options=t.defaults||{},e&&(t.options=u.safeExtend(t.options,e))},e.prototype.bindEvt=function(e,t){var n=this;return n._domHandlers_=n._domHandlers_||{},n._domHandlers_[t]=function(){"function"==typeof n["on"+t]?n["on"+t].apply(n,arguments):console.warn('[WARNING] : Missing "on'+t+'" handler.')},u.bindEvt(e,r[t],n._domHandlers_[t]),l[t]&&u.bindEvt(e,l[t],n._domHandlers_[t]),n},e.prototype.unbindEvt=function(e,t){var n=this;return n._domHandlers_=n._domHandlers_||{},u.unbindEvt(e,r[t],n._domHandlers_[t]),l[t]&&u.unbindEvt(e,l[t],n._domHandlers_[t]),delete n._domHandlers_[t],this},t.prototype=new e,t.constructor=t,t.id=0,t.prototype.buildEl=function(e){return this.ui={},this.options.dataOnly||(this.ui.el=document.createElement("div"),this.ui.back=document.createElement("div"),this.ui.front=document.createElement("div"),this.ui.el.className="nipple collection_"+this.collection.id,this.ui.back.className="back",this.ui.front.className="front",this.ui.el.setAttribute("id","nipple_"+this.collection.id+"_"+this.id),this.ui.el.appendChild(this.ui.back),this.ui.el.appendChild(this.ui.front)),this},t.prototype.stylize=function(){if(this.options.dataOnly)return this;var e=this.options.fadeTime+"ms",t=u.getVendorStyle("borderRadius","50%"),n=u.getTransitionStyle("transition","opacity",e),o={};return o.el={position:"absolute",opacity:this.options.restOpacity,display:"block",zIndex:999},o.back={position:"absolute",display:"block",width:this.options.size+"px",height:this.options.size+"px",marginLeft:-this.options.size/2+"px",marginTop:-this.options.size/2+"px",background:this.options.color,opacity:".5"},o.front={width:this.options.size/2+"px",height:this.options.size/2+"px",position:"absolute",display:"block",marginLeft:-this.options.size/4+"px",marginTop:-this.options.size/4+"px",background:this.options.color,opacity:".5"},u.extend(o.el,n),u.extend(o.back,t),u.extend(o.front,t),this.applyStyles(o),this},t.prototype.applyStyles=function(e){for(var t in this.ui)if(this.ui.hasOwnProperty(t))for(var n in e[t])this.ui[t].style[n]=e[t][n];return this},t.prototype.addToDom=function(){return this.options.dataOnly||document.body.contains(this.ui.el)||this.options.zone.appendChild(this.ui.el),this},t.prototype.removeFromDom=function(){return this.options.dataOnly||!document.body.contains(this.ui.el)||this.options.zone.removeChild(this.ui.el),this},t.prototype.destroy=function(){clearTimeout(this.removeTimeout),clearTimeout(this.showTimeout),clearTimeout(this.restTimeout),this.trigger("destroyed",this.instance),this.removeFromDom(),this.off()},t.prototype.show=function(e){var t=this;return t.options.dataOnly||(clearTimeout(t.removeTimeout),clearTimeout(t.showTimeout),clearTimeout(t.restTimeout),t.addToDom(),t.restCallback(),setTimeout((function(){t.ui.el.style.opacity=1}),0),t.showTimeout=setTimeout((function(){t.trigger("shown",t.instance),"function"==typeof e&&e.call(this)}),t.options.fadeTime)),t},t.prototype.hide=function(e){var t=this;return t.options.dataOnly||(t.ui.el.style.opacity=t.options.restOpacity,clearTimeout(t.removeTimeout),clearTimeout(t.showTimeout),clearTimeout(t.restTimeout),t.removeTimeout=setTimeout((function(){var n="dynamic"===t.options.mode?"none":"block";t.ui.el.style.display=n,"function"==typeof e&&e.call(t),t.trigger("hidden",t.instance)}),t.options.fadeTime),t.options.restJoystick&&t.restPosition()),t},t.prototype.restPosition=function(e){var t=this;t.frontPosition={x:0,y:0};var n=t.options.fadeTime+"ms",o={};o.front=u.getTransitionStyle("transition",["top","left"],n);var r={front:{}};r.front={left:t.frontPosition.x+"px",top:t.frontPosition.y+"px"},t.applyStyles(o),t.applyStyles(r),t.restTimeout=setTimeout((function(){"function"==typeof e&&e.call(t),t.restCallback()}),t.options.fadeTime)},t.prototype.restCallback=function(){var e=this,t={};t.front=u.getTransitionStyle("transition","none",""),e.applyStyles(t),e.trigger("rested",e.instance)},t.prototype.resetDirection=function(){this.direction={x:!1,y:!1,angle:!1}},t.prototype.computeDirection=function(e){var t,n,o,r=e.angle.radian,a=Math.PI/4,i=Math.PI/2;if(r>a&&r<3*a&&!e.lockX?t="up":r>-a&&r<=a&&!e.lockY?t="left":r>3*-a&&r<=-a&&!e.lockX?t="down":e.lockY||(t="right"),e.lockY||(n=r>-i&&r<i?"left":"right"),e.lockX||(o=r>0?"up":"down"),e.force>this.options.threshold){var s={};for(var c in this.direction)this.direction.hasOwnProperty(c)&&(s[c]=this.direction[c]);var l={};for(var 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},n.prototype=new e,n.constructor=n,n.id=0,n.prototype.prepareNipples=function(){var e=this,t=e.nipples;t.on=e.on.bind(e),t.off=e.off.bind(e),t.options=e.options,t.destroy=e.destroy.bind(e),t.ids=e.ids,t.id=e.id,t.processOnMove=e.processOnMove.bind(e),t.processOnEnd=e.processOnEnd.bind(e),t.get=function(e){if(void 0===e)return t[0];for(var n=0,o=t.length;n<o;n+=1)if(t[n].identifier===e)return t[n];return!1}},n.prototype.bindings=function(){var e=this;e.bindEvt(e.options.zone,"start"),e.options.zone.style.touchAction="none",e.options.zone.style.msTouchAction="none"},n.prototype.begin=function(){var e=this,t=e.options;if("static"===t.mode){var n=e.createNipple(t.position,e.manager.getIdentifier());n.add(),e.idles.push(n)}},n.prototype.createNipple=function(e,n){var o=this,r=u.getScroll(),a={},i=o.options;if(e.x&&e.y)a={x:e.x-(r.x+o.box.left),y:e.y-(r.y+o.box.top)};else if(e.top||e.right||e.bottom||e.left){var s=document.createElement("DIV");s.style.display="hidden",s.style.top=e.top,s.style.right=e.right,s.style.bottom=e.bottom,s.style.left=e.left,s.style.position="absolute",i.zone.appendChild(s);var c=s.getBoundingClientRect();i.zone.removeChild(s),a=e,e={x:c.left+r.x,y:c.top+r.y}}var l=new t(o,{color:i.color,size:i.size,threshold:i.threshold,fadeTime:i.fadeTime,dataOnly:i.dataOnly,restJoystick:i.restJoystick,restOpacity:i.restOpacity,mode:i.mode,identifier:n,position:e,zone:i.zone,frontPosition:{x:0,y:0}});return i.dataOnly||(u.applyPosition(l.ui.el,a),u.applyPosition(l.ui.front,l.frontPosition)),o.nipples.push(l),o.trigger("added "+l.identifier+":added",l),o.manager.trigger("added "+l.identifier+":added",l),o.bindNipple(l),l},n.prototype.updateBox=function(){this.box=this.options.zone.getBoundingClientRect()},n.prototype.bindNipple=function(e){var t,n=this,o=function(e,o){t=e.type+" "+o.id+":"+e.type,n.trigger(t,o)};e.on("destroyed",n.onDestroyed.bind(n)),e.on("shown hidden rested dir plain",o),e.on("dir:up dir:right dir:down dir:left",o),e.on("plain:up plain:right plain:down plain:left",o)},n.prototype.pressureFn=function(e,t,n){var o=this,r=0;clearInterval(o.pressureIntervals[n]),o.pressureIntervals[n]=setInterval(function(){var n=e.force||e.pressure||e.webkitForce||0;n!==r&&(t.trigger("pressure",n),o.trigger("pressure "+t.identifier+":pressure",n),r=n)}.bind(o),100)},n.prototype.onstart=function(e){var t=this,n=t.options;return e=u.prepareEvent(e),t.updateBox(),u.map(e,(function(e){t.actives.length<n.maxNumberOfNipples&&t.processOnStart(e)})),t.manager.bindDocument(),!1},n.prototype.processOnStart=function(e){var t,n=this,o=n.options,r=n.manager.getIdentifier(e),a=e.force||e.pressure||e.webkitForce||0,i={x:e.pageX,y:e.pageY},s=n.getOrCreate(r,i);s.identifier!==r&&n.manager.removeIdentifier(s.identifier),s.identifier=r;var c=function(t){t.trigger("start",t),n.trigger("start "+t.id+":start",t),t.show(),a>0&&n.pressureFn(e,t,t.identifier),n.processOnMove(e)};if((t=n.idles.indexOf(s))>=0&&n.idles.splice(t,1),n.actives.push(s),n.ids.push(s.identifier),"semi"!==o.mode)c(s);else{if(!(u.distance(i,s.position)<=o.catchDistance))return s.destroy(),void n.processOnStart(e);c(s)}return s},n.prototype.getOrCreate=function(e,t){var n,o=this,r=o.options;return/(semi|static)/.test(r.mode)?(n=o.idles[0])?(o.idles.splice(0,1),n):"semi"===r.mode?o.createNipple(t,e):(console.warn("Coudln't find the needed nipple."),!1):n=o.createNipple(t,e)},n.prototype.processOnMove=function(e){var t=this,n=t.options,o=t.manager.getIdentifier(e),r=t.nipples.get(o);if(!r)return console.error("Found zombie joystick with ID "+o),void t.manager.removeIdentifier(o);r.identifier=o;var a=r.options.size/2,i={x:e.pageX,y:e.pageY},s=u.distance(i,r.position),c=u.angle(i,r.position),l=u.radians(c),d=s/a;s>a&&(s=a,i=u.findCoord(r.position,s,c));var f=i.x-r.position.x,p=i.y-r.position.y;n.lockX&&(p=0),n.lockY&&(f=0),r.frontPosition={x:f,y:p},n.dataOnly||u.applyPosition(r.ui.front,r.frontPosition);var h={identifier:r.identifier,position:i,force:d,pressure:e.force||e.pressure||e.webkitForce||0,distance:s,angle:{radian:l,degree:c},instance:r,lockX:n.lockX,lockY:n.lockY};(h=r.computeDirection(h)).angle={radian:u.radians(180-c),degree:180-c},r.trigger("move",h),t.trigger("move "+r.id+":move",h)},n.prototype.processOnEnd=function(e){var t=this,n=t.options,o=t.manager.getIdentifier(e),r=t.nipples.get(o),a=t.manager.removeIdentifier(r.identifier);r&&(n.dataOnly||r.hide((function(){"dynamic"===n.mode&&(r.trigger("removed",r),t.trigger("removed "+r.id+":removed",r),t.manager.trigger("removed "+r.id+":removed",r),r.destroy())})),clearInterval(t.pressureIntervals[r.identifier]),r.resetDirection(),r.trigger("end",r),t.trigger("end "+r.id+":end",r),t.ids.indexOf(r.identifier)>=0&&t.ids.splice(t.ids.indexOf(r.identifier),1),t.actives.indexOf(r)>=0&&t.actives.splice(t.actives.indexOf(r),1),/(semi|static)/.test(n.mode)?t.idles.push(r):t.nipples.indexOf(r)>=0&&t.nipples.splice(t.nipples.indexOf(r),1),t.manager.unbindDocument(),/(semi|static)/.test(n.mode)&&(t.manager.ids[a.id]=a.identifier))},n.prototype.onDestroyed=function(e,t){var n=this;n.nipples.indexOf(t)>=0&&n.nipples.splice(n.nipples.indexOf(t),1),n.actives.indexOf(t)>=0&&n.actives.splice(n.actives.indexOf(t),1),n.idles.indexOf(t)>=0&&n.idles.splice(n.idles.indexOf(t),1),n.ids.indexOf(t.identifier)>=0&&n.ids.splice(n.ids.indexOf(t.identifier),1),n.manager.removeIdentifier(t.identifier),n.manager.unbindDocument()},n.prototype.destroy=function(){var e=this;for(var t in e.unbindEvt(e.options.zone,"start"),e.nipples.forEach((function(e){e.destroy()})),e.pressureIntervals)e.pressureIntervals.hasOwnProperty(t)&&clearInterval(e.pressureIntervals[t]);e.trigger("destroyed",e.nipples),e.manager.unbindDocument(),e.off()},o.prototype=new e,o.constructor=o,o.prototype.prepareCollections=function(){var e=this;e.collections.create=e.create.bind(e),e.collections.on=e.on.bind(e),e.collections.off=e.off.bind(e),e.collections.destroy=e.destroy.bind(e),e.collections.get=function(t){var n;return e.collections.every((function(e){return!(n=e.get(t))})),n}},o.prototype.create=function(e){return this.createCollection(e)},o.prototype.createCollection=function(e){var t=this,o=new n(t,e);return t.bindCollection(o),t.collections.push(o),o},o.prototype.bindCollection=function(e){var t,n=this,o=function(e,o){t=e.type+" "+o.id+":"+e.type,n.trigger(t,o)};e.on("destroyed",n.onDestroyed.bind(n)),e.on("shown hidden rested dir plain",o),e.on("dir:up dir:right dir:down dir:left",o),e.on("plain:up plain:right plain:down plain:left",o)},o.prototype.bindDocument=function(){var e=this;e.binded||(e.bindEvt(document,"move").bindEvt(document,"end"),e.binded=!0)},o.prototype.unbindDocument=function(e){var t=this;Object.keys(t.ids).length&&!0!==e||(t.unbindEvt(document,"move").unbindEvt(document,"end"),t.binded=!1)},o.prototype.getIdentifier=function(e){var t;return e?void 0===(t=void 0===e.identifier?e.pointerId:e.identifier)&&(t=this.latest||0):t=this.index,void 0===this.ids[t]&&(this.ids[t]=this.index,this.index+=1),this.latest=t,this.ids[t]},o.prototype.removeIdentifier=function(e){var t={};for(var n in this.ids)if(this.ids[n]===e){t.id=n,t.identifier=this.ids[n],delete this.ids[n];break}return t},o.prototype.onmove=function(e){return this.onAny("move",e),!1},o.prototype.onend=function(e){return this.onAny("end",e),!1},o.prototype.oncancel=function(e){return this.onAny("end",e),!1},o.prototype.onAny=function(e,t){var n,o=this,r="processOn"+e.charAt(0).toUpperCase()+e.slice(1);t=u.prepareEvent(t);var a=function(e,t,n){n.ids.indexOf(t)>=0&&(n[r](e),e._found_=!0)};return u.map(t,(function(e){n=o.getIdentifier(e),u.map(o.collections,a.bind(null,e,n)),e._found_||o.removeIdentifier(n)})),!1},o.prototype.destroy=function(){var e=this;e.unbindDocument(!0),e.ids={},e.index=0,e.collections.forEach((function(e){e.destroy()})),e.off()},o.prototype.onDestroyed=function(e,t){var n=this;if(n.collections.indexOf(t)<0)return!1;n.collections.splice(n.collections.indexOf(t),1)};var d=new o;return{create:function(e){return d.create(e)},factory:d}},"object"==s(t)&&void 0!==e?e.exports=i():(r=[],void 0===(a="function"==typeof(o=i)?o.apply(t,r):o)||(e.exports=a))},function(e,t,n){(function(e,t,o){var r;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){"use strict";var i="input is invalid type",s="object"===("undefined"==typeof window?"undefined":a(window)),c=s?window:{};c.JS_MD5_NO_WINDOW&&(s=!1);var l=!s&&"object"===("undefined"==typeof self?"undefined":a(self)),u=!c.JS_MD5_NO_NODE_JS&&"object"===(void 0===e?"undefined":a(e))&&e.versions&&e.versions.node;u?c=t:l&&(c=self);var d,f=!c.JS_MD5_NO_COMMON_JS&&"object"===a(o)&&o.exports,p=n(144),h=!c.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,m="0123456789abcdef".split(""),v=[128,32768,8388608,-2147483648],g=[0,8,16,24],b=["hex","array","digest","buffer","arrayBuffer","base64"],y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),w=[];if(h){var x=new ArrayBuffer(68);d=new Uint8Array(x),w=new Uint32Array(x)}!c.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!c.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===a(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var _=function(e){return function(t){return new T(!0).update(t)[e]()}},S=function(e){var t=require("crypto"),n=require("buffer").Buffer;return function(o){if("string"==typeof o)return t.createHash("md5").update(o,"utf8").digest("hex");if(null==o)throw i;return o.constructor===ArrayBuffer&&(o=new Uint8Array(o)),Array.isArray(o)||ArrayBuffer.isView(o)||o.constructor===n?t.createHash("md5").update(new n(o)).digest("hex"):e(o)}};function T(e){if(e)w[0]=w[16]=w[1]=w[2]=w[3]=w[4]=w[5]=w[6]=w[7]=w[8]=w[9]=w[10]=w[11]=w[12]=w[13]=w[14]=w[15]=0,this.blocks=w,this.buffer8=d;else if(h){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}T.prototype.update=function(e){if(!this.finalized){var t,n=a(e);if("string"!==n){if("object"!==n)throw i;if(null===e)throw i;if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw i;t=!0}for(var o,r,s=0,c=e.length,l=this.blocks,u=this.buffer8;s<c;){if(this.hashed&&(this.hashed=!1,l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),t)if(h)for(r=this.start;s<c&&r<64;++s)u[r++]=e[s];else for(r=this.start;s<c&&r<64;++s)l[r>>2]|=e[s]<<g[3&r++];else if(h)for(r=this.start;s<c&&r<64;++s)(o=e.charCodeAt(s))<128?u[r++]=o:o<2048?(u[r++]=192|o>>6,u[r++]=128|63&o):o<55296||o>=57344?(u[r++]=224|o>>12,u[r++]=128|o>>6&63,u[r++]=128|63&o):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++s)),u[r++]=240|o>>18,u[r++]=128|o>>12&63,u[r++]=128|o>>6&63,u[r++]=128|63&o);else for(r=this.start;s<c&&r<64;++s)(o=e.charCodeAt(s))<128?l[r>>2]|=o<<g[3&r++]:o<2048?(l[r>>2]|=(192|o>>6)<<g[3&r++],l[r>>2]|=(128|63&o)<<g[3&r++]):o<55296||o>=57344?(l[r>>2]|=(224|o>>12)<<g[3&r++],l[r>>2]|=(128|o>>6&63)<<g[3&r++],l[r>>2]|=(128|63&o)<<g[3&r++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++s)),l[r>>2]|=(240|o>>18)<<g[3&r++],l[r>>2]|=(128|o>>12&63)<<g[3&r++],l[r>>2]|=(128|o>>6&63)<<g[3&r++],l[r>>2]|=(128|63&o)<<g[3&r++]);this.lastByteIndex=r,this.bytes+=r-this.start,r>=64?(this.start=r-64,this.hash(),this.hashed=!0):this.start=r}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},T.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=v[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},T.prototype.hash=function(){var e,t,n,o,r,a,i=this.blocks;this.first?t=((t=((e=((e=i[0]-680876937)<<7|e>>>25)-271733879<<0)^(n=((n=(-271733879^(o=((o=(-1732584194^2004318071&e)+i[1]-117830708)<<12|o>>>20)+e<<0)&(-271733879^e))+i[2]-1126478375)<<17|n>>>15)+o<<0)&(o^e))+i[3]-1316259209)<<22|t>>>10)+n<<0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((o=this.h3)^t&(n^o))+i[0]-680876936)<<7|e>>>25)+t<<0)^(n=((n+=(t^(o=((o+=(n^e&(t^n))+i[1]-389564586)<<12|o>>>20)+e<<0)&(e^t))+i[2]+606105819)<<17|n>>>15)+o<<0)&(o^e))+i[3]-1044525330)<<22|t>>>10)+n<<0),t=((t+=((e=((e+=(o^t&(n^o))+i[4]-176418897)<<7|e>>>25)+t<<0)^(n=((n+=(t^(o=((o+=(n^e&(t^n))+i[5]+1200080426)<<12|o>>>20)+e<<0)&(e^t))+i[6]-1473231341)<<17|n>>>15)+o<<0)&(o^e))+i[7]-45705983)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(o^t&(n^o))+i[8]+1770035416)<<7|e>>>25)+t<<0)^(n=((n+=(t^(o=((o+=(n^e&(t^n))+i[9]-1958414417)<<12|o>>>20)+e<<0)&(e^t))+i[10]-42063)<<17|n>>>15)+o<<0)&(o^e))+i[11]-1990404162)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(o^t&(n^o))+i[12]+1804603682)<<7|e>>>25)+t<<0)^(n=((n+=(t^(o=((o+=(n^e&(t^n))+i[13]-40341101)<<12|o>>>20)+e<<0)&(e^t))+i[14]-1502002290)<<17|n>>>15)+o<<0)&(o^e))+i[15]+1236535329)<<22|t>>>10)+n<<0,t=((t+=((o=((o+=(t^n&((e=((e+=(n^o&(t^n))+i[1]-165796510)<<5|e>>>27)+t<<0)^t))+i[6]-1069501632)<<9|o>>>23)+e<<0)^e&((n=((n+=(e^t&(o^e))+i[11]+643717713)<<14|n>>>18)+o<<0)^o))+i[0]-373897302)<<20|t>>>12)+n<<0,t=((t+=((o=((o+=(t^n&((e=((e+=(n^o&(t^n))+i[5]-701558691)<<5|e>>>27)+t<<0)^t))+i[10]+38016083)<<9|o>>>23)+e<<0)^e&((n=((n+=(e^t&(o^e))+i[15]-660478335)<<14|n>>>18)+o<<0)^o))+i[4]-405537848)<<20|t>>>12)+n<<0,t=((t+=((o=((o+=(t^n&((e=((e+=(n^o&(t^n))+i[9]+568446438)<<5|e>>>27)+t<<0)^t))+i[14]-1019803690)<<9|o>>>23)+e<<0)^e&((n=((n+=(e^t&(o^e))+i[3]-187363961)<<14|n>>>18)+o<<0)^o))+i[8]+1163531501)<<20|t>>>12)+n<<0,t=((t+=((o=((o+=(t^n&((e=((e+=(n^o&(t^n))+i[13]-1444681467)<<5|e>>>27)+t<<0)^t))+i[2]-51403784)<<9|o>>>23)+e<<0)^e&((n=((n+=(e^t&(o^e))+i[7]+1735328473)<<14|n>>>18)+o<<0)^o))+i[12]-1926607734)<<20|t>>>12)+n<<0,t=((t+=((a=(o=((o+=((r=t^n)^(e=((e+=(r^o)+i[5]-378558)<<4|e>>>28)+t<<0))+i[8]-2022574463)<<11|o>>>21)+e<<0)^e)^(n=((n+=(a^t)+i[11]+1839030562)<<16|n>>>16)+o<<0))+i[14]-35309556)<<23|t>>>9)+n<<0,t=((t+=((a=(o=((o+=((r=t^n)^(e=((e+=(r^o)+i[1]-1530992060)<<4|e>>>28)+t<<0))+i[4]+1272893353)<<11|o>>>21)+e<<0)^e)^(n=((n+=(a^t)+i[7]-155497632)<<16|n>>>16)+o<<0))+i[10]-1094730640)<<23|t>>>9)+n<<0,t=((t+=((a=(o=((o+=((r=t^n)^(e=((e+=(r^o)+i[13]+681279174)<<4|e>>>28)+t<<0))+i[0]-358537222)<<11|o>>>21)+e<<0)^e)^(n=((n+=(a^t)+i[3]-722521979)<<16|n>>>16)+o<<0))+i[6]+76029189)<<23|t>>>9)+n<<0,t=((t+=((a=(o=((o+=((r=t^n)^(e=((e+=(r^o)+i[9]-640364487)<<4|e>>>28)+t<<0))+i[12]-421815835)<<11|o>>>21)+e<<0)^e)^(n=((n+=(a^t)+i[15]+530742520)<<16|n>>>16)+o<<0))+i[2]-995338651)<<23|t>>>9)+n<<0,t=((t+=((o=((o+=(t^((e=((e+=(n^(t|~o))+i[0]-198630844)<<6|e>>>26)+t<<0)|~n))+i[7]+1126891415)<<10|o>>>22)+e<<0)^((n=((n+=(e^(o|~t))+i[14]-1416354905)<<15|n>>>17)+o<<0)|~e))+i[5]-57434055)<<21|t>>>11)+n<<0,t=((t+=((o=((o+=(t^((e=((e+=(n^(t|~o))+i[12]+1700485571)<<6|e>>>26)+t<<0)|~n))+i[3]-1894986606)<<10|o>>>22)+e<<0)^((n=((n+=(e^(o|~t))+i[10]-1051523)<<15|n>>>17)+o<<0)|~e))+i[1]-2054922799)<<21|t>>>11)+n<<0,t=((t+=((o=((o+=(t^((e=((e+=(n^(t|~o))+i[8]+1873313359)<<6|e>>>26)+t<<0)|~n))+i[15]-30611744)<<10|o>>>22)+e<<0)^((n=((n+=(e^(o|~t))+i[6]-1560198380)<<15|n>>>17)+o<<0)|~e))+i[13]+1309151649)<<21|t>>>11)+n<<0,t=((t+=((o=((o+=(t^((e=((e+=(n^(t|~o))+i[4]-145523070)<<6|e>>>26)+t<<0)|~n))+i[11]-1120210379)<<10|o>>>22)+e<<0)^((n=((n+=(e^(o|~t))+i[2]+718787259)<<15|n>>>17)+o<<0)|~e))+i[9]-343485551)<<21|t>>>11)+n<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=n-1732584194<<0,this.h3=o+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+o<<0)},T.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,o=this.h3;return m[e>>4&15]+m[15&e]+m[e>>12&15]+m[e>>8&15]+m[e>>20&15]+m[e>>16&15]+m[e>>28&15]+m[e>>24&15]+m[t>>4&15]+m[15&t]+m[t>>12&15]+m[t>>8&15]+m[t>>20&15]+m[t>>16&15]+m[t>>28&15]+m[t>>24&15]+m[n>>4&15]+m[15&n]+m[n>>12&15]+m[n>>8&15]+m[n>>20&15]+m[n>>16&15]+m[n>>28&15]+m[n>>24&15]+m[o>>4&15]+m[15&o]+m[o>>12&15]+m[o>>8&15]+m[o>>20&15]+m[o>>16&15]+m[o>>28&15]+m[o>>24&15]},T.prototype.toString=T.prototype.hex,T.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,o=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&o,o>>8&255,o>>16&255,o>>24&255]},T.prototype.array=T.prototype.digest,T.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},T.prototype.buffer=T.prototype.arrayBuffer,T.prototype.base64=function(){for(var e,t,n,o="",r=this.array(),a=0;a<15;)e=r[a++],t=r[a++],n=r[a++],o+=y[e>>>2]+y[63&(e<<4|t>>>4)]+y[63&(t<<2|n>>>6)]+y[63&n];return e=r[a],o+(y[e>>>2]+y[e<<4&63]+"==")};var C=function(){var e=_("hex");u&&(e=S(e)),e.create=function(){return new T},e.update=function(t){return e.create().update(t)};for(var t=0;t<b.length;++t){var n=b[t];e[n]=_(n)}return e}();f?o.exports=C:(c.md5=C,p&&(void 0===(r=function(){return C}.call(C,n,C,o))||(o.exports=r)))}()}).call(this,n(49),n(31),n(143)(e))},function(e,t,n){"use strict";(function(e,o,r){var a=n(52),i=n.n(a);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){var e=this,t=new l;e.chunks={},e.users={},e.readAsArrayBuffer=function(n,r,a){var i={file:n,earlyCallback:function(e){r(o(e,{currentPosition:-1}))},extra:a||{userid:0}};n.extra&&Object.keys(n.extra).length&&Object.keys(n.extra).forEach((function(e){i.extra[e]=n.extra[e]})),t.readAsArrayBuffer(e,i)},e.getNextChunk=function(t,n,r){var a;void 0!==t.currentPosition&&(a=t.currentPosition,t=t.uuid);var i=e.chunks[t];if(i){void 0!==r?(e.users[r+""]||(e.users[r+""]={fileUUID:t,userid:r,currentPosition:-1}),void 0!==a&&(e.users[r+""].currentPosition=a),e.users[r+""].currentPosition++,a=e.users[r+""].currentPosition):(void 0!==a&&(e.chunks[t].currentPosition=a),e.chunks[t].currentPosition++,a=e.chunks[t].currentPosition);var s=i[a];if(!s)return delete e.chunks[t],void e.convertToArrayBuffer({chunkMissing:!0,currentPosition:a,uuid:t},n);s=o(s),void 0!==r&&(s.remoteUserId=r+""),s.start&&e.onBegin(s),s.end&&e.onEnd(s),e.onProgress(s),e.convertToArrayBuffer(s,(function(e){s.currentPosition!=s.maxChunks?n(e,!1):n(e,!0)}))}};var n=new d(e);function o(e,t){if(null==e||"object"!=s(e))return e;if(e.constructor!=Object&&e.constructor!=Array)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);for(var n in t=t||new e.constructor,e)t[n]=void 0===t[n]?o(e[n],null):t[n];return t}e.addChunk=function(t,o){t&&n.receive(t,(function(t){e.convertToArrayBuffer({readyForNextChunk:!0,currentPosition:t.currentPosition,uuid:t.uuid},o)}))},e.chunkMissing=function(e){delete n.chunks[e.uuid],delete n.chunksWaiters[e.uuid]},e.onBegin=function(){},e.onEnd=function(){},e.onProgress=function(){},e.convertToObject=f.ConvertToObject,e.convertToArrayBuffer=f.ConvertToArrayBuffer,e.setMultipleUsers=function(){}}function l(){this.readAsArrayBuffer=function(e,t){var n=t.earlyCallback;delete t.earlyCallback,function(e,t){t=t||function(e){postMessage(e)};var n=e.file;n.uuid||(n.uuid=(100*Math.random()).toString().replace(/\./g,""));var o=e.chunkSize||15e3;e.extra&&e.extra.chunkSize&&(o=e.extra.chunkSize);var r,a=0,i=o,s=Math.floor(Math.min(1e8,i)/o)*o,c=Math.ceil(n.size/o);n.maxChunks=c;var l=0,u=[];t({currentPosition:l,uuid:n.uuid,maxChunks:c,size:n.size,name:n.name,type:n.type,lastModifiedDate:(n.lastModifiedDate||new Date).toString(),start:!0});var d,f=new FileReader;f.onloadend=function(e){e.target.readyState==FileReader.DONE&&function(e,i,p){r=Math.ceil(i.byteLength/o);for(var h=0;h<r;h++){var m=h*o;u[l]=i.slice(m,Math.min(m+o,i.byteLength)),t({uuid:n.uuid,buffer:u[l],currentPosition:l,maxChunks:c,size:n.size,name:n.name,lastModifiedDate:(n.lastModifiedDate||new Date).toString(),type:n.type}),l++}(1+ ++a)*s<n.size?(d=n.slice(a*s,(a+1)*s),f.readAsArrayBuffer(d)):a*s<n.size?(d=n.slice(a*s,n.size),f.readAsArrayBuffer(d)):(n.url=URL.createObjectURL(n),t({currentPosition:l,uuid:n.uuid,maxChunks:c,size:n.size,name:n.name,lastModifiedDate:(n.lastModifiedDate||new Date).toString(),url:URL.createObjectURL(n),type:n.type,end:!0}))}(n.name,e.target.result)},l+=1,d=n.slice(a*s,(a+1)*s),f.readAsArrayBuffer(d)}(t,(function(o){e.chunks[o.uuid]||(e.chunks[o.uuid]={currentPosition:-1}),t.extra=t.extra||{userid:0},o.userid=t.userid||t.extra.userid||0,o.extra=t.extra,e.chunks[o.uuid][o.currentPosition]=o,o.end&&n&&(n(o.uuid),n=null),o.maxChunks>200&&200==o.currentPosition&&n&&(n(o.uuid),n=null)}))}}function u(){var e=this,t=function(){};function n(n,o,r){n=n||function(){};var a=document.createElement("input");a.type="file",o&&(a.multiple=!0),r&&(a.webkitdirectory=!0),a.accept=e.accept,a.onclick=function(){a.clickStarted=!0},document.body.onfocus=function(){setTimeout((function(){a.clickStarted&&(a.clickStarted=!1,a.value||t())}),500)},a.onchange=function(){if(o){if(!a.files.length)return void console.error("No file selected.");var e=[];return Array.from(a.files).forEach((function(t){t.url=t.webkitRelativePath,e.push(t)})),void n(e)}a.files[0]?(n(a.files[0]),a.parentNode.removeChild(a)):console.error("No file selected.")},a.style.display="none",(document.body||document.documentElement).appendChild(a),function(e){if("function"!=typeof e.click)if("function"!=typeof e.change){if(void 0!==document.createEvent("Event")&&"function"==typeof(t=document.createEvent("Event")).initEvent&&"function"==typeof e.dispatchEvent)return t.initEvent("click",!0,!0),void e.dispatchEvent(t);var t=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(t)}else e.change();else e.click()}(a)}e.selectSingleFile=function(e,o){o&&(t=o),n(e)},e.selectMultipleFiles=function(e,o){o&&(t=o),n(e,!0)},e.selectDirectory=function(e,o){o&&(t=o),n(e,!0,!0)},e.accept="*.*"}function d(e){var t=this;t.chunks={},t.chunksWaiters={},t.receive=function n(o,r){if(o.uuid){if(o.start&&!t.chunks[o.uuid]&&(t.chunks[o.uuid]={},e.onBegin&&e.onBegin(o)),!o.end&&o.buffer&&(t.chunks[o.uuid][o.currentPosition]=o.buffer),o.end){var a=t.chunks[o.uuid],i=[];Object.keys(a).forEach((function(e,t){i.push(a[e])}));var s=new Blob(i,{type:o.type});(s=p(s,o)).url=URL.createObjectURL(s),s.uuid=o.uuid,s.size||console.error("Something went wrong. Blob Size is 0."),e.onEnd&&e.onEnd(s),delete t.chunks[o.uuid],delete t.chunksWaiters[o.uuid]}o.buffer&&e.onProgress&&e.onProgress(o),o.end||(r(o),t.chunksWaiters[o.uuid]=function(){setTimeout((function e(){o.buffer&&t.chunks[o.uuid]&&(o.currentPosition==o.maxChunks||t.chunks[o.uuid][o.currentPosition]||(r(o),setTimeout(e,5e3)))}),5e3)},t.chunksWaiters[o.uuid]())}else e.convertToObject(o,(function(e){n(e)}))}}var f={ConvertToArrayBuffer:function(e,t){S.pack(e,(function(e){t(e.buffer)}))},ConvertToObject:function(e,t){S.unpack(e,t)}};function p(e,t){if(e||(e={}),!t)return e;for(var n in t)try{e[n]=t[n]}catch(e){}return e}var h=Uint8Array.BYTES_PER_ELEMENT,m=Uint16Array.BYTES_PER_ELEMENT,v=Uint32Array.BYTES_PER_ELEMENT,g={NULL:0,UNDEFINED:1,STRING:2,NUMBER:3,BOOLEAN:4,ARRAY:5,OBJECT:6,INT8ARRAY:7,INT16ARRAY:8,INT32ARRAY:9,UINT8ARRAY:10,UINT16ARRAY:11,UINT32ARRAY:12,FLOAT32ARRAY:13,FLOAT64ARRAY:14,ARRAYBUFFER:15,BLOB:16,FILE:16,BUFFER:17},b=[null,null,"Uint16","Float64","Uint8",null,null,"Int8","Int16","Int32","Uint8","Uint16","Uint32","Float32","Float64","Uint8","Uint8","Uint8"],y=function t(n,o){var r,a,i,s,c,l=0;r=n.getUint8(o,!1),o+=h,r!==g.ARRAY&&r!==g.OBJECT||(a=n.getUint16(o,!1),o+=m),i=n.getUint32(o,!1),o+=v;var u=b[r],d=null===u?0:window[u+"Array"].BYTES_PER_ELEMENT;switch(r){case g.NULL:case g.UNDEFINED:s=null;break;case g.STRING:a=i/d;var f=[];for(l=0;l<a;l++){var p=n.getUint16(o,!1);o+=d,f.push(String.fromCharCode(p))}s=f.join("");break;case g.NUMBER:s=n.getFloat64(o,!1),o+=d;break;case g.BOOLEAN:s=1===n.getUint8(o,!1),o+=d;break;case g.INT8ARRAY:case g.INT16ARRAY:case g.INT32ARRAY:case g.UINT8ARRAY:case g.UINT16ARRAY:case g.UINT32ARRAY:case g.FLOAT32ARRAY:case g.FLOAT64ARRAY:case g.ARRAYBUFFER:c=n.buffer.slice(o,o+i),o+=i,s=r===g.ARRAYBUFFER?c:new window[u+"Array"](c);break;case g.BLOB:if(window.Blob){var y=t(n,o),w=t(n,y.cursor);o=w.cursor,s=new Blob([w.value],{type:y.value})}else c=n.buffer.slice(o,o+i),o+=i,s=new e(c);break;case g.ARRAY:for(s=[],l=0;l<a;l++)o=(c=t(n,o)).cursor,s.push(c.value);break;case g.OBJECT:for(s={},l=0;l<a;l++){var x=t(n,o),_=t(n,x.cursor);o=_.cursor,s[x.value]=_.value}break;default:throw"TypeError: Type not supported."}return{value:s,cursor:o}},w=function(e,t){for(var n=e.length,o=[],r=0,a=0,i=0;i<e.length;i++)!function(i){x(e[i],(function(e){if(o[i]=e,a+=e[0].header_size+e[0].byte_length,++r===n){for(var s=[],c=0;c<o.length;c++)s=s.concat(o[c]);t(s,a)}}))}(i)},x=function(t,n){var o,r,a=h+v,i=0,c=0,l=t;switch(r=function(t){var n=void 0;if(void 0===t)n=g.UNDEFINED;else if(null===t)n=g.NULL;else{var o=t.constructor.name,r=t.constructor.toString().match(/\w+/g)[1];if(void 0!==o&&void 0!==g[o.toUpperCase()])n=g[o.toUpperCase()];else if(void 0!==r&&void 0!==g[r.toUpperCase()])n=g[r.toUpperCase()];else switch(s(t)){case"string":n=g.STRING;break;case"number":n=g.NUMBER;break;case"boolean":n=g.BOOLEAN;break;case"object":t instanceof Array?n=g.ARRAY:t instanceof Int8Array?n=g.INT8ARRAY:t instanceof Int16Array?n=g.INT16ARRAY:t instanceof Int32Array?n=g.INT32ARRAY:t instanceof Uint8Array?n=g.UINT8ARRAY:t instanceof Uint16Array?n=g.UINT16ARRAY:t instanceof Uint32Array?n=g.UINT32ARRAY:t instanceof Float32Array?n=g.FLOAT32ARRAY:t instanceof Float64Array?n=g.FLOAT64ARRAY:t instanceof ArrayBuffer?n=g.ARRAYBUFFER:t instanceof Blob?n=g.BLOB:t instanceof e?n=g.BUFFER:t instanceof Object&&(n=g.OBJECT)}}return n}(t),o=null==b[r]?0:window[b[r]+"Array"].BYTES_PER_ELEMENT,r){case g.UNDEFINED:case g.NULL:break;case g.NUMBER:case g.BOOLEAN:i=o;break;case g.STRING:case g.INT8ARRAY:case g.INT16ARRAY:case g.INT32ARRAY:case g.UINT8ARRAY:case g.UINT16ARRAY:case g.UINT32ARRAY:case g.FLOAT32ARRAY:case g.FLOAT64ARRAY:i+=(c=t.length)*o;break;case g.ARRAY:return void w(t,(function(e,o){n([{type:r,length:t.length,header_size:a+m,byte_length:o,value:null}].concat(e))}));case g.OBJECT:var u=[];for(var d in t)t.hasOwnProperty(d)&&(u.push(d),u.push(t[d]),c++);return void w(u,(function(e,t){n([{type:r,length:c,header_size:a+m,byte_length:t,value:null}].concat(e))}));case g.ARRAYBUFFER:i+=t.byteLength;break;case g.BLOB:var f=t.type,p=new FileReader;return p.onload=function(e){w([f,e.target.result],(function(e,t){n([{type:r,length:c,header_size:a,byte_length:t,value:null}].concat(e))}))},p.onerror=function(e){throw"FileReader Error: "+e},void p.readAsArrayBuffer(t);case g.BUFFER:i+=t.length;break;default:throw'TypeError: Type "'+t.constructor.name+'" not supported.'}n([{type:r,length:c,header_size:a,byte_length:i,value:l}].concat([]))},_=function(e,t){var n=e instanceof DataView?e:new DataView(e);return y(n,0).value},S={pack:function(e,t){try{x(e,(function(e){t(function(e){var t=0,n=0,o=0,r=new ArrayBuffer(e[0].byte_length+e[0].header_size),a=new DataView(r);for(n=0;n<e.length;n++){e[n].header_size;var i=e[n].type,s=e[n].length,c=e[n].value,l=e[n].byte_length,u=b[i],d=null===u?0:window[u+"Array"].BYTES_PER_ELEMENT;switch(i===g.BUFFER?a.setUint8(t,g.BLOB,!1):a.setUint8(t,i,!1),t+=h,i!==g.ARRAY&&i!==g.OBJECT||(a.setUint16(t,s,!1),t+=m),a.setUint32(t,l,!1),t+=v,i){case g.NULL:case g.UNDEFINED:break;case g.STRING:for(o=0;o<s;o++,t+=d)a.setUint16(t,c.charCodeAt(o),!1);break;case g.NUMBER:case g.BOOLEAN:a["set"+u](t,c,!1),t+=d;break;case g.INT8ARRAY:case g.INT16ARRAY:case g.INT32ARRAY:case g.UINT8ARRAY:case g.UINT16ARRAY:case g.UINT32ARRAY:case g.FLOAT32ARRAY:case g.FLOAT64ARRAY:new Uint8Array(a.buffer,t,l).set(new Uint8Array(c.buffer)),t+=l;break;case g.ARRAYBUFFER:case g.BUFFER:new Uint8Array(a.buffer,t,l).set(new Uint8Array(c)),t+=l;break;case g.BLOB:case g.ARRAY:case g.OBJECT:break;default:throw"TypeError: Unexpected type found."}}return a}(e))}))}catch(e){throw e}},unpack:function(e,t){try{t(_(e))}catch(e){throw e}}};t.a=function(e,t){var a;function l(e,t){function n(e){return!e.audio&&!e.video&&!e.screen&&e.data}var o="";o+="?userid="+e.userid,o+="&sessionid="+e.sessionid,o+="&msgEvent="+e.socketMessageEvent,o+="&socketCustomEvent="+e.socketCustomEvent,o+="&autoCloseEntireSession="+!!e.autoCloseEntireSession,!0===e.session.broadcast&&(o+="&oneToMany=true"),o+="&maxParticipantsAllowed="+e.maxParticipantsAllowed,e.enableScalableBroadcast&&(o+="&enableScalableBroadcast=true",o+="&maxRelayLimitPerUser="+(e.maxRelayLimitPerUser||2)),o+="&extra="+JSON.stringify(e.extra||{}),e.socketCustomParameters&&(o+=e.socketCustomParameters);try{i.a.sockets={}}catch(e){}if(e.socketURL||(e.socketURL="/"),"/"!=e.socketURL.substr(e.socketURL.length-1,1))throw'"socketURL" MUST end with a slash.';e.enableLogs&&("/"==e.socketURL?console.info("socket.io url is: ",location.origin+"/"):console.info("socket.io url is: ",e.socketURL));try{e.socket=i()(e.socketURL+o)}catch(t){e.socket=i.a.connect(e.socketURL+o,e.socketOptions)}var r=e.multiPeersHandler;function a(t,n){e.peersBackup[t]||(e.peersBackup[t]={userid:t,extra:{}}),e.peersBackup[t].extra=n}e.socket.on("extra-data-updated",(function(t,n){e.peers[t]&&(e.peers[t].extra=n,e.onExtraDataUpdated({userid:t,extra:n}),a(t,n))})),e.socket.on(e.socketMessageEvent,(function t(o){if(o.remoteUserId==e.userid)if(e.peers[o.sender]&&e.peers[o.sender].extra!=o.message.extra&&(e.peers[o.sender].extra=o.extra,e.onExtraDataUpdated({userid:o.sender,extra:o.extra}),a(o.sender,o.extra)),o.message.streamSyncNeeded&&e.peers[o.sender]){var i=e.streamEvents[o.message.streamid];if(!i||!i.stream)return;var s=o.message.action;if("ended"===s||"inactive"===s||"stream-removed"===s)return e.peersBackup[i.userid]&&(i.extra=e.peersBackup[i.userid].extra),void e.onstreamended(i);var c="both"!=o.message.type?o.message.type:null;"function"==typeof i.stream[s]&&i.stream[s](c)}else if("dropPeerConnection"!==o.message){if(o.message.allParticipants)return-1===o.message.allParticipants.indexOf(o.sender)&&o.message.allParticipants.push(o.sender),void o.message.allParticipants.forEach((function(t){r[e.peers[t]?"renegotiatePeer":"createNewPeer"](t,{localPeerSdpConstraints:{OfferToReceiveAudio:e.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:e.sdpConstraints.mandatory.OfferToReceiveVideo},remotePeerSdpConstraints:{OfferToReceiveAudio:e.session.oneway?!!e.session.audio:e.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:e.session.oneway?!!e.session.video||!!e.session.screen:e.sdpConstraints.mandatory.OfferToReceiveVideo},isOneWay:!!e.session.oneway||"one-way"===e.direction,isDataOnly:n(e.session)})}));if(o.message.newParticipant){if(o.message.newParticipant==e.userid)return;if(e.peers[o.message.newParticipant])return;r.createNewPeer(o.message.newParticipant,o.message.userPreferences||{localPeerSdpConstraints:{OfferToReceiveAudio:e.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:e.sdpConstraints.mandatory.OfferToReceiveVideo},remotePeerSdpConstraints:{OfferToReceiveAudio:e.session.oneway?!!e.session.audio:e.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:e.session.oneway?!!e.session.video||!!e.session.screen:e.sdpConstraints.mandatory.OfferToReceiveVideo},isOneWay:!!e.session.oneway||"one-way"===e.direction,isDataOnly:n(e.session)})}else if(o.message.readyForOffer&&(e.attachStreams.length&&(e.waitingForLocalMedia=!1),e.waitingForLocalMedia))setTimeout((function(){t(o)}),1);else if(o.message.newParticipationRequest&&o.sender!==e.userid){e.peers[o.sender]&&e.deletePeer(o.sender);var l={extra:o.extra||{},localPeerSdpConstraints:o.message.remotePeerSdpConstraints||{OfferToReceiveAudio:e.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:e.sdpConstraints.mandatory.OfferToReceiveVideo},remotePeerSdpConstraints:o.message.localPeerSdpConstraints||{OfferToReceiveAudio:e.session.oneway?!!e.session.audio:e.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:e.session.oneway?!!e.session.video||!!e.session.screen:e.sdpConstraints.mandatory.OfferToReceiveVideo},isOneWay:void 0!==o.message.isOneWay?o.message.isOneWay:!!e.session.oneway||"one-way"===e.direction,isDataOnly:void 0!==o.message.isDataOnly?o.message.isDataOnly:n(e.session),dontGetRemoteStream:void 0!==o.message.isOneWay?o.message.isOneWay:!!e.session.oneway||"one-way"===e.direction,dontAttachLocalStream:!!o.message.dontGetRemoteStream,connectionDescription:o,successCallback:function(){}};e.onNewParticipant(o.sender,l)}else{if(o.message.changedUUID&&e.peers[o.message.oldUUID]&&(e.peers[o.message.newUUID]=e.peers[o.message.oldUUID],delete e.peers[o.message.oldUUID]),o.message.userLeft)return r.onUserLeft(o.sender),void(o.message.autoCloseEntireSession&&e.leave());r.addNegotiatedMessage(o.message,o.sender)}}else e.deletePeer(o.sender)}));var s=!1;e.socket.resetProps=function(){s=!1},e.socket.on("connect",(function(){s||(s=!0,e.enableLogs&&console.info("socket.io connection is opened."),setTimeout((function(){e.socket.emit("extra-data-updated",e.extra)}),1e3),t&&t(e.socket))})),e.socket.on("disconnect",(function(){e.enableLogs&&console.warn("socket.io connection is closed"),e.close()})),e.socket.on("user-disconnected",(function(t){t!==e.userid&&(e.onUserStatusChanged({userid:t,status:"offline",extra:e.peers[t]&&e.peers[t].extra||{}}),e.deletePeer(t))})),e.socket.on("user-connected",(function(t){t!==e.userid&&e.onUserStatusChanged({userid:t,status:"online",extra:e.peers[t]&&e.peers[t].extra||{}})})),e.socket.on("closed-entire-session",(function(t,n){e.leave(),e.onEntireSessionClosed({sessionid:t,userid:t,extra:n})})),e.socket.on("userid-already-taken",(function(t,n){e.onUserIdAlreadyTaken(t,n)})),e.socket.on("logs",(function(t){e.enableLogs&&console.debug("server-logs",t)})),e.socket.on("number-of-broadcast-viewers-updated",(function(t){e.onNumberOfBroadcastViewersUpdated(t)})),e.socket.on("set-isInitiator-true",(function(t){t==e.sessionid&&(e.isInitiator=!0)}))}function d(e){var t=this,n=["getAllParticipants","getLength","selectFirst","streams","send","forEach"];function o(){e.fbr=new c,e.fbr.onProgress=function(t){e.onFileProgress(t)},e.fbr.onBegin=function(t){e.onFileStart(t)},e.fbr.onEnd=function(t){e.onFileEnd(t)}}e.peers={getLength:function(){var e=0;for(var t in this)-1==n.indexOf(t)&&e++;return e},selectFirst:function(){var e;for(var t in this)-1==n.indexOf(t)&&(e=this[t]);return e},getAllParticipants:function(e){var t=[];for(var o in this)-1==n.indexOf(o)&&o!=e&&t.push(o);return t},forEach:function(t){this.getAllParticipants().forEach((function(n){t(e.peers[n])}))},send:function(n,o){var r=this;if(!w(n.size)&&!w(n.type)){if(e.enableFileSharing)return void t.shareFile(n,o);"string"!=typeof n&&(n=JSON.stringify(n))}if("text"===n.type||n instanceof ArrayBuffer||n instanceof DataView){if("text"===n.type&&(n=JSON.stringify(n)),o){var a=e.peers[o];if(a)return a.channels.length?void a.channels.forEach((function(e){e.send(n)})):(e.peers[o].createDataChannel(),e.renegotiate(o),void setTimeout((function(){r.send(n,o)}),3e3))}this.getAllParticipants().forEach((function(t){if(!r[t].channels.length)return e.peers[t].createDataChannel(),e.renegotiate(t),void setTimeout((function(){r[t].channels.forEach((function(e){e.send(n)}))}),3e3);r[t].channels.forEach((function(e){e.send(n)}))}))}else H.send({text:n,channel:this,connection:e,remoteUserId:o})}},this.uuid=e.userid,this.getLocalConfig=function(n,r,a){return a||(a={}),{streamsToShare:a.streamsToShare||{},rtcMultiConnection:e,connectionDescription:a.connectionDescription,userid:r,localPeerSdpConstraints:a.localPeerSdpConstraints,remotePeerSdpConstraints:a.remotePeerSdpConstraints,dontGetRemoteStream:!!a.dontGetRemoteStream,dontAttachLocalStream:!!a.dontAttachLocalStream,renegotiatingPeer:!!a.renegotiatingPeer,peerRef:a.peerRef,channels:a.channels||[],onLocalSdp:function(e){t.onNegotiationNeeded(e,r)},onLocalCandidate:function(n){(n=I.processCandidates(e,n))&&t.onNegotiationNeeded(n,r)},remoteSdp:n,onDataChannelMessage:function(n){if(!e.fbr&&e.enableFileSharing&&o(),"string"!=typeof n&&e.enableFileSharing){var a=this;n instanceof ArrayBuffer||n instanceof DataView?e.fbr.convertToObject(n,(function(e){a.onDataChannelMessage(e)})):n.readyForNextChunk?e.fbr.getNextChunk(n,(function(t,n){e.peers[r].channels.forEach((function(e){e.send(t)}))}),r):n.chunkMissing?e.fbr.chunkMissing(n):e.fbr.addChunk(n,(function(t){e.peers[r].peer.channel.send(t)}))}else t.onDataChannelMessage(n,r)},onDataChannelError:function(e){t.onDataChannelError(e,r)},onDataChannelOpened:function(e){t.onDataChannelOpened(e,r)},onDataChannelClosed:function(e){t.onDataChannelClosed(e,r)},onRemoteStream:function(n){e.peers[r]&&e.peers[r].streams.push(n),t.onGettingRemoteMedia(n,r)},onRemoteStreamRemoved:function(e){t.onRemovingRemoteMedia(e,r)},onPeerStateChanged:function(e){t.onPeerStateChanged(e),"new"===e.iceConnectionState&&t.onNegotiationStarted(r,e),"connected"===e.iceConnectionState&&t.onNegotiationCompleted(r,e),-1!==e.iceConnectionState.search(/closed|failed/gi)&&(t.onUserLeft(r),t.disconnectWith(r))}}},this.createNewPeer=function(t,n){if(!(e.maxParticipantsAllowed<=e.getAllParticipants().length)){if(n=n||{},e.isInitiator&&e.session.audio&&"two-way"===e.session.audio&&!n.streamsToShare&&(n.isOneWay=!1,n.isDataOnly=!1,n.session=e.session),!n.isOneWay&&!n.isDataOnly)return n.isOneWay=!0,void this.onNegotiationNeeded({enableMedia:!0,userPreferences:n},t);n=e.setUserPreferences(n,t);var o=this.getLocalConfig(null,t,n);e.peers[t]=new P(o)}},this.createAnsweringPeer=function(t,n,o){o=e.setUserPreferences(o||{},n);var r=this.getLocalConfig(t,n,o);e.peers[n]=new P(r)},this.renegotiatePeer=function(t,n,o){if(e.peers[t]){n||(n={}),n.renegotiatingPeer=!0,n.peerRef=e.peers[t].peer,n.channels=e.peers[t].channels;var r=this.getLocalConfig(o,t,n);e.peers[t]=new P(r)}else e.enableLogs&&console.error("Peer ("+t+") does not exist. Renegotiation skipped.")},this.replaceTrack=function(t,n,o){if(!e.peers[n])throw"This peer ("+n+") does not exist.";var r=e.peers[n].peer;r.getSenders&&"function"==typeof r.getSenders&&r.getSenders().length?r.getSenders().forEach((function(r){o&&"video"===r.track.kind&&(e.peers[n].peer.lastVideoTrack=r.track,r.replaceTrack(t)),o||"audio"!==r.track.kind||(e.peers[n].peer.lastAudioTrack=r.track,r.replaceTrack(t))})):(console.warn("RTPSender.replaceTrack is NOT supported."),this.renegotiatePeer(n))},this.onNegotiationNeeded=function(e,t){},this.addNegotiatedMessage=function(n,o){if(n.type&&n.sdp)return"answer"==n.type&&e.peers[o]&&e.peers[o].addRemoteSdp(n),"offer"==n.type&&(n.renegotiatingPeer?this.renegotiatePeer(o,null,n):this.createAnsweringPeer(n,o)),void(e.enableLogs&&console.log("Remote peer's sdp:",n.sdp));if(n.candidate)return e.peers[o]&&e.peers[o].addRemoteCandidate(n),void(e.enableLogs&&console.log("Remote peer's candidate pairs:",n.candidate));if(n.enableMedia){e.session=n.userPreferences.session||e.session,e.session.oneway&&e.attachStreams.length&&(e.attachStreams=[]),n.userPreferences.isDataOnly&&e.attachStreams.length&&(e.attachStreams.length=[]);var r={};e.attachStreams.forEach((function(e){r[e.streamid]={isAudio:!!e.isAudio,isVideo:!!e.isVideo,isScreen:!!e.isScreen}})),n.userPreferences.streamsToShare=r,t.onNegotiationNeeded({readyForOffer:!0,userPreferences:n.userPreferences},o)}n.readyForOffer&&e.onReadyForOffer(o,n.userPreferences)},this.onGettingRemoteMedia=function(e,t){},this.onRemovingRemoteMedia=function(e,t){},this.onGettingLocalMedia=function(e){},this.onLocalMediaError=function(t,n){e.onMediaError(t,n)},this.shareFile=function(t,n){o(),e.fbr.readAsArrayBuffer(t,(function(t){var o=e.getAllParticipants();n&&(o=[n]),o.forEach((function(n){e.fbr.getNextChunk(t,(function(t){e.peers[n].channels.forEach((function(e){e.send(t)}))}),n)}))}),{userid:e.userid,chunkSize:"Firefox"===DetectRTC.browser.name?15e3:e.chunkSize||0})};var r=new q(e);this.onDataChannelMessage=function(t,n){r.receive(JSON.parse(t),n,e.peers[n]?e.peers[n].extra:{})},this.onDataChannelClosed=function(t,n){t.userid=n,t.extra=e.peers[n]?e.peers[n].extra:{},e.onclose(t)},this.onDataChannelError=function(t,n){t.userid=n,event.extra=e.peers[n]?e.peers[n].extra:{},e.onerror(t)},this.onDataChannelOpened=function(t,n){e.peers[n].channels.length?e.peers[n].channels=[t]:(e.peers[n].channels.push(t),e.onopen({userid:n,extra:e.peers[n]?e.peers[n].extra:{},channel:t}))},this.onPeerStateChanged=function(t){e.onPeerStateChanged(t)},this.onNegotiationStarted=function(e,t){},this.onNegotiationCompleted=function(e,t){},this.getRemoteStreams=function(t){return t=t||e.peers.getAllParticipants()[0],e.peers[t]?e.peers[t].streams:[]}}function f(e,t,n){if("undefined"!=typeof CustomEvent){var o=new CustomEvent(t,{arguments:n,__exposedProps__:n});e.dispatchEvent(o)}}function h(e,t){t.stream&&t.stream&&t.stream.addEventListener&&(t.stream.addEventListener("mute",(function(n){(n=e.streamEvents[t.streamid]).session={audio:"audio"===n.muteType,video:"video"===n.muteType},e.onmute(n)}),!1),t.stream.addEventListener("unmute",(function(n){(n=e.streamEvents[t.streamid]).session={audio:"audio"===n.unmuteType,video:"video"===n.unmuteType},e.onunmute(n)}),!1))}function m(){if(window.crypto&&window.crypto.getRandomValues&&-1===navigator.userAgent.indexOf("Safari")){for(var e=window.crypto.getRandomValues(new Uint32Array(3)),t="",n=0,o=e.length;n<o;n++)t+=e[n].toString(36);return t}return(Math.random()*(new Date).getTime()).toString(36).replace(/\./g,"")}function v(e,t,n){if(n.autoCreateMediaElement){var o=!1;T(e,"video").length||e.isVideo||e.isScreen||(o=!0),"Firefox"===DetectRTC.browser.name&&(n.session.video||n.session.screen)&&(o=!1);var r=document.createElement(o?"audio":"video");r.srcObject=e;try{r.setAttributeNode(document.createAttribute("autoplay")),r.setAttributeNode(document.createAttribute("playsinline")),r.setAttributeNode(document.createAttribute("controls"))}catch(e){r.setAttribute("autoplay",!0),r.setAttribute("playsinline",!0),r.setAttribute("controls",!0)}if("Firefox"===DetectRTC.browser.name){var a="ended";"oninactive"in r&&(a="inactive"),r.addEventListener(a,(function(){if(currentUserMediaRequest.remove(e.idInstance),"local"===e.type){a="ended","oninactive"in e&&(a="inactive"),F.onSyncNeeded(e.streamid,a),n.attachStreams.forEach((function(t,o){e.streamid===t.streamid&&delete n.attachStreams[o]}));var t=[];n.attachStreams.forEach((function(e){e&&t.push(e)})),n.attachStreams=t;var o=n.streamEvents[e.streamid];if(o)return void n.onstreamended(o);this.parentNode&&this.parentNode.removeChild(this)}}),!1)}var i=r.play();if(void 0!==i){var s=!1;setTimeout((function(){s||(s=!0,t(r))}),1e3),i.then((function(){s||(s=!0,t(r))})).catch((function(e){s||(s=!0,t(r))}))}else t(r)}else t({})}function g(e,t){window.removeEventListener(e,t),window.addEventListener(e,t,!1)}function b(e){var t=[];return e.forEach((function(e){e&&t.push(e)})),t}function y(e){return!e.audio&&!e.video&&!e.screen&&e.data}function w(e){return void 0===e}(a=void 0!==o?o:null)&&"undefined"==typeof window&&void 0!==o&&(o.navigator={userAgent:"Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45",getUserMedia:function(){}},o.console||(o.console={}),void 0===o.console.debug&&(o.console.debug=o.console.info=o.console.error=o.console.log=o.console.log||function(){console.log(arguments)}),"undefined"==typeof document&&(a.document={},document.createElement=document.captureStream=document.mozCaptureStream=function(){var e={getContext:function(){return e},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""}};return e},document.addEventListener=document.removeEventListener=a.addEventListener=a.removeEventListener=function(){},a.HTMLVideoElement=a.HTMLMediaElement=function(){}),void 0===i.a&&(a.io=function(){return{on:function(e,t){t=t||function(){},"connect"===e&&t()},emit:function(e,t,n){n=n||function(){},"open-room"!==e&&"join-room"!==e||n(!0,t.sessionid,null)}}}),"undefined"==typeof location&&(a.location={protocol:"file:",href:"",hash:"",origin:"self"}),"undefined"==typeof screen&&(a.screen={width:0,height:0}),"undefined"==typeof URL&&(a.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),a.window=o),function(){var e,t="Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";if("object"===(void 0===r?"undefined":s(r))&&"object"===s(r.versions)&&r.versions.node&&!r.browser){var a=r.versions.node.toString().replace("v","");t="Nodejs/"+a+" (NodeOS) AppleWebKit/"+a+" (KHTML, like Gecko) Nodejs/"+a+" Nodejs/"+a}e=void 0!==o?o:window,"undefined"==typeof window&&("undefined"==typeof window&&void 0!==o&&(o.navigator={userAgent:t,getUserMedia:function(){}},e.window=o),"undefined"==typeof location&&(e.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(e.screen={width:0,height:0}));var i=window.navigator;void 0!==i?(void 0!==i.webkitGetUserMedia&&(i.getUserMedia=i.webkitGetUserMedia),void 0!==i.mozGetUserMedia&&(i.getUserMedia=i.mozGetUserMedia)):i={getUserMedia:function(){},userAgent:t};var c=!!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(i.userAgent||""),l=!(-1===i.userAgent.indexOf("Edge")||!i.msSaveOrOpenBlob&&!i.msSaveBlob),u=!!window.opera||i.userAgent.indexOf(" OPR/")>=0,d=void 0!==window.InstallTrigger,f=/^((?!chrome|android).)*safari/i.test(i.userAgent),p=!!window.chrome&&!u,h="undefined"!=typeof document&&!!document.documentMode&&!l;function m(e,t){var n=0,o=!1,r=window.setInterval((function(){e()&&(window.clearInterval(r),t(o)),n++>50&&(window.clearInterval(r),t(o=!0))}),10)}var v,g,b={Android:function(){return i.userAgent.match(/Android/i)},BlackBerry:function(){return i.userAgent.match(/BlackBerry|BB10/i)},iOS:function(){return i.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return i.userAgent.match(/Opera Mini/i)},Windows:function(){return i.userAgent.match(/IEMobile/i)},any:function(){return b.Android()||b.BlackBerry()||b.iOS()||b.Opera()||b.Windows()},getOsName:function(){var e="Unknown OS";return b.Android()&&(e="Android"),b.BlackBerry()&&(e="BlackBerry"),b.iOS()&&(e="iOS"),b.Opera()&&(e="Opera Mini"),b.Windows()&&(e="Windows"),e}},y="Unknown OS",w="Unknown OS Version",x=function(){for(var e,t=i.appVersion,n=i.userAgent,o="-",r=[{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 3.11",r:/Win16/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}],a=0;e=r[a];a++)if(e.r.test(n)){o=e.s;break}var s="-";switch(/Windows/.test(o)&&(/Windows (.*)/.test(o)&&(s=/Windows (.*)/.exec(o)[1]),o="Windows"),o){case"Mac OS X":/Mac OS X (10[\.\_\d]+)/.test(n)&&(s=/Mac OS X (10[\.\_\d]+)/.exec(n)[1]);break;case"Android":/Android ([\.\_\d]+)/.test(n)&&(s=/Android ([\.\_\d]+)/.exec(n)[1]);break;case"iOS":/OS (\d+)_(\d+)_?(\d+)?/.test(n)&&(s=(s=/OS (\d+)_(\d+)_?(\d+)?/.exec(t))[1]+"."+s[2]+"."+(0|s[3]))}return{osName:o,osVersion:s}}();x&&x.osName&&"-"!=x.osName?(y=x.osName,w=x.osVersion):b.any()&&"Android"==(y=b.getOsName())&&(w=!!(g=(v=(v||i.userAgent).toLowerCase()).match(/android\s([0-9\.]*)/))&&g[1]);var _="object"===(void 0===r?"undefined":s(r))&&"object"===s(r.versions)&&r.versions.node;"Unknown OS"===y&&_&&(y="Nodejs",w=r.versions.node.toString().replace("v",""));var S=!1,T=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){"undefined"!=typeof document&&"function"==typeof document.createElement&&(!S&&e in document.createElement("canvas")&&(S=!0),!T&&e in document.createElement("video")&&(T=!0))}));var C=/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/,E=/([0-9]{1,3}(\.[0-9]{1,3}){3})/,A=/[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7}/,k=[],M=[],O=[],P=[];i.mediaDevices&&i.mediaDevices.enumerateDevices&&(i.enumerateDevices=function(e){var t=i.mediaDevices.enumerateDevices();t&&t.then?i.mediaDevices.enumerateDevices().then(e).catch((function(){e([])})):e([])});var j=!1;(void 0!==R&&"getSources"in R||i.mediaDevices&&i.mediaDevices.enumerateDevices)&&(j=!0);var I=!1,N=!1,L=!1,F=!1,D=!1;var z=window.DetectRTC||{};z.browser=function(){i.appVersion;var e,t,n,o=i.userAgent,r=i.appName,a=""+parseFloat(i.appVersion),s=parseInt(i.appVersion,10);if(f&&!p&&-1!==o.indexOf("CriOS")&&(f=!1,p=!0),u){r="Opera";try{s=(a=i.userAgent.split("OPR/")[1].split(" ")[0]).split(".")[0]}catch(e){a="0.0.0.0",s=0}}else h?((t=o.indexOf("rv:"))>0?a=o.substring(t+3):(t=o.indexOf("MSIE"),a=o.substring(t+5)),r="IE"):p?(t=o.indexOf("Chrome"),r="Chrome",a=o.substring(t+7)):f?(t=o.indexOf("Safari"),r="Safari",a=o.substring(t+7),-1!==(t=o.indexOf("Version"))&&(a=o.substring(t+8)),-1!==i.userAgent.indexOf("Version/")&&(a=i.userAgent.split("Version/")[1].split(" ")[0])):d?(t=o.indexOf("Firefox"),r="Firefox",a=o.substring(t+8)):(e=o.lastIndexOf(" ")+1)<(t=o.lastIndexOf("/"))&&(r=o.substring(e,t),a=o.substring(t+1),r.toLowerCase()===r.toUpperCase()&&(r=i.appName));return l&&(r="Edge",a=i.userAgent.split("Edge/")[1]),-1!==(n=a.search(/[; \)]/))&&(a=a.substring(0,n)),s=parseInt(""+a,10),isNaN(s)&&(a=""+parseFloat(i.appVersion),s=parseInt(i.appVersion,10)),{fullVersion:a,version:s,name:r,isPrivateBrowsing:!1}}(),function(e){var t;try{if(window.webkitRequestFileSystem)window.webkitRequestFileSystem(window.TEMPORARY,1,(function(){t=!1}),(function(e){t=!0}));else if(window.indexedDB&&/Firefox/.test(window.navigator.userAgent)){var n;try{(n=window.indexedDB.open("test")).onerror=function(){return!0}}catch(e){t=!0}void 0===t&&m((function(){return"done"===n.readyState}),(function(e){e||(t=!n.result)}))}else if(function(e){var t=window.navigator.userAgent.toLowerCase();if(0===t.indexOf("msie")&&0===t.indexOf("trident"))return!1;var n=/(?:msie|rv:)\s?([\d\.]+)/.exec(t);return!!(n&&parseInt(n[1],10)>=10)}()){t=!1;try{window.indexedDB||(t=!0)}catch(e){t=!0}}else if(window.localStorage&&/Safari/.test(window.navigator.userAgent)){try{window.localStorage.setItem("test",1)}catch(e){t=!0}void 0===t&&(t=!1,window.localStorage.removeItem("test"))}}catch(e){t=!1}m((function(){return void 0!==t}),(function(e){var n;n=t,z.browser.isPrivateBrowsing=!!n}))}(),z.browser["is"+z.browser.name]=!0,z.osName=y,z.osVersion=w,"object"===(void 0===r?"undefined":s(r))&&"object"===s(r.versions)&&r.versions["node-webkit"];var B=!1;["RTCPeerConnection","webkitRTCPeerConnection","mozRTCPeerConnection","RTCIceGatherer"].forEach((function(e){B||e in window&&(B=!0)})),z.isWebRTCSupported=B,z.isORTCSupported="undefined"!=typeof RTCIceGatherer;var U=!1;(z.browser.isChrome&&z.browser.version>=35||z.browser.isFirefox&&z.browser.version>=34||z.browser.isEdge&&z.browser.version>=17||"Android"===z.osName&&z.browser.isChrome)&&(U=!0),/^(https:|chrome-extension:)$/g.test(location.protocol||"")||("undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(z.browser.isChrome||z.browser.isEdge||z.browser.isOpera)||z.browser.isFirefox)&&(U=!1),z.isScreenCapturingSupported=U;var G={isSupported:!1,isCreateMediaStreamSourceSupported:!1};["AudioContext","webkitAudioContext","mozAudioContext","msAudioContext"].forEach((function(e){G.isSupported||e in window&&(G.isSupported=!0,window[e]&&"createMediaStreamSource"in window[e].prototype&&(G.isCreateMediaStreamSourceSupported=!0))})),z.isAudioContextSupported=G.isSupported,z.isCreateMediaStreamSourceSupported=G.isCreateMediaStreamSourceSupported;var V=!1;z.browser.isChrome&&z.browser.version>31&&(V=!0),z.isRtpDataChannelsSupported=V;var q=!1;(z.browser.isFirefox&&z.browser.version>28||z.browser.isChrome&&z.browser.version>25||z.browser.isOpera&&z.browser.version>=11)&&(q=!0),z.isSctpDataChannelsSupported=q,z.isMobileDevice=c;var H=!1;(i.getUserMedia||i.mediaDevices&&i.mediaDevices.getUserMedia)&&(H=!0),z.browser.isChrome&&z.browser.version>=46&&!/^(https:|chrome-extension:)$/g.test(location.protocol||"")&&"undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(H="Requires HTTPs"),"Nodejs"===z.osName&&(H=!1),z.isGetUserMediaSupported=H;var W,Y,X,K="";screen.width&&(K+=(screen.width?screen.width:"")+" x "+(screen.height?screen.height:"")),z.displayResolution=K,z.displayAspectRatio=(W=screen.width,Y=screen.height,X=function e(t,n){return 0==n?t:e(n,t%n)}(W,Y),W/X/(Y/X)).toFixed(2),z.isCanvasSupportsStreamCapturing=S,z.isVideoSupportsStreamCapturing=T,"Chrome"==z.browser.name&&z.browser.version>=53&&(z.isCanvasSupportsStreamCapturing||(z.isCanvasSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features"),z.isVideoSupportsStreamCapturing||(z.isVideoSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features")),z.DetectLocalIPAddress=function(e,t){if(z.isWebRTCSupported){var n=!0,o=!0;!function(e,t){if("undefined"!=typeof document&&"function"==typeof document.getElementById){var n={},o=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;if(!o){var r=document.getElementById("iframe");if(!r)return;var a=r.contentWindow;o=a.RTCPeerConnection||a.mozRTCPeerConnection||a.webkitRTCPeerConnection}if(o){var i=null;"Chrome"===z.browser&&z.browser.version<58&&(i={optional:[{RtpDataChannels:!0}]});var s=new o({iceServers:[{urls:"stun:stun.l.google.com:19302"}]},i);if(t&&(s.addStream?s.addStream(t):s.addTrack&&t.getTracks()[0]&&s.addTrack(t.getTracks()[0],t)),s.onicecandidate=function(e){e.candidate&&c(e.candidate.candidate)},!t)try{s.createDataChannel("sctp",{})}catch(e){}z.isPromisesSupported?s.createOffer().then((function(e){s.setLocalDescription(e).then(l)})):s.createOffer((function(e){s.setLocalDescription(e,l,(function(){}))}),(function(){}))}}function c(t){var o=E.exec(t);if(o){var r=o[1];t.match(C);void 0===n[r]&&e(r),n[r]=!0}}function l(){s.localDescription.sdp.split("\n").forEach((function(e){0===e.indexOf("a=candidate:")&&c(e)}))}}((function(t){t.match(C)?e("Local: "+t,n=!1,o):t.match(A)?e("Public: "+t,n,o=!1):e("Public: "+t,n,o)}),t)}},z.isWebSocketsSupported="WebSocket"in window&&2===window.WebSocket.CLOSING,z.isWebSocketsBlocked=!z.isWebSocketsSupported,"Nodejs"===z.osName&&(z.isWebSocketsSupported=!0,z.isWebSocketsBlocked=!1),z.checkWebSocketsSupport=function(e){e=e||function(){};try{var t,n=new WebSocket("wss://echo.websocket.org:443/");n.onopen=function(){z.isWebSocketsBlocked=!1,t=(new Date).getTime(),n.send("ping")},n.onmessage=function(){z.WebsocketLatency=(new Date).getTime()-t+"ms",e(),n.close(),n=null},n.onerror=function(){z.isWebSocketsBlocked=!0,e()}}catch(t){z.isWebSocketsBlocked=!0,e()}},z.load=function(e){!function(e){if(j)if(!i.enumerateDevices&&window.MediaStreamTrack&&window.MediaStreamTrack.getSources&&(i.enumerateDevices=window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack)),!i.enumerateDevices&&i.enumerateDevices&&(i.enumerateDevices=i.enumerateDevices.bind(i)),i.enumerateDevices){k=[],M=[],O=[],P=[],I=!1,N=!1,L=!1,F=!1,D=!1;var t={};i.enumerateDevices((function(n){n.forEach((function(e){var n={};for(var o in e)try{"function"!=typeof e[o]&&(n[o]=e[o])}catch(e){}t[n.deviceId+n.label+n.kind]||("audio"===n.kind&&(n.kind="audioinput"),"video"===n.kind&&(n.kind="videoinput"),n.deviceId||(n.deviceId=n.id),n.id||(n.id=n.deviceId),n.label?("videoinput"!==n.kind||D||(D=!0),"audioinput"!==n.kind||F||(F=!0)):(n.isCustomLabel=!0,"videoinput"===n.kind?n.label="Camera "+(P.length+1):"audioinput"===n.kind?n.label="Microphone "+(M.length+1):"audiooutput"===n.kind?n.label="Speaker "+(O.length+1):n.label="Please invoke getUserMedia once.",void 0!==z&&z.browser.isChrome&&z.browser.version>=46&&!/^(https:|chrome-extension:)$/g.test(location.protocol||"")&&"undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(n.label="HTTPs is required to get label of this "+n.kind+" device.")),"audioinput"===n.kind&&(I=!0,-1===M.indexOf(n)&&M.push(n)),"audiooutput"===n.kind&&(N=!0,-1===O.indexOf(n)&&O.push(n)),"videoinput"===n.kind&&(L=!0,-1===P.indexOf(n)&&P.push(n)),k.push(n),t[n.deviceId+n.label+n.kind]=n)})),void 0!==z&&(z.MediaDevices=k,z.hasMicrophone=I,z.hasSpeakers=N,z.hasWebcam=L,z.isWebsiteHasWebcamPermissions=D,z.isWebsiteHasMicrophonePermissions=F,z.audioInputDevices=M,z.audioOutputDevices=O,z.videoInputDevices=P),e&&e()}))}else e&&e();else e&&e()}(e=e||function(){})},z.MediaDevices=void 0!==k?k:[],z.hasMicrophone=I,z.hasSpeakers=N,z.hasWebcam=L,z.isWebsiteHasWebcamPermissions=D,z.isWebsiteHasMicrophonePermissions=F,z.audioInputDevices=M,z.audioOutputDevices=O,z.videoInputDevices=P;var J=!1;"undefined"!=typeof document&&"function"==typeof document.createElement&&"setSinkId"in document.createElement("video")&&(J=!0),z.isSetSinkIdSupported=J;var $=!1;z.browser.isFirefox&&"undefined"!=typeof mozRTCPeerConnection?"getSenders"in mozRTCPeerConnection.prototype&&($=!0):z.browser.isChrome&&"undefined"!=typeof webkitRTCPeerConnection&&"getSenders"in webkitRTCPeerConnection.prototype&&($=!0),z.isRTPSenderReplaceTracksSupported=$;var Z=!1;z.browser.isFirefox&&z.browser.version>38&&(Z=!0),z.isRemoteStreamProcessingSupported=Z;var Q=!1;void 0!==R&&"applyConstraints"in R.prototype&&(Q=!0),z.isApplyConstraintsSupported=Q;var ee=!1;z.browser.isFirefox&&z.browser.version>=43&&(ee=!0),z.isMultiMonitorScreenCapturingSupported=ee,z.isPromisesSupported=!!("Promise"in window),z.version="1.3.7",void 0===z&&(window.DetectRTC={});var te=window.MediaStream;void 0===te&&"undefined"!=typeof webkitMediaStream&&(te=webkitMediaStream),z.MediaStream=void 0!==te&&"function"==typeof te&&Object.keys(te.prototype),z.MediaStreamTrack=void 0!==R&&Object.keys(R.prototype);var ne=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;z.RTCPeerConnection=void 0!==ne&&Object.keys(ne.prototype),window.DetectRTC=z,"function"==typeof define&&n(144)&&define("DetectRTC",[],(function(){return z}))}(),"undefined"!=typeof cordova&&(DetectRTC.isMobileDevice=!0,DetectRTC.browser.name="Chrome"),navigator&&navigator.userAgent&&-1!==navigator.userAgent.indexOf("Crosswalk")&&(DetectRTC.isMobileDevice=!0,DetectRTC.browser.name="Chrome"),window.addEventListener||(window.addEventListener=function(e,t,n){e.attachEvent&&e.attachEvent("on"+t,n)}),window.attachEventListener=function(e,t,n,o){e.addEventListener(t,n,o)};var x=window.MediaStream;function _(e,t){return!(e.session.audio&&"two-way"===e.session.audio||("Firefox"!==DetectRTC.browser.name||!1===t)&&("Chrome"!==DetectRTC.browser.name||DetectRTC.browser.version<50||!0!==typeof t&&(void 0!==t||!e.session.audio||!e.session.screen||e.session.video||(t=!0,0))))}function S(e){return"Firefox"===DetectRTC.browser.name||"Chrome"===DetectRTC.browser.name&&{mandatory:{chromeMediaSource:e.mandatory.chromeMediaSource,chromeMediaSourceId:e.mandatory.chromeMediaSourceId}}}function T(e,t){return e&&e.getTracks?e.getTracks().filter((function(e){return e.kind===(t||"audio")})):[]}function C(){if("undefined"!=typeof cordova&&void 0!==cordova.plugins&&void 0!==cordova.plugins.iosrtc){var e=cordova.plugins.iosrtc;window.webkitRTCPeerConnection=e.RTCPeerConnection,window.RTCSessionDescription=e.RTCSessionDescription,window.RTCIceCandidate=e.RTCIceCandidate,window.MediaStream=e.MediaStream,window.MediaStreamTrack=e.MediaStreamTrack,navigator.getUserMedia=navigator.webkitGetUserMedia=e.getUserMedia,e.debug.enable("iosrtc*"),"function"==typeof e.selectAudioOutput&&e.selectAudioOutput(window.iOSDefaultAudioOutputDevice||"speaker"),e.registerGlobals()}}void 0===x&&"undefined"!=typeof webkitMediaStream&&(x=webkitMediaStream),void 0!==x&&("stop"in x.prototype||(x.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))})),window.iOSDefaultAudioOutputDevice=window.iOSDefaultAudioOutputDevice||"speaker",document.addEventListener("deviceready",C,!1),C();var E,A={};function k(e){return{OfferToReceiveAudio:!!e.OfferToReceiveAudio,OfferToReceiveVideo:!!e.OfferToReceiveVideo}}void 0!==window.RTCPeerConnection?E=window.RTCPeerConnection:"undefined"!=typeof mozRTCPeerConnection?E=mozRTCPeerConnection:"undefined"!=typeof webkitRTCPeerConnection&&(E=webkitRTCPeerConnection);var M=window.RTCSessionDescription||window.mozRTCSessionDescription,O=window.RTCIceCandidate||window.mozRTCIceCandidate,R=window.MediaStreamTrack;function P(e){if(void 0!==window.RTCPeerConnection?E=window.RTCPeerConnection:"undefined"!=typeof mozRTCPeerConnection?E=mozRTCPeerConnection:"undefined"!=typeof webkitRTCPeerConnection&&(E=webkitRTCPeerConnection),M=window.RTCSessionDescription||window.mozRTCSessionDescription,O=window.RTCIceCandidate||window.mozRTCIceCandidate,R=window.MediaStreamTrack,!E)throw"WebRTC 1.0 (RTCPeerConnection) API are NOT available in this browser.";var t=e.rtcMultiConnection;this.extra=e.remoteSdp?e.remoteSdp.extra:t.extra,this.userid=e.userid,this.streams=[],this.channels=e.channels||[],this.connectionDescription=e.connectionDescription,this.addStream=function(e){t.addStream(e,n.userid)},this.removeStream=function(e){t.removeStream(e,n.userid)};var n=this;e.remoteSdp&&(this.connectionDescription=e.remoteSdp.connectionDescription);var o,r={};A.sdpConstraints=k({OfferToReceiveAudio:!0,OfferToReceiveVideo:!0});var a=!!e.renegotiatingPeer;e.remoteSdp&&(a=!!e.remoteSdp.renegotiatingPeer);var i=[];if(t.attachStreams.forEach((function(e){e&&i.push(e)})),a)o=e.peerRef;else{var s="all";(t.candidates.turn||t.candidates.relay)&&(t.candidates.stun||t.candidates.reflexive||t.candidates.host||(s="relay"));try{var c={iceServers:t.iceServers,iceTransportPolicy:t.iceTransportPolicy||s};void 0!==t.iceCandidatePoolSize&&(c.iceCandidatePoolSize=t.iceCandidatePoolSize),void 0!==t.bundlePolicy&&(c.bundlePolicy=t.bundlePolicy),void 0!==t.rtcpMuxPolicy&&(c.rtcpMuxPolicy=t.rtcpMuxPolicy),"Chrome"===DetectRTC.browser.name&&(c.sdpSemantics=t.sdpSemantics||"unified-plan"),t.iceServers&&t.iceServers.length||(c=null,t.optionalArgument=null),o=new E(c,t.optionalArgument)}catch(e){try{c={iceServers:t.iceServers},o=new E(c)}catch(e){o=new E}}}!o.getRemoteStreams&&o.getReceivers&&(o.getRemoteStreams=function(){var e=new x;return o.getReceivers().forEach((function(t){e.addTrack(t.track)})),[e]}),!o.getLocalStreams&&o.getSenders&&(o.getLocalStreams=function(){var e=new x;return o.getSenders().forEach((function(t){e.addTrack(t.track)})),[e]}),o.onicecandidate=function(r){if(r.candidate)t.trickleIce&&e.onLocalCandidate({candidate:r.candidate.candidate,sdpMid:r.candidate.sdpMid,sdpMLineIndex:r.candidate.sdpMLineIndex});else if(!t.trickleIce){var a=o.localDescription;e.onLocalSdp({type:a.type,sdp:a.sdp,remotePeerSdpConstraints:e.remotePeerSdpConstraints||!1,renegotiatingPeer:!!e.renegotiatingPeer||!1,connectionDescription:n.connectionDescription,dontGetRemoteStream:!!e.dontGetRemoteStream,extra:t?t.extra:{},streamsToShare:p})}},i.forEach((function(r){e.remoteSdp&&e.remoteSdp.remotePeerSdpConstraints&&e.remoteSdp.remotePeerSdpConstraints.dontGetRemoteStream||e.dontAttachLocalStream||(r=t.beforeAddingStream(r,n))&&(o.getLocalStreams().forEach((function(e){r&&e.id==r.id&&(r=null)})),r&&r.getTracks&&r.getTracks().forEach((function(e){try{o.addTrack(e,r)}catch(e){}})))})),o.oniceconnectionstatechange=o.onsignalingstatechange=function(){var r=n.extra;t.peers[n.userid]&&(r=t.peers[n.userid].extra||r),o&&(e.onPeerStateChanged({iceConnectionState:o.iceConnectionState,iceGatheringState:o.iceGatheringState,signalingState:o.signalingState,extra:r,userid:n.userid}),o&&o.iceConnectionState&&-1!==o.iceConnectionState.search(/closed|failed/gi)&&n.streams instanceof Array&&n.streams.forEach((function(e){var n=t.streamEvents[e.id]||{streamid:e.id,stream:e,type:"remote"};t.onstreamended(n)})))};var l={OfferToReceiveAudio:!!i.length,OfferToReceiveVideo:!!i.length};e.localPeerSdpConstraints&&(l=e.localPeerSdpConstraints),A.sdpConstraints=k(l);var u={};o.ontrack=function(t){if(t&&"track"===t.type)if(t.stream=t.streams[t.streams.length-1],t.stream.id||(t.stream.id=t.track.id),u[t.stream.id]&&"Safari"!==DetectRTC.browser.name)t.track&&(t.track.onended=function(){o.onremovestream(t)});else{u[t.stream.id]=t.stream.id;var n={};e.remoteSdp&&e.remoteSdp.streamsToShare?n=e.remoteSdp.streamsToShare:e.streamsToShare&&(n=e.streamsToShare);var a=n[t.stream.id];a?(t.stream.isAudio=a.isAudio,t.stream.isVideo=a.isVideo,t.stream.isScreen=a.isScreen):(t.stream.isVideo=!!T(t.stream,"video").length,t.stream.isAudio=!t.stream.isVideo,t.stream.isScreen=!1),t.stream.streamid=t.stream.id,r[t.stream.id]=t.stream,e.onRemoteStream(t.stream),t.stream.getTracks().forEach((function(e){e.onended=function(){o.onremovestream(t)}})),t.stream.onremovetrack=function(){o.onremovestream(t)}}},o.onremovestream=function(t){t.stream.streamid=t.stream.id,r[t.stream.id]&&delete r[t.stream.id],e.onRemoteStreamRemoved(t.stream)},"function"!=typeof o.removeStream&&(o.removeStream=function(e){e.getTracks().forEach((function(t){o.removeTrack(t,e)}))}),this.addRemoteCandidate=function(e){o.addIceCandidate(new O(e))},this.addRemoteSdp=function(e,n){n=n||function(){},"Safari"!==DetectRTC.browser.name&&(e.sdp=t.processSdp(e.sdp)),o.setRemoteDescription(new M(e)).then(n,(function(o){t.enableLogs&&console.error("setRemoteDescription failed","\n",o,"\n",e.sdp),n()})).catch((function(o){t.enableLogs&&console.error("setRemoteDescription failed","\n",o,"\n",e.sdp),n()}))};var d=!0;function f(t){t.binaryType="arraybuffer",t.onmessage=function(t){e.onDataChannelMessage(t.data)},t.onopen=function(){e.onDataChannelOpened(t)},t.onerror=function(t){e.onDataChannelError(t)},t.onclose=function(t){e.onDataChannelClosed(t)},t.internalSend=t.send,t.send=function(e){"open"===t.readyState&&t.internalSend(e)},o.channel=t}e.remoteSdp&&(d=!1),this.createDataChannel=function(){f(o.createDataChannel("sctp",{}))},!0!==t.session.data||a||(d?this.createDataChannel():o.ondatachannel=function(e){f(e.channel)}),this.enableDisableVideoEncoding=function(e){var t;if(o.getSenders().forEach((function(e){t||"video"!==e.track.kind||(t=e)})),t&&t.getParameters){var n=t.getParameters();n.encodings[1]&&(n.encodings[1].active=!!e),n.encodings[2]&&(n.encodings[2].active=!!e),t.setParameters(n)}},e.remoteSdp&&(e.remoteSdp.remotePeerSdpConstraints&&(l=e.remoteSdp.remotePeerSdpConstraints),A.sdpConstraints=k(l),this.addRemoteSdp(e.remoteSdp,(function(){h("createAnswer")}))),"two-way"!=t.session.audio&&"two-way"!=t.session.video&&"two-way"!=t.session.screen||(A.sdpConstraints=k({OfferToReceiveAudio:"two-way"==t.session.audio||e.remoteSdp&&e.remoteSdp.remotePeerSdpConstraints&&e.remoteSdp.remotePeerSdpConstraints.OfferToReceiveAudio,OfferToReceiveVideo:"two-way"==t.session.video||"two-way"==t.session.screen||e.remoteSdp&&e.remoteSdp.remotePeerSdpConstraints&&e.remoteSdp.remotePeerSdpConstraints.OfferToReceiveAudio}));var p={};function h(r){o[r](A.sdpConstraints).then((function(r){"Safari"!==DetectRTC.browser.name&&(r.sdp=t.processSdp(r.sdp)),o.setLocalDescription(r).then((function(){t.trickleIce&&(e.onLocalSdp({type:r.type,sdp:r.sdp,remotePeerSdpConstraints:e.remotePeerSdpConstraints||!1,renegotiatingPeer:!!e.renegotiatingPeer||!1,connectionDescription:n.connectionDescription,dontGetRemoteStream:!!e.dontGetRemoteStream,extra:t?t.extra:{},streamsToShare:p}),t.onSettingLocalDescription(n))}),(function(e){t.enableLogs&&console.error("setLocalDescription error",e)}))}),(function(e){t.enableLogs&&console.error("sdp-error",e)}))}o.getLocalStreams().forEach((function(e){p[e.streamid]={isAudio:!!e.isAudio,isVideo:!!e.isVideo,isScreen:!!e.isScreen}})),d&&h("createOffer"),o.nativeClose=o.close,o.close=function(){if(o){try{o.nativeClose!==o.close&&o.nativeClose()}catch(e){}o=null,n.peer=null}},this.peer=o}var j=function(){function e(e,o){var r=n(e);return r.videoCodecNumbers?"vp8"===o&&r.vp8LineNumber===r.videoCodecNumbers[0]||"vp9"===o&&r.vp9LineNumber===r.videoCodecNumbers[0]||"h264"===o&&r.h264LineNumber===r.videoCodecNumbers[0]?e:e=t(e,o,r):e}function t(e,t,n,o){var r="";if("vp8"===t){if(!n.vp8LineNumber)return e;r=n.vp8LineNumber}if("vp9"===t){if(!n.vp9LineNumber)return e;r=n.vp9LineNumber}if("h264"===t){if(!n.h264LineNumber)return e;r=n.h264LineNumber}var a=n.videoCodecNumbersOriginal.split("SAVPF")[0]+"SAVPF ",i=[r];return o&&(i=[]),n.videoCodecNumbers.forEach((function(e){e!==r&&i.push(e)})),a+=i.join(" "),e.replace(n.videoCodecNumbersOriginal,a)}function n(e){var t={};return e.split("\n").forEach((function(e){0===e.indexOf("m=video")&&(t.videoCodecNumbers=[],e.split("SAVPF")[1].split(" ").forEach((function(n){(n=n.trim())&&n.length&&(t.videoCodecNumbers.push(n),t.videoCodecNumbersOriginal=e)}))),-1===e.indexOf("VP8/90000")||t.vp8LineNumber||(t.vp8LineNumber=e.replace("a=rtpmap:","").split(" ")[0]),-1===e.indexOf("VP9/90000")||t.vp9LineNumber||(t.vp9LineNumber=e.replace("a=rtpmap:","").split(" ")[0]),-1===e.indexOf("H264/90000")||t.h264LineNumber||(t.h264LineNumber=e.replace("a=rtpmap:","").split(" ")[0])})),t}function o(e,t,n){return function(e,t,n,o,r){for(var a=e.length,i=0;i<a;++i)if(0===e[i].indexOf(o)&&(!r||-1!==e[i].toLowerCase().indexOf(r.toLowerCase())))return i;return null}(e,0,0,t,n)}function r(e){var t=new RegExp("a=rtpmap:(d+) w+/d+"),n=e.match(t);return n&&2===n.length?n[1]:null}return{removeVPX:function(e){var o=n(e);return e=t(e,"vp9",o,!0),t(e,"vp8",o,!0)},disableNACK:function(e){if(!e||"string"!=typeof e)throw"Invalid arguments.";return(e=(e=(e=e.replace("a=rtcp-fb:126 nack\r\n","")).replace("a=rtcp-fb:126 nack pli\r\n","a=rtcp-fb:126 pli\r\n")).replace("a=rtcp-fb:97 nack\r\n","")).replace("a=rtcp-fb:97 nack pli\r\n","a=rtcp-fb:97 pli\r\n")},prioritize:function(e,t){if(t&&t.getSenders&&t.getSenders().length){if(!e||"string"!=typeof e)throw"Invalid arguments.";t.getSenders().forEach((function(t){for(var n=t.getParameters(),o=0;o<n.codecs.length;o++)if(n.codecs[o].mimeType==e){n.codecs.unshift(n.codecs.splice(o,1));break}t.setParameters(n)}))}},removeNonG722:function(e){return e.replace(/m=audio ([0-9]+) RTP\/SAVPF ([0-9 ]*)/g,"m=audio $1 RTP/SAVPF 9")},setApplicationSpecificBandwidth:function(e,t,n){return o=e,a=n,(r=t)?(void 0!==G&&G||(a&&(r.screen?r.screen<300&&console.warn("It seems that you are using wrong bandwidth value for screen. Screen sharing is expected to fail."):console.warn("It seems that you are not using bandwidth for screen. Screen sharing is expected to fail.")),r.screen&&a&&(o=(o=o.replace(/b=AS([^\r\n]+\r\n)/g,"")).replace(/a=mid:video\r\n/g,"a=mid:video\r\nb=AS:"+r.screen+"\r\n")),(r.audio||r.video)&&(o=o.replace(/b=AS([^\r\n]+\r\n)/g,"")),r.audio&&(o=o.replace(/a=mid:audio\r\n/g,"a=mid:audio\r\nb=AS:"+r.audio+"\r\n")),r.screen?o=o.replace(/a=mid:video\r\n/g,"a=mid:video\r\nb=AS:"+r.screen+"\r\n"):r.video&&(o=o.replace(/a=mid:video\r\n/g,"a=mid:video\r\nb=AS:"+r.video+"\r\n"))),o):o;var o,r,a},setVideoBitrates:function(e,t){return function(e,t){var n,a=(t=t||{}).min,i=t.max,s=e.split("\r\n"),c=o(s,"a=rtpmap","VP8/90000");if(c&&(n=r(s[c])),!n)return e;var l,u=o(s,"a=rtpmap","rtx/90000");if(u&&(l=r(s[u])),!u)return e;var d=o(s,"a=fmtp:"+l.toString());if(null!==d){var f="\r\n";f+="a=fmtp:"+n+" x-google-min-bitrate="+(a||"228")+"; x-google-max-bitrate="+(i||"228"),s[d]=s[d].concat(f),e=s.join("\r\n")}return e}(e,t)},setOpusAttributes:function(e,t){return function(e,t){t=t||{};var n,a=e.split("\r\n"),i=o(a,"a=rtpmap","opus/48000");if(i&&(n=r(a[i])),!n)return e;var s=o(a,"a=fmtp:"+n.toString());if(null===s)return e;var c="";return c+="; stereo="+(void 0!==t.stereo?t.stereo:"1"),c+="; sprop-stereo="+(void 0!==t["sprop-stereo"]?t["sprop-stereo"]:"1"),void 0!==t.maxaveragebitrate&&(c+="; maxaveragebitrate="+(t.maxaveragebitrate||1048576)),void 0!==t.maxplaybackrate&&(c+="; maxplaybackrate="+(t.maxplaybackrate||1048576)),void 0!==t.cbr&&(c+="; cbr="+(void 0!==t.cbr?t.cbr:"1")),void 0!==t.useinbandfec&&(c+="; useinbandfec="+t.useinbandfec),void 0!==t.usedtx&&(c+="; usedtx="+t.usedtx),void 0!==t.maxptime&&(c+="\r\na=maxptime:"+t.maxptime),a[s]=a[s].concat(c),a.join("\r\n")}(e,t)},preferVP9:function(t){return e(t,"vp9")},preferCodec:e,forceStereoAudio:function(e){for(var t=e.split("\r\n"),n=null,o=0;o<t.length;o++)if(-1!==t[o].search("opus/48000")){var r=extractSdp(t[o],/:(\d+) opus\/48000/i);break}for(o=0;o<t.length;o++)if(-1!==t[o].search("a=fmtp")&&extractSdp(t[o],/a=fmtp:(\d+)/)===r){n=o;break}return null===n?e:(t[n]=t[n].concat("; stereo=1; sprop-stereo=1"),e=t.join("\r\n"))}}}();window.BandwidthHandler=j;var I={processCandidates:function(e,t){var n=t.candidate,o=e.candidates,r=o.stun,a=o.turn;if(w(o.reflexive)||(r=o.reflexive),w(o.relay)||(a=o.relay),(o.host||!n.match(/typ host/g))&&(a||!n.match(/typ relay/g))&&(r||!n.match(/typ srflx/g))){var i=e.iceProtocols;if((i.udp||!n.match(/ udp /g))&&(i.tcp||!n.match(/ tcp /g)))return e.enableLogs&&console.debug("Your candidate pairs:",n),{candidate:n,sdpMid:t.sdpMid,sdpMLineIndex:t.sdpMLineIndex}}}},N=function(e){return[{urls:["stun:webrtcweb.com:7788"],username:"muazkh",credential:"muazkh"},{urls:["turn:webrtcweb.com:7788","turn:webrtcweb.com:8877","turn:webrtcweb.com:4455"],username:"muazkh",credential:"muazkh"},{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"]}]};function L(e){if(!0!==currentUserMediaRequest.mutex){currentUserMediaRequest.mutex=!0;var t=JSON.stringify(e.localMediaConstraints);if(currentUserMediaRequest.streams[t])a(currentUserMediaRequest.streams[t].stream,!0);else{if(/BB10|BlackBerry/i.test(navigator.userAgent||"")||void 0===navigator.mediaDevices||"function"!=typeof navigator.mediaDevices.getUserMedia)return navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia,void navigator.getUserMedia(e.localMediaConstraints,(function(e){e.streamid=e.streamid||e.id||m(),e.idInstance=t,a(e)}),(function(t){e.onLocalMediaError(t,e.localMediaConstraints)}));if(void 0===navigator.mediaDevices){navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;var n,o,r=function(){};navigator.mediaDevices={getUserMedia:function(e){return navigator.getUserMedia(e,(function(e){e(stream),n=stream}),(function(e){r(e),o=e})),{then:function(e){if(!n)return{then:function(e){o?e(o):r=e}};e(n)}}}}}navigator.mediaDevices.getUserMedia(e.localMediaConstraints).then((function(e){e.streamid=e.streamid||e.id||m(),e.idInstance=t,a(e)})).catch((function(t){e.onLocalMediaError(t,e.localMediaConstraints)}))}}else currentUserMediaRequest.queueRequests.push(e);function a(n,o){var r,a;r=e.localMediaConstraints,a=n,r.mandatory&&r.mandatory.chromeMediaSource||r.mozMediaSource||r.mediaSource?a.isScreen=!0:r.video?a.isVideo=!0:r.audio&&(a.isAudio=!0);var i="ended";"oninactive"in n&&(i="inactive"),n.addEventListener(i,(function(){delete currentUserMediaRequest.streams[t],currentUserMediaRequest.mutex=!1,currentUserMediaRequest.queueRequests.indexOf(e)&&(delete currentUserMediaRequest.queueRequests[currentUserMediaRequest.queueRequests.indexOf(e)],currentUserMediaRequest.queueRequests=b(currentUserMediaRequest.queueRequests))}),!1),currentUserMediaRequest.streams[t]={stream:n},currentUserMediaRequest.mutex=!1,currentUserMediaRequest.queueRequests.length&&L(currentUserMediaRequest.queueRequests.shift()),e.onGettingLocalMedia(n,o)}}window.currentUserMediaRequest={streams:[],mutex:!1,queueRequests:[],remove:function(e){this.mutex=!1;var t=this.streams[e];if(t){var n=(t=t.stream).currentUserMediaRequestOptions;this.queueRequests.indexOf(n)&&(delete this.queueRequests[this.queueRequests.indexOf(n)],this.queueRequests=b(this.queueRequests)),this.streams[e].stream=null,delete this.streams[e]}}};var F=function(){function e(e){if(e)return"string"==typeof e||void 0===e?e:e.audio&&e.video?null:e.audio?"audio":e.video?"video":void 0}return{setHandlers:function(t,n,o){if(t&&t.addEventListener){if(void 0===n||1==n){var r="ended";"oninactive"in t&&(r="inactive"),t.addEventListener(r,(function(){F.onSyncNeeded(this.streamid,r)}),!1)}t.mute=function(r,a){r=e(r),void 0!==a&&(n=a),void 0!==r&&"audio"!=r||T(t,"audio").forEach((function(e){e.enabled=!1,o.streamEvents[t.streamid].isAudioMuted=!0})),void 0!==r&&"video"!=r||T(t,"video").forEach((function(e){e.enabled=!1})),void 0!==n&&1!=n||F.onSyncNeeded(t.streamid,"mute",r),o.streamEvents[t.streamid].muteType=r||"both",f(t,"mute",r)},t.unmute=function(r,a){r=e(r),void 0!==a&&(n=a),function(){if(o.streamEvents[t.streamid].mediaElement){var e=o.streamEvents[t.streamid].mediaElement;e.volume=0,function e(t,n,o,r){(r=(r||0)+1)>=n||setTimeout((function(){o(),e(t,n,o,r)}),t)}(200,5,(function(){try{e.volume+=.2}catch(t){e.volume=1}}))}}(),void 0!==r&&"audio"!=r||T(t,"audio").forEach((function(e){e.enabled=!0,o.streamEvents[t.streamid].isAudioMuted=!1})),void 0!==r&&"video"!=r||(T(t,"video").forEach((function(e){e.enabled=!0})),void 0!==r&&"video"==r&&o.streamEvents[t.streamid].isAudioMuted&&function e(n){n||(n=0),++n<100&&o.streamEvents[t.streamid].isAudioMuted&&(t.mute("audio"),setTimeout((function(){e(n)}),50))}()),void 0!==n&&1!=n||F.onSyncNeeded(t.streamid,"unmute",r),o.streamEvents[t.streamid].unmuteType=r||"both",f(t,"unmute",r)}}},onSyncNeeded:function(e,t,n){}}}();window.addEventListener("message",(function(e){e.origin==window.location.origin&&function(e){if("PermissionDeniedError"==e){if(B="PermissionDeniedError",z)return z("PermissionDeniedError");throw new Error("PermissionDeniedError")}"rtcmulticonnection-extension-loaded"==e&&(B="desktop"),e.sourceId&&z&&z(D=e.sourceId,!0===e.canRequestAudioTrack)}(e.data)}));var D,z,B="screen";function U(e){if(e){if("desktop"==B)return e(!0);window.postMessage("are-you-there","*"),setTimeout((function(){e("screen"!=B)}),2e3)}}var G=void 0!==window.InstallTrigger;!!window.opera||navigator.userAgent.indexOf(" OPR/");function V(e,t){if(G)return t("not-chrome");2!=arguments.length&&(t=e,e="ajhifddimkapgcifgcodmmfdlknahffk");var n=document.createElement("img");n.src="chrome-extension://"+e+"/icon.png",n.onload=function(){B="screen",window.postMessage("are-you-there","*"),setTimeout((function(){t("screen"==B?"installed-disabled":"installed-enabled")}),2e3)},n.onerror=function(){t("not-installed")}}function q(e){var t={};return{receive:function(n,o,r){var a=n.uuid;if(t[a]||(t[a]=[]),t[a].push(n.message),n.last){var i=t[a].join("");n.isobject&&(i=JSON.parse(i));var s={data:i,userid:o,extra:r,latency:(new Date).getTime()-n.sendingTime};e.autoTranslateText?(s.original=s.data,e.Translator.TranslateText(s.data,(function(t){s.data=t,e.onmessage(s)}))):e.onmessage(s),delete t[a]}}}}window.chrome;var H={send:function(e){var t=e.connection,n=e.channel,o=e.remoteUserId,r=e.text,a=t.chunkSize||1e3,i="",s=!1;"string"!=typeof r&&(s=!0,r=JSON.stringify(r));var c=m(),l=(new Date).getTime();!function e(r,u){var d={type:"text",uuid:c,sendingTime:l};r&&(u=r,d.packets=parseInt(u.length/a)),u.length>a?d.message=u.slice(0,a):(d.message=u,d.last=!0,d.isobject=s),n.send(d,o),(i=u.slice(d.message.length)).length&&setTimeout((function(){e(null,i)}),t.chunkInterval||100)}(r)}},W={handle:function(e){var t={};e.onFileStart=function(n){var o=document.createElement("div");if(o.title=n.name,o.innerHTML="<label>0%</label> <progress></progress>",n.remoteUserId&&(o.innerHTML+=" (Sharing with:"+n.remoteUserId+")"),e.filesContainer||(e.filesContainer=document.body||document.documentElement),e.filesContainer.insertBefore(o,e.filesContainer.firstChild),!n.remoteUserId)return t[n.uuid]={div:o,progress:o.querySelector("progress"),label:o.querySelector("label")},void(t[n.uuid].progress.max=n.maxChunks);t[n.uuid]||(t[n.uuid]={}),t[n.uuid][n.remoteUserId]={div:o,progress:o.querySelector("progress"),label:o.querySelector("label")},t[n.uuid][n.remoteUserId].progress.max=n.maxChunks},e.onFileProgress=function(e){var n=t[e.uuid];n&&(e.remoteUserId&&!(n=t[e.uuid][e.remoteUserId])||(n.progress.value=e.currentPosition||e.maxChunks||n.progress.max,function(e,t){if(-1!==e.position){var n=+e.position.toFixed(2).split(".")[1]||100;t.innerHTML=n+"%"}}(n.progress,n.label)))},e.onFileEnd=function(e){var n=t[e.uuid];if(n){if(!e.remoteUserId||(n=t[e.uuid][e.remoteUserId])){var o=n.div;-1!=e.type.indexOf("image")?o.innerHTML='<a href="'+e.url+'" download="'+e.name+'">Download <strong style="color:red;">'+e.name+'</strong> </a><br /><img src="'+e.url+'" title="'+e.name+'" style="max-width: 80%;">':o.innerHTML='<a href="'+e.url+'" download="'+e.name+'">Download <strong style="color:red;">'+e.name+'</strong> </a><br /><iframe src="'+e.url+'" title="'+e.name+'" style="width: 80%;border: 0;height: inherit;margin-top:1em;"></iframe>'}}else console.error("No such progress-helper element exist.",e)}}},Y={handle:function(e){e.autoTranslateText=!1,e.language="en",e.googKey="AIzaSyCgB5hmFY74WYB-EoWkhr9cAGr6TiTHrEE",e.Translator={TranslateText:function(t,n){var o=document.createElement("script");o.type="text/javascript";var r=encodeURIComponent(t),a="method"+e.token();window[a]=function(e){e.data&&e.data.translations[0]&&n?n(e.data.translations[0].translatedText):e.error&&"Daily Limit Exceeded"===e.error.message?console.error('Text translation failed. Error message: "Daily Limit Exceeded."'):e.error?console.error(e.error.message):console.error(e)};var i="https://www.googleapis.com/language/translate/v2?key="+e.googKey+"&target="+(e.language||"en-US")+"&callback=window."+a+"&q="+r;o.src=i,document.getElementsByTagName("head")[0].appendChild(o)},getListOfLanguages:function(t){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(n.readyState==XMLHttpRequest.DONE){var e=JSON.parse(n.responseText);if(e&&e.data&&e.data.languages)return void t(e.data.languages);if(e.error&&"Daily Limit Exceeded"===e.error.message)return void console.error('Text translation failed. Error message: "Daily Limit Exceeded."');if(e.error)return void console.error(e.error.message);console.error(e)}};var o="https://www.googleapis.com/language/translate/v2/languages?key="+e.googKey+"&target=en";n.open("GET",o,!0),n.send(null)}}}};!function(n){t=t||{useDefaultDevices:!0},n.channel=n.sessionid=(e||location.href.replace(/\/|:|#|\?|\$|\^|%|\.|`|~|!|\+|@|\[|\||]|\|*. /g,"").split("\n").join("").split("\r").join(""))+"";var o=new d(n),r={};function a(e){if(n.socketAutoReConnect=!0,n.socket)e&&e(n.socket);else{if(void 0===l)if("undefined"!=typeof FirebaseConnection)window.SocketConnection=FirebaseConnection;else{if("undefined"==typeof PubNubConnection)throw"SocketConnection.js seems missed.";window.SocketConnection=PubNubConnection}new l(n,(function(t){e&&e(n.socket)}))}}function c(e,t){n.socket.emit("join-room",{sessionid:n.sessionid,session:n.session,mediaConstraints:n.mediaConstraints,sdpConstraints:n.sdpConstraints,streams:b(),extra:n.extra,password:void 0!==n.password&&"object"!==s(n.password)?n.password:""},(function(r,a){if(!0===r){if(n.enableLogs&&console.log("isRoomJoined: ",r," roomid: ",n.sessionid),n.peers[n.sessionid])return;o.onNegotiationNeeded(e)}!1===r&&n.enableLogs&&console.warn("isRoomJoined: ",a," roomid: ",n.sessionid),t(r,n.sessionid,a)}))}function f(e){n.enableLogs&&console.log("Sending open-room signal to socket.io"),n.waitingForLocalMedia=!1,n.socket.emit("open-room",{sessionid:n.sessionid,session:n.session,mediaConstraints:n.mediaConstraints,sdpConstraints:n.sdpConstraints,streams:b(),extra:n.extra,identifier:n.publicRoomIdentifier,password:void 0!==n.password&&"object"!==s(n.password)?n.password:""},(function(t,o){!0===t&&(n.enableLogs&&console.log("isRoomOpened: ",t," roomid: ",n.sessionid),e(t,n.sessionid)),!1===t&&(n.enableLogs&&console.warn("isRoomOpened: ",o," roomid: ",n.sessionid),e(t,n.sessionid,o))}))}function b(){try{return n.streamEvents.selectAll("local").map((function(e){return{streamid:e.streamid,tracks:e.stream.getTracks().length}}))}catch(e){return[]}}function w(e,t){if(n.dontCaptureUserMedia||e.isDataOnly)t();else{var r={};e.localPeerSdpConstraints.OfferToReceiveAudio&&(r.audio=n.mediaConstraints.audio),e.localPeerSdpConstraints.OfferToReceiveVideo&&(r.video=n.mediaConstraints.video);var a=e.session||n.session;a.oneway&&"two-way"!==a.audio&&"two-way"!==a.video&&"two-way"!==a.screen?t():(a.oneway&&a.audio&&"two-way"===a.audio&&(a={audio:!0}),(a.audio||a.video||a.screen)&&(a.screen?"Edge"===DetectRTC.browser.name?navigator.getDisplayMedia({video:!0,audio:_(n)}).then((function(e){e.isScreen=!0,o.onGettingLocalMedia(e),!a.audio&&!a.video||_(n)?t(e):n.invokeGetUserMedia(null,t)}),(function(e){console.error("Unable to capture screen on Edge. HTTPs and version 17+ is required.")})):n.getScreenConstraints((function(e,o){n.invokeGetUserMedia({audio:!!_(n)&&S(o),video:o,isScreen:!0},!a.audio&&!a.video||_(n)?t:n.invokeGetUserMedia(null,t))})):(a.audio||a.video)&&n.invokeGetUserMedia(null,t,a)))}}function C(e,t){e?(t.audio&&T(e,"audio").forEach((function(e){e.applyConstraints(t.audio)})),t.video&&T(e,"video").forEach((function(e){e.applyConstraints(t.video)}))):n.enableLogs&&console.error("No stream to applyConstraints.")}function A(e,t,r){t?o.replaceTrack(e,t,r):n.peers.getAllParticipants().forEach((function(t){o.replaceTrack(e,t,r)}))}o.onGettingLocalMedia=function(e,t){if(t=t||function(){},r[e.streamid])t();else{r[e.streamid]=!0;try{e.type="local"}catch(e){}n.setStreamEndHandler(e),v(e,(function(o){o.id=e.streamid,o.muted=!0,o.volume=0,-1===n.attachStreams.indexOf(e)&&n.attachStreams.push(e),void 0!==F&&F.setHandlers(e,!0,n),n.streamEvents[e.streamid]={stream:e,type:"local",mediaElement:o,userid:n.userid,extra:n.extra,streamid:e.streamid,isAudioMuted:!0};try{!function(e,t){if(t.stream&&T(t.stream,"audio").length){if(!e||!t)throw"Both arguments are required.";if(e.onspeaking&&e.onsilence){if("undefined"==typeof hark)throw"hark.js not found.";hark(t.stream,{onspeaking:function(){e.onspeaking(t)},onsilence:function(){e.onsilence(t)},onvolumechange:function(n,o){e.onvolumechange&&e.onvolumechange(p({volume:n,threshold:o},t))}})}}}(n,n.streamEvents[e.streamid]),h(n,n.streamEvents[e.streamid]),n.onstream(n.streamEvents[e.streamid])}catch(e){}t()}),n)}},o.onGettingRemoteMedia=function(e,t){try{e.type="remote"}catch(e){}n.setStreamEndHandler(e,"remote-stream"),v(e,(function(o){o.id=e.streamid,void 0!==F&&F.setHandlers(e,!1,n),n.streamEvents[e.streamid]={stream:e,type:"remote",userid:t,extra:n.peers[t]?n.peers[t].extra:{},mediaElement:o,streamid:e.streamid},h(n,n.streamEvents[e.streamid]),n.onstream(n.streamEvents[e.streamid])}),n)},o.onRemovingRemoteMedia=function(e,t){var o=n.streamEvents[e.streamid];o||(o={stream:e,type:"remote",userid:t,extra:n.peers[t]?n.peers[t].extra:{},streamid:e.streamid,mediaElement:n.streamEvents[e.streamid]?n.streamEvents[e.streamid].mediaElement:null}),n.peersBackup[o.userid]&&(o.extra=n.peersBackup[o.userid].extra),n.onstreamended(o),delete n.streamEvents[e.streamid]},o.onNegotiationNeeded=function(e,t,o){o=o||function(){};var r={remoteUserId:t=t||e.remoteUserId,message:e=e||"",sender:n.userid};e.remoteUserId&&e.message&&e.sender&&(r=e),a((function(){n.socket.emit(n.socketMessageEvent,r,o)}))},o.onUserLeft=function(e){n.deletePeer(e)},o.disconnectWith=function(e,t){n.socket&&n.socket.emit("disconnect-with",e,t||function(){}),n.deletePeer(e)},n.socketOptions={transport:"polling"},n.openOrJoin=function(e,t){t=t||function(){},n.checkPresence(e,(function(e,o){if(e){n.sessionid=o;var r,a,i=!!n.session.oneway,s=y(n.session);a={OfferToReceiveAudio:n.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:n.sdpConstraints.mandatory.OfferToReceiveVideo},r={OfferToReceiveAudio:i?!!n.session.audio:n.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:i?!!n.session.video||!!n.session.screen:n.sdpConstraints.mandatory.OfferToReceiveVideo};var l={remoteUserId:n.sessionid,message:{newParticipationRequest:!0,isOneWay:i,isDataOnly:s,localPeerSdpConstraints:r,remotePeerSdpConstraints:a},sender:n.userid};w(l.message,(function(){c(l,t)}))}else n.waitingForLocalMedia=!0,n.isInitiator=!0,n.sessionid=o||n.sessionid,y(n.session)?f(t):n.captureUserMedia((function(){f(t)}))}))},n.waitingForLocalMedia=!1,n.open=function(e,t){t=t||function(){},n.waitingForLocalMedia=!0,n.isInitiator=!0,n.sessionid=e||n.sessionid,a((function(){y(n.session)?f(t):n.captureUserMedia((function(){f(t)}))}))},n.peersBackup={},n.deletePeer=function(e){if(e&&n.peers[e]){var t={userid:e,extra:n.peers[e]?n.peers[e].extra:{}};if(n.peersBackup[t.userid]&&(t.extra=n.peersBackup[t.userid].extra),n.onleave(t),n.peers[e]){n.peers[e].streams.forEach((function(e){e.stop()}));var o=n.peers[e].peer;if(o&&"closed"!==o.iceConnectionState)try{o.close()}catch(e){}n.peers[e]&&(n.peers[e].peer=null,delete n.peers[e])}}},n.rejoin=function(e){if(!n.isInitiator&&e&&Object.keys(e).length){var t={};n.peers[e.remoteUserId]&&(t=n.peers[e.remoteUserId].extra,n.deletePeer(e.remoteUserId)),e&&e.remoteUserId&&(n.join(e.remoteUserId),n.onReConnecting({userid:e.remoteUserId,extra:t}))}},n.join=function(e,t){n.sessionid=!!e&&(e.sessionid||e.remoteUserId||e)||n.sessionid,n.sessionid+="";var o=!1,r=!1,i=!1,s=!1;if(e&&e.session||!e||"string"==typeof e){var l=e&&e.session||n.session;i=!!l.oneway,s=y(l),r={OfferToReceiveAudio:n.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:n.sdpConstraints.mandatory.OfferToReceiveVideo},o={OfferToReceiveAudio:i?!!n.session.audio:n.sdpConstraints.mandatory.OfferToReceiveAudio,OfferToReceiveVideo:i?!!n.session.video||!!n.session.screen:n.sdpConstraints.mandatory.OfferToReceiveVideo}}var u=function(){};"function"==typeof(t=t||{})&&(u=t,t={}),void 0!==t.localPeerSdpConstraints&&(o=t.localPeerSdpConstraints),void 0!==t.remotePeerSdpConstraints&&(r=t.remotePeerSdpConstraints),void 0!==t.isOneWay&&(i=t.isOneWay),void 0!==t.isDataOnly&&(s=t.isDataOnly);var d={remoteUserId:n.sessionid,message:{newParticipationRequest:!0,isOneWay:i,isDataOnly:s,localPeerSdpConstraints:o,remotePeerSdpConstraints:r},sender:n.userid};return w(d.message,(function(){a((function(){c(d,u)}))})),d},n.publicRoomIdentifier="",n.getUserMedia=n.captureUserMedia=function(e,t){e=e||function(){};var r=t||n.session;n.dontCaptureUserMedia||y(r)?e():(r.audio||r.video||r.screen)&&(r.screen?"Edge"===DetectRTC.browser.name?navigator.getDisplayMedia({video:!0,audio:_(n)}).then((function(a){if(a.isScreen=!0,o.onGettingLocalMedia(a),!r.audio&&!r.video||_(n))e(a);else{var i={};for(var s in r)"screen"!==s&&(i[s]=r[s]);n.invokeGetUserMedia(t,e,i)}}),(function(e){console.error("Unable to capture screen on Edge. HTTPs and version 17+ is required.")})):n.getScreenConstraints((function(o,a){if(o)throw o;n.invokeGetUserMedia({audio:!!_(n)&&S(a),video:a,isScreen:!0},(function(o){if(!r.audio&&!r.video||_(n))e(o);else{var a={};for(var i in r)"screen"!==i&&(a[i]=r[i]);n.invokeGetUserMedia(t,e,a)}}))})):(r.audio||r.video)&&n.invokeGetUserMedia(t,e,r))},n.onbeforeunload=function(e,t){n.closeBeforeUnload&&(n.peers.getAllParticipants().forEach((function(e){o.onNegotiationNeeded({userLeft:!0},e),n.peers[e]&&n.peers[e].peer&&n.peers[e].peer.close(),delete n.peers[e]})),t||n.closeSocket(),n.isInitiator=!1)},window.ignoreBeforeUnload?n.closeBeforeUnload=!1:(n.closeBeforeUnload=!0,window.addEventListener("beforeunload",n.onbeforeunload,!1)),n.userid=m(),n.changeUserId=function(e,t){t=t||function(){},n.userid=e||m(),n.socket.emit("changed-uuid",n.userid,t)},n.extra={},n.attachStreams=[],n.session={audio:!0,video:!0},n.enableFileSharing=!1,n.bandwidth={screen:!1,audio:!1,video:!1},n.codecs={audio:"opus",video:"VP9"},n.processSdp=function(e){return function(){var e=!1;try{if("undefined"==typeof RTCRtpTransceiver)return!1;if(!("currentDirection"in RTCRtpTransceiver.prototype))return!1;var t=new E;try{t.addTransceiver("audio"),e=!0}catch(e){}t.close()}catch(t){e=!1}return e&&function(){var e=!1;try{var t=new E({sdpSemantics:"unified-plan"});try{var n=t.getConfiguration();e="unified-plan"==n.sdpSemantics||(n.sdpSemantics,!1)}catch(t){e=!1}}catch(t){e=!1}return e}()}()||"Safari"===DetectRTC.browser.name||("VP8"===n.codecs.video.toUpperCase()&&(e=j.preferCodec(e,"vp8")),"VP9"===n.codecs.video.toUpperCase()&&(e=j.preferCodec(e,"vp9")),"H264"===n.codecs.video.toUpperCase()&&(e=j.preferCodec(e,"h264")),"G722"===n.codecs.audio&&(e=j.removeNonG722(e)),"Firefox"===DetectRTC.browser.name||((n.bandwidth.video||n.bandwidth.screen)&&(e=j.setApplicationSpecificBandwidth(e,n.bandwidth,!!n.session.screen)),n.bandwidth.video&&(e=j.setVideoBitrates(e,{min:8*n.bandwidth.video*1024,max:8*n.bandwidth.video*1024})),n.bandwidth.audio&&(e=j.setOpusAttributes(e,{maxaveragebitrate:8*n.bandwidth.audio*1024,maxplaybackrate:8*n.bandwidth.audio*1024,stereo:1,maxptime:3})))),e},void 0!==j&&(n.BandwidthHandler=n.CodecsHandler=j),n.mediaConstraints={audio:{mandatory:{},optional:n.bandwidth.audio?[{bandwidth:8*n.bandwidth.audio*1024||1048576}]:[]},video:{mandatory:{},optional:n.bandwidth.video?[{bandwidth:8*n.bandwidth.video*1024||1048576},{facingMode:"user"}]:[{facingMode:"user"}]}},"Firefox"===DetectRTC.browser.name&&(n.mediaConstraints={audio:!0,video:!0}),t.useDefaultDevices||DetectRTC.isMobileDevice||DetectRTC.load((function(){var e,t;if(DetectRTC.MediaDevices.forEach((function(o){"audioinput"===o.kind&&!1!==n.mediaConstraints.audio&&(e=o),"videoinput"===o.kind&&!1!==n.mediaConstraints.video&&(t=o)})),e){if("Firefox"===DetectRTC.browser.name)return void(!0!==n.mediaConstraints.audio?n.mediaConstraints.audio.deviceId=e.id:n.mediaConstraints.audio={deviceId:e.id});1==n.mediaConstraints.audio&&(n.mediaConstraints.audio={mandatory:{},optional:[]}),n.mediaConstraints.audio.optional||(n.mediaConstraints.audio.optional=[]);var o=[{sourceId:e.id}];n.mediaConstraints.audio.optional=o.concat(n.mediaConstraints.audio.optional)}if(t){if("Firefox"===DetectRTC.browser.name)return void(!0!==n.mediaConstraints.video?n.mediaConstraints.video.deviceId=t.id:n.mediaConstraints.video={deviceId:t.id});1==n.mediaConstraints.video&&(n.mediaConstraints.video={mandatory:{},optional:[]}),n.mediaConstraints.video.optional||(n.mediaConstraints.video.optional=[]),o=[{sourceId:t.id}],n.mediaConstraints.video.optional=o.concat(n.mediaConstraints.video.optional)}})),n.sdpConstraints={mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0},optional:[{VoiceActivityDetection:!1}]},n.sdpSemantics=null,n.iceCandidatePoolSize=null,n.bundlePolicy=null,n.rtcpMuxPolicy=null,n.iceTransportPolicy=null,n.optionalArgument={optional:[{DtlsSrtpKeyAgreement:!0},{googImprovedWifiBwe:!0},{googScreencastMinBitrate:300},{googIPv6:!0},{googDscp:!0},{googCpuUnderuseThreshold:55},{googCpuOveruseThreshold:85},{googSuspendBelowMinBitrate:!0},{googCpuOveruseDetection:!0}],mandatory:{}},n.iceServers=N(n),n.candidates={host:!0,stun:!0,turn:!0},n.iceProtocols={tcp:!0,udp:!0},n.onopen=function(e){n.enableLogs&&console.info("Data connection has been opened between you & ",e.userid)},n.onclose=function(e){n.enableLogs&&console.warn("Data connection has been closed between you & ",e.userid)},n.onerror=function(e){n.enableLogs&&console.error(e.userid,"data-error",e)},n.onmessage=function(e){n.enableLogs&&console.debug("data-message",e.userid,e.data)},n.send=function(e,t){n.peers.send(e,t)},n.close=n.disconnect=n.leave=function(){n.onbeforeunload(!1,!0)},n.closeEntireSession=function(e){e=e||function(){},n.socket.emit("close-entire-session",(function t(){n.getAllParticipants().length?setTimeout(t,100):(n.onEntireSessionClosed({sessionid:n.sessionid,userid:n.userid,extra:n.extra}),n.changeUserId(null,(function(){n.close(),e()})))}))},n.onEntireSessionClosed=function(e){n.enableLogs&&console.info("Entire session is closed: ",e.sessionid,e.extra)},n.onstream=function(e){var t=n.videosContainer;t.insertBefore(e.mediaElement,t.firstChild);var o=e.mediaElement.play();void 0===o?setTimeout((function(){e.mediaElement.play()}),2e3):o.catch((function(){})).then((function(){setTimeout((function(){e.mediaElement.play()}),2e3)}))},n.onstreamended=function(e){e.mediaElement||(e.mediaElement=document.getElementById(e.streamid)),e.mediaElement&&e.mediaElement.parentNode&&e.mediaElement.parentNode.removeChild(e.mediaElement)},n.direction="many-to-many",n.removeStream=function(e,t){var o;n.attachStreams.forEach((function(t){t.id===e&&(o=t)})),o?(n.peers.getAllParticipants().forEach((function(e){if(!t||e===t){var r=n.peers[e];try{r.peer.removeStream(o)}catch(e){}}})),n.renegotiate()):console.warn("No such stream exist.",e)},n.addStream=function(e,t){if(e.getTracks)return-1===n.attachStreams.indexOf(e)&&(e.streamid||(e.streamid=e.id),n.attachStreams.push(e)),void n.renegotiate(t);function r(o){e.streamCallback&&e.streamCallback(o),n.renegotiate(t)}y(e)?n.renegotiate(t):(e.audio||e.video||e.screen)&&(e.screen?"Edge"===DetectRTC.browser.name?navigator.getDisplayMedia({video:!0,audio:_(n)}).then((function(t){t.isScreen=!0,o.onGettingLocalMedia(t),!e.audio&&!e.video||_(n)?r(t):n.invokeGetUserMedia(null,(function(e){r(e)}))}),(function(e){console.error("Unable to capture screen on Edge. HTTPs and version 17+ is required.")})):n.getScreenConstraints((function(t,o){if(t)return"PermissionDeniedError"===t?(e.streamCallback&&e.streamCallback(null),void(n.enableLogs&&console.error("User rejected to share his screen."))):alert(t);n.invokeGetUserMedia({audio:!!_(n)&&S(o),video:o,isScreen:!0},(function(t){!e.audio&&!e.video||_(n)?r(t):n.invokeGetUserMedia(null,(function(e){r(e)}))}))})):(e.audio||e.video)&&n.invokeGetUserMedia(null,r))},n.invokeGetUserMedia=function(e,t,r){r||(r=n.session),e||(e=n.mediaConstraints),L({onGettingLocalMedia:function(n){var r=e.video;r&&(r.mediaSource||r.mozMediaSource||r.mandatory&&r.mandatory.chromeMediaSource)&&(n.isScreen=!0),n.isScreen||(n.isVideo=!!T(n,"video").length,n.isAudio=!n.isVideo&&T(n,"audio").length),o.onGettingLocalMedia(n,(function(){"function"==typeof t&&t(n)}))},onLocalMediaError:function(e,t){o.onLocalMediaError(e,t)},localMediaConstraints:e||{audio:!!r.audio&&e.audio,video:!!r.video&&e.video}})},n.applyConstraints=function(e,t){if(R&&R.prototype.applyConstraints){var o;if(t)return n.streamEvents[t]&&(o=n.streamEvents[t].stream),void C(o,e);n.attachStreams.forEach((function(t){C(t,e)}))}else alert("track.applyConstraints is NOT supported in your browser.")},n.replaceTrack=function(e,t,r){if(e=e||{},E.prototype.getSenders)if(e instanceof R)A(e,t,r);else{if(e instanceof x)return T(e,"video").length&&A(T(e,"video")[0],t,!0),void(T(e,"audio").length&&A(T(e,"audio")[0],t,!1));if(y(e))throw"connection.replaceTrack requires audio and/or video and/or screen.";(e.audio||e.video||e.screen)&&(e.screen?"Edge"===DetectRTC.browser.name?navigator.getDisplayMedia({video:!0,audio:_(n)}).then((function(t){t.isScreen=!0,o.onGettingLocalMedia(t),!e.audio&&!e.video||_(n)?a(t):n.invokeGetUserMedia(null,a)}),(function(e){console.error("Unable to capture screen on Edge. HTTPs and version 17+ is required.")})):n.getScreenConstraints((function(t,o){if(t)return alert(t);n.invokeGetUserMedia({audio:!!_(n)&&S(o),video:o,isScreen:!0},!e.audio&&!e.video||_(n)?a:n.invokeGetUserMedia(null,a))})):(e.audio||e.video)&&n.invokeGetUserMedia(null,a))}else n.addStream(e);function a(o){n.replaceTrack(o,t,r||e.video||e.screen)}},n.resetTrack=function(e,t){e||(e=n.getAllParticipants()),"string"==typeof e&&(e=[e]),e.forEach((function(e){var o=n.peers[e].peer;void 0!==t&&!0!==t||!o.lastVideoTrack||n.replaceTrack(o.lastVideoTrack,e,!0),void 0!==t&&!1!==t||!o.lastAudioTrack||n.replaceTrack(o.lastAudioTrack,e,!1)}))},n.renegotiate=function(e){e?o.renegotiatePeer(e):n.peers.getAllParticipants().forEach((function(e){o.renegotiatePeer(e)}))},n.setStreamEndHandler=function(e,t){if(e&&e.addEventListener&&(t=!!t,!e.alreadySetEndHandler)){e.alreadySetEndHandler=!0;var o="ended";"oninactive"in e&&(o="inactive"),e.addEventListener(o,(function(){if(e.idInstance&&currentUserMediaRequest.remove(e.idInstance),!t){var o=[];n.attachStreams.forEach((function(t){t.id!=e.id&&o.push(t)})),n.attachStreams=o}var r=n.streamEvents[e.streamid];if(r||(r={stream:e,streamid:e.streamid,type:t?"remote":"local",userid:n.userid,extra:n.extra,mediaElement:n.streamEvents[e.streamid]?n.streamEvents[e.streamid].mediaElement:null}),t&&n.peers[r.userid]){var a=n.peers[r.userid].peer;o=[],a.getRemoteStreams().forEach((function(t){t.id!=e.id&&o.push(t)})),n.peers[r.userid].streams=o}r.userid===n.userid&&"remote"===r.type||(n.peersBackup[r.userid]&&(r.extra=n.peersBackup[r.userid].extra),n.onstreamended(r),delete n.streamEvents[e.streamid])}),!1)}},n.onMediaError=function(e,t){n.enableLogs&&console.error(e,t)},n.autoCloseEntireSession=!1,n.filesContainer=n.videosContainer=document.body||document.documentElement,n.isInitiator=!1,n.shareFile=o.shareFile,void 0!==W&&W.handle(n),void 0!==Y&&Y.handle(n),n.token=m,n.onNewParticipant=function(e,t){n.acceptParticipationRequest(e,t)},n.acceptParticipationRequest=function(e,t){t.successCallback&&(t.successCallback(),delete t.successCallback),o.createNewPeer(e,t)},void 0!==F&&(n.StreamsHandler=F),n.onleave=function(e){},n.invokeSelectFileDialog=function(e){var t=new u;t.accept="*.*",t.selectSingleFile(e)},n.onmute=function(e){if(e&&e.mediaElement)if("both"===e.muteType||"video"===e.muteType){e.mediaElement.src=null;var t=e.mediaElement.pause();void 0!==t?t.then((function(){e.mediaElement.poster=e.snapshot||"https://cdn.webrtc-experiment.com/images/muted.png"})):e.mediaElement.poster=e.snapshot||"https://cdn.webrtc-experiment.com/images/muted.png"}else"audio"===e.muteType&&(e.mediaElement.muted=!0)},n.onunmute=function(e){e&&e.mediaElement&&e.stream&&("both"===e.unmuteType||"video"===e.unmuteType?(e.mediaElement.poster=null,e.mediaElement.srcObject=e.stream,e.mediaElement.play()):"audio"===e.unmuteType&&(e.mediaElement.muted=!1))},n.onExtraDataUpdated=function(e){e.status="online",n.onUserStatusChanged(e,!0)},n.getAllParticipants=function(e){return n.peers.getAllParticipants(e)},void 0!==F&&(F.onSyncNeeded=function(e,t,r){n.peers.getAllParticipants().forEach((function(n){o.onNegotiationNeeded({streamid:e,action:t,streamSyncNeeded:!0,type:r||"both"},n)}))}),n.connectSocket=function(e){a(e)},n.closeSocket=function(){try{i.a.sockets={}}catch(e){}n.socket&&("function"==typeof n.socket.disconnect&&n.socket.disconnect(),"function"==typeof n.socket.resetProps&&n.socket.resetProps(),n.socket=null)},n.getSocket=function(e){return!e&&n.enableLogs&&console.warn("getSocket.callback paramter is required."),e=e||function(){},n.socket?e(n.socket):a((function(){e(n.socket)})),n.socket},n.getRemoteStreams=o.getRemoteStreams;var k=["selectFirst","selectAll","forEach"];if(n.streamEvents={selectFirst:function(e){return n.streamEvents.selectAll(e)[0]},selectAll:function(e){e||(e={local:!0,remote:!0,isScreen:!0,isAudio:!0,isVideo:!0}),"local"==e&&(e={local:!0}),"remote"==e&&(e={remote:!0}),"screen"==e&&(e={isScreen:!0}),"audio"==e&&(e={isAudio:!0}),"video"==e&&(e={isVideo:!0});var t=[];return Object.keys(n.streamEvents).forEach((function(o){var r=n.streamEvents[o];if(-1===k.indexOf(o)){var a=!0;e.local&&"local"===r.type&&(a=!1),e.remote&&"remote"===r.type&&(a=!1),e.isScreen&&r.stream.isScreen&&(a=!1),e.isVideo&&r.stream.isVideo&&(a=!1),e.isAudio&&r.stream.isAudio&&(a=!1),e.userid&&r.userid===e.userid&&(a=!1),!1===a&&t.push(r)}})),t}},n.socketURL="/",n.socketMessageEvent="RTCMultiConnection-Message",n.socketCustomEvent="RTCMultiConnection-Custom-Message",n.DetectRTC=DetectRTC,n.setCustomSocketEvent=function(e){e&&(n.socketCustomEvent=e),n.socket&&n.socket.emit("set-custom-socket-event-listener",n.socketCustomEvent)},n.getNumberOfBroadcastViewers=function(e,t){n.socket&&e&&t&&n.socket.emit("get-number-of-users-in-specific-broadcast",e,t)},n.onNumberOfBroadcastViewersUpdated=function(e){n.enableLogs&&n.isInitiator&&console.info("Number of broadcast (",e.broadcastId,") viewers",e.numberOfBroadcastViewers)},n.onUserStatusChanged=function(e,t){n.enableLogs&&!t&&console.info(e.userid,e.status)},n.getUserMediaHandler=L,n.multiPeersHandler=o,n.enableLogs=!0,n.setCustomSocketHandler=function(e){void 0!==l&&(l=e)},n.chunkSize=4e4,n.maxParticipantsAllowed=1e3,n.disconnectWith=o.disconnectWith,n.checkPresence=function(e,t){e=e||n.sessionid,"SSEConnection"!==l.name?n.socket?n.socket.emit("check-presence",e+"",(function(e,o,r){n.enableLogs&&console.log("checkPresence.isRoomExist: ",e," roomid: ",o),t(e,o,r)})):n.connectSocket((function(){n.checkPresence(e,t)})):SSEConnection.checkPresence(e,(function(e,o,r){if(!n.socket)return e||(n.userid=o),void n.connectSocket((function(){t(e,o,r)}));t(e,o)}))},n.onReadyForOffer=function(e,t){n.multiPeersHandler.createNewPeer(e,t)},n.setUserPreferences=function(e){return n.dontAttachStream&&(e.dontAttachLocalStream=!0),n.dontGetRemoteStream&&(e.dontGetRemoteStream=!0),e},n.updateExtraData=function(){n.socket.emit("extra-data-updated",n.extra)},n.enableScalableBroadcast=!1,n.maxRelayLimitPerUser=3,n.dontCaptureUserMedia=!1,n.dontAttachStream=!1,n.dontGetRemoteStream=!1,n.onReConnecting=function(e){n.enableLogs&&console.info("ReConnecting with",e.userid,"...")},n.beforeAddingStream=function(e){return e},n.beforeRemovingStream=function(e){return e},n.checkIfChromeExtensionAvailable=U,"undefined"!=typeof isFirefoxExtensionAvailable&&(n.checkIfChromeExtensionAvailable=isFirefoxExtensionAvailable),n.getChromeExtensionStatus=V,n.getScreenConstraints=function(e,t){_(n,t)&&(t=!0),function(e,t){if(G)return e(null,{mozMediaSource:"window",mediaSource:"window"});var n={mandatory:{chromeMediaSource:B,maxWidth:screen.width>1920?screen.width:1920,maxHeight:screen.height>1080?screen.height:1080},optional:[]};"desktop"!=B||D?("desktop"==B&&(n.mandatory.chromeMediaSourceId=D),e(null,n)):t?function(e){if(!e)throw'"callback" parameter is mandatory.';if(D)return e(D);z=e,window.postMessage("audio-plus-tab","*")}((function(t,o){n.mandatory.chromeMediaSourceId=t,o&&(n.canRequestAudioTrack=!0),e("PermissionDeniedError"==t?t:null,n)})):function(e){if(!e)throw'"callback" parameter is mandatory.';if(D)return e(D);z=e,window.postMessage("get-sourceId","*")}((function(t){n.mandatory.chromeMediaSourceId=t,e("PermissionDeniedError"==t?t:null,n)}))}((function(t,o){t||(o=n.modifyScreenConstraints(o),e(t,o))}),t)},n.modifyScreenConstraints=function(e){return e},n.onPeerStateChanged=function(e){n.enableLogs&&-1!==e.iceConnectionState.search(/closed|failed/gi)&&console.error("Peer connection is closed between you & ",e.userid,e.extra,"state:",e.iceConnectionState)},n.isOnline=!0,g("online",(function(){n.isOnline=!0})),g("offline",(function(){n.isOnline=!1})),n.isLowBandwidth=!1,navigator&&navigator.connection&&navigator.connection.type&&(n.isLowBandwidth=-1!==navigator.connection.type.toString().toLowerCase().search(/wifi|cell/g),n.isLowBandwidth)){if(n.bandwidth={audio:!1,video:!1,screen:!1},n.mediaConstraints.audio&&n.mediaConstraints.audio.optional&&n.mediaConstraints.audio.optional.length){var M=[];n.mediaConstraints.audio.optional.forEach((function(e){void 0===e.bandwidth&&M.push(e)})),n.mediaConstraints.audio.optional=M}n.mediaConstraints.video&&n.mediaConstraints.video.optional&&n.mediaConstraints.video.optional.length&&(M=[],n.mediaConstraints.video.optional.forEach((function(e){void 0===e.bandwidth&&M.push(e)})),n.mediaConstraints.video.optional=M)}n.getExtraData=function(e,t){if(!e)throw"remoteUserId is required.";if(!t)return n.peers[e]?n.peers[e].extra:n.peersBackup[e]?n.peersBackup[e].extra:{};n.socket.emit("get-remote-user-extra-data",e,(function(e,n,o){t(e,n,o)}))},t.autoOpenOrJoin&&n.openOrJoin(n.sessionid),n.onUserIdAlreadyTaken=function(e,t){n.close(),n.closeSocket(),n.isInitiator=!1,n.userid=n.token(),n.join(n.sessionid),n.enableLogs&&console.warn("Userid already taken.",e,"Your new userid:",n.userid)},n.trickleIce=!0,n.version="3.6.5",n.onSettingLocalDescription=function(e){n.enableLogs&&console.info("Set local description for remote user",e.userid)},n.resetScreen=function(){D=null,DetectRTC&&DetectRTC.screen&&delete DetectRTC.screen.sourceId,currentUserMediaRequest={streams:[],mutex:!1,queueRequests:[]}},n.autoCreateMediaElement=!0,n.password=null,n.setPassword=function(e,t){t=t||function(){},n.socket?n.socket.emit("set-password",e,t):(n.password=e,t(!0,n.sessionid,null))},n.errors={ROOM_NOT_AVAILABLE:"Room not available",INVALID_PASSWORD:"Invalid password",USERID_NOT_AVAILABLE:"User ID does not exist",ROOM_PERMISSION_DENIED:"Room permission denied",ROOM_FULL:"Room full",DID_NOT_JOIN_ANY_ROOM:"Did not join any room yet",INVALID_SOCKET:"Invalid socket",PUBLIC_IDENTIFIER_MISSING:"publicRoomIdentifier is required",INVALID_ADMIN_CREDENTIAL:"Invalid username or password attempted"}}(this)}}).call(this,n(73).Buffer,n(31),n(49))},function(e,t,n){"use strict";(function(e){if(n(163),n(360),n(361),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;function t(e,t,n){e[t]||Object.defineProperty(e,t,{writable:!0,configurable:!0,value:n})}t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach((function(e){[][e]&&t(Array,e,Function.call.bind([][e]))}))}).call(this,n(31))},function(e,t,n){n(164),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(244),n(245),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(99),n(268),n(269),n(127),n(270),n(271),n(272),n(273),n(274),n(130),n(132),n(133),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),e.exports=n(20)},function(e,t,n){"use strict";var o=n(2),r=n(16),a=n(7),i=n(0),s=n(14),c=n(32).KEY,l=n(3),u=n(58),d=n(45),f=n(36),p=n(5),h=n(110),m=n(79),v=n(165),g=n(61),b=n(1),y=n(4),w=n(17),x=n(24),_=n(35),S=n(39),T=n(113),C=n(18),E=n(8),A=n(37),k=C.f,M=E.f,O=T.f,R=o.Symbol,P=o.JSON,j=P&&P.stringify,I=p("_hidden"),N=p("toPrimitive"),L={}.propertyIsEnumerable,F=u("symbol-registry"),D=u("symbols"),z=u("op-symbols"),B=Object.prototype,U="function"==typeof R,G=o.QObject,V=!G||!G.prototype||!G.prototype.findChild,q=a&&l((function(){return 7!=S(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a}))?function(e,t,n){var o=k(B,t);o&&delete B[t],M(e,t,n),o&&e!==B&&M(B,t,o)}:M,H=function(e){var t=D[e]=S(R.prototype);return t._k=e,t},W=U&&"symbol"==typeof R.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof R},Y=function(e,t,n){return e===B&&Y(z,t,n),b(e),t=x(t,!0),b(n),r(D,t)?(n.enumerable?(r(e,I)&&e[I][t]&&(e[I][t]=!1),n=S(n,{enumerable:_(0,!1)})):(r(e,I)||M(e,I,_(1,{})),e[I][t]=!0),q(e,t,n)):M(e,t,n)},X=function(e,t){b(e);for(var n,o=v(t=w(t)),r=0,a=o.length;a>r;)Y(e,n=o[r++],t[n]);return e},K=function(e){var t=L.call(this,e=x(e,!0));return!(this===B&&r(D,e)&&!r(z,e))&&(!(t||!r(this,e)||!r(D,e)||r(this,I)&&this[I][e])||t)},J=function(e,t){if(e=w(e),t=x(t,!0),e!==B||!r(D,t)||r(z,t)){var n=k(e,t);return!n||!r(D,t)||r(e,I)&&e[I][t]||(n.enumerable=!0),n}},$=function(e){for(var t,n=O(w(e)),o=[],a=0;n.length>a;)r(D,t=n[a++])||t==I||t==c||o.push(t);return o},Z=function(e){for(var t,n=e===B,o=O(n?z:w(e)),a=[],i=0;o.length>i;)!r(D,t=o[i++])||n&&!r(B,t)||a.push(D[t]);return a};U||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(z,n),r(this,I)&&r(this[I],e)&&(this[I][e]=!1),q(this,e,_(1,n))};return a&&V&&q(B,e,{configurable:!0,set:t}),H(e)}).prototype,"toString",(function(){return this._k})),C.f=J,E.f=Y,n(40).f=T.f=$,n(54).f=K,n(60).f=Z,a&&!n(33)&&s(B,"propertyIsEnumerable",K,!0),h.f=function(e){return H(p(e))}),i(i.G+i.W+i.F*!U,{Symbol:R});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)p(Q[ee++]);for(var te=A(p.store),ne=0;te.length>ne;)m(te[ne++]);i(i.S+i.F*!U,"Symbol",{for:function(e){return r(F,e+="")?F[e]:F[e]=R(e)},keyFor:function(e){if(!W(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),i(i.S+i.F*!U,"Object",{create:function(e,t){return void 0===t?S(e):X(S(e),t)},defineProperty:Y,defineProperties:X,getOwnPropertyDescriptor:J,getOwnPropertyNames:$,getOwnPropertySymbols:Z}),P&&i(i.S+i.F*(!U||l((function(){var e=R();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,o=[e],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=t=o[1],(y(t)||void 0!==e)&&!W(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!W(t))return t}),o[1]=t,j.apply(P,o)}}),R.prototype[N]||n(13)(R.prototype,N,R.prototype.valueOf),d(R,"Symbol"),d(Math,"Math",!0),d(o.JSON,"JSON",!0)},function(e,t,n){var o=n(37),r=n(60),a=n(54);e.exports=function(e){var t=o(e),n=r.f;if(n)for(var i,s=n(e),c=a.f,l=0;s.length>l;)c.call(e,i=s[l++])&&t.push(i);return t}},function(e,t,n){var o=n(0);o(o.S,"Object",{create:n(39)})},function(e,t,n){var o=n(0);o(o.S+o.F*!n(7),"Object",{defineProperty:n(8).f})},function(e,t,n){var o=n(0);o(o.S+o.F*!n(7),"Object",{defineProperties:n(112)})},function(e,t,n){var o=n(17),r=n(18).f;n(27)("getOwnPropertyDescriptor",(function(){return function(e,t){return r(o(e),t)}}))},function(e,t,n){var o=n(10),r=n(19);n(27)("getPrototypeOf",(function(){return function(e){return r(o(e))}}))},function(e,t,n){var o=n(10),r=n(37);n(27)("keys",(function(){return function(e){return r(o(e))}}))},function(e,t,n){n(27)("getOwnPropertyNames",(function(){return n(113).f}))},function(e,t,n){var o=n(4),r=n(32).onFreeze;n(27)("freeze",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(4),r=n(32).onFreeze;n(27)("seal",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(4),r=n(32).onFreeze;n(27)("preventExtensions",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(4);n(27)("isFrozen",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(4);n(27)("isSealed",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(4);n(27)("isExtensible",(function(e){return function(t){return!!o(t)&&(!e||e(t))}}))},function(e,t,n){var o=n(0);o(o.S+o.F,"Object",{assign:n(114)})},function(e,t,n){var o=n(0);o(o.S,"Object",{is:n(181)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var o=n(0);o(o.S,"Object",{setPrototypeOf:n(83).set})},function(e,t,n){"use strict";var o=n(55),r={};r[n(5)("toStringTag")]="z",r+""!="[object z]"&&n(14)(Object.prototype,"toString",(function(){return"[object "+o(this)+"]"}),!0)},function(e,t,n){var o=n(0);o(o.P,"Function",{bind:n(115)})},function(e,t,n){var o=n(8).f,r=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in r||n(7)&&o(r,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var o=n(4),r=n(19),a=n(5)("hasInstance"),i=Function.prototype;a in i||n(8).f(i,a,{value:function(e){if("function"!=typeof this||!o(e))return!1;if(!o(this.prototype))return e instanceof this;for(;e=r(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var o=n(0),r=n(117);o(o.G+o.F*(parseInt!=r),{parseInt:r})},function(e,t,n){var o=n(0),r=n(118);o(o.G+o.F*(parseFloat!=r),{parseFloat:r})},function(e,t,n){"use strict";var o=n(2),r=n(16),a=n(22),i=n(85),s=n(24),c=n(3),l=n(40).f,u=n(18).f,d=n(8).f,f=n(46).trim,p=o.Number,h=p,m=p.prototype,v="Number"==a(n(39)(m)),g="trim"in String.prototype,b=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,o,r,a=(t=g?t.trim():f(t,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(t.charCodeAt(1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+t}for(var i,c=t.slice(2),l=0,u=c.length;l<u;l++)if((i=c.charCodeAt(l))<48||i>r)return NaN;return parseInt(c,o)}}return+t};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof p&&(v?c((function(){m.valueOf.call(n)})):"Number"!=a(n))?i(new h(b(t)),n,p):b(t)};for(var y,w=n(7)?l(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)r(h,y=w[x])&&!r(p,y)&&d(p,y,u(h,y));p.prototype=m,m.constructor=p,n(14)(o,"Number",p)}},function(e,t,n){"use strict";var o=n(0),r=n(26),a=n(119),i=n(86),s=1..toFixed,c=Math.floor,l=[0,0,0,0,0,0],u="Number.toFixed: incorrect invocation!",d=function(e,t){for(var n=-1,o=t;++n<6;)o+=e*l[n],l[n]=o%1e7,o=c(o/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=c(n/e),n=n%e*1e7},p=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+i.call("0",7-n.length)+n}return t},h=function(e,t,n){return 0===t?n:t%2==1?h(e,t-1,n*e):h(e*e,t/2,n)};o(o.P+o.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(3)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,o,s,c=a(this,u),l=r(e),m="",v="0";if(l<0||l>20)throw RangeError(u);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(m="-",c=-c),c>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(c*h(2,69,1))-69)<0?c*h(2,-t,1):c/h(2,t,1),n*=4503599627370496,(t=52-t)>0){for(d(0,n),o=l;o>=7;)d(1e7,0),o-=7;for(d(h(10,o,1),0),o=t-1;o>=23;)f(1<<23),o-=23;f(1<<o),d(1,1),f(2),v=p()}else d(0,n),d(1<<-t,0),v=p()+i.call("0",l);return l>0?m+((s=v.length)<=l?"0."+i.call("0",l-s)+v:v.slice(0,s-l)+"."+v.slice(s-l)):m+v}})},function(e,t,n){"use strict";var o=n(0),r=n(3),a=n(119),i=1..toPrecision;o(o.P+o.F*(r((function(){return"1"!==i.call(1,void 0)}))||!r((function(){i.call({})}))),"Number",{toPrecision:function(e){var t=a(this,"Number#toPrecision: incorrect invocation!");return void 0===e?i.call(t):i.call(t,e)}})},function(e,t,n){var o=n(0);o(o.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var o=n(0),r=n(2).isFinite;o(o.S,"Number",{isFinite:function(e){return"number"==typeof e&&r(e)}})},function(e,t,n){var o=n(0);o(o.S,"Number",{isInteger:n(120)})},function(e,t,n){var o=n(0);o(o.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var o=n(0),r=n(120),a=Math.abs;o(o.S,"Number",{isSafeInteger:function(e){return r(e)&&a(e)<=9007199254740991}})},function(e,t,n){var o=n(0);o(o.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var o=n(0);o(o.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var o=n(0),r=n(118);o(o.S+o.F*(Number.parseFloat!=r),"Number",{parseFloat:r})},function(e,t,n){var o=n(0),r=n(117);o(o.S+o.F*(Number.parseInt!=r),"Number",{parseInt:r})},function(e,t,n){var o=n(0),r=n(121),a=Math.sqrt,i=Math.acosh;o(o.S+o.F*!(i&&710==Math.floor(i(Number.MAX_VALUE))&&i(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:r(e-1+a(e-1)*a(e+1))}})},function(e,t,n){var o=n(0),r=Math.asinh;o(o.S+o.F*!(r&&1/r(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var o=n(0),r=Math.atanh;o(o.S+o.F*!(r&&1/r(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var o=n(0),r=n(87);o(o.S,"Math",{cbrt:function(e){return r(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var o=n(0);o(o.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var o=n(0),r=Math.exp;o(o.S,"Math",{cosh:function(e){return(r(e=+e)+r(-e))/2}})},function(e,t,n){var o=n(0),r=n(88);o(o.S+o.F*(r!=Math.expm1),"Math",{expm1:r})},function(e,t,n){var o=n(0);o(o.S,"Math",{fround:n(122)})},function(e,t,n){var o=n(0),r=Math.abs;o(o.S,"Math",{hypot:function(e,t){for(var n,o,a=0,i=0,s=arguments.length,c=0;i<s;)c<(n=r(arguments[i++]))?(a=a*(o=c/n)*o+1,c=n):a+=n>0?(o=n/c)*o:n;return c===1/0?1/0:c*Math.sqrt(a)}})},function(e,t,n){var o=n(0),r=Math.imul;o(o.S+o.F*n(3)((function(){return-5!=r(4294967295,5)||2!=r.length})),"Math",{imul:function(e,t){var n=+e,o=+t,r=65535&n,a=65535&o;return 0|r*a+((65535&n>>>16)*a+r*(65535&o>>>16)<<16>>>0)}})},function(e,t,n){var o=n(0);o(o.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var o=n(0);o(o.S,"Math",{log1p:n(121)})},function(e,t,n){var o=n(0);o(o.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var o=n(0);o(o.S,"Math",{sign:n(87)})},function(e,t,n){var o=n(0),r=n(88),a=Math.exp;o(o.S+o.F*n(3)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(r(e)-r(-e))/2:(a(e-1)-a(-e-1))*(Math.E/2)}})},function(e,t,n){var o=n(0),r=n(88),a=Math.exp;o(o.S,"Math",{tanh:function(e){var t=r(e=+e),n=r(-e);return t==1/0?1:n==1/0?-1:(t-n)/(a(e)+a(-e))}})},function(e,t,n){var o=n(0);o(o.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var o=n(0),r=n(38),a=String.fromCharCode,i=String.fromCodePoint;o(o.S+o.F*(!!i&&1!=i.length),"String",{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,i=0;o>i;){if(t=+arguments[i++],r(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var o=n(0),r=n(17),a=n(9);o(o.S,"String",{raw:function(e){for(var t=r(e.raw),n=a(t.length),o=arguments.length,i=[],s=0;n>s;)i.push(String(t[s++])),s<o&&i.push(String(arguments[s]));return i.join("")}})},function(e,t,n){"use strict";n(46)("trim",(function(e){return function(){return e(this,3)}}))},function(e,t,n){"use strict";var o=n(89)(!0);n(90)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=o(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var o=n(0),r=n(89)(!1);o(o.P,"String",{codePointAt:function(e){return r(this,e)}})},function(e,t,n){"use strict";var o=n(0),r=n(9),a=n(92),i="".endsWith;o(o.P+o.F*n(93)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,o=r(t.length),s=void 0===n?o:Math.min(r(n),o),c=String(e);return i?i.call(t,c,s):t.slice(s-c.length,s)===c}})},function(e,t,n){"use strict";var o=n(0),r=n(92);o(o.P+o.F*n(93)("includes"),"String",{includes:function(e){return!!~r(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var o=n(0);o(o.P,"String",{repeat:n(86)})},function(e,t,n){"use strict";var o=n(0),r=n(9),a=n(92),i="".startsWith;o(o.P+o.F*n(93)("startsWith"),"String",{startsWith:function(e){var t=a(this,e,"startsWith"),n=r(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),o=String(e);return i?i.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){"use strict";n(15)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(15)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(15)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(15)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(15)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(15)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(15)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(15)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(15)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(15)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(15)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(15)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(15)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var o=n(0);o(o.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var o=n(0),r=n(10),a=n(24);o(o.P+o.F*n(3)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=r(this),n=a(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var o=n(0),r=n(243);o(o.P+o.F*(Date.prototype.toISOString!==r),"Date",{toISOString:r})},function(e,t,n){"use strict";var o=n(3),r=Date.prototype.getTime,a=Date.prototype.toISOString,i=function(e){return e>9?e:"0"+e};e.exports=o((function(){return"0385-07-25T07:06:39.999Z"!=a.call(new Date(-50000000000001))}))||!o((function(){a.call(new Date(NaN))}))?function(){if(!isFinite(r.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),o=t<0?"-":t>9999?"+":"";return o+("00000"+Math.abs(t)).slice(o?-6:-4)+"-"+i(e.getUTCMonth()+1)+"-"+i(e.getUTCDate())+"T"+i(e.getUTCHours())+":"+i(e.getUTCMinutes())+":"+i(e.getUTCSeconds())+"."+(n>99?n:"0"+i(n))+"Z"}:a},function(e,t,n){var o=Date.prototype,r=o.toString,a=o.getTime;new Date(NaN)+""!="Invalid Date"&&n(14)(o,"toString",(function(){var e=a.call(this);return e==e?r.call(this):"Invalid Date"}))},function(e,t,n){var o=n(5)("toPrimitive"),r=Date.prototype;o in r||n(13)(r,o,n(246))},function(e,t,n){"use strict";var o=n(1),r=n(24);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return r(o(this),"number"!=e)}},function(e,t,n){var o=n(0);o(o.S,"Array",{isArray:n(61)})},function(e,t,n){"use strict";var o=n(21),r=n(0),a=n(10),i=n(123),s=n(94),c=n(9),l=n(95),u=n(96);r(r.S+r.F*!n(63)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,r,d,f=a(e),p="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,v=void 0!==m,g=0,b=u(f);if(v&&(m=o(m,h>2?arguments[2]:void 0,2)),null==b||p==Array&&s(b))for(n=new p(t=c(f.length));t>g;g++)l(n,g,v?m(f[g],g):f[g]);else for(d=b.call(f),n=new p;!(r=d.next()).done;g++)l(n,g,v?i(d,m,[r.value,g],!0):r.value);return n.length=g,n}})},function(e,t,n){"use strict";var o=n(0),r=n(95);o(o.S+o.F*n(3)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)r(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var o=n(0),r=n(17),a=[].join;o(o.P+o.F*(n(53)!=Object||!n(23)(a)),"Array",{join:function(e){return a.call(r(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var o=n(0),r=n(82),a=n(22),i=n(38),s=n(9),c=[].slice;o(o.P+o.F*n(3)((function(){r&&c.call(r)})),"Array",{slice:function(e,t){var n=s(this.length),o=a(this);if(t=void 0===t?n:t,"Array"==o)return c.call(this,e,t);for(var r=i(e,n),l=i(t,n),u=s(l-r),d=new Array(u),f=0;f<u;f++)d[f]="String"==o?this.charAt(r+f):this[r+f];return d}})},function(e,t,n){"use strict";var o=n(0),r=n(12),a=n(10),i=n(3),s=[].sort,c=[1,2,3];o(o.P+o.F*(i((function(){c.sort(void 0)}))||!i((function(){c.sort(null)}))||!n(23)(s)),"Array",{sort:function(e){return void 0===e?s.call(a(this)):s.call(a(this),r(e))}})},function(e,t,n){"use strict";var o=n(0),r=n(28)(0),a=n(23)([].forEach,!0);o(o.P+o.F*!a,"Array",{forEach:function(e){return r(this,e,arguments[1])}})},function(e,t,n){var o=n(4),r=n(61),a=n(5)("species");e.exports=function(e){var t;return r(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!r(t.prototype)||(t=void 0),o(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){"use strict";var o=n(0),r=n(28)(1);o(o.P+o.F*!n(23)([].map,!0),"Array",{map:function(e){return r(this,e,arguments[1])}})},function(e,t,n){"use strict";var o=n(0),r=n(28)(2);o(o.P+o.F*!n(23)([].filter,!0),"Array",{filter:function(e){return r(this,e,arguments[1])}})},function(e,t,n){"use strict";var o=n(0),r=n(28)(3);o(o.P+o.F*!n(23)([].some,!0),"Array",{some:function(e){return r(this,e,arguments[1])}})},function(e,t,n){"use strict";var o=n(0),r=n(28)(4);o(o.P+o.F*!n(23)([].every,!0),"Array",{every:function(e){return r(this,e,arguments[1])}})},function(e,t,n){"use strict";var o=n(0),r=n(124);o(o.P+o.F*!n(23)([].reduce,!0),"Array",{reduce:function(e){return r(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var o=n(0),r=n(124);o(o.P+o.F*!n(23)([].reduceRight,!0),"Array",{reduceRight:function(e){return r(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var o=n(0),r=n(59)(!1),a=[].indexOf,i=!!a&&1/[1].indexOf(1,-0)<0;o(o.P+o.F*(i||!n(23)(a)),"Array",{indexOf:function(e){return i?a.apply(this,arguments)||0:r(this,e,arguments[1])}})},function(e,t,n){"use strict";var o=n(0),r=n(17),a=n(26),i=n(9),s=[].lastIndexOf,c=!!s&&1/[1].lastIndexOf(1,-0)<0;o(o.P+o.F*(c||!n(23)(s)),"Array",{lastIndexOf:function(e){if(c)return s.apply(this,arguments)||0;var t=r(this),n=i(t.length),o=n-1;for(arguments.length>1&&(o=Math.min(o,a(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return-1}})},function(e,t,n){var o=n(0);o(o.P,"Array",{copyWithin:n(125)}),n(34)("copyWithin")},function(e,t,n){var o=n(0);o(o.P,"Array",{fill:n(98)}),n(34)("fill")},function(e,t,n){"use strict";var o=n(0),r=n(28)(5),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),o(o.P+o.F*a,"Array",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("find")},function(e,t,n){"use strict";var o=n(0),r=n(28)(6),a="findIndex",i=!0;a in[]&&Array(1).findIndex((function(){i=!1})),o(o.P+o.F*i,"Array",{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)(a)},function(e,t,n){n(41)("Array")},function(e,t,n){var o=n(2),r=n(85),a=n(8).f,i=n(40).f,s=n(62),c=n(64),l=o.RegExp,u=l,d=l.prototype,f=/a/g,p=/a/g,h=new l(f)!==f;if(n(7)&&(!h||n(3)((function(){return p[n(5)("match")]=!1,l(f)!=f||l(p)==p||"/a/i"!=l(f,"i")})))){l=function(e,t){var n=this instanceof l,o=s(e),a=void 0===t;return!n&&o&&e.constructor===l&&a?e:r(h?new u(o&&!a?e.source:e,t):u((o=e instanceof l)?e.source:e,o&&a?c.call(e):t),n?this:d,l)};for(var m=function(e){e in l||a(l,e,{configurable:!0,get:function(){return u[e]},set:function(t){u[e]=t}})},v=i(u),g=0;v.length>g;)m(v[g++]);d.constructor=l,l.prototype=d,n(14)(o,"RegExp",l)}n(41)("RegExp")},function(e,t,n){"use strict";n(127);var o=n(1),r=n(64),a=n(7),i=/./.toString,s=function(e){n(14)(RegExp.prototype,"toString",e,!0)};n(3)((function(){return"/a/b"!=i.call({source:"a",flags:"b"})}))?s((function(){var e=o(this);return"/".concat(e.source,"/","flags"in e?e.flags:!a&&e instanceof RegExp?r.call(e):void 0)})):"toString"!=i.name&&s((function(){return i.call(this)}))},function(e,t,n){n(65)("match",1,(function(e,t,n){return[function(n){"use strict";var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},n]}))},function(e,t,n){n(65)("replace",2,(function(e,t,n){return[function(o,r){"use strict";var a=e(this),i=null==o?void 0:o[t];return void 0!==i?i.call(o,a,r):n.call(String(a),o,r)},n]}))},function(e,t,n){n(65)("search",1,(function(e,t,n){return[function(n){"use strict";var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},n]}))},function(e,t,n){n(65)("split",2,(function(e,t,o){"use strict";var r=n(62),a=o,i=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var s=void 0===/()??/.exec("")[1];o=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!r(e))return a.call(n,e,t);var o,c,l,u,d,f=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,m=void 0===t?4294967295:t>>>0,v=new RegExp(e.source,p+"g");for(s||(o=new RegExp("^"+v.source+"$(?!s)",p));(c=v.exec(n))&&!((l=c.index+c[0].length)>h&&(f.push(n.slice(h,c.index)),!s&&c.length>1&&c[0].replace(o,(function(){for(d=1;d<arguments.length-2;d++)void 0===arguments[d]&&(c[d]=void 0)})),c.length>1&&c.index<n.length&&i.apply(f,c.slice(1)),u=c[0].length,h=l,f.length>=m));)v.lastIndex===c.index&&v.lastIndex++;return h===n.length?!u&&v.test("")||f.push(""):f.push(n.slice(h)),f.length>m?f.slice(0,m):f}}else"0".split(void 0,0).length&&(o=function(e,t){return void 0===e&&0===t?[]:a.call(this,e,t)});return[function(n,r){var a=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,a,r):o.call(String(a),n,r)},o]}))},function(e,t,n){"use strict";var o,r,a,i,s=n(33),c=n(2),l=n(21),u=n(55),d=n(0),f=n(4),p=n(12),h=n(42),m=n(43),v=n(66),g=n(100).set,b=n(101)(),y=n(102),w=n(128),x=n(67),_=n(129),S=c.TypeError,T=c.process,C=T&&T.versions,E=C&&C.v8||"",A=c.Promise,k="process"==u(T),M=function(){},O=r=y.f,R=!!function(){try{var e=A.resolve(1),t=(e.constructor={})[n(5)("species")]=function(e){e(M,M)};return(k||"function"==typeof PromiseRejectionEvent)&&e.then(M)instanceof t&&0!==E.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(e){}}(),P=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},j=function(e,t){if(!e._n){e._n=!0;var n=e._c;b((function(){for(var o=e._v,r=1==e._s,a=0,i=function(t){var n,a,i,s=r?t.ok:t.fail,c=t.resolve,l=t.reject,u=t.domain;try{s?(r||(2==e._h&&L(e),e._h=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),i=!0)),n===t.promise?l(S("Promise-chain cycle")):(a=P(n))?a.call(n,c,l):c(n)):l(o)}catch(e){u&&!i&&u.exit(),l(e)}};n.length>a;)i(n[a++]);e._c=[],e._n=!1,t&&!e._h&&I(e)}))}},I=function(e){g.call(c,(function(){var t,n,o,r=e._v,a=N(e);if(a&&(t=w((function(){k?T.emit("unhandledRejection",r,e):(n=c.onunhandledrejection)?n({promise:e,reason:r}):(o=c.console)&&o.error&&o.error("Unhandled promise rejection",r)})),e._h=k||N(e)?2:1),e._a=void 0,a&&t.e)throw t.v}))},N=function(e){return 1!==e._h&&0===(e._a||e._c).length},L=function(e){g.call(c,(function(){var t;k?T.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})}))},F=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),j(t,!0))},D=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=P(e))?b((function(){var o={_w:n,_d:!1};try{t.call(e,l(D,o,1),l(F,o,1))}catch(e){F.call(o,e)}})):(n._v=e,n._s=1,j(n,!1))}catch(e){F.call({_w:n,_d:!1},e)}}};R||(A=function(e){h(this,A,"Promise","_h"),p(e),o.call(this);try{e(l(D,this,1),l(F,this,1))}catch(e){F.call(this,e)}},(o=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(44)(A.prototype,{then:function(e,t){var n=O(v(this,A));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=k?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&j(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new o;this.promise=e,this.resolve=l(D,e,1),this.reject=l(F,e,1)},y.f=O=function(e){return e===A||e===i?new a(e):r(e)}),d(d.G+d.W+d.F*!R,{Promise:A}),n(45)(A,"Promise"),n(41)("Promise"),i=n(20).Promise,d(d.S+d.F*!R,"Promise",{reject:function(e){var t=O(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(s||!R),"Promise",{resolve:function(e){return _(s&&this===i?A:this,e)}}),d(d.S+d.F*!(R&&n(63)((function(e){A.all(e).catch(M)}))),"Promise",{all:function(e){var t=this,n=O(t),o=n.resolve,r=n.reject,a=w((function(){var n=[],a=0,i=1;m(e,!1,(function(e){var s=a++,c=!1;n.push(void 0),i++,t.resolve(e).then((function(e){c||(c=!0,n[s]=e,--i||o(n))}),r)})),--i||o(n)}));return a.e&&r(a.v),n.promise},race:function(e){var t=this,n=O(t),o=n.reject,r=w((function(){m(e,!1,(function(e){t.resolve(e).then(n.resolve,o)}))}));return r.e&&o(r.v),n.promise}})},function(e,t,n){"use strict";var o=n(134),r=n(48);n(68)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,"WeakSet"),e,!0)}},o,!1,!0)},function(e,t,n){"use strict";var o=n(0),r=n(69),a=n(103),i=n(1),s=n(38),c=n(9),l=n(4),u=n(2).ArrayBuffer,d=n(66),f=a.ArrayBuffer,p=a.DataView,h=r.ABV&&u.isView,m=f.prototype.slice,v=r.VIEW;o(o.G+o.W+o.F*(u!==f),{ArrayBuffer:f}),o(o.S+o.F*!r.CONSTR,"ArrayBuffer",{isView:function(e){return h&&h(e)||l(e)&&v in e}}),o(o.P+o.U+o.F*n(3)((function(){return!new f(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(i(this),e);for(var n=i(this).byteLength,o=s(e,n),r=s(void 0===t?n:t,n),a=new(d(this,f))(c(r-o)),l=new p(this),u=new p(a),h=0;o<r;)u.setUint8(h++,l.getUint8(o++));return a}}),n(41)("ArrayBuffer")},function(e,t,n){var o=n(0);o(o.G+o.W+o.F*!n(69).ABV,{DataView:n(103).DataView})},function(e,t,n){n(29)("Int8",1,(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){n(29)("Uint8",1,(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){n(29)("Uint8",1,(function(e){return function(t,n,o){return e(this,t,n,o)}}),!0)},function(e,t,n){n(29)("Int16",2,(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){n(29)("Uint16",2,(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){n(29)("Int32",4,(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){n(29)("Uint32",4,(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){n(29)("Float32",4,(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){n(29)("Float64",8,(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){var o=n(0),r=n(12),a=n(1),i=(n(2).Reflect||{}).apply,s=Function.apply;o(o.S+o.F*!n(3)((function(){i((function(){}))})),"Reflect",{apply:function(e,t,n){var o=r(e),c=a(n);return i?i(o,t,c):s.call(o,t,c)}})},function(e,t,n){var o=n(0),r=n(39),a=n(12),i=n(1),s=n(4),c=n(3),l=n(115),u=(n(2).Reflect||{}).construct,d=c((function(){function e(){}return!(u((function(){}),[],e)instanceof e)})),f=!c((function(){u((function(){}))}));o(o.S+o.F*(d||f),"Reflect",{construct:function(e,t){a(e),i(t);var n=arguments.length<3?e:a(arguments[2]);if(f&&!d)return u(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var o=[null];return o.push.apply(o,t),new(l.apply(e,o))}var c=n.prototype,p=r(s(c)?c:Object.prototype),h=Function.apply.call(e,p,t);return s(h)?h:p}})},function(e,t,n){var o=n(8),r=n(0),a=n(1),i=n(24);r(r.S+r.F*n(3)((function(){Reflect.defineProperty(o.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(e,t,n){a(e),t=i(t,!0),a(n);try{return o.f(e,t,n),!0}catch(e){return!1}}})},function(e,t,n){var o=n(0),r=n(18).f,a=n(1);o(o.S,"Reflect",{deleteProperty:function(e,t){var n=r(a(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var o=n(0),r=n(1),a=function(e){this._t=r(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(91)(a,"Object",(function(){var e,t=this._k;do{if(this._i>=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),o(o.S,"Reflect",{enumerate:function(e){return new a(e)}})},function(e,t,n){var o=n(18),r=n(19),a=n(16),i=n(0),s=n(4),c=n(1);i(i.S,"Reflect",{get:function e(t,n){var i,l,u=arguments.length<3?t:arguments[2];return c(t)===u?t[n]:(i=o.f(t,n))?a(i,"value")?i.value:void 0!==i.get?i.get.call(u):void 0:s(l=r(t))?e(l,n,u):void 0}})},function(e,t,n){var o=n(18),r=n(0),a=n(1);r(r.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return o.f(a(e),t)}})},function(e,t,n){var o=n(0),r=n(19),a=n(1);o(o.S,"Reflect",{getPrototypeOf:function(e){return r(a(e))}})},function(e,t,n){var o=n(0);o(o.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var o=n(0),r=n(1),a=Object.isExtensible;o(o.S,"Reflect",{isExtensible:function(e){return r(e),!a||a(e)}})},function(e,t,n){var o=n(0);o(o.S,"Reflect",{ownKeys:n(136)})},function(e,t,n){var o=n(0),r=n(1),a=Object.preventExtensions;o(o.S,"Reflect",{preventExtensions:function(e){r(e);try{return a&&a(e),!0}catch(e){return!1}}})},function(e,t,n){var o=n(8),r=n(18),a=n(19),i=n(16),s=n(0),c=n(35),l=n(1),u=n(4);s(s.S,"Reflect",{set:function e(t,n,s){var d,f,p=arguments.length<4?t:arguments[3],h=r.f(l(t),n);if(!h){if(u(f=a(t)))return e(f,n,s,p);h=c(0)}if(i(h,"value")){if(!1===h.writable||!u(p))return!1;if(d=r.f(p,n)){if(d.get||d.set||!1===d.writable)return!1;d.value=s,o.f(p,n,d)}else o.f(p,n,c(0,s));return!0}return void 0!==h.set&&(h.set.call(p,s),!0)}})},function(e,t,n){var o=n(0),r=n(83);r&&o(o.S,"Reflect",{setPrototypeOf:function(e,t){r.check(e,t);try{return r.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var o=n(0),r=n(59)(!0);o(o.P,"Array",{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("includes")},function(e,t,n){"use strict";var o=n(0),r=n(137),a=n(10),i=n(9),s=n(12),c=n(97);o(o.P,"Array",{flatMap:function(e){var t,n,o=a(this);return s(e),t=i(o.length),n=c(o,0),r(n,o,o,t,0,1,e,arguments[1]),n}}),n(34)("flatMap")},function(e,t,n){"use strict";var o=n(0),r=n(137),a=n(10),i=n(9),s=n(26),c=n(97);o(o.P,"Array",{flatten:function(){var e=arguments[0],t=a(this),n=i(t.length),o=c(t,0);return r(o,t,t,n,0,void 0===e?1:s(e)),o}}),n(34)("flatten")},function(e,t,n){"use strict";var o=n(0),r=n(89)(!0);o(o.P,"String",{at:function(e){return r(this,e)}})},function(e,t,n){"use strict";var o=n(0),r=n(138),a=n(67);o(o.P+o.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(a),"String",{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var o=n(0),r=n(138),a=n(67);o(o.P+o.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(a),"String",{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(46)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(46)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var o=n(0),r=n(25),a=n(9),i=n(62),s=n(64),c=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(91)(l,"RegExp String",(function(){var e=this._r.exec(this._s);return{value:e,done:null===e}})),o(o.P,"String",{matchAll:function(e){if(r(this),!i(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in c?String(e.flags):s.call(e),o=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return o.lastIndex=a(e.lastIndex),new l(o,t)}})},function(e,t,n){n(79)("asyncIterator")},function(e,t,n){n(79)("observable")},function(e,t,n){var o=n(0),r=n(136),a=n(17),i=n(18),s=n(95);o(o.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,o=a(e),c=i.f,l=r(o),u={},d=0;l.length>d;)void 0!==(n=c(o,t=l[d++]))&&s(u,t,n);return u}})},function(e,t,n){var o=n(0),r=n(139)(!1);o(o.S,"Object",{values:function(e){return r(e)}})},function(e,t,n){var o=n(0),r=n(139)(!0);o(o.S,"Object",{entries:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(0),r=n(10),a=n(12),i=n(8);n(7)&&o(o.P+n(70),"Object",{__defineGetter__:function(e,t){i.f(r(this),e,{get:a(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(0),r=n(10),a=n(12),i=n(8);n(7)&&o(o.P+n(70),"Object",{__defineSetter__:function(e,t){i.f(r(this),e,{set:a(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(0),r=n(10),a=n(24),i=n(19),s=n(18).f;n(7)&&o(o.P+n(70),"Object",{__lookupGetter__:function(e){var t,n=r(this),o=a(e,!0);do{if(t=s(n,o))return t.get}while(n=i(n))}})},function(e,t,n){"use strict";var o=n(0),r=n(10),a=n(24),i=n(19),s=n(18).f;n(7)&&o(o.P+n(70),"Object",{__lookupSetter__:function(e){var t,n=r(this),o=a(e,!0);do{if(t=s(n,o))return t.set}while(n=i(n))}})},function(e,t,n){var o=n(0);o(o.P+o.R,"Map",{toJSON:n(140)("Map")})},function(e,t,n){var o=n(0);o(o.P+o.R,"Set",{toJSON:n(140)("Set")})},function(e,t,n){n(71)("Map")},function(e,t,n){n(71)("Set")},function(e,t,n){n(71)("WeakMap")},function(e,t,n){n(71)("WeakSet")},function(e,t,n){n(72)("Map")},function(e,t,n){n(72)("Set")},function(e,t,n){n(72)("WeakMap")},function(e,t,n){n(72)("WeakSet")},function(e,t,n){var o=n(0);o(o.G,{global:n(2)})},function(e,t,n){var o=n(0);o(o.S,"System",{global:n(2)})},function(e,t,n){var o=n(0),r=n(22);o(o.S,"Error",{isError:function(e){return"Error"===r(e)}})},function(e,t,n){var o=n(0);o(o.S,"Math",{clamp:function(e,t,n){return Math.min(n,Math.max(t,e))}})},function(e,t,n){var o=n(0);o(o.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,t,n){var o=n(0),r=180/Math.PI;o(o.S,"Math",{degrees:function(e){return e*r}})},function(e,t,n){var o=n(0),r=n(142),a=n(122);o(o.S,"Math",{fscale:function(e,t,n,o,i){return a(r(e,t,n,o,i))}})},function(e,t,n){var o=n(0);o(o.S,"Math",{iaddh:function(e,t,n,o){var r=e>>>0,a=n>>>0;return(t>>>0)+(o>>>0)+((r&a|(r|a)&~(r+a>>>0))>>>31)|0}})},function(e,t,n){var o=n(0);o(o.S,"Math",{isubh:function(e,t,n,o){var r=e>>>0,a=n>>>0;return(t>>>0)-(o>>>0)-((~r&a|~(r^a)&r-a>>>0)>>>31)|0}})},function(e,t,n){var o=n(0);o(o.S,"Math",{imulh:function(e,t){var n=+e,o=+t,r=65535&n,a=65535&o,i=n>>16,s=o>>16,c=(i*a>>>0)+(r*a>>>16);return i*s+(c>>16)+((r*s>>>0)+(65535&c)>>16)}})},function(e,t,n){var o=n(0);o(o.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,t,n){var o=n(0),r=Math.PI/180;o(o.S,"Math",{radians:function(e){return e*r}})},function(e,t,n){var o=n(0);o(o.S,"Math",{scale:n(142)})},function(e,t,n){var o=n(0);o(o.S,"Math",{umulh:function(e,t){var n=+e,o=+t,r=65535&n,a=65535&o,i=n>>>16,s=o>>>16,c=(i*a>>>0)+(r*a>>>16);return i*s+(c>>>16)+((r*s>>>0)+(65535&c)>>>16)}})},function(e,t,n){var o=n(0);o(o.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,t,n){"use strict";var o=n(0),r=n(20),a=n(2),i=n(66),s=n(129);o(o.P+o.R,"Promise",{finally:function(e){var t=i(this,r.Promise||a.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var o=n(0),r=n(102),a=n(128);o(o.S,"Promise",{try:function(e){var t=r.f(this),n=a(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){var o=n(30),r=n(1),a=o.key,i=o.set;o.exp({defineMetadata:function(e,t,n,o){i(e,t,r(n),a(o))}})},function(e,t,n){var o=n(30),r=n(1),a=o.key,i=o.map,s=o.store;o.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:a(arguments[2]),o=i(r(t),n,!1);if(void 0===o||!o.delete(e))return!1;if(o.size)return!0;var c=s.get(t);return c.delete(n),!!c.size||s.delete(t)}})},function(e,t,n){var o=n(30),r=n(1),a=n(19),i=o.has,s=o.get,c=o.key,l=function(e,t,n){if(i(e,t,n))return s(e,t,n);var o=a(t);return null!==o?l(e,o,n):void 0};o.exp({getMetadata:function(e,t){return l(e,r(t),arguments.length<3?void 0:c(arguments[2]))}})},function(e,t,n){var o=n(132),r=n(141),a=n(30),i=n(1),s=n(19),c=a.keys,l=a.key,u=function(e,t){var n=c(e,t),a=s(e);if(null===a)return n;var i=u(a,t);return i.length?n.length?r(new o(n.concat(i))):i:n};a.exp({getMetadataKeys:function(e){return u(i(e),arguments.length<2?void 0:l(arguments[1]))}})},function(e,t,n){var o=n(30),r=n(1),a=o.get,i=o.key;o.exp({getOwnMetadata:function(e,t){return a(e,r(t),arguments.length<3?void 0:i(arguments[2]))}})},function(e,t,n){var o=n(30),r=n(1),a=o.keys,i=o.key;o.exp({getOwnMetadataKeys:function(e){return a(r(e),arguments.length<2?void 0:i(arguments[1]))}})},function(e,t,n){var o=n(30),r=n(1),a=n(19),i=o.has,s=o.key,c=function(e,t,n){if(i(e,t,n))return!0;var o=a(t);return null!==o&&c(e,o,n)};o.exp({hasMetadata:function(e,t){return c(e,r(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var o=n(30),r=n(1),a=o.has,i=o.key;o.exp({hasOwnMetadata:function(e,t){return a(e,r(t),arguments.length<3?void 0:i(arguments[2]))}})},function(e,t,n){var o=n(30),r=n(1),a=n(12),i=o.key,s=o.set;o.exp({metadata:function(e,t){return function(n,o){s(e,t,(void 0!==o?r:a)(n),i(o))}}})},function(e,t,n){var o=n(0),r=n(101)(),a=n(2).process,i="process"==n(22)(a);o(o.G,{asap:function(e){var t=i&&a.domain;r(t?t.bind(e):e)}})},function(e,t,n){"use strict";var o=n(0),r=n(2),a=n(20),i=n(101)(),s=n(5)("observable"),c=n(12),l=n(1),u=n(42),d=n(44),f=n(13),p=n(43),h=p.RETURN,m=function(e){return null==e?void 0:c(e)},v=function(e){var t=e._c;t&&(e._c=void 0,t())},g=function(e){return void 0===e._o},b=function(e){g(e)||(e._o=void 0,v(e))},y=function(e,t){l(e),this._c=void 0,this._o=e,e=new w(this);try{var n=t(e),o=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){o.unsubscribe()}:c(n),this._c=n)}catch(t){return void e.error(t)}g(this)&&v(this)};y.prototype=d({},{unsubscribe:function(){b(this)}});var w=function(e){this._s=e};w.prototype=d({},{next:function(e){var t=this._s;if(!g(t)){var n=t._o;try{var o=m(n.next);if(o)return o.call(n,e)}catch(e){try{b(t)}finally{throw e}}}},error:function(e){var t=this._s;if(g(t))throw e;var n=t._o;t._o=void 0;try{var o=m(n.error);if(!o)throw e;e=o.call(n,e)}catch(e){try{v(t)}finally{throw e}}return v(t),e},complete:function(e){var t=this._s;if(!g(t)){var n=t._o;t._o=void 0;try{var o=m(n.complete);e=o?o.call(n,e):void 0}catch(e){try{v(t)}finally{throw e}}return v(t),e}}});var x=function(e){u(this,x,"Observable","_f")._f=c(e)};d(x.prototype,{subscribe:function(e){return new y(e,this._f)},forEach:function(e){var t=this;return new(a.Promise||r.Promise)((function(n,o){c(e);var r=t.subscribe({next:function(t){try{return e(t)}catch(e){o(e),r.unsubscribe()}},error:o,complete:n})}))}}),d(x,{from:function(e){var t="function"==typeof this?this:x,n=m(l(e)[s]);if(n){var o=l(n.call(e));return o.constructor===t?o:new t((function(e){return o.subscribe(e)}))}return new t((function(t){var n=!1;return i((function(){if(!n){try{if(p(e,!1,(function(e){if(t.next(e),n)return h}))===h)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}})),function(){n=!0}}))},of:function(){for(var e=0,t=arguments.length,n=new Array(t);e<t;)n[e]=arguments[e++];return new("function"==typeof this?this:x)((function(e){var t=!1;return i((function(){if(!t){for(var o=0;o<n.length;++o)if(e.next(n[o]),t)return;e.complete()}})),function(){t=!0}}))}}),f(x.prototype,s,(function(){return this})),o(o.G,{Observable:x}),n(41)("Observable")},function(e,t,n){var o=n(2),r=n(0),a=n(67),i=[].slice,s=/MSIE .\./.test(a),c=function(e){return function(t,n){var o=arguments.length>2,r=!!o&&i.call(arguments,2);return e(o?function(){("function"==typeof t?t:Function(t)).apply(this,r)}:t,n)}};r(r.G+r.B+r.F*s,{setTimeout:c(o.setTimeout),setInterval:c(o.setInterval)})},function(e,t,n){var o=n(0),r=n(100);o(o.G+o.B,{setImmediate:r.set,clearImmediate:r.clear})},function(e,t,n){for(var o=n(99),r=n(37),a=n(14),i=n(2),s=n(13),c=n(47),l=n(5),u=l("iterator"),d=l("toStringTag"),f=c.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=r(p),m=0;m<h.length;m++){var v,g=h[m],b=p[g],y=i[g],w=y&&y.prototype;if(w&&(w[u]||s(w,u,f),w[d]||s(w,d,g),c[g]=f,b))for(v in o)w[v]||a(w,v,o[v],!0)}},function(e,t,n){(function(t){!function(t){"use strict";var n,o=Object.prototype,r=o.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",l="object"==typeof e,u=t.regeneratorRuntime;if(u)l&&(e.exports=u);else{(u=t.regeneratorRuntime=l?e.exports:{}).wrap=w;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",m={},v={};v[i]=function(){return this};var g=Object.getPrototypeOf,b=g&&g(g(R([])));b&&b!==o&&r.call(b,i)&&(v=b);var y=T.prototype=_.prototype=Object.create(v);S.prototype=y.constructor=T,T.constructor=S,T[c]=S.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c in e||(e[c]="GeneratorFunction")),e.prototype=Object.create(y),e},u.awrap=function(e){return{__await:e}},C(E.prototype),E.prototype[s]=function(){return this},u.AsyncIterator=E,u.async=function(e,t,n,o){var r=new E(w(e,t,n,o));return u.isGeneratorFunction(t)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},C(y),y[c]="Generator",y[i]=function(){return this},y.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},u.values=R,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(M),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(o,r){return s.type="throw",s.arg=e,t.next=o,r&&(t.method="next",t.arg=n),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;M(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,o){return this.delegate={iterator:R(e),resultName:t,nextLoc:o},"next"===this.method&&(this.arg=n),m}}}function w(e,t,n,o){var r=t&&t.prototype instanceof _?t:_,a=Object.create(r.prototype),i=new O(o||[]);return a._invoke=function(e,t,n){var o=d;return function(r,a){if(o===p)throw new Error("Generator is already running");if(o===h){if("throw"===r)throw a;return P()}for(n.method=r,n.arg=a;;){var i=n.delegate;if(i){var s=A(i,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var c=x(e,t,n);if("normal"===c.type){if(o=n.done?h:f,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=h,n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function x(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function _(){}function S(){}function T(){}function C(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function E(e){function n(t,o,a,i){var s=x(e[t],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){n("next",e,a,i)}),(function(e){n("throw",e,a,i)})):Promise.resolve(l).then((function(e){c.value=e,a(c)}),i)}i(s.arg)}var o;"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n)),this._invoke=function(e,t){function r(){return new Promise((function(o,r){n(e,t,o,r)}))}return o=o?o.then(r,r):r()}}function A(e,t){var o=e.iterator[t.method];if(o===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,A(e,t),"throw"===t.method))return m;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var r=x(o,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,m;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,m):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function R(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(r.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=n,t.done=!0,t};return a.next=a}}return{next:P}}function P(){return{value:n,done:!0}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,n(31))},function(e,t,n){n(362),e.exports=n(20).RegExp.escape},function(e,t,n){var o=n(0),r=n(363)(/[\\^$*+?.()|[\]{}]/g,"$&");o(o.S,"RegExp",{escape:function(e){return r(e)}})},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t){!function(){if("undefined"!=typeof window)try{var e=new window.CustomEvent("test",{cancelable:!0});if(e.preventDefault(),!0!==e.defaultPrevented)throw new Error("Could not prevent default")}catch(e){var t=function(e,t){var n,o;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),o=n.preventDefault,n.preventDefault=function(){o.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};t.prototype=window.Event.prototype,window.CustomEvent=t}}()},function(e,t,n){(function(e){!function(e){var t,n,o=function(){try{return!!Symbol.iterator}catch(e){return!1}}(),r=function(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t},a=function(e){return encodeURIComponent(e).replace(/%20/g,"+")},i=function(e){return decodeURIComponent(e).replace(/\+/g," ")};"URLSearchParams"in e&&"a=1"===new URLSearchParams("?a=1").toString()||(t=function(e){if(Object.defineProperty(this,"_entries",{value:{}}),"string"==typeof e){if(""!==e)for(var n,o=(e=e.replace(/^\?/,"")).split("&"),r=0;r<o.length;r++)n=o[r].split("="),this.append(i(n[0]),n.length>1?i(n[1]):"")}else if(e instanceof t){var a=this;e.forEach((function(e,t){a.append(e,t)}))}},(n=t.prototype).append=function(e,t){e in this._entries?this._entries[e].push(t.toString()):this._entries[e]=[t.toString()]},n.delete=function(e){delete this._entries[e]},n.get=function(e){return e in this._entries?this._entries[e][0]:null},n.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]},n.has=function(e){return e in this._entries},n.set=function(e,t){this._entries[e]=[t.toString()]},n.forEach=function(e,t){var n;for(var o in this._entries)if(this._entries.hasOwnProperty(o)){n=this._entries[o];for(var r=0;r<n.length;r++)e.call(t,n[r],o,this)}},n.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),r(e)},n.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),r(e)},n.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),r(e)},o&&(n[Symbol.iterator]=n.entries),n.toString=function(){var e=[];return this.forEach((function(t,n){e.push(a(n)+"="+a(t))})),e.join("&")},e.URLSearchParams=t)}(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(e){if(function(){try{var e=new URL("b","http://a");return e.pathname="c%20d","http://a/c%20d"===e.href&&e.searchParams}catch(e){return!1}}()||function(){var t=e.URL,n=function(t,n){"string"!=typeof t&&(t=String(t));var o,r=document;if(n&&(void 0===e.location||n!==e.location.href)){(o=(r=document.implementation.createHTMLDocument("")).createElement("base")).href=n,r.head.appendChild(o);try{if(0!==o.href.indexOf(n))throw new Error(o.href)}catch(e){throw new Error("URL unable to set base "+n+" due to "+e)}}var a=r.createElement("a");if(a.href=t,o&&(r.body.appendChild(a),a.href=a.href),":"===a.protocol||!/:/.test(a.href))throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:a})},o=n.prototype;["hash","host","hostname","port","protocol","search"].forEach((function(e){var t;t=e,Object.defineProperty(o,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:!0})})),Object.defineProperties(o,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:!0},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],t=this._anchorElement.port!=e&&""!==this._anchorElement.port;return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(e){},enumerable:!0},username:{get:function(){return""},set:function(e){},enumerable:!0},searchParams:{get:function(){var e=new URLSearchParams(this.search),t=this;return["append","delete","set"].forEach((function(n){var o=e[n];e[n]=function(){o.apply(e,arguments),t.search=e.toString()}})),e},enumerable:!0}}),n.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)},n.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)},e.URL=n}(),void 0!==e.location&&!("origin"in e.location)){var t=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:t,enumerable:!0})}catch(n){setInterval((function(){e.location.origin=t()}),100)}}}(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this)}).call(this,n(31))},function(e,t,n){(t=e.exports=n(367)(!1)).push([e.i,"@keyframes ejs--c2532bfe04554193cc42b3be753700{0%{opacity:0.5;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes ejs--7cadf43f3d9eb17c7e3c36de84973b{from{opacity:0}to{opacity:1}}@keyframes ejs--9bd947b3e6427453595f083d740a7c{from{}to{box-shadow:1px 3px 15px 8px #222,0px 7px 10px 0px #111,inset 0px 0px 1px 0px rgba(250,250,250,0.2),inset 8px 5px 35px 0px rgba(0,0,0,0.5)}}:root{--ejs-primary-color: 26, 175, 255}.ejs--de6433374cb30211f10e148b320b2f{height:100%}.ejs--7a5f920ceffb2913f6dbda780573cf{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:100%;width:100%;direction:ltr;font-family:Avenir,\"Avenir Next\",\"Helvetica Neue\",\"Segoe UI\",Helvetica,Arial,sans-serif;font-size:14px;font-variant-numeric:tabular-nums;font-weight:500;line-height:1.7;max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow 0.3s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ejs--7a5f920ceffb2913f6dbda780573cf a{color:#ddd;text-decoration:none}.ejs--7a5f920ceffb2913f6dbda780573cf button{font:inherit;line-height:inherit;width:auto}.ejs--7a5f920ceffb2913f6dbda780573cf ul{list-style:none;margin:0;padding:0}.ejs--7a5f920ceffb2913f6dbda780573cf:focus{outline:0}.ejs--7a5f920ceffb2913f6dbda780573cf *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ejs--f3a002bba9836fe4ebfed357a45521{box-sizing:border-box}.ejs--f3a002bba9836fe4ebfed357a45521 *,.ejs--f3a002bba9836fe4ebfed357a45521 *::after,.ejs--f3a002bba9836fe4ebfed357a45521 *::before{box-sizing:inherit}.ejs--f3a002bba9836fe4ebfed357a45521 a,.ejs--f3a002bba9836fe4ebfed357a45521 button,.ejs--f3a002bba9836fe4ebfed357a45521 input,.ejs--f3a002bba9836fe4ebfed357a45521 label{touch-action:manipulation}.ejs--008adea3c1ef33a8fc94892a1e97e6 li{display:inline-block;background:#fff;border:1px solid #ccc;font-size:12px}.ejs--008adea3c1ef33a8fc94892a1e97e6 li a{color:#000}.ejs--85a95eb6bf74a40ab61b91a91e5bff{position:absolute;width:100%;height:100%;top:0;z-index:9999;background:rgba(0,0,0,0.3) !important;color:#fff;text-align:center}.ejs--d169a219343bc32dd4aecc3f6b7f25{position:absolute;width:300px;top:50%;margin-left:-150px;margin-top:-50px;left:50%;background:rgba(0,0,0,0.8) !important;padding:15px 0}.ejs--782e3572812f983b3a150eec177391{text-align:center;font-size:13px}.ejs--c426dd1d179aa351e6cec47e1d9438,.ejs--31e7e81db48819ee35ec6f50378a2e,.ejs--20d4eb2646d396f558a645dc0574f1,.ejs--4de05306c8b099bdeb4585571ac095{font-size:12px}.ejs--c7957d8666bb6b8fc7c3e9c021aaf8{background:rgba(16,16,16,0.9);border-radius:3px;font-size:13px;min-width:180px;padding:8px}.ejs--c7957d8666bb6b8fc7c3e9c021aaf8 li{padding:4px 11px;text-align:center}.ejs--c7957d8666bb6b8fc7c3e9c021aaf8 li a{color:#999;display:block;font-size:13px}.ejs--c7957d8666bb6b8fc7c3e9c021aaf8 li:hover{background:rgba(var(--ejs-primary-color), 1);border-radius:4px;box-shadow:0 0 0 5px rgba(var(--ejs-primary-color), 0.5);outline:0}.ejs--c7957d8666bb6b8fc7c3e9c021aaf8 li:hover a{color:#fff}.ejs--c7957d8666bb6b8fc7c3e9c021aaf8 li:last-child{border:0}.ejs--cbcfe0a1421cadac9a04c81d6431d6{display:block !important;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.ejs--cbcfe0a1421cadac9a04c81d6431d6 .ejs--f3a1903d935f6cf720d4a0498db62a:after{content:\"\";position:absolute;border-left:20px solid transparent;border-right:20px solid #a7a7a77d;border-top:20px solid #a7a7a77d;border-bottom:20px solid transparent;right:0}.ejs--cbcfe0a1421cadac9a04c81d6431d6 .ejs--f3a1903d935f6cf720d4a0498db62a a{right:4px;top:4px;position:absolute;border:none;padding:0;width:15px;height:15px;z-index:99}.ejs--cbcfe0a1421cadac9a04c81d6431d6 .ejs--f3a1903d935f6cf720d4a0498db62a a:before{content:\"\";border-bottom:1px solid #fff;transform:rotate(45deg) translateY(-45%);width:15px;height:15px;display:block;position:absolute;top:0;right:0}.ejs--cbcfe0a1421cadac9a04c81d6431d6 .ejs--f3a1903d935f6cf720d4a0498db62a a:after{content:\"\";border-bottom:1px solid #fff;width:15px;height:15px;display:block;position:absolute;right:0;background:transparent;top:0;transform:rotate(-45deg) translateY(-50%) translateX(0%)}a.ejs--73f9b4e94a7a1fe74e11107d5ab2ef{display:flex;justify-content:center;text-shadow:0px 1px 1px rgba(0,0,0,0.5);font-size:20px;line-height:45px;text-transform:uppercase;font-weight:bolder;position:relative;text-decoration:none;width:200px;height:45px;border:0;color:#fff !important;border-radius:35px;text-align:center;background-color:rgba(var(--ejs-primary-color), 1)}a.ejs--73f9b4e94a7a1fe74e11107d5ab2ef:active{box-shadow:0px 0px 0px 0px #222,0px 3px 7px 0px #111,inset 0px 1px 1px 0px rgba(250,250,250,0.2),inset 0px -10px 35px 5px rgba(0,0,0,0.5);top:1px}a.ejs--73f9b4e94a7a1fe74e11107d5ab2ef:hover{animation:ejs--9bd947b3e6427453595f083d740a7c 1.2s linear infinite alternate}.ejs--8732295ca5c4902a060d34706a8146{background:transparent;border:0;border-radius:3px;color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:7px;position:relative;transition:all 0.3s ease}.ejs--8732295ca5c4902a060d34706a8146 svg{display:block;fill:currentColor;height:18px;pointer-events:none;width:18px}.ejs--8732295ca5c4902a060d34706a8146:focus{outline:0}.ejs--8732295ca5c4902a060d34706a8146.ejs--a83b6c705e103e81a7762d0ed5e64b{box-shadow:0 0 0 5px rgba(var(--ejs-primary-color), 0.5);outline:0}.ejs--8732295ca5c4902a060d34706a8146:not(.ejs--b1238136ec472a92297159882cf4b8) .ejs--ec731619062226d943da67f5d83009,.ejs--8732295ca5c4902a060d34706a8146.ejs--b1238136ec472a92297159882cf4b8 .ejs--dc7068585e3d84fe0e676864c1439e,.ejs--8732295ca5c4902a060d34706a8146:not(.ejs--b1238136ec472a92297159882cf4b8) .ejs--0c6561f9155750b0aeeed6da5da7bf,.ejs--8732295ca5c4902a060d34706a8146.ejs--b1238136ec472a92297159882cf4b8 .ejs--13d64e30c1333cc99391af48ddabaa{display:none}.ejs--d5f430a99a1619b3434bf58e34a99c .ejs--8732295ca5c4902a060d34706a8146 svg{filter:drop-shadow(0 1px 1px rgba(0,0,0,0.15))}.ejs--d5f430a99a1619b3434bf58e34a99c .ejs--8732295ca5c4902a060d34706a8146.ejs--a83b6c705e103e81a7762d0ed5e64b,.ejs--d5f430a99a1619b3434bf58e34a99c .ejs--8732295ca5c4902a060d34706a8146:hover,.ejs--d5f430a99a1619b3434bf58e34a99c .ejs--8732295ca5c4902a060d34706a8146[aria-expanded='true']{background:rgba(var(--ejs-primary-color), 1);color:#fff}.ejs--d5f430a99a1619b3434bf58e34a99c .ejs--8732295ca5c4902a060d34706a8146[disabled],.ejs--d5f430a99a1619b3434bf58e34a99c .ejs--8732295ca5c4902a060d34706a8146[disabled]:hover{background:transparent;color:#4b4b4b}.ejs--f3a002bba9836fe4ebfed357a45521 ::-webkit-media-controls{display:none}.ejs--1acedc5ed6816abe96dd27d910fd74{align-items:center;display:flex;justify-content:flex-start;text-align:center}.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146,.ejs--1acedc5ed6816abe96dd27d910fd74 .ejs--f1aa376719b564cae0e653157cde14,.ejs--1acedc5ed6816abe96dd27d910fd74 .ejs--90d2780f99bcc76fdb6b0378a7238e,.ejs--1acedc5ed6816abe96dd27d910fd74 .ejs--c7bfb2d1b75a40fdaaf90624bea9e7,.ejs--1acedc5ed6816abe96dd27d910fd74 .ejs--36ceeeec0df37a9cf4bbe05fa204ec{margin-left:5px}.ejs--1acedc5ed6816abe96dd27d910fd74 .ejs--c7bfb2d1b75a40fdaaf90624bea9e7+.ejs--8732295ca5c4902a060d34706a8146,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146+.ejs--c7bfb2d1b75a40fdaaf90624bea9e7,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146+.ejs--8732295ca5c4902a060d34706a8146,.ejs--1acedc5ed6816abe96dd27d910fd74 .ejs--f1aa376719b564cae0e653157cde14+.ejs--8732295ca5c4902a060d34706a8146{margin-left:2px}.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child+[data-btn='pause']{margin-left:0}.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child+[data-btn='netplay']{margin-right:auto}.ejs--1acedc5ed6816abe96dd27d910fd74:empty{display:none}@media (min-width: 480px){.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146,.ejs--1acedc5ed6816abe96dd27d910fd74 .ejs--c7bfb2d1b75a40fdaaf90624bea9e7,.ejs--1acedc5ed6816abe96dd27d910fd74 .ejs--f1aa376719b564cae0e653157cde14,.ejs--1acedc5ed6816abe96dd27d910fd74 .ejs--90d2780f99bcc76fdb6b0378a7238e,.ejs--1acedc5ed6816abe96dd27d910fd74 .ejs--36ceeeec0df37a9cf4bbe05fa204ec{margin-left:10px}}.ejs--d5f430a99a1619b3434bf58e34a99c .ejs--1acedc5ed6816abe96dd27d910fd74{background:linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.7));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:#fff;left:0;padding:20px 5px 5px;position:absolute;right:0;transition:opacity 0.4s ease-in-out, transform 0.4s ease-in-out;z-index:3}@media (min-width: 480px){.ejs--d5f430a99a1619b3434bf58e34a99c .ejs--1acedc5ed6816abe96dd27d910fd74{padding:15px 10px 10px}}.ejs--d5f430a99a1619b3434bf58e34a99c.ejs--1b8cb7f2294b1eb5de5238daea3513 .ejs--1acedc5ed6816abe96dd27d910fd74{opacity:0;pointer-events:none;transform:translateY(100%)}.ejs--7a5f920ceffb2913f6dbda780573cf [data-btn='fullscreen']{display:none}.ejs--19409fe2057ab935a7e46abb5b4f49 [data-btn='fullscreen']{display:inline-block}.ejs--c7bfb2d1b75a40fdaaf90624bea9e7{display:flex;position:relative}.ejs--c7bfb2d1b75a40fdaaf90624bea9e7 .ejs--8732295ca5c4902a060d34706a8146 svg{transition:transform 0.3s ease}.ejs--c7bfb2d1b75a40fdaaf90624bea9e7 .ejs--8732295ca5c4902a060d34706a8146[aria-expanded='true'] svg{transform:rotate(90deg)}.ejs--c7bfb2d1b75a40fdaaf90624bea9e7 .ejs--8732295ca5c4902a060d34706a8146[aria-expanded='true'] .ejs--74c6d4176d27e37a19d2e9e61de8f4{display:none}.ejs--013213afedeeb6878089b1ca1b4e47{animation:ejs--c2532bfe04554193cc42b3be753700 0.2s ease;background:rgba(16,16,16,0.9);border-radius:4px;bottom:100%;box-shadow:0 1px 2px rgba(0,0,0,0.15);color:#4f5b5f;font-size:16px;margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.ejs--013213afedeeb6878089b1ca1b4e47>div{overflow:hidden;transition:height 0.35s cubic-bezier(0.4, 0, 0.2, 1),width 0.35s cubic-bezier(0.4, 0, 0.2, 1)}.ejs--013213afedeeb6878089b1ca1b4e47::after{border:4px solid transparent;border-top-color:rgba(16,16,16,0.9);content:'';height:0;position:absolute;right:15px;top:100%;width:0}.ejs--013213afedeeb6878089b1ca1b4e47 [role='menu']{padding:7px}.ejs--013213afedeeb6878089b1ca1b4e47 [role='menuitem'],.ejs--013213afedeeb6878089b1ca1b4e47 [role='menuitemradio']{margin-top:2px}.ejs--013213afedeeb6878089b1ca1b4e47 [role='menuitem']:first-child,.ejs--013213afedeeb6878089b1ca1b4e47 [role='menuitemradio']:first-child{margin-top:0}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146{align-items:center;color:#999;display:flex;font-size:13px;padding:4px 11px;user-select:none;width:100%}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146>span{align-items:inherit;display:flex;width:100%}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146::after{border:4px solid transparent;content:'';position:absolute;top:50%;transform:translateY(-50%)}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--0b4cdb4057d1a4623e60836ccc6275{padding-right:28px}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--0b4cdb4057d1a4623e60836ccc6275::after{border-left-color:rgba(79,91,95,0.8);right:5px}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--0b4cdb4057d1a4623e60836ccc6275.ejs--a83b6c705e103e81a7762d0ed5e64b::after,.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--0b4cdb4057d1a4623e60836ccc6275:hover::after{border-left-color:currentColor}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--a7ad9de0cb0ca672b6703c50de7db9{font-weight:500;margin:7px;margin-bottom:3px;padding-left:28px;position:relative;width:calc(100% - 14px)}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--a7ad9de0cb0ca672b6703c50de7db9::after{border-right-color:rgba(79,91,95,0.8);left:7px}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--a7ad9de0cb0ca672b6703c50de7db9::before{background:#b7c5cd;box-shadow:0 1px 0 #fff;content:'';height:1px;left:0;margin-top:4px;overflow:hidden;position:absolute;right:0;top:100%}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--a7ad9de0cb0ca672b6703c50de7db9.ejs--a83b6c705e103e81a7762d0ed5e64b::after,.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--a7ad9de0cb0ca672b6703c50de7db9:hover::after{border-right-color:currentColor}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio']{padding-left:7px}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio']::before,.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio']::after{border-radius:100%}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio']::before{background:rgba(204,204,204,0.1);content:'';display:block;flex-shrink:0;height:16px;margin-right:10px;transition:all 0.3s ease;width:16px}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio']::after{background:#fff;border:0;height:6px;left:12px;opacity:0;top:50%;transform:translateY(-50%) scale(0);transition:transform 0.3s ease, opacity 0.3s ease;width:6px}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio'][aria-checked='true']::before{background:rgba(var(--ejs-primary-color), 1)}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio'][aria-checked='true']::after{opacity:1;transform:translateY(-50%) scale(1)}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio'].ejs--a83b6c705e103e81a7762d0ed5e64b::before,.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--8732295ca5c4902a060d34706a8146[role='menuitemradio']:hover::before{background:rgba(0,0,0,0.1)}.ejs--013213afedeeb6878089b1ca1b4e47 .ejs--f91e90fe7cabc875aff9a431bf5389{align-items:center;display:flex;margin-left:auto;margin-right:-5px;overflow:hidden;padding-left:25px;pointer-events:none}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']{-webkit-appearance:none;background:transparent;border:0;border-radius:28px;color:rgba(var(--ejs-primary-color), 1);display:block;height:20px;margin:0;padding:0;transition:box-shadow 0.3s ease;width:100%}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-webkit-slider-runnable-track{background:transparent;border:0;border-radius:3px;height:6px;transition:box-shadow 0.3s ease;user-select:none;background-image:linear-gradient(to right, currentColor var(--value, 0%), transparent var(--value, 0%))}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-webkit-slider-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,0.15),0 0 0 1px rgba(47,52,61,0.2);height:14px;position:relative;transition:all 0.2s ease;width:14px;-webkit-appearance:none;margin-top:-4px}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-moz-range-track{background:transparent;border:0;border-radius:3px;height:6px;transition:box-shadow 0.3s ease;user-select:none}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-moz-range-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,0.15),0 0 0 1px rgba(47,52,61,0.2);height:14px;position:relative;transition:all 0.2s ease;width:14px}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-moz-range-progress{background:currentColor;border-radius:3px;height:6px}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-ms-track{background:transparent;border:0;border-radius:3px;height:6px;transition:box-shadow 0.3s ease;user-select:none;color:transparent}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-ms-fill-upper{background:transparent;border:0;border-radius:3px;height:6px;transition:box-shadow 0.3s ease;user-select:none}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-ms-fill-lower{background:transparent;border:0;border-radius:3px;height:6px;transition:box-shadow 0.3s ease;user-select:none;background:currentColor}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-ms-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,0.15),0 0 0 1px rgba(47,52,61,0.2);height:14px;position:relative;transition:all 0.2s ease;width:14px;margin-top:0}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-ms-tooltip{display:none}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']:focus{outline:0}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range']::-moz-focus-outer{border:0}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range'].ejs--a83b6c705e103e81a7762d0ed5e64b::-webkit-slider-runnable-track{box-shadow:0 0 0 5px rgba(var(--ejs-primary-color), 0.5);outline:0}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range'].ejs--a83b6c705e103e81a7762d0ed5e64b::-moz-range-track{box-shadow:0 0 0 5px rgba(var(--ejs-primary-color), 0.5);outline:0}.ejs--f3a002bba9836fe4ebfed357a45521 input[type='range'].ejs--a83b6c705e103e81a7762d0ed5e64b::-ms-track{box-shadow:0 0 0 5px rgba(var(--ejs-primary-color), 0.5);outline:0}.ejs--f3a002bba9836fe4ebfed357a45521.ejs--d5f430a99a1619b3434bf58e34a99c input[type='range']::-webkit-slider-runnable-track{background-color:rgba(255,255,255,0.25)}.ejs--f3a002bba9836fe4ebfed357a45521.ejs--d5f430a99a1619b3434bf58e34a99c input[type='range']::-moz-range-track{background-color:rgba(255,255,255,0.25)}.ejs--f3a002bba9836fe4ebfed357a45521.ejs--d5f430a99a1619b3434bf58e34a99c input[type='range']::-ms-track{background-color:rgba(255,255,255,0.25)}.ejs--f3a002bba9836fe4ebfed357a45521.ejs--d5f430a99a1619b3434bf58e34a99c input[type='range']:active::-webkit-slider-thumb{box-shadow:0 1px 1px rgba(0,0,0,0.15),0 0 0 1px rgba(47,52,61,0.2),0 0 0 3px rgba(255,255,255,0.5)}.ejs--f3a002bba9836fe4ebfed357a45521.ejs--d5f430a99a1619b3434bf58e34a99c input[type='range']:active::-moz-range-thumb{box-shadow:0 1px 1px rgba(0,0,0,0.15),0 0 0 1px rgba(47,52,61,0.2),0 0 0 3px rgba(255,255,255,0.5)}.ejs--f3a002bba9836fe4ebfed357a45521.ejs--d5f430a99a1619b3434bf58e34a99c input[type='range']:active::-ms-thumb{box-shadow:0 1px 1px rgba(0,0,0,0.15),0 0 0 1px rgba(47,52,61,0.2),0 0 0 3px rgba(255,255,255,0.5)}.ejs--90d2780f99bcc76fdb6b0378a7238e{font-size:14px}.ejs--90d2780f99bcc76fdb6b0378a7238e+.ejs--90d2780f99bcc76fdb6b0378a7238e::before{content:'4';margin-right:10px}@media (max-width: 767px){.ejs--90d2780f99bcc76fdb6b0378a7238e+.ejs--90d2780f99bcc76fdb6b0378a7238e{display:none}}.ejs--d5f430a99a1619b3434bf58e34a99c .ejs--90d2780f99bcc76fdb6b0378a7238e{text-shadow:0 1px 1px rgba(0,0,0,0.15)}.ejs--74c6d4176d27e37a19d2e9e61de8f4{background:rgba(255,255,255,0.9);border-radius:3px;bottom:100%;box-shadow:0 1px 2px rgba(0,0,0,0.15);color:#4f5b5f;font-size:14px;font-weight:500;left:50%;line-height:1.3;margin-bottom:10px;opacity:0;padding:5px 7.5px;pointer-events:none;position:absolute;transform:translate(-50%, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;white-space:nowrap;z-index:2}.ejs--74c6d4176d27e37a19d2e9e61de8f4::before{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.9);bottom:-4px;content:'';height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.ejs--7a5f920ceffb2913f6dbda780573cf .ejs--8732295ca5c4902a060d34706a8146:hover .ejs--74c6d4176d27e37a19d2e9e61de8f4,.ejs--7a5f920ceffb2913f6dbda780573cf .ejs--8732295ca5c4902a060d34706a8146.ejs--a83b6c705e103e81a7762d0ed5e64b .ejs--74c6d4176d27e37a19d2e9e61de8f4,.ejs--6ea27aa07e60d1d6e4c9782740028a{opacity:1;transform:translate(-50%, 0) scale(1)}.ejs--7a5f920ceffb2913f6dbda780573cf .ejs--8732295ca5c4902a060d34706a8146:hover .ejs--74c6d4176d27e37a19d2e9e61de8f4{z-index:3}.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child .ejs--74c6d4176d27e37a19d2e9e61de8f4,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child+.ejs--8732295ca5c4902a060d34706a8146 .ejs--74c6d4176d27e37a19d2e9e61de8f4{left:0;transform:translate(0, 10px) scale(0.8);transform-origin:0 100%}.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child .ejs--74c6d4176d27e37a19d2e9e61de8f4::before,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child+.ejs--8732295ca5c4902a060d34706a8146 .ejs--74c6d4176d27e37a19d2e9e61de8f4::before{left:16px}.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:last-child .ejs--74c6d4176d27e37a19d2e9e61de8f4{left:auto;right:0;transform:translate(0, 10px) scale(0.8);transform-origin:100% 100%}.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:last-child .ejs--74c6d4176d27e37a19d2e9e61de8f4::before{left:auto;right:16px;transform:translateX(50%)}.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child:hover .ejs--74c6d4176d27e37a19d2e9e61de8f4,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child.ejs--a83b6c705e103e81a7762d0ed5e64b .ejs--74c6d4176d27e37a19d2e9e61de8f4,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child .ejs--6ea27aa07e60d1d6e4c9782740028a,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child+.ejs--8732295ca5c4902a060d34706a8146:hover .ejs--74c6d4176d27e37a19d2e9e61de8f4,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child+.ejs--8732295ca5c4902a060d34706a8146.ejs--a83b6c705e103e81a7762d0ed5e64b .ejs--74c6d4176d27e37a19d2e9e61de8f4,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:first-child+.ejs--8732295ca5c4902a060d34706a8146 .ejs--6ea27aa07e60d1d6e4c9782740028a,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:last-child:hover .ejs--74c6d4176d27e37a19d2e9e61de8f4,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:last-child.ejs--a83b6c705e103e81a7762d0ed5e64b .ejs--74c6d4176d27e37a19d2e9e61de8f4,.ejs--1acedc5ed6816abe96dd27d910fd74>.ejs--8732295ca5c4902a060d34706a8146:last-child .ejs--6ea27aa07e60d1d6e4c9782740028a{transform:translate(0, 0) scale(1)}.ejs--d5f430a99a1619b3434bf58e34a99c{background:#000;color:#bcbcbc;overflow:hidden}.ejs--d5f430a99a1619b3434bf58e34a99c.ejs--da54136ccf8c6b0b16d98e8b8e8b88{overflow:visible}.ejs--057800d021995e1347ec07cb748672{background:#333;border-radius:inherit;height:100%;overflow:hidden;position:relative;text-align:center;z-index:0}.ejs--057800d021995e1347ec07cb748672>*{height:100% !important}.ejs--057800d021995e1347ec07cb748672 canvas{height:100% !important;width:auto !important;max-width:100% !important}.ejs--64f1256f556fb94454b930cb3ea7f2 .ejs--057800d021995e1347ec07cb748672 canvas{height:auto !important;width:100% !important}.ejs--7da7949f602347007818e6d192eb23 .ejs--057800d021995e1347ec07cb748672{background-color:transparent}.ejs--f1aa376719b564cae0e653157cde14{flex:1;left:7px;margin-right:14px;position:relative}.ejs--f1aa376719b564cae0e653157cde14 input[type='range'],.ejs--f8d706413436fd119cf01aaf5a9d9d{margin-left:-7px;margin-right:-7px;width:calc(100% + 14px)}.ejs--f1aa376719b564cae0e653157cde14 input[type='range']{position:relative;z-index:2}.ejs--f1aa376719b564cae0e653157cde14 .ejs--74c6d4176d27e37a19d2e9e61de8f4{font-size:14px;left:0}.ejs--f8d706413436fd119cf01aaf5a9d9d{-webkit-appearance:none;background:transparent;border:0;border-radius:100px;height:6px;left:0;margin-top:-3px;padding:0;position:absolute;top:50%}.ejs--f8d706413436fd119cf01aaf5a9d9d::-webkit-progress-bar{background:transparent;transition:width 0.2s ease}.ejs--f8d706413436fd119cf01aaf5a9d9d::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:6px}.ejs--f8d706413436fd119cf01aaf5a9d9d::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:6px;transition:width 0.2s ease}.ejs--f8d706413436fd119cf01aaf5a9d9d::-ms-fill{border-radius:100px;transition:width 0.2s ease}.ejs--d5f430a99a1619b3434bf58e34a99c .ejs--f8d706413436fd119cf01aaf5a9d9d{box-shadow:0 1px 1px rgba(0,0,0,0.15);color:rgba(255,255,255,0.25)}.ejs--bd0222e58d71b0a304d6037dfcffd5 .ejs--f8d706413436fd119cf01aaf5a9d9d{color:rgba(183,197,205,0.66)}.ejs--d5f430a99a1619b3434bf58e34a99c.ejs--2521e1257996f264de36e77cc9c5ee .ejs--f8d706413436fd119cf01aaf5a9d9d{background-color:rgba(255,255,255,0.25)}.ejs--bd0222e58d71b0a304d6037dfcffd5.ejs--2521e1257996f264de36e77cc9c5ee .ejs--f8d706413436fd119cf01aaf5a9d9d{background-color:rgba(183,197,205,0.66)}.ejs--36ceeeec0df37a9cf4bbe05fa204ec{max-width:120px;align-items:center;display:flex;flex:1;position:relative}.ejs--36ceeeec0df37a9cf4bbe05fa204ec input[type='range']{margin-left:5px;position:relative;z-index:2}@media (min-width: 480px){.ejs--36ceeeec0df37a9cf4bbe05fa204ec{max-width:90px}}@media (min-width: 768px){.ejs--36ceeeec0df37a9cf4bbe05fa204ec{max-width:110px}}.ejs--d31688f864f56d6426ebbf2217d6ee{height:100%;overflow:hidden;position:absolute;top:0;width:100%}.ejs--5e71fd80268afbb1d588e40b993508{background:rgba(0,0,0,0.8);height:100%;overflow:auto;position:relative;text-align:center;z-index:9999}.ejs--5e71fd80268afbb1d588e40b993508 h4{color:#ccc;font-size:24px;margin:0;padding:10px}.ejs--1e0f0672f67d0e96592314c9ed78b0{display:block}.ejs--d7e6a6a8f38bfaa256fe5d709a8258{background:transparent;display:block;position:absolute;top:0;width:100%;z-index:10001}.ejs--b183f581b5336c4908ad258d3e1cc7{display:block}.ejs--b183f581b5336cashrqd258d3e1cc7{display:block}.ejs--158ea9dd34e3e7af2d837f8b05babb{display:block}.ejs--3f0897a8158ba363a0ee0afe4da7c5{display:block}.ejs--38cc09882a55e98c76168dbe838aa0{height:100%;margin:0 auto;max-width:800px;overflow:hidden;position:relative;width:100%}.ejs--3f0897a8158ba363a0ee0afe4da7c5 input[type='text']{background-color:#fff;border:1px solid #000;font-size:12px;font-weight:700}.ejs--f3a002bba9836fe4ebfed357a45521 ::-webkit-scrollbar{width:8px;height:16px;background-color:transparent}.ejs--f3a002bba9836fe4ebfed357a45521 ::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);border-radius:10px;background-color:transparent}.ejs--f3a002bba9836fe4ebfed357a45521 ::-webkit-scrollbar-thumb{border-radius:0;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);background-color:#f5f5f5}.ejs--f3a002bba9836fe4ebfed357a45521{scrollbar-face-color:#F5F5F5;scrollbar-highlight-color:transparent;scrollbar-3dlight-color:transparent;scrollbar-darkshadow-color:transparent;scrollbar-Shadow-color:transparent;scrollbar-arrow-color:#fff;scrollbar-track-color:transparent;scrollbar-width:thin;scrollbar-color:transparent #f5f5f5}.ejs--5e71fd80268afbb1d588e40b993508 *{color:#bcbcbc !important;border:unset}.ejs--5e71fd80268afbb1d588e40b993508 a:focus{background:inherit}.ejs--5e71fd80268afbb1d588e40b993508 input,.ejs--5e71fd80268afbb1d588e40b993508 textarea{color:#000 !important}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--b373c9d5029d49324fb8ac3ece96c1{float:none}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--a5e2629abb9a5bcbc8b2c1307922d2{height:calc(100% - 130px);overflow:auto}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--a5e2629abb9a5bcbc8b2c1307922d2 a{border:none}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--580e3c22e63f8a1eb29694fd0b141b{margin-top:10px}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--580e3c22e63f8a1eb29694fd0b141b a{border-radius:.25rem;font-size:.875rem;padding-left:1rem;padding-right:1rem;padding-top:.5rem;padding-bottom:.5rem;display:inline-block;background-color:rgba(var(--ejs-primary-color), 1);margin:0 10px;color:#fff !important}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--580e3c22e63f8a1eb29694fd0b141b a.ejs--ad20569e1449d7b8e99e6465960456{background-color:#929292}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--8e7922427f460a31935084b7acfb1a{opacity:1}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--8e7922427f460a31935084b7acfb1a li{display:inline-block;float:none}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--8e7922427f460a31935084b7acfb1a li.ejs--68d337c212ec6a5bc43125440d422b{border-bottom:1px solid #fff;background-color:#ffffff}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--8e7922427f460a31935084b7acfb1a li a{padding:2px 5px;color:#bcbcbc  !important}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--8e7922427f460a31935084b7acfb1a li.ejs--68d337c212ec6a5bc43125440d422b a{color:#000 !important}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--31eb28817642bb1bfe0a2c422108bb{opacity:1}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--f932566a0af5314da834324c901978{opacity:1}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--f932566a0af5314da834324c901978 div.ejs--c233fb69cbef43078bc39e9d1efac8:hover{background-color:#2d2d2d}.ejs--d169a219343bc32dd4aecc3f6b7f25{opacity:1}.ejs--ad20569e1449d7b8e99e6465960456{float:none}.ejs--ad20569e1449d7b8e99e6465963825{float:none}.ejs--ad20569e1449d7b8e99e6468571053{float:none}.ejs--bdb54e9fc47f9805b506b746e897bf{float:none}.ejs--67d03ee7480b871ad6507d6319a839{float:none}.ejs--c2d931157456c1d438d40a2f66af2c{float:none}.ejs--5e71fd80268afbb1d588e40b993508 .ejs--f932566a0af5314da834324c901978 a.ejs--6604c83041a275a78837c452a71dd8,.ejs--99150e15f962c63c689cadc81ef40d{float:none;padding:0.1rem 0.5rem;background-color:rgba(var(--ejs-primary-color), 1);color:#fff !important;border-radius:0.25rem;cursor:pointer}.ejs--71527b6509aa48afce3ce1a11c02f0{float:none}.ejs--7ad35768e3f6b9faf97db01d5b60ae{float:none}.ejs--9c403e5e107a3e4374ba244b636400{float:none}.ejs--d6a46533fa6e510a571af5c28b440a{float:none}.ejs--d6a46533fa6e510a571af5c28b440a table{font-size:0.8rem;padding:0 10px}.ejs--d6a46533fa6e510a571af5c28b440a thead{background-color:rgba(50,50,50,0.66)}.ejs--d6a46533fa6e510a571af5c28b440a tbody tr:hover{background-color:#2d2d2d}.ejs--d6a46533fa6e510a571af5c28b440a tbody td{padding:10px 0}.ejs--d6a46533fa6e510a571af5c28b440a tbody td svg{width:12px;vertical-align:middle}.ejs--d6a46533fa6e510a571af5c28b440a table td:nth-child(2),.ejs--d6a46533fa6e510a571af5c28b440a table td:nth-child(3){text-align:center;width:80px}.ejs--57ca9b3853cc7de731483cfcc95a59{float:none}.ejs--0885d5e25e19127b6b516014426a1b{float:none}.ejs--25023d28756fdb9dfbbfb6dccb8677{float:none}.ejs--75b3a8d35aacc6424ed7422fdeaaaa{float:none}.ejs--eefdf28d69ed2d20f197308981bb61{float:none}.ejs--eefdf28d69ed2d20f197308981bb61 table{font-size:0.8rem;padding:0 10px}.ejs--eefdf28d69ed2d20f197308981bb61 thead,.ejs--eefdf28d69ed2d20f197308981bb61 tbody,.ejs--eefdf28d69ed2d20f197308981bb61 tfoot,.ejs--d6a46533fa6e510a571af5c28b440a thead,.ejs--d6a46533fa6e510a571af5c28b440a tbody,.ejs--d6a46533fa6e510a571af5c28b440a tfoot{background:transparent;text-align:left}.ejs--eefdf28d69ed2d20f197308981bb61 tbody tr:hover{background-color:#2d2d2d}.ejs--eefdf28d69ed2d20f197308981bb61 tr td:nth-child(1),.ejs--eefdf28d69ed2d20f197308981bb61 tr td:nth-child(3){width:80px}.ejs--9e670880bb57e824400fa00f09aaad,.ejs--2b4e3c245b7b25dfdac5e09155a68e,.ejs--572b0b3a0345a6b01b01a15a02842c,.ejs--a7d7f80c8999469c991ea452a85dd9{float:none}.ejs--2b4e3c245b7b25dfdac5e09155a68e{max-width:320px;margin:0 auto;text-align:left;width:100%}.ejs--952c974392296e7f643d51db380157{height:100%;overflow:hidden;position:absolute;top:0;width:100%}.ejs--0d7e216cf12ae73705b5d5bb0452fc{float:none}.ejs--c0a5e71f6613caab66d6ae15a5a00f{color:rgba(255,255,255,0.8);font-size:0.8rem;padding:5px;text-align:left;text-shadow:1px 1px 1px #000}.ejs--2440e3b831017ff8327c939e2a4413{display:none;position:fixed;bottom:30px;width:100%;position:absolute;bottom:80px}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--b8d8b771d0bbb94e2bbd03054f53fd{position:absolute;bottom:250px;width:100%}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--c83d70cb63c933edc073c7fe92e32b{position:absolute;bottom:50px;width:125px;height:125px;left:10px}@media (min-width: 480px){.ejs--2440e3b831017ff8327c939e2a4413{bottom:50px}}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--6e7015634623fd6a82e6a7d3488c84{position:absolute;font-size:20px;width:50px;height:50px;text-align:center;line-height:50px;border:1px solid #ccc;border-radius:50%;font-size:30px;font-weight:bold;background-color:rgba(255,255,255,0.15);user-select:none}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--49fa47c86a131e4ca8fb268bfdde89{position:absolute;bottom:10px;height:30px;width:124px;left:50%;margin-left:-62px}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--49fa47c86a131e4ca8fb268bfdde89 .ejs--6e7015634623fd6a82e6a7d3488c84{width:60px;height:30px;font-size:12px;font-weight:bolder;border-radius:5px;border:1px solid #ccc;line-height:30px;text-align:center;text-transform:uppercase}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--7d2b19f77fd0ccabf94dc1ca39ae18{position:absolute;bottom:50px;width:130px;height:130px;right:10px}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--7d2b19f77fd0ccabf94dc1ca39ae18 .ejs--6e7015634623fd6a82e6a7d3488c84{width:50px;height:50px;text-align:center;line-height:50px;border:1px solid #ccc;border-radius:50%;font-size:30px;font-weight:bold;transition:all 0.2s}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--6e7015634623fd6a82e6a7d3488c84.ejs--d708d9d486f1eca73a593d5c09f8ad{background-color:#000000ad}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--6e7015634623fd6a82e6a7d3488c84 img{width:100%}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--76fa7567879f97f5991c50ac600735{left:30px}.ejs--82fa3531556f97f5991c50ac600735{left:-35px}.ejs--fbd492618ebsd464fbcd1c9185cd14{left:95px}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--fbd499578ebef494fbcd1c9114cd1d{left:40px}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--b4c6d9bdbbd3dcfc8fa82689ecf448{left:40px;top:80px}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--87c940c15830daa967b08e67e9b87e{left:0;top:40px}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--b7c456c7dd7a616a55965bb134323b{left:81px;top:40px}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--7930ee9bb7ae2fa6e2f7b5568f1e98,.ejs--2440e3b831017ff8327c939e2a4413 .ejs--2226100d4c5408c2699e942aabb31c{height:31px;text-align:center;border:1px solid #ccc;border-radius:5px;line-height:31px}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--7930ee9bb7ae2fa6e2f7b5568f1e98{left:10px}.ejs--2440e3b831017ff8327c939e2a4413 .ejs--2226100d4c5408c2699e942aabb31c{right:10px}.ejs--eefec939452eb92fad035932d0f47c{float:none}.ejs--f1f43b27384834c8c22c6f81d0c5ae{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.6);display:flex;justify-content:center;align-items:center}.ejs--c4ee33766a01ed0356c3ec07898e96{background-color:rgba(0,0,0,0.8);border:1px solid rgba(238,238,238,0.2);padding:30px;min-width:200px;max-width:500px;max-height:100vh;border-radius:4px;overflow-y:auto;box-sizing:border-box}.ejs--a073f32023da1ced805c5f95a4e81c{display:flex;justify-content:space-between;align-items:center}.ejs--ed44f59bb8cd49177586b140658c6c{background-color:transparent;padding:0}.ejs--81470ba5e6a6d68014839ad4d9a977{margin-top:0 !important;margin-bottom:0 !important;font-weight:600 !important;font-size:1.25rem;line-height:1.25 !important;color:rgba(var(--ejs-primary-color), 1) !important}.ejs--c3c85789c2a7f56d8b26dba75b7e1f{background:transparent;border:0}.ejs--a073f32023da1ced805c5f95a4e81c .ejs--c3c85789c2a7f56d8b26dba75b7e1f:before{content:\"¹5\"}.ejs--db44f5520e6f4fd0dd34b478bb9ee8{margin-top:2rem;margin-bottom:2rem;line-height:1.5;color:rgba(0,0,0,0.8);text-align:left}.ejs--db44f5520e6f4fd0dd34b478bb9ee8 input,.ejs--db44f5520e6f4fd0dd34b478bb9ee8 select,.ejs--db44f5520e6f4fd0dd34b478bb9ee8 textarea{font-size:1rem;padding:0.4rem;max-width:100%}.ejs--319bcec5dee9444e1a2a53d6503b7c{color:#fff !important;font-size:.875rem;padding-left:1rem;padding-right:1rem;padding-top:.5rem;padding-bottom:.5rem;background-color:#929292;color:rgba(0,0,0,0.8);border-radius:.25rem;border-style:none;border-width:0;cursor:pointer;-webkit-appearance:button;text-transform:none;overflow:visible;line-height:1.15;margin:0;will-change:transform;-moz-osx-font-smoothing:grayscale;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform:translateZ(0);transform:translateZ(0);transition:-webkit-transform .25s ease-out;transition:transform .25s ease-out;transition:transform .25s ease-out,-webkit-transform .25s ease-out}.ejs--319bcec5dee9444e1a2a53d6503b7c:focus,.ejs--319bcec5dee9444e1a2a53d6503b7c:hover{-webkit-transform:scale(1.05);transform:scale(1.05)}.ejs--eaf3c1cba25d415d92ac48d7db34dd{background-color:rgba(var(--ejs-primary-color), 1)}.ejs--940087708c06b6129ce2bfa45f1d89{color:#f00 !important}@keyframes ejs--9d7aa2bd5ee276be085e5b2a0bbc2e{from{opacity:0}to{opacity:1}}@keyframes ejs--184b7558ffeb569c1790654537477b{from{opacity:1}to{opacity:0}}@keyframes ejs--8b069266f76099cc6bc220f6ea56cc{from{transform:translateY(15%)}to{transform:translateY(0)}}@keyframes ejs--379a464ad0e66ea5fc601e5f2fd73e{from{transform:translateY(0)}to{transform:translateY(-10%)}}.ejs--bef295f3125e9ba83d4f3677264bae{display:none}.ejs--bef295f3125e9ba83d4f3677264bae.ejs--60c17e0d149099f207b06f27edae6a{position:absolute;top:0;display:block;height:100%;width:100%}.ejs--bef295f3125e9ba83d4f3677264bae[aria-hidden=\"false\"] .ejs--f1f43b27384834c8c22c6f81d0c5ae{animation:ejs--9d7aa2bd5ee276be085e5b2a0bbc2e 0.3s cubic-bezier(0, 0, 0.2, 1)}.ejs--bef295f3125e9ba83d4f3677264bae[aria-hidden=\"false\"] .ejs--c4ee33766a01ed0356c3ec07898e96{animation:ejs--8b069266f76099cc6bc220f6ea56cc 0.3s cubic-bezier(0, 0, 0.2, 1)}.ejs--bef295f3125e9ba83d4f3677264bae[aria-hidden=\"true\"] .ejs--f1f43b27384834c8c22c6f81d0c5ae{animation:ejs--184b7558ffeb569c1790654537477b 0.3s cubic-bezier(0, 0, 0.2, 1)}.ejs--bef295f3125e9ba83d4f3677264bae[aria-hidden=\"true\"] .ejs--c4ee33766a01ed0356c3ec07898e96{animation:ejs--379a464ad0e66ea5fc601e5f2fd73e 0.3s cubic-bezier(0, 0, 0.2, 1)}.ejs--bef295f3125e9ba83d4f3677264bae .ejs--c4ee33766a01ed0356c3ec07898e96,.ejs--bef295f3125e9ba83d4f3677264bae .ejs--f1f43b27384834c8c22c6f81d0c5ae{will-change:transform}.ejs--4c3e63d4005bd8a0468e9c74a35f62{padding-left:2.25rem;position:relative;padding:0.2em 0;clear:both}.ejs--4c3e63d4005bd8a0468e9c74a35f62:hover{background-color:rgba(0,0,0,0.8)}.ejs--4c3e63d4005bd8a0468e9c74a35f62 input[type=checkbox]{position:absolute;z-index:-1;opacity:0;box-sizing:border-box;width:auto}.ejs--4c3e63d4005bd8a0468e9c74a35f62 label{position:relative;margin-bottom:0;vertical-align:top;word-break:break-word}.ejs--4c3e63d4005bd8a0468e9c74a35f62 label::before{position:absolute;top:.325rem;display:block;height:1rem;content:\"\";background-color:#fff;border:#adb5bd solid 1px;left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.ejs--4c3e63d4005bd8a0468e9c74a35f62 label::after{position:absolute;display:block;content:\"\";background-repeat:no-repeat;background-position:center center;top:calc(.325rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out}.ejs--4c3e63d4005bd8a0468e9c74a35f62 input:checked+label::before{color:#fff;border-color:rgba(var(--ejs-primary-color), 1);background-color:rgba(var(--ejs-primary-color), 1)}.ejs--4c3e63d4005bd8a0468e9c74a35f62 input:checked+label::after{background-color:#fff;-webkit-transform:translateX(0.75rem);transform:translateX(0.75rem)}.ejs--90bcdd71cd0d2307e9ee0dffa916da{position:absolute;padding:0.1rem 0.5rem;background-color:rgba(var(--ejs-primary-color), 1);color:#fff !important;border-radius:0.25rem;cursor:pointer;right:.025rem}.ejs--7a5f920ceffb2913f6dbda780573cf:fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.ejs--7a5f920ceffb2913f6dbda780573cf:fullscreen canvas{height:100% !important;max-width:100%;min-width:0;width:auto}.ejs--7a5f920ceffb2913f6dbda780573cf:fullscreen .ejs--057800d021995e1347ec07cb748672{height:100%;width:100%}.ejs--7a5f920ceffb2913f6dbda780573cf:fullscreen .ejs--8732295ca5c4902a060d34706a8146 .ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e{display:block}.ejs--7a5f920ceffb2913f6dbda780573cf:fullscreen .ejs--8732295ca5c4902a060d34706a8146 .ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e+svg{display:none}.ejs--7a5f920ceffb2913f6dbda780573cf:-webkit-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.ejs--7a5f920ceffb2913f6dbda780573cf:-webkit-full-screen canvas{height:100% !important;max-width:100%;min-width:0;width:auto}.ejs--7a5f920ceffb2913f6dbda780573cf:-webkit-full-screen .ejs--057800d021995e1347ec07cb748672{height:100%;width:100%}.ejs--7a5f920ceffb2913f6dbda780573cf:-webkit-full-screen .ejs--8732295ca5c4902a060d34706a8146 .ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e{display:block}.ejs--7a5f920ceffb2913f6dbda780573cf:-webkit-full-screen .ejs--8732295ca5c4902a060d34706a8146 .ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e+svg{display:none}.ejs--7a5f920ceffb2913f6dbda780573cf:-moz-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.ejs--7a5f920ceffb2913f6dbda780573cf:-moz-full-screen canvas{height:100% !important;max-width:100%;min-width:0;width:auto}.ejs--7a5f920ceffb2913f6dbda780573cf:-moz-full-screen .ejs--057800d021995e1347ec07cb748672{height:100%;width:100%}.ejs--7a5f920ceffb2913f6dbda780573cf:-moz-full-screen .ejs--8732295ca5c4902a060d34706a8146 .ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e{display:block}.ejs--7a5f920ceffb2913f6dbda780573cf:-moz-full-screen .ejs--8732295ca5c4902a060d34706a8146 .ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e+svg{display:none}.ejs--7a5f920ceffb2913f6dbda780573cf:-ms-fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.ejs--7a5f920ceffb2913f6dbda780573cf:-ms-fullscreen canvas{height:100% !important;max-width:100%;min-width:0;width:auto}.ejs--7a5f920ceffb2913f6dbda780573cf:-ms-fullscreen .ejs--057800d021995e1347ec07cb748672{height:100%;width:100%}.ejs--7a5f920ceffb2913f6dbda780573cf:-ms-fullscreen .ejs--8732295ca5c4902a060d34706a8146 .ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e{display:block}.ejs--7a5f920ceffb2913f6dbda780573cf:-ms-fullscreen .ejs--8732295ca5c4902a060d34706a8146 .ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e+svg{display:none}.ejs--412041671de21945d3e028b6ae84c9{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%;bottom:0;left:0;position:fixed;right:0;top:0;z-index:10000000}.ejs--412041671de21945d3e028b6ae84c9 canvas{height:100% !important;max-width:100%;min-width:0;width:auto}.ejs--412041671de21945d3e028b6ae84c9 .ejs--057800d021995e1347ec07cb748672{height:100%;width:100%}.ejs--412041671de21945d3e028b6ae84c9 .ejs--8732295ca5c4902a060d34706a8146 .ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e{display:block}.ejs--412041671de21945d3e028b6ae84c9 .ejs--8732295ca5c4902a060d34706a8146 .ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e+svg{display:none}.ejs--7a5f920ceffb2913f6dbda780573cf.ejs--64f1256f556fb94454b930cb3ea7f2:fullscreen canvas{width:100%;height:auto !important}.ejs--7a5f920ceffb2913f6dbda780573cf.ejs--64f1256f556fb94454b930cb3ea7f2:-webkit-full-screen canvas{width:100%;height:auto !important}.ejs--7a5f920ceffb2913f6dbda780573cf.ejs--64f1256f556fb94454b930cb3ea7f2:-moz-full-screen{width:100%;height:auto !important}.ejs--7a5f920ceffb2913f6dbda780573cf.ejs--64f1256f556fb94454b930cb3ea7f2:-ms-fullscreen{width:100%;height:auto !important}.ejs--33643265135cf89e6c0a0d9866d6f1{transition:none !important}.ejs--6f0e996cd15e5fb6be0256918531d7{clip:rect(1px, 1px, 1px, 1px);overflow:hidden;border:0 !important;height:1px !important;padding:0 !important;position:absolute !important;width:1px !important}.ejs--7a5f920ceffb2913f6dbda780573cf [hidden]{display:none !important}",""]),t.locals={"ejs-wrapper":"ejs--de6433374cb30211f10e148b320b2f",ejs:"ejs--7a5f920ceffb2913f6dbda780573cf","ejs--full-ui":"ejs--f3a002bba9836fe4ebfed357a45521","controls-tabs":"ejs--008adea3c1ef33a8fc94892a1e97e6",overlay:"ejs--85a95eb6bf74a40ab61b91a91e5bff","key-setting-popup":"ejs--d169a219343bc32dd4aecc3f6b7f25","loading-info":"ejs--782e3572812f983b3a150eec177391",p1:"ejs--c426dd1d179aa351e6cec47e1d9438",p2:"ejs--31e7e81db48819ee35ec6f50378a2e",p3:"ejs--20d4eb2646d396f558a645dc0574f1",p4:"ejs--4de05306c8b099bdeb4585571ac095",ejs__contextmenu:"ejs--c7957d8666bb6b8fc7c3e9c021aaf8",ad:"ejs--cbcfe0a1421cadac9a04c81d6431d6","close-ad":"ejs--f3a1903d935f6cf720d4a0498db62a","start-game":"ejs--73f9b4e94a7a1fe74e11107d5ab2ef",pulse:"ejs--9bd947b3e6427453595f083d740a7c",ejs__control:"ejs--8732295ca5c4902a060d34706a8146","ejs__tab-focus":"ejs--a83b6c705e103e81a7762d0ed5e64b","ejs__control--pressed":"ejs--b1238136ec472a92297159882cf4b8","icon--pressed":"ejs--ec731619062226d943da67f5d83009","icon--not-pressed":"ejs--dc7068585e3d84fe0e676864c1439e","label--pressed":"ejs--0c6561f9155750b0aeeed6da5da7bf","label--not-pressed":"ejs--13d64e30c1333cc99391af48ddabaa","ejs--video":"ejs--d5f430a99a1619b3434bf58e34a99c",ejs__controls:"ejs--1acedc5ed6816abe96dd27d910fd74",ejs__progress:"ejs--f1aa376719b564cae0e653157cde14",ejs__time:"ejs--90d2780f99bcc76fdb6b0378a7238e",ejs__menu:"ejs--c7bfb2d1b75a40fdaaf90624bea9e7",ejs__volume:"ejs--36ceeeec0df37a9cf4bbe05fa204ec","ejs--hide-controls":"ejs--1b8cb7f2294b1eb5de5238daea3513","ejs--fullscreen-enabled":"ejs--19409fe2057ab935a7e46abb5b4f49",ejs__tooltip:"ejs--74c6d4176d27e37a19d2e9e61de8f4",ejs__menu__container:"ejs--013213afedeeb6878089b1ca1b4e47","ejs-popup":"ejs--c2532bfe04554193cc42b3be753700","ejs__control--forward":"ejs--0b4cdb4057d1a4623e60836ccc6275","ejs__control--back":"ejs--a7ad9de0cb0ca672b6703c50de7db9",ejs__menu__value:"ejs--f91e90fe7cabc875aff9a431bf5389","ejs__tooltip--visible":"ejs--6ea27aa07e60d1d6e4c9782740028a","ejs--menu-open":"ejs--da54136ccf8c6b0b16d98e8b8e8b88","ejs__video-wrapper":"ejs--057800d021995e1347ec07cb748672",portrait:"ejs--64f1256f556fb94454b930cb3ea7f2","game-started":"ejs--7da7949f602347007818e6d192eb23",ejs__progress__buffer:"ejs--f8d706413436fd119cf01aaf5a9d9d","ejs--audio":"ejs--bd0222e58d71b0a304d6037dfcffd5","ejs--loading":"ejs--2521e1257996f264de36e77cc9c5ee",ejs__dialogs:"ejs--d31688f864f56d6426ebbf2217d6ee",ejs__dialog:"ejs--5e71fd80268afbb1d588e40b993508",ejs__cache__container:"ejs--1e0f0672f67d0e96592314c9ed78b0",ejs__loading__container:"ejs--d7e6a6a8f38bfaa256fe5d709a8258","ejs__load-state__container":"ejs--b183f581b5336c4908ad258d3e1cc7",ejs__screenRecord__container:"ejs--b183f581b5336cashrqd258d3e1cc7",ejs__netplay__container:"ejs--158ea9dd34e3e7af2d837f8b05babb",ejs__gamepad__container:"ejs--3f0897a8158ba363a0ee0afe4da7c5","dialog-container":"ejs--38cc09882a55e98c76168dbe838aa0","dialog-title":"ejs--b373c9d5029d49324fb8ac3ece96c1","dialog-content":"ejs--a5e2629abb9a5bcbc8b2c1307922d2","dialog-buttons":"ejs--580e3c22e63f8a1eb29694fd0b141b","btn-cancel":"ejs--ad20569e1449d7b8e99e6465960456","btn-reset":"ejs--ad20569e1449d7b8e99e6465963825","btn-clear":"ejs--ad20569e1449d7b8e99e6468571053",tabs:"ejs--8e7922427f460a31935084b7acfb1a",active:"ejs--68d337c212ec6a5bc43125440d422b","tabs-content":"ejs--31eb28817642bb1bfe0a2c422108bb","tabs-panel":"ejs--f932566a0af5314da834324c901978","button-container":"ejs--c233fb69cbef43078bc39e9d1efac8","btn-submit":"ejs--bdb54e9fc47f9805b506b746e897bf","btn-create-room":"ejs--67d03ee7480b871ad6507d6319a839","btn-quit":"ejs--c2d931157456c1d438d40a2f66af2c",set:"ejs--6604c83041a275a78837c452a71dd8","btn-join-room":"ejs--99150e15f962c63c689cadc81ef40d","netplay-player-name":"ejs--71527b6509aa48afce3ce1a11c02f0","netplay-player-name-input":"ejs--7ad35768e3f6b9faf97db01d5b60ae","netplay-player-name-set":"ejs--9c403e5e107a3e4374ba244b636400","netplay-roomlist":"ejs--d6a46533fa6e510a571af5c28b440a","netplay-create-room":"ejs--57ca9b3853cc7de731483cfcc95a59","netplay-room-name-input":"ejs--0885d5e25e19127b6b516014426a1b","netplay-room-password-input":"ejs--25023d28756fdb9dfbbfb6dccb8677","netplay-create-room-set":"ejs--75b3a8d35aacc6424ed7422fdeaaaa","netplay-room":"ejs--eefdf28d69ed2d20f197308981bb61","cheats-add":"ejs--9e670880bb57e824400fa00f09aaad","cheats-list":"ejs--2b4e3c245b7b25dfdac5e09155a68e","cheat-code-input":"ejs--572b0b3a0345a6b01b01a15a02842c","cheat-name-input":"ejs--a7d7f80c8999469c991ea452a85dd9",ejs__widgets:"ejs--952c974392296e7f643d51db380157",ejs__widget:"ejs--0d7e216cf12ae73705b5d5bb0452fc",ejs__widget_netplay:"ejs--c0a5e71f6613caab66d6ae15a5a00f","virtual-gamepad":"ejs--2440e3b831017ff8327c939e2a4413",top:"ejs--b8d8b771d0bbb94e2bbd03054f53fd",left:"ejs--c83d70cb63c933edc073c7fe92e32b",buttons:"ejs--6e7015634623fd6a82e6a7d3488c84",center:"ejs--49fa47c86a131e4ca8fb268bfdde89",right:"ejs--7d2b19f77fd0ccabf94dc1ca39ae18",touch:"ejs--d708d9d486f1eca73a593d5c09f8ad",modal:"ejs--eefec939452eb92fad035932d0f47c",modal__overlay:"ejs--f1f43b27384834c8c22c6f81d0c5ae",modal__container:"ejs--c4ee33766a01ed0356c3ec07898e96",modal__header:"ejs--a073f32023da1ced805c5f95a4e81c",modal__footer:"ejs--ed44f59bb8cd49177586b140658c6c",modal__title:"ejs--81470ba5e6a6d68014839ad4d9a977",modal__close:"ejs--c3c85789c2a7f56d8b26dba75b7e1f",modal__content:"ejs--db44f5520e6f4fd0dd34b478bb9ee8",modal__btn:"ejs--319bcec5dee9444e1a2a53d6503b7c","modal__btn-primary":"ejs--eaf3c1cba25d415d92ac48d7db34dd",modal__errmsg:"ejs--940087708c06b6129ce2bfa45f1d89","micromodal-slide":"ejs--bef295f3125e9ba83d4f3677264bae","is-open":"ejs--60c17e0d149099f207b06f27edae6a",mmfadeIn:"ejs--9d7aa2bd5ee276be085e5b2a0bbc2e",mmslideIn:"ejs--8b069266f76099cc6bc220f6ea56cc",mmfadeOut:"ejs--184b7558ffeb569c1790654537477b",mmslideOut:"ejs--379a464ad0e66ea5fc601e5f2fd73e","ejs-switch":"ejs--4c3e63d4005bd8a0468e9c74a35f62","ejs-delete-cheat":"ejs--90bcdd71cd0d2307e9ee0dffa916da","icon--exit-fullscreen":"ejs--2b3dd6e2e26c0f0dc4ac5779dedd5e","ejs--fullscreen-fallback":"ejs--412041671de21945d3e028b6ae84c9","ejs--no-transition":"ejs--33643265135cf89e6c0a0d9866d6f1","ejs__sr-only":"ejs--6f0e996cd15e5fb6be0256918531d7","ejs-fade-in":"ejs--7cadf43f3d9eb17c7e3c36de84973b"}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o=e[1]||"",r=e[3];if(!r)return o;if(t&&"function"==typeof btoa){var a=(n=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),i=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[o].concat(i).concat([a]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r<this.length;r++){var a=this[r][0];"number"==typeof a&&(o[a]=!0)}for(r=0;r<e.length;r++){var i=e[r];"number"==typeof i[0]&&o[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),t.push(i))}},t}},function(e,t,n){var o,r,a={},i=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=o.apply(this,arguments)),r}),s=function(e,t){return t?t.querySelector(e):document.querySelector(e)},c=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var o=s.call(this,e,n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}}(),l=null,u=0,d=[],f=n(369);function p(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=a[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(y(o.parts[i],t))}else{var s=[];for(i=0;i<o.parts.length;i++)s.push(y(o.parts[i],t));a[o.id]={id:o.id,refs:1,parts:s}}}}function h(e,t){for(var n=[],o={},r=0;r<e.length;r++){var a=e[r],i=t.base?a[0]+t.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};o[i]?o[i].parts.push(s):n.push(o[i]={id:i,parts:[s]})}return n}function m(e,t){var n=c(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=d[d.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(e.insertAt.before,n);n.insertBefore(t,r)}}function v(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function g(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var o=n.nc;o&&(e.attrs.nonce=o)}return b(t,e.attrs),m(e,t),t}function b(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function y(e,t){var n,o,r,a;if(t.transform&&e.css){if(!(a="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=a}if(t.singleton){var i=u++;n=l||(l=g(t)),o=_.bind(null,n,i,!1),r=_.bind(null,n,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",b(t,e.attrs),m(e,t),t}(t),o=T.bind(null,n,t),r=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),o=S.bind(null,n),r=function(){v(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return p(n,t),function(e){for(var o=[],r=0;r<n.length;r++){var i=n[r];(s=a[i.id]).refs--,o.push(s)}for(e&&p(h(e,t),t),r=0;r<o.length;r++){var s;if(0===(s=o[r]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete a[s.id]}}}};var w,x=(w=[],function(e,t){return w[e]=t,w.filter(Boolean).join("\n")});function _(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=x(t,r);else{var a=document.createTextNode(r),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function S(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function T(e,t,n){var o=n.css,r=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||a)&&(o=f(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(i),s&&URL.revokeObjectURL(s)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var r,a=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(r=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:o+a.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")}))}},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],o=t[1];return 3*(n+o)/4-o},t.toByteArray=function(e){var t,n,o,i=l(e),s=i[0],c=i[1],u=new a(3*(s+(o=c))/4-o),d=0,f=c>0?s-4:s;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,a=[],i=0,s=n-r;i<s;i+=16383)a.push(u(e,i,i+16383>s?s:i+16383));return 1===r?(t=e[n-1],a.push(o[t>>2]+o[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],a.push(o[t>>10]+o[t>>4&63]+o[t<<2&63]+"=")),a.join("")};for(var o=[],r=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=i.length;s<c;++s)o[s]=i[s],r[i.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,a,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(o[(a=r)>>18&63]+o[a>>12&63]+o[a>>6&63]+o[63&a]);return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,o,r){var a,i,s=8*r-o-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?r-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+d],d+=f,u-=8);for(i=a&(1<<-u)-1,a>>=-u,u+=o;u>0;i=256*i+e[t+d],d+=f,u-=8);if(0===a)a=1-l;else{if(a===c)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,o),a-=l}return(p?-1:1)*i*Math.pow(2,a-o)},t.write=function(e,t,n,o,r,a){var i,s,c,l=8*a-r-1,u=(1<<l)-1,d=u>>1,f=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=o?0:a-1,h=o?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=u):(i=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-i))<1&&(i--,c*=2),(t+=i+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(i++,c/=2),i+d>=u?(s=0,i=u):i+d>=1?(s=(t*c-1)*Math.pow(2,r),i+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),i=0));r>=8;e[n+p]=255&s,p+=h,s/=256,r-=8);for(i=i<<r|s,l+=r;l>0;e[n+p]=255&i,p+=h,i/=256,l-=8);e[n+p-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var o=n(145),r=n(74)("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(r("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),r("parse %s",e),n=o(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var a=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port,n.href=n.protocol+"://"+a+(t&&t.port===n.port?"":":"+n.port),n}},function(e,t,n){function o(e){var n;function o(){if(o.enabled){var e=o,r=+new Date,a=r-(n||r);e.diff=a,e.prev=n,e.curr=r,n=r;for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];i[0]=t.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var c=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,o){if("%%"===n)return n;c++;var r=t.formatters[o];if("function"==typeof r){var a=i[c];n=r.call(e,a),i.splice(c,1),c--}return n})),t.formatArgs.call(e,i),(o.log||t.log||console.log.bind(console)).apply(e,i)}}return o.namespace=e,o.enabled=t.enabled(e),o.useColors=t.useColors(),o.color=function(e){var n,o=0;for(n in e)o=(o<<5)-o+e.charCodeAt(n),o|=0;return t.colors[Math.abs(o)%t.colors.length]}(e),o.destroy=r,"function"==typeof t.init&&t.init(o),t.instances.push(o),o}function r(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var o=("string"==typeof e?e:"").split(/[\s,]+/),r=o.length;for(n=0;n<r;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var a=t.instances[n];a.enabled=t.enabled(a.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(104),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){(function(o){function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==o&&"env"in o&&(e=o.env.DEBUG),e}(t=e.exports=n(376)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var r=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(a=r))})),e.splice(a,0,o)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())}).call(this,n(49))},function(e,t,n){function o(e){var n;function o(){if(o.enabled){var e=o,r=+new Date,a=r-(n||r);e.diff=a,e.prev=n,e.curr=r,n=r;for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];i[0]=t.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var c=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,o){if("%%"===n)return n;c++;var r=t.formatters[o];if("function"==typeof r){var a=i[c];n=r.call(e,a),i.splice(c,1),c--}return n})),t.formatArgs.call(e,i),(o.log||t.log||console.log.bind(console)).apply(e,i)}}return o.namespace=e,o.enabled=t.enabled(e),o.useColors=t.useColors(),o.color=function(e){var n,o=0;for(n in e)o=(o<<5)-o+e.charCodeAt(n),o|=0;return t.colors[Math.abs(o)%t.colors.length]}(e),o.destroy=r,"function"==typeof t.init&&t.init(o),t.instances.push(o),o}function r(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var o=("string"==typeof e?e:"").split(/[\s,]+/),r=o.length;for(n=0;n<r;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var a=t.instances[n];a.enabled=t.enabled(a.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(104),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){var o=n(146),r=n(147),a=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===a.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===a.call(File);t.deconstructPacket=function(e){var t=[],n=e.data,a=e;return a.data=function e(t,n){if(!t)return t;if(r(t)){var a={_placeholder:!0,num:n.length};return n.push(t),a}if(o(t)){for(var i=new Array(t.length),s=0;s<t.length;s++)i[s]=e(t[s],n);return i}if("object"==typeof t&&!(t instanceof Date)){for(var c in i={},t)i[c]=e(t[c],n);return i}return t}(n,t),a.attachments=t.length,{packet:a,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(o(t))for(var r=0;r<t.length;r++)t[r]=e(t[r],n);else if("object"==typeof t)for(var a in t)t[a]=e(t[a],n);return t}(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,a=e;!function e(c,l,u){if(!c)return c;if(i&&c instanceof Blob||s&&c instanceof File){n++;var d=new FileReader;d.onload=function(){u?u[l]=this.result:a=this.result,--n||t(a)},d.readAsArrayBuffer(c)}else if(o(c))for(var f=0;f<c.length;f++)e(c[f],f,c);else if("object"==typeof c&&!r(c))for(var p in c)e(c[p],p,c)}(a),n||t(a)}},function(e,t,n){e.exports=n(379),e.exports.parser=n(51)},function(e,t,n){var o=n(149),r=n(50),a=n(77)("engine.io-client:socket"),i=n(153),s=n(51),c=n(145),l=n(75);function u(e,t){if(!(this instanceof u))return new u(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=c(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=c(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=l.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=u,u.priorWebsocketSuccess=!1,r(u.prototype),u.protocol=s.protocol,u.Socket=u,u.Transport=n(107),u.transports=n(149),u.parser=n(51),u.prototype.createTransport=function(e){a('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=4,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new o[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},u.prototype.open=function(){var e;if(this.rememberUpgrade&&u.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},u.prototype.setTransport=function(e){a("setting transport %s",e.name);var t=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},u.prototype.probe=function(e){a('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,o=this;function r(){if(o.onlyBinaryUpgrades){var r=!this.supportsBinary&&o.transport.supportsBinary;n=n||r}n||(a('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(r){if(!n)if("pong"===r.type&&"probe"===r.data){if(a('probe transport "%s" pong',e),o.upgrading=!0,o.emit("upgrading",t),!t)return;u.priorWebsocketSuccess="websocket"===t.name,a('pausing current transport "%s"',o.transport.name),o.transport.pause((function(){n||"closed"!==o.readyState&&(a("changing transport and sending upgrade packet"),f(),o.setTransport(t),t.send([{type:"upgrade"}]),o.emit("upgrade",t),t=null,o.upgrading=!1,o.flush())}))}else{a('probe transport "%s" failed',e);var i=new Error("probe error");i.transport=t.name,o.emit("upgradeError",i)}})))}function i(){n||(n=!0,f(),t.close(),t=null)}function s(n){var r=new Error("probe error: "+n);r.transport=t.name,i(),a('probe transport "%s" failed because of error: %s',e,n),o.emit("upgradeError",r)}function c(){s("transport closed")}function l(){s("socket closed")}function d(e){t&&e.name!==t.name&&(a('"%s" works - aborting "%s"',e.name,t.name),i())}function f(){t.removeListener("open",r),t.removeListener("error",s),t.removeListener("close",c),o.removeListener("close",l),o.removeListener("upgrading",d)}u.priorWebsocketSuccess=!1,t.once("open",r),t.once("error",s),t.once("close",c),this.once("close",l),this.once("upgrading",d),t.open()},u.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",u.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},u.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(a('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else a('packet received with socket readyState "%s"',this.readyState)},u.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},u.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout((function(){"closed"!==t.readyState&&t.onClose("ping timeout")}),e||t.pingInterval+t.pingTimeout)},u.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout((function(){a("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)}),e.pingInterval)},u.prototype.ping=function(){var e=this;this.sendPacket("ping",(function(){e.emit("ping")}))},u.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},u.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},u.prototype.write=u.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},u.prototype.sendPacket=function(e,t,n,o){if("function"==typeof t&&(o=t,t=void 0),"function"==typeof n&&(o=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var r={type:e,data:t,options:n};this.emit("packetCreate",r),this.writeBuffer.push(r),o&&this.once("flush",o),this.flush()}},u.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?o():t()})):this.upgrading?o():t()}function t(){e.onClose("forced close"),a("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function o(){e.once("upgrade",n),e.once("upgradeError",n)}return this},u.prototype.onError=function(e){a("socket error %j",e),u.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},u.prototype.onClose=function(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(a('socket close with reason: "%s"',e),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)},u.prototype.filterUpgrades=function(e){for(var t=[],n=0,o=e.length;n<o;n++)~i(this.transports,e[n])&&t.push(e[n]);return t}},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){var o=n(106),r=n(150),a=n(50),i=n(76),s=n(77)("engine.io-client:polling-xhr");function c(){}function l(e){if(r.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,"undefined"!=typeof location){var t="https:"===location.protocol,n=location.port;n||(n=t?443:80),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}}function u(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(e.exports=l,e.exports.Request=u,i(l,r),l.prototype.supportsBinary=!0,l.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new u(e)},l.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,o=this.request({method:"POST",data:e,isBinary:n}),r=this;o.on("success",t),o.on("error",(function(e){r.onError("xhr post error",e)})),this.sendXhr=o},l.prototype.doPoll=function(){s("xhr poll");var e=this.request(),t=this;e.on("data",(function(e){t.onData(e)})),e.on("error",(function(e){t.onError("xhr poll error",e)})),this.pollXhr=e},a(u.prototype),u.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new o(e),n=this;try{s("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var r in t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(r)&&t.setRequestHeader(r,this.extraHeaders[r])}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=!0),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){n.onLoad()},t.onerror=function(){n.onError(t.responseText)}):t.onreadystatechange=function(){if(2===t.readyState)try{var e=t.getResponseHeader("Content-Type");n.supportsBinary&&"application/octet-stream"===e&&(t.responseType="arraybuffer")}catch(e){}4===t.readyState&&(200===t.status||1223===t.status?n.onLoad():setTimeout((function(){n.onError(t.status)}),0))},s("xhr data %s",this.data),t.send(this.data)}catch(e){return void setTimeout((function(){n.onError(e)}),0)}"undefined"!=typeof document&&(this.index=u.requestsCount++,u.requests[this.index]=this)},u.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},u.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},u.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},u.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete u.requests[this.index],this.xhr=null}},u.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},u.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},u.prototype.abort=function(){this.cleanup()},u.requestsCount=0,u.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",f);else if("function"==typeof addEventListener){var d="onpagehide"in self?"pagehide":"unload";addEventListener(d,f,!1)}function f(){for(var e in u.requests)u.requests.hasOwnProperty(e)&&u.requests[e].abort()}},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var o in e)n.call(e,o)&&t.push(o);return t}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){e.exports=function(e,t,n){var o=e.byteLength;if(t=t||0,n=n||o,e.slice)return e.slice(t,n);if(t<0&&(t+=o),n<0&&(n+=o),n>o&&(n=o),t>=o||t>=n||0===o)return new ArrayBuffer(0);for(var r=new Uint8Array(e),a=new Uint8Array(n-t),i=t,s=0;i<n;i++,s++)a[s]=r[i];return a.buffer}},function(e,t){function n(){}e.exports=function(e,t,o){var r=!1;return o=o||n,a.count=e,0===e?t():a;function a(e,n){if(a.count<=0)throw new Error("after called too many times");--a.count,e?(r=!0,t(e),t=o):0!==a.count||r||t(null,n)}}},function(e,t){var n,o,r,a=String.fromCharCode;function i(e){for(var t,n,o=[],r=0,a=e.length;r<a;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<a?56320==(64512&(n=e.charCodeAt(r++)))?o.push(((1023&t)<<10)+(1023&n)+65536):(o.push(t),r--):o.push(t);return o}function s(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(e,t){return a(e>>t&63|128)}function l(e,t){if(0==(4294967168&e))return a(e);var n="";return 0==(4294965248&e)?n=a(e>>6&31|192):0==(4294901760&e)?(s(e,t)||(e=65533),n=a(e>>12&15|224),n+=c(e,6)):0==(4292870144&e)&&(n=a(e>>18&7|240),n+=c(e,12),n+=c(e,6)),n+a(63&e|128)}function u(){if(r>=o)throw Error("Invalid byte index");var e=255&n[r];if(r++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function d(e){var t,a;if(r>o)throw Error("Invalid byte index");if(r==o)return!1;if(t=255&n[r],r++,0==(128&t))return t;if(192==(224&t)){if((a=(31&t)<<6|u())>=128)return a;throw Error("Invalid continuation byte")}if(224==(240&t)){if((a=(15&t)<<12|u()<<6|u())>=2048)return s(a,e)?a:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(a=(7&t)<<18|u()<<12|u()<<6|u())>=65536&&a<=1114111)return a;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,o=i(e),r=o.length,a=-1,s="";++a<r;)s+=l(o[a],n);return s},decode:function(e,t){var s=!1!==(t=t||{}).strict;n=i(e),o=n.length,r=0;for(var c,l=[];!1!==(c=d(s));)l.push(c);return function(e){for(var t,n=e.length,o=-1,r="";++o<n;)(t=e[o])>65535&&(r+=a((t-=65536)>>>10&1023|55296),t=56320|1023&t),r+=a(t);return r}(l)}}},function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),o=0;o<e.length;o++)n[e.charCodeAt(o)]=o;t.encode=function(t){var n,o=new Uint8Array(t),r=o.length,a="";for(n=0;n<r;n+=3)a+=e[o[n]>>2],a+=e[(3&o[n])<<4|o[n+1]>>4],a+=e[(15&o[n+1])<<2|o[n+2]>>6],a+=e[63&o[n+2]];return r%3==2?a=a.substring(0,a.length-1)+"=":r%3==1&&(a=a.substring(0,a.length-2)+"=="),a},t.decode=function(e){var t,o,r,a,i,s=.75*e.length,c=e.length,l=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var u=new ArrayBuffer(s),d=new Uint8Array(u);for(t=0;t<c;t+=4)o=n[e.charCodeAt(t)],r=n[e.charCodeAt(t+1)],a=n[e.charCodeAt(t+2)],i=n[e.charCodeAt(t+3)],d[l++]=o<<2|r>>4,d[l++]=(15&r)<<4|a>>2,d[l++]=(3&a)<<6|63&i;return u}}()},function(e,t){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,o=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),r=o&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),a=n&&n.prototype.append&&n.prototype.getBlob;function i(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function s(e,t){t=t||{};var o=new n;return i(e).forEach((function(e){o.append(e)})),t.type?o.getBlob(t.type):o.getBlob()}function c(e,t){return new Blob(i(e),t||{})}"undefined"!=typeof Blob&&(s.prototype=Blob.prototype,c.prototype=Blob.prototype),e.exports=o?r?Blob:c:a?s:void 0},function(e,t,n){function o(e){var n;function o(){if(o.enabled){var e=o,r=+new Date,a=r-(n||r);e.diff=a,e.prev=n,e.curr=r,n=r;for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];i[0]=t.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var c=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(n,o){if("%%"===n)return n;c++;var r=t.formatters[o];if("function"==typeof r){var a=i[c];n=r.call(e,a),i.splice(c,1),c--}return n})),t.formatArgs.call(e,i),(o.log||t.log||console.log.bind(console)).apply(e,i)}}return o.namespace=e,o.enabled=t.enabled(e),o.useColors=t.useColors(),o.color=function(e){var n,o=0;for(n in e)o=(o<<5)-o+e.charCodeAt(n),o|=0;return t.colors[Math.abs(o)%t.colors.length]}(e),o.destroy=r,"function"==typeof t.init&&t.init(o),t.instances.push(o),o}function r(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var o=("string"==typeof e?e:"").split(/[\s,]+/),r=o.length;for(n=0;n<r;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var a=t.instances[n];a.enabled=t.enabled(a.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(104),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){(function(t){var o=n(150),r=n(76);e.exports=u;var a,i=/\n/g,s=/\\n/g;function c(){}function l(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{}}function u(e){if(o.call(this,e),this.query=this.query||{},!a){var t=l();a=t.___eio=t.___eio||[]}this.index=a.length;var n=this;a.push((function(e){n.onData(e)})),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",(function(){n.script&&(n.script.onerror=c)}),!1)}r(u,o),u.prototype.supportsBinary=!1,u.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),o.prototype.doClose.call(this)},u.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},u.prototype.doWrite=function(e,t){var n=this;if(!this.form){var o,r=document.createElement("form"),a=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;r.className="socketio",r.style.position="absolute",r.style.top="-1000px",r.style.left="-1000px",r.target=c,r.method="POST",r.setAttribute("accept-charset","utf-8"),a.name="d",r.appendChild(a),document.body.appendChild(r),this.form=r,this.area=a}function l(){u(),t()}function u(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';o=document.createElement(e)}catch(e){(o=document.createElement("iframe")).name=n.iframeId,o.src="javascript:0"}o.id=n.iframeId,n.form.appendChild(o),n.iframe=o}this.form.action=this.uri(),u(),e=e.replace(s,"\\\n"),this.area.value=e.replace(i,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&l()}:this.iframe.onload=l}}).call(this,n(31))},function(e,t,n){(function(t){var o,r,a=n(107),i=n(51),s=n(75),c=n(76),l=n(152),u=n(77)("engine.io-client:websocket");if("undefined"!=typeof WebSocket)o=WebSocket;else if("undefined"!=typeof self)o=self.WebSocket||self.MozWebSocket;else try{r=n(392)}catch(e){}var d=o||r;function f(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=o&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(d=r),a.call(this,e)}e.exports=f,c(f,a),f.prototype.name="websocket",f.prototype.supportsBinary=!0,f.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new d(e,t):new d(e):new d(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},f.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},f.prototype.write=function(e){var n=this;this.writable=!1;for(var o=e.length,r=0,a=o;r<a;r++)!function(e){i.encodePacket(e,n.supportsBinary,(function(r){if(!n.usingBrowserWebSocket){var a={};e.options&&(a.compress=e.options.compress),n.perMessageDeflate&&("string"==typeof r?t.byteLength(r):r.length)<n.perMessageDeflate.threshold&&(a.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(r):n.ws.send(r,a)}catch(e){u("websocket closed before onclose event")}--o||(n.emit("flush"),setTimeout((function(){n.writable=!0,n.emit("drain")}),0))}))}(e[r])},f.prototype.onClose=function(){a.prototype.onClose.call(this)},f.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},f.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=l()),this.supportsBinary||(e.b64=1),(e=s.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},f.prototype.check=function(){return!(!d||"__initialize"in d&&this.name===f.prototype.name)}}).call(this,n(73).Buffer)},function(e,t){},function(e,t){e.exports=function(e,t){for(var n=[],o=(t=t||0)||0;o<e.length;o++)n[o-t]=e[o];return n}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},void 0,window.EJS_main=function(e,t,n){"use strict";for(var o in window.EJS_RESET_VARS=[],window)window.EJS_RESET_VARS.push(o);n.r(t),n(162),n(364),n(365);var r={volume:.5,muted:!1,i18n:{restart:"Restart",play:"Play",pause:"Pause",played:"Played",volume:"Volume",mute:"Mute (F9)",unmute:"Unmute (F9)",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",settings:"Settings",saveState:"Save State (Shift + F2)",loadState:"Load State (Shift + F4)",screenRecord:"Start Screen Recording",netplay:"Netplay",gamepad:"Control Settings",cheat:"Cheats",menuBack:"Go back to previous menu",normal:"Normal",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",playNow:"Play Now"},listeners:{play:null,pause:null,restart:null,rewind:null,mute:null,volume:null,fullscreen:null},events:["ready"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".ejs",controls:{container:null,wrapper:".jes__controls"},buttons:{play:'[data-btn="play"]',pause:'[data-btn="pause"]',mute:'[data-btn="mute"]',fullscreen:'[data-btn="fullscreen"]',settings:'[data-btn="settings"]',saveState:'[data-btn="save-state"]',loadState:'[data-btn="load-state"]',screenRecord:'[data-btn="screen-record"]',gamepad:'[data-btn="gamepad"]',netplay:'[data-btn="netplay"]',cheat:'[data-btn="cheat"]'},inputs:{volume:'[data-range="volume"]'}},classNames:{type:"ejs--video",video:"ejs__video-wrapper",poster:"ejs__poster",posterEnabled:"ejs__poster-enabled",control:"ejs__control",controlPressed:"ejs__control--pressed",playing:"ejs--playing",paused:"ejs--paused",stopped:"ejs--stopped",loading:"ejs--loading",hover:"ejs--hover",tooltip:"ejs__tooltip",hidden:"ejs__sr-only",hideControls:"ejs--hide-controls",isIos:"ejs--is-ios",isTouch:"ejs--is-touch",uiSupported:"ejs--full-ui",noTransition:"ejs--no-transition",menu:{value:"ejs__menu__value",badge:"ejs__badge",open:"ejs--menu-open"},fullscreen:{enabled:"ejs--fullscreen-enabled",fallback:"ejs--fullscreen-fallback"},tabFocus:"ejs__tab-focus"}},a=(n(56),n(157)),i=n.n(a),s=function(e){return null!=e?e.constructor:null},c=function(e,t){return Boolean(e&&t&&e instanceof t)},l=function(e){return null==e},u=function(e){return s(e)===Object},d=function(e){return s(e)===String},f=function(e){return Array.isArray(e)},p=function(e){return c(e,NodeList)},h=function(e){return l(e)||(d(e)||f(e)||p(e))&&!e.length||u(e)&&!Object.keys(e).length},m=l,v=u,g=function(e){return s(e)===Number&&!Number.isNaN(e)},b=d,y=function(e){return s(e)===Boolean},w=function(e){return s(e)===Function},x=f,_=p,S=function(e){return c(e,Element)},T=function(e){return c(e,Event)},C=function(e){return c(e,KeyboardEvent)},E=h,A=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,null}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}();function k(e,t,n){var o=this,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(e&&"addEventListener"in e&&!E(t)&&w(n)){var s=t.split(" "),c=i;A&&(c={passive:a,capture:i}),s.forEach((function(t){o&&o.eventListeners&&r&&o.eventListeners.push({element:e,type:t,callback:n,options:c}),e[r?"addEventListener":"removeEventListener"](t,n,c)}))}}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];k.call(this,e,t,n,!0,o,r)}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];k.call(this,e,t,n,!1,o,r)}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];k.call(this,e,t,(function a(){O(e,t,a,o,r);for(var i=arguments.length,s=new Array(i),c=0;c<i;c++)s[c]=arguments[c];n.apply(this,s)}),!0,o,r)}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(S(e)&&!E(t)){var r=new CustomEvent(t,{bubbles:n,detail:Object.assign({},o,{emulator:this})});e.dispatchEvent(r)}}var j=n(158),I=n.n(j);function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],o=!0,r=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(o=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function L(e,t){var n=e.length?e:[e];Array.from(n).reverse().forEach((function(e,n){var o=n>0?t.cloneNode(!0):t,r=e.parentNode,a=e.nextSibling;o.appendChild(e),a?r.insertBefore(o,a):r.appendChild(o)}))}function F(e,t){S(e)&&!E(t)&&Object.entries(t).filter((function(e){var t=N(e,2)[1];return!m(t)})).forEach((function(t){var n=N(t,2),o=n[0],r=n[1];return e.setAttribute(o,r)}))}function D(e,t,n){var o=document.createElement(e);return v(t)&&F(o,t),b(n)&&(o.innerText=n),o}function z(e){_(e)||x(e)?Array.from(e).forEach(z):S(e)&&S(e.parentNode)&&e.parentNode.removeChild(e)}function B(e,t){if(!b(e)||E(e))return{};var n={},o=t;return e.split(",").forEach((function(e){var t=e.trim(),r=t.replace(".",""),a=t.replace(/[[\]]/g,"").split("="),i=a[0],s=a.length>1?a[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":v(o)&&b(o.class)&&(o.class+=" ".concat(r)),n.class=r;break;case"#":n.id=t.replace("#","");break;case"[":n[i]=s}})),n}function U(e,t){if(S(e)){var n=t;y(n)||(n=!e.hidden),n?e.setAttribute("hidden",""):e.removeAttribute("hidden")}}function G(e,t,n){if(_(e))return Array.from(e).map((function(e){return G(e,t,n)}));if(S(e)){var o="toggle";return void 0!==n&&(o=n?"add":"remove"),e.classList[o](t),e.classList.contains(t)}return!1}function V(e,t){return S(e)&&e.classList.contains(t)}function q(e,t){var n={Element:Element};return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function H(e){return this.elements.container.querySelectorAll(e)}function W(e){return this.elements.container.querySelector(e)}function Y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(S(e)){var n=H.call(this,"button:not(:disabled), input:not(:disabled), [tabindex]"),o=n[0],r=n[n.length-1];k.call(this,this.elements.container,"keydown",(function(e){if("Tab"===e.key&&9===e.keyCode){var t=document.activeElement;t!==r||e.shiftKey?t===o&&e.shiftKey&&(r.focus(),e.preventDefault()):(o.focus(),e.preventDefault())}}),t,!1)}}function X(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];S(e)&&(e.focus(),t&&G(e,this.config.classNames.tabFocus))}function K(e){return i.a.bind(I.a)(e)}var J,$,Z,Q=(J=document.createElement("span"),$={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},Z=Object.keys($).find((function(e){return void 0!==J.style[e]})),!!b(Z)&&$[Z]);function ee(e){setTimeout((function(){try{U(e,!0),e.offsetHeight,U(e,!1)}catch(e){}}),0)}var te,ne="Netscape"===navigator.appName&&navigator.appVersion.indexOf("Edge")>-1,oe=!!document.documentMode,re="WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),ae=(/(iPhone|iPod)/gi.test(navigator.platform),/(iPad|iPhone|iPod)/gi.test(navigator.platform)),ie=function(){var e=/(MSIE|(?!Gecko.+)Firefox|(?!AppleWebKit.+Chrome.+)Safari|(?!AppleWebKit.+)Chrome|AppleWebKit(?!.+Chrome|.+Safari)|Gecko(?!.+Firefox))(?: |\/)([\d\.apre]+)/.exec(navigator.userAgent);return{name:e[1].toLowerCase(),version:e[2]}},se={rangeInput:(te=document.createElement("input"),te.type="range","range"===te.type),touch:"ontouchstart"in document.documentElement,transitions:!1!==Q,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches,webgl:function(){var e={DETECTED:!1};if(!e.DETECTED){var t=document.createElement("canvas");if(t&&t.getContext)for(var n=["webgl2","experimental-webgl2","webgl","experimental-webgl"],o=0,r=n.length;o<r;++o){var a=n[o],i=t.getContext(a);if(i){e.WEBGL_CONTEXT=a,e.WEBGL_VERSION=i.getParameter(i.VERSION),e.WEBGL_VENDOR=i.getParameter(i.VENDOR),e.WEBGL_SL_VERSION=i.getParameter(i.SHADING_LANGUAGE_VERSION),e.MAX_TEXTURE_SIZE=i.getParameter(i.MAX_TEXTURE_SIZE);var s=i.getExtension("WEBGL_debug_renderer_info");s&&(e.WEBGL_VENDOR=i.getParameter(s.UNMASKED_VENDOR_WEBGL),e.WEBGL_RENDERER=i.getParameter(s.UNMASKED_RENDERER_WEBGL)),e.DETECTED=!0;break}}}return e}(),wasm:"undefined"!=typeof WebAssembly&&v(WebAssembly),audioContext:"undefined"!=typeof AudioContext};function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e,t){return t.split(".").reduce((function(e,t){return e&&e[t]}),e)}function ue(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(!n.length)return e;var r=n.shift();return v(r)?(Object.keys(r).forEach((function(t){v(r[t])?(Object.keys(e).includes(t)||Object.assign(e,ce({},t,{})),ue(e[t],r[t])):Object.assign(e,ce({},t,r[t]))})),ue.apply(void 0,[e].concat(n))):e}function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1"),"g"),n.toString())}function fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],o=!0,r=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(o=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(E(e)||E(t))return"";var n=le(t.i18n,e);if(E(n))return"";var o={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(o).forEach((function(e){var t=fe(e,2),o=t[0],r=t[1];n=de(n,o,r)})),n};function he(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var me,ve=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.enabled=!0,this.key=n}var t,n,o;return t=e,o=[{key:"supported",get:function(){try{return"localStorage"in window&&(window.localStorage.getItem("___test")||window.localStorage.setItem("___test","___test"),!0)}catch(e){return!1}}}],(n=[{key:"get",value:function(t){if(!e.supported||!this.enabled)return null;var n=window.localStorage.getItem(this.key);if(E(n))return null;var o=JSON.parse(n);return b(t)&&t.length?o[t]:o}},{key:"set",value:function(t){if(e.supported&&this.enabled&&v(t)){var n=this.get();E(n)&&(n={}),ue(n,t),window.localStorage.setItem(this.key,JSON.stringify(n))}}}])&&he(t.prototype,n),o&&he(t,o),e}(),ge=n(108),be=n.n(ge),ye=n(6),we=n(159),xe=n.n(we),_e={"2xScaleHQ.glslp":'shaders = 1\n\nshader0 = "2xScaleHQ.glsl"\nfilter_linear0 = false\nscale_type_0 = source\n',"4xScaleHQ.glslp":'shaders = 1\n\nshader0 = "4xScaleHQ.glsl"\nfilter_linear0 = false\nscale_type_0 = source\n',"crt-easymode.glslp":"shaders = 1\n\nshader0 = crt-easymode.glsl\nfilter_linear0 = false\nscale_type_0 = source\n","crt-aperture.glslp":"shaders = 1\n\nshader0 = crt-aperture.glsl\nfilter_linear0 = false\n","crt-geom.glslp":"shaders = 1\n\nshader0 = crt-geom.glsl\nfilter_linear0 = false\nscale_type_0 = source\n","2xScaleHQ.glsl":"/*\n2xGLSLHqFilter shader\n\nCopyright (C) 2005 guest(r) - guest.r@gmail.com\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n*/\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec4 t1;\nCOMPAT_VARYING vec4 t2;\nCOMPAT_VARYING vec4 t3;\nCOMPAT_VARYING vec4 t4;\n\nvec4 _oPosition1; \nuniform mat4 MVPMatrix;\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\n// compatibility #defines\n#define vTexCoord TEX0.xy\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\n\nvoid main()\n{\ngl_Position = MVPMatrix * VertexCoord;\nTEX0.xy = TexCoord.xy;\nfloat x = 0.5 * SourceSize.z;\nfloat y = 0.5 * SourceSize.w;\nvec2 dg1 = vec2( x, y);\nvec2 dg2 = vec2(-x, y);\nvec2 dx = vec2(x, 0.0);\nvec2 dy = vec2(0.0, y);\nt1 = vec4(vTexCoord - dg1, vTexCoord - dy);\nt2 = vec4(vTexCoord - dg2, vTexCoord + dx);\nt3 = vec4(vTexCoord + dg1, vTexCoord + dy);\nt4 = vec4(vTexCoord + dg2, vTexCoord - dx);\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec4 t1;\nCOMPAT_VARYING vec4 t2;\nCOMPAT_VARYING vec4 t3;\nCOMPAT_VARYING vec4 t4;\n\n// compatibility #defines\n#define Source Texture\n#define vTexCoord TEX0.xy\n\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\n\nfloat mx = 0.325;      // start smoothing wt.\nfloat k = -0.250;      // wt. decrease factor\nfloat max_w = 0.25;    // max filter weight\nfloat min_w =-0.05;    // min filter weight\nfloat lum_add = 0.25;  // affects smoothing\nvec3 dt = vec3(1.0);\n\nvoid main()\n{\nvec3 c00 = COMPAT_TEXTURE(Source, t1.xy).xyz; \nvec3 c10 = COMPAT_TEXTURE(Source, t1.zw).xyz; \nvec3 c20 = COMPAT_TEXTURE(Source, t2.xy).xyz; \nvec3 c01 = COMPAT_TEXTURE(Source, t4.zw).xyz; \nvec3 c11 = COMPAT_TEXTURE(Source, vTexCoord).xyz; \nvec3 c21 = COMPAT_TEXTURE(Source, t2.zw).xyz; \nvec3 c02 = COMPAT_TEXTURE(Source, t4.xy).xyz; \nvec3 c12 = COMPAT_TEXTURE(Source, t3.zw).xyz; \nvec3 c22 = COMPAT_TEXTURE(Source, t3.xy).xyz; \n\nfloat md1 = dot(abs(c00 - c22), dt);\nfloat md2 = dot(abs(c02 - c20), dt);\n\nfloat w1 = dot(abs(c22 - c11), dt) * md2;\nfloat w2 = dot(abs(c02 - c11), dt) * md1;\nfloat w3 = dot(abs(c00 - c11), dt) * md2;\nfloat w4 = dot(abs(c20 - c11), dt) * md1;\n\nfloat t1 = w1 + w3;\nfloat t2 = w2 + w4;\nfloat ww = max(t1, t2) + 0.0001;\n\nc11 = (w1 * c00 + w2 * c20 + w3 * c22 + w4 * c02 + ww * c11) / (t1 + t2 + ww);\n\nfloat lc1 = k / (0.12 * dot(c10 + c12 + c11, dt) + lum_add);\nfloat lc2 = k / (0.12 * dot(c01 + c21 + c11, dt) + lum_add);\n\nw1 = clamp(lc1 * dot(abs(c11 - c10), dt) + mx, min_w, max_w);\nw2 = clamp(lc2 * dot(abs(c11 - c21), dt) + mx, min_w, max_w);\nw3 = clamp(lc1 * dot(abs(c11 - c12), dt) + mx, min_w, max_w);\nw4 = clamp(lc2 * dot(abs(c11 - c01), dt) + mx, min_w, max_w);\nFragColor = vec4(w1 * c10 + w2 * c21 + w3 * c12 + w4 * c01 + (1.0 - w1 - w2 - w3 - w4) * c11, 1.0);\n} \n#endif\n","4xScaleHQ.glsl":"/*\n4xGLSLHqFilter shader\n\nCopyright (C) 2005 guest(r) - guest.r@gmail.com\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n*/\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec4 t1;\nCOMPAT_VARYING vec4 t2;\nCOMPAT_VARYING vec4 t3;\nCOMPAT_VARYING vec4 t4;\nCOMPAT_VARYING vec4 t5;\nCOMPAT_VARYING vec4 t6;\n\nvec4 _oPosition1; \nuniform mat4 MVPMatrix;\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\n// compatibility #defines\n#define vTexCoord TEX0.xy\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\n\nvoid main()\n{\ngl_Position = MVPMatrix * VertexCoord;\nTEX0.xy = TexCoord.xy;\nfloat x = 0.5 * SourceSize.z;\nfloat y = 0.5 * SourceSize.w;\nvec2 dg1 = vec2( x, y);\nvec2 dg2 = vec2(-x, y);\nvec2 sd1 = dg1 * 0.5;\nvec2 sd2 = dg2 * 0.5;\nvec2 ddx = vec2(x, 0.0);\nvec2 ddy = vec2(0.0, y);\nt1 = vec4(vTexCoord - sd1, vTexCoord - ddy);\nt2 = vec4(vTexCoord - sd2, vTexCoord + ddx);\nt3 = vec4(vTexCoord + sd1, vTexCoord + ddy);\nt4 = vec4(vTexCoord + sd2, vTexCoord - ddx);\nt5 = vec4(vTexCoord - dg1, vTexCoord - dg2);\nt6 = vec4(vTexCoord + dg1, vTexCoord + dg2);\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec4 t1;\nCOMPAT_VARYING vec4 t2;\nCOMPAT_VARYING vec4 t3;\nCOMPAT_VARYING vec4 t4;\nCOMPAT_VARYING vec4 t5;\nCOMPAT_VARYING vec4 t6;\n\n// compatibility #defines\n#define Source Texture\n#define vTexCoord TEX0.xy\n\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\n\nfloat mx = 1.0;      // start smoothing wt.\nfloat k = -1.10;      // wt. decrease factor\nfloat max_w = 0.75;    // max filter weight\nfloat min_w = 0.03;    // min filter weight\nfloat lum_add = 0.33;  // affects smoothing\nvec3 dt = vec3(1.0);\n\nvoid main()\n{\nvec3 c  = COMPAT_TEXTURE(Source, vTexCoord).xyz;\nvec3 i1 = COMPAT_TEXTURE(Source, t1.xy).xyz; \nvec3 i2 = COMPAT_TEXTURE(Source, t2.xy).xyz; \nvec3 i3 = COMPAT_TEXTURE(Source, t3.xy).xyz; \nvec3 i4 = COMPAT_TEXTURE(Source, t4.xy).xyz; \nvec3 o1 = COMPAT_TEXTURE(Source, t5.xy).xyz; \nvec3 o3 = COMPAT_TEXTURE(Source, t6.xy).xyz; \nvec3 o2 = COMPAT_TEXTURE(Source, t5.zw).xyz;\nvec3 o4 = COMPAT_TEXTURE(Source, t6.zw).xyz;\nvec3 s1 = COMPAT_TEXTURE(Source, t1.zw).xyz; \nvec3 s2 = COMPAT_TEXTURE(Source, t2.zw).xyz; \nvec3 s3 = COMPAT_TEXTURE(Source, t3.zw).xyz; \nvec3 s4 = COMPAT_TEXTURE(Source, t4.zw).xyz; \n\nfloat ko1=dot(abs(o1-c),dt);\nfloat ko2=dot(abs(o2-c),dt);\nfloat ko3=dot(abs(o3-c),dt);\nfloat ko4=dot(abs(o4-c),dt);\n\nfloat k1=min(dot(abs(i1-i3),dt),max(ko1,ko3));\nfloat k2=min(dot(abs(i2-i4),dt),max(ko2,ko4));\n\nfloat w1 = k2; if(ko3<ko1) w1*=ko3/ko1;\nfloat w2 = k1; if(ko4<ko2) w2*=ko4/ko2;\nfloat w3 = k2; if(ko1<ko3) w3*=ko1/ko3;\nfloat w4 = k1; if(ko2<ko4) w4*=ko2/ko4;\n\nc=(w1*o1+w2*o2+w3*o3+w4*o4+0.001*c)/(w1+w2+w3+w4+0.001);\nw1 = k*dot(abs(i1-c)+abs(i3-c),dt)/(0.125*dot(i1+i3,dt)+lum_add);\nw2 = k*dot(abs(i2-c)+abs(i4-c),dt)/(0.125*dot(i2+i4,dt)+lum_add);\nw3 = k*dot(abs(s1-c)+abs(s3-c),dt)/(0.125*dot(s1+s3,dt)+lum_add);\nw4 = k*dot(abs(s2-c)+abs(s4-c),dt)/(0.125*dot(s2+s4,dt)+lum_add);\n\nw1 = clamp(w1+mx,min_w,max_w); \nw2 = clamp(w2+mx,min_w,max_w);\nw3 = clamp(w3+mx,min_w,max_w); \nw4 = clamp(w4+mx,min_w,max_w);\n\nFragColor = vec4((w1*(i1+i3)+w2*(i2+i4)+w3*(s1+s3)+w4*(s2+s4)+c)/(2.0*(w1+w2+w3+w4)+1.0), 1.0);\n} \n#endif\n","crt-easymode.glsl":"#if defined(VERTEX)\n\n    #if __VERSION__ >= 130\n    #define COMPAT_VARYING out\n    #define COMPAT_ATTRIBUTE in\n    #define COMPAT_TEXTURE texture\n    #else\n    #define COMPAT_VARYING varying\n    #define COMPAT_ATTRIBUTE attribute\n    #define COMPAT_TEXTURE texture2D\n    #endif\n    \n    #ifdef GL_ES\n    #define COMPAT_PRECISION mediump\n    #else\n    #define COMPAT_PRECISION\n    #endif\n    COMPAT_VARYING     float _frame_rotation;\n    struct input_dummy {\n    vec2 _video_size;\n    vec2 _texture_size;\n    vec2 _output_dummy_size;\n    float _frame_count;\n    float _frame_direction;\n    float _frame_rotation;\n    };\n    vec4 _oPosition1;\n    vec4 _r0005;\n    COMPAT_ATTRIBUTE vec4 VertexCoord;\n    COMPAT_ATTRIBUTE vec4 TexCoord;\n    COMPAT_VARYING vec4 TEX0;\n    \n    uniform mat4 MVPMatrix;\n    uniform int FrameDirection;\n    uniform int FrameCount;\n    uniform COMPAT_PRECISION vec2 OutputSize;\n    uniform COMPAT_PRECISION vec2 TextureSize;\n    uniform COMPAT_PRECISION vec2 InputSize;\n    void main()\n    {\n    vec2 _oTex;\n    _r0005 = VertexCoord.x*MVPMatrix[0];\n    _r0005 = _r0005 + VertexCoord.y*MVPMatrix[1];\n    _r0005 = _r0005 + VertexCoord.z*MVPMatrix[2];\n    _r0005 = _r0005 + VertexCoord.w*MVPMatrix[3];\n    _oPosition1 = _r0005;\n    _oTex = TexCoord.xy;\n    gl_Position = _r0005;\n    TEX0.xy = TexCoord.xy;\n    }\n    #elif defined(FRAGMENT)\n    \n    #if __VERSION__ >= 130\n    #define COMPAT_VARYING in\n    #define COMPAT_TEXTURE texture\n    out vec4 FragColor;\n    #else\n    #define COMPAT_VARYING varying\n    #define FragColor gl_FragColor\n    #define COMPAT_TEXTURE texture2D\n    #endif\n    \n    #ifdef GL_ES\n    #ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n    #else\n    precision mediump float;\n    #endif\n    #define COMPAT_PRECISION mediump\n    #else\n    #define COMPAT_PRECISION\n    #endif\n    COMPAT_VARYING     float _frame_rotation;\n    struct input_dummy {\n    vec2 _video_size;\n    vec2 _texture_size;\n    vec2 _output_dummy_size;\n    float _frame_count;\n    float _frame_direction;\n    float _frame_rotation;\n    };\n    vec4 _ret_0;\n    float _TMP30;\n    float _TMP29;\n    float _TMP28;\n    float _TMP13;\n    float _TMP32;\n    float _TMP11;\n    float _TMP10;\n    float _TMP31;\n    float _TMP9;\n    float _TMP8;\n    float _TMP15;\n    float _TMP14;\n    float _TMP33;\n    vec4 _TMP34;\n    vec4 _TMP27;\n    vec4 _TMP25;\n    vec4 _TMP23;\n    vec4 _TMP21;\n    vec4 _TMP26;\n    vec4 _TMP24;\n    vec4 _TMP22;\n    vec4 _TMP20;\n    float _TMP4;\n    vec4 _TMP3;\n    vec4 _TMP2;\n    float _TMP19;\n    float _TMP18;\n    float _TMP17;\n    float _TMP16;\n    vec4 _TMP1;\n    vec2 _TMP0;\n    uniform sampler2D Texture;\n    input_dummy _IN1;\n    float _TMP43;\n    float _x_step0044;\n    float _curve0044;\n    float _a0048;\n    float _val0052;\n    float _a0052;\n    vec4 _TMP57;\n    vec4 _x0072;\n    vec2 _c0086;\n    vec4 _x0088;\n    vec4 _x0094;\n    vec2 _c0098;\n    vec4 _x0100;\n    vec2 _c0104;\n    vec4 _x0106;\n    vec4 _sample_min0110;\n    vec4 _sample_max0110;\n    vec4 _r0112;\n    vec4 _TMP117;\n    vec2 _co0124;\n    vec2 _c0126;\n    vec4 _x0128;\n    vec4 _x0134;\n    vec2 _c0138;\n    vec4 _x0140;\n    vec2 _c0144;\n    vec4 _x0146;\n    vec4 _sample_min0150;\n    vec4 _sample_max0150;\n    vec4 _r0152;\n    vec4 _TMP157;\n    float _TMP163;\n    float _x_step0164;\n    float _curve0164;\n    float _a0168;\n    float _val0172;\n    float _a0172;\n    float _TMP183;\n    float _TMP189;\n    float _x0190;\n    float _a0196;\n    float _x0198;\n    vec2 _x0200;\n    float _x0208;\n    COMPAT_VARYING vec4 TEX0;\n    \n    uniform COMPAT_PRECISION vec2 OutputSize;\n    uniform COMPAT_PRECISION vec2 TextureSize;\n    uniform COMPAT_PRECISION vec2 InputSize;\n    void main()\n    {\n    vec2 _dx1;\n    vec2 _dy;\n    vec2 _pix_co;\n    vec2 _tex_co;\n    vec2 _dist;\n    vec3 _col2;\n    vec3 _col21;\n    vec4 _coeffs1;\n    float _luma;\n    float _bright;\n    float _scan_weight;\n    vec2 _mod_fac;\n    int _dot_no;\n    vec3 _mask_weight;\n    vec3 _TMP37;\n    _dx1 = vec2(1.00000000E+00/TextureSize.x, 0.00000000E+00);\n    _dy = vec2(0.00000000E+00, 1.00000000E+00/TextureSize.y);\n    _pix_co = TEX0.xy*TextureSize - vec2( 5.00000000E-01, 5.00000000E-01);\n    _TMP0 = floor(_pix_co);\n    _tex_co = (_TMP0 + vec2( 5.00000000E-01, 5.00000000E-01))/TextureSize;\n    _dist = fract(_pix_co);\n    _x_step0044 = float((_dist.x >= 5.00000000E-01));\n    _a0048 = 2.50000000E-01 - (_dist.x - _x_step0044)*(_dist.x - _x_step0044);\n    _TMP33 = inversesqrt(_a0048);\n    _TMP14 = 1.00000000E+00/_TMP33;\n    _a0052 = 5.00000000E-01 - _dist.x;\n    _val0052 = float((_a0052 > 0.00000000E+00));\n    _TMP15 = _val0052 - float((_a0052 < 0.00000000E+00));\n    _curve0044 = 5.00000000E-01 - _TMP14*_TMP15;\n    _TMP43 = _dist.x + 2.50000000E-01*(_curve0044 - _dist.x);\n    _coeffs1 = 3.14159274E+00*vec4(1.00000000E+00 + _TMP43, _TMP43, 1.00000000E+00 - _TMP43, 2.00000000E+00 - _TMP43);\n    _TMP1 = abs(_coeffs1);\n    _TMP57 = max(_TMP1, vec4( 9.99999975E-06, 9.99999975E-06, 9.99999975E-06, 9.99999975E-06));\n    _TMP16 = sin(_TMP57.x);\n    _TMP17 = sin(_TMP57.y);\n    _TMP18 = sin(_TMP57.z);\n    _TMP19 = sin(_TMP57.w);\n    _TMP2 = vec4(_TMP16, _TMP17, _TMP18, _TMP19);\n    _x0072 = _TMP57/2.00000000E+00;\n    _TMP16 = sin(_x0072.x);\n    _TMP17 = sin(_x0072.y);\n    _TMP18 = sin(_x0072.z);\n    _TMP19 = sin(_x0072.w);\n    _TMP3 = vec4(_TMP16, _TMP17, _TMP18, _TMP19);\n    _coeffs1 = ((2.00000000E+00*_TMP2)*_TMP3)/(_TMP57*_TMP57);\n    _TMP4 = dot(_coeffs1, vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n    _coeffs1 = _coeffs1/_TMP4;\n    _c0086 = _tex_co - _dx1;\n    _TMP20 = COMPAT_TEXTURE(Texture, _c0086);\n    _x0088 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP20 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n    _TMP21 = _TMP20*_x0088;\n    _TMP22 = COMPAT_TEXTURE(Texture, _tex_co);\n    _x0094 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP22 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n    _TMP23 = _TMP22*_x0094;\n    _c0098 = _tex_co + _dx1;\n    _TMP24 = COMPAT_TEXTURE(Texture, _c0098);\n    _x0100 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP24 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n    _TMP25 = _TMP24*_x0100;\n    _c0104 = _tex_co + 2.00000000E+00*_dx1;\n    _TMP26 = COMPAT_TEXTURE(Texture, _c0104);\n    _x0106 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP26 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n    _TMP27 = _TMP26*_x0106;\n    _r0112 = _coeffs1.x*_TMP21;\n    _r0112 = _r0112 + _coeffs1.y*_TMP23;\n    _r0112 = _r0112 + _coeffs1.z*_TMP25;\n    _r0112 = _r0112 + _coeffs1.w*_TMP27;\n    _sample_min0110 = min(_TMP23, _TMP25);\n    _sample_max0110 = max(_TMP23, _TMP25);\n    _TMP34 = min(_sample_max0110, _r0112);\n    _TMP117 = max(_sample_min0110, _TMP34);\n    _co0124 = _tex_co + _dy;\n    _c0126 = _co0124 - _dx1;\n    _TMP20 = COMPAT_TEXTURE(Texture, _c0126);\n    _x0128 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP20 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n    _TMP21 = _TMP20*_x0128;\n    _TMP22 = COMPAT_TEXTURE(Texture, _co0124);\n    _x0134 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP22 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n    _TMP23 = _TMP22*_x0134;\n    _c0138 = _co0124 + _dx1;\n    _TMP24 = COMPAT_TEXTURE(Texture, _c0138);\n    _x0140 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP24 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n    _TMP25 = _TMP24*_x0140;\n    _c0144 = _co0124 + 2.00000000E+00*_dx1;\n    _TMP26 = COMPAT_TEXTURE(Texture, _c0144);\n    _x0146 = vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00) + (_TMP26 - vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));\n    _TMP27 = _TMP26*_x0146;\n    _r0152 = _coeffs1.x*_TMP21;\n    _r0152 = _r0152 + _coeffs1.y*_TMP23;\n    _r0152 = _r0152 + _coeffs1.z*_TMP25;\n    _r0152 = _r0152 + _coeffs1.w*_TMP27;\n    _sample_min0150 = min(_TMP23, _TMP25);\n    _sample_max0150 = max(_TMP23, _TMP25);\n    _TMP34 = min(_sample_max0150, _r0152);\n    _TMP157 = max(_sample_min0150, _TMP34);\n    _x_step0164 = float((_dist.y >= 5.00000000E-01));\n    _a0168 = 2.50000000E-01 - (_dist.y - _x_step0164)*(_dist.y - _x_step0164);\n    _TMP33 = inversesqrt(_a0168);\n    _TMP14 = 1.00000000E+00/_TMP33;\n    _a0172 = 5.00000000E-01 - _dist.y;\n    _val0172 = float((_a0172 > 0.00000000E+00));\n    _TMP15 = _val0172 - float((_a0172 < 0.00000000E+00));\n    _curve0164 = 5.00000000E-01 - _TMP14*_TMP15;\n    _TMP163 = _dist.y + (_curve0164 - _dist.y);\n    _col2 = _TMP117.xyz + _TMP163*(_TMP157.xyz - _TMP117.xyz);\n    _luma = dot(vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02), _col2);\n    _TMP8 = max(_col2.y, _col2.z);\n    _TMP9 = max(_col2.x, _TMP8);\n    _bright = (_TMP9 + _luma)/2.00000000E+00;\n    _TMP31 = min(6.49999976E-01, _bright);\n    _TMP183 = max(3.49999994E-01, _TMP31);\n    _x0190 = _bright*1.50000000E+00;\n    _TMP31 = min(1.50000000E+00, _x0190);\n    _TMP189 = max(1.50000000E+00, _TMP31);\n    _a0196 = TEX0.y*2.00000000E+00*3.14159274E+00*TextureSize.y;\n    _TMP10 = cos(_a0196);\n    _x0198 = _TMP10*5.00000000E-01 + 5.00000000E-01;\n    _TMP11 = pow(_x0198, _TMP189);\n    _scan_weight = 1.00000000E+00 - _TMP11;\n    _x0200 = (TEX0.xy*OutputSize*TextureSize)/InputSize;\n    _mod_fac = floor(_x0200);\n    _x0208 = _mod_fac.x/3.00000000E+00;\n    _TMP32 = floor(_x0208);\n    _TMP13 = _mod_fac.x - 3.00000000E+00*_TMP32;\n    _dot_no = int(_TMP13);\n    if (_dot_no == 0) {\n    _mask_weight = vec3( 1.00000000E+00, 6.99999988E-01, 6.99999988E-01);\n    } else {\n    if (_dot_no == 1) {\n    _mask_weight = vec3( 6.99999988E-01, 1.00000000E+00, 6.99999988E-01);\n    } else {\n    _mask_weight = vec3( 6.99999988E-01, 6.99999988E-01, 1.00000000E+00);\n    }\n    }\n    if (InputSize.y >= 4.00000000E+02) {\n    _scan_weight = 1.00000000E+00;\n    }\n    _col21 = _col2.xyz;\n    _col2 = _col2*vec3(_scan_weight, _scan_weight, _scan_weight);\n    _col2 = _col2 + _TMP183*(_col21 - _col2);\n    _col2 = _col2*_mask_weight;\n    _TMP28 = pow(_col2.x, 5.55555582E-01);\n    _TMP29 = pow(_col2.y, 5.55555582E-01);\n    _TMP30 = pow(_col2.z, 5.55555582E-01);\n    _col2 = vec3(_TMP28, _TMP29, _TMP30);\n    _TMP37 = _col2*1.20000005E+00;\n    _ret_0 = vec4(_TMP37.x, _TMP37.y, _TMP37.z, 1.00000000E+00);\n    FragColor = _ret_0;\n    return;\n    }\n    #endif\n","crt-aperture.glsl":'\n/*\nCRT Shader by EasyMode\nLicense: GPL\n*/\n/*\n#pragma parameter SHARPNESS_IMAGE "Sharpness Image" 1.0 1.0 5.0 1.0\n#pragma parameter SHARPNESS_EDGES "Sharpness Edges" 3.0 1.0 5.0 1.0\n#pragma parameter GLOW_WIDTH "Glow Width" 0.5 0.05 0.65 0.05\n#pragma parameter GLOW_HEIGHT "Glow Height" 0.5 0.05 0.65 0.05\n#pragma parameter GLOW_HALATION "Glow Halation" 0.1 0.0 1.0 0.01\n#pragma parameter GLOW_DIFFUSION "Glow Diffusion" 0.05 0.0 1.0 0.01\n#pragma parameter MASK_COLORS "Mask Colors" 2.0 2.0 3.0 1.0\n#pragma parameter MASK_STRENGTH "Mask Strength" 0.3 0.0 1.0 0.05\n#pragma parameter MASK_SIZE "Mask Size" 1.0 1.0 9.0 1.0\n#pragma parameter SCANLINE_SIZE_MIN "Scanline Size Min." 0.5 0.5 1.5 0.05\n#pragma parameter SCANLINE_SIZE_MAX "Scanline Size Max." 1.5 0.5 1.5 0.05\n#pragma parameter GAMMA_INPUT "Gamma Input" 2.4 1.0 5.0 0.1\n#pragma parameter GAMMA_OUTPUT "Gamma Output" 2.4 1.0 5.0 0.1\n#pragma parameter BRIGHTNESS "Brightness" 1.5 0.0 2.0 0.05\n* */\n\n#define Coord TEX0\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define OUT out\n#define IN  in\n#define tex2D texture\n#else\n#define OUT varying \n#define IN attribute \n#define tex2D texture2D\n#endif\n\n#ifdef GL_ES\n#define PRECISION mediump\n#else\n#define PRECISION\n#endif\n\nIN  vec4 VertexCoord;\nIN  vec4 Color;\nIN  vec2 TexCoord;\nOUT vec4 color;\nOUT vec2 Coord;\n\nuniform mat4 MVPMatrix;\nuniform PRECISION int FrameDirection;\nuniform PRECISION int FrameCount;\nuniform PRECISION vec2 OutputSize;\nuniform PRECISION vec2 TextureSize;\nuniform PRECISION vec2 InputSize;\n\nvoid main()\n{\ngl_Position = MVPMatrix * VertexCoord;\ncolor = Color;\nCoord = TexCoord;\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define IN in\n#define tex2D texture\nout vec4 FragColor;\n#else\n#define IN varying\n#define FragColor gl_FragColor\n#define tex2D texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define PRECISION mediump\n#else\n#define PRECISION\n#endif\n\nuniform PRECISION int FrameDirection;\nuniform PRECISION int FrameCount;\nuniform PRECISION vec2 OutputSize;\nuniform PRECISION vec2 TextureSize;\nuniform PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nIN vec2 Coord;\n\n#ifdef PARAMETER_UNIFORM\nuniform PRECISION float SHARPNESS_IMAGE;\nuniform PRECISION float SHARPNESS_EDGES;\nuniform PRECISION float GLOW_WIDTH;\nuniform PRECISION float GLOW_HEIGHT;\nuniform PRECISION float GLOW_HALATION;\nuniform PRECISION float GLOW_DIFFUSION;\nuniform PRECISION float MASK_COLORS;\nuniform PRECISION float MASK_STRENGTH;\nuniform PRECISION float MASK_SIZE;\nuniform PRECISION float SCANLINE_SIZE_MIN;\nuniform PRECISION float SCANLINE_SIZE_MAX;\nuniform PRECISION float GAMMA_INPUT;\nuniform PRECISION float GAMMA_OUTPUT;\nuniform PRECISION float BRIGHTNESS;\n#else\n#define SHARPNESS_IMAGE 1.0\n#define SHARPNESS_EDGES 3.0\n#define GLOW_WIDTH 0.5\n#define GLOW_HEIGHT 0.5\n#define GLOW_HALATION 0.1\n#define GLOW_DIFFUSION 0.05\n#define MASK_COLORS 2.0\n#define MASK_STRENGTH 0.3\n#define MASK_SIZE 1.0\n#define SCANLINE_SIZE_MIN 0.5\n#define SCANLINE_SIZE_MAX 1.5\n#define GAMMA_INPUT 2.4\n#define GAMMA_OUTPUT 2.4\n#define BRIGHTNESS 1.5\n#endif\n\n#define FIX(c) max(abs(c), 1e-5)\n#define PI 3.141592653589\n#define saturate(c) clamp(c, 0.0, 1.0)\n#define TEX2D(c) pow(tex2D(tex, c).rgb, vec3(GAMMA_INPUT))\n\nmat3 get_color_matrix(sampler2D tex, vec2 co, vec2 dx)\n{\nreturn mat3(TEX2D(co - dx), TEX2D(co), TEX2D(co + dx));\n}\n\nvec3 blur(mat3 m, float dist, float rad)\n{\nvec3 x = vec3(dist - 1.0, dist, dist + 1.0) / rad;\nvec3 w = exp2(x * x * -1.0);\n\nreturn (m[0] * w.x + m[1] * w.y + m[2] * w.z) / (w.x + w.y + w.z);\n}\n\nvec3 filter_gaussian(sampler2D tex, vec2 co, vec2 tex_size)\n{\nvec2 dx = vec2(1.0 / tex_size.x, 0.0);\nvec2 dy = vec2(0.0, 1.0 / tex_size.y);\nvec2 pix_co = co * tex_size;\nvec2 tex_co = (floor(pix_co) + 0.5) / tex_size;\nvec2 dist = (fract(pix_co) - 0.5) * -1.0;\n\nmat3 line0 = get_color_matrix(tex, tex_co - dy, dx);\nmat3 line1 = get_color_matrix(tex, tex_co, dx);\nmat3 line2 = get_color_matrix(tex, tex_co + dy, dx);\nmat3 column = mat3(blur(line0, dist.x, GLOW_WIDTH),\n                       blur(line1, dist.x, GLOW_WIDTH),\n                       blur(line2, dist.x, GLOW_WIDTH));\n\nreturn blur(column, dist.y, GLOW_HEIGHT);\n}\n\nvec3 filter_lanczos(sampler2D tex, vec2 co, vec2 tex_size, float sharp)\n{\ntex_size.x *= sharp;\n\nvec2 dx = vec2(1.0 / tex_size.x, 0.0);\nvec2 pix_co = co * tex_size - vec2(0.5, 0.0);\nvec2 tex_co = (floor(pix_co) + vec2(0.5, 0.0)) / tex_size;\nvec2 dist = fract(pix_co);\nvec4 coef = PI * vec4(dist.x + 1.0, dist.x, dist.x - 1.0, dist.x - 2.0);\n\ncoef = FIX(coef);\ncoef = 2.0 * sin(coef) * sin(coef / 2.0) / (coef * coef);\ncoef /= dot(coef, vec4(1.0));\n\nvec4 col1 = vec4(TEX2D(tex_co), 1.0);\nvec4 col2 = vec4(TEX2D(tex_co + dx), 1.0);\n\nreturn (mat4(col1, col1, col2, col2) * coef).rgb;\n}\n\nvec3 get_scanline_weight(float x, vec3 col)\n{\nvec3 beam = mix(vec3(SCANLINE_SIZE_MIN), vec3(SCANLINE_SIZE_MAX), col);\nvec3 x_mul = 2.0 / beam;\nvec3 x_offset = x_mul * 0.5;\n\nreturn smoothstep(0.0, 1.0, 1.0 - abs(x * x_mul - x_offset)) * x_offset;\n}\n\nvec3 get_mask_weight(float x)\n{\nfloat i = mod(floor(x * OutputSize.x * TextureSize.x / (InputSize.x * MASK_SIZE)), MASK_COLORS);\n\nif (i == 0.0) return mix(vec3(1.0, 0.0, 1.0), vec3(1.0, 0.0, 0.0), MASK_COLORS - 2.0);\nelse if (i == 1.0) return vec3(0.0, 1.0, 0.0);\nelse return vec3(0.0, 0.0, 1.0);\n}\n\nvoid main()\n{\nvec3 col_glow = filter_gaussian(Texture, Coord, TextureSize);\nvec3 col_soft = filter_lanczos(Texture, Coord, TextureSize, SHARPNESS_IMAGE);\nvec3 col_sharp = filter_lanczos(Texture, Coord, TextureSize, SHARPNESS_EDGES);\nvec3 col = sqrt(col_sharp * col_soft);\n\ncol *= get_scanline_weight(fract(Coord.y * TextureSize.y), col_soft);\ncol_glow = saturate(col_glow - col);\ncol += col_glow * col_glow * GLOW_HALATION;\ncol = mix(col, col * get_mask_weight(Coord.x) * MASK_COLORS, MASK_STRENGTH);\ncol += col_glow * GLOW_DIFFUSION;\ncol = pow(col * BRIGHTNESS, vec3(1.0 / GAMMA_OUTPUT));\n\nFragColor = vec4(col, 1.0);\n}\n\n#endif\n',"crt-geom.glsl":'\n/*\nCRT-interlaced\n\nCopyright (C) 2010-2012 cgwg, Themaister and DOLLS\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2 of the License, or (at your option)\nany later version.\n\n(cgwg gave their consent to have the original version of this shader\ndistributed under the GPL in this message:\n\nhttp://board.byuu.org/viewtopic.php?p=26075#p26075\n\n"Feel free to distribute my shaders under the GPL. After all, the\nbarrel distortion code was taken from the Curvature shader, which is\nunder the GPL."\n)\nThis shader variant is pre-configured with screen curvature\n*/\n/*\n#pragma parameter CRTgamma "CRTGeom Target Gamma" 2.4 0.1 5.0 0.1\n#pragma parameter monitorgamma "CRTGeom Monitor Gamma" 2.2 0.1 5.0 0.1\n#pragma parameter d "CRTGeom Distance" 1.6 0.1 3.0 0.1\n#pragma parameter CURVATURE "CRTGeom Curvature Toggle" 1.0 0.0 1.0 1.0\n#pragma parameter R "CRTGeom Curvature Radius" 2.0 0.1 10.0 0.1\n#pragma parameter cornersize "CRTGeom Corner Size" 0.03 0.001 1.0 0.005\n#pragma parameter cornersmooth "CRTGeom Corner Smoothness" 1000.0 80.0 2000.0 100.0\n#pragma parameter x_tilt "CRTGeom Horizontal Tilt" 0.0 -0.5 0.5 0.05\n#pragma parameter y_tilt "CRTGeom Vertical Tilt" 0.0 -0.5 0.5 0.05\n#pragma parameter overscan_x "CRTGeom Horiz. Overscan %" 100.0 -125.0 125.0 1.0\n#pragma parameter overscan_y "CRTGeom Vert. Overscan %" 100.0 -125.0 125.0 1.0\n#pragma parameter DOTMASK "CRTGeom Dot Mask Toggle" 0.3 0.0 0.3 0.3\n#pragma parameter SHARPER "CRTGeom Sharpness" 1.0 1.0 3.0 1.0\n#pragma parameter scanline_weight "CRTGeom Scanline Weight" 0.3 0.1 0.5 0.05\n*/\n\n#ifndef PARAMETER_UNIFORM\n#define CRTgamma 2.4\n#define monitorgamma 2.2\n#define d 1.6\n#define CURVATURE 1.0\n#define R 2.0\n#define cornersize 0.03\n#define cornersmooth 1000.0\n#define x_tilt 0.0\n#define y_tilt 0.0\n#define overscan_x 100.0\n#define overscan_y 100.0\n#define DOTMASK 0.3\n#define SHARPER 1.0\n#define scanline_weight 0.3\n#endif\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\n\nvec4 _oPosition1; \nuniform mat4 MVPMatrix;\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\nCOMPAT_VARYING vec2 overscan;\nCOMPAT_VARYING vec2 aspect;\nCOMPAT_VARYING vec3 stretch;\nCOMPAT_VARYING vec2 sinangle;\nCOMPAT_VARYING vec2 cosangle;\nCOMPAT_VARYING vec2 one;\nCOMPAT_VARYING float mod_factor;\nCOMPAT_VARYING vec2 ilfac;\n\n#ifdef PARAMETER_UNIFORM\nuniform COMPAT_PRECISION float CRTgamma;\nuniform COMPAT_PRECISION float monitorgamma;\nuniform COMPAT_PRECISION float d;\nuniform COMPAT_PRECISION float CURVATURE;\nuniform COMPAT_PRECISION float R;\nuniform COMPAT_PRECISION float cornersize;\nuniform COMPAT_PRECISION float cornersmooth;\nuniform COMPAT_PRECISION float x_tilt;\nuniform COMPAT_PRECISION float y_tilt;\nuniform COMPAT_PRECISION float overscan_x;\nuniform COMPAT_PRECISION float overscan_y;\nuniform COMPAT_PRECISION float DOTMASK;\nuniform COMPAT_PRECISION float SHARPER;\nuniform COMPAT_PRECISION float scanline_weight;\n#endif\n\n#define FIX(c) max(abs(c), 1e-5);\n\nfloat intersect(vec2 xy)\n{\nfloat A = dot(xy,xy)+d*d;\nfloat B = 2.0*(R*(dot(xy,sinangle)-d*cosangle.x*cosangle.y)-d*d);\nfloat C = d*d + 2.0*R*d*cosangle.x*cosangle.y;\nreturn (-B-sqrt(B*B-4.0*A*C))/(2.0*A);\n}\n\nvec2 bkwtrans(vec2 xy)\n{\nfloat c = intersect(xy);\nvec2 point = vec2(c)*xy;\npoint -= vec2(-R)*sinangle;\npoint /= vec2(R);\nvec2 tang = sinangle/cosangle;\nvec2 poc = point/cosangle;\nfloat A = dot(tang,tang)+1.0;\nfloat B = -2.0*dot(poc,tang);\nfloat C = dot(poc,poc)-1.0;\nfloat a = (-B+sqrt(B*B-4.0*A*C))/(2.0*A);\nvec2 uv = (point-a*sinangle)/cosangle;\nfloat r = R*acos(a);\nreturn uv*r/sin(r/R);\n}\n\nvec2 fwtrans(vec2 uv)\n{\nfloat r = FIX(sqrt(dot(uv,uv)));\nuv *= sin(r/R)/r;\nfloat x = 1.0-cos(r/R);\nfloat D = d/R + x*cosangle.x*cosangle.y+dot(uv,sinangle);\nreturn d*(uv*cosangle-x*sinangle)/D;\n}\n\nvec3 maxscale()\n{\nvec2 c = bkwtrans(-R * sinangle / (1.0 + R/d*cosangle.x*cosangle.y));\nvec2 a = vec2(0.5,0.5)*aspect;\nvec2 lo = vec2(fwtrans(vec2(-a.x,c.y)).x, fwtrans(vec2(c.x,-a.y)).y)/aspect;\nvec2 hi = vec2(fwtrans(vec2(+a.x,c.y)).x, fwtrans(vec2(c.x,+a.y)).y)/aspect;\nreturn vec3((hi+lo)*aspect*0.5,max(hi.x-lo.x,hi.y-lo.y));\n}\n\nvoid main()\n{\n// START of parameters\n\n// gamma of simulated CRT\n//\tCRTgamma = 1.8;\n// gamma of display monitor (typically 2.2 is correct)\n//\tmonitorgamma = 2.2;\n// overscan (e.g. 1.02 for 2% overscan)\noverscan = vec2(1.00,1.00);\n// aspect ratio\naspect = vec2(1.0, 0.75);\n// lengths are measured in units of (approximately) the width\n// of the monitor simulated distance from viewer to monitor\n//\td = 2.0;\n// radius of curvature\n//\tR = 1.5;\n// tilt angle in radians\n// (behavior might be a bit wrong if both components are\n// nonzero)\nconst vec2 angle = vec2(0.0,0.0);\n// size of curved corners\n//\tcornersize = 0.03;\n// border smoothness parameter\n// decrease if borders are too aliased\n//\tcornersmooth = 1000.0;\n\n// END of parameters\n\nvec4 _oColor;\nvec2 _otexCoord;\ngl_Position = VertexCoord.x * MVPMatrix[0] + VertexCoord.y * MVPMatrix[1] + VertexCoord.z * MVPMatrix[2] + VertexCoord.w * MVPMatrix[3];\n_oPosition1 = gl_Position;\n_oColor = COLOR;\n_otexCoord = TexCoord.xy;\nCOL0 = COLOR;\nTEX0.xy = TexCoord.xy;\n\n// Precalculate a bunch of useful values we\'ll need in the fragment\n// shader.\nsinangle = sin(vec2(x_tilt, y_tilt)) + vec2(0.001);//sin(vec2(max(abs(x_tilt), 1e-3), max(abs(y_tilt), 1e-3)));\ncosangle = cos(vec2(x_tilt, y_tilt)) + vec2(0.001);//cos(vec2(max(abs(x_tilt), 1e-3), max(abs(y_tilt), 1e-3)));\nstretch = maxscale();\n\nilfac = vec2(1.0,clamp(floor(InputSize.y/200.0), 1.0, 2.0));\n\n// The size of one texel, in texture-coordinates.\nvec2 sharpTextureSize = vec2(SHARPER * TextureSize.x, TextureSize.y);\none = ilfac / sharpTextureSize;\n\n// Resulting X pixel-coordinate of the pixel we\'re drawing.\nmod_factor = TexCoord.x * TextureSize.x * OutputSize.x / InputSize.x;\n\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nstruct output_dummy {\nvec4 _color;\n};\n\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\n\n// Comment the next line to disable interpolation in linear gamma (and\n// gain speed).\n#define LINEAR_PROCESSING\n\n// Enable screen curvature.\n//        #define CURVATURE\n\n// Enable 3x oversampling of the beam profile\n#define OVERSAMPLE\n\n// Use the older, purely gaussian beam profile\n//#define USEGAUSSIAN\n\n// Macros.\n#define FIX(c) max(abs(c), 1e-5);\n#define PI 3.141592653589\n\n#ifdef LINEAR_PROCESSING\n#       define TEX2D(c) pow(COMPAT_TEXTURE(Texture, (c)), vec4(CRTgamma))\n#else\n#       define TEX2D(c) COMPAT_TEXTURE(Texture, (c))\n#endif\n\nCOMPAT_VARYING vec2 one;\nCOMPAT_VARYING float mod_factor;\nCOMPAT_VARYING vec2 ilfac;\nCOMPAT_VARYING vec2 overscan;\nCOMPAT_VARYING vec2 aspect;\nCOMPAT_VARYING vec3 stretch;\nCOMPAT_VARYING vec2 sinangle;\nCOMPAT_VARYING vec2 cosangle;\n\n#ifdef PARAMETER_UNIFORM\nuniform COMPAT_PRECISION float CRTgamma;\nuniform COMPAT_PRECISION float monitorgamma;\nuniform COMPAT_PRECISION float d;\nuniform COMPAT_PRECISION float CURVATURE;\nuniform COMPAT_PRECISION float R;\nuniform COMPAT_PRECISION float cornersize;\nuniform COMPAT_PRECISION float cornersmooth;\nuniform COMPAT_PRECISION float x_tilt;\nuniform COMPAT_PRECISION float y_tilt;\nuniform COMPAT_PRECISION float overscan_x;\nuniform COMPAT_PRECISION float overscan_y;\nuniform COMPAT_PRECISION float DOTMASK;\nuniform COMPAT_PRECISION float SHARPER;\nuniform COMPAT_PRECISION float scanline_weight;\n#endif\n\nfloat intersect(vec2 xy)\n{\nfloat A = dot(xy,xy)+d*d;\nfloat B = 2.0*(R*(dot(xy,sinangle)-d*cosangle.x*cosangle.y)-d*d);\nfloat C = d*d + 2.0*R*d*cosangle.x*cosangle.y;\nreturn (-B-sqrt(B*B-4.0*A*C))/(2.0*A);\n}\n\nvec2 bkwtrans(vec2 xy)\n{\nfloat c = intersect(xy);\nvec2 point = vec2(c)*xy;\npoint -= vec2(-R)*sinangle;\npoint /= vec2(R);\nvec2 tang = sinangle/cosangle;\nvec2 poc = point/cosangle;\nfloat A = dot(tang,tang)+1.0;\nfloat B = -2.0*dot(poc,tang);\nfloat C = dot(poc,poc)-1.0;\nfloat a = (-B+sqrt(B*B-4.0*A*C))/(2.0*A);\nvec2 uv = (point-a*sinangle)/cosangle;\nfloat r = FIX(R*acos(a));\nreturn uv*r/sin(r/R);\n}\n\nvec2 transform(vec2 coord)\n{\ncoord *= TextureSize / InputSize;\ncoord = (coord-vec2(0.5))*aspect*stretch.z+stretch.xy;\nreturn (bkwtrans(coord)/vec2(overscan_x / 100.0, overscan_y / 100.0)/aspect+vec2(0.5)) * InputSize / TextureSize;\n}\n\nfloat corner(vec2 coord)\n{\ncoord *= TextureSize / InputSize;\ncoord = (coord - vec2(0.5)) * vec2(overscan_x / 100.0, overscan_y / 100.0) + vec2(0.5);\ncoord = min(coord, vec2(1.0)-coord) * aspect;\nvec2 cdist = vec2(cornersize);\ncoord = (cdist - min(coord,cdist));\nfloat dist = sqrt(dot(coord,coord));\nreturn clamp((cdist.x-dist)*cornersmooth,0.0, 1.0);\n}\n\n// Calculate the influence of a scanline on the current pixel.\n//\n// \'distance\' is the distance in texture coordinates from the current\n// pixel to the scanline in question.\n// \'color\' is the colour of the scanline at the horizontal location of\n// the current pixel.\nvec4 scanlineWeights(float distance, vec4 color)\n{\n// "wid" controls the width of the scanline beam, for each RGB\n// channel The "weights" lines basically specify the formula\n// that gives you the profile of the beam, i.e. the intensity as\n// a function of distance from the vertical center of the\n// scanline. In this case, it is gaussian if width=2, and\n// becomes nongaussian for larger widths. Ideally this should\n// be normalized so that the integral across the beam is\n// independent of its width. That is, for a narrower beam\n// "weights" should have a higher peak at the center of the\n// scanline than for a wider beam.\n#ifdef USEGAUSSIAN\nvec4 wid = 0.3 + 0.1 * pow(color, vec4(3.0));\nvec4 weights = vec4(distance / wid);\nreturn 0.4 * exp(-weights * weights) / wid;\n#else\nvec4 wid = 2.0 + 2.0 * pow(color, vec4(4.0));\nvec4 weights = vec4(distance / scanline_weight);\nreturn 1.4 * exp(-pow(weights * inversesqrt(0.5 * wid), wid)) / (0.6 + 0.2 * wid);\n#endif\n}\n\nvoid main()\n{\n// Here\'s a helpful diagram to keep in mind while trying to\n// understand the code:\n//\n//  |      |      |      |      |\n// -------------------------------\n//  |      |      |      |      |\n//  |  01  |  11  |  21  |  31  | <-- current scanline\n//  |      | @    |      |      |\n// -------------------------------\n//  |      |      |      |      |\n//  |  02  |  12  |  22  |  32  | <-- next scanline\n//  |      |      |      |      |\n// -------------------------------\n//  |      |      |      |      |\n//\n// Each character-cell represents a pixel on the output\n// surface, "@" represents the current pixel (always somewhere\n// in the bottom half of the current scan-line, or the top-half\n// of the next scanline). The grid of lines represents the\n// edges of the texels of the underlying texture.\n\n// Texture coordinates of the texel containing the active pixel.\nvec2 xy = (CURVATURE > 0.5) ? transform(TEX0.xy) : TEX0.xy;\n\nfloat cval = corner(xy);\n\n// Of all the pixels that are mapped onto the texel we are\n// currently rendering, which pixel are we currently rendering?\nvec2 ilvec = vec2(0.0,ilfac.y > 1.5 ? mod(float(FrameCount),2.0) : 0.0);\nvec2 ratio_scale = (xy * TextureSize - vec2(0.5) + ilvec)/ilfac;\n#ifdef OVERSAMPLE\nfloat filter_ = InputSize.y/OutputSize.y;//fwidth(ratio_scale.y);\n#endif\nvec2 uv_ratio = fract(ratio_scale);\n\n// Snap to the center of the underlying texel.\nxy = (floor(ratio_scale)*ilfac + vec2(0.5) - ilvec) / TextureSize;\n\n// Calculate Lanczos scaling coefficients describing the effect\n// of various neighbour texels in a scanline on the current\n// pixel.\nvec4 coeffs = PI * vec4(1.0 + uv_ratio.x, uv_ratio.x, 1.0 - uv_ratio.x, 2.0 - uv_ratio.x);\n\n// Prevent division by zero.\ncoeffs = FIX(coeffs);\n\n// Lanczos2 kernel.\ncoeffs = 2.0 * sin(coeffs) * sin(coeffs / 2.0) / (coeffs * coeffs);\n\n// Normalize.\ncoeffs /= dot(coeffs, vec4(1.0));\n\n// Calculate the effective colour of the current and next\n// scanlines at the horizontal location of the current pixel,\n// using the Lanczos coefficients above.\nvec4 col  = clamp(mat4(\n                TEX2D(xy + vec2(-one.x, 0.0)),\n                TEX2D(xy),\n                TEX2D(xy + vec2(one.x, 0.0)),\n                TEX2D(xy + vec2(2.0 * one.x, 0.0))) * coeffs,\n                0.0, 1.0);\nvec4 col2 = clamp(mat4(\n                TEX2D(xy + vec2(-one.x, one.y)),\n                TEX2D(xy + vec2(0.0, one.y)),\n                TEX2D(xy + one),\n                TEX2D(xy + vec2(2.0 * one.x, one.y))) * coeffs,\n                0.0, 1.0);\n\n#ifndef LINEAR_PROCESSING\ncol  = pow(col , vec4(CRTgamma));\ncol2 = pow(col2, vec4(CRTgamma));\n#endif\n\n// Calculate the influence of the current and next scanlines on\n// the current pixel.\nvec4 weights  = scanlineWeights(uv_ratio.y, col);\nvec4 weights2 = scanlineWeights(1.0 - uv_ratio.y, col2);\n#ifdef OVERSAMPLE\nuv_ratio.y =uv_ratio.y+1.0/3.0*filter_;\nweights = (weights+scanlineWeights(uv_ratio.y, col))/3.0;\nweights2=(weights2+scanlineWeights(abs(1.0-uv_ratio.y), col2))/3.0;\nuv_ratio.y =uv_ratio.y-2.0/3.0*filter_;\nweights=weights+scanlineWeights(abs(uv_ratio.y), col)/3.0;\nweights2=weights2+scanlineWeights(abs(1.0-uv_ratio.y), col2)/3.0;\n#endif\n\nvec3 mul_res  = (col * weights + col2 * weights2).rgb * vec3(cval);\n\n// dot-mask emulation:\n// Output pixels are alternately tinted green and magenta.\nvec3 dotMaskWeights = mix(\nvec3(1.0, 1.0 - DOTMASK, 1.0),\nvec3(1.0 - DOTMASK, 1.0, 1.0 - DOTMASK),\nfloor(mod(mod_factor, 2.0))\n);\n\nmul_res *= dotMaskWeights;\n\n// Convert the image gamma for display on our output device.\nmul_res = pow(mul_res, vec3(1.0 / monitorgamma));\n\n// Color the texel.\noutput_dummy _OUT;\n_OUT._color = vec4(mul_res, 1.0);\nFragColor = _OUT._color;\nreturn;\n} \n#endif\n\n'},Se=n(57),Te=n.n(Se),Ce=n(11),Ee=n.n(Ce),Ae={addStyleHook:function(){G(this.elements.container,this.config.selectors.container.replace(".",""),!0),G(this.elements.container,this.config.classNames.uiSupported,!0),G(this.elements.container,this.config.classNames.hideControls,!0)},build:function(){this.listeners.media(),S(this.elements.controls)||(ct.inject.call(this),this.listeners.controls()),this.volume=null,this.muted=null,ct.updateVolume.call(this),G(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0},toggleControls:function(e){var t=this.elements.controls;if(t){var n=0,o=H.call(this,".".concat(K({ejs__dialogs:!0})," > .").concat(K({ejs__dialog:!0})));Array.from(o).forEach((function(e,t){!0!==e.hidden&&(n+=1)})),n>0?this.toggleControls(!1):this.toggleControls(Boolean(e||this.paused||t.pressed||t.hover))}}};function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Me(e,t){if("object"===ke(e)&&e.files&&(e=e.files[0]),this.littleEndian=!1,this.offset=0,this._lastRead=null,"object"===ke(e)&&e.name&&e.size){if("function"!=typeof window.FileReader)throw new Error("Incompatible Browser");this.fileName=e.name,this.fileType=e.type,this.fileSize=e.size,this._fileReader=new FileReader,this._fileReader.marcFile=this,this._fileReader.addEventListener("load",(function(){this.marcFile._u8array=new Uint8Array(this.result),this.marcFile._dataView=new DataView(this.result),t&&t.call()}),!1),this._fileReader.readAsArrayBuffer(e)}else if("object"===ke(e)&&"string"==typeof e.fileName&&"boolean"==typeof e.littleEndian){this.fileName=e.fileName,this.fileType=e.fileType,this.fileSize=e.fileSize;var n=new ArrayBuffer(e);this._u8array=new Uint8Array(this.fileType),this._dataView=new DataView(this.fileType),e.copyToFile(this,0),t&&t.call()}else if("object"===ke(e)&&"number"==typeof e.byteLength)this.fileName="file.bin",this.fileType="application/octet-stream",this.fileSize=e.byteLength,void 0!==e.buffer&&(e=e.buffer),this._u8array=new Uint8Array(e),this._dataView=new DataView(e),t&&t.call();else{if("number"!=typeof e)throw new Error("Invalid source");this.fileName="file.bin",this.fileType="application/octet-stream",this.fileSize=e,n=new ArrayBuffer(e),this._u8array=new Uint8Array(n),this._dataView=new DataView(n),t&&t.call()}}Me.IS_MACHINE_LITTLE_ENDIAN=(me=new ArrayBuffer(2),new DataView(me).setInt16(0,256,!0),256===new Int16Array(me)[0]),Me.prototype.seek=function(e){this.offset=e},Me.prototype.skip=function(e){this.offset+=e},Me.prototype.isEOF=function(){return!(this.offset<this.fileSize)},Me.prototype.slice=function(e,t){var n;return t=t||this.fileSize-e,void 0!==this._u8array.buffer.slice?((n=new Me(0)).fileSize=t,n._u8array=new Uint8Array(this._u8array.buffer.slice(e,e+t))):(n=new Me(t),this.copyToFile(n,e,t,0)),n.fileName=this.fileName,n.fileType=this.fileType,n.littleEndian=this.littleEndian,n},Me.prototype.copyToFile=function(e,t,n,o){void 0===o&&(o=t),n=n||this.fileSize-t;for(var r=0;r<n;r++)e._u8array[o+r]=this._u8array[t+r]},Me.prototype.save=function(){var e;try{e=new Blob([this._u8array],{type:this.fileType})}catch(n){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"InvalidStateError"!==n.name||!window.BlobBuilder)throw new Error("Incompatible Browser");var t=new BlobBuilder;t.append(this._u8array.buffer),e=t.getBlob(this.fileType)}saveAs(e,this.fileName)},Me.prototype.readU8=function(){return this._lastRead=this._u8array[this.offset],this.offset++,this._lastRead},Me.prototype.readU16=function(){return this.littleEndian?this._lastRead=this._u8array[this.offset]+(this._u8array[this.offset+1]<<8):this._lastRead=(this._u8array[this.offset]<<8)+this._u8array[this.offset+1],this.offset+=2,this._lastRead>>>0},Me.prototype.readU24=function(){return this.littleEndian?this._lastRead=this._u8array[this.offset]+(this._u8array[this.offset+1]<<8)+(this._u8array[this.offset+2]<<16):this._lastRead=(this._u8array[this.offset]<<16)+(this._u8array[this.offset+1]<<8)+this._u8array[this.offset+2],this.offset+=3,this._lastRead>>>0},Me.prototype.readU32=function(){return this.littleEndian?this._lastRead=this._u8array[this.offset]+(this._u8array[this.offset+1]<<8)+(this._u8array[this.offset+2]<<16)+(this._u8array[this.offset+3]<<24):this._lastRead=(this._u8array[this.offset]<<24)+(this._u8array[this.offset+1]<<16)+(this._u8array[this.offset+2]<<8)+this._u8array[this.offset+3],this.offset+=4,this._lastRead>>>0},Me.prototype.readBytes=function(e){this._lastRead=new Array(e);for(var t=0;t<e;t++)this._lastRead[t]=this._u8array[this.offset+t];return this.offset+=e,this._lastRead},Me.prototype.readString=function(e){this._lastRead="";for(var t=0;t<e&&this.offset+t<this.fileSize&&this._u8array[this.offset+t]>0;t++)this._lastRead=this._lastRead+String.fromCharCode(this._u8array[this.offset+t]);return this.offset+=e,this._lastRead},Me.prototype.writeU8=function(e){this._u8array[this.offset]=e,this.offset++},Me.prototype.writeU16=function(e){this.littleEndian?(this._u8array[this.offset]=255&e,this._u8array[this.offset+1]=e>>8):(this._u8array[this.offset]=e>>8,this._u8array[this.offset+1]=255&e),this.offset+=2},Me.prototype.writeU24=function(e){this.littleEndian?(this._u8array[this.offset]=255&e,this._u8array[this.offset+1]=(65280&e)>>8,this._u8array[this.offset+2]=(16711680&e)>>16):(this._u8array[this.offset]=(16711680&e)>>16,this._u8array[this.offset+1]=(65280&e)>>8,this._u8array[this.offset+2]=255&e),this.offset+=3},Me.prototype.writeU32=function(e){this.littleEndian?(this._u8array[this.offset]=255&e,this._u8array[this.offset+1]=(65280&e)>>8,this._u8array[this.offset+2]=(16711680&e)>>16,this._u8array[this.offset+3]=(4278190080&e)>>24):(this._u8array[this.offset]=(4278190080&e)>>24,this._u8array[this.offset+1]=(16711680&e)>>16,this._u8array[this.offset+2]=(65280&e)>>8,this._u8array[this.offset+3]=255&e),this.offset+=4},Me.prototype.writeBytes=function(e){for(var t=0;t<e.length;t++)this._u8array[this.offset+t]=e[t];this.offset+=e.length},Me.prototype.writeString=function(e,t){t=t||e.length;for(var n=0;n<e.length&&n<t;n++)this._u8array[this.offset+n]=e.charCodeAt(n);for(;n<t;n++)this._u8array[this.offset+n]=0;this.offset+=t};var Oe=Me;function Re(){this.records=[],this.truncate=!1}function Pe(e){var t=new Re;e.seek(5);for(var n=0,o=0;!e.isEOF();){if(4542278===(n=e.readU24())){if(e.isEOF())break;if(e.offset+3===e.fileSize){t.truncate=e.readU24();break}}0===(o=e.readU16())?t.addRLERecord(n,e.readU16(),e.readU8()):t.addSimpleRecord(n,e.readBytes(o))}return t}Re.prototype.addSimpleRecord=function(e,t){this.records.push({offset:e,type:1,length:t.length,data:t})},Re.prototype.addRLERecord=function(e,t,n){this.records.push({offset:e,type:0,length:t,byte:n})},Re.prototype.toString=function(){nSimpleRecords=0,nRLERecords=0;for(var e=0;e<this.records.length;e++)0===this.records[e].type?nRLERecords++:nSimpleRecords++;var t="Simple records: "+nSimpleRecords;return t+="\nRLE records: "+nRLERecords,t+="\nTotal records: "+this.records.length,this.truncate&&(t+="\nTruncate at: 0x"+this.truncate.toString(16)),t},Re.prototype.export=function(e){for(var t=5,n=0;n<this.records.length;n++)0===this.records[n].type?t+=8:t+=5+this.records[n].data.length;for(t+=3,this.truncate&&(t+=3),tempFile=new Oe(t),tempFile.fileName=e+".ips",tempFile.writeString("PATCH"),n=0;n<this.records.length;n++){var o=this.records[n];tempFile.writeU24(o.offset),0===o.type?(tempFile.writeU16(0),tempFile.writeU16(o.length),tempFile.writeU8(o.byte)):(tempFile.writeU16(o.data.length),tempFile.writeBytes(o.data))}return tempFile.writeString("EOF"),o.truncate&&tempFile.writeU24(o.truncate),tempFile},Re.prototype.apply=function(e){var t;if(this.truncate)t=e.slice(0,this.truncate);else{for(var n=e.fileSize,o=0;o<this.records.length;o++){var r=this.records[o];0===r.type?r.offset+r.length>n&&(n=r.offset+r.length):r.offset+r.data.length>n&&(n=r.offset+r.data.length)}n===e.fileSize?t=e.slice(0,e.fileSize):(t=new Oe(n),e.copyToFile(t,0))}for(e.seek(0),o=0;o<this.records.length;o++)if(t.seek(this.records[o].offset),0===this.records[o].type)for(var a=0;a<this.records[o].length;a++)t.writeU8(this.records[o].byte);else t.writeBytes(this.records[o].data);return t},"0123456789abcdef".split("");var je=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var o=0;o<8;o++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function Ie(e,t,n){for(var o=t?new Uint8Array(e._u8array.buffer,t):e._u8array,r=-1,a=n?o.length-4:o.length,i=0;i<a;i++)r=r>>>8^je[255&(r^o[i])];return(-1^r)>>>0}function Ne(){this.sourceSize=0,this.targetSize=0,this.metaData="",this.actions=[],this.sourceChecksum=0,this.targetChecksum=0,this.patchChecksum=0}function Le(e){e.readVLV=Fe,e.littleEndian=!0;var t=new Ne;e.seek(4),t.sourceSize=e.readVLV(),t.targetSize=e.readVLV();var n=e.readVLV();n&&(t.metaData=e.readString(n));for(var o=e.fileSize-12;e.offset<o;){var r=e.readVLV(),a={type:3&r,length:1+(r>>2)};if(1===a.type)a.bytes=e.readBytes(a.length);else if(2===a.type||3===a.type){var i=e.readVLV();a.relativeOffset=(1&i?-1:1)*(i>>1)}t.actions.push(a)}if(t.sourceChecksum=e.readU32(),t.targetChecksum=e.readU32(),t.patchChecksum=e.readU32(),t.patchChecksum!==Ie(e,0,!0))throw new Error("error_crc_patch");return t}function Fe(){for(var e=0,t=1;;){var n=this.readU8();if(e+=(127&n)*t,128&n)break;e+=t<<=7}return this._lastRead=e,e}function De(e){for(;;){var t=127&e;if(0==(e>>=7)){this.writeU8(128|t);break}this.writeU8(t),e--}}function ze(e){for(var t=0;;){if(0==(e>>=7)){t++;break}t++,e--}return t}Ne.prototype.toString=function(){var e="Source size: "+this.sourceSize;return e+="\nTarget size: "+this.targetSize,(e+="\nMetadata: "+this.metaData)+"\n#Actions: "+this.actions.length},Ne.prototype.validateSource=function(e,t){return this.sourceChecksum===Ie(e,t)},Ne.prototype.apply=function(e,t){if(t&&!this.validateSource(e))throw new Error("error_crc_input");for(var n=new Oe(this.targetSize),o=0,r=0,a=0;a<this.actions.length;a++){var i=this.actions[a];if(0===i.type)e.copyToFile(n,n.offset,i.length),n.skip(i.length);else if(1===i.type)n.writeBytes(i.bytes);else if(2===i.type){o+=i.relativeOffset;for(var s=i.length;s--;)n.writeU8(e._u8array[o]),o++}else if(3===i.type)for(r+=i.relativeOffset,s=i.length;s--;)n.writeU8(n._u8array[r]),r++}if(t&&this.targetChecksum!==Ie(n))throw new Error("error_crc_output");return n},Ne.prototype.export=function(e){var t="BPS1".length;t+=ze(this.sourceSize),t+=ze(this.targetSize),t+=ze(this.metaData.length),t+=this.metaData.length;for(var n=0;n<this.actions.length;n++)t+=ze(((r=this.actions[n]).length-1<<2)+r.type),1===r.type?t+=r.length:2!==r.type&&3!==r.type||(t+=ze((Math.abs(r.relativeOffset)<<1)+(r.relativeOffset<0?1:0)));var o=new Oe(t+=12);for(o.fileName=e+".bps",o.littleEndian=!0,o.writeVLV=De,o.writeString("BPS1"),o.writeVLV(this.sourceSize),o.writeVLV(this.targetSize),o.writeVLV(this.metaData.length),o.writeString(this.metaData,this.metaData.length),n=0;n<this.actions.length;n++){var r=this.actions[n];o.writeVLV((r.length-1<<2)+r.type),1===r.type?o.writeBytes(r.bytes):2!==r.type&&3!==r.type||o.writeVLV((Math.abs(r.relativeOffset)<<1)+(r.relativeOffset<0?1:0))}return o.writeU32(this.sourceChecksum),o.writeU32(this.targetChecksum),o.writeU32(this.patchChecksum),o};var Be="UPS1";function Ue(){this.records=[],this.sizeInput=0,this.sizeOutput=0,this.checksumInput=0,this.checksumOutput=0}function Ge(e){for(;;){var t=127&e;if(0==(e>>=7)){this.writeU8(128|t);break}this.writeU8(t),e-=1}}function Ve(){for(var e=0,t=1;;){var n=this.readU8();if(-1==n)throw new Error("Can't read UPS VLV at 0x"+(this.offset-1).toString(16));if(e+=(127&n)*t,0!=(128&n))break;e+=t<<=7}return e}function qe(e){for(var t=0;t++,0!=(e>>=7);)e-=1;return t}function He(e){var t=new Ue;for(e.readVLV=Ve,e.seek(Be.length),t.sizeInput=e.readVLV(),t.sizeOutput=e.readVLV();e.offset<e.fileSize-12;){for(var n=e.readVLV(),o=[];e.readU8();)o.push(e._lastRead);t.addRecord(n,o)}return e.littleEndian=!0,t.checksumInput=e.readU32(),t.checksumOutput=e.readU32(),e.littleEndian=!1,t}Ue.prototype.addRecord=function(e,t){this.records.push({offset:e,XORdata:t})},Ue.prototype.toString=function(){var e="Records: "+(void 0).records.length;return e+="\nInput file size: "+(void 0).sizeInput,e+="\nOutput file size: "+(void 0).sizeOutput,(e+="\nInput file checksum: "+padZeroes((void 0).checksumInput,4))+"\nOutput file checksum: "+padZeroes((void 0).checksumOutput,4)},Ue.prototype.export=function(e){var t=Be.length;t+=qe(this.sizeInput),t+=qe(this.sizeOutput);for(var n=0;n<this.records.length;n++)t+=qe(this.records[n].offset),t+=this.records[n].XORdata.length+1;for(t+=12,tempFile=new Oe(t),tempFile.writeVLV=Ge,tempFile.fileName=e+".ups",tempFile.writeString(Be),tempFile.writeVLV(this.sizeInput),tempFile.writeVLV(this.sizeOutput),n=0;n<this.records.length;n++)tempFile.writeVLV(this.records[n].offset),tempFile.writeBytes(this.records[n].XORdata),tempFile.writeU8(0);return tempFile.littleEndian=!0,tempFile.writeU32(this.checksumInput),tempFile.writeU32(this.checksumOutput),tempFile.writeU32(Ie(tempFile,0,!0)),tempFile},Ue.prototype.validateSource=function(e,t){return Ie(e,t)===this.checksumInput},Ue.prototype.apply=function(e,t){t&&this.validateSource(e),tempFile=new Oe(this.sizeOutput),e.copyToFile(tempFile,0,this.sizeInput),e.seek(0);for(var n=0;n<this.records.length;n++){var o=this.records[n];tempFile.skip(o.offset),e.skip(o.offset);for(var r=0;r<o.XORdata.length;r++)tempFile.writeU8((e.isEOF()?0:e.readU8())^o.XORdata[r]);tempFile.skip(1),e.skip(1)}return t&&(Ie(tempFile),this.checksumOutput),tempFile};var We=n(160),Ye=n.n(We),Xe={_FS:{createPath:function(e,t,n,o){Xe.FS&&("function"!=typeof Xe.FS.createPath?Xe.FS.mkdir(t):Xe.FS.createPath(e,t,n,o))},createDataFile:function(e,t,n,o,r,a){if(Xe.FS)if("function"!=typeof Xe.FS.createDataFile){var i=function(e,t){return e.endsWith("/")||t.startsWith("/")?e+t:e+"/"+t}(e,t);Xe.FS.writeFile(i,n)}else Xe.FS.createDataFile(e,t,n,o,r,a)},createFolder:function(e,t,n,o){if(Xe.FS)if("function"!=typeof Xe.FS.createFolder){var r=function(e,t){return e.endsWith("/")||t.startsWith("/")?e+t:e+"/"+t}(e,t);Xe.FS.mkdir(r)}else Xe.FS.createFolder(e,t,n,o)}},romdb:null,supportBatterySave:!1,hash:"2b35cacf70ae",hash2:"f5cbb3f38c0bb20e4",hash3:"88cc8ad0c350400499a0",loading:null,gamePatch:null,saveFilenames:[],FS:null,Module:null,aspectRatio:4/3,memData:null,wasmData:null,coreFileData:{},coreFileName:"",coreFileVersion:"",isMobileDevice:!!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(navigator.userAgent||""),create:function(){var e=this;window.URL=window.URL||window.webkitURL;var t,n,o,r=!1,a=!1,i=!1,s=0,c=!1,l={psx:["bin","iso","cue","img","mdf","pbp","toc","cbn","m3u"],nds:["nds","bin"],nes:["fds","nes","unif","unf"],snes:["smc","fig","sfc","gd3","gd7","dx2","bsx","swc"],snes2002:["smc","fig","sfc","gd3","gd7","dx2","bsx","swc"],snes2005:["smc","fig","sfc","gd3","gd7","dx2","bsx","swc"],snes2010:["smc","fig","sfc","gd3","gd7","dx2","bsx","swc"],gb:["gb","gbc","dmg"],gba:["gb","gbc","gba"],vbanext:["gba"],vb:["vb","vboy","bin"],"3do":["iso","bin","cue"],lynx:["lnx"],jaguar:["j64","jag","rom","abs","cof","bin","prg"],a7800:["a78","bin"],a2600:["a26","bin"],ngp:["ngp","ngc"],n64:["n64","v64","z64","bin","u1","ndd"],pce:["pce","bin","iso","cue","ccd","img","chd"],sega:["mdx","md","smd","gen","bin","iso","cue","sms","gg","sg","68k","chd"],segacd:["mdx","md","smd","gen","bin","iso","cue","sms","gg","sg","68k","chd"],"32x":["32x","bin","gen","smd","md","cue","iso","sms"],saturn:["bin","cue","iso"],msx:["rom","mx1","mx2","dsk","cas"],bluemsx:["rom","ri","mx1","mx2","col","dsk","cas","sg","sc","m3u"],ws:["ws","wsc"],arcade:["zip"],"fba0.2.97.29":["zip"],mame2003:["zip"],mame:["zip"],dos:["zip"]},u={psx:"psx",nds:"nds",nes:"nes",snes:"snes",snes2002:"snes2002",snes2005:"snes2005",snes2010:"snes2010",gb:"gb",gbc:"gb",gba:"gba",vbanext:"vbanext",vb:"vb",n64:"n64","3do":"3do",segaMS:"sega",segaGG:"sega",segaMD:"sega",segaCD:"segacd",sega32x:"32x",segaSaturn:"saturn",ngp:"ngp",pce:"pce",msx:"bluemsx",atari2600:"a2600",atari7800:"a7800",lynx:"lynx",ws:"ws",arcade:"arcade","fba0.2.97.29":"fba0.2.97.29",jaguar:"jaguar",mame2003:"mame2003",dos:"dos"},d=this,f=d.system;t=d.customPaths&&"string"==typeof d.customPaths["extract7z.js"]?d.customPaths["extract7z.js"]:d.dataPath+"extract7z.js",n=d.customPaths&&"string"==typeof d.customPaths["extractzip.js"]?d.customPaths["extractzip.js"]:d.dataPath+"extractzip.js?v=1",o=d.customPaths&&"string"==typeof d.customPaths["libunrar.js"]?d.customPaths["libunrar.js"]:d.dataPath+"libunrar.js";var p=D("canvas",{});this.game.appendChild(p),Xe.loading=D("div",{class:this.config.classNames.loading}),this.elements.container.appendChild(Xe.loading);var h={"loading-info":K({"loading-info":!0}),ad:K({ad:!0}),"close-ad":K({"close-ad":!0}),"start-game":K({"start-game":!0}),on:K({on:!0}),p1:K({p1:!0}),p2:K({p2:!0}),p3:K({p3:!0}),p4:K({p4:!0})};if("string"==typeof d.adUrl){Xe.loading.innerHTML='\n        <div>\n        <div class="'+h.ad+'" style="display:block !important;width:300px !important">\n        <div class="'+h["close-ad"]+'" hidden><a href="#" onclick="return false"></a></div>\n        <iframe scrolling="no" frameborder="no" style="width:300px !important;height:250px !important;display: block !important;" src="'+d.adUrl+'"></iframe>\n        </div>\n        <div class="'+h["loading-info"]+'" style="position: absolute;bottom: 20px;left: 50%;transform: translateX(-50%);">\n        <div class="'+h.p1+'"></div>\n        <div class="'+h.p2+'"></div>\n        <div class="'+h.p3+'"></div>\n        </div>\n        <div style="position: absolute;bottom: 20px;left: 50%;transform: translateX(-50%);">\n        <a href="#" onclick="return false" class="'+h["start-game"]+'">'+pe("playNow",d.config)+"</a>\n        </div>\n        </div>";var m=D("iframe",{src:d.adUrl,scrolling:"no",frameborder:"no",style:"width:300px !important;height:250px !important;display: block !important;"});Xe.loading.querySelector(".".concat(h.ad)).removeChild(Xe.loading.querySelector(".".concat(h.ad," iframe"))),Xe.loading.querySelector(".".concat(h.ad)).appendChild(m),se.webgl.DETECTED||(U(Xe.loading.querySelector(".".concat(h["start-game"])),!0),Xe.loading.querySelector(".".concat(h.p3)).innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">Failed to initialize WebGL.</strong>'),Xe.loading.querySelector(".".concat(h.ad," iframe")).style.setProperty("display","block","important"),Xe.loading.querySelector(".".concat(h.ad," iframe")).style.setProperty("visibility","visible","important"),Xe.loading.querySelector(".".concat(h.ad)).style.setProperty("display","block","important"),Xe.loading.querySelector(".".concat(h.ad)).style.setProperty("visibility","visible","important")}else Xe.loading.innerHTML='\n        <div>\n        <div class="'.concat(h["loading-info"],'" style="position: absolute;bottom: 20px;left: 50%;transform: translateX(-50%);">\n        <div class="').concat(h.p1,'"></div>\n        <div class="').concat(h.p2,'"></div>\n        <div class="').concat(h.p3,'"></div>\n        </div>\n        <div style="position: absolute;bottom: 20px;left: 50%;transform: translateX(-50%);">\n        <a href="#" onclick="return false" class="').concat(h["start-game"],'">').concat(pe("playNow",d.config),"</a>\n        </div>\n        </div>"),se.webgl.DETECTED||(U(Xe.loading.querySelector(".".concat(h["start-game"])),!0),Xe.loading.querySelector(".".concat(h.p3)).innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">Failed to initialize WebGL.</strong>');var v=window.URL||window.webkitURL;Ee.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)}));var g=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},b=function(e){var t=new Blob(['importScripts("'+e+'");'],{type:"application/javascript"}),n=window.URL.createObjectURL(t);return new Promise((function(e,t){e(new Worker(n))}))},y=function(e,t){var n="";"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                '));var o=new Blob([n],{type:"application/javascript"}),r=window.URL.createObjectURL(o);return new Promise((function(e,t){e(new Worker(r))}))},w=null,x=null,_=null,T=null;try{w=new Te.a({dbVersion:1,storePrefix:"ejs-",storeName:"system",keyPath:null,autoIncrement:!1,onStoreReady:function(){r=!0},onError:function(){r=!0}}),x=new Te.a({dbVersion:1,storePrefix:"ejs-",storeName:"roms",keyPath:null,autoIncrement:!1,onStoreReady:function(){a=!0},onError:function(){a=!0}}),_=new Te.a({dbVersion:1,storePrefix:"ejs-",storeName:"bios",keyPath:null,autoIncrement:!1,onStoreReady:function(){i=!0},onError:function(){i=!0}}),T=new Te.a({dbVersion:1,storePrefix:"ejs-",storeName:"romsdata",keyPath:null,autoIncrement:!1,onStoreReady:function(){},onError:function(){}})}catch(e){r=!0,a=!0,i=!0,console.log(e)}M.call(d,d.elements.container,"start-game",(function(t){d.started=!0,d.playing=!0,U(Xe.loading.querySelector(".".concat(h["loading-info"])),!0),!it||"undefined"!=it.virtualGamepadContainer&&null!==it.virtualGamepadContainer||Ae.toggleControls.call(d,!0);var n=K({"ejs__tooltip--visible":!0}),o=d.elements.buttons.gamepad.querySelector(".".concat(K({ejs__tooltip:!0})));G(o,n,!0),setTimeout((function(){G(o,n,!1)}),5e3),"string"==typeof d.adUrl&&(U(Xe.loading.querySelector(".".concat(h["close-ad"])),!1),setTimeout((function(){d.started&&Xe.loading.querySelector(".".concat(h.ad))&&Xe.loading.querySelector(".".concat(h.ad)).parentNode.removeChild(Xe.loading.querySelector(".".concat(h.ad)))}),1e4)),U(Xe.loading.querySelector(".".concat(h["start-game"])),!0);var r=ue(ct.defaultCoreOptionsValues.call(e),ct.storage.get("core-options")||{});"n64"===d.system&&r&&Object.keys(r).forEach((function(e){"glupen64-aspect"===e&&"16:9"===r[e]&&(p.height=p.width/16*9,Xe.aspectRatio=16/9)})),"arcade"!==e.system&&"fba0.2.97.29"!==e.system||r&&Object.keys(r).forEach((function(e){"fba-aspect"===e&&"PAR"===r[e]&&(p.height=p.width/16*9,Xe.aspectRatio=16/9)})),"gba"===d.system&&(p.height=p.width/1.5,Xe.aspectRatio=1.5),window.setTimeout((function(){}),150),function(){var t=e;if("undefined"!=typeof RI){document.removeEventListener("mousemove",RI.eventHandler,!1),p.removeEventListener("mousedown",RI.canvasEventHandler,!1),p.removeEventListener("mouseup",RI.canvasEventHandler,!1),t.elements.container.addEventListener("mousemove",(function(e){var t=0,n=0,o=e.offsetX-Xe.Module.canvas.offsetLeft,r=e.offsetY-Xe.Module.canvas.offsetTop;if("mousemove"===e.type){o<0?(o=0,t=-Xe.Module.canvas.offsetWidth):o>Xe.Module.canvas.offsetWidth?(o=Xe.Module.canvas.offsetWidth,t=Xe.Module.canvas.offsetWidth):t=o-RI.currentX,r<0?(r=0,n=-Xe.Module.canvas.offsetHeight):r>Xe.Module.canvas.offsetHeight?(r=Xe.Module.canvas.offsetHeight,n=Xe.Module.canvas.offsetHeight):n=r-RI.currentY,RI.currentX=o,RI.currentY=r;for(var a=0;a<RI.contexts.length;a+=1)HEAP32[RI.contexts[a].state+32>>2]=t,HEAP32[RI.contexts[a].state+36>>2]=n}}),!1),t.elements.container.addEventListener("mousedown",RI.canvasEventHandler,!1),t.elements.container.addEventListener("mouseup",RI.canvasEventHandler,!1);var n=function(e){if(e.targetTouches[0]){var t,n,o=0,r=0,a=e.target.getBoundingClientRect(),i=e.targetTouches[0].clientX-a.left,s=e.targetTouches[0].clientY-a.top;i<0?(i=0,o=-Xe.Module.canvas.offsetWidth):i>Xe.Module.canvas.offsetWidth?(i=Xe.Module.canvas.offsetWidth,o=Xe.Module.canvas.offsetWidth):o=i-RI.currentX,s<0?(s=0,r=-Xe.Module.canvas.offsetHeight):s>Xe.Module.canvas.offsetHeight?(s=Xe.Module.canvas.offsetHeight,r=Xe.Module.canvas.offsetHeight):r=s-RI.currentY,RI.currentX=i,RI.currentY=s;for(var c=0;c<RI.contexts.length;c+=1)HEAP32[RI.contexts[c].state+32>>2]=o,HEAP32[RI.contexts[c].state+36>>2]=r;switch(e.type){case"touchend":case"touchstart":if(0===e.button)n=40;else{if(2!==e.button)break;n=41}t="touchend"===e.type?0:1;for(var l=0;l<RI.contexts.length;l+=1)HEAP8[RI.contexts[l].state+n>>0]=t}}};t.elements.container.addEventListener("touchstart",n,!1),t.elements.container.addEventListener("touchend",n,!1)}else{var o=function(e){var t=new MouseEvent(e.type,e);Xe.Module.canvas.dispatchEvent(t)};W.call(e,".".concat(K({ejs__dialogs:!0}))).addEventListener("mousemove",o,!1),W.call(e,".".concat(K({ejs__dialogs:!0}))).addEventListener("mousedown",o,!1),W.call(e,".".concat(K({ejs__dialogs:!0}))).addEventListener("mouseup",o,!1)}}(),"msx"===d.system&&function(e){if("undefined"!=typeof RI){document.removeEventListener("keydown",RI.eventHandler,!1),document.removeEventListener("keyup",RI.eventHandler,!1);var t=function(e){var t=e.keyCode,n=t>>3,o=1<<(7&t);switch(e.type){case"keyup":case"keydown":if(n>=32)throw"key code error! bad code: "+t;for(var r=0;r<RI.contexts.length;r++){var a=HEAP8[RI.contexts[r].state+n>>0];"keyup"===e.type?a&=~o:a|=o,HEAP8[RI.contexts[r].state+n>>0]=a}}};document.addEventListener("keydown",t,!1),document.addEventListener("keyup",t,!1)}}(),setTimeout((function(){var e;e=ie(),null===it.setVolume&&"undefined"!=typeof RA?(RA.queueAudio=function(){var t,n=d.volume,o=RA.bufIndex;t=RA.bufIndex?RA.buffers[RA.bufIndex-1].endTime:RA.context.currentTime,RA.buffers[o].endTime=t+RA.buffers[o].duration;var r=RA.context.createBufferSource();if(r.buffer=RA.buffers[o],d.muted&&(n=0),1===n)r.connect(RA.context.destination);else{var a=RA.context.createGain();r.connect(a),a.connect(RA.context.destination),ne||"chrome"===e.name&&parseInt(e.version,10)<=60||"firefox"===e.name&&parseInt(e.version,10)<=56||"opera"===e.name&&parseInt(e.version,10)<=44?a.gain.value=n:"firefox"===e.name?a.gain.setValueAtTime(n,RA.context.currentTime):a.gain.setValueAtTime(n,RA.context.currentTime,0)}r.start(t),RA.bufIndex+=1,RA.bufOffset=0},ae&&window.addEventListener("touchstart",(function(){if(RA.context){RA.context.resume();var e=RA.context.createBufferSource();e.connect(RA.context.destination),e.start()}}),!1)):it.setVolume()}),500),setTimeout((function(){d.elements.container.focus()}),30),void 0===window.addRunDependency&&(window.Module=void 0);var a=Xe.FS.readFile(d.startName);if(a.length<=33554432&&".cue"!=d.startName.substr(-4)){var i;if("snes"===d.system||["snes2002","snes2005","snes2010"].includes(d.system)){var s=a.length%1024;i=new Oe(s?a.slice?a.slice(s):a.subarray(s):a)}else i=new Oe(a);var c=Ye.a.create(),l=new FileReader,u=0,f=i._u8array.length,m=function(){if(u<f){var e=Math.min(u+2097152,f);l.readAsArrayBuffer(new Blob([i._u8array.slice(u,e)])),u=e}else console.log(c.hex()),d.hash=c.hex(),"function"==typeof window.ejsromshash&&window.ejsromshash(d.hash)};l.onload=function(e){try{c.update(e.target.result),m()}catch(e){console.log(e)}},m()}})),"string"==typeof d.adUrl&&M.call(d,Xe.loading.querySelector(".".concat(h["close-ad"])),"click",(function(e){e instanceof MouseEvent&&d.started&&Xe.loading.querySelector(".".concat(h.ad))&&Xe.loading.querySelector(".".concat(h.ad)).parentNode.removeChild(Xe.loading.querySelector(".".concat(h.ad))),d.elements.container.focus()}));var C=function(){x.db&&x.getAll((function(e){Array.isArray(e)&&e.length>10&&e.sort((function(e,t){return(t.lastaccess?t.lastaccess:0)-(e.lastaccess?e.lastaccess:0)})).forEach((function(e,t){t>10&&!Xe.saveFilenames.includes(e.key)?(x.remove(e.key),T.db&&T.remove(e.key)):(delete e.data,x.put(e.key,e))}))}),(function(){x.clear(),T.db&&T.clear()}))},E=function(e){if(Xe.gamePatch){var t=e.startName.split("/"),n=t.pop().split(".").pop(),o=(Xe.gamePatch.split(".").pop(),Xe.gamePatch.split("/").pop().split(".").shift()),r="".concat(t.join("/"),"/").concat(o,".").concat(n);r=r.replace(/\#/g,"");var a=Xe.gamePatch;if(Xe.FS.rename(e.startName,r),e.startName=r,"snes"===e.system||["snes2002","snes2005","snes2010"].includes(e.system)){var i,s,c,l=new Oe(Xe.FS.readFile(e.startName)),u=Ie(l),d=new Oe(Xe.FS.readFile(a)),f=d.readString(6),p=l._u8array.length%1024;f.startsWith("PATCH")?(i=Pe(d),0===p&&"B19ED489"===u.toString(16).toUpperCase()&&((s=new Uint8Array(l._u8array.length+512)).set(new Uint8Array(512),0),s.set(l._u8array,512),l=new Oe(s))):f.startsWith(Be)?i=He(d):f.startsWith("BPS1")&&(i=Le(d),p>0&&"A31BEAD4"===u.toString(16).toUpperCase()&&(s=l._u8array.slice?l._u8array.slice(p):l._u8array.subarray(p),l=new Oe(s)));try{if(c=i.apply(l,!1)){var h=c._u8array.length%1024;h>0&&(s=c._u8array.slice?c._u8array.slice(h):c._u8array.subarray(h),c=new Oe(s)),Xe.FS.unlink(a),Xe.FS.unlink(e.startName),Xe.FS.writeFile(e.startName,c._u8array)}}catch(e){}}else{var m,v,g=new Oe(Xe.FS.readFile(e.startName)),b=new Oe(Xe.FS.readFile(a)),y=b.readString(6);y.startsWith("PATCH")?m=Pe(b):y.startsWith(Be)?m=He(b):y.startsWith("BPS1")&&(m=Le(b));try{(v=m.apply(g,!1))&&(Xe.FS.unlink(a),Xe.FS.unlink(e.startName),Xe.FS.writeFile(e.startName,v._u8array))}catch(e){}}}},A=function(){c?(window.Module.TOTAL_MEMORY=268435456,["jaguar"].includes(e.system)&&(window.Module.TOTAL_MEMORY=268435456),["nds","nes","snes","arcade","mame"].includes(e.system)&&(window.Module.TOTAL_MEMORY=0),["snes2002","snes2005","snes2010"].includes(e.system)&&(window.Module.TOTAL_MEMORY=0),"gba"==e.system&&(window.Module.TOTAL_MEMORY=0),"3do"==e.system&&(window.Module.TOTAL_MEMORY=0),"n64"==e.system&&(window.Module.TOTAL_MEMORY=0)):("nes"===e.system&&(window.Module.TOTAL_MEMORY=134217728),window.Module.TOTAL_MEMORY=s+67108864,["arcade","mame","mame2003","fba0.2.97.29"].includes(e.system)&&(window.Module.TOTAL_MEMORY=s+268435456,Xe.isMobileDevice&&(window.Module.TOTAL_MEMORY=314572800)),["n64","nds","jaguar"].includes(e.system)&&(window.Module.TOTAL_MEMORY=s+268435456,Xe.isMobileDevice&&(window.Module.TOTAL_MEMORY=314572800)),"gba"==e.system&&(window.Module.TOTAL_MEMORY=268435456)),"undefined"!=typeof EJS_MEMORY&&(window.Module.TOTAL_MEMORY=EJS_MEMORY)},k=function(r,a){var i=e,c=Xe.loading.querySelector(".".concat(h.p3)),p=(r.split(".").pop(),u[f]),m=-1,v="",w=function(){"string"==typeof i.loadStateOnStart&&fetch(i.loadStateOnStart).then((function(e){e.arrayBuffer().then((function(e){var t=new Uint8Array(e);EJS_loadState(t)}))}))};window.EJS_terminate=function(){if(Xe.Module.pauseMainLoop(),i&&i.eventListeners)for(var e in i)for(var t=0;t<i.eventListeners.length;t++){(n=i.eventListeners[t]).element.removeEventListener(n.type,n.callback,n.capture)}if(window.EJS_RESET_VARS){var n=[],o=[];for(var e in window)n.push(e);for(t=0;t<n.length;t++)window.EJS_RESET_VARS.includes(n[t])||o.push(n[t]);for(t=0;t<o.length;t++)window[o[t]]&&delete window[o[t]]}};var x=function(t){if(t.data){if(1===t.data.t){c.innerHTML="Game Data ready",t.target.terminate();try{A(),E(i),C(),!i.startName&&v&&(i.startName=v);var n=[i.startName,[Xe.hash,Xe.hash2,Xe.hash3].join("")];"undefined"!=typeof EJS_DEBUG_XX&&!0===EJS_DEBUG_XX&&n.unshift("-v"),Xe.Module.callMain(n),2===d.coreVer&&(Xe.Module.resumeMainLoop(),Xe.Module.setCanvasSize(800,600)),P.call(i,i.elements.container,"start-game")}catch(e){console.log(e),c.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">Failed to start game</strong>'}try{w()}catch(e){}}if(2===t.data.t){var o=t.data.file.split("/"),r=o.pop(),a=r.split(".").pop();r=r.replace(/\#/g,""),Xe._FS.createPath("/",o.join("/"),!0,!0);for(var u=l[p].length-1;u>=0;u-=1)l[p][u]===a.toLowerCase()&&u>m&&(m=u,i.startName=["",o.join("/"),r].join("/"),i.startName=i.startName.replace(/\/+/,"/"));r&&(Xe._FS.createDataFile("/".concat(o.join("/")),r,t.data.data,!0,!1),s+=t.data.data.length),v="/".concat(o.join("/"),"/").concat(r)}if(4===t.data.t&&t.data.total>0){var f=Math.floor(t.data.current/t.data.total*100),h=t.data.name||"";f<=100&&f>0&&(c.innerHTML=e.localization("Decompress Game Data")+" ".concat(h," ").concat(f,"%"))}}},_=!1;if(!["arcade","mame","mame2003","fba0.2.97.29"].includes(i.system)){var S=a.slice?a.slice(0,10):a.subarray(0,10),T=g(S);"7z"===T?(b(t).then((function(e){e.onmessage=x,e.postMessage(a)})),_=!0):"zip"===T?(b(n).then((function(e){e.onmessage=x,e.postMessage(a)})),_=!0):"rar"==T&&(y(o,"rar").then((function(e){e.onmessage=x,e.postMessage(a)})),_=!0)}if(!_){var k=r.replace(/\#/g,"");try{s+=a.length,Xe._FS.createDataFile("/",k,a,!0,!1)}catch(e){console.log(e)}A(),i.startName=k,E(i),C();try{var M=[i.startName,[Xe.hash,Xe.hash2,Xe.hash3].join("")];"undefined"!=typeof EJS_DEBUG_XX&&!0===EJS_DEBUG_XX&&M.unshift("-v"),Xe.Module.callMain(M),2===d.coreVer&&(Xe.Module.resumeMainLoop(),Xe.Module.setCanvasSize(800,600)),P.call(i,i.elements.container,"start-game")}catch(e){console.log(e),c.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">Failed to start game</strong>'}try{w()}catch(e){}}},O=function(){var t=e,n=Xe.loading.querySelector(".".concat(h.p3)),o=e.config,r=(o.gameId,o.gameUrl),a=o.system;"vbanext"==a&&(a="gba");var i=r.split("/"),s=i[i.length-1];s.indexOf("?")>-1&&(s=s.substr(0,s.indexOf("?"))),s.split(".").pop(),n.innerHTML=e.localization("Download Game Data"),["arcade","mame","mame2003","fba0.2.97.29"].includes(t.system)&&t.config.gameParentUrl&&(n.innerHTML+=" (2/2)"),t.config.gamePatchUrl&&(n.innerHTML+=" (2/2)"),new Promise((async function(e,t){if(r.startsWith("blob:")){var n=await fetch(r);e({headers:{"content-length":(n=await n.blob()).size,"content-type":"text/plain"}})}else e(await Ee.a.head(r,{}))})).then((function(o){var i=o.headers["content-length"],c=o.headers["content-type"],l=(o.headers["last-modified"],"".concat(a,"-").concat(s)),u=function(){Ee.a.get(r,{onDownloadProgress:function(o){var r=o.total?"".concat(Math.floor(o.loaded/o.total*100),"%"):"";["arcade","mame","mame2003","fba0.2.97.29"].includes(t.system)&&t.config.gameParentUrl||t.config.gamePatchUrl?n.innerHTML=e.localization("Download Game Data")+" (2/2) ".concat(r):n.innerHTML=e.localization("Download Game Data")+" ".concat(r)},responseType:"arraybuffer"}).then((function(t){var n=new Uint8Array(t.data);if(e.config.gameUrl.startsWith("blob:")||e.config.gameUrl.startsWith("file:")||e.config.gameUrl.startsWith("chrome-extension:")||("file:"==window.location.protocol||"chrome-extension:"==window.location.protocol)&&1==e.config.gameUrl.split(":").length)k(s,n);else{if(l&&x.db)if(n.length>104857600)for(var o=Math.ceil(n.length/104857600),r=0;r<o;r+=1){var a=n.slice?n.slice(104857600*r,104857600*(r+1)):n.subarray(104857600*r,104857600*(r+1)),i="".concat(l);r>0&&(i="".concat(l,"-part-").concat(r)),Xe.saveFilenames.push(i),x.put(i,{filename:s,filesize:n.length,filetype:c,key:i,lastaccess:(new Date).valueOf(),next:"".concat(l,"-part-").concat(r+1)}),T.db&&T.put(i,{filename:s,filesize:n.length,filetype:c,key:i,data:a})}else Xe.saveFilenames.push(l),x.put(l,{filename:s,filesize:n.length,filetype:c,key:l,lastaccess:(new Date).valueOf()}),T.db&&T.put(l,{filename:s,filesize:n.length,filetype:c,key:l,data:n});k(s,n)}})).catch((function(t){console.log(t),n.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+e.localization("Network Error")+"</strong>"}))};T.db?T.get(l,(function(e){if(e&&e.filename===s&&e.filesize-i==0&&e.filetype===c&&e.key)if(x.get(l,(function(e){e.lastaccess=(new Date).valueOf(),x.put(e.key,e)})),e.filesize>104857600){var t=new Uint8Array(e.filesize);t.set(e.data);for(var n=Math.ceil(e.filesize/104857600),o=[],r=1;r<n;r+=1)o.push("".concat(l,"-part-").concat(r)),x.get("".concat(l,"-part-").concat(r),(function(e){e.lastaccess=(new Date).valueOf(),x.put(e.key,e)}));T.getBatch(o,(function(n){n.filter((function(e){return e})).length!==o.length?u():(n.forEach((function(e,n){t.set(e.data,104857600*(n+1))})),k(e.filename,t))}),(function(){}),"sparse")}else k(e.filename,e.data);else u()})):u()})).catch((function(t){n.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+e.localization("Network Error")+"</strong>"}))},j=function(){var r=Xe.loading.querySelector(".".concat(h.p3)),a=e.config.gamePatchUrl;if(a){var i=a.split("/"),c=i[i.length-1];c.indexOf("?")>-1&&(c=c.substr(0,c.indexOf("?"))),c.split(".").pop(),r.innerHTML=e.localization("Download Game Data")+" (1/2)",Ee.a.get(a,{onDownloadProgress:function(t){r.innerHTML=e.localization("Download Game Data")+" (1/2) ";var n=t.total?"".concat(Math.floor(t.loaded/t.total*100),"%"):"";r.innerHTML+=n},responseType:"arraybuffer"}).then((function(r){var a,i,l,u,d,f,p,m=new Uint8Array(r.data);a=c,i=m,l=Xe.loading.querySelector(".".concat(h.p3)),a.split(".").pop(),u=function(t){if(t.data){if(1===t.data.t&&(t.target.terminate(),O()),2===t.data.t){var n=t.data.file.split("/"),o=n.pop(),r=o.split(".").pop();Xe._FS.createPath("/",n.join("/"),!0,!0),Xe._FS.createDataFile("/"+n.join("/"),o,t.data.data,!0,!1),s+=t.data.data.length,["ips","bps","ups"].includes(r)&&!Xe.gamePatch&&(Xe.gamePatch="/"+n.join("/")+"/"+o)}if(4===t.data.t&&t.data.total>0){var a=Math.floor(t.data.current/t.data.total*100),i=t.data.name||"";a<=100&&a>0&&(l.innerHTML=e.localization("Decompress Game Patch")+" ".concat(i," ").concat(a,"%"))}}},d=!1,f=i.slice?i.slice(0,10):i.subarray(0,10),"7z"===(p=g(f))?(b(t).then((function(e){e.onmessage=u,e.postMessage(i)})),d=!0):"zip"===p?(b(n).then((function(e){e.onmessage=u,e.postMessage(i)})),d=!0):"rar"==p&&(y(o,"rar").then((function(e){e.onmessage=messageCallBack,e.postMessage(i)})),d=!0),d||(s+=i.length,Xe.gamePatch="/".concat(a),Xe._FS.createDataFile("/",a,i,!0,!1),O())})).catch((function(t){console.log(t),r.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+e.localization("Network Error")+"</strong>"}))}else O()},I=function(){var t=e,n=Xe.loading.querySelector(".".concat(h.p3)),o=e.config.gameParentUrl;if(o&&["arcade","mame","mame2003","fba0.2.97.29"].includes(t.system)){var r=o.split("/"),a=r[r.length-1];a.indexOf("?")>-1&&(a=a.substr(0,a.indexOf("?"))),a.split(".").pop(),n.innerHTML=e.localization("Download Game Data")+" (1/2)",t.config.gamePatchUrl&&(n.innerHTML=e.localization("Download Game Data")+" (1/3)"),Ee.a.head(o,{}).then((function(t){var r=t.headers["content-length"],i=t.headers["content-type"],c=(t.headers["last-modified"],"".concat(f,"-").concat(a)),l=function(){Ee.a.get(o,{onDownloadProgress:function(t){var o=t.total?"".concat(Math.floor(t.loaded/t.total*100),"%"):"";n.innerHTML=e.localization("Download Game Data")+" (1/2) ".concat(o)},responseType:"arraybuffer"}).then((function(e){var t=new Uint8Array(e.data);if(c&&x.db)if(t.length>104857600)for(var n=Math.ceil(t.length/104857600),o=0;o<n;o+=1){var r=t.slice?t.slice(104857600*o,104857600*(o+1)):t.subarray(104857600*o,104857600*(o+1)),l="".concat(c);o>0&&(l="".concat(c,"-part-").concat(o)),Xe.saveFilenames.push(l),x.put(l,{filename:a,filesize:t.length,filetype:i,key:l,lastaccess:(new Date).valueOf(),next:"".concat(c,"-part-").concat(o+1)}),T.db&&T.put(l,{filename:a,filesize:t.length,filetype:i,key:l,data:r})}else Xe.saveFilenames.push(c),x.put(c,{filename:a,filesize:t.length,filetype:i,key:c,lastaccess:(new Date).valueOf()}),T.db&&T.put(c,{filename:a,filesize:t.length,filetype:i,key:c,data:t});var u=a.replace(/\#/g,"");try{s+=t.length,Xe._FS.createDataFile("/",u,t,!0,!1),j()}catch(e){console.log(e)}})).catch((function(t){console.log(t),n.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+e.localization("Network Error")+"</strong>"}))};T.db?T.get(c,(function(e){if(e&&e.filename===a&&e.filesize-r==0&&e.filetype===i&&e.key)if(e.filesize>104857600){var t=new Uint8Array(e.filesize);t.set(e.data);for(var n=Math.ceil(e.filesize/104857600),o=[],s=1;s<n;s+=1)o.push("".concat(c,"-part-").concat(s));T.getBatch(o,(function(n){n.filter((function(e){return e})).length!==o?l():(n.forEach((function(e,n){t.set(e.data,104857600*(n+1))})),Xe._FS.createDataFile("/",e.filename,t,!0,!1),j())}),(function(){}),"sparse")}else Xe._FS.createDataFile("/",e.filename,e.data,!0,!1),j();else l()})):l()})).catch((function(t){n.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+e.localization("Network Error")+"</strong>"}))}else j()},N=function(r,a){var i=e,c=Xe.loading.querySelector(".".concat(h.p2)),l=(r.split(".").pop(),function(e){if(e.data){if(1===e.data.t&&(c.innerHTML="BIOS ready",e.target.terminate(),I()),2===e.data.t){var t=e.data.file.split("/"),n=t.pop();n.split(".").pop(),Xe._FS.createPath("/",t.join("/"),!0,!0),Xe._FS.createDataFile("/"+t.join("/"),n,e.data.data,!0,!1),s+=e.data.data.length}if(4===e.data.t&&e.data.total>0){var o=Math.floor(e.data.current/e.data.total*100),r=e.data.name||"";o<=100&&o>0&&(c.innerHTML="Decompress BIOS ".concat(r," ").concat(o,"%"))}}}),u=!1,d=a.slice?a.slice(0,10):a.subarray(0,10),f=g(d);"7z"===f?(b(t).then((function(e){e.onmessage=l,e.postMessage(a)})),u=!0):"zip"!==f||["arcade","mame","mame2003","fba0.2.97.29"].includes(i.system)?"rar"===f&&(y(o,"rar").then((function(e){e.onmessage=messageCallBack,e.postMessage(a)})),u=!0):(b(n).then((function(e){e.onmessage=l,e.postMessage(a)})),u=!0),u||(s+=a.length,c.innerHTML="BIOS ready",Xe._FS.createDataFile("/",r,a,!0,!1),I())},L=function(){Xe.loading.querySelector(".".concat(h.p1)).innerHTML="Game Core ready";var t=e.config.biosUrl,n=e;it.bindFunction.call(e),it.setGamepadDialog.call(e),it.setCacheDialog.call(e),it.setLoadingDialog.call(e),it.setNetplayDialog.call(e),it.setCheatDialog.call(e),it.initGamepad.call(e),it.initKeyboard.call(e),it.listeners.call(e),Xe._FS.createFolder("/","etc",!0,!0),Xe.FS.mkdir("/data"),Xe.FS.mkdir("/data/saves"),"undefined"!=typeof IDBFS?Xe.FS.mount(IDBFS,{},"/data/saves"):Xe.FS.mount(Xe.FS.filesystems.IDBFS,{},"/data/saves"),Xe.FS.mkdir("/shader"),Xe.FS.syncfs(!0,(function(e){})),it.initShaders();var o="";o+="savefile_directory = /data/saves\n",o+="video_vsync = true\n",o+="screenshot_directory = /\n",o+="video_shader = /shader/shader.glslp\n",o+="video_shader_enable = true\n",o+="video_font_enable = false\n",o+="video_scale = 1.0\n",o+="video_gpu_screenshot = false\n",o+="audio_latency = 96\n";var r=ct.defaultCoreOptionsValues.call(e);n.lightgun&&("nes"===e.system&&(o+='input_libretro_device_p2 = "258"\n'),"segaMS"!==e.system&&"segaMD"!==e.system&&"segaCD"!==e.system||(r.genesis_plus_gx_gun_cursor="yes",r.genesis_plus_gx_invert_mouse="yes",r.genesis_plus_gx_bram="per game",o+='input_libretro_device_p2 = "260"\n'),"snes"===e.system&&(o+='input_libretro_device_p2 = "260"\n'),["snes2002","snes2005","snes2010","snesnext"].includes(e.system)&&(o+='input_libretro_device_p2 = "260"\n')),n.mouse&&("snes"===e.system&&(o+="input_libretro_device_p1 = 2\n"),["snes2002","snes2005","snes2010","snesnext"].includes(e.system)&&(o+="input_libretro_device_p1 = 2\n")),n.multitap&&("snes"===e.system&&(o+="input_libretro_device_p2 = 257\n"),["snes2002","snes2005","snes2010","snesnext"].includes(e.system)&&(o+="input_libretro_device_p2 = 257\n")),"n64"===e.system&&(o+="input_libretro_device_p1 = 5\n"),n.system,o+="fastforward_ratio = 1.0\n",o+="video_smooth = false\n";var a=ue(r,ct.storage.get("core-options")||{}),i="";if(2===n.coreVer?(Xe._FS.createDataFile("/etc","retroarch.cfg",o,!0,!0),Xe._FS.createFolder("/home/web_user","retroarch",!0,!0),Xe._FS.createFolder("/home/web_user/retroarch","userdata",!0,!0),Xe._FS.createDataFile("/home/web_user/retroarch/userdata","retroarch.cfg",i,!0,!0)):(Xe._FS.createDataFile("/etc","retroarch.cfg",o,!0,!0),Xe._FS.createFolder("/home/web_user",".config",!0,!0),Xe._FS.createFolder("/home/web_user/.config","retroarch",!0,!0),Xe._FS.createDataFile("/home/web_user/.config/retroarch","retroarch-core-options.cfg",i,!0,!0)),a&&Object.keys(a).forEach((function(e){if(n.lightgun&&"nes"===n.system&&"system_type"===e)return!1;i+="".concat(e,' = "').concat(a[e],'"\n'),M.call(n,n.elements.container,"start-game",(function(t){it.setVariable(e,a[e])}))})),t){var s=t.split("/"),c=s[s.length-1];c.indexOf("?")>-1&&(c=c.substr(0,c.indexOf("?"))),c.split(".").pop();var l=Xe.loading.querySelector(".".concat(h.p2));Ee.a.head(t,{}).then((function(o){var r=o.headers["content-length"],a=o.headers["content-type"],i=(o.headers["last-modified"],n.system),s=function(){Ee.a.get(t,{onDownloadProgress:function(e){var t=e.total?"".concat(Math.floor(e.loaded/e.total*100),"%"):"";l.innerHTML="Download BIOS ".concat(t)},responseType:"arraybuffer"}).then((function(e){var t=new Uint8Array(e.data);_.db&&_.put(f,{filename:c,filesize:t.length,filetype:a,data:t}),N(c,t)})).catch((function(t){l.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+e.localization("Network Error")+"</strong>"}))};_.db?_.get(i,(function(e){e&&e.filename===c&&e.filesize-r==0&&e.filetype===a?N(e.filename,e.data):s()})):s()})).catch((function(t){l.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+e.localization("Network Error")+"</strong>"}))}else I()},F=function(e){var t;t=e.byteLength?new Uint8Array(e):e,"undefined"!=typeof GLOBAL_BASE?Xe.Module.HEAPU8.set(t,GLOBAL_BASE):"undefined"!=typeof Runtime&&Runtime.GLOBAL_BASE?Xe.Module.HEAPU8.set(t,Runtime.GLOBAL_BASE):Xe.Module.HEAPU8.set(t,8)},z=function(n){var o=Xe.loading.querySelector(".".concat(h.p1)),r="";M.call(d,d.elements.container,"script-loaded",(function(e){!function(){null!==Xe.wasmData?(window.Module.wasmBinary=Xe.wasmData,A(),window.Module.monitorRunDependencies=function(e){0===e&&L()},window.Module.onRuntimeInitialized=function(){}):(A(),window.Module.monitorRunDependencies=function(e){console.log("monitorRunDependencies, ",e)},window.Module.onRuntimeInitialized=function(){Xe.Module||(Xe.Module=window.Module),Xe.Module&&Xe.Module.FS?Xe.FS=Xe.Module.FS:Xe.FS=window.FS,console.log("onRuntimeInitialized"),L()});var e=window.Module;if(null!==Xe.wasmData&&(e.wasmBinary=Xe.wasmData),ae&&null!==Xe.wasmData){var t=new Blob([r],{type:"text/javascript"}),n=D("script",{src:v.createObjectURL(t)});document.body.appendChild(n),n.onload=function(){void 0===window.addRunDependency&&"undefined"!=typeof EmulatorJS&&(Xe.Module=EmulatorJS(e),EmulatorJS=void 0),null!==Xe.memData&&F(Xe.memData),Xe.Module||(Xe.Module=window.Module),Xe.Module&&Xe.Module.FS?Xe.FS=Xe.Module.FS:Xe.FS=window.FS}}else r=function(e){for(var t=[],n=0;n<e.length;n+=1){var o=e[n];o>255&&(o&=255),t.push(String.fromCharCode(o))}return t.join("")}(r),window.eval(r),void 0===window.addRunDependency&&"undefined"!=typeof EmulatorJS&&(Xe.Module=EmulatorJS(e),EmulatorJS=void 0),null!==Xe.memData&&F(Xe.memData),Xe.Module||(Xe.Module=window.Module),Xe.Module&&Xe.Module.FS?Xe.FS=Xe.Module.FS:Xe.FS=window.FS,window.EJS_MODULE=Xe.Module,window.ejs_loader=Xe,window.ejs_media=it;r=null}()}));var a=function(t){if(t.data){if(1===t.data.t&&(P.call(d,d.elements.container,"script-loaded"),t.target.terminate()),2===t.data.t){var n=t.data.file.split("/").pop(),a=n.split(".").pop();Xe.coreFileData[n]=t.data.data,"js"!==a||n.includes(".worker.js")||(r=t.data.data),"mem"===a&&(Xe.memData=t.data.data),"wasm"===a&&(Xe.wasmData=t.data.data)}4===t.data.t&&t.data.total>0&&(o.innerHTML=e.localization("Decompress Game Core")+" ".concat(Math.floor(t.data.current/t.data.total*100),"%"))}};b(t).then((function(e){e.onmessage=a,e.postMessage(n)}))},B=function(t){return U(Xe.loading.querySelector(".".concat(h["start-game"])),!0),function(){var t=Xe.loading.querySelector(".".concat(h.p1)),n=e;t.innerHTML=n.localization("Loading")+"...";var o=setInterval((function(){if(!0===r&&!0===a&&!0===i){window.Module={TOTAL_MEMORY:268435456,noInitialRun:!0,arguments:[],preRun:[],postRun:[],canvas:p,print:function(e){!0===window.EJS_DEBUG_XX&&console.log(e)},printErr:function(e){!0===window.EJS_DEBUG_XX&&console.log(e)},totalDependencies:0,monitorRunDependencies:function(e){},locateFile:function(e){var t=null;if(e.includes(".worker.js")){Object.keys(Xe.coreFileData).includes(e)&&(t=Xe.coreFileData[e]);var n=new Blob([""],{type:"application/javascript"});return window.URL.createObjectURL(n)}return e.includes(".js.mem")&&(Object.keys(Xe.coreFileData).includes(e)&&(t=Xe.coreFileData[e]),t)?(Xe.memData=null,t.buffer):e},readAsync:function(e,t,n){if(e instanceof ArrayBuffer)setTimeout((function(){t(e)}),500);else{var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){200==o.status||0==o.status&&o.response?t(o.response):n()},o.onerror=n,o.send(null)}}};var e=Math.ceil((new Date).valueOf()/1e3),s=d.customPaths&&"string"==typeof d.customPaths["v.json"]?d.customPaths["v.json"]:d.dataPath+"v.json?t="+e,l=function(e,o){var r=d.customPaths&&"string"==typeof d.customPaths[e]?d.customPaths[e]:2===d.coreVer?d.dataPath+e+"?v="+o:d.dataPath+"old/"+e+"?v="+o;Ee.a.get(r,{onDownloadProgress:function(e){var o=e.total?"".concat(Math.floor(e.loaded/e.total*100),"%"):"";t.innerHTML=n.localization("Download Game Core")+" ".concat(o)},responseType:"arraybuffer"}).then((function(t){var n=new Uint8Array(t.data);if(w.db&&w.put(e,{version:o,data:n}),2===d.coreVer)z(n);else{var r=n.slice?n.slice(12):n.subarray(12);r.set([55,122,188,175,39,28,0,3],0),n=null,z(r)}})).catch((function(e){t.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+n.localization("Network Error")+"</strong>"}))};Ee.a.get(s,{}).then((function(e){var t,o=u[n.system],r=e.data[n.system],a=r.version?r.version:1,i=Boolean(r.netplay),s=Boolean(r.state),f=Boolean(r.asmjs),p=Boolean(r.wasm);2!==d.coreVer&&r.old&&(f=Boolean(r.old.asmjs),p=Boolean(r.old.wasm)),"nds"!=n.system||se.wasm||(s=!1),!1===d.statesSupported&&(s=!1),Xe.coreFileVersion=a,Xe.coreFileName=o;var h=!1;if(["webgl2","experimental-webgl2"].includes(se.webgl.WEBGL_CONTEXT)&&(h=!0),"undefined"!=typeof EJS_N64_LEGACY&&1==EJS_N64_LEGACY&&(h=!1),"mame"==n.system){var m=n.mameCore;if(!m||null===m||2!==m.split("|").length)return void(v.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+n.localization("Missing mame config")+"</strong>");var v=m.split("|");Xe.coreFileName="".concat(n.system,"-").concat(v[0]),s="1"===v[1],S(n.elements.buttons.saveState)&&U(n.elements.buttons.saveState,!s),S(n.elements.buttons.loadState)&&U(n.elements.buttons.loadState,!s),U(ct.contextMenu.querySelectorAll("ul li").item(2),!s),U(ct.contextMenu.querySelectorAll("ul li").item(3),!s),t=2===n.coreVer?"":n.system.concat("-old-").concat(v[0],"-wasm.data"),v[0]?(se.wasm&&p?c=!0:(v.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+n.localization("Webassembly support is not detected in this browser")+"</strong>",t=""),t&&(w.db?w.get(t,(function(e){if(e&&e.version===a)if(2===d.coreVer)z(e.data);else{var n=e.data.slice?e.data.slice(12):e.data.subarray(12);n.set([55,122,188,175,39,28,0,3],0),z(n)}else l(t,a)})):l(t,a))):v.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+n.localization("Unsupported Game")+"</strong>"}else{var g;if(t=!1,se.wasm&&p?(g="wasm",t=!0,"n64"!==n.system||h||(g="legacy-wasm"),c=!0):f&&(t=!0,g="asmjs","n64"!==n.system||h||(g="legacy-asmjs")),"undefined"!=typeof EJS_CUSTOM_COREFILE&&(t=EJS_CUSTOM_COREFILE),!0!==t)return void(v.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+n.localization("Please upgrade your browser to the latest version")+"</strong>");t=2===n.coreVer?o+"-"+g+".data":o+"-old-"+g+".data","undefined"!=typeof EJS_CUSTOM_COREFILE&&(t=EJS_CUSTOM_COREFILE),w.db?w.get(t,(function(e){if(!e||e.version!==a||"undefined"!=typeof EJS_DEBUG_XX&&!0===EJS_DEBUG_XX)l(t,a);else if(2===d.coreVer)z(e.data);else{var n=e.data.slice?e.data.slice(12):e.data.subarray(12);n.set([55,122,188,175,39,28,0,3],0),z(n)}})):l(t,a)}if(2===n.coreVer)if(S(n.elements.buttons.gamepad)&&U(n.elements.buttons.gamepad,!0),Array.isArray(n.elements.buttons.play))for(var b=0;b<n.elements.buttons.play.length;b++)S(n.elements.buttons.play[b])&&U(n.elements.buttons.play[b],!0);else S(n.elements.buttons.play)&&U(n.elements.buttons.play,!0);i||S(n.elements.buttons.netplay)&&U(n.elements.buttons.netplay,!0),S(n.elements.buttons.saveState)&&U(n.elements.buttons.saveState,!s),S(n.elements.buttons.loadState)&&U(n.elements.buttons.loadState,!s),U(ct.contextMenu.querySelectorAll("ul li").item(2),!s),U(ct.contextMenu.querySelectorAll("ul li").item(3),!s),d.setStatesSupported(s)})).catch((function(e){t.innerHTML='<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+n.localization("Network Error")+"</strong>"})),clearInterval(o),Xe.romdb=x}}),500)}(),!1};R(Xe.loading.querySelector(".".concat(h["start-game"])),"click touchstart",B),!0===d.startOnLoad&&B()}},Ke=Xe,Je=n(161);function $e(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Ze(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Qe,et,tt,nt,ot,rt=(Qe=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],et=function(){function e(t){var n=t.targetModal,o=t.triggers,r=void 0===o?[]:o,a=t.onShow,i=void 0===a?function(){}:a,s=t.onClose,c=void 0===s?function(){}:s,l=t.openTrigger,u=void 0===l?"data-micromodal-trigger":l,d=t.closeTrigger,f=void 0===d?"data-micromodal-close":d,p=t.disableScroll,h=void 0!==p&&p,m=t.disableFocus,v=void 0!==m&&m,g=t.awaitCloseAnimation,b=void 0!==g&&g,y=t.debugMode,w=void 0!==y&&y,x=t.closeByEsckey,_=void 0===x||x;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modal=document.getElementById(n),this.config={debugMode:w,disableScroll:h,openTrigger:u,closeTrigger:f,onShow:i,onClose:c,awaitCloseAnimation:b,disableFocus:v,closeByEsckey:_},r.length>0&&this.registerTriggers.apply(this,$e(r)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var t,n;return t=e,(n=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];n.forEach((function(t){t.addEventListener("click",(function(){return e.showModal()}))}))}},{key:"showModal",value:function(){this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(K({"is-open":!0})),this.setFocusToFirstNode(),this.addEventListeners(),this.config.onShow(this.modal)}},{key:"closeModal",value:function(){var e=this.modal;this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.config.onClose(this.modal),this.config.awaitCloseAnimation?this.modal.addEventListener("animationend",(function t(){e.classList.remove(K({"is-open":!0})),e.removeEventListener("animationend",t,!1)}),!1):e.classList.remove(K({"is-open":!0}))}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(e){e.target.hasAttribute(this.config.closeTrigger)&&(this.closeModal(),e.preventDefault())}},{key:"onKeydown",value:function(e){this.config.closeByEsckey&&27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.maintainFocus(e)}},{key:"getFocusableNodes",value:function(){var e=this.modal.querySelectorAll(Qe);return Object.keys(e).map((function(t){return e[t]}))}},{key:"setFocusToFirstNode",value:function(){if(!this.config.disableFocus){var e=this.getFocusableNodes();e.length&&e[0].focus()}}},{key:"maintainFocus",value:function(e){var t=this.getFocusableNodes();if(this.modal.contains(document.activeElement)){var n=t.indexOf(document.activeElement);e.shiftKey&&0===n&&(t[t.length-1].focus(),e.preventDefault()),e.shiftKey||n!==t.length-1||(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&Ze(t.prototype,n),e}(),tt=null,nt=function(e){if(!document.getElementById(e))return!1},ot=function(e,t){if(e.length<=0&&(console.warn("MicroModal v".concat(version,": ❗Please specify at least one %c'micromodal-trigger'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>')),!t)return!0;for(var n in t)nt(n);return!0},{init:function(e){var t=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),n=$e(document.querySelectorAll("[".concat(t.openTrigger,"]"))),o=function(e,t){var n=[];return e.forEach((function(e){var o=e.attributes[t].value;void 0===n[o]&&(n[o]=[]),n[o].push(e)})),n}(n,t.openTrigger);if(!0!==t.debugMode||!1!==ot(n,o))for(var r in o){var a=o[r];t.targetModal=r,t.triggers=$e(a),new et(t)}},show:function(e,t){var n=t||{};return n.targetModal=e,!0===n.debugMode&&!1===nt(e)?tt=null:(tt=new et(n)).showModal(),tt},close:function(){tt.closeModal()}}),at={defaultControllers:{0:{0:{value:"88",value2:"1"},1:{value:"83",value2:"3"},2:{value:"16",value2:"8"},3:{value:"13",value2:"9"},4:{value:"38",value2:"12"},5:{value:"40",value2:"13"},6:{value:"37",value2:"14"},7:{value:"39",value2:"15"},8:{value:"90",value2:"0"},9:{value:"65",value2:"2"},10:{value:"81",value2:"4"},11:{value:"69",value2:"5"},12:{value:"82",value2:"6"},13:{value:"87",value2:"7"},14:{},15:{},16:{value:"72"},17:{value:"70"},18:{value:"71"},19:{value:"84"},20:{value:"76"},21:{value:"74"},22:{value:"75"},23:{value:"73"},24:{},25:{},26:{}},1:{},2:{},3:{}},controllers:{},virtualGamepadContainer:null,keyMap:{8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause/break",20:"caps lock",27:"escape",32:"space",33:"page up",34:"page down",35:"end",36:"home",37:"left arrow",38:"up arrow",39:"right arrow",40:"down arrow",45:"insert",46:"delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",91:"left window key",92:"right window key",93:"select key",96:"numpad 0",97:"numpad 1",98:"numpad 2",99:"numpad 3",100:"numpad 4",101:"numpad 5",102:"numpad 6",103:"numpad 7",104:"numpad 8",105:"numpad 9",106:"multiply",107:"add",109:"subtract",110:"decimal point",111:"divide",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"num lock",145:"scroll lock",186:"semi-colon",187:"equal sign",188:"comma",189:"dash",190:"period",191:"forward slash",192:"grave accent",219:"open bracket",220:"back slash",221:"close braket",222:"single quote"},saveLoaddbDB:{put:function(e,t){var n=indexedDB.open("ejs-states",1);n.onerror=function(){},n.onsuccess=function(){var o=n.result.transaction(["states"],"readwrite").objectStore("states").put(t,e);o.onerror=function(){},o.onsuccess=function(){}},n.onupgradeneeded=function(){var e=n.result;e.objectStoreNames.contains("states")||e.createObjectStore("states")}},get:function(e){return new Promise((function(t,n){var o=indexedDB.open("ejs-states",1);o.onerror=function(){},o.onsuccess=function(){var n=o.result.transaction(["states"],"readwrite").objectStore("states").get(e);n.onsuccess=async function(e){var n=e.target.result;n&&t(n)},n.onerror=function(){}},o.onupgradeneeded=function(){var e=o.result;e.objectStoreNames.contains("states")||e.createObjectStore("states")}}))}},saveLoadDB:function(e){try{if(ct&&"function"==typeof ct.getCoreOptionsValues){var t=ct.getCoreOptionsValues()["save-state-location"],n=ct.getCoreOptionsValues()["save-state-slot"],o=this.config.gameUrl.split("/").pop();if(this.gameName&&(o=this.gameName),!this.gameName&&this.config.gameUrl.startsWith("blob:")||!window.indexedDB)return!1;var r=o+"-"+n;if(!t||"download"===t)return!1;if("save"===e)try{var a=at.saveState();at.saveLoaddbDB.put(r,a)}catch(e){return!1}else at.saveLoaddbDB.get(r).then((function(e){EJS_loadState(e)}));return!0}return!1}catch(e){return!1}},gamepad:null,allowCheat:!0,connection:null,connected:!1,playerName:"",players:[],waitingList:{},roomMaster:null,inputsData:{},coreOptionData:{},currentFrame:0,wait:!1,progressHelper:{},icons:{lock:'<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="lock" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-lock fa-w-14 fa-3x"><path fill="currentColor" d="M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z" class=""></path></svg>'},disableInput:!1,disableControl:function(e){if(e){for(var t=0;t<24;t+=1)at.simulateInputFn(0,t,0),at.simulateInputFn(1,t,0),at.simulateInputFn(2,t,0),at.simulateInputFn(3,t,0);at.disableInput=!0}else at.disableInput=!1},loadRoomsListTimer:null,loadRoomsList:function(){},stopLoadRooms:function(){at.loadRoomsListTimer&&clearTimeout(at.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":K({"dialog-container":!0}),tabs:K({tabs:!0}),"dialog-title":K({"dialog-title":!0}),"dialog-content":K({"dialog-content":!0}),"dialog-buttons":K({"dialog-buttons":!0}),overlay:K({overlay:!0}),"key-setting-popup":K({"key-setting-popup":!0}),"tabs-panel":K({"tabs-panel":!0}),"tabs-content":K({"tabs-content":!0}),"button-container":K({"button-container":!0}),set:K({set:!0}),active:K({active:!0}),"btn-cancel":K({"btn-cancel":!0}),"btn-reset":K({"btn-reset":!0}),"btn-clear":K({"btn-clear":!0}),"btn-create":K({"btn-create":!0}),"btn-submit":K({"btn-submit":!0}),"btn-join-room":K({"btn-join-room":!0}),"btn-quit":K({"btn-quit":!0}),"btn-create-room":K({"btn-create-room":!0}),"netplay-player-name":K({"netplay-player-name":!0}),"netplay-roomlist":K({"netplay-roomlist":!0}),"netplay-room-name-input":K({"netplay-room-name-input":!0}),"netplay-room-password-input":K({"netplay-room-password-input":!0}),"netplay-create-room-set":K({"netplay-create-room-set":!0}),"netplay-room":K({"netplay-room":!0}),modal:K({modal:!0}),modal__overlay:K({modal__overlay:!0}),modal__container:K({modal__container:!0}),modal__header:K({modal__header:!0}),modal__title:K({modal__title:!0}),modal__close:K({modal__close:!0}),modal__content:K({modal__content:!0}),modal__btn:K({modal__btn:!0}),"modal__btn-primary":K({"modal__btn-primary":!0}),"micromodal-slide":K({"micromodal-slide":!0}),modal__errmsg:K({modal__errmsg:!0}),modal__footer:K({modal__footer:!0}),"cheats-add":K({"cheats-add":!0}),"cheats-list":K({"cheats-list":!0}),"cheat-code-input":K({"cheat-code-input":!0}),"cheat-name-input":K({"cheat-name-input":!0}),"ejs-switch":K({"ejs-switch":!0}),"ejs-delete-cheat":K({"ejs-delete-cheat":!0})},initShaders:function(){for(var e=_e,t=Object.keys(e),n="",o=0;o<t.length;o+=1)n=e[t[o]],Ke.FS.writeFile("/shader/".concat(t[o]),n),ct.storage.get("shader")===t[o]&&Ke.FS.writeFile("/shader/shader.glslp",n)},setGamepadDialog:function(){var e=this;e.elements.dialogs.gamepad.innerHTML='\n        <div class="'+at.classNames["dialog-container"]+'">\n            <div class="'+at.classNames["dialog-title"]+'">\n                <h4>'+e.localization("Control Settings")+'</h4>\n            </div>\n            \n            <ul class="'+at.classNames.tabs+'" id="controls-tabs">\n                <li class="tabs-title" role="presentation"><a href="#" onclick="return false" role="tab" aria-controls="controls-0" aria-selected="false" id="controls-0-label">'+e.localization("Player 1")+'</a></li>\n                <li class="tabs-title" role="presentation"><a href="#" onclick="return false" role="tab" aria-controls="controls-1" aria-selected="false" id="controls-1-label">'+e.localization("Player 2")+'</a></li>\n                <li class="tabs-title" role="presentation"><a href="#" onclick="return false" role="tab" aria-controls="controls-2" aria-selected="false" id="controls-2-label">'+e.localization("Player 3")+'</a></li>\n                <li class="tabs-title" role="presentation"><a href="#" onclick="return false" role="tab" aria-controls="controls-3" aria-selected="false" id="controls-3-label">'+e.localization("Player 4")+'</a></li>\n            </ul>\n            <div class="'+at.classNames["dialog-content"]+'">\n            <div class="'+at.classNames["tabs-content"]+' controls">\n                \n            </div>\n            </div>\n            <div class="'+at.classNames["dialog-buttons"]+'">\n                <a href="#" onclick="return false" class="'+at.classNames["btn-submit"]+'">'+e.localization("Update")+'</a>\n                <a href="#" onclick="return false" class="'+at.classNames["btn-reset"]+'">'+e.localization("Reset")+'</a>\n                <a href="#" onclick="return false" class="'+at.classNames["btn-clear"]+'">'+e.localization("Clear")+'</a>\n                <a href="#" onclick="return false" class="'+at.classNames["btn-cancel"]+'">'+e.localization("Cancel")+'</a>\n            </div>\n            <div class="'+at.classNames.overlay+'" hidden>\n                <div class="'+at.classNames["key-setting-popup"]+'">\n                    <span>[Select]</span><br />\n                    <div style="color:#fff !important">'+e.localization("Press keyboard or gamepad")+"</div>\n                </div>\n            </div>\n        </div>\n        ";var t='\n        <div class="'.concat(at.classNames["tabs-panel"],'" id="controls-{index}" hidden>\n            <div>\n                <div style="">\n                    <div class="gamepad" style="font-size:12px">Connected gamepad: <span class="gamepad-name">n/a</span></div>\n                </div>\n                <div style="width:25%;float:left">&nbsp;</div>\n                <div style="font-size:12px;width:50%;float:left">\n                    <div class="row">\n                        <div style="text-align:center;width:50%;float:left">'+e.localization("Gamepad")+'</div>\n                        <div style="text-align:center;width:50%;float:left">'+e.localization("Keyboard")+'</div>\n                    </div>\n                </div>\n                <div style="clear:both"></div>\n            </div>\n        </div>'),n='\n        <div class="'.concat(at.classNames["button-container"],'" data-id="{id}" data-index="{index}" data-label="{label}" style="margin-bottom:10px">\n            <div style="width:25%;float:left;font-size:12px">\n                <label>{label}:</label>\n            </div>\n            <div style="width:50%;float:left">\n                <div>\n                    <div style="width:50%;float:left;padding: 0 5px;">\n                        <input style="text-align:center;height:25px;width: 100%;" type="text" data-id="{id}" data-value="" data-type="2" data-index="{index}" readonly="" placeholder="">\n                    </div>\n                    <div style="width:50%;float:left;padding: 0 5px;">\n                        <input style="text-align:center;height:25px;width: 100%;" type="text" data-id="{id}" data-value="" data-type="1" data-index="{index}" readonly="" placeholder="">\n                    </div>\n                    <div style="clear:both"></div>\n                </div>\n            </div>\n            <div style="width:25%;float:left">\n                <a class="').concat(at.classNames.set,'" href="#" onclick="return false">'+e.localization("Set")+'</a>\n            </div>\n            <div style="clear:both"></div>\n        </div>');if("nes"===e.system)var o={0:"B",2:"SELECT",3:"START",4:"UP",5:"DOWN",6:"LEFT",7:"RIGHT",8:"A",24:e.localization("QUICK SAVE STATE"),25:e.localization("QUICK LOAD STATE"),26:e.localization("CHANGE STATE SLOT")};else if("snes"===e.system)o={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:e.localization("QUICK SAVE STATE"),25:e.localization("QUICK LOAD STATE"),26:e.localization("CHANGE STATE SLOT")};else if("n64"===e.system)o={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:e.localization("QUICK SAVE STATE"),25:e.localization("QUICK LOAD STATE"),26:e.localization("CHANGE STATE SLOT")};else if("nds"===e.system)o={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:e.localization("QUICK SAVE STATE"),25:e.localization("QUICK LOAD STATE"),26:e.localization("CHANGE STATE SLOT")};else o={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:e.localization("QUICK SAVE STATE"),25:e.localization("QUICK LOAD STATE"),26:e.localization("CHANGE STATE SLOT")};["arcade","mame"].includes(e.system)&&(o[2]=e.localization("INSERT COIN")),!1===e.statesSupported&&(delete o[24],delete o[25],delete o[26]);for(var r=[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],a=function(a){e.elements.dialogs.gamepad.querySelector(".".concat(at.classNames["tabs-content"])).innerHTML+=t.replace(/{index}/g,a),r.forEach((function(t){o[t]&&(e.elements.dialogs.gamepad.querySelector("#controls-".concat(a)).innerHTML+=n.replace(/{index}/g,a).replace(/{id}/g,t).replace(/{label}/g,o[t]))})),e.elements.dialogs.gamepad.querySelector('[data-id="16"][data-index="'.concat(a,'"][data-type="2"]'))&&(e.elements.dialogs.gamepad.querySelector('[data-id="16"][data-index="'.concat(a,'"][data-type="2"]')).style.backgroundColor="#ccc"),e.elements.dialogs.gamepad.querySelector('[data-id="17"][data-index="'.concat(a,'"][data-type="2"]'))&&(e.elements.dialogs.gamepad.querySelector('[data-id="17"][data-index="'.concat(a,'"][data-type="2"]')).style.backgroundColor="#ccc"),e.elements.dialogs.gamepad.querySelector('[data-id="18"][data-index="'.concat(a,'"][data-type="2"]'))&&(e.elements.dialogs.gamepad.querySelector('[data-id="18"][data-index="'.concat(a,'"][data-type="2"]')).style.backgroundColor="#ccc"),e.elements.dialogs.gamepad.querySelector('[data-id="19"][data-index="'.concat(a,'"][data-type="2"]'))&&(e.elements.dialogs.gamepad.querySelector('[data-id="19"][data-index="'.concat(a,'"][data-type="2"]')).style.backgroundColor="#ccc"),e.elements.dialogs.gamepad.querySelector('[data-id="20"][data-index="'.concat(a,'"][data-type="2"]'))&&(e.elements.dialogs.gamepad.querySelector('[data-id="20"][data-index="'.concat(a,'"][data-type="2"]')).style.backgroundColor="#ccc"),e.elements.dialogs.gamepad.querySelector('[data-id="21"][data-index="'.concat(a,'"][data-type="2"]'))&&(e.elements.dialogs.gamepad.querySelector('[data-id="21"][data-index="'.concat(a,'"][data-type="2"]')).style.backgroundColor="#ccc"),e.elements.dialogs.gamepad.querySelector('[data-id="22"][data-index="'.concat(a,'"][data-type="2"]'))&&(e.elements.dialogs.gamepad.querySelector('[data-id="22"][data-index="'.concat(a,'"][data-type="2"]')).style.backgroundColor="#ccc"),e.elements.dialogs.gamepad.querySelector('[data-id="23"][data-index="'.concat(a,'"][data-type="2"]'))&&(e.elements.dialogs.gamepad.querySelector('[data-id="23"][data-index="'.concat(a,'"][data-type="2"]')).style.backgroundColor="#ccc")},i=0;i<=3;i+=1)a(i);Object.keys(at.controllers).forEach((function(t){at.controllers[t]&&Object.keys(at.controllers[t]).forEach((function(n){var o=e.elements.dialogs.gamepad.querySelector('[data-id="'.concat(n,'"][data-index="').concat(t,'"][data-type="1"]')),r=e.elements.dialogs.gamepad.querySelector('[data-id="'.concat(n,'"][data-index="').concat(t,'"][data-type="2"]'));if(!o||!r)return!1;var a=at.controllers[t][n];a&&(a.type&&1!==parseInt(a.type,10)?r.value="":a.value&&(o.value=at.keyMap[a.value]||"",o.setAttribute("data-value",a.value)),a.value2&&(r.value=isNaN(a.value2)?a.value2:"button ".concat(parseInt(a.value2,10)+1),r.setAttribute("data-value",a.value2)))}))})),M.call(this,e.elements.dialogs.gamepad.querySelector(".".concat(at.classNames["btn-submit"])),"click",(function(t){var n=e.elements.dialogs.gamepad.querySelectorAll("input"),o={};return Array.from(n).forEach((function(e){var t,n=e.getAttribute("data-index"),r=e.getAttribute("data-value");2===parseInt(e.getAttribute("data-type"),10)&&(t=e.getAttribute("data-value"));var a=e.getAttribute("data-id");o[n]||(o[n]={}),o[n][a]||(o[n][a]={}),r&&(o[n][a].value=r),t&&(o[n][a].value2=t)})),ct.storage.set({controllers:o}),at.controllers=o,U(e.elements.dialogs.gamepad,!0),e.elements.container.focus(),t.stopPropagation(),!1})),M.call(this,e.elements.dialogs.gamepad.querySelector(".".concat(at.classNames["btn-reset"])),"click",(function(t){at.controllers=JSON.parse(JSON.stringify(at.defaultControllers)),localStorage.removeItem(ct.storage.key);for(var n=e.elements.dialogs.gamepad.querySelectorAll("input"),o=0;o<n.length;o++){var r=n[o].getAttribute("data-index"),a=n[o].getAttribute("data-type"),i=n[o].getAttribute("data-id"),s=1==a?"value":"value2";at.defaultControllers[r]&&at.defaultControllers[r][i]&&at.defaultControllers[r][i][s]?(n[o].value=1==a?at.keyMap[at.defaultControllers[r][i][s]]:"button "+(parseInt(at.defaultControllers[r][i][s])+1),n[o].setAttribute("data-value",at.defaultControllers[r][i][s])):(n[o].value="",n[o].setAttribute("data-value",""))}})),M.call(this,e.elements.dialogs.gamepad.querySelector(".".concat(at.classNames["btn-clear"])),"click",(function(t){var n={0:{},1:{},2:{},3:{}};for(var r in o)n[0][r]={},n[1][r]={},n[2][r]={},n[3][r]={};at.controllers=n,localStorage.setItem(ct.storage.key,JSON.stringify({controllers:at.controllers}));for(var a=e.elements.dialogs.gamepad.querySelectorAll("input"),i=0;i<a.length;i++)a[i].value="",a[i].setAttribute("data-value","")})),M.call(this,e.elements.dialogs.gamepad.querySelector(".".concat(at.classNames["btn-cancel"])),"click",(function(t){return U(e.elements.dialogs.gamepad,!0),e.elements.container.focus(),t.stopPropagation(),!1})),Array.from(e.elements.dialogs.gamepad.querySelectorAll(".".concat(at.classNames.tabs," li"))).forEach((function(t){M.call(e,t,"mousedown",(function(n){G(e.elements.dialogs.gamepad.querySelectorAll(".".concat(at.classNames.tabs," li")),at.classNames.active,!1),G(t,at.classNames.active,!0);var o=t.querySelector("a").getAttribute("aria-controls");return Array.from(e.elements.dialogs.gamepad.querySelectorAll(".".concat(at.classNames["tabs-content"]," .").concat(at.classNames["tabs-panel"]))).forEach((function(e){U(e,!0)})),U(e.elements.dialogs.gamepad.querySelector(".".concat(at.classNames["tabs-content"]," #").concat(o)),!1),n.stopPropagation(),!1}))})),P.call(e,e.elements.dialogs.gamepad.querySelector('[aria-controls="controls-0"]').parentNode,"mousedown");var s=e.elements.dialogs.gamepad.querySelector(".".concat(at.classNames.overlay));M.call(e,s,"mousedown",(function(e){U(s,!0),e.stopPropagation()})),Array.from(e.elements.dialogs.gamepad.querySelectorAll(".".concat(at.classNames["button-container"]))).forEach((function(t){M.call(e,t,"mousedown",(function(n){P.call(e,t.querySelector("a.".concat(at.classNames.set)),n.type,!0,{})}))})),Array.from(e.elements.dialogs.gamepad.querySelectorAll(".".concat(at.classNames["tabs-panel"]," a.").concat(at.classNames.set))).forEach((function(t){M.call(e,t,"mousedown",(function(n){var o=t.parentNode.parentNode,r=o.getAttribute("data-id"),a=o.getAttribute("data-index"),i=o.getAttribute("data-label");U(s,!1),s.setAttribute("data-id",r),s.setAttribute("data-index",a);var c="[ ".concat(i," ]");at.gamepad.gamepads[a]&&r<16?c+='<br /><span style="font-size:12px">Gamepad:'.concat(at.gamepad.gamepads[a].id,"</span><br />"+e.localization("Press keyboard or gamepad")+"<br/>"+e.localization("Press escape (esc) to clear")):c+="<br />Press keyboard<br/>"+e.localization("Press escape (esc) to clear"),s.querySelector(".".concat(at.classNames["key-setting-popup"])).innerHTML=c,n.stopPropagation()}))}))},setCacheDialog:function(){var e=this;e.elements.dialogs.cache.innerHTML='\n        <div class="'.concat(at.classNames["dialog-container"],'">\n            <div class="').concat(at.classNames["dialog-title"],'">\n                <h4>'+e.localization("Cache Manager")+'</h4>\n            </div>\n            <div class="').concat(at.classNames["dialog-content"],'">\n\n            </div>\n            <div class="').concat(at.classNames["dialog-buttons"],'">\n                <a href="#" onclick="return false" class="').concat(at.classNames["btn-cancel"],'">'+e.localization("Close")+"</a>\n            </div>\n        </div>\n        "),M.call(this,e.elements.dialogs.cache.querySelector(".".concat(at.classNames["btn-cancel"])),"click",(function(t){return U(e.elements.dialogs.cache,!0),e.elements.container.focus(),t.stopPropagation(),!1})),M.call(this,e.elements.dialogs.cache.querySelector(".".concat(at.classNames["dialog-title"]," a")),"click",(function(t){return Ke.romdb&&(Ke.romdb.clear(),e.elements.dialogs.cache.querySelector(".".concat(at.classNames["dialog-content"])).innerHTML='<div style="text-align:center">'+e.localization("Empty")+"</div>"),t.stopPropagation(),!1}))},showLoading:function(e){rt.show("modal-6ed698f3d04061f5",{closeByEsckey:!1}),e&&console.log(""),U(this.elements.dialogs.loading,!1)},hideLoading:function(){rt.close(),U(this.elements.dialogs.loading,!0)},setLoadingDialog:function(){this.elements.dialogs.loading&&(this.elements.dialogs.loading.innerHTML='\n            <div class="'.concat(at.classNames.modal," ").concat(at.classNames["micromodal-slide"],'" id="modal-6ed698f3d04061f5" aria-hidden="true">\n                <div class="').concat(at.classNames.modal__overlay,'" tabindex="-1">\n                <div class="').concat(at.classNames.modal__container,'" role="dialog" aria-modal="true" aria-labelledby="modal-6ed698f3d04061f5-title">\n                '+this.localization("Loading")+"...\n                </div>\n                </div>\n            </div>"))},setCheatDialog:function(){var e=this;if(e.elements.dialogs.cheat){e.elements.dialogs.cheat.innerHTML='\n            <div class="'.concat(at.classNames["dialog-container"],'">\n                <div class="').concat(at.classNames["dialog-title"],'">\n                    <h4>Cheats</h4>\n                </div>\n                <div class="').concat(at.classNames["dialog-content"],'">\n                    <div class="').concat(at.classNames["cheats-list"],'">\n                        \n                    </div>\n                </div>\n                <div class="').concat(at.classNames["dialog-buttons"],'">\n                    <a href="#" onclick="return false" class="').concat(at.classNames["cheats-add"],'">'+e.localization("Add Cheat")+'</a>\n                    <a href="#" onclick="return false" class="').concat(at.classNames["btn-submit"],'">'+e.localization("OK")+'</a>\n                    <a href="#" onclick="return false" class="').concat(at.classNames["btn-cancel"],'">Close</a>\n                </div>\n            </div>\n\n            \n\n            <div class="').concat(at.classNames.modal," ").concat(at.classNames["micromodal-slide"],'" id="modal-85cd7a1c543a484b" aria-hidden="true">\n                <div class="').concat(at.classNames.modal__overlay,'" tabindex="-1" data-modal-close>\n                <div class="').concat(at.classNames.modal__container,'" style="width:100%" role="dialog" aria-modal="true" aria-labelledby="modal-85cd7a1c543a484b-title">\n                    <div class="').concat(at.classNames.modal__header,'">\n                    <h2 class="').concat(at.classNames.modal__title,'" id="modal-85cd7a1c543a484b-title">\n                    '+e.localization("Add Cheat Code")+'\n                    </h2>\n                    <button class="').concat(at.classNames.modal__close,'" aria-label="Close modal" data-modal-close></button>\n                    </div>\n                    <main class="').concat(at.classNames.modal__content,'" id="modal-85cd7a1c543a484b-content">\n\n                        <div class="').concat(at.classNames.modal__errmsg,'"></div>\n                        <strong>'+e.localization("Code")+'</strong><br />\n                        <textarea style="width:100%;height:80px;" class="').concat(at.classNames["cheat-code-input"],'"></textarea><br />\n                        <strong>'+e.localization("Description")+'</strong><br />\n                        <input type="text" class="').concat(at.classNames["cheat-name-input"],'" /><br />\n\n                    </main>\n                    <footer class="').concat(at.classNames.modal__footer,'">\n                    <button class="').concat(at.classNames.modal__btn," ").concat(at.classNames["modal__btn-primary"],'">'+e.localization("Submit")+'</button>\n                    <button class="').concat(at.classNames.modal__btn,'" data-modal-close aria-label="Close">'+e.localization("Close")+"</button>\n                    </footer>\n                </div>\n                </div>\n            </div>\n            ");var t=e.elements.dialogs.cheat.querySelector("#modal-85cd7a1c543a484b");M.call(this,e.elements.dialogs.cheat.querySelector(".".concat(at.classNames["cheats-add"])),"click",(function(e){return rt.show("modal-85cd7a1c543a484b",{closeTrigger:"data-modal-close"}),!1}));var n=e.elements.dialogs.cheat.querySelector(".".concat(at.classNames["cheats-list"]));M.call(this,t.querySelector(".".concat(at.classNames["modal__btn-primary"])),"click",(function(o){var r=t.querySelector(".".concat(at.classNames["cheat-name-input"])).value,a=t.querySelector(".".concat(at.classNames["cheat-code-input"])).value;if(r&&a){var i=n.querySelectorAll("input:checked");t.querySelector(".".concat(at.classNames["cheat-name-input"])).value="",t.querySelector(".".concat(at.classNames["cheat-code-input"])).value="",rt.close();var s=e.cheats.length;e.cheats.push([r,a]),n.innerHTML+='<div class="'.concat(at.classNames["ejs-switch"],'">\n                            <input type="checkbox" value="').concat(s,'" id="ejs-cheat-switch-').concat(s,'">\n                            <label for="ejs-cheat-switch-').concat(s,'">').concat(r,'</label>\n                            <a href="#" data-idx="').concat(s,'" onclick="return false" class="').concat(at.classNames["ejs-delete-cheat"],'">&times;</a>\n                        </div>'),i.forEach((function(e,t){n.querySelector("#ejs-cheat-switch-".concat(t)).setAttribute("checked","checked")}))}return"localStorage"in window&&localStorage.setItem("".concat(e.system,"-").concat(e.startName,"-cheats"),JSON.stringify(e.cheats)),o.stopPropagation(),!1}));var o=function(){if("localStorage"in window){var t=localStorage.getItem("".concat(e.system,"-").concat(e.startName,"-cheats"));try{t=JSON.parse(t)}catch(e){}t&&(e.cheats=t)}n.innerHTML="",e.cheats&&Array.isArray(e.cheats)&&e.cheats.forEach((function(e,t){var o=e[0];e[1],n.innerHTML+='<div class="'.concat(at.classNames["ejs-switch"],'">\n                                <input type="checkbox" value="').concat(t,'" id="ejs-cheat-switch-').concat(t,'">\n                                <label for="ejs-cheat-switch-').concat(t,'">').concat(o,'</label>\n                                <a href="#" data-idx="').concat(t,'" onclick="return false" class="').concat(at.classNames["ejs-delete-cheat"],'">&times;</a>\n                            </div>')}))};M.call(e,n,"click",(function(t){if(t.target&&t.target.classList.contains(at.classNames["ejs-delete-cheat"])&&t.target.getAttribute("data-idx")){var r=t.target.getAttribute("data-idx");e.cheats.splice(r,1),"localStorage"in window&&localStorage.setItem("".concat(e.system,"-").concat(e.startName,"-cheats"),JSON.stringify(e.cheats));var a=[];n.querySelectorAll("input").forEach((function(e,t){a[t]=!!n.querySelector("#ejs-cheat-switch-".concat(t,":checked"))})),a.splice(r,1),o(),a.forEach((function(e,t){e&&n.querySelector("#ejs-cheat-switch-".concat(t)).setAttribute("checked","checked")}))}return t.stopPropagation(),!1})),M.call(e,e.elements.container,"start-game",(function(e){o()})),M.call(this,e.elements.dialogs.cheat.querySelector(".".concat(at.classNames["btn-cancel"])),"click",(function(t){return U(e.elements.dialogs.cheat,!0),t.stopPropagation(),e.elements.container.focus(),!1})),M.call(this,e.elements.dialogs.cheat.querySelector(".".concat(at.classNames["btn-submit"])),"click",(function(t){return at.resetCheat(),n.querySelectorAll("input:checked").forEach((function(t,n){var o=e.cheats[t.value];o&&at.setCheat(n,1,o[1])})),U(e.elements.dialogs.cheat,!0),e.elements.container.focus(),!1})),"arcade"!==e.system&&"mame"!==e.system&&"mame2003"!==e.system&&"mame2010"!==e.system||(S(e.elements.buttons.cheat)&&U(e.elements.buttons.cheat,!0),at.allowCheat=!1),at.setCheat||(U(e.elements.buttons.cheat,!0),at.allowCheat=!1)}},setNetplayDialog:function(){var e=this,t=this;if(t.elements.dialogs.netplay){t.elements.dialogs.netplay.innerHTML='\n            <div class="'.concat(at.classNames["dialog-container"],'">\n                <div class="').concat(at.classNames["dialog-title"],'">\n                    <h4>'+t.localization("Netplay")+'</h4>\n                </div>\n                <div class="').concat(at.classNames["dialog-content"],'">\n                    <div class="').concat(at.classNames["netplay-roomlist"],'" hidden>\n                        <strong>'+t.localization("Rooms")+'</strong>\n                        <table style="width:100%" cellspacing=0>\n                            <thead>\n                                <tr>\n                                    <td>'+t.localization("Room Name")+"</td>\n                                    <td>"+t.localization("Players")+'</td>\n                                    <td></td>\n                                </tr>\n                            </thead>\n                            <tbody>\n                                <tr>\n                                    <td></td>\n                                    <td></td>\n                                    <td></td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </div>\n\n                    <div class="').concat(at.classNames["netplay-room"],'" hidden>\n                        <strong>'+t.localization("Room Name")+"</strong>\n                        <div data-room-password>"+t.localization("Password")+': <span></span></div>\n                        <table style="width:100%" cellspacing="0">\n                            <thead>\n                            <tr>\n                                <td>'+t.localization("Player")+"</td>\n                                <td>"+t.localization("Name")+"</td>\n                                <td></td>\n                            </tr>\n                            </thead>\n                            <tbody>\n                            <tr>\n                                <td>1</td>\n                                <td>"+t.localization("Name")+" 1</td>\n                                <td></td>\n                            </tr>\n                            <tr>\n                                <td>2</td>\n                                <td>"+t.localization("Name")+" 2</td>\n                                <td></td>\n                            </tr>\n                            <tr>\n                                <td>3</td>\n                                <td>"+t.localization("Name")+" 3</td>\n                                <td></td>\n                            </tr>\n                            <tr>\n                                <td>4</td>\n                                <td>"+t.localization("Name")+' 4</td>\n                                <td></td>\n                            </tr>\n                            </tbody>\n                        </table>\n                    </div>\n                </div>\n                <div class="').concat(at.classNames["dialog-buttons"],'">\n                    <a href="#" onclick="return false" class="').concat(at.classNames["btn-quit"],'">'+t.localization("Quit Room")+'</a>\n                    <a href="#" onclick="return false" class="').concat(at.classNames["btn-create-room"],'">'+t.localization("Create a Room")+'</a>\n                    <a href="#" onclick="return false" class="').concat(at.classNames["btn-cancel"],'">'+t.localization("Close")+'</a>\n                </div>\n            </div>\n\n            \n            <div class="').concat(at.classNames.modal," ").concat(at.classNames["micromodal-slide"],'" id="modal-9de6c4e9ce2b9361" aria-hidden="true">\n                <div class="').concat(at.classNames.modal__overlay,'" tabindex="-1">\n                <div class="').concat(at.classNames.modal__container,'" role="dialog" aria-modal="true" aria-labelledby="modal-9de6c4e9ce2b9361-title">\n                    <div class="').concat(at.classNames.modal__header,'">\n                    <h2 class="').concat(at.classNames.modal__title,'" id="modal-9de6c4e9ce2b9361-title">\n                        '+t.localization("Set Player Name")+'\n                    </h2>\n                    </div>\n                    <main class="').concat(at.classNames.modal__content,'" id="modal-9de6c4e9ce2b9361-content">\n\n                        <div class="').concat(at.classNames.modal__errmsg,'"></div>\n                        <strong>'+t.localization("Player Name")+'</strong><br />\n                        <input type="text" maxlength="10" class="').concat(at.classNames["netplay-player-name"],'" /><br />\n\n                    </main>\n                    <footer class="').concat(at.classNames.modal__footer,'">\n                    <button class="').concat(at.classNames.modal__btn," ").concat(at.classNames["modal__btn-primary"],'">'+t.localization("Submit")+'</button>\n                    </footer>\n                </div>\n                </div>\n            </div>\n            \n            <div class="').concat(at.classNames.modal," ").concat(at.classNames["micromodal-slide"],'" id="modal-85cd7a1c543a484a" aria-hidden="true">\n                <div class="').concat(at.classNames.modal__overlay,'" tabindex="-1" data-modal-close>\n                <div class="').concat(at.classNames.modal__container,'" role="dialog" aria-modal="true" aria-labelledby="modal-85cd7a1c543a484a-title">\n                    <div class="').concat(at.classNames.modal__header,'">\n                    <h2 class="').concat(at.classNames.modal__title,'" id="modal-85cd7a1c543a484a-title">\n                    '+t.localization("Create a Room")+'\n                    </h2>\n                    <button class="').concat(at.classNames.modal__close,'" aria-label="Close modal" data-modal-close></button>\n                    </div>\n                    <main class="').concat(at.classNames.modal__content,'" id="modal-85cd7a1c543a484a-content">\n\n                        <div class="').concat(at.classNames.modal__errmsg,'"></div>\n                        <strong>'+t.localization("Room Name")+'</strong><br />\n                        <input type="text" maxlength="10" class="').concat(at.classNames["netplay-room-name-input"],'" /><br />\n                        <strong>Max Players</strong><br />\n                        <select data-max-players>\n                            <option value="2">2</option>\n                            <option value="3">3</option>\n                            <option value="4">4</option>\n                        </select>\n                        <br />\n                        <strong>'+t.localization("Password (optional)")+'</strong><br />\n                        <input type="text" maxlength="10" class="').concat(at.classNames["netplay-room-password-input"],'" /><br />\n\n                    </main>\n                    <footer class="').concat(at.classNames.modal__footer,'">\n                    <button class="').concat(at.classNames.modal__btn," ").concat(at.classNames["modal__btn-primary"],'">'+t.localization("Submit")+'</button>\n                    <button class="').concat(at.classNames.modal__btn,'" data-modal-close aria-label="Close">'+t.localization("Close")+'</button>\n                    </footer>\n                </div>\n                </div>\n            </div>\n            \n            <div class="').concat(at.classNames.modal," ").concat(at.classNames["micromodal-slide"],'" id="modal-5aa765d61d8327de" aria-hidden="true">\n                <div class="').concat(at.classNames.modal__overlay,'" tabindex="-1" data-modal-close>\n                <div class="').concat(at.classNames.modal__container,'" role="dialog" aria-modal="true" aria-labelledby="modal-5aa765d61d8327de-title">\n                    <div class="').concat(at.classNames.modal__header,'">\n                    <h2 class="').concat(at.classNames.modal__title,'" id="modal-5aa765d61d8327de-title">\n                        '+t.localization("Password")+'\n                    </h2>\n                    <button class="').concat(at.classNames.modal__close,'" aria-label="Close modal" data-modal-close></button>\n                    </div>\n                    <main class="').concat(at.classNames.modal__content,'" id="modal-5aa765d61d8327de-content">\n\n                        <div class="').concat(at.classNames.modal__errmsg,'"></div>\n                        <input type="text" maxlength="10" class="').concat(at.classNames["netplay-room-password-input"],'" /><br />\n\n                    </main>\n                    <footer class="').concat(at.classNames.modal__footer,'">\n                    <button class="').concat(at.classNames.modal__btn," ").concat(at.classNames["modal__btn-primary"],'">'+t.localization("Submit")+'</button>\n                    <button class="').concat(at.classNames.modal__btn,'" data-modal-close aria-label="Close">'+t.localization("Close")+'</button>\n                    </footer>\n                </div>\n                </div>\n            </div>\n            \n            \n            <div class="').concat(at.classNames.modal," ").concat(at.classNames["micromodal-slide"],'" id="modal-7d8fd50ed642340b" aria-hidden="true">\n                <div class="').concat(at.classNames.modal__overlay,'" tabindex="-1" data-modal-close>\n                <div class="').concat(at.classNames.modal__container,'" role="dialog" aria-modal="true" aria-labelledby="modal-7d8fd50ed642340b-title">\n                    <div class="').concat(at.classNames.modal__header,'">\n                    <h2 class="').concat(at.classNames.modal__title,'" id="modal-7d8fd50ed642340b-title"></h2>\n                    <button class="').concat(at.classNames.modal__close,'" aria-label="Close modal" data-modal-close></button>\n                    </div>\n                    <main class="').concat(at.classNames.modal__content,'" id="modal-7d8fd50ed642340b-content">\n                        \n                    </main>\n                    <footer class="').concat(at.classNames.modal__footer,'">\n                    <button class="').concat(at.classNames.modal__btn," ").concat(at.classNames["modal__btn-primary"],'" data-modal-close>OK</button>\n                    </footer>\n                </div>\n                </div>\n            </div>\n            \n            '),M.call(this,t.elements.dialogs.netplay.querySelector(".".concat(at.classNames["btn-cancel"])),"click",(function(e){return U(t.elements.dialogs.netplay,!0),at.disableControl(!1),at.stopLoadRooms(),e.stopPropagation(),t.elements.container.focus(),!1})),window.setInterval((function(){var e="<ul>";at.players.forEach((function(t,n){var o=null;t?(at.connection.peers[t]?o=at.connection.peers[t].extra:at.connection.userid===t&&(o=at.connection.extra),e+="<li>".concat(n+1,". ").concat(o.name,"</li>")):e+="<li>".concat(n+1,". </li>")})),e+="</ul>",t.elements.widgets.netplay.innerHTML=e}),500);var n=t.elements.dialogs.netplay.querySelector("#modal-9de6c4e9ce2b9361"),o=t.elements.dialogs.netplay.querySelector("#modal-85cd7a1c543a484a"),r=t.elements.dialogs.netplay.querySelector("#modal-7d8fd50ed642340b"),a=t.elements.dialogs.netplay.querySelector("#modal-5aa765d61d8327de"),i={};at.connection=new Je.a;var s=e.socketUrl;s.endsWith("/")||(s+="/"),at.connection.socketURL="/",at.connection.socketURL=s,at.connection.socketMessageEvent="emulatorjs-message",at.connection.socketCustomEvent="emulatorjs-custom-message";var c=ie();at.connection.extra={name:at.playerName,game_id:t.config.gameId,browser_name:c.name,room_name:" ",domain:document.domain},at.connection.socketMessageEvent="netplay",at.connection.enableFileSharing=!0,at.connection.enableLogs=!1,at.connection.session={data:!0},at.connection.sdpConstraints.mandatory={OfferToReceiveAudio:!1,OfferToReceiveVideo:!1},at.connection.onclose=function(e){},at.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"]}],at.connection.maxParticipantsAllowed=4,at.netPlayInitFrame=0;var l=0,u=!1;Module.postMainLoop=function(){var e;if(at.currentFrame=parseInt(at.currentFrameNum(),10),at.connected)if(l+=1,at.connection.isInitiator)l>=1&&function(){for(var e=[],t=at.currentFrame-1;t<at.currentFrame;t+=1)at.inputsData[t]?at.inputsData[t].forEach((function(t,n){e.push("".concat(t.index,"|").concat(t.key,"|").concat(t.status,"|").concat(t.frame))})):e.push("-1|||".concat(t));at.connection.send(JSON.stringify({act:"sync-control",value:e})),l=0,at.currentFrame%100==0&&Object.keys(at.inputsData).forEach((function(e,t){e<at.currentFrame-50&&(at.inputsData[e]=null,delete at.inputsData[e])}))}();else{if(at.coreOptionData[at.currentFrame]){var n=at.coreOptionData[at.currentFrame].key,o=at.coreOptionData[at.currentFrame].value;ct.updateCoreOptions.call(t,n,o),delete at.coreOptionData[at.currentFrame]}if(at.currentFrame<=0||at.inputsData[at.currentFrame])at.wait=!1,at.systemPause(0),Ke.Module.resumeMainLoop(),e=at.inputsData[at.currentFrame],at.inputsData[at.currentFrame]=null,delete at.inputsData[at.currentFrame],e||(e=[]),e.forEach((function(e,t){e.index>=0&&at.simulateInputFn(e.index,e.key,e.status)}));else{at.wait=!0,at.systemPause(1),Ke.Module.pauseMainLoop();var r=!1,a=Object.keys(at.inputsData);0==a.length&&(r=!0);for(var i=0;i<a.length;i+=1)if(a[i]>at.currentFrame){console.log("lost",at.currentFrame),r=!0;break}r?at.wait||(!u||u<(new Date).valueOf()-3e3)&&(at.inputsData={},u=(new Date).valueOf(),at.connection.send(JSON.stringify({act:"sync-mem",value:at.connection.userid}),at.roomMaster)):(at.wait=!0,at.systemPause(1),Ke.Module.pauseMainLoop())}at.currentFrame%100==0&&Object.keys(at.inputsData).forEach((function(e,t){e<at.currentFrame-50&&(at.inputsData[e]=null,delete at.inputsData[e])}))}},at.connection.onopen=function(e){at.connected=!0,at.connection.isInitiator&&(-1===at.players.indexOf(e.userid)&&(at.players.filter((function(e,t){return null==e})).length>0?at.players.forEach((function(t,n){null!=t||at.players.includes(e.userid)||(at.players[n]=e.userid)})):at.players.push(e.userid)),at.connection.send(JSON.stringify({act:"get-players-result",value:at.players,coreOptions:ct.coreOptionsValues,newuser:e.userid,master:at.connection.userid}))),ct.updateCoreOptionMenuItems.call(t)},at.connection.onFileStart=function(e){var n=e.name.split("-");"reset"!==n[0]&&0!=n[0]||(at.inputsData={},at.disableControl(!0)),at.progressHelper[e.remoteUserId]={},at.progressHelper[e.remoteUserId].max=e.maxChunks,at.showLoading.call(t),at.connection.isInitiator?(at.wait=!0,at.systemPause(1),Ke.Module.pauseMainLoop()):at.inputsData={}},at.connection.onFileProgress=function(e){var t=at.progressHelper[e.remoteUserId];t.current=e.currentPosition||e.maxChunks||t.max},at.connection.onFileEnd=function(e){at.hideLoading.call(t);var n=e.name.split("-"),o=n[0]>>0;"reset"===n[0]?(o=0,at.connection.isInitiator?(at.systemPause(0),at.disableControl(!1),t.playing=!0,Ke.Module.resumeMainLoop()):Ee.a.get(e.url,{responseType:"arraybuffer"}).then((function(e){at.inputsData={};var n=new Uint8Array(e.data);at.loadState(n,o),at.wait=!1,at.systemPause(0),at.disableInput=!1,t.playing=!0,Ke.Module.resumeMainLoop()}))):"game.state"===n[1]&&(at.connection.isInitiator?(at.openRoom(t),at.wait=!1,at.systemPause(0),Ke.Module.resumeMainLoop()):(at.netPlayInitFrame=o,Ee.a.get(e.url,{responseType:"arraybuffer"}).then((function(e){var n=new Uint8Array(e.data);at.loadState(n,o),at.wait=!1,at.disableInput=!1,at.connection.send(JSON.stringify({act:"wait-end",value:at.connection.userid})),at.hideLoading.call(t),t.playing=!0,Ke.Module.resumeMainLoop()})))),at.connection.isInitiator||console.log("recv mem end",at.currentFrame,e.name)};var d=!1;at.connection.onmessage=function(e){var n,o=e.data||e;try{n=JSON.parse(o)}catch(e){n=null}if(n){if("room-master"===n.act&&(at.roomMaster=n.value),n.act,"short-pause"===n.act&&(d||(at.systemPause(1),Ke.Module.pauseMainLoop(),d=!0,at.wait=!0,setTimeout((function(){at.systemPause(0),Ke.Module.resumeMainLoop(),at.wait=!1,d=!1}),48))),"sync-control"===n.act){var r=n.value;t.playing||at.wait;var a=at.connection.userid;at.players.indexOf(a),at.connection.isInitiator,r.forEach((function(e,t){var n=e.split("|"),o=n[0]>>0,r=n[1]>>0,i=n[2]>>0,s=n[3]>>0,c=at.currentFrame;at.inputsData[s]||(at.inputsData[s]=[]),-1!==o&&s===c&&at.simulateInputFn(o,r,i),at.connection.isInitiator?o>=0&&(at.inputsData[c]||(at.inputsData[c]=[]),-2!=r&&(at.inputsData[c].push({index:o,key:r,status:i,frame:c}),at.simulateInputFn(o,r,i)),d||c-10>=s&&(at.systemPause(1),Ke.Module.pauseMainLoop(),d=!0,at.wait=!0,setTimeout((function(){at.systemPause(0),Ke.Module.resumeMainLoop(),at.wait=!1,d=!1}),48))):(""!==o&&at.inputsData[s].push({index:o,key:r,status:i,frame:s}),at.inputsData[at.currentFrame]&&Ke.Module.resumeMainLoop(),c+10<=s&&s>at.netPlayInitFrame+100&&at.connection.send(JSON.stringify({act:"short-pause",value:a}),at.roomMaster))}))}if(n.act,n.act,"update-core-option"===n.act&&(at.connection.isInitiator||(at.coreOptionData[n.frame]={key:n.key,value:n.value})),"restart-game"===n.act&&(at.inputsData={},at.connection.send(JSON.stringify({act:"sync-mem",value:at.connection.userid}),at.roomMaster)),"pause"===n.act&&Ke.Module.pauseMainLoop(),"resume"===n.act&&Ke.Module.resumeMainLoop(),"wait"===n.act&&(at.wait=!0,at.systemPause(1),n.value!==at.connection.userid&&(at.waitingList[n.value]=1),at.disableControl(!0)),"wait-end"===n.act&&(at.waitingList[n.value]&&delete at.waitingList[n.value],0===Object.keys(at.waitingList).length&&(at.wait=!1,at.systemPause(0),at.disableInput=!1)),"sync-mem"===n.act){at.wait=!0,at.systemPause(1);var s=n.value;at.disableControl(!0),at.connection.send(JSON.stringify({act:"wait",value:s}));for(var c=at.getStateInfo().split("|"),l=c[0]>>0,u=new Uint8Array(l),f=c[1]>>0,p=0;p<l;p+=1)u[p]=Ke.Module.getValue(f+p);Ke._FS.createDataFile("/","game.state",u,!0,!0),Ke.Module.cwrap("load_state","number",["string","number"])("game.state",0),Ke.FS.unlink("game.state"),at.inputsData={};var h=new File([u],"".concat(0,"-game.state"),{type:"",lastModified:new Date});at.connection.shareFile(h,s)}if(n.act,"get-players-result"===n.act&&(at.players=n.value,at.roomMaster=n.master,n.newuser===at.connection.userid)){var m=ct.coreOptionsValues;n.coreOptions&&Object.keys(n.coreOptions).forEach((function(e){m[e]!==n.coreOptions[e]&&ct.updateCoreOptions.call(t,e,n.coreOptions[e])})),at.showLoading.call(t),at.disableControl(!0),setTimeout((function(){at.connection.send(JSON.stringify({act:"sync-mem",value:at.connection.userid}),at.roomMaster)}),1),at.roomMaster&&at.connection.peers[at.roomMaster]&&(at.connection.extra.room_name=at.connection.peers[at.roomMaster].extra.room_name,at.connection.updateExtraData()),at.connection.peers[at.roomMaster]&&(i=at.connection.peers[at.roomMaster].extra),at.openRoom(t)}}},at.connection.onUserStatusChanged=function(e){if("offline"===e.status){var t=at.players.indexOf(e.userid);t>=0&&(at.players[t]=null)}e.status},at.connection.onExtraDataUpdated=function(e){e.userid===at.connection.userid&&(at.connection.extra=e.extra)},at.connection.onleave=function(e){if(e.userid){var n=at.players.indexOf(e.userid);n>=0&&(at.players[n]=null)}at.waitingList[e.userid]&&delete at.waitingList[e.userid],at.connection.isInitiator&&0===Object.keys(at.waitingList).length&&at.wait&&(at.wait=!1,at.systemPause(0),at.disableInput=!1,at.connection.send(JSON.stringify({act:"wait-end",value:at.connection.userid}))),at.openRoom(t),at.inputsData={},at.hideLoading.call(t)};var f=function(){try{at.connection.onbeforeunload()}catch(e){}at.connected=!1,at.connection.password=null,at.players=[],at.connection.peersBackup=[],at.waitingList={},at.inputsData={},at.hideLoading.call(t),U(t.elements.buttons.restart,!1),U(t.elements.buttons.loadState,!1),U(t.elements.buttons.saveState,!1),at.allowCheat&&U(t.elements.buttons.cheat,!1),U(ct.contextMenu.querySelectorAll("ul li").item(2),!1),U(ct.contextMenu.querySelectorAll("ul li").item(3),!1),Array.from(t.elements.buttons.play).forEach((function(e){U(e,!1)})),ct.updateCoreOptionMenuItems.call(t)};at.connection.close=f,at.connection.disconnect=f,at.connection.leave=f;var p,h=function(e,n,o){at.hideLoading.call(t),e?(at.stopLoadRooms(),U(t.elements.buttons.restart,!0),U(t.elements.buttons.loadState,!0),U(t.elements.buttons.saveState,!0),at.resetCheat(),U(t.elements.buttons.cheat,!0),U(ct.contextMenu.querySelectorAll("ul li").item(2),!0),U(ct.contextMenu.querySelectorAll("ul li").item(3),!0),Array.from(t.elements.buttons.play).forEach((function(e){U(e,!0)})),at.connection.socket&&at.connection.socket.on("set-isInitiator-true",(function(e){e===at.connection.sessionid&&(at.connection.socket.emit("extra-data-updated",at.connection.extra),at.connection.send(JSON.stringify({act:"room-master",value:at.connection.userid})),at.roomMaster=at.connection.userid,at.systemPause(0),Ke.Module.resumeMainLoop(),ct.updateCoreOptionMenuItems.call(t),U(t.elements.buttons.restart,!1),U(t.elements.buttons.loadState,!1),U(t.elements.buttons.saveState,!1),Array.from(t.elements.buttons.play).forEach((function(e){U(e,!1)})))}))):(rt.close(),r.querySelector("#modal-7d8fd50ed642340b-content").innerHTML=o,rt.show("modal-7d8fd50ed642340b",{closeTrigger:"data-modal-close"}))},m=function(e){var n=e.target.getAttribute("data-id");if("Y"===e.target.getAttribute("data-password"))rt.show("modal-5aa765d61d8327de",{closeTrigger:"data-modal-close"}),a.setAttribute("data-id",n);else{at.showLoading.call(t),at.connection.userid=at.connection.token();try{at.connection.join(n,h)}catch(e){at.hideLoading.call(t),r.querySelector("#modal-7d8fd50ed642340b-content").innerHTML="Error",rt.show("modal-7d8fd50ed642340b",{closeTrigger:"data-modal-close"})}}return e.stopPropagation(),!1};at.loadRoomsList=function(){U(t.elements.dialogs.netplay.querySelector(".".concat(at.classNames["netplay-roomlist"])),!1),U(t.elements.dialogs.netplay.querySelector(".".concat(at.classNames["netplay-room"])),!0),U(t.elements.dialogs.netplay.querySelector(".".concat(at.classNames["btn-create-room"])),!1),U(t.elements.dialogs.netplay.querySelector(".".concat(at.classNames["btn-quit"])),!0);var n=t.listUrl;n.endsWith("/")||(n+="/");var o=t.elements.dialogs.netplay.querySelector(".".concat(at.classNames["netplay-roomlist"])).querySelector("tbody"),r=[n,"list?game_id=",t.config.gameId,"&domain=",document.domain].join("");Ee.a.get(r,{}).then((function(t){if(t.data){var n=[],r=[];o.querySelectorAll("tr").forEach((function(e){r.push(e.getAttribute("id"))})),Object.keys(t.data).forEach((function(a){var i=t.data[a];if(n.push(a),r.includes(a)){var s=o.querySelector('tr[id="'.concat(a,'"]'));o.removeChild(s)}var c=document.createElement("tr");c.setAttribute("id",a);var l=i.password?at.icons.lock:"",u=i.password?"Y":"N",d=i.current<i.max?'<span data-id="'.concat(a,'" data-password="').concat(u,'" class="').concat(at.classNames["btn-join-room"],'">Join</span>'):"",f=i.country?i.country:"?";c.innerHTML="<td>[".concat(f,"] ").concat(l," ").concat(i.room_name,"</td><td>").concat(i.current,"/").concat(i.max,"</td><td>").concat(d,"</td>"),M.call(e,c.querySelector(".".concat(at.classNames["btn-join-room"])),"click",m),o.appendChild(c)})),o.querySelectorAll("tr").forEach((function(e){n.includes(e.id)||o.removeChild(e)}))}at.loadRoomsListTimer=setTimeout(at.loadRoomsList,2e3)})).catch((function(e){console.log("Network Error",e),at.loadRoomsListTimer=setTimeout(at.loadRoomsList,2e3)}))},at.openRoom=function(e){at.stopLoadRooms(),U(e.elements.dialogs.netplay.querySelector(".".concat(at.classNames["netplay-roomlist"])),!0),U(e.elements.dialogs.netplay.querySelector(".".concat(at.classNames["netplay-room"])),!1),U(e.elements.dialogs.netplay.querySelector(".".concat(at.classNames["btn-create-room"])),!0),U(e.elements.dialogs.netplay.querySelector(".".concat(at.classNames["btn-quit"])),!1),at.resetCheat(),U(e.elements.buttons.cheat,!0);var t=e.elements.dialogs.netplay.querySelector(".".concat(at.classNames["netplay-room"])),n=t.querySelector("[data-room-password]");null===at.connection.password?U(n,!0):(U(n,!1),n.querySelector("span").innerText=at.connection.password);var o=t.querySelector("tbody");o.innerHTML="",t.querySelector("strong").innerText=i.room_name,at.players.forEach((function(e,t){var n=null;if(e&&(at.connection.peers[e]?n=at.connection.peers[e].extra:at.connection.userid===e&&(n=at.connection.extra),n&&n.name)){var r=document.createElement("tr");r.innerHTML="<td>".concat(t+1,"</td><td>").concat(n.name,"</td><td></td>"),o.appendChild(r)}}))},M.call(this,a.querySelector(".".concat(at.classNames["modal__btn-primary"])),"click",(function(e){var n=a.querySelector(".".concat(at.classNames["netplay-room-password-input"])).value;at.showLoading.call(t),at.connection.password=n;var o=a.getAttribute("data-id");at.connection.join(o,(function(e,t,n){h(e,0,n),e&&a.classList.remove(K({"is-open":!0}))})),e.stopPropagation()})),M.call(this,n.querySelector(".".concat(at.classNames["modal__btn-primary"])),"click",(function(e){var t=n.querySelector(".".concat(at.classNames["netplay-player-name"])).value;t=t.replace(/<|>/g,""),n.querySelector(".".concat(at.classNames.modal__errmsg)).innerHTML="",t.trim()&&(at.playerName=t.trim(),at.connection.extra.name=t.trim(),rt.close()),e.stopPropagation()})),M.call(this,o.querySelector(".".concat(at.classNames["modal__btn-primary"])),"click",(function(e){var n=o.querySelector(".".concat(at.classNames["netplay-room-name-input"])).value;n=n.replace(/<|>/g,"");var r=o.querySelector("select[data-max-players] option:checked").value;r<2&&(r=2),r>4&&(r=4);for(var a=0;a<r;a++)at.players[a]=null;at.connection.maxParticipantsAllowed=r;var s=o.querySelector(".".concat(at.classNames["netplay-room-password-input"])).value;o.querySelector(".".concat(at.classNames.modal__errmsg)).innerHTML="",n.trim()?(at.connection.extra.room_name=n.trim(),""!==s.trim()&&(at.connection.password=s.trim()),at.showLoading.call(t),at.connection.open(at.connection.token(),(function(e,n,r){at.hideLoading.call(t),e?(at.players[0]=at.connection.userid,at.roomMaster=at.connection.userid,p.closeModal(),at.stopLoadRooms(),i=at.connection.extra,at.openRoom(t),U(ct.contextMenu.querySelectorAll("ul li").item(2),!0),U(ct.contextMenu.querySelectorAll("ul li").item(3),!0)):o.querySelector(".".concat(at.classNames.modal__errmsg)).innerHTML=r}))):p.closeModal(),e.stopPropagation()})),M.call(this,t.elements.dialogs.netplay.querySelector(".".concat(at.classNames["btn-create-room"])),"click",(function(e){return p=rt.show("modal-85cd7a1c543a484a",{closeTrigger:"data-modal-close",onClose:function(){t.elements.container.focus()}}),e.stopPropagation(),!1})),M.call(this,t.elements.dialogs.netplay.querySelector(".".concat(at.classNames["btn-quit"])),"click",(function(e){return at.connection.close(),at.stopLoadRooms(),at.loadRoomsList(),at.inputsData={},e.stopPropagation(),!1}))}window._0x378b5c=at},initKeyboard:function(){var e=this,t=this,n=this.elements.dialogs.gamepad.querySelector(".".concat(at.classNames.overlay));M.call(this,document.body,"keydown keyup",(function(o){if(o.which>=112&&o.which<=123);else{var r=!e.elements.dialogs.gamepad.hidden&&!n.hidden,a="keydown"===o.type;if(a&&r){var i=n.getAttribute("data-index"),s=n.getAttribute("data-id"),c=null;if(o.key&&"escape"===at.keyMap[o.keyCode])return(c=t.elements.dialogs.gamepad.querySelector('[data-id="'.concat(s,'"][data-index="').concat(i,'"][data-type="1"]'))).setAttribute("data-value",""),c.value=""(c=t.elements.dialogs.gamepad.querySelector('[data-id="'.concat(s,'"][data-index="').concat(i,'"][data-type="2"]'))).setAttribute("data-value",""),c.value="",void U(n,!0);i=n.getAttribute("data-index"),s=n.getAttribute("data-id"),c=null;o.key&&((c=t.elements.dialogs.gamepad.querySelector('[data-id="'.concat(s,'"][data-index="').concat(i,'"][data-type="1"]'))).setAttribute("data-value",o.keyCode),c.value=at.keyMap[o.keyCode]),U(n,!0)}else Object.keys(at.controllers).forEach((function(e){Object.keys(at.controllers[e]).forEach((function(t){parseInt(at.controllers[e][t].value,10)===o.keyCode&&["24","25","26"].includes(t)&&"keydown"==o.type&&!o.repeat&&("24"==t?at.quickSaveState():"25"==t?at.quickLoadState():"26"==t&&at.changeStateSlot()),parseInt(at.controllers[e][t].value,10)===o.keyCode&&(a?t>=16&&t<=23?at.simulateInput(e,t,32767):at.simulateInput(e,t,1):at.simulateInput(e,t,0))}))}))}})),document.body.addEventListener("keydown",(function(e){var n=e.keyCode?e.keyCode:e.which;[32,37,38,39,40,112,113,114,115,116,117,118,119,120,121,122,123].includes(n)&&e.srcElement===t.elements.container&&e.preventDefault(),e.srcElement.className.split(/ +/).includes(at.classNames.set)&&e.preventDefault()}))},initGamepad:function(){var e=this,t=this,n=this.elements.dialogs.gamepad.querySelector(".".concat(at.classNames.overlay)),o=new ye.Gamepad;at.gamepad=o,o.init()&&(o.bind(ye.Gamepad.Event.TICK,(function(e){e.forEach((function(e){var t;e&&e.axes&&e.axes[9]&&((t=e.axes[9])<3.28571?1==t?(e.extra_buttons[12].pressed||(e.extra_buttons[12]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:12,gamepad:e,gamepadIndex:e.index})),e.extra_buttons[14].pressed||(e.extra_buttons[14]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:14,gamepad:e,gamepadIndex:e.index}))):t<=-.7142857&&t>=-.714291?(e.extra_buttons[12].pressed||(e.extra_buttons[12]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:12,gamepad:e,gamepadIndex:e.index})),e.extra_buttons[15].pressed||(e.extra_buttons[15]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:15,gamepad:e,gamepadIndex:e.index}))):t>=.42856&&t<=.42858?(e.extra_buttons[13].pressed||(e.extra_buttons[13]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:13,gamepad:e,gamepadIndex:e.index})),e.extra_buttons[14].pressed||(e.extra_buttons[14]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:14,gamepad:e,gamepadIndex:e.index}))):t>=-.14287&&t<=-.14285?(e.extra_buttons[13].pressed||(e.extra_buttons[13]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:13,gamepad:e,gamepadIndex:e.index})),e.extra_buttons[15].pressed||(e.extra_buttons[15]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:15,gamepad:e,gamepadIndex:e.index}))):t<=-1&&t>=-1.01?e.extra_buttons[12].pressed||(e.extra_buttons[12]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:12,gamepad:e,gamepadIndex:e.index})):t>=.142857&&t<=.142858?e.extra_buttons[13].pressed||(e.extra_buttons[13]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:13,gamepad:e,gamepadIndex:e.index})):t>=.7142857&&t<=.7142858?e.extra_buttons[14].pressed||(e.extra_buttons[14]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:14,gamepad:e,gamepadIndex:e.index})):t<=-.42857&&t>=-.42858&&(e.extra_buttons[15].pressed||(e.extra_buttons[15]={pressed:!0,value:1},o._fire(ye.Gamepad.Event.BUTTON_DOWN,{index:15,gamepad:e,gamepadIndex:e.index}))):(e.extra_buttons[12].pressed&&(e.extra_buttons[12]={pressed:!1,value:0},o._fire(ye.Gamepad.Event.BUTTON_UP,{index:12,gamepad:e,gamepadIndex:e.index})),e.extra_buttons[13].pressed&&(e.extra_buttons[13]={pressed:!1,value:0},o._fire(ye.Gamepad.Event.BUTTON_UP,{index:13,gamepad:e,gamepadIndex:e.index})),e.extra_buttons[14].pressed&&(e.extra_buttons[14]={pressed:!1,value:0},o._fire(ye.Gamepad.Event.BUTTON_UP,{index:14,gamepad:e,gamepadIndex:e.index})),e.extra_buttons[15].pressed&&(e.extra_buttons[15]={pressed:!1,value:0},o._fire(ye.Gamepad.Event.BUTTON_UP,{index:15,gamepad:e,gamepadIndex:e.index}))))}))})),o.bind(ye.Gamepad.Event.BUTTON_DOWN,(function(o){if(e.elements.dialogs.gamepad.hidden||n.hidden)Object.keys(at.controllers[o.gamepad.index.toString()]).forEach((function(e){var t=o.gamepad.index.toString();parseInt(at.controllers[t][e].value2,10)===parseInt(o.index,10)&&["24","25","26"].includes(e)&&("24"==e?at.quickSaveState():"25"==e?at.quickLoadState():"26"==e&&at.changeStateSlot()),parseInt(at.controllers[t][e].value2,10)===parseInt(o.index,10)&&parseInt(t,10)===parseInt(o.gamepad.index,10)&&at.simulateInput(t,e,1)}));else{var r,a=parseInt(n.getAttribute("data-index"),10),i=n.getAttribute("data-id");if(o.gamepad.index===parseInt(a,10)){for(var s=0;s<32&&((r=o.gamepad.buttons[s])||(r=o.gamepad.extra_buttons[s]),!r||!("number"==typeof r&&1===r||"number"==typeof r.value&&1===r.value));s+=1);var c=null;(c=t.elements.dialogs.gamepad.querySelector('[data-id="'.concat(i,'"][data-index="').concat(a,'"][data-type="2"]'))).setAttribute("data-value",o.index),c.value="button ".concat(o.index+1),U(n,!0)}}})),o.bind(ye.Gamepad.Event.BUTTON_UP,(function(e){Object.keys(at.controllers).forEach((function(t){Object.keys(at.controllers[t]).forEach((function(n){parseInt(at.controllers[t][n].value2,10)===parseInt(e.index,10)&&parseInt(t,10)===parseInt(e.gamepad.index,10)&&at.simulateInput(t,n,0)}))}))})),o.bind(ye.Gamepad.Event.AXIS_CHANGED,(function(t){var o=function(e){return e>.5||e<.5?e>0?1:-1:0}(parseFloat(t.value));if(e.elements.dialogs.gamepad.hidden||n.hidden){at.prevButtons||(at.prevButtons={});var r=!1,a=t.gamepad.index.toString();at.prevButtons[a]||(at.prevButtons[a]={}),at.prevButtons[a][t.axis]||(at.prevButtons[a][t.axis]=0),at.prevButtons[a].buttonID||(at.prevButtons[a].buttonID=0);for(var i=0;i<Object.keys(at.controllers[a]).length;i++){var s=Object.keys(at.controllers[a])[i];at.controllers[a][s].value2&&(at.controllers[a][s].value2.split(":")[0]===t.axis&&parseInt(at.controllers[a][s].value2.split(":")[1])===o&&["24","25","26"].includes(s)&&("24"==s?(r=!0,at.quickSaveState()):"25"==s?(r=!0,at.quickLoadState()):"26"==s&&at.changeStateSlot()),0===o?at.controllers[a][s].value2.split(":")[0]===t.axis&&(at.prevButtons[a][t.axis]=o,at.prevButtons[a].buttonID=s,at.simulateInput(a,s,0)):((1===at.prevButtons[a][t.axis]&&-1===o||-1===at.prevButtons[a][t.axis]&&1===o)&&at.simulateInput(a,at.prevButtons[a].buttonID,0),at.controllers[a][s].value2.split(":")[0]===t.axis&&parseInt(at.controllers[a][s].value2.split(":")[1])===o&&(at.prevButtons[a][t.axis]=o,at.prevButtons[a].buttonID=s,r=!0,at.simulateInput(a,s,1))))}if(r)return;if(!e.elements.dialogs.gamepad.hidden&&!n.hidden)return}else if(0!==o){var c=n.getAttribute("data-id"),l=parseInt(n.getAttribute("data-index"),10),u=e.elements.dialogs.gamepad.querySelector('[data-id="'.concat(c,'"][data-index="').concat(l,'"][data-type="2"]'));u.setAttribute("data-value",t.axis+":"+o),u.value=t.axis+":"+o,U(n,!0)}Math.abs(t.value)<=.1&&(t.value=0);var d=t.gamepad.index;"LEFT_STICK_X"===t.axis&&(t.value>0?(at.simulateInput(d,16,32767*t.value),at.simulateInput(d,17,0)):(at.simulateInput(d,17,32767*t.value),at.simulateInput(d,16,0))),"LEFT_STICK_Y"===t.axis&&(t.value>0?(at.simulateInput(d,18,32767*t.value),at.simulateInput(d,19,0)):(at.simulateInput(d,19,32767*t.value),at.simulateInput(d,18,0))),"RIGHT_STICK_X"===t.axis&&(t.value>0?(at.simulateInput(d,20,32767*t.value),at.simulateInput(d,21,0)):(at.simulateInput(d,21,32767*t.value),at.simulateInput(d,20,0))),"RIGHT_STICK_Y"===t.axis&&(t.value>0?(at.simulateInput(d,22,32767*t.value),at.simulateInput(d,23,0)):(at.simulateInput(d,23,32767*t.value),at.simulateInput(d,22,0)))})),o.bind(ye.Gamepad.Event.DISCONNECTED,(function(e){[0,1,2,3].forEach((function(e){var n=o.gamepads[e];t.elements.dialogs.gamepad.querySelector("#controls-".concat(e," .gamepad-name")).innerHTML=n?n.id:"n/a"}))})),o.bind(ye.Gamepad.Event.CONNECTED,(function(e){Object.keys(o.gamepads).forEach((function(e){var n=o.gamepads[e];t.elements.dialogs.gamepad.querySelector("#controls-".concat(e," .gamepad-name")).innerHTML=n?n.id:"n/a"}))})))},setShader:function(e){if("disabled"===e)Ke.FS.unlink("/shader/shader.glslp",""),at.toggleShader&&at.toggleShader(0);else{at.toggleShader&&at.toggleShader(0);var t="/shader/".concat(e);Ke.FS.writeFile("/shader/shader.glslp",function(e){if(!(e instanceof Int32Array))throw new Error("uintArrayToString: Only accepts Int32Array parameter");for(var t="",n=0,o=e.length;n<o;n+=1){var r=e[n];if(r>65535)throw new Error("Invalid value attempted to be serialised");t+=String.fromCharCode(r)}return t}(new Int32Array(Ke.FS.readFile(t)))),at.toggleShader&&at.toggleShader(1)}},toggleVirtualGamepad:function(e){var t=this;if(null===at.virtualGamepadContainer){at.virtualGamepadContainer=D("div",{class:K({"ejs-virtual-gamepad":!0}),hidden:""}),this.elements.container.appendChild(at.virtualGamepadContainer);var n="height:31px;text-align:center;border:1px solid #ccc;border-radius:5px;line-height:31px;",o="";if(["snes","nds"].includes(t.system))var r={order:["X","Y","A","B"],orderCSS:["left:40px;","top:40px;","left:81px;top:40px;","left:40px;top:80px;"],LandR:!0};else if(["gba","gb","vb","nes"].includes(t.system))r={order:["B","A"],orderCSS:["left:-10px;top:70px;","left:60px;top:70px;"],LandR:"gba"===t.system};else if(["n64"].includes(t.system))r={order:["B","A"],orderCSS:["left:-10px;top:95px;","left:40px;top:150px;"],LandR:!0};else r={order:["Y","X","B","A"],orderCSS:["left:40px;","top:40px;","left:81px;top:40px;","left:40px;top:80px;"],LandR:!0};o+='<div class="'+K({"virtual-gamepad":!0})+'" style="display: block;">',o+='<div class="'+K({top:!0})+'">',!0===r.LandR&&("n64"===t.system?(o+='<div class="'+K({buttons:!0,b_l:!0})+'" style="left:10px;top:-40px;'+n+'">L</div>',o+='<div class="'+K({buttons:!0,b_z:!0})+'" style="left:10px;'+n+'">Z</div>',o+='<div class="'+K({buttons:!0,b_r:!0})+'" style="right:10px;top:-40px;'+n+'">R</div>'):(o+='<div class="'+K({buttons:!0,b_l:!0})+'" style="left:10px;'+n+'">L</div>',o+='<div class="'+K({buttons:!0,b_r:!0})+'" style="right:10px;'+n+'">R</div>')),o+="</div>",o+='<div class="'+K({left:!0})+'"></div>',o+='<div class="'+K({center:!0})+'">',"n64"===t.system?(o+='<div class="'+K({buttons:!0,b_c:!0})+'" style="left:65px;">'+t.localization("Menu")+"</div>",o+='<div class="'+K({buttons:!0,b_start:!0})+'" style="left:0px;">'+t.localization("Start")+"</div>"):(o+='<div class="'+K({buttons:!0,b_start:!0})+'" style="left:30px;">'+t.localization("Start")+"</div>",o+='<div class="'+K({buttons:!0,b_c:!0})+'" style="left:95px;">'+t.localization("Menu")+"</div>",o+='<div class="'+K({buttons:!0,b_select:!0})+'" style="left:-35px;">'+t.localization("Select")+"</div>"),o+="</div>",o+='<div class="'+K({right:!0})+'">',"n64"===t.system&&(o+='<div class="'+K({buttons:!0,b_cu:!0})+'" style="left:25px;top:-65px;"></div>',o+='<div class="'+K({buttons:!0,b_cd:!0})+'" style="left:25px;top:15px;"></div>',o+='<div class="'+K({buttons:!0,b_cl:!0})+'" style="left:-15px;top:-25px;"></div>',o+='<div class="'+K({buttons:!0,b_cr:!0})+'" style="left:65px;top:-25px;"></div>');for(var a=0;a<r.order.length;a++){var i={buttons:!0};i["b_"+r.order[a].toLowerCase()]=!0,o+='<div class="'+K(i)+'" style="'+r.orderCSS[a]+'">'+r.order[a]+"</div>"}o+="</div></div>",at.virtualGamepadContainer.innerHTML=o,U(at.virtualGamepadContainer,!e);var s=xe.a.create({zone:W.call(this,".".concat(K({"ejs-virtual-gamepad":!0})," .").concat(K({left:!0}))),mode:"static",position:{left:"50%",top:"50%"},color:"red"});function d(){var e;return"n64"===t.system?(ct&&"function"==typeof ct.getCoreOptionsValues&&(e=ct.getCoreOptionsValues()["joystick-input"]),"d-pad"===e?{downVal:1,4:4,5:5,6:6,7:7}:{downVal:32767,4:19,5:18,6:17,7:16}):{downVal:1,4:4,5:5,6:6,7:7}}s.on("end",(function(e,t){at.syncInput(0,d()[4],0),at.syncInput(0,d()[5],0),at.syncInput(0,d()[6],0),at.syncInput(0,d()[7],0)})),s.on("move",(function(e,t){var n=t.angle.degree;n>=30&&n<150?at.syncInput(0,d()[4],d().downVal):window.setTimeout((function(){at.syncInput(0,d()[4],0)}),30),n>=210&&n<330?at.syncInput(0,d()[5],d().downVal):window.setTimeout((function(){at.syncInput(0,d()[5],0)}),30),n>=120&&n<240?at.syncInput(0,d()[6],d().downVal):window.setTimeout((function(){at.syncInput(0,d()[6],0)}),30),n>=300||n>=0&&n<60?at.syncInput(0,d()[7],d().downVal):window.setTimeout((function(){at.syncInput(0,d()[7],0)}),30)}));var c,l=K({"virtual-gamepad":!0}),u=K({touch:!0});ae||M.call(this,W.call(this,".".concat(l)),"touchmove",(function(e){e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_a:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,8,0)}),30)):(G(e.target,u,!0),at.syncInput(0,8,1)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_b:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,0,0)}),30)):(G(e.target,u,!0),at.syncInput(0,0,1)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_x:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,9,0)}),30)):(G(e.target,u,!0),at.syncInput(0,9,1)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_y:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,1,0)}),30)):(G(e.target,u,!0),at.syncInput(0,1,1)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_l:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,10,0)}),30)):(G(e.target,u,!0),at.syncInput(0,10,1)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_z:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,12,0)}),30)):(G(e.target,u,!0),at.syncInput(0,12,1)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_r:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,11,0)}),30)):(G(e.target,u,!0),at.syncInput(0,11,1)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_start:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,3,0)}),30)):(G(e.target,u,!0),at.syncInput(0,3,1)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_cu:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,23,0)}),30)):(G(e.target,u,!0),at.syncInput(0,23,32767)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_cd:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,22,0)}),30)):(G(e.target,u,!0),at.syncInput(0,22,32767)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_cl:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,21,0)}),30)):(G(e.target,u,!0),at.syncInput(0,21,32767)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_cr:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,20,0)}),30)):(G(e.target,u,!0),at.syncInput(0,20,32767)),e.stopPropagation()})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_c:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?G(e.target,u,!1):(G(e.target,u,!0),clearTimeout(c),Ae.toggleControls.call(t,!0),c=setTimeout((function(){Ae.toggleControls.call(t,!1)}),5e3))})),M.call(this,W.call(this,".".concat(l," .").concat(K({b_select:!0}))),"touchstart touchend mousedown mouseup mouseout",(function(e){["touchend","mouseup","mouseout"].includes(e.type)?(G(e.target,u,!1),window.setTimeout((function(){at.syncInput(0,2,0)}),30)):(G(e.target,u,!0),at.syncInput(0,2,1)),e.stopPropagation()}))}else U(at.virtualGamepadContainer,!e)},setup:function(){var e=this;if(this.game){if(at.playerName=e.config.playerName,G(this.elements.container,this.config.classNames.type,!0),this.elements.container.setAttribute("tabindex","0"),this.color){var t=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 r=[],a=1;a<7;a+=2)r.push(parseInt("0x".concat(t.slice(a,a+2)),16));return r}return null}(this.color);t&&this.elements.container.setAttribute("style","--ejs-primary-color: ".concat(t[0],", ").concat(t[1],", ").concat(t[2]))}if(this.elements.wrapper=D("div",{class:this.config.classNames.video}),L(this.game,this.elements.wrapper),"video"!==e.game.tagName.toLocaleLowerCase()){var n=this.config.volume;Object.defineProperty(e.game,"volume",{get:function(){return n},set:function(t){n=t,P.call(e,e.game,"volumechange")}});var o=e.storage.get("muted");Object.defineProperty(e.game,"muted",{get:function(){return o},set:function(t){var n=!!y(t)&&t;o=n,P.call(e,e.game,"volumechange")}})}window.addEventListener("beforeunload",(function(t){if(e.started){var n=e.startName.split("/").pop().split("."),o=n.slice(0,n.length-1).join(".");Ke.FS.syncfs((function(e){}));try{var r="srm";"nds"===e.system&&(r="dsv"),Ke.FS.unlink("/data/saves/".concat(o,".").concat(r))}catch(e){console.log("fail to save")}at.saveSavFiles(),Ke.FS.syncfs((function(e){}))}}),!0)}else console.warn("No game element found!")},listeners:function(){var e=this;e.elements.buttons.restart&&M.call(e,e.elements.buttons.restart,"click",(function(e){if(at.restartGame(),at.inputsData={},at.connected&&at.connection.isInitiator){for(var t=at.getStateInfo().split("|"),n=t[0]>>0,o=(t[2],new Uint8Array(n)),r=t[1]>>0,a=0;a<n;a+=1)o[a]=Ke.Module.getValue(r+a);var i=new File([o],"0-game.state",{type:"",lastModified:new Date});at.connection.shareFile(i),at.inputsData={},at.wait=!0,at.systemPause(1),Ke.Module.pauseMainLoop(),at.disableControl(!0)}})),e.elements.buttons.screenRecord&&M.call(e,e.elements.buttons.screenRecord,"click",(function(t){if(e.recordData||(e.recordData={started:!1,data:[],stopped:!1}),e.recordData.started)e.recordData.started&&(e.recordData.recorder.stop(),e.recordData.stopped=!0);else{if(e.elements.buttons.screenRecord.getElementsByClassName("ejs--74c6d4176d27e37a19d2e9e61de8f4")[0].innerHTML=e.localization("Stop Screen Recording"),MediaRecorder.isTypeSupported("video/webm; codecs=h264"))var n={mimeType:"video/webm; codecs=h264"};else if(MediaRecorder.isTypeSupported("video/webm; codecs=H264"))n={mimeType:"video/webm; codecs=H264"};else if(MediaRecorder.isTypeSupported("video/webm; codecs=vp9"))n={mimeType:"video/webm; codecs=vp9"};else if(MediaRecorder.isTypeSupported("video/webm; codecs=vp8"))n={mimeType:"video/webm; codecs=vp8"};else if(MediaRecorder.isTypeSupported("video/webm; codecs=avc1"))n={mimeType:"video/webm; codecs=avc1"};else if(MediaRecorder.isTypeSupported("video/webm; codecs=vp9.0"))n={mimeType:"video/webm; codecs=vp9.0"};else if(MediaRecorder.isTypeSupported("video/webm; codecs=vp8.0"))n={mimeType:"video/webm; codecs=vp8.0"};else n={};e.recordData.stream=Ke.Module.canvas.captureStream(30),e.recordData.recorder=new MediaRecorder(e.recordData.stream,n),e.recordData.recorder.ondataavailable=function(t){if(t.data.size>0&&e.recordData.data.push(t.data),e.recordData.stopped){var n=document.createElement("a");if(n.href=window.URL.createObjectURL(new Blob(e.recordData.data,{type:"video/webm"})),"string"==typeof e.gameName)var o=e.gameName;n.download=o?"".concat(o,"-recording.webm"):"record.webm",n.click(),window.URL.revokeObjectURL(n.href),delete e.recordData,e.elements.buttons.screenRecord.getElementsByClassName("ejs--74c6d4176d27e37a19d2e9e61de8f4")[0].innerHTML=e.localization("Start Screen Recording")}},e.recordData.recorder.start(),e.recordData.started=!0}})),e.elements.buttons.play&&Array.from(e.elements.buttons.play).forEach((function(t){M.call(e,t,"click",(function(t){e.playing?(e.playing=!1,Ke.Module.pauseMainLoop(),at.connected&&at.connection.isInitiator&&at.connection.send(JSON.stringify({act:"pause"})),P.call(e,e.elements.container,"pause",!1,{pause:!0})):(e.playing=!0,Ke.Module.resumeMainLoop(),at.connected&&at.connection.isInitiator&&at.connection.send(JSON.stringify({act:"resume"})),P.call(e,e.elements.container,"pause",!1,{pause:!1}))}))})),e.elements.buttons.netplay&&M.call(e,e.elements.buttons.netplay,"click",(function(t){at.disableControl(!0),U(e.elements.dialogs.netplay,!1),at.players.length>0?at.openRoom(e):(at.stopLoadRooms(),at.loadRoomsList()),at.playerName||rt.show("modal-9de6c4e9ce2b9361",{closeByEsckey:!1})})),e.elements.buttons.cheat&&M.call(e,e.elements.buttons.cheat,"click",(function(t){U(e.elements.dialogs.cheat,!1)})),M.call(e,e.elements.container,"savestate",(function(t){if(!at.saveLoadDB.call(e,"save")){var n=t.detail.state;if(w(e.config.onsavestate))e.config.onsavestate.call(null,{screenshot:t.detail.screenshot,state:n});else{var o=new Blob([n]),r=e.startName.split("/").pop().split("."),a=r.slice(0,r.length-1).join(".");if("string"==typeof e.gameName)a=e.gameName;var i=a?"".concat(a,".state"):"game.state";be()(o,i)}e.elements.container.focus()}})),e.game.stateloadField=D("input"),e.game.stateloadField.type="file",e.game.stateloadField.onchange=function t(n){var o,r=n.target.files;r.length>0&&((o=new FileReader).file_name=r[0].name,o.onload=function(){var e=new Uint8Array(o.result);EJS_loadState(e)},o.readAsArrayBuffer(r[0])),e.game.stateloadField=D("input"),e.game.stateloadField.type="file",e.game.stateloadField.onchange=t},M.call(e,e.elements.container,"loadstate",(function(t){at.saveLoadDB.call(e,"load")||(w(e.config.onloadstate)?e.config.onloadstate.call(null,e.loadState):e.game.stateloadField.click(),e.elements.container.focus())})),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState?console.log("hidden"):console.log("active")}))},bindFunction:function(){var e=this,t=e.system;if(Ke.Module&&Ke.Module._set_volume){var n=Ke.Module.cwrap("set_volume","null",["number"]);at.setVolume=function(){var t=0;e.volume<1&&(t=0===e.volume?-80:30*e.volume-30,n(t)),e.muted&&(t=-80),n(t)}}at.setVariable=Ke.Module.cwrap("set_variable","null",["string","string"]),at.simulateInputFn=Ke.Module.cwrap("simulate_input","null",["number","number","number"]);var o={0:null,1:null,2:null,3:null,4:null,5:null,6:null,7:null,8:null,9:null,10:null,11:null,12:null,13:null,14:null,15:null,16:null,17:null,18:null,19:null,20:null,21:null,22:null,23:null,24:null,25:null,26:null,27:null,28:null,29:null,30:null,31:null};at.simulateInput=function(t,n,r){if(at.connected){if(e.playing&&!at.disableInput){var a=at.connection.userid,i=at.roomMaster===a,s=at.players.indexOf(a),c=at.currentFrameNum();t>>0==0&&(o[n]!==r&&(i?(at.inputsData[c]||(at.inputsData[c]=[]),at.inputsData[c].push({index:s,key:n,status:r,frame:c}),at.simulateInputFn(s,n,r)):at.connection.send(JSON.stringify({act:"sync-control",value:["".concat(s,"|").concat(n,"|").concat(r,"|").concat(c)]}),at.roomMaster)),o[n]=r)}}else at.disableInput||at.simulateInputFn(t,n,r)},at.syncInput=at.simulateInput,window.simulateInput=at.simulateInput;var r=Ke.Module.cwrap("shader_enable","null",["number"]);at.toggleShader=function(e){return r(e)},at.getStateInfo=Ke.Module.cwrap("get_state_info","string",[]),at.saveState=function(){var e,t=at.getStateInfo().split("|"),n=t[0]>>0;if(n>0){e=new Uint8Array(n);for(var o=t[1]>>0,r=0;r<n;r++)e[r]=Ke.Module.getValue(o+r)}return e};var a=Ke.Module.cwrap("load_state","number",["string","number"]);at.loadState=function(n,o){var r;r=n;try{Ke.FS.unlink("game.state")}catch(e){}if(Ke._FS.createDataFile("/","game.state",r,!0,!0),null===o&&(o=0),"arcade"===t?setTimeout((function(){at.getStateInfo(),a("game.state",o),Ke.FS.unlink("game.state")}),10):(a("game.state",o),setTimeout((function(){Ke.FS.unlink("game.state")}),100)),at.connected&&at.connection.isInitiator){for(var i=at.getStateInfo().split("|"),s=i[0]>>0,c=(i[2],new Uint8Array(s)),l=i[1]>>0,u=0;u<s;u+=1)c[u]=Ke.Module.getValue(l+u);var d=new File([c],"0-game.state",{type:"",lastModified:new Date});at.connection.shareFile(d),at.inputsData={},at.wait=!0,at.systemPause(1),Ke.Module.pauseMainLoop(),at.disableControl(!0)}e.elements.container.focus()},Ke.Module._set_cheat&&(at.setCheat=Ke.Module.cwrap("set_cheat","number",["number","number","string"])),Ke.Module._reset_cheat&&(at.resetCheat=Ke.Module._reset_cheat),at.quickSaveState=function(){if(e.started&&!at.connected){if(!1===e.statesSupported)return e.elements.widgets.stateInfoDiv.innerHTML="CANNOT CURRENTLY SAVE STATE",clearTimeout(at.saveMsgTransitions),void(at.saveMsgTransitions=setTimeout((function(){e.elements.widgets.stateInfoDiv.innerHTML=""}),1500));if(ct&&"function"==typeof ct.getCoreOptionsValues)(t=ct.getCoreOptionsValues()["save-state-slot"])||(t=1);else var t=1;var n=t+"-quick.state";try{Ke.FS.unlink(n)}catch(e){}try{var o=at.saveState();Ke._FS.createDataFile("/",n,o,!0,!0),e.elements.widgets.stateInfoDiv.innerHTML="STATE SAVED TO SLOT "+t,clearTimeout(at.saveMsgTransitions),at.saveMsgTransitions=setTimeout((function(){e.elements.widgets.stateInfoDiv.innerHTML=""}),1500)}catch(n){e.elements.widgets.stateInfoDiv.innerHTML="FAILED TO SAVE STATE TO SLOT "+t,clearTimeout(at.saveMsgTransitions),at.saveMsgTransitions=setTimeout((function(){e.elements.widgets.stateInfoDiv.innerHTML=""}),1500)}}},at.saveMsgTransitions=null,at.quickLoadState=function(){if(e.started&&!at.connected){if(!1===e.statesSupported)return e.elements.widgets.stateInfoDiv.innerHTML="CANNOT CURRENTLY LOAD STATE",clearTimeout(at.saveMsgTransitions),void(at.saveMsgTransitions=setTimeout((function(){e.elements.widgets.stateInfoDiv.innerHTML=""}),1500));if(ct&&"function"==typeof ct.getCoreOptionsValues)(n=ct.getCoreOptionsValues()["save-state-slot"])||(n=1);else var n=1;var o=n+"-quick.state",r=!0;try{a(o,0),"arcade"===t&&setTimeout((function(){at.getStateInfo(),a(o,0)}),10)}catch(e){r=!1}e.elements.widgets.stateInfoDiv.innerHTML=r?"LOADED STATE FROM SLOT "+n:"FAILED TO LOAD STATE FROM SLOT "+n,clearTimeout(at.saveMsgTransitions),at.saveMsgTransitions=setTimeout((function(){e.elements.widgets.stateInfoDiv.innerHTML=""}),1500)}},at.changeStateSlot=function(t){var n;if(ct&&"function"==typeof ct.getCoreOptionsValues)(o=ct.getCoreOptionsValues()["save-state-slot"])||(o=1);else var o=1;(n="number"!=typeof t?o+1:t)>9&&(n=1),st.updateCoreOptions.call(e,"save-state-slot",n),e.elements.widgets.stateInfoDiv.innerHTML="SET SAVE STATE SLOT TO "+n,clearTimeout(at.saveMsgTransitions),at.saveMsgTransitions=setTimeout((function(){e.elements.widgets.stateInfoDiv.innerHTML=""}),1500)},window.EJS_loadState=function(e){at.loadState(e,0),setTimeout((function(){if(at.connected){var t=new File([e],"0-game.state",{type:"",lastModified:new Date});at.connection.shareFile(t),at.inputsData={},at.wait=!0,at.systemPause(1),Ke.Module.pauseMainLoop(),at.disableControl(!0)}}),30)};var i=Ke.Module.cwrap("cmd_take_screenshot","",[]);at.getScreenData=function(){return at.toggleShader(0),i(),at.toggleShader(1),Ke.FS.readFile("screenshot.png")},at.restartGame=Ke.Module.cwrap("system_restart","",[]),at.currentFrameNum=Ke.Module.cwrap("get_current_frame_count","",[]),at.saveSavFiles=Ke.Module.cwrap("cmd_savefiles","",[]),Ke.Module._get_core_options&&(at.getGameCoreOptions=Ke.Module.cwrap("get_core_options","string",[])),at.systemPause=function(e){return!1},at.controllers=ct.storage.get("controllers"),at.controllers||(at.controllers=JSON.parse(JSON.stringify(at.defaultControllers)))}},it=at;var st={storage:null,coreOptionsValues:{},contextMenu:null,normalOptions:{shader:{label:"Shader",options:{disabled:"Disabled","2xScaleHQ.glslp":"2xScaleHQ","4xScaleHQ.glslp":"4xScaleHQ","crt-easymode.glslp":"CRT easymode","crt-aperture.glslp":"CRT aperture","crt-geom.glslp":"CRT geom"},default:"disabled"},"virtual-gamepad":{label:"Virtual Gamepad",options:{disabled:"Disabled",enabled:"Enabled"},default:"enabled"}},defaultCoreOptionsValues:function(){var e={};switch(this.system){case"pce":e={pce_nospritelimit:"enabled"};break;case"jaguar":e={virtualjaguar_doom_res_hack:"enabled"};break;case"psx":e={pcsx_rearmed_memcard2:"enabled"};break;case"nds":e={}}return e},getCoreOptionsValues:function(){var e=st.storage.get("core-options");return E(e)&&(e={}),e},getCoreOptions:function(){var e={};switch(this.system){case"nes":e.fceumm_palette={label:this.localization("Color Palette"),options:{default:this.localization("Default"),asqrealc:"asqrealc","nintendo-vc":"nintendo-vc",rgb:"rgb","yuv-v3":"yuv-v3","unsaturated-final":"unsaturated-final","sony-cxa2025as-us":"sony-cxa2025as-us",pal:"pal","bmf-final2":"bmf-final2","bmf-final3":"bmf-final3","smooth-fbx":"smooth-fbx","composite-direct-fbx":"composite-direct-fbx","pvm-style-d93-fbx":"pvm-style-d93-fbx",nescap:"nescap","ntsc-hardware-fbx":"ntsc-hardware-fbx","nes-classic-fbx-fs":"nes-classic-fbx-fs",wavebeam:"wavebeam"},default:"default"},e.fceumm_nospritelimit={label:this.localization("No Sprite Limit"),options:{enabled:this.localization("Enabled"),disabled:this.localization("Disabled")},default:"disabled"},e.fceumm_sndquality={label:this.localization("Sound Quality"),options:{Low:this.localization("Low"),High:this.localization("High"),"Very High":this.localization("Very High")},default:"Low"},this.lightgun||(e.system_type={label:this.localization("4 Players Support"),options:{nes:"NES",famicom:"Famicom"},default:"nes",netplay:!0}),e.fceumm_turbo_enable={label:this.localization("Turbo Enable"),options:{None:this.localization("None"),"Player 1":this.localization("Player 1"),"Player 2":this.localization("Player 2"),Both:this.localization("Both")},default:"None",netplay:!0},e.fceumm_region={label:this.localization("Region"),options:{Auto:this.localization("Auto"),NTSC:"NTSC",PAL:"PAL",Dendy:"Dendy"},default:"Auto",netplay:!0};break;case"snes":e={snes9x_next_overclock:{label:this.localization("SuperFX Overclock"),options:{disabled:this.localization("Disabled")+"(10MHz)","40MHz":"40MHz","60MHz":"60MHz","80MHz":"80MHz","100MHz":"100MHz"},default:"disabled",netplay:!0}};break;case"snes2002":case"snes2005":case"snes2010":case"vb":case"pce":case"ws":case"ngp":case"mame2003":case"mame2010":case"mame":case"dos":e={};break;case"gb":e={gambatte_gb_colorization:{label:this.localization("GB Colorization"),options:{disabled:this.localization("Disabled"),auto:this.localization("auto"),internal:this.localization("internal")},default:"disabled"},gambatte_gb_internal_palette:{label:this.localization("Internal Palette"),options:{"GBC - Blue":this.localization("GBC - Blue"),"GBC - Brown":this.localization("GBC - Brown"),"GBC - Dark Blue":this.localization("GBC - Dark Blue"),"GBC - Dark Brown":this.localization("GBC - Dark Brown"),"GBC - Dark Green":this.localization("GBC - Dark Green"),"GBC - Grayscale":this.localization("GBC - Grayscale"),"GBC - Green":this.localization("GBC - Green"),"GBC - Inverted":this.localization("GBC - Inverted"),"GBC - Orange":this.localization("GBC - Orange"),"GBC - Pastel Mix":this.localization("GBC - Pastel Mix"),"GBC - Red":this.localization("GBC - Red"),"GBC - Yellow":this.localization("GBC - Yellow")},default:"GBC - Blue"}};break;case"gba":e={mgba_solar_sensor_level:{label:this.localization("Solar sensor level"),options:["0","1","2","3","4","5","6","7","8","9","10"],default:"0"},mgba_frameskip:{label:this.localization("Frameskip"),options:["0","1","2","3","4","5","6","7","8","9","10"],default:"0"}};break;case"vbanext":e={vbanext_turboenable:{label:this.localization("Enable Turbo Buttons"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"disabled"},vbanext_turbodelay:{label:this.localization("Turbo Delay in frames"),options:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],default:"2"}};break;case"n64":e={"glupen64-aspect":{label:this.localization("Aspect Ratio (Need to refresh page)"),options:["4:3","16:9"],default:"4:3"},"glupen64-43screensize":{label:this.localization("4:3 Resolution"),options:["320x240","640x480","960x720","1280x960"],default:"320x240"},"glupen64-169screensize":{label:this.localization("16:9 Resolution"),options:["640x360","960x540","1280x720"],default:"640x360"},"glupen64-pak1":{label:this.localization("Player 1 Pak"),options:{none:this.localization("none"),memory:this.localization("memory"),rumble:this.localization("rumble")},default:"none",netplay:!0},"glupen64-pak2":{label:this.localization("Player 2 Pak"),options:{none:this.localization("none"),memory:this.localization("memory"),rumble:this.localization("rumble")},default:"none",netplay:!0},"glupen64-pak3":{label:this.localization("Player 3 Pak"),options:{none:this.localization("none"),memory:this.localization("memory"),rumble:this.localization("rumble")},default:"none",netplay:!0},"glupen64-pak4":{label:this.localization("Player 4 Pak"),options:{none:this.localization("none"),memory:this.localization("memory"),rumble:this.localization("rumble")},default:"none",netplay:!0}},!it||"undefined"==it.virtualGamepadContainer&&null===it.virtualGamepadContainer||(e["joystick-input"]={label:this.localization("Joystick input keys"),options:{"d-pad":this.localization("d-pad"),"analog-stick":this.localization("Analog Stick")},default:"analog-stick",netplay:!0});break;case"nds":e={desmume_screens_layout:{label:this.localization("Screen layout"),options:{"top/bottom":this.localization("top/bottom"),"bottom/top":this.localization("bottom/top"),"left/right":this.localization("left/right"),"right/left":this.localization("right/left"),"top only":this.localization("top only"),"bottom only":this.localization("bottom only"),"quick switch":this.localization("quick switch"),"hybrid/top":this.localization("hybrid/top"),"hybrid/bottom":this.localization("hybrid/bottom")},default:"top/bottom"},screen_rotation:{label:this.localization("Screen Rotation"),options:{0:"0°",90:"90°",180:"180°",270:"270°"},default:0},desmume_frameskip:{label:this.localization("Frameskip"),options:["0","1","2","3","4","5","6","7","8","9"],default:"0"}},se.wasm||delete e.screen_rotation;break;case"segaMS":case"segaGG":case"segaMD":case"segaCD":e={genesis_plus_gx_no_sprite_limit:{label:this.localization("No Sprite Limit"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"disabled"},genesis_plus_gx_overclock:{label:this.localization("CPU speed"),options:["100%","125%","150%","175%","200%"],default:"100%",netplay:!0},genesis_plus_gx_sound_output:{label:this.localization("Sound output"),options:{stereo:this.localization("stereo"),mono:this.localization("mono")},default:"stereo"}};break;case"sega32x":e={picodrive_sprlim:{label:this.localization("No sprite limit"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"disabled"}};break;case"segaSaturn":e={yabause_frameskip:{label:this.localization("Frameskip"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"disabled"}};break;case"msx":e={bluemsx_nospritelimits:{label:this.localization("No Sprite Limit"),options:{OFF:this.localization("OFF"),ON:this.localization("ON")},default:"OFF"}};break;case"jaguar":e={virtualjaguar_usefastblitter:{label:this.localization("Fast Blitter"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"disabled"},virtualjaguar_bios:{label:this.localization("Bios"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"disabled"}};break;case"psx":e={pcsx_rearmed_frameskip:{label:this.localization("Frameskip"),options:[0,1,2,3],default:0,netplay:!0},pcsx_rearmed_memcard2:{label:this.localization("Enable second memory card"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"enabled",netplay:!0},pcsx_rearmed_pad1type:{label:this.localization("Pad 1 Type"),options:{default:this.localization("default"),none:this.localization("none"),standard:this.localization("standard"),analog:this.localization("analog"),negcon:this.localization("negcon")},default:"default",netplay:!0},pcsx_rearmed_pad2type:{label:this.localization("Pad 2 Type"),options:{default:this.localization("default"),none:this.localization("none"),standard:this.localization("standard"),analog:this.localization("analog"),negcon:this.localization("negcon")},default:"default",netplay:!0},pcsx_rearmed_pad3type:{label:this.localization("Pad 3 Type"),options:{default:this.localization("default"),none:this.localization("none"),standard:this.localization("standard"),analog:this.localization("analog"),negcon:this.localization("negcon")},default:"default",netplay:!0},pcsx_rearmed_pad4type:{label:this.localization("Pad 4 Type"),options:{default:this.localization("default"),none:this.localization("none"),standard:this.localization("standard"),analog:this.localization("analog"),negcon:this.localization("negcon")},default:"default",netplay:!0},pcsx_rearmed_vibration:{label:this.localization("Enable Vibration"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"enabled",netplay:!0},pcsx_rearmed_neon_interlace_enable:{label:this.localization("Enable interlacing mode(s)"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"disabled",netplay:!0},pcsx_rearmed_neon_enhancement_enable:{label:this.localization("Enhanced resolution (slow)"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"disabled",netplay:!0},pcsx_rearmed_neon_enhancement_no_main:{label:this.localization("Enhanced resolution speed hack"),options:{disabled:this.localization("disabled"),enabled:this.localization("enabled")},default:"disabled",netplay:!0}};break;case"arcade":case"fba0.2.97.29":e={"fba-aspect":{label:this.localization("Aspect ratio"),options:["DAR","PAR"],default:"DAR"},"fba-frameskip":{label:this.localization("Frameskip"),options:["0","1","2","3","4","5"],default:"0",netplay:!0},"fba-cpu-speed-adjust":{label:this.localization("CPU overclock"),options:["100","110","120","130","140","150","160","170","180","190","200"],default:"100",netplay:!0},"fba-diagnostic-input":{label:this.localization("Diagnostic Input"),options:["None","Hold Start","Start + A + B","Hold Start + A + B","Start + L + R","Hold Start + L + R","Hold Select","Select + A + B","Hold Select + A + B","Select + L + R","Hold Select + L + R"],default:"None",netplay:!0},"fba-neogeo-mode":{label:this.localization("Force Neo Geo mode"),options:["MVS","AES","UNIBIOS","DIPSWITCH"],default:"MVS",netplay:!0}};break;default:e={},console.warn("Unsupported emulator")}return 2===this.coreVer&&(e={}),!0===this.statesSupported&&(e["save-state-slot"]={label:this.localization("Save State Slot"),options:[1,2,3,4,5,6,7,8,9],default:1}),!0!==this.statesSupported||!window.indexedDB||"string"!=typeof this.gameName&&this.config.gameUrl.startsWith("blob:")||(e["save-state-location"]={label:this.localization("Save State Location"),options:{download:this.localization("download"),"keep in browser":this.localization("keep in browser")},default:"download"}),it.getGameCoreOptions&&it.getGameCoreOptions().split("\n").forEach((function(t,n){var o=t.split("; "),r=o[0];if(0===r.indexOf("fba-dipswitch-")){var a=o[1].split("|"),i=r.replace(/_/g," ").replace(/.+\-(.+)/,"$1");e[r]={label:i,options:a.slice(1,-1),default:a[0].replace("(Default) ",""),netplay:!0}}})),e},supportNetPlay:function(){if(this.lightgun||this.mouse)return!1;var e=window.RTCPeerConnection||window.webkitPeerConnection00||window.webkitRTCPeerConnection||window.mozRTCPeerConnection,t=window.mozRTCIceCandidate||window.RTCIceCandidate,n=window.mozRTCSessionDescription||window.RTCSessionDescription;return!!(e&&t&&n)&&!(!e||!("createDataChannel"in e.prototype))},isNetPlay:function(){},findElements:function(){try{return this.elements.controls=W.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:H.call(this,this.config.selectors.buttons.play),pause:W.call(this,this.config.selectors.buttons.pause),restart:W.call(this,this.config.selectors.buttons.restart),mute:W.call(this,this.config.selectors.buttons.mute),settings:W.call(this,this.config.selectors.buttons.settings),fullscreen:W.call(this,this.config.selectors.buttons.fullscreen),saveState:W.call(this,this.config.selectors.buttons.saveState),screenRecord:W.call(this,this.config.selectors.buttons.screenRecord),loadState:W.call(this,this.config.selectors.buttons.loadState),gamepad:W.call(this,this.config.selectors.buttons.gamepad),netplay:W.call(this,this.config.selectors.buttons.netplay),cheat:W.call(this,this.config.selectors.buttons.cheat)},this.elements.inputs={volume:W.call(this,this.config.selectors.inputs.volume)},!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),!1}},createIcon:function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");F(n,ue(t,{role:"presentation",focusable:"false"}));var o=document.createElement("div");o.innerHTML="<svg>".concat(this.icons[e],"</svg>");for(var r=o.childNodes[0].childNodes,a=0;a<r.length;a+=1)n.appendChild(r[a]);return n},createLabel:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=pe(e,this.config),o={};o[t.class]=!0,o[this.config.classNames.hidden]=!0;var r=Object.assign({},t,{class:[t.class,this.config.classNames.tooltip].filter(Boolean).join(" ")});return D("span",r,n)},createBadge:function(e){if(E(e))return null;var t=D("span",{class:this.config.classNames.menu.value});return t.appendChild(D("span",{class:this.config.classNames.menu.badge},e)),t},createButton:function(e,t){var n,o,r,a,i=D("button"),s=Object.assign({},t),c=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(e=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return e=de(e,"-"," "),e=de(e,"_"," "),de(e=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))}(e)," ","")}(e)).charAt(0).toLowerCase()+e.slice(1)}(e),l=!1;"type"in s||(s.type="button");var u=K({ejs__control:!0});switch("class"in s?s.class.includes(u)||(s.class+=" ".concat(u)):s.class=u,e){case"play":l=!0,n="play",r="pause",o="play",a="pause";break;case"mute":l=!0,n="mute",r="unmute",o="volume",a="muted";break;case"fullscreen":l=!0,n="enterFullscreen",r="exitFullscreen",o="enter-fullscreen",a="exit-fullscreen";break;default:n=c,o=e}return l?(i.appendChild(st.createIcon.call(this,a,{class:K({"icon--pressed":!0})})),i.appendChild(st.createIcon.call(this,o,{class:K({"icon--not-pressed":!0})})),i.appendChild(st.createLabel.call(this,r,{class:K({"icon--pressed":!0})})),i.appendChild(st.createLabel.call(this,n,{class:K({"icon--not-pressed":!0})}))):(i.appendChild(st.createIcon.call(this,o)),i.appendChild(st.createLabel.call(this,n))),ue(s,B(this.config.selectors.buttons[c],s)),F(i,s),"play"===c?(x(this.elements.buttons[c])||(this.elements.buttons[c]=[]),this.elements.buttons[c].push(i)):this.elements.buttons[c]=i,i},createRange:function(e,t){var n=D("input",ue(B(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.1,value:0,autocomplete:"off",role:"slider","aria-label":pe(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,st.updateRangeFill.call(this,n),n},bindMenuItemShortcuts:function(e,t){var n=this;M(e,"keydown keyup",(function(o){if([32,38,39,40].includes(o.which)&&(o.preventDefault(),o.stopPropagation(),"keydown"!==o.type)){var r,a=q(e,'[role="menuitemradio"]');!a&&[32,39].includes(o.which)?st.showMenuPanel.call(n,t,!0):32!==o.which&&(40===o.which||a&&39===o.which?(r=e.nextElementSibling,S(r)||(r=e.parentNode.firstElementChild)):(r=e.previousElementSibling,S(r)||(r=e.parentNode.lastElementChild)),X.call(n,r,!0))}}),!1),M(e,"keyup",(function(e){13===e.which&&st.focusFirstMenuItem.call(n,null,!0)}))},createMenuItem:function(e){var t=this,n=e.value,o=e.list,r=e.type,a=e.title,i=e.badge,s=void 0===i?null:i,c=e.checked,l=void 0!==c&&c,u=B(this.config.selectors.inputs[r]),d=D("button",ue(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":l,value:n})),f=D("span");f.innerHTML=a,S(s)&&f.appendChild(s),d.appendChild(f),Object.defineProperty(d,"checked",{enumerable:!0,get:function(){return"true"===d.getAttribute("aria-checked")},set:function(e){e&&Array.from(d.parentNode.children).filter((function(e){return q(e,'[role="menuitemradio"]')})).forEach((function(e){return e.setAttribute("aria-checked","false")})),d.setAttribute("aria-checked",e?"true":"false")}});var p=st.getCoreOptions.call(this);this.listeners.bind(d,"click keyup",(function(e){C(e)&&32!==e.which||(e.preventDefault(),e.stopPropagation(),d.checked=!0,Object.keys(st.normalOptions).includes(r)&&st.updateNormalOptions.call(t,r,n),Object.keys(p).includes(r)&&(p[r].netplay&&it.connected?it.connection.isInitiator&&(st.updateCoreOptions.call(t,r,n),it.connection.send(JSON.stringify({act:"update-core-option",key:r,value:n,frame:it.currentFrame}))):st.updateCoreOptions.call(t,r,n)),st.showMenuPanel.call(t,"home",C(e)))}),r,!1),st.bindMenuItemShortcuts.call(this,d,r),o.appendChild(d)},updateVolume:function(){S(this.elements.inputs.volume)&&st.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),S(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume)},setRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;S(e)&&(e.value=t,st.updateRangeFill.call(this,e))},updateRangeFill:function(e){var t=T(e)?e.target:e;if(S(t)&&"range"===t.getAttribute("type")){if(q(t,this.config.selectors.inputs.volume)){var n=100*t.value;t.setAttribute("aria-valuenow",n),t.setAttribute("aria-valuetext","".concat(n.toFixed(1),"%"))}else t.setAttribute("aria-valuenow",t.value);re&&t.style.setProperty("--value","".concat(t.value/t.max*100,"%"))}},toggleMenuButton:function(e,t){U(this.elements.settings.buttons[e],!t)},updateNormalOptions:function(e,t){this.elements.settings.buttons[e].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=st.normalOptions[e].options[t];var n={};n[e]=t,st.storage.set(n),"shader"===e&&it.setShader(t),"virtual-gamepad"===e&&it.toggleVirtualGamepad.call(this,"enabled"===t)},updateCoreOptions:function(e,t){if("nds"==this.system&&!se.wasm)return!0;if(st.coreOptionsValues[e]=t,"psx"===this.system&&Ke.Module.pauseMainLoop(),it.setVariable(e,t),"psx"===this.system&&(setTimeout((function(){Ke.Module.resumeMainLoop()}),100),setTimeout((function(){Ke.Module.resumeMainLoop()}),200)),"nds"===this.system&&se.wasm){var n=this.elements.wrapper.querySelector("canvas");if("screen_rotation"===e)switch(n.style.transform="rotate("+t+"deg)",t){case"0":it.setVariable("desmume_input_rotation","0");break;case"90":it.setVariable("desmume_input_rotation","270");break;case"180":it.setVariable("desmume_input_rotation","180");break;case"270":it.setVariable("desmume_input_rotation","90")}}if("arcade"===this.system||"fba0.2.97.29"===this.system){var o=this.elements.wrapper.querySelector("canvas");o.height="fba-aspect"===e&&"PAR"===t?o.width/16*9:o.width/4*3}var r=st.getCoreOptions.call(this),a=st.storage.get("core-options");if(E(a)&&(a={}),a[e]=t,st.storage.set({"core-options":a}),this.elements.settings.buttons[e]){var i=this.elements.settings.buttons[e].querySelector(".".concat(this.config.classNames.menu.value));v(r[e].options)?i.innerHTML=r[e].options[t]:i.innerHTML=t}},setOptionMenuItem:function(e,t){var n=this,o=this.elements.settings.panels.home.querySelector('[role="menu"]'),r=this.elements.settings.popup.children[0];Object.keys(e).forEach((function(a){var i=a,s=D("button",ue(B(n.config.selectors.buttons.settings),{type:"button",class:K({ejs__control:!0,"ejs__control--forward":!0}),role:"menuitem",item:a,"aria-haspopup":!0}));M(s,"click",(function(){st.showMenuPanel.call(n,i,!1)}));var c,l=D("span",null,e[a].label),u=D("span",{class:n.config.classNames.menu.value});v(t)&&(c=t[i]),E(c)&&(c=e[i].default),v(e[i].options)?u.innerHTML=e[i].options[c]:u.innerHTML=c,l.appendChild(u),s.appendChild(l),o.appendChild(s);var d=D("div",{"data-pane":escape(i),hidden:""}),f=D("button",{type:"button",class:K({ejs__control:!0,"ejs__control--back":!0})});f.appendChild(D("span",{"aria-hidden":!0},e[a].label)),f.appendChild(D("span",{class:K({"ejs__sr-only":!0})},pe("menuBack",n.config))),M(d,"keydown",(function(e){37===e.which&&(e.preventDefault(),e.stopPropagation(),st.showMenuPanel.call(n,"home",!0))}),!1),M(f,"click",(function(){st.showMenuPanel.call(n,"home",!1)})),d.appendChild(f),d.appendChild(D("div",{role:"menu"})),r.appendChild(d),n.elements.settings.buttons[i]=s,n.elements.settings.panels[i]=d;var p=d.querySelector('[role="menu"]');!function(e){if(S(e))for(var t=e.childNodes.length;t>0;)e.removeChild(e.lastChild),t-=1}(p),v(e[a].options)?Object.keys(e[a].options).forEach((function(t){st.createMenuItem.call(n,{value:t,list:p,type:i,title:e[a].options[t],badge:null,checked:Boolean(c===t)})})):x(e[a].options)&&e[a].options.forEach((function(e){st.createMenuItem.call(n,{value:e,list:p,type:i,title:e,badge:null,checked:Boolean(c===e)})}))}))},setNormalOptionsMenu:function(){var e=this,t=this,n={};n.orientation=st.storage.get("orientation"),n.shader=st.storage.get("shader"),t.touch?(n["virtual-gamepad"]=st.storage.get("virtual-gamepad"),M.call(t,t.elements.container,"start-game",(function(){("enabled"===n["virtual-gamepad"]||E(n["virtual-gamepad"]))&&it.toggleVirtualGamepad.call(t,!0)}))):delete st.normalOptions["virtual-gamepad"],st.setOptionMenuItem.call(this,st.normalOptions,n),M.call(t,t.elements.container,"start-game",(function(){var n=e,o={};it.getGameCoreOptions&&it.getGameCoreOptions().split("\n").forEach((function(e,t){var n=e.split("; "),r=n[0];if(0===r.indexOf("fba-dipswitch-")){var a=n[1].split("|"),i=r.replace(/_/g," ").replace(/.+\-(.+)/,"$1");o[r]={label:i,options:a.slice(1,-1),default:a[0].replace("(Default) ",""),netplay:!0}}}));var r=st.storage.get("core-options");st.coreOptionsValues=r||{},st.setOptionMenuItem.call(t,o,st.coreOptionsValues),Object.keys(st.coreOptionsValues).forEach((function(e,t){st.updateCoreOptions.call(n,e,st.coreOptionsValues[e])})),"nds"==t.system&&(Ke.Module._fast_forward_2?Ke.Module._fast_forward_2(1):Ke.Module._fast_forward&&Ke.Module._fast_forward(1))}))},updateCoreOptionMenuItems:function(){var e=this.elements.settings.panels.home.querySelector('[role="menu"]'),t=st.getCoreOptions.call(this);it.connected&&!it.connection.isInitiator?Object.keys(t).forEach((function(n){t[n].netplay&&e.querySelector('[item="'.concat(n,'"]')).setAttribute("disabled","")})):Object.keys(t).forEach((function(t){e.querySelector('[item="'.concat(t,'"]')).removeAttribute("disabled")}))},setCoreOptionsMenu:function(){this.elements.settings.panels.home.querySelector('[role="menu"]'),this.elements.settings.popup.children[0];var e=st.getCoreOptions.call(this),t=st.storage.get("core-options");st.coreOptionsValues=t||{},st.setOptionMenuItem.call(this,e,t)},checkMenu:function(){var e=this.elements.settings.buttons;!E(e)&&Object.values(e).some((function(e){return!e.hidden})),U(this.elements.settings.menu,!1)},focusFirstMenuItem:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var n=e;S(n)||(n=Object.values(this.elements.settings.panels).find((function(e){return!e.hidden})));var o=n.querySelector('[role^="menuitem"]');X.call(this,o,t)}},toggleMenu:function(e){var t=this.elements.settings.popup,n=this.elements.buttons.settings;if(S(t)&&S(n)){var o=t.hidden,r=o;if(y(e))r=e;else if(C(e)&&27===e.which)r=!1;else if(T(e)){var a=t.contains(e.target);if(a||!a&&e.target!==n&&r)return}n.setAttribute("aria-expanded",r),U(t,!r),G(this.elements.container,this.config.classNames.menu.open,r),r&&C(e)?st.focusFirstMenuItem.call(this,null,!0):r||o||X.call(this,n,C(e))}},getMenuSize:function(e){var t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);var n=t.scrollWidth,o=t.scrollHeight;return z(t),{width:n,height:o}},showLoadStatePanel:function(){},showMenuPanel:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=W.call(this,'[data-pane="'.concat(escape(t),'"]'));if(S(o)){var r=o.parentNode,a=Array.from(r.children).find((function(e){return!e.hidden}));if(se.transitions&&!se.reducedMotion){r.style.width="".concat(a.scrollWidth,"px"),r.style.height="".concat(a.scrollHeight,"px");var i=st.getMenuSize.call(this,o),s=function t(n){n.target===r&&["width","height"].includes(n.propertyName)&&(r.style.width="",r.style.height="",O.call(e,r,Q,t))};M.call(this,r,Q,s),r.style.width="".concat(i.width,"px"),r.style.height="".concat(i.height,"px")}U(a,!0),U(o,!1),st.focusFirstMenuItem.call(this,o,n)}},setLoadState:function(e,t){e.appendChild(st.createButton.call(this,"load-state",{"aria-haspopup":!0,"aria-expanded":!1}));var n=D("div",{class:K({ejs__dialog:!0,"ejs__load-state__container":!0}),hidden:""}),o=D("div");n.appendChild(o),W.call(this,".".concat(K({ejs__dialogs:!0}))).appendChild(n),this.elements.dialogs.loadState=n},setScreenRecord:function(e,t){if(window.MediaRecorder){var n=st.createButton.call(this,"screen-record",{"aria-haspopup":!0,"aria-expanded":!1,style:"margin-right:auto;"});e.appendChild(n);var o=D("div",{class:K({ejs__dialog:!0,ejs__screenRecord__container:!0}),hidden:""}),r=D("div");o.appendChild(r),W.call(this,".".concat(K({ejs__dialogs:!0}))).appendChild(o),this.elements.dialogs.screenRecord=o}},setGamepad:function(e,t){var n=st.createButton.call(this,"gamepad",{"aria-haspopup":!0,"aria-expanded":!1,style:"margin-right:auto;"});e.appendChild(n);var o=D("div",{class:K({ejs__dialog:!0,ejs__gamepad__container:!0}),hidden:""}),r=D("div");o.appendChild(r),W.call(this,".".concat(K({ejs__dialogs:!0}))).appendChild(o),this.elements.dialogs.gamepad=o},setCheat:function(e,t){var n=st.createButton.call(this,"cheat",{"aria-haspopup":!0,"aria-expanded":!1,style:"margin-right:auto;"});e.appendChild(n);var o=D("div",{class:K({ejs__dialog:!0,ejs__cheat__container:!0}),hidden:""}),r=D("div");o.appendChild(r),W.call(this,".".concat(K({ejs__dialogs:!0}))).appendChild(o),this.elements.dialogs.cheat=o},setStateInfoBarWidget:function(){var e=D("div",{class:K({ejs__widget:!0})}),t=D("div");t.style="color: red;font-size: 17px;padding:10px;text-align:left;text-shadow:1px 1px 1px #000",e.appendChild(t),W.call(this,".".concat(K({ejs__widgets:!0}))).appendChild(e),this.elements.widgets.stateInfo=e,this.elements.widgets.stateInfoDiv=t},setNetplayWidgets:function(){var e=D("div",{class:K({ejs__widget:!0,ejs__widget_netplay:!0})}),t=D("div");e.appendChild(t),W.call(this,".".concat(K({ejs__widgets:!0}))).appendChild(e),this.elements.widgets.netplay=e},setNetplay:function(e,t){e.appendChild(st.createButton.call(this,"netplay",{"aria-haspopup":!0,"aria-expanded":!1}));var n=D("div",{class:K({ejs__dialog:!0,ejs__netplay__container:!0}),hidden:""}),o=D("div");n.appendChild(o),W.call(this,".".concat(K({ejs__dialogs:!0}))).appendChild(n),this.elements.dialogs.netplay=n,st.setNetplayWidgets.call(this)},toggleContextMenu:function(e,t){if(V(e.target,K({ejs__dialogs:!0}))){var n=st.contextMenu.timer;if(this.started){var o=W.call(this,".".concat(K({ejs__contextmenu:!0})," ul"));if(t){st.contextMenu.style.display="block",st.contextMenu.style.left="".concat(e.layerX,"px"),st.contextMenu.style.top="".concat(e.layerY,"px");var r=H.call(this,".".concat(K({ejs__contextmenu:!0})," ul li"));if(Array.from(r).forEach((function(e,t){})),null===o.getAttribute("menu")){var a=D("li",{});a.appendChild(D("a",{target:"_blank",href:"https://github.com/ethanaobrien/emulatorjs"},"EmulatorJS v".concat(this.version))),o.appendChild(a),o.setAttribute("menu","")}n&&clearTimeout(n),n=setTimeout((function(){}),4e3),st.contextMenu.timer=n}else st.contextMenu.style.display="none"}}},create:function(e){var t=this;st.storage=new ve(this,"ejs_".concat(this.system,"_settings"));var n=D("div",B(this.config.selectors.controls.wrapper));st.contextMenu=D("div",{class:K({ejs__contextmenu:!0}),style:"position: absolute; display:none;z-index:9"});var o=["<ul>","</ul>"],r=[];function a(e,t,n){"function"==typeof n?r.push(n):r.push((function(){}));var a=o.length-1;t?o.splice(a,0,'<li hidden><a href="#" onclick="return false">'+e+"</a></li>"):o.splice(a,0,'<li><a href="#" onclick="return false">'+e+"</a></li>")}a(t.localization("Take Screenshot"),!1,(function(e){var n=at.getScreenData();if("string"==typeof t.gameName)var o=t.gameName;var r=o?"".concat(o,"-screenshot.png"):"game.png";return be()(new Blob([n]),r),!1})),a(t.localization("Cache Manage"),!0,(function(e){if(Ke.romdb){U(t.elements.dialogs.cache,!1);var n=t.elements.dialogs.cache.querySelector(".".concat(at.classNames["dialog-content"]));n.innerHTML="<div>"+t.localization("Loading")+"</div>",Ke.romdb.getAll((function(e){if(e){var o=D("table",{style:"width:100%;padding-left:10px;text-align:left"}),r=D("tbody");e.length>0?(n.innerHTML="",e.forEach((function(e,t){if(e.key&&!/-part-\d+$/.test(e.key)){for(var n=Math.ceil(e.filesize/104857600),o=[e.key],a=1;a<n;a+=1)o.push("".concat(e.key,"-part-").concat(a));var i=D("tr"),s=D("td"),c=D("td"),l=D("td");s.innerHTML=e.filename,c.innerHTML=function(e){var t=-1;do{e/=1024,t++}while(e>1024);return Math.max(e,.1).toFixed(1)+[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"][t]}(e.filesize),l.innerHTML='<a href="#" onclick="return false">Remove</a>',i.appendChild(s),i.appendChild(c),i.appendChild(l),r.appendChild(i),l.querySelector("a").onclick=function(e){Ke.romdb.removeBatch(o);try{r.removeChild(i)}catch(e){}return e.stopPropagation(),!1}}})),o.appendChild(r),n.appendChild(o)):n.innerHTML='<div style="text-align:center">'+t.localization("Empty")+"</div>"}else n.innerHTML='<div style="text-align:center">'+t.localization("Empty")+"</div>"}),(function(){}))}return!1})),a(t.localization("Quick Save")+" (F2)",!1,(function(e){at.quickSaveState(),ct.contextMenu.style.display="none"})),a(t.localization("Quick Load")+" (F4)",!1,(function(e){at.quickLoadState(),ct.contextMenu.style.display="none"})),st.contextMenu.innerHTML=o.join("");for(var i=st.contextMenu.getElementsByTagName("li"),s=0;s<i.length;s++)M.call(t,i[s],"click",r[s]);this.elements.container.appendChild(st.contextMenu);var c=D("div",{class:K({ejs__dialog:!0,ejs__cache__container:!0}),hidden:""});W.call(this,".".concat(K({ejs__dialogs:!0}))).appendChild(c),this.elements.dialogs.cache=c;var l=D("div",{class:K({ejs__dialog:!0,ejs__loading__container:!0}),hidden:""});W.call(this,".".concat(K({ejs__dialogs:!0}))).appendChild(l),this.elements.dialogs.loading=l,n.appendChild(st.createButton.call(this,"restart")),n.appendChild(st.createButton.call(this,"play")),n.appendChild(st.createButton.call(this,"save-state",{"aria-expanded":!1})),st.setLoadState.call(this,n,e),st.setScreenRecord.call(this,n,e),st.supportNetPlay.call(this,n)&&parseInt(this.config.gameId,10)>0&&st.setNetplay.call(this,n,e),st.setGamepad.call(this,n,e),st.setStateInfoBarWidget.call(this,n,e),st.setCheat.call(this,n,e),n.appendChild(D("span",{style:"flex:1"}));var u=D("div",{class:K({ejs__volume:!0})});u.appendChild(st.createButton.call(this,"mute"));var d={max:1,step:.01,value:this.config.volume};u.appendChild(st.createRange.call(this,"volume",ue(d,{}))),this.elements.volume=u,n.appendChild(u);var f=D("div",{class:K({ejs__menu:!0})});f.appendChild(st.createButton.call(this,"settings",{"aria-haspopup":!0,"aria-expanded":!1}));var p=D("div",{class:K({ejs__menu__container:!0}),hidden:""}),h=D("div"),m=D("div",{"data-pane":"home"}),v=D("div",{role:"menu"});m.appendChild(v),h.appendChild(m),this.elements.settings.panels.home=m,p.appendChild(h),f.appendChild(p),n.appendChild(f),this.elements.settings.popup=p,this.elements.settings.menu=f,n.appendChild(st.createButton.call(this,"fullscreen"));var g=this;return n.addEventListener("mousedown",(function(){g.onButtonDiv=!0})),this.elements.controls=n,st.setNormalOptionsMenu.call(this),st.setCoreOptionsMenu.call(this),n},inject:function(){var e=this;this.icons={"enter-fullscreen":'<path d="M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"/>',"exit-fullscreen":'<path d="M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"/>',gamepad:'<svg viewBox="0 0 640 512"><path fill="currentColor" d="M480 96H160C71.6 96 0 167.6 0 256s71.6 160 160 160c44.8 0 85.2-18.4 114.2-48h91.5c29 29.6 69.5 48 114.2 48 88.4 0 160-71.6 160-160S568.4 96 480 96zM256 276c0 6.6-5.4 12-12 12h-52v52c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-52H76c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h52v-52c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h52c6.6 0 12 5.4 12 12v40zm184 68c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-80c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z"/></svg>',"load-state":'<svg viewBox="0 0 576 512"><path fill="currentColor" d="M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z"/></svg>',muted:'<path d="M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/>',netplay:'<svg viewBox="0 0 512 512"><path fill="currentColor" d="M364.215 192h131.43c5.439 20.419 8.354 41.868 8.354 64s-2.915 43.581-8.354 64h-131.43c5.154-43.049 4.939-86.746 0-128zM185.214 352c10.678 53.68 33.173 112.514 70.125 151.992.221.001.44.008.661.008s.44-.008.661-.008c37.012-39.543 59.467-98.414 70.125-151.992H185.214zm174.13-192h125.385C452.802 84.024 384.128 27.305 300.95 12.075c30.238 43.12 48.821 96.332 58.394 147.925zm-27.35 32H180.006c-5.339 41.914-5.345 86.037 0 128h151.989c5.339-41.915 5.345-86.037-.001-128zM152.656 352H27.271c31.926 75.976 100.6 132.695 183.778 147.925-30.246-43.136-48.823-96.35-58.393-147.925zm206.688 0c-9.575 51.605-28.163 104.814-58.394 147.925 83.178-15.23 151.852-71.949 183.778-147.925H359.344zm-32.558-192c-10.678-53.68-33.174-112.514-70.125-151.992-.221 0-.44-.008-.661-.008s-.44.008-.661.008C218.327 47.551 195.872 106.422 185.214 160h141.572zM16.355 192C10.915 212.419 8 233.868 8 256s2.915 43.581 8.355 64h131.43c-4.939-41.254-5.154-84.951 0-128H16.355zm136.301-32c9.575-51.602 28.161-104.81 58.394-147.925C127.872 27.305 59.198 84.024 27.271 160h125.385z"/></svg>',pause:'<path d="M6 1H3c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1zM12 1c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-3z"/>',play:'<path d="M15.562 8.1L3.87.225C3.052-.337 2 .225 2 1.125v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"/>',restart:'<path d="M9.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L16 1.9l-6.3-.7z"/>',"save-state":'<svg viewBox="0 0 448 512"><path fill="currentColor" d="M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"/></svg>',"screen-record":'<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px",viewBox="0 0 39.989 39.989" style="enable-background:new 0 0 39.989 39.989;" xml:space="preserve"><path id="XMLID_155_" d="M19.994,0C8.952,0,0,8.952,0,19.995c0,11.043,8.952,19.994,19.994,19.994s19.995-8.952,19.995-19.994,C39.989,8.952,31.037,0,19.994,0z M19.994,27.745c-4.28,0-7.75-3.47-7.75-7.75s3.47-7.75,7.75-7.75s7.75,3.47,7.75,7.75,S24.275,27.745,19.994,27.745z"/></svg>',settings:'<path d="M16.135 7.784a2 2 0 0 1-1.23-2.969c.322-.536.225-.998-.094-1.316l-.31-.31c-.318-.318-.78-.415-1.316-.094a2 2 0 0 1-2.969-1.23C10.065 1.258 9.669 1 9.219 1h-.438c-.45 0-.845.258-.997.865a2 2 0 0 1-2.969 1.23c-.536-.322-.999-.225-1.317.093l-.31.31c-.318.318-.415.781-.093 1.317a2 2 0 0 1-1.23 2.969C1.26 7.935 1 8.33 1 8.781v.438c0 .45.258.845.865.997a2 2 0 0 1 1.23 2.969c-.322.536-.225.998.094 1.316l.31.31c.319.319.782.415 1.316.094a2 2 0 0 1 2.969 1.23c.151.607.547.865.997.865h.438c.45 0 .845-.258.997-.865a2 2 0 0 1 2.969-1.23c.535.321.997.225 1.316-.094l.31-.31c.318-.318.415-.781.094-1.316a2 2 0 0 1 1.23-2.969c.607-.151.865-.547.865-.997v-.438c0-.451-.26-.846-.865-.997zM9 12a3 3 0 1 1 0-6 3 3 0 0 1 0 6z"/>',volume:'<path d="M15.5999996,3.3 C15.1999996,2.9 14.5999996,2.9 14.1999996,3.3 C13.7999996,3.7 13.7999996,4.3 14.1999996,4.7 C15.3999996,5.9 15.9999996,7.4 15.9999996,9 C15.9999996,10.6 15.3999996,12.1 14.1999996,13.3 C13.7999996,13.7 13.7999996,14.3 14.1999996,14.7 C14.3999996,14.9 14.6999996,15 14.8999996,15 C15.1999996,15 15.3999996,14.9 15.5999996,14.7 C17.0999996,13.2 17.9999996,11.2 17.9999996,9 C17.9999996,6.8 17.0999996,4.8 15.5999996,3.3 L15.5999996,3.3 Z"></path>\n            <path d="M11.2819745,5.28197449 C10.9060085,5.65794047 10.9060085,6.22188944 11.2819745,6.59785542 C12.0171538,7.33303477 12.2772954,8.05605449 12.2772954,9.00000021 C12.2772954,9.93588462 11.851678,10.9172014 11.2819745,11.4869049 C10.9060085,11.8628709 10.9060085,12.4268199 11.2819745,12.8027859 C11.4271642,12.9479755 11.9176724,13.0649528 12.2998149,12.9592565 C12.4124479,12.9281035 12.5156669,12.8776063 12.5978555,12.8027859 C13.773371,11.732654 14.1311161,10.1597914 14.1312523,9.00000021 C14.1312723,8.8299555 14.1286311,8.66015647 14.119665,8.4897429 C14.0674781,7.49784946 13.8010171,6.48513613 12.5978554,5.28197449 C12.2218894,4.9060085 11.6579405,4.9060085 11.2819745,5.28197449 Z"></path>\n            <path d="M3.78571429,6.00820648 L0.714285714,6.00820648 C0.285714286,6.00820648 0,6.30901277 0,6.76022222 L0,11.2723167 C0,11.7235261 0.285714286,12.0243324 0.714285714,12.0243324 L3.78571429,12.0243324 L7.85714286,15.8819922 C8.35714286,16.1827985 9,15.8819922 9,15.2803796 L9,2.75215925 C9,2.15054666 8.35714286,1.77453879 7.85714286,2.15054666 L3.78571429,6.00820648 Z"></path>',cheat:'<svg viewBox="0 0 496 512"><path fill="currentColor" d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm4 72.6c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.1-8.4-25.3-7.1-33.8 3.1z" class=""></path></svg>'},this.id=Math.floor(1e4*Math.random());var t=null;this.elements.controls=null;var n={id:this.id},o=!0;w(this.config.controls)&&(this.config.controls=this.config.controls.call(this.props)),this.config.controls||(this.config.controls=[]),S(this.config.controls)||b(this.config.controls)?t=this.config.controls:(t=st.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality}),o=!1);var r,a=function(e){var t=e;return Object.entries(n).forEach((function(e){var n,o,r=(o=2,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=[],o=!0,r=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(o=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}return n}(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),a=r[0],i=r[1];t=de(t,"{".concat(a,"}"),i)})),t};if(o&&(b(this.config.controls)?t=a(t):S(t)&&(t.innerHTML=a(t.innerHTML))),b(this.config.selectors.controls.container)&&(r=document.querySelector(this.config.selectors.controls.container)),S(r)||(r=this.elements.container),r[S(t)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",t),S(this.elements.controls)||st.findElements.call(this),!E(this.elements.buttons)){var i=function(t){var n=e.config.classNames.controlPressed;Object.defineProperty(t,"pressed",{enumerable:!0,get:function(){return V(t,n)},set:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];G(t,n,e)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(e){x(e)||_(e)?Array.from(e).filter(Boolean).forEach(i):i(e)}))}window.navigator.userAgent.includes("Edge")&&ee(r)}},ct=st;function lt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ut(){if(this.enabled){var e=this.player.elements.buttons.fullscreen;S(e)&&(e.pressed=this.active),P.call(this.player,this.target,this.active?"enterfullscreen":"exitfullscreen",!0),ae||Y.call(this.player,this.target,this.active)}}function dt(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",G(this.target,this.player.config.classNames.fullscreen.fallback,e),ut.call(this)}var ft=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.prefix=e.prefix,this.property=e.property,this.scrollPosition={x:0,y:0},M.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){ut.call(n)})),this.update()}var t,n,o;return o=[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(w(document.exitFullscreen))return"";var e="";return["webkit","moz","ms"].some((function(t){return!(!w(document["".concat(t,"ExitFullscreen")])&&!w(document["".concat(t,"CancelFullScreen")])||(e=t,0))})),e}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}],n=[{key:"update",value:function(){this.enabled,G(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}},{key:"enter",value:function(){this.enabled&&(e.native?this.prefix?E(this.prefix)||this.target["".concat(this.prefix,"Request").concat(this.property)]():this.target.requestFullscreen():dt.call(this,!0))}},{key:"exit",value:function(){if(this.enabled)if(e.native)if(this.prefix){if(!E(this.prefix)){var t="moz"===this.prefix?"Cancel":"Exit";document["".concat(this.prefix).concat(t).concat(this.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document);else dt.call(this,!1)}},{key:"toggle",value:function(){this.active?this.exit():this.enter()}},{key:"enabled",get:function(){return e.native}},{key:"active",get:function(){return!!this.enabled&&(e.native?(this.prefix?document["".concat(this.prefix).concat(this.property,"Element")]:document.fullscreenElement)===this.target:V(this.target,this.player.config.classNames.fullscreen.fallback))}},{key:"target",get:function(){return ne?this.player.game:this.player.elements.container}}],lt((t=e).prototype,n),o&&lt(t,o),e}();var pt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.emulator=t,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return e.prototype={toggleMenu:function(e){ct.toggleMenu.call(this.emulator,e)},firstTouch:function(){var e=this.emulator,t=e.elements;e.touch=!0,G(t.container,e.config.classNames.isTouch,!0)},setTabFocus:function(e){var t=this.emulator,n=t.elements,o=t;if(clearTimeout(this.focusTimer),"keydown"!==e.type||9===e.which){"keydown"===e.type&&(this.lastKeyDown=e.timeStamp);var r,a=e.timeStamp-this.lastKeyDown<=20;("focus"!==e.type||a)&&(r=o.config.classNames.tabFocus,G(H.call(o,".".concat(r)),r,!1),this.focusTimer=setTimeout((function(){var e=document.activeElement;n.container.contains(e)&&G(document.activeElement,o.config.classNames.tabFocus,!0)}),10))}},global:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.emulator,n=t;k.call(n,document.body,"click",this.toggleMenu,e),R.call(n,document.body,"touchstart",this.firstTouch),k.call(n,document.body,"keydown focus blur",this.setTabFocus,e,!1,!0),M.call(n,document.body,"keyup",(function(e){n.started&&(113===e.which&&(e.shiftKey?null===n.elements.buttons.saveState.getAttribute("hidden")&&P.call(n,n.elements.buttons.saveState,"click"):it.quickSaveState()),115===e.which&&(e.shiftKey?null===n.elements.buttons.loadState.getAttribute("hidden")&&P.call(n,n.elements.buttons.loadState,"click"):it.quickLoadState()),120===e.which&&P.call(n,n.elements.buttons.mute,"click"))}))},container:function(){var e,t=this.emulator,n=t.elements,o=t,r=null;M.call(o,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen start-game",(function(r){var a=n.controls;a&&"enterfullscreen"===r.type&&(a.pressed=!1,a.hover=!1);var i=0;if(["touchstart","touchmove","mousemove","start-game"].includes(r.type)){if("nds"==t.system&&"mousemove"==r.type&&Ke&&Ke.Module&&Ke.Module.canvas&&(document.pointerLockElement===Ke.Module.canvas||document.mozPointerLockElement===Ke.Module.canvas))return void Ae.toggleControls.call(o,!1);!it||"undefined"!=it.virtualGamepadContainer&&null!==it.virtualGamepadContainer||(Ae.toggleControls.call(o,!0),i=o.touch?3e3:2e3,clearTimeout(e),e=setTimeout((function(){return Ae.toggleControls.call(o,!1)}),i),n.controls.setAttribute("data-timer",e))}})),M.call(o,window,"resize",(function(e){var t=o.elements.container.clientHeight,n=H.call(o,".".concat(K({ejs__menu__container:!0}),' [role="menu"]'));Array.from(n).forEach((function(e){e.style.maxHeight="".concat(t-95,"px"),e.style.overflow="auto"})),Ke.Module&&Ke.Module.canvas,o.elements.container.clientWidth/o.elements.container.clientHeight<1.3?G(o.elements.container,K({portrait:!0}),!0):G(o.elements.container,K({portrait:!0}),!1)})),P.call(o,window,"resize"),M.call(o,o.elements.container,"enterfullscreen",(function(e){if(2===o.coreVer&&Ke.Module){var t=50;clearInterval(r),r=setInterval((function(){Ke.Module.setCanvasSize(window.innerWidth,window.innerHeight),t<0&&clearInterval(r),t--}),100)}setTimeout((function(){P.call(o,window,"resize")}),300)})),M.call(o,o.elements.container,"exitfullscreen",(function(e){2===o.coreVer&&Ke.Module&&(clearInterval(r),Ke.Module.setCanvasSize(800,600)),setTimeout((function(){P.call(o,window,"resize")}),300)})),M.call(o,o.elements.container,"start-game",(function(e){var t=window.document.createEvent("UIEvents");t.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(t),G(o.elements.container,K({"game-started":!0}),!0)})),M.call(o,o.elements.container,"blur",(function(e){var t=e.currentTarget;setTimeout((function(){t.contains(document.activeElement)||P.call(o,o.elements,"blurgame")}),0)})),M.call(o,o.elements.container,"focus",(function(e){var t=e.currentTarget;setTimeout((function(){t.contains(document.activeElement)&&P.call(o,o.elements,"focusgame")}),0)}))},media:function(){var e=this.emulator,t=e.elements,n=e;M.call(n,n.game,"volumechange",(function(e){return ct.updateVolume.call(n,e)})),M.call(n,t.container,"contextmenu",(function(e){n.touch||n.lightgun||ct.toggleContextMenu.call(n,e,!0),e.preventDefault()}),!1),M.call(n,t.container,"mousewheel",(function(e){e.stopPropagation()}),!1),M.call(n,t.container,"mousedown",(function(t){"nds"==e.system&&Ke&&Ke.Module&&Ke.Module.canvas&&!Ke.isMobileDevice&&document.pointerLockElement!==Ke.Module.canvas&&document.mozPointerLockElement!==Ke.Module.canvas&&e.started&&!e.connected&&setTimeout((function(){!0!==e.onButtonDiv&&(Ke.Module.canvas.requestPointerLock=Ke.Module.canvas.requestPointerLock||Ke.Module.canvas.mozRequestPointerLock,Ke.Module.canvas.requestPointerLock()),e.onButtonDiv=!1}),100),n.touch||ct.toggleContextMenu.call(n,t,!1)}),!1),M.call(n,n.game,"volumechange",(function(){n.storage.set({volume:n.volume,muted:n.muted}),it.setVolume&&it.setVolume()}));var o=n.config.events.concat(["keyup","keydown"]).join(" ");M.call(n,n.game,o,(function(e){var o=e.detail,r=void 0===o?{}:o;"error"===e.type&&(r=n.game.error),P.call(n,t.container,e.type,!0,r)}))},proxy:function(e,t,n){var o=this.emulator,r=o.config.listeners[n],a=!0;w(r)&&(a=r.call(o,e)),a&&w(t)&&t.call(o,e)},bind:function(e,t,n,o){var r=this,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=this.emulator,s=i,c=s.config.listeners[o],l=w(c);M.call(s,e,t,(function(e){return r.proxy(e,n,o)}),a&&!l)},controls:function(){var e=this,t=this.emulator,n=t.elements,o=oe?"change":"input";if(this.bind(n.buttons.mute,"click",(function(){t.muted=!t.muted}),"mute"),this.bind(n.buttons.fullscreen,"click",(function(){t.fullscreen.toggle()}),"fullscreen"),this.bind(n.buttons.gamepad,"click",(function(){Ae.toggleControls.call(t,!1),U(n.dialogs.gamepad,!1)}),"mute"),this.bind(n.buttons.saveState,"click",(function(){P.call(t,t.elements.container,"savestate-start",!1,{});var e=it.saveState(),n=it.getScreenData();P.call(t,t.elements.container,"savestate",!1,{state:e,screenshot:n})}),"mute"),this.bind(n.buttons.loadState,"click",(function(){P.call(t,t.elements.container,"loadstate",!1,{})}),"mute"),this.bind(n.buttons.settings,"click",(function(e){e.stopPropagation(),ct.toggleMenu.call(t,e)})),this.bind(n.buttons.settings,"keyup",(function(e){var n=e.which;[13,32].includes(n)&&(13!==n?(e.preventDefault(),e.stopPropagation(),ct.toggleMenu.call(t,e)):ct.focusFirstMenuItem.call(t,null,!0))}),null,!1),this.bind(n.settings.menu,"keydown",(function(e){27===e.which&&ct.toggleMenu.call(t,e)})),ae){var r=H.call(t,'input[type="range"]');Array.from(r).forEach((function(t){return e.bind(t,o,(function(e){return ee(e.target)}))}))}re&&Array.from(H.call(t,'input[type="range"]')).forEach((function(n){e.bind(n,"input",(function(e){return ct.updateRangeFill.call(t,e.target)}))})),this.bind(n.inputs.volume,o,(function(e){t.volume=e.target.value}),"volume"),this.bind(n.controls,"mouseenter mouseleave",(function(e){"mouseleave"===e.type&&null===e.toElement?n.controls.hover=!0:n.controls.hover=!t.touch&&"mouseenter"===e.type})),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",(function(e){if(["mousedown","touchstart"].includes(e.type)){n.controls.pressed=!0;var t=n.controls.getAttribute("data-timer2");clearTimeout(t)}else{var o=setTimeout((function(){n.controls.pressed=!1}),4e3);n.controls.setAttribute("data-timer2",o)}})),this.bind(n.controls,"focusin focusout",(function(n){var o=t.config,r=t.elements,a="focusin"===n.type,i=r.controls.getAttribute("data-timer");if(G(r.controls,o.classNames.noTransition,a),Ae.toggleControls.call(t,a),a){setTimeout((function(){G(r.controls,o.classNames.noTransition,!1)}),0);var s=e.touch?3e3:4e3;clearTimeout(i),i=setTimeout((function(){return Ae.toggleControls.call(t,!1)}),s),r.controls.setAttribute("data-timer",i)}})),this.bind(n.inputs.volume,"wheel",(function(e){var n=e.webkitDirectionInvertedFromDevice,o=function(e,t){if(Array.isArray(e))return e;var n=[],o=!0,r=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(o=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}return n}([e.deltaX,-e.deltaY].map((function(e){return n?-e:e})),2),r=o[0],a=o[1],i=Math.sign(Math.abs(r)>Math.abs(a)?r:a);t.increaseVolume(i/50);var s=t.game.volume;(1===i&&s<1||-1===i&&s>0)&&e.preventDefault()}),"volume",!1),this.bind(n.controls,"contextmenu",(function(e){e.stopPropagation()})),this.bind(n.contextMenu,"contextmenu",(function(e){e.stopPropagation()}))}},e}();function ht(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var mt=function(){function e(t,n){var o=this,a=function(e,t){for(var n=window.location.pathname.split("/").pop(),o=window.location.pathname.substring(0,window.location.pathname.length-n.length).split("/"),r=e.split("/"),a=[],i=0;i<o.length;i++)""!=o[i]&&a.push(o[i]);if(!e.startsWith("/")&&1==e.split("://").length&&1==e.split("http:").length&&1==e.split("https:").length&&1==e.split("file:").length&&1==e.split("blob:").length){for(var s=0;s<r.length;s++)if(""==r[s]||"."==r[s]);else if(".."==r[s]){if(a.length>0)a=function(e){var t=e,n=t.split("/").pop(),o=t.substring(0,t.length-n.length);return"/"==e?"/":o}(a.join("/")).split("/")}else a.push(r[s]);if(!(e=a.join("/")).startsWith("/"))e="/"+e;e=window.location.protocol+"//"+window.location.host+e}return e.startsWith("/")&&(e=window.location.protocol+"//"+window.location.host+e),!e.endsWith("/")&&t&&(e+="/"),e};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.version="1.1.2",this.system="",this.adUrl=null,this.gameName=null,this.loadStateOnStart=!1,this.statesSupported=!0,this.mameCore=null,this.startOnLoad=!1,this.dataPath="",this.customPaths=null,this.hash="",this.lightgun=!1,this.mouse=!1,this.multitap=!1,this.ready=!1,this.paused=!0,this.started=!1,this.touch=se.touch,this.game=t,b(this.game)&&(this.game=document.querySelectorAll(this.game)),(window.jQuery&&this.game instanceof jQuery||_(this.game)||x(this.game))&&(this.game=this.game[0]),this.game=this.game,this.game.innerHTML="",this.config=ue({},r,e.defaults,n||{}),this.coreVer=function(e,t){if(!0===t&&window.WebAssembly){return["nes","snes","gb","nds"].includes(e)?2:1}return 1}(this.config.system,this.config.useBeta),this.lightgun=this.config.lightgun,this.loadStateOnStart=this.config.loadStateOnStart||!1,this.adUrl=this.config.adUrl||null,this.gameName=this.config.gameName||null,this.mouse=this.config.mouse,this.multitap=this.config.multitap,this.cheats=this.config.cheats,this.cheats||(this.cheats=[]);var i,s,c,l,u,d=function(e,t){return"string"==typeof t?t:!0===e?"https://ws.emulatorjs.com/":"https://emuserver.emulatorjs.ga/"}(this.config.oldNetplayServer,this.config.netplayUrl);this.listUrl=d,this.socketUrl=d,this.mameCore=this.config.mameCore||null,this.color=this.config.color,this.startOnLoad=this.config.startOnLoad||!1,this.statesSupported=this.config.statesSupported||!0,this.customPaths=function(e){if(!e)return{};var t={};for(var n in e)"string"==typeof e[n]&&(t[n]=a(e[n]));return t}(this.config.paths),this.dataPath="string"!=typeof(i=this.config.dataPath)?(s=window.location.href,l=(c=s).split("/").pop(),u=c.substring(0,c.length-l.length),"/"==s?window.location.protocol+"//"+window.location.host+"/":(u.startsWith("/")&&(u=window.location.protocol+"//"+window.location.host+u),u.endsWith("/")||(u+="/"),u)):a(i,!0),async function(e,t,n){var o={};if(n&&"string"==typeof n&&"en-US"!==n){var a=t&&"string"==typeof t[n+".json"]?t[n+".json"]:e+"localization/"+n+".json";try{var i=await fetch(a),s=await i.text();o=JSON.parse(s);r.i18n=o.i18n,st.normalOptions=o.normalOptions}catch(e){console.warn("error setting localization",e)}}return function(e){return"string"==typeof o[e]?o[e]:e}}(this.dataPath,this.customPaths,this.config.lang).then(function(t){if(this.localization=t,this.config=ue({},r,e.defaults,n||{}),Object.keys(this.config.classNames).forEach((function(e){var t=o;if(v(t.config.classNames[e]))Object.keys(t.config.classNames[e]).forEach((function(t){var n={};n[o.config.classNames[e][t]]=!0,o.config.classNames[e][t]=K(n)}));else{var n={};n[o.config.classNames[e]]=!0,o.config.classNames[e]=K(n)}})),this.config.selectors.controls.wrapper=".".concat(K({ejs__controls:!0})),this.config.selectors.container=".".concat(K({ejs:!0})),this.system=this.config.system,this.elements={container:null,buttons:{},display:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}},dialogs:{gamepad:null,loading:null,netplay:null},widgets:{}},this.fullscreen={active:!1},this.game.emulator)console.warn("Target already setup");else{this.config.mute=!0,this.eventListeners=[],this.listeners=new pt(this),this.storage=new ve(this,"ejs_settings"),this.game.emulator=this,S(this.elements.container)||(this.elements.container=D("div"),L(this.game,this.elements.container));var a=D("div",{class:K({ejs__widgets:!0})});this.elements.container.appendChild(a);var i=D("div",{class:K({ejs__dialogs:!0})});this.elements.container.appendChild(i),Ae.addStyleHook.call(this),it.setup.call(this),Ae.build.call(this),this.listeners.container(),this.listeners.global(),this.fullscreen=new ft(this),Ke.create.call(this);var s=document.createElement("script");s.src=this.customPaths&&"string"==typeof this.customPaths["webrtc-adapter.js"]?this.customPaths["webrtc-adapter.js"]:this.dataPath+"webrtc-adapter.js",document.body.appendChild(s)}}.bind(this))}var t,n,o;return o=[{key:"setup",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null;return b(t)?o=Array.from(document.querySelectorAll(t)):_(t)?o=Array.from(t):x(t)&&(o=t.filter(S)),E(o)?null:o.map((function(t){return new e(t,n)}))}}],n=[{key:"restart",value:function(){this.currentTime=0}},{key:"increaseVolume",value:function(e){var t=this.game.muted?0:this.volume;this.volume=t+(g(e)?e:0)}},{key:"decreaseVolume",value:function(e){this.increaseVolume(-e)}},{key:"toggleControls",value:function(e){if(this.started){var t=void 0===e?void 0:!e,n=G(this.elements.container,this.config.classNames.hideControls,t);return n&&ct.toggleMenu.call(this,!1),!n}return!1}},{key:"setStatesSupported",value:function(e){this.statesSupported=e}},{key:"loadState",value:function(e){it.loadState(e,0)}},{key:"on",value:function(e,t){M.call(this,this.elements.container,e,t)}},{key:"once",value:function(e,t){R.call(this,this.elements.container,e,t)}},{key:"off",value:function(e,t){O(this.elements.container,e,t)}},{key:"playing",set:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Array.from(this.elements.buttons.play||[]).forEach((function(t){t.pressed=e})),this.paused=!e},get:function(){return Boolean(this.ready&&!this.paused)}},{key:"volume",set:function(e){var t=e;b(t)&&(t=Number(t)),g(t)||(t=this.storage.get("volume")),g(t)||(t=this.config.volume),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.game.volume=t,!E(e)&&this.muted&&t>0&&(this.muted=!1)},get:function(){return Number(this.game.volume)}},{key:"muted",set:function(e){var t=e;y(t)||(t=this.storage.get("muted")),y(t)||(t=this.config.muted),this.config.muted=t,this.game.muted=t},get:function(){return Boolean(this.game.muted)}}],ht((t=e).prototype,n),o&&ht(t,o),e}();mt.defaults={},t.default=mt}]).default;