"use strict";(self.webpackChunklauncher=self.webpackChunklauncher||[]).push([[905],{905:(e,t,n)=>{n.r(t),n.d(t,{MessagePackHubProtocol:()=>V,VERSION:()=>j});var i,s,r,o=4294967295;function a(e,t,n){var i=Math.floor(n/4294967296),s=n;e.setUint32(t,i),e.setUint32(t+4,s)}function c(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}var p=("undefined"==typeof process||"never"!==(null===(i=null===process||void 0===process?void 0:{npm_package_dependencies__reduxjs_toolkit:"^1.8.3",npm_package_devDependencies_webpack_cli:"^5.1.4",npm_package_devDependencies_jest:"^29.5.0",npm_package_scripts_build_tst:"cross-env NODE_ENV=tst webpack --env=mode=development",npm_config_version_commit_hooks:"true",npm_config_user_agent:"yarn/1.22.19 npm/? node/v18.7.0 linux x64",NODE_VERSION:"18.7.0",npm_config_bin_links:"true",YARN_VERSION:"1.22.19",MODE:"production",npm_node_execpath:"/usr/local/bin/node",npm_package_devDependencies_file_loader:"^6.2.0",npm_package_devDependencies_eslint_config_galaxsys:"^1.1.3",npm_package_scripts_start_dev:"cross-env NODE_ENV=dev webpack serve --env=mode=development",npm_config_init_version:"1.0.0",SHLVL:"5",npm_package_scripts_build_gx1:"cross-env NODE_ENV=gx1 webpack --env=mode=production",HOME:"/root",npm_package_devDependencies_sass:"^1.54.0",npm_package_dependencies_pixi_spine:"4.0.3",ENVIRONMENT:"prd",npm_config_init_license:"MIT",YARN_WRAP_OUTPUT:"false",npm_config_version_tag_prefix:"v",npm_package_dependencies__giphy_js_fetch_api:"^5.0.0",npm_package_scripts_start_prd:"cross-env NODE_ENV=prd webpack serve --env=mode=development",npm_package_devDependencies_babel_loader:"^8.2.2",npm_package_dependencies__microsoft_signalr_protocol_msgpack:"^7.0.0",npm_package_dependencies__giphy_react_components:"^7.1.0",npm_package_devDependencies__babel_preset_env:"^7.21.5",npm_package_scripts_build_dev:"cross-env NODE_ENV=dev webpack --env=mode=development",npm_package_devDependencies_babel_jest:"^29.5.0",VERSION:"97",npm_package_devDependencies_external_remotes_plugin:"^1.0.0",npm_package_devDependencies__babel_preset_react:"^7.13.13",PUBLIC_PATH:"https://fg-client.prd-digi.com/fg-launcher-client/prd",npm_package_dependencies_babel_plugin_styled_components:"^2.1.4",npm_package_dependencies__pixi_spine_runtime_3_8:"^4.0.3",npm_config_registry:"https://registry.yarnpkg.com",npm_package_devDependencies__babel_core:"^7.21.8",npm_package_devDependencies_clean_webpack_plugin:"^4.0.0",npm_package_scripts_start_stg:"cross-env NODE_ENV=stg webpack serve --env=mode=development",npm_package_scripts_start:"cross-env NODE_ENV=local webpack serve --env=mode=development",npm_config_ignore_scripts:"",npm_config_version:"1.22.19",npm_package_scripts_build_prd:"cross-env NODE_ENV=prd webpack --env=mode=production",PATH:"/tmp/yarn--1725342924204-0.5457540599250033:/app/node_modules/.bin:/usr/local/share/.config/yarn/link/node_modules/.bin:/usr/local/libexec/lib/node_modules/npm/bin/node-gyp-bin:/usr/local/lib/node_modules/npm/bin/node-gyp-bin:/usr/local/bin/node_modules/npm/bin/node-gyp-bin:/app/node_modules/.bin:/app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",NODE:"/usr/local/bin/node",npm_package_name:"launcher",npm_package_dependencies_react_redux:"^8.0.2",npm_package_devDependencies_webpack:"^5.74.0",npm_package_dependencies_react_dom:"^18.2.0",npm_lifecycle_script:"cross-env NODE_ENV=prd webpack --env=mode=production",npm_package_devDependencies_dotenv:"^16.0.1",npm_package_main:"index.js",npm_package_devDependencies_webpack_dev_server:"^4.0.0",npm_package_scripts_test:"jest",npm_config_version_git_message:"v%s",npm_lifecycle_event:"build-prd",npm_package_version:"1.0.0",npm_config_argv:'{"remain":[],"cooked":["run","build-prd"],"original":["run","build-prd","--env=version=97","--env=mode=production","--env=publicPath=https://fg-client.prd-digi.com/fg-launcher-client/prd"]}',npm_package_scripts_build_stg:"cross-env NODE_ENV=stg webpack --env=mode=production",npm_package_scripts_build:"cross-env NODE_ENV=dev webpack --env=mode=development",npm_package_dependencies_lodash:"^4.17.21",npm_package_devDependencies_sass_loader:"^13.0.2",npm_config_version_git_tag:"true",npm_config_version_git_sign:"",npm_package_dependencies__microsoft_signalr:"^7.0.0",npm_package_license:"MIT",npm_config_strict_ssl:"true",npm_package_devDependencies_style_loader:"^3.3.1",npm_package_devDependencies_eslint_plugin_prettier:"^4.2.1",npm_package_scripts_start_tst:"cross-env NODE_ENV=tst webpack serve --env=mode=development",PWD:"/app",npm_execpath:"/opt/yarn-v1.22.19/bin/yarn.js",npm_package_devDependencies_css_loader:"^6.7.1",npm_package_devDependencies_cross_env:"^7.0.3",npm_package_dependencies_styled_components:"^5.3.5",npm_package_dependencies_prop_types:"^15.8.1",npm_package_dependencies_pixi_js:"7.0.4",npm_config_save_prefix:"^",npm_config_ignore_optional:"",NODE_ENV:"prd",INIT_CWD:"/app",npm_package_dependencies_react:"^18.2.0",REACT_APP_CDN_URL:"https://nar-fg.cchhllpp.net/prd",REACT_APP_LAUNCHER_BACKEND_API_URL:"https://lobby-api.jdduuee-54rg78cw.com",REACT_APP_ENGINE_CLIENT_URL:"https://engine.ffaassttyy.com",REACT_APP_LEADERBOARD_CLIENT_URL:"https://fg-leaderboard.ffaassttyy.com",REACT_APP_CHAT_CLIENT_URL:"https://fg-chat-client.fastgames-bog.com",REACT_APP_CASHBACK_CLIENT_URL:"https://fg-cashback-client.fastgames-bog.com",REACT_APP_RULES_CLIENT_URL:"https://fg-rules-client.ffaassttyy.com"})||void 0===i?void 0:i.TEXT_ENCODING))&&"undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder;function _(e){for(var t=e.length,n=0,i=0;i=55296&&s<=56319&&i65535&&(_-=65536,r.push(_>>>10&1023|55296),_=56320|1023&_),r.push(_)}else r.push(a);else r.push(a);r.length>=4096&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return r.length>0&&(o+=String.fromCharCode.apply(String,r)),o}var f,g=p?new TextDecoder:null,m=p?"undefined"!=typeof process&&"force"!==(null===(r=null===process||void 0===process?void 0:{npm_package_dependencies__reduxjs_toolkit:"^1.8.3",npm_package_devDependencies_webpack_cli:"^5.1.4",npm_package_devDependencies_jest:"^29.5.0",npm_package_scripts_build_tst:"cross-env NODE_ENV=tst webpack --env=mode=development",npm_config_version_commit_hooks:"true",npm_config_user_agent:"yarn/1.22.19 npm/? node/v18.7.0 linux x64",NODE_VERSION:"18.7.0",npm_config_bin_links:"true",YARN_VERSION:"1.22.19",MODE:"production",npm_node_execpath:"/usr/local/bin/node",npm_package_devDependencies_file_loader:"^6.2.0",npm_package_devDependencies_eslint_config_galaxsys:"^1.1.3",npm_package_scripts_start_dev:"cross-env NODE_ENV=dev webpack serve --env=mode=development",npm_config_init_version:"1.0.0",SHLVL:"5",npm_package_scripts_build_gx1:"cross-env NODE_ENV=gx1 webpack --env=mode=production",HOME:"/root",npm_package_devDependencies_sass:"^1.54.0",npm_package_dependencies_pixi_spine:"4.0.3",ENVIRONMENT:"prd",npm_config_init_license:"MIT",YARN_WRAP_OUTPUT:"false",npm_config_version_tag_prefix:"v",npm_package_dependencies__giphy_js_fetch_api:"^5.0.0",npm_package_scripts_start_prd:"cross-env NODE_ENV=prd webpack serve --env=mode=development",npm_package_devDependencies_babel_loader:"^8.2.2",npm_package_dependencies__microsoft_signalr_protocol_msgpack:"^7.0.0",npm_package_dependencies__giphy_react_components:"^7.1.0",npm_package_devDependencies__babel_preset_env:"^7.21.5",npm_package_scripts_build_dev:"cross-env NODE_ENV=dev webpack --env=mode=development",npm_package_devDependencies_babel_jest:"^29.5.0",VERSION:"97",npm_package_devDependencies_external_remotes_plugin:"^1.0.0",npm_package_devDependencies__babel_preset_react:"^7.13.13",PUBLIC_PATH:"https://fg-client.prd-digi.com/fg-launcher-client/prd",npm_package_dependencies_babel_plugin_styled_components:"^2.1.4",npm_package_dependencies__pixi_spine_runtime_3_8:"^4.0.3",npm_config_registry:"https://registry.yarnpkg.com",npm_package_devDependencies__babel_core:"^7.21.8",npm_package_devDependencies_clean_webpack_plugin:"^4.0.0",npm_package_scripts_start_stg:"cross-env NODE_ENV=stg webpack serve --env=mode=development",npm_package_scripts_start:"cross-env NODE_ENV=local webpack serve --env=mode=development",npm_config_ignore_scripts:"",npm_config_version:"1.22.19",npm_package_scripts_build_prd:"cross-env NODE_ENV=prd webpack --env=mode=production",PATH:"/tmp/yarn--1725342924204-0.5457540599250033:/app/node_modules/.bin:/usr/local/share/.config/yarn/link/node_modules/.bin:/usr/local/libexec/lib/node_modules/npm/bin/node-gyp-bin:/usr/local/lib/node_modules/npm/bin/node-gyp-bin:/usr/local/bin/node_modules/npm/bin/node-gyp-bin:/app/node_modules/.bin:/app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",NODE:"/usr/local/bin/node",npm_package_name:"launcher",npm_package_dependencies_react_redux:"^8.0.2",npm_package_devDependencies_webpack:"^5.74.0",npm_package_dependencies_react_dom:"^18.2.0",npm_lifecycle_script:"cross-env NODE_ENV=prd webpack --env=mode=production",npm_package_devDependencies_dotenv:"^16.0.1",npm_package_main:"index.js",npm_package_devDependencies_webpack_dev_server:"^4.0.0",npm_package_scripts_test:"jest",npm_config_version_git_message:"v%s",npm_lifecycle_event:"build-prd",npm_package_version:"1.0.0",npm_config_argv:'{"remain":[],"cooked":["run","build-prd"],"original":["run","build-prd","--env=version=97","--env=mode=production","--env=publicPath=https://fg-client.prd-digi.com/fg-launcher-client/prd"]}',npm_package_scripts_build_stg:"cross-env NODE_ENV=stg webpack --env=mode=production",npm_package_scripts_build:"cross-env NODE_ENV=dev webpack --env=mode=development",npm_package_dependencies_lodash:"^4.17.21",npm_package_devDependencies_sass_loader:"^13.0.2",npm_config_version_git_tag:"true",npm_config_version_git_sign:"",npm_package_dependencies__microsoft_signalr:"^7.0.0",npm_package_license:"MIT",npm_config_strict_ssl:"true",npm_package_devDependencies_style_loader:"^3.3.1",npm_package_devDependencies_eslint_plugin_prettier:"^4.2.1",npm_package_scripts_start_tst:"cross-env NODE_ENV=tst webpack serve --env=mode=development",PWD:"/app",npm_execpath:"/opt/yarn-v1.22.19/bin/yarn.js",npm_package_devDependencies_css_loader:"^6.7.1",npm_package_devDependencies_cross_env:"^7.0.3",npm_package_dependencies_styled_components:"^5.3.5",npm_package_dependencies_prop_types:"^15.8.1",npm_package_dependencies_pixi_js:"7.0.4",npm_config_save_prefix:"^",npm_config_ignore_optional:"",NODE_ENV:"prd",INIT_CWD:"/app",npm_package_dependencies_react:"^18.2.0",REACT_APP_CDN_URL:"https://nar-fg.cchhllpp.net/prd",REACT_APP_LAUNCHER_BACKEND_API_URL:"https://lobby-api.jdduuee-54rg78cw.com",REACT_APP_ENGINE_CLIENT_URL:"https://engine.ffaassttyy.com",REACT_APP_LEADERBOARD_CLIENT_URL:"https://fg-leaderboard.ffaassttyy.com",REACT_APP_CHAT_CLIENT_URL:"https://fg-chat-client.fastgames-bog.com",REACT_APP_CASHBACK_CLIENT_URL:"https://fg-cashback-client.fastgames-bog.com",REACT_APP_RULES_CLIENT_URL:"https://fg-rules-client.ffaassttyy.com"})||void 0===r?void 0:r.TEXT_DECODER)?200:0:o,v=function(e,t){this.type=e,this.data=t},y=(f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},f(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),b=function(e){function t(n){var i=e.call(this,n)||this,s=Object.create(t.prototype);return Object.setPrototypeOf(i,s),Object.defineProperty(i,"name",{configurable:!0,enumerable:!1,value:t.name}),i}return y(t,e),t}(Error),w={type:-1,encode:function(e){var t,n,i,s;return e instanceof Date?function(e){var t,n=e.sec,i=e.nsec;if(n>=0&&i>=0&&n<=17179869183){if(0===i&&n<=4294967295){var s=new Uint8Array(4);return(t=new DataView(s.buffer)).setUint32(0,n),s}var r=n/4294967296,o=4294967295&n;return s=new Uint8Array(8),(t=new DataView(s.buffer)).setUint32(0,i<<2|3&r),t.setUint32(4,o),s}return s=new Uint8Array(12),(t=new DataView(s.buffer)).setUint32(0,i),a(t,4,n),s}((i=1e6*((t=e.getTime())-1e3*(n=Math.floor(t/1e3))),{sec:n+(s=Math.floor(i/1e9)),nsec:i-1e9*s})):null},decode:function(e){var t=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var n=t.getUint32(0);return{sec:4294967296*(3&n)+t.getUint32(4),nsec:n>>>2};case 12:return{sec:c(t,4),nsec:t.getUint32(0)};default:throw new b("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}},k=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(w)}return e.prototype.register=function(e){var t=e.type,n=e.encode,i=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=i;else{var s=1+t;this.builtInEncoders[s]=n,this.builtInDecoders[s]=i}},e.prototype.tryToEncode=function(e,t){for(var n=0;nthis.maxDepth)throw new Error("Too deep objects in depth ".concat(t));null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: ".concat(e," bytes in UTF-8"));this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){if(e.length>h){var t=_(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),l(e,this.bytes,this.pos),this.pos+=t}else t=_(e),this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,n){for(var i=e.length,s=n,r=0;r=55296&&o<=56319&&r>18&7|240,t[s++]=o>>12&63|128,t[s++]=o>>6&63|128):(t[s++]=o>>12&15|224,t[s++]=o>>6&63|128)}else t[s++]=o>>6&31|192;t[s++]=63&o|128}else t[s++]=o}}(e,this.bytes,this.pos),this.pos+=t},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: ".concat(t));this.writeU8(198),this.writeU32(t)}var n=E(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too large array: ".concat(n));this.writeU8(221),this.writeU32(n)}for(var i=0,s=e;i0&&e<=this.maxKeyLength},e.prototype.find=function(e,t,n){e:for(var i=0,s=this.caches[n-1];i=this.maxLengthPerKey?n[Math.random()*n.length|0]=i:n.push(i)},e.prototype.decode=function(e,t,n){var i=this.find(e,t,n);if(null!=i)return this.hit++,i;this.miss++;var s=u(e,t,n),r=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(r,s),s},e}(),N=function(e,t){var n,i,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=2&r[0]?i.return:r[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,i=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]=e},e.prototype.createExtraByteError=function(e){var t=this.view,n=this.pos;return new RangeError("Extra ".concat(t.byteLength-n," of ").concat(t.byteLength," byte(s) found at buffer[").concat(e,"]"))},e.prototype.decode=function(e){this.reinitializeState(),this.setBuffer(e);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},e.prototype.decodeMulti=function(e){return N(this,(function(t){switch(t.label){case 0:this.reinitializeState(),this.setBuffer(e),t.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}}))},e.prototype.decodeAsync=function(e){var t,n,i,s,r,o,a,c;return r=this,o=void 0,c=function(){var r,o,a,c,p,_,d,h;return N(this,(function(l){switch(l.label){case 0:r=!1,l.label=1;case 1:l.trys.push([1,6,7,12]),t=x(e),l.label=2;case 2:return[4,t.next()];case 3:if((n=l.sent()).done)return[3,5];if(a=n.value,r)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{o=this.doDecodeSync(),r=!0}catch(e){if(!(e instanceof S))throw e}this.totalPos+=this.pos,l.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=l.sent(),i={error:c},[3,12];case 7:return l.trys.push([7,,10,11]),n&&!n.done&&(s=t.return)?[4,s.call(t)]:[3,9];case 8:l.sent(),l.label=9;case 9:return[3,11];case 10:if(i)throw i.error;return[7];case 11:return[7];case 12:if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,o]}throw _=(p=this).headByte,d=p.pos,h=p.totalPos,new RangeError("Insufficient data in parsing ".concat(I(_)," at ").concat(h," (").concat(d," in the current buffer)"))}}))},new((a=void 0)||(a=Promise))((function(e,t){function n(e){try{s(c.next(e))}catch(e){t(e)}}function i(e){try{s(c.throw(e))}catch(e){t(e)}}function s(t){var s;t.done?e(t.value):(s=t.value,s instanceof a?s:new a((function(e){e(s)}))).then(n,i)}s((c=c.apply(r,o||[])).next())}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,s=n.apply(e,t||[]),r=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(e){s[e]&&(i[e]=function(t){return new Promise((function(n,i){r.push([e,t,n,i])>1||a(e,t)}))})}function a(e,t){try{(n=s[e](t)).value instanceof T?Promise.resolve(n.value.v).then(c,p):_(r[0][2],n)}catch(e){_(r[0][3],e)}var n}function c(e){a("next",e)}function p(e){a("throw",e)}function _(e,t){e(t),r.shift(),r.length&&a(r[0][0],r[0][1])}}(this,arguments,(function(){var n,i,s,r,o,a,c,p,_;return N(this,(function(d){switch(d.label){case 0:n=t,i=-1,d.label=1;case 1:d.trys.push([1,13,14,19]),s=x(e),d.label=2;case 2:return[4,T(s.next())];case 3:if((r=d.sent()).done)return[3,12];if(o=r.value,t&&0===i)throw this.createExtraByteError(this.totalPos);this.appendBuffer(o),n&&(i=this.readArraySize(),n=!1,this.complete()),d.label=4;case 4:d.trys.push([4,9,,10]),d.label=5;case 5:return[4,T(this.doDecodeSync())];case 6:return[4,d.sent()];case 7:return d.sent(),0==--i?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=d.sent())instanceof S))throw a;return[3,10];case 10:this.totalPos+=this.pos,d.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=d.sent(),p={error:c},[3,19];case 14:return d.trys.push([14,,17,18]),r&&!r.done&&(_=s.return)?[4,T(_.call(s))]:[3,16];case 15:d.sent(),d.label=16;case 16:return[3,18];case 17:if(p)throw p.error;return[7];case 18:return[7];case 19:return[2]}}))}))},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!=(i=e-128)){this.pushMapState(i),this.complete();continue e}t={}}else if(e<160){if(0!=(i=e-144)){this.pushArrayState(i),this.complete();continue e}t=[]}else{var n=e-160;t=this.decodeUtf8String(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)n=this.lookU8(),t=this.decodeUtf8String(n,1);else if(218===e)n=this.lookU16(),t=this.decodeUtf8String(n,2);else if(219===e)n=this.lookU32(),t=this.decodeUtf8String(n,4);else if(220===e){if(0!==(i=this.readU16())){this.pushArrayState(i),this.complete();continue e}t=[]}else if(221===e){if(0!==(i=this.readU32())){this.pushArrayState(i),this.complete();continue e}t=[]}else if(222===e){if(0!==(i=this.readU16())){this.pushMapState(i),this.complete();continue e}t={}}else if(223===e){if(0!==(i=this.readU32())){this.pushMapState(i),this.complete();continue e}t={}}else if(196===e){var i=this.lookU8();t=this.decodeBinary(i,1)}else if(197===e)i=this.lookU16(),t=this.decodeBinary(i,2);else if(198===e)i=this.lookU32(),t=this.decodeBinary(i,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)i=this.lookU8(),t=this.decodeExtension(i,1);else if(200===e)i=this.lookU16(),t=this.decodeExtension(i,2);else{if(201!==e)throw new b("Unrecognized type byte: ".concat(I(e)));i=this.lookU32(),t=this.decodeExtension(i,4)}this.complete();for(var s=this.stack;s.length>0;){var r=s[s.length-1];if(0===r.type){if(r.array[r.position]=t,r.position++,r.position!==r.size)continue e;s.pop(),t=r.array}else{if(1===r.type){if(void 0,"string"!=(o=typeof t)&&"number"!==o)throw new b("The type of key must be string or number but "+typeof t);if("__proto__"===t)throw new b("The key __proto__ is not allowed");r.key=t,r.type=2;continue e}if(r.map[r.key]=t,r.readCount++,r.readCount!==r.size){r.key=null,r.type=1;continue e}s.pop(),t=r.map}}return t}var o},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new b("Unrecognized array type byte: ".concat(I(e)))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new b("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new b("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var n;if(e>this.maxStrLength)throw new b("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLengthm?function(e,t,n){var i=e.subarray(t,t+n);return g.decode(i)}(this.bytes,s,e):u(this.bytes,s,e),this.pos+=t+e,i},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new b("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw L;var n=this.pos+t,i=this.bytes.subarray(n,n+e);return this.pos+=t+e,i},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new b("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+t),i=this.decodeBinary(e,t+1);return this.extensionCodec.decode(i,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n=(e=this.view,t=this.pos,4294967296*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,n},e.prototype.readI64=function(){var e=c(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}(),O=n(2396);class M{static write(e){let t=e.byteLength||e.length;const n=[];do{let e=127&t;t>>=7,t>0&&(e|=128),n.push(e)}while(t>0);t=e.byteLength||e.length;const i=new Uint8Array(n.length+t);return i.set(n,0),i.set(e,n.length),i.buffer}static parse(e){const t=[],n=new Uint8Array(e),i=[0,7,14,21,28];for(let s=0;s7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=s+o+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(s+o,s+o+a):n.subarray(s+o,s+o+a)),s=s+o+a}return t}}const B=new Uint8Array([145,O.MessageType.Ping]);class V{constructor(e){this.name="messagepack",this.version=1,this.transferFormat=O.TransferFormat.Binary,this._errorResult=1,this._voidResult=2,this._nonVoidResult=3,e=e||{},this._encoder=new U(e.extensionCodec,e.context,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32,e.ignoreUndefined,e.forceIntegerToFloat),this._decoder=new P(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength)}parseMessages(e,t){if(!(n=e)||"undefined"==typeof ArrayBuffer||!(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer.");var n;null===t&&(t=O.NullLogger.instance);const i=M.parse(e),s=[];for(const e of i){const n=this._parseMessage(e,t);n&&s.push(n)}return s}writeMessage(e){switch(e.type){case O.MessageType.Invocation:return this._writeInvocation(e);case O.MessageType.StreamInvocation:return this._writeStreamInvocation(e);case O.MessageType.StreamItem:return this._writeStreamItem(e);case O.MessageType.Completion:return this._writeCompletion(e);case O.MessageType.Ping:return M.write(B);case O.MessageType.CancelInvocation:return this._writeCancelInvocation(e);default:throw new Error("Invalid message type.")}}_parseMessage(e,t){if(0===e.length)throw new Error("Invalid payload.");const n=this._decoder.decode(e);if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");const i=n[0];switch(i){case O.MessageType.Invocation:return this._createInvocationMessage(this._readHeaders(n),n);case O.MessageType.StreamItem:return this._createStreamItemMessage(this._readHeaders(n),n);case O.MessageType.Completion:return this._createCompletionMessage(this._readHeaders(n),n);case O.MessageType.Ping:return this._createPingMessage(n);case O.MessageType.Close:return this._createCloseMessage(n);default:return t.log(O.LogLevel.Information,"Unknown message type '"+i+"' ignored."),null}}_createCloseMessage(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:O.MessageType.Close}}_createPingMessage(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:O.MessageType.Ping}}_createInvocationMessage(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");const n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:O.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:O.MessageType.Invocation}}_createStreamItemMessage(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:O.MessageType.StreamItem}}_createCompletionMessage(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");const n=t[3];if(n!==this._voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");let i,s;switch(n){case this._errorResult:i=t[4];break;case this._nonVoidResult:s=t[4]}return{error:i,headers:e,invocationId:t[2],result:s,type:O.MessageType.Completion}}_writeInvocation(e){let t;return t=e.streamIds?this._encoder.encode([O.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]):this._encoder.encode([O.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments]),M.write(t.slice())}_writeStreamInvocation(e){let t;return t=e.streamIds?this._encoder.encode([O.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]):this._encoder.encode([O.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments]),M.write(t.slice())}_writeStreamItem(e){const t=this._encoder.encode([O.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return M.write(t.slice())}_writeCompletion(e){const t=e.error?this._errorResult:void 0!==e.result?this._nonVoidResult:this._voidResult;let n;switch(t){case this._errorResult:n=this._encoder.encode([O.MessageType.Completion,e.headers||{},e.invocationId,t,e.error]);break;case this._voidResult:n=this._encoder.encode([O.MessageType.Completion,e.headers||{},e.invocationId,t]);break;case this._nonVoidResult:n=this._encoder.encode([O.MessageType.Completion,e.headers||{},e.invocationId,t,e.result])}return M.write(n.slice())}_writeCancelInvocation(e){const t=this._encoder.encode([O.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return M.write(t.slice())}_readHeaders(e){const t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t}}const j="7.0.14"}}]);